PageSourceSearch

https://www.footlocker.co.uk/2046.0d53d98d.bundle.js

js footlocker.co.uk collected 2026-09-24 20:28:20 UTC 2,305,760 bytes, 971 lines download raw bytes

vendor: 7,167 bytes, lines 1-2
1/*! For license information please see 2046.0d53d98d.bundle.js.LICENSE.txt */
2(self.webpackChunk_footlocker_frontend=self.webpackChunk_footlocker_frontend||[]).push([[2046],{11026(e,t,r){"use strict";function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(e){return"'"+e+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function n(e){return!!e&&!!e[U]}function o(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===H}(e)||Array.isArray(e)||!!e[V]||!!(null==(t=e.constructor)?void 0:t[V])||h(e)||d(e))}function a(e,t,r){void 0===r&&(r=!1),0===s(e)?(r?Object.keys:W)(e).forEach(function(i){r&&"symbol"==typeof i||t(i,e[i],e)}):e.forEach(function(r,i){return t(i,r,e)})}function s(e){var t=e[U];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:3*!!d(e)}function l(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t,r){var i=s(e);2===i?e.set(t,r):3===i?e.add(r):e[t]=r}function c(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return j&&e instanceof Map}function d(e){return z&&e instanceof Set}function p(e){return e.o||e.t}function f(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=q(e);delete t[U];for(var r=W(t),i=0;i<r.length;i++){var n=r[i],o=t[n];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function m(e,t){return void 0===t&&(t=!1),y(e)||n(e)||!o(e)||(s(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&a(e,function(e,t){return m(t,!0)},!0)),e}function g(){i(2)}function y(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(e){var t=Z[e];return t||i(18,e),t}function b(e,t){t&&(v("Patches"),e.u=[],e.s=[],e.v=t)}function _(e){x(e),e.p.forEach(w),e.p=null}function x(e){e===B&&(B=e.l)}function A(e){return B={p:[],l:B,h:e,m:!0,_:0}}function w(e){var t=e[U];0===t.i||1===t.i?t.j():t.g=!0}function S(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.O||v("ES5").S(t,e,n),n?(r[U].P&&(_(t),i(4)),o(e)&&(e=T(t,e),t.l||E(t,e)),t.u&&v("Patches").M(r[U].t,e,t.u,t.s)):e=T(t,r,[]),_(t),t.u&&t.v(t.u,t.s),e!==G?e:void 0}function T(e,t,r){if(y(t))return t;var i=t[U];if(!i)return a(t,function(n,o){return C(e,i,t,n,o,r)},!0),t;if(i.A!==e)return t;if(!i.P)return E(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=4===i.i||5===i.i?i.o=f(i.k):i.o,o=n,s=!1;3===i.i&&(o=new Set(n),n.clear(),s=!0),a(o,function(t,o){return C(e,i,n,t,o,r,s)}),E(e,n,!1),r&&e.u&&v("Patches").N(i,r,e.u,e.s)}return i.o}function C(e,t,r,i,a,s,c){if(n(a)){var h=T(e,a,s&&t&&3!==t.i&&!l(t.R,i)?s.concat(i):void 0);if(u(r,i,h),!n(h))return;e.m=!1}else c&&r.add(a);if(o(a)&&!y(a)){if(!e.h.D&&e._<1)return;T(e,a),t&&t.A.l||E(e,a)}}function E(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&m(t,r)}function P(e,t){var r=e[U];return(r?p(r):e)[t]}function I(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function M(e){e.P||(e.P=!0,e.l&&M(e.l))}function k(e){e.o||(e.o=f(e.t))}function O(e,t,r){var i,n,o,a,s,l,u,c=h(t)?v("MapSet").F(t,r):d(t)?v("MapSet").T(t,r):e.O?(o=n={i:+!!(i=Array.isArray(t)),A:r?r.A:B,P:!1,I:!1,R:{},l:r,t:t,k:null,o:null,j:null,C:!1},a=$,i&&(o=[n],a=K),l=(s=Proxy.revocable(o,a)).revoke,n.k=u=s.proxy,n.j=l,u):v("ES5").J(t,r);return(r?r.A:B).p.push(c),c}function D(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return f(e)}r.d(t,{Z0:()=>ev});var R,L,B,F="u">typeof Symbol&&"symbol"==typeof Symbol("x"),j="u">typeof Map,z="u">typeof Set,N="u">typeof Proxy&&void 0!==Proxy.revocable&&"u">typeof Reflect,G=F?Symbol.for("immer-nothing"):((L={})["immer-nothing"]=!0,L),V=F?Symbol.for("immer-draftable"):"__$immer_draftable",U=F?Symbol.for("immer-state"):"__$immer_state",H=""+Object.prototype.constructor,W="u">typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,q=Object.getOwnPropertyDescriptors||function(e){var t={};return W(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Z={},$={get:function(e,t){if(t===U)return e;var r,i,n=p(e);if(!l(n,t))return(i=I(n,t))?"value"in i?i.value:null==(r=i.get)?void 0:r.call(e.k):void 0;var a=n[t];return e.I||!o(a)?a:a===P(e.t,t)?(k(e),e.o[t]=O(e.A.h,a,e)):a},has:function(e,t){return t in p(e)},ownKeys:function(e){return Reflect.ownKeys(p(e))},set:function(e,t,r){var i=I(p(e),t);if(null==i?void 0:i.set)return i.set.call(e.k,r),!0;if(!e.P){var n=P(p(e),t),o=null==n?void 0:n[U];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(c(r,n)&&(void 0!==r||l(e.t,t)))return!0;k(e),M(e)}return e.o[t]===r&&(void 0!==r||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==P(e.t,t)||t in e.t?(e.R[t]=!1,k(e),M(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=p(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:i.enumerable,value:r[t]}:i},defineProperty:function(){i(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){i(12)}},K={};a($,function(e,t){K[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),K.deleteProperty=function(e,t){return K.set.call(this,e,t,void 0)},K.set=function(e,t,r){return $.set.call(this,e[0],t,r,e[0])};var X=new(function(){function e(e){var t=this;this.O=N,this.D=!0,this.produce=function(e,r,n){if("function"==typeof e&&"function"!=typeof r){var a,s=r;return r=e,function(e){var i=this;void 0===e&&(e=s);for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return t.produce(e,function(e){var t;return(t=r).call.apply(t,[i,e].concat(o))})}}if("function"!=typeof r&&i(6),void 0!==n&&"function"!=typeof n&&i(7),o(e)){var l=A(t),u=O(t,e,void 0),c=!0;try{a=r(u),c=!1}finally{c?_(l):x(l)}return"u">typeof Promise&&a instanceof Promise?a.then(function(e){return b(l,n),S(e,l)},function(e){throw _(l),e}):(b(l,n),S(a,l))}if(!e||"object"!=typeof e){if(void 0===(a=r(e))&&(a=e),a===G&&(a=void 0),t.D&&m(a,!0),n){var h=[],d=[];v("Patches").M(e,a,h,d),n(h,d)}return a}i(21,e)},this.produceWithPatches=function(e,r){if("function"==typeof e)return function(r){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return t.produceWithPatches(r,function(t){return e.apply(void 0,[t].concat(n))})};var i,n,o=t.produce(e,r,function(e,t){i=e,n=t});return"u">typeof Promise&&o instanceof Promise?o.then(function(e){return[e,i,n]}):[o,i,n]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}
2var t=e.prototype;return t.createDraft=function(e){o(e)||i(8),n(e)&&(n(t=e)||i(22,t),e=function e(t){if(!o(t))return t;var r,i=t[U],n=s(t);if(i){if(!i.P&&(i.i<4||!v("ES5").K(i)))return i.t;i.I=!0,r=D(t,n),i.I=!1}else r=D(t,n);return a(r,function(t,n){var o;i&&(2===s(o=i.t)?o.get(t):o[t])===n||u(r,t,e(n))}),3===n?new Set(r):r}(t));var t,r=A(this),l=O(this,e,void 0);return l[U].C=!0,x(r),l},t.finishDraft=function(e,t){var r=(e&&e[U]).A;return b(r,t),S(void 0,r)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!N&&i(20),this.O=e},t.applyPatches=function(e,t){for(r=t.length-1;r>=0;r--){var r,i=t[r];if(0===i.path.length&&"replace"===i.op){e=i.value;break}}r>-1&&(t=t.slice(r+1));var o=v("Patches").$;return n(e)?o(e,t):this.produce(e,function(e){return o(e,t)})},e}()),Y=X.produce;X.produceWithPatches.bind(X),X.setAutoFreeze.bind(X),X.setUseProxies.bind(X),X.applyPatches.bind(X),X.createDraft.bind(X),X.finishDraft.bind(X);var Q=function(){return Math.random().toString(36).substring(7).split("").join(".")};Q(),Q(),r(85409);var J=(R=function(e,t){return(R=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ee=function(e,t){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){var l=[o,s];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(n=2&l[0]?i.return:l[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,l[1])).done)return n;switch(i=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,i=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){a.label=l[1];break}if(6===l[0]&&a.label<n[1]){a.label=n[1],n=l;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(l);break}n[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],i=0}finally{r=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},et=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},er=Object.defineProperty,ei=Object.defineProperties,en=Object.getOwnPropertyDescriptors,eo=Object.getOwnPropertySymbols,ea=Object.prototype.hasOwnProperty,es=Object.prototype.propertyIsEnumerable,el=function(e,t,r){return t in e?er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},eu=function(e,t){for(var r in t||(t={}))ea.call(t,r)&&el(e,r,t[r]);if(eo)for(var i=0,n=eo(t);i<n.length;i++){var r=n[i];es.call(t,r)&&el(e,r,t[r])}return e},ec=function(e,t){return ei(e,en(t))};function eh(e,t){function r(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t){var n=t.apply(void 0,r);if(!n)throw Error("prepareAction did not return an object");return eu(eu({type:e,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:e,payload:r[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(t){return t.type===e},r}"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var ed=Array;function ep(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ed.apply(this,e)||this;return Object.setPrototypeOf(r,ep.prototype),r}J(ep,ed),Object.defineProperty(ep,Symbol.species,{get:function(){return ep},enumerable:!1,configurable:!0}),ep.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ed.prototype.concat.apply(this,e)},ep.prototype.prepend=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&Array.isArray(e[0])?new(ep.bind.apply(ep,et([void 0],e[0].concat(this)))):new(ep.bind.apply(ep,et([void 0],e.concat(this))))};var ef=Array;function em(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ef.apply(this,e)||this;return Object.setPrototypeOf(r,em.prototype),r}function eg(e){return o(e)?Y(e,function(){}):e}function ey(e){var t,r={},i=[],n={addCase:function(e,t){var i="string"==typeof e?e:e.type;if(!i)throw Error("`builder.addCase` cannot be called with an empty action type");if(i in r)throw Error("`builder.addCase` cannot be called with two reducers for the same action type");return r[i]=t,n},addMatcher:function(e,t){return i.push({matcher:e,reducer:t}),n},addDefaultCase:function(e){return t=e,n}};return e(n),[r,i,t]}function ev(e){var t,r=e.name;if(!r)throw Error("`name` is a required option for createSlice");var i="function"==typeof e.initialState?e.initialState:eg(e.initialState),a=e.reducers||{},s=Object.keys(a),l={},u={},c={};function h(){var t="function"==typeof e.extraReducers?ey(e.extraReducers):[e.extraReducers],r=t[0],a=t[1],s=void 0===a?[]:a,l=t[2],c=void 0===l?void 0:l,h=eu(eu({},void 0===r?{}:r),u);return function(e,t,r){void 0===r&&(r=[]);var i,a="function"==typeof t?ey(t):[t,r,void 0],s=a[0],l=a[1],u=a[2];if("function"==typeof e)i=function(){return eg(e())};else{var c=eg(e);i=function(){return c}}function h(e,t){void 0===e&&(e=i());var r=et([s[t.type]],l.filter(function(e){return(0,e.matcher)(t)}).map(function(e){return e.reducer}));return 0===r.filter(function(e){return!!e}).length&&(r=[u]),r.reduce(function(e,r){if(r)if(n(e)){var i=r(e,t);return void 0===i?e:i}else{if(o(e))return Y(e,function(e){return r(e,t)});var i=r(e,t);if(void 0===i){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}return e},e)}return h.getInitialState=i,h}(i,function(e){for(var t in h)e.addCase(t,h[t]);for(var r=0;r<s.length;r++){var i=s[r];e.addMatcher(i.matcher,i.reducer)}c&&e.addDefaultCase(c)})}
2return s.forEach(function(e){var t,i,n=a[e],o=r+"/"+e;"reducer"in n?(t=n.reducer,i=n.prepare):t=n,l[e]=t,u[o]=t,c[e]=i?eh(o,i):eh(o)}),{name:r,reducer:function(e,r){return t||(t=h()),t(e,r)},actions:c,caseReducers:l,getInitialState:function(){return t||(t=h()),t.getInitialState()}}}J(em,ef),Object.defineProperty(em,Symbol.species,{get:function(){return em},enumerable:!1,configurable:!0}),em.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ef.prototype.concat.apply(this,e)},em.prototype.prepend=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&Array.isArray(e[0])?new(em.bind.apply(em,et([void 0],e[0].concat(this)))):new(em.bind.apply(em,et([void 0],e.concat(this))))};var eb=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},e_=["name","message","stack","code"],ex=function(e,t){this.payload=e,this.meta=t},eA=function(e,t){this.payload=e,this.meta=t},ew=function(e){if("object"==typeof e&&null!==e){for(var t={},r=0;r<e_.length;r++){var i=e_[r];"string"==typeof e[i]&&(t[i]=e[i])}return t}return{message:String(e)}};function eS(e,t,r){var i=eh(e+"/fulfilled",function(e,t,r,i){return{payload:e,meta:ec(eu({},i||{}),{arg:r,requestId:t,requestStatus:"fulfilled"})}}),n=eh(e+"/pending",function(e,t,r){return{payload:void 0,meta:ec(eu({},r||{}),{arg:t,requestId:e,requestStatus:"pending"})}}),o=eh(e+"/rejected",function(e,t,i,n,o){return{payload:n,error:(r&&r.serializeError||ew)(e||"Rejected"),meta:ec(eu({},o||{}),{arg:i,requestId:t,rejectedWithValue:!!n,requestStatus:"rejected",aborted:(null==e?void 0:e.name)==="AbortError",condition:(null==e?void 0:e.name)==="ConditionError"})}}),a="u">typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign(function(e){return function(s,l,u){var c,h=(null==r?void 0:r.idGenerator)?r.idGenerator(e):eb(),d=new a;function p(e){c=e,d.abort()}var f=function(){var a,f;return a=this,f=function(){var a,f,m,g,y,v;return ee(this,function(b){switch(b.label){case 0:var _;if(b.trys.push([0,4,,5]),null===(_=g=null==(a=null==r?void 0:r.condition)?void 0:a.call(r,e,{getState:l,extra:u}))||"object"!=typeof _||"function"!=typeof _.then)return[3,2];return[4,g];case 1:g=b.sent(),b.label=2;case 2:if(!1===g||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return y=new Promise(function(e,t){return d.signal.addEventListener("abort",function(){return t({name:"AbortError",message:c||"Aborted"})})}),s(n(h,e,null==(f=null==r?void 0:r.getPendingMeta)?void 0:f.call(r,{requestId:h,arg:e},{getState:l,extra:u}))),[4,Promise.race([y,Promise.resolve(t(e,{dispatch:s,getState:l,extra:u,requestId:h,signal:d.signal,abort:p,rejectWithValue:function(e,t){return new ex(e,t)},fulfillWithValue:function(e,t){return new eA(e,t)}})).then(function(t){if(t instanceof ex)throw t;return t instanceof eA?i(t.payload,h,e,t.meta):i(t,h,e)})])];case 3:return m=b.sent(),[3,5];case 4:return m=(v=b.sent())instanceof ex?o(null,h,e,v.payload,v.meta):o(v,h,e),[3,5];case 5:return r&&!r.dispatchConditionRejection&&o.match(m)&&m.meta.condition||s(m),[2,m]}})},new Promise(function(e,t){var r=function(e){try{n(f.next(e))}catch(e){t(e)}},i=function(e){try{n(f.throw(e))}catch(e){t(e)}},n=function(t){return t.done?e(t.value):Promise.resolve(t.value).then(r,i)};n((f=f.apply(a,null)).next())})}();return Object.assign(f,{abort:p,requestId:h,arg:e,unwrap:function(){return f.then(eT)}})}},{pending:n,rejected:o,fulfilled:i,typePrefix:e})}function eT(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}eS.withTypes=function(){return eS};var eC="listenerMiddleware";eh(eC+"/add"),eh(eC+"/removeAll"),eh(eC+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("u">typeof window?window:void 0!==r.g?r.g:globalThis),"u">typeof window&&window.requestAnimationFrame&&window.requestAnimationFrame,function(){function e(e,t){var r=o[e];return r?r.enumerable=t:o[e]=r={configurable:!0,enumerable:t,get:function(){var t=this[U];return $.get(t,e)},set:function(t){var r=this[U];$.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var n=e[t][U];if(!n.P)switch(n.i){case 5:i(n)&&M(n);break;case 4:r(n)&&M(n)}}}function r(e){for(var t=e.t,r=e.k,i=W(r),n=i.length-1;n>=0;n--){var o=i[n];if(o!==U){var a=t[o];if(void 0===a&&!l(t,o))return!0;var s=r[o],u=s&&s[U];if(u?u.t!==a:!c(s,a))return!0}}var h=!!t[U];return i.length!==W(t).length+ +!h}function i(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var i=0;i<t.length;i++)if(!t.hasOwnProperty(i))return!0;return!1}var o={};Z.ES5||(Z.ES5={J:function(t,r){var i=Array.isArray(t),n=function(t,r){if(t){for(var i=Array(r.length),n=0;n<r.length;n++)Object.defineProperty(i,""+n,e(n,!0));return i}var o=q(r);delete o[U];for(var a=W(o),s=0;s<a.length;s++){var l=a[s];o[l]=e(l,t||!!o[l].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(i,t),o={i:i?5:4,A:r?r.A:B,P:!1,I:!1,R:{},l:r,t:t,k:n,o:null,g:!1,C:!1};return Object.defineProperty(n,U,{value:o,writable:!0}),n},S:function(e,r,o){o?n(r)&&r[U].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var r=t[U];if(r){var n=r.t,o=r.k,s=r.R,u=r.i;if(4===u)a(o,function(t){t!==U&&(void 0!==n[t]||l(n,t)?s[t]||e(o[t]):(s[t]=!0,M(r)))}),a(n,function(e){void 0!==o[e]||l(o,e)||(s[e]=!1,M(r))});else if(5===u){if(i(r)&&(M(r),s.length=!0),o.length<n.length)for(var c=o.length;c<n.length;c++)s[c]=!1;else for(var h=n.length;h<o.length;h++)s[h]=!0;for(var d=Math.min(o.length,n.length),p=0;p<d;p++)o.hasOwnProperty(p)||(s[p]=!0),void 0===s[p]&&e(o[p])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?r(e):i(e)}})}()},45056(e,t,r){"use strict";var i,n,o,a;function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(null,arguments)}r.d(t,{AO:()=>f,B6:()=>w,G3:()=>q,Gh:()=>M,HS:()=>O,Oi:()=>c,RO:()=>S,Rr:()=>m,VV:()=>F,aE:()=>X,pX:()=>j,pb:()=>T,rc:()=>i,ro:()=>_,tH:()=>B,ue:()=>v,yD:()=>I,zR:()=>u}),(o=i||(i={})).Pop="POP",o.Push="PUSH",o.Replace="REPLACE";let l="popstate";function u(e){return void 0===e&&(e={}),function(e,t,r){void 0===r&&(r={});let{window:n=document.defaultView,v5Compat:o=!1}=r,a=n.history,u=i.Pop,h=null,m=g();function g(){return(a.state||{idx:null}).idx}function y(){u=i.Pop;let e=g(),t=null==e?null:e-m;m=e,h&&h({action:u,location:b.location,delta:t})}function v(e){let t="null"!==n.location.origin?n.location.origin:n.location.href,r="string"==typeof e?e:f(e);return c(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==m&&(m=0,a.replaceState(s({},a.state,{idx:m}),""));let b={get action(){return u},get location(){return e(n,a)},listen(e){if(h)throw Error("A history only accepts one active listener");return n.addEventListener(l,y),h=e,()=>{n.removeEventListener(l,y),h=null}},createHref:e=>t(n,e),createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){u=i.Push;let r=p(b.location,e,t),s=d(r,m=g()+1),l=b.createHref(r);try{a.pushState(s,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;n.location.assign(l)}o&&h&&h({action:u,location:b.location,delta:1})},replace:function(e,t){u=i.Replace;let r=p(b.location,e,t),n=d(r,m=g()),s=b.createHref(r);a.replaceState(n,"",s),o&&h&&h({action:u,location:b.location,delta:0})},go:e=>a.go(e)};return b}(function(e,t){let{pathname:r,search:i,hash:n}=e.location;return p("",{pathname:r,search:i,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:f(t)},e)}function c(e,t){if(!1===e||null==e)throw Error(t)}function h(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,r,i){return void 0===r&&(r=null),s({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?m(t):t,{state:r,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function f(e){let{pathname:t="/",search:r="",hash:i=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),i&&"#"!==i&&(t+="#"===i.charAt(0)?i:"#"+i),t}function m(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}(a=n||(n={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";
2let g=new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,r,i){return void 0===r&&(r=[]),void 0===i&&(i={}),e.map((e,n)=>{let o=[...r,String(n)],a="string"==typeof e.id?e.id:o.join("-");if(c(!0!==e.index||!e.children,"Cannot specify children on an index route"),c(!i[a],'Found a route id collision on id "'+a+"\".  Route id's must be globally unique within Data Router usages"),!0===e.index){let r=s({},e,t(e),{id:a});return i[a]=r,r}{let r=s({},e,t(e),{id:a,children:void 0});return i[a]=r,e.children&&(r.children=y(e.children,t,o,i)),r}})}function v(e,t,r){return void 0===r&&(r="/"),b(e,t,r,!1)}function b(e,t,r,i){let n=T(("string"==typeof t?m(t):t).pathname||"/",r);if(null==n)return null;let o=function e(t,r,i,n){void 0===r&&(r=[]),void 0===i&&(i=[]),void 0===n&&(n="");let o=(t,o,a)=>{var s;let l,u,h={relativePath:void 0===a?t.path||"":a,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};h.relativePath.startsWith("/")&&(c(h.relativePath.startsWith(n),'Absolute route path "'+h.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),h.relativePath=h.relativePath.slice(n.length));let d=O([n,h.relativePath]),p=i.concat(h);t.children&&t.children.length>0&&(c(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+d+'".'),e(t.children,r,p,d)),(null!=t.path||t.index)&&r.push({path:d,score:(s=t.index,u=(l=d.split("/")).length,l.some(A)&&(u+=-2),s&&(u+=2),l.filter(e=>!A(e)).reduce((e,t)=>e+(x.test(t)?3:""===t?1:10),u)),routesMeta:p})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[i,...n]=r,o=i.endsWith("?"),a=i.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let s=e(n.join("/")),l=[];return l.push(...s.map(e=>""===e?a:[a,e].join("/"))),o&&l.push(...s),l.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);o.sort((e,t)=>{var r,i;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),i=t.routesMeta.map(e=>e.childrenIndex),r.length===i.length&&r.slice(0,-1).every((e,t)=>e===i[t])?r[r.length-1]-i[i.length-1]:0)});let a=null,s=S(n);for(let e=0;null==a&&e<o.length;++e)a=function(e,t,r){void 0===r&&(r=!1);let{routesMeta:i}=e,n={},o="/",a=[];for(let e=0;e<i.length;++e){let s=i[e],l=e===i.length-1,u="/"===o?t:t.slice(o.length)||"/",c=w({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},u),h=s.route;if(!c&&l&&r&&!i[i.length-1].route.index&&(c=w({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},u)),!c)return null;
2Object.assign(n,c.params),a.push({params:n,pathname:O([o,c.pathname]),pathnameBase:D(O([o,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(o=O([o,c.pathnameBase]))}return a}(o[e],s,i);return a}function _(e,t){let{route:r,pathname:i,params:n}=e;return{id:r.id,pathname:i,params:n,data:t[r.id],handle:r.handle}}let x=/^:[\w-]+$/,A=e=>"*"===e;function w(e,t){var r,i,n;let o,a;"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[s,l]=(r=e.path,i=e.caseSensitive,n=e.end,void 0===i&&(i=!1),void 0===n&&(n=!0),h("*"===r||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),o=[],a="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(o.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")),r.endsWith("*")?(o.push({paramName:"*"}),a+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==r&&"/"!==r&&(a+="(?:(?=\\/|$))"),[new RegExp(a,i?void 0:"i"),o]),u=t.match(s);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),p=u.slice(1);return{params:l.reduce((e,t,r)=>{let{paramName:i,isOptional:n}=t;if("*"===i){let e=p[r]||"";d=c.slice(0,c.length-e.length).replace(/(.)\/+$/,"$1")}let o=p[r];return n&&!o?e[i]=void 0:e[i]=(o||"").replace(/%2F/g,"/"),e},{}),pathname:c,pathnameBase:d,pattern:e}}function S(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return h(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function T(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&"/"!==i?null:e.slice(r)||"/"}function C(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function E(e,t,r,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t)+"` field ["+JSON.stringify(i)+"].  Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function P(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function I(e,t){let r=P(e);return t?r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase):r.map(e=>e.pathnameBase)}function M(e,t,r,i){let n,o;void 0===i&&(i=!1),"string"==typeof e?n=m(e):(c(!(n=s({},e)).pathname||!n.pathname.includes("?"),E("?","pathname","search",n)),c(!n.pathname||!n.pathname.includes("#"),E("#","pathname","hash",n)),c(!n.search||!n.search.includes("#"),E("#","search","hash",n)));let a=""===e||""===n.pathname,l=a?"/":n.pathname;if(null==l)o=r;else{let e=t.length-1;if(!i&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;n.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:r,search:i="",hash:n=""}="string"==typeof e?m(e):e;return{pathname:r?(r=k(r)).startsWith("/")?C(r.substring(1),"/"):C(r,t):t,search:R(i),hash:L(n)}}(n,o),h=l&&"/"!==l&&l.endsWith("/"),d=(a||"."===l)&&r.endsWith("/");return!u.pathname.endsWith("/")&&(h||d)&&(u.pathname+="/"),u}let k=e=>e.replace(/\/\/+/g,"/"),O=e=>k(e.join("/")),D=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",L=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class B extends Error{}
2class F{constructor(e,t,r,i){void 0===i&&(i=!1),this.status=e,this.statusText=t||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function j(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}let z=["post","put","patch","delete"],N=new Set(z),G=new Set(["get",...z]),V=new Set([301,302,303,307,308]),U=new Set([307,308]),H={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},W={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},q={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Z=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),K="remix-router-transitions";function X(e){let t,r,o,a,l,u,d=e.window?e.window:"u">typeof window?window:void 0,f=void 0!==d&&void 0!==d.document&&void 0!==d.document.createElement,m=!f;if(c(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let r=e.detectErrorBoundary;t=e=>({hasErrorBoundary:r(e)})}else t=$;let g={},x=y(e.routes,t,void 0,g),A=e.basename||"/",w=e.dataStrategy||ea,S=e.patchRoutesOnNavigation,C=s({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),E=null,P=new Set,I=null,M=null,k=null,O=null!=e.hydrationData,D=v(x,e.history.location,A),R=!1,L=null;if(null==D&&!S){let t=eb(404,{pathname:e.history.location.pathname}),{matches:r,route:i}=ev(x);D=r,L={[i.id]:t}}if(D&&!e.hydrationData&&to(D,x,e.history.location.pathname).active&&(D=null),D)if(D.some(e=>e.route.lazy))o=!1;else if(D.some(e=>e.route.loader))if(C.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=D.findIndex(e=>void 0!==r[e.route.id]);o=D.slice(0,e+1).every(e=>!et(e.route,t,r))}else o=D.every(e=>!et(e.route,t,r))}else o=null!=e.hydrationData;else o=!0;else if(o=!1,D=[],C.v7_partialHydration){let t=to(null,x,e.history.location.pathname);t.active&&t.matches&&(R=!0,D=t.matches)}let B={historyAction:e.history.action,location:e.history.location,matches:D,initialized:o,navigation:H,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||L,fetchers:new Map,blockers:new Map},F=i.Pop,z=!1,N=!1,G=new Map,X=null,J=!1,er=!1,ei=[],eo=new Set,el=new Map,ed=0,ep=-1,ex=new Map,eT=new Set,ek=new Map,eF=new Map,ej=new Set,ez=new Map,eN=new Map;function eG(e,t){void 0===t&&(t={}),B=s({},B,e);let r=[],i=[];C.v7_fetcherPersist&&B.fetchers.forEach((e,t)=>{"idle"===e.state&&(ej.has(t)?i.push(t):r.push(t))}
2),ej.forEach(e=>{B.fetchers.has(e)||el.has(e)||i.push(e)}),[...P].forEach(e=>e(B,{deletedFetchers:i,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),C.v7_fetcherPersist?(r.forEach(e=>B.fetchers.delete(e)),i.forEach(e=>e3(e))):i.forEach(e=>ej.delete(e))}function eV(t,n,o){var a,l;let u,c,{flushSync:h}=void 0===o?{}:o,d=null!=B.actionData&&null!=B.navigation.formMethod&&eE(B.navigation.formMethod)&&"loading"===B.navigation.state&&(null==(a=t.state)?void 0:a._isRedirect)!==!0;u=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:d?B.actionData:null;let p=n.loaderData?em(B.loaderData,n.loaderData,n.matches||[],n.errors):B.loaderData,f=B.blockers;f.size>0&&(f=new Map(f)).forEach((e,t)=>f.set(t,q));let m=!0===z||null!=B.navigation.formMethod&&eE(B.navigation.formMethod)&&(null==(l=t.state)?void 0:l._isRedirect)!==!0;if(r&&(x=r,r=void 0),J||F===i.Pop||(F===i.Push?e.history.push(t,t.state):F===i.Replace&&e.history.replace(t,t.state)),F===i.Pop){let e=G.get(B.location.pathname);e&&e.has(t.pathname)?c={currentLocation:B.location,nextLocation:t}:G.has(t.pathname)&&(c={currentLocation:t,nextLocation:B.location})}else if(N){let e=G.get(B.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),G.set(B.location.pathname,e)),c={currentLocation:B.location,nextLocation:t}}eG(s({},n,{actionData:u,loaderData:p,historyAction:F,location:t,initialized:!0,navigation:H,revalidation:"idle",restoreScrollPosition:tn(t,n.matches||B.matches),preventScrollReset:m,blockers:f}),{viewTransitionOpts:c,flushSync:!0===h}),F=i.Pop,z=!1,N=!1,J=!1,er=!1,ei=[]}async function eU(t,r){if("number"==typeof t)return void e.history.go(t);let n=Y(B.location,B.matches,A,C.v7_prependBasename,t,C.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:o,submission:a,error:l}=Q(C.v7_normalizeFormMethod,!1,n,r),u=B.location,c=p(B.location,o,r&&r.state);c=s({},c,e.history.encodeLocation(c));let h=r&&null!=r.replace?r.replace:void 0,d=i.Push;!0===h?d=i.Replace:!1===h||null!=a&&eE(a.formMethod)&&a.formAction===B.location.pathname+B.location.search&&(d=i.Replace);let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,m=!0===(r&&r.flushSync),g=te({currentLocation:u,nextLocation:c,historyAction:d});return g?void e9(g,{state:"blocked",location:c,proceed(){e9(g,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),eU(t,r)},reset(){let e=new Map(B.blockers);e.set(g,q),eG({blockers:e})}}):await eH(d,c,{submission:a,pendingError:l,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:m})}async function eH(t,i,o){var a,u,c;let h;l&&l.abort(),l=null,F=t,J=!0===(o&&o.startUninterruptedRevalidation),a=B.location,u=B.matches,I&&k&&(I[ti(a,u)]=k()),z=!0===(o&&o.preventScrollReset),N=!0===(o&&o.enableViewTransition);let d=r||x,p=o&&o.overrideNavigation,f=null!=o&&o.initialHydration&&B.matches&&B.matches.length>0&&!R?B.matches:v(d,i,A),m=!0===(o&&o.flushSync);if(f&&B.initialized&&!er&&(c=B.location,c.pathname===i.pathname&&c.search===i.search&&(""===c.hash?""!==i.hash:c.hash===i.hash||""!==i.hash))&&!(o&&o.submission&&eE(o.submission.formMethod)))return void eV(i,{matches:f},{flushSync:m});let g=to(f,d,i.pathname);if(g.active&&g.matches&&(f=g.matches),!f){let{error:e,notFoundMatches:t,route:r}=tt(i.pathname);eV(i,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:m});return}l=new AbortController;let y=eh(e.history,i,l.signal,o&&o.submission);if(o&&o.pendingError)h=[ey(f).route.id,{type:n.error,error:o.pendingError}];else if(o&&o.submission&&eE(o.submission.formMethod)){let t=await eW(y,i,o.submission,f,g.active,{replace:o.replace,flushSync:m});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ew(r)&&j(r.error)&&404===r.error.status){l=null,eV(i,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}f=t.matches||f,h=t.pendingActionResult,p=eR(i,o.submission),m=!1,g.active=!1,y=eh(e.history,y.url,y.signal)}let{shortCircuited:b,matches:_,loaderData:w,errors:S}=await eq(y,i,f,g.active,p,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,m,h);b||(l=null,eV(i,s({matches:_||f},eg(h),{loaderData:w,errors:S})))}async function eW(t,r,o,a,s,l){let u;if(void 0===l&&(l={}),eJ(),eG({navigation:{state:"submitting",location:r,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}},{flushSync:!0===l.flushSync}),s){let e=await ta(a,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=ey(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:n.error,error:e.error}]}}if(e.matches)a=e.matches;else{let{notFoundMatches:e,error:t,route:i}=tt(r.pathname);return{matches:e,pendingActionResult:[i.id,{type:n.error,error:t}]}}}let c=eO(a,r);
2if(c.route.action||c.route.lazy){if(u=(await eY("action",B,t,[c],a,null))[c.route.id],t.signal.aborted)return{shortCircuited:!0}}else u={type:n.error,error:eb(405,{method:t.method,pathname:r.pathname,routeId:c.route.id})};if(eS(u)){let r;return r=l&&null!=l.replace?l.replace:ec(u.response.headers.get("Location"),new URL(t.url),A,e.history)===B.location.pathname+B.location.search,await eX(t,u,!0,{submission:o,replace:r}),{shortCircuited:!0}}if(eA(u))throw eb(400,{type:"defer-action"});if(ew(u)){let e=ey(a,c.route.id);return!0!==(l&&l.replace)&&(F=i.Push),{matches:a,pendingActionResult:[e.route.id,u]}}return{matches:a,pendingActionResult:[c.route.id,u]}}async function eq(t,i,n,o,a,u,c,h,d,p,f){let m=a||eR(i,u),g=u||c||eD(m),y=!J&&(!C.v7_partialHydration||!d);if(o){if(y){let e=eZ(f);eG(s({navigation:m},void 0!==e?{actionData:e}:{}),{flushSync:p})}let e=await ta(n,i.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=ey(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)n=e.matches;else{let{error:e,notFoundMatches:t,route:r}=tt(i.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let v=r||x,[b,_]=ee(e.history,B,n,g,i,C.v7_partialHydration&&!0===d,C.v7_skipActionErrorRevalidation,er,ei,eo,ej,ek,eT,v,A,f);if(tr(e=>!(n&&n.some(t=>t.route.id===e))||b&&b.some(t=>t.route.id===e)),ep=++ed,0===b.length&&0===_.length){let e=e6();return eV(i,s({matches:n,loaderData:{},errors:f&&ew(f[1])?{[f[0]]:f[1].error}:null},eg(f),e?{fetchers:new Map(B.fetchers)}:{}),{flushSync:p}),{shortCircuited:!0}}if(y){let e={};if(!o){e.navigation=m;let t=eZ(f);void 0!==t&&(e.actionData=t)}_.length>0&&(_.forEach(e=>{let t=B.fetchers.get(e.key),r=eL(void 0,t?t.data:void 0);B.fetchers.set(e.key,r)}),e.fetchers=new Map(B.fetchers)),eG(e,{flushSync:p})}_.forEach(e=>{e5(e.key),e.controller&&el.set(e.key,e.controller)});let w=()=>_.forEach(e=>e5(e.key));l&&l.signal.addEventListener("abort",w);let{loaderResults:S,fetcherResults:T}=await eQ(B,n,b,_,t);if(t.signal.aborted)return{shortCircuited:!0};l&&l.signal.removeEventListener("abort",w),_.forEach(e=>el.delete(e.key));let E=e_(S);if(E)return await eX(t,E.result,!0,{replace:h}),{shortCircuited:!0};if(E=e_(T))return eT.add(E.key),await eX(t,E.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:P,errors:I}=ef(B,n,S,f,_,T,ez);ez.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&ez.delete(t)})}),C.v7_partialHydration&&d&&B.errors&&(I=s({},B.errors,I));let M=e6(),k=e8(ep),O=M||k||_.length>0;return s({matches:n,loaderData:P,errors:I},O?{fetchers:new Map(B.fetchers)}:{})}function eZ(e){if(e&&!ew(e[1]))return{[e[0]]:e[1].data};if(B.actionData)if(0===Object.keys(B.actionData).length)return null;else return B.actionData}async function e$(t,i,n,o,a,s,u,h,d){function p(e){if(!e.route.action&&!e.route.lazy){let e=eb(405,{method:d.formMethod,pathname:n,routeId:i});return e1(t,i,e,{flushSync:u}),!0}return!1}if(eJ(),ek.delete(t),!s&&p(o))return;let f=B.fetchers.get(t);e0(t,{state:"submitting",formMethod:d.formMethod,formAction:d.formAction,formEncType:d.formEncType,formData:d.formData,json:d.json,text:d.text,data:f?f.data:void 0},{flushSync:u});let m=new AbortController,g=eh(e.history,n,m.signal,d);if(s){let e=await ta(a,new URL(g.url).pathname,g.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,i,e.error,{flushSync:u});if(!e.matches)return void e1(t,i,eb(404,{pathname:n}),{flushSync:u});if(p(o=eO(a=e.matches,n)))return}el.set(t,m);let y=ed,b=(await eY("action",B,g,[o],a,t))[o.route.id];if(g.signal.aborted){el.get(t)===m&&el.delete(t);return}if(C.v7_fetcherPersist&&ej.has(t)){if(eS(b)||ew(b))return void e0(t,eB(void 0))}else{if(eS(b))return(el.delete(t),ep>y)?void e0(t,eB(void 0)):(eT.add(t),e0(t,eL(d)),eX(g,b,!1,{fetcherSubmission:d,preventScrollReset:h}));if(ew(b))return void e1(t,i,b.error)}if(eA(b))throw eb(400,{type:"defer-action"});let _=B.navigation.location||B.location,w=eh(e.history,_,m.signal),S=r||x,T="idle"!==B.navigation.state?v(S,B.navigation.location,A):B.matches;c(T,"Didn't find any matches after fetcher action");let E=++ed;ex.set(t,E);let P=eL(d,b.data);B.fetchers.set(t,P);let[I,M]=ee(e.history,B,T,d,_,!1,C.v7_skipActionErrorRevalidation,er,ei,eo,ej,ek,eT,S,A,[o.route.id,b]);M.filter(e=>
2e.key!==t).forEach(e=>{let t=e.key,r=B.fetchers.get(t),i=eL(void 0,r?r.data:void 0);B.fetchers.set(t,i),e5(t),e.controller&&el.set(t,e.controller)}),eG({fetchers:new Map(B.fetchers)});let k=()=>M.forEach(e=>e5(e.key));m.signal.addEventListener("abort",k);let{loaderResults:O,fetcherResults:D}=await eQ(B,T,I,M,w);if(m.signal.aborted)return;m.signal.removeEventListener("abort",k),ex.delete(t),el.delete(t),M.forEach(e=>el.delete(e.key));let R=e_(O);if(R)return eX(w,R.result,!1,{preventScrollReset:h});if(R=e_(D))return eT.add(R.key),eX(w,R.result,!1,{preventScrollReset:h});let{loaderData:L,errors:j}=ef(B,T,O,void 0,M,D,ez);if(B.fetchers.has(t)){let e=eB(b.data);B.fetchers.set(t,e)}e8(E),"loading"===B.navigation.state&&E>ep?(c(F,"Expected pending action"),l&&l.abort(),eV(B.navigation.location,{matches:T,loaderData:L,errors:j,fetchers:new Map(B.fetchers)})):(eG({errors:j,loaderData:em(B.loaderData,L,T,j),fetchers:new Map(B.fetchers)}),er=!1)}async function eK(t,r,i,n,o,a,s,l,u){let h=B.fetchers.get(t);e0(t,eL(u,h?h.data:void 0),{flushSync:s});let d=new AbortController,p=eh(e.history,i,d.signal);if(a){let e=await ta(o,new URL(p.url).pathname,p.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,r,e.error,{flushSync:s});if(!e.matches)return void e1(t,r,eb(404,{pathname:i}),{flushSync:s});n=eO(o=e.matches,i)}el.set(t,d);let f=ed,m=(await eY("loader",B,p,[n],o,t))[n.route.id];if(eA(m)&&(m=await eM(m,p.signal,!0)||m),el.get(t)===d&&el.delete(t),!p.signal.aborted){if(ej.has(t))return void e0(t,eB(void 0));if(eS(m))if(ep>f)return void e0(t,eB(void 0));else{eT.add(t),await eX(p,m,!1,{preventScrollReset:l});return}if(ew(m))return void e1(t,r,m.error);c(!eA(m),"Unhandled fetcher deferred data"),e0(t,eB(m.data))}}async function eX(t,r,n,o){let{submission:a,fetcherSubmission:u,preventScrollReset:h,replace:m}=void 0===o?{}:o;r.response.headers.has("X-Remix-Revalidate")&&(er=!0);let g=r.response.headers.get("Location");c(g,"Expected a Location header on the redirect Response"),g=ec(g,new URL(t.url),A,e.history);let y=p(B.location,g,{_isRedirect:!0});if(f){let t=!1;if(r.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(Z.test(g)){let r=e.history.createURL(g);t=r.origin!==d.location.origin||null==T(r.pathname,A)}
2if(t)return void(m?d.location.replace(g):d.location.assign(g))}l=null;let v=!0===m||r.response.headers.has("X-Remix-Replace")?i.Replace:i.Push,{formMethod:b,formAction:_,formEncType:x}=B.navigation;!a&&!u&&b&&_&&x&&(a=eD(B.navigation));let w=a||u;if(U.has(r.response.status)&&w&&eE(w.formMethod))await eH(v,y,{submission:s({},w,{formAction:g}),preventScrollReset:h||z,enableViewTransition:n?N:void 0});else{let e=eR(y,a);await eH(v,y,{overrideNavigation:e,fetcherSubmission:u,preventScrollReset:h||z,enableViewTransition:n?N:void 0})}}async function eY(e,r,i,o,a,s){let l,u={};try{l=await es(w,e,r,i,o,a,s,g,t)}catch(e){return o.forEach(t=>{u[t.route.id]={type:n.error,error:e}}),u}for(let[e,t]of Object.entries(l))if(eC(t.result)&&V.has(t.result.status)){let r=t.result;u[e]={type:n.redirect,response:function(e,t,r,i,n,o){let a=e.headers.get("Location");if(c(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!Z.test(a)){let s=i.slice(0,i.findIndex(e=>e.route.id===r)+1);a=Y(new URL(t.url),s,n,!0,a,o),e.headers.set("Location",a)}return e}(r,i,e,a,A,C.v7_relativeSplatPath)}}else u[e]=await eu(t);return u}async function eQ(t,r,i,o,a){let s=t.matches,l=eY("loader",t,a,i,r,null),u=Promise.all(o.map(async r=>{if(!r.matches||!r.match||!r.controller)return Promise.resolve({[r.key]:{type:n.error,error:eb(404,{pathname:r.path})}});{let i=(await eY("loader",t,eh(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:i}}})),c=await l,h=(await u).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([eP(r,c,a.signal,s,t.loaderData),eI(r,h,o)]),{loaderResults:c,fetcherResults:h}}function eJ(){er=!0,ei.push(...tr()),ek.forEach((e,t)=>{el.has(t)&&eo.add(t),e5(t)})}function e0(e,t,r){void 0===r&&(r={}),B.fetchers.set(e,t),eG({fetchers:new Map(B.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function e1(e,t,r,i){void 0===i&&(i={});let n=ey(B.matches,t);e3(e),eG({errors:{[n.route.id]:r},fetchers:new Map(B.fetchers)},{flushSync:!0===(i&&i.flushSync)})}function e2(e){return eF.set(e,(eF.get(e)||0)+1),ej.has(e)&&ej.delete(e),B.fetchers.get(e)||W}function e3(e){let t=B.fetchers.get(e);el.has(e)&&!(t&&"loading"===t.state&&ex.has(e))&&e5(e),ek.delete(e),ex.delete(e),eT.delete(e),C.v7_fetcherPersist&&ej.delete(e),eo.delete(e),B.fetchers.delete(e)}function e5(e){let t=el.get(e);t&&(t.abort(),el.delete(e))}function e4(e){for(let t of e){let e=eB(e2(t).data);B.fetchers.set(t,e)}}function e6(){let e=[],t=!1;for(let r of eT){let i=B.fetchers.get(r);c(i,"Expected fetcher: "+r),"loading"===i.state&&(eT.delete(r),e.push(r),t=!0)}return e4(e),t}function e8(e){let t=[];for(let[r,i]of ex)if(i<e){let e=B.fetchers.get(r);c(e,"Expected fetcher: "+r),"loading"===e.state&&(e5(r),ex.delete(r),t.push(r))}return e4(t),t.length>0}function e7(e){B.blockers.delete(e),eN.delete(e)}function e9(e,t){let r=B.blockers.get(e)||q;c("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let i=new Map(B.blockers);i.set(e,t),eG({blockers:i})}function te(e){let{currentLocation:t,nextLocation:r,historyAction:i}=e;if(0===eN.size)return;eN.size>1&&h(!1,"A router only supports one blocker at a time");let n=Array.from(eN.entries()),[o,a]=n[n.length-1],s=B.blockers.get(o);if((!s||"proceeding"!==s.state)&&a({currentLocation:t,nextLocation:r,historyAction:i}))return o}function tt(e){let t=eb(404,{pathname:e}),{matches:i,route:n}=ev(r||x);return tr(),{notFoundMatches:i,route:n,error:t}}function tr(e){let t=[];return ez.forEach((r,i)=>{(!e||e(i))&&(r.cancel(),t.push(i),ez.delete(i))}),t}function ti(e,t){return M&&M(e,t.map(e=>_(e,B.loaderData)))||e.key}function tn(e,t){if(I){let r=I[ti(e,t)];if("number"==typeof r)return r}return null}function to(e,t,r){if(S){if(!e)return{active:!0,matches:b(t,r,A,!0)||[]};else if(Object.keys(e[0].params).length>0)return{active:!0,matches:b(t,r,A,!0)}}return{active:!1,matches:null}}async function ta(e,i,n,o){if(!S)return{type:"success",matches:e};let a=e;for(;;){let e=null==r,s=r||x,l=g;try{await S({signal:n,path:i,matches:a,fetcherKey:o,patch:(e,r)=>{n.aborted||en(e,r,s,l,t)}})}catch(e){return{type:"error",error:e,partialMatches:a}}finally{e&&!n.aborted&&(x=[...x])}if(n.aborted)return{type:"aborted"};let u=v(s,i,A);if(u)return{type:"success",matches:u};let c=b(s,i,A,!0);if(!c||a.length===c.length&&a.every((e,t)=>e.route.id===c[t].route.id))return{type:"success",matches:null};a=c}}return a={get basename(){return A},get future(){return C},get state(){return B},get routes(){return x},get window(){return d},initialize:function(){if(E=e.history.listen(t=>{let{action:r,location:i,delta:n}=t;if(u){u(),u=void 0;return}h(0===eN.size||null!=n,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=te({currentLocation:B.location,nextLocation:i,historyAction:r});if(o&&null!=n){let t=new Promise(e=>{u=e});e.history.go(-1*n),e9(o,{state:"blocked",location:i,proceed(){e9(o,{state:"proceeding",proceed:void 0,reset:void 0,location:i}),t.then(()=>e.history.go(n))},reset(){let e=new Map(B.blockers);e.set(o,q),eG({blockers:e})}});return}return eH(r,i)}),f){try{let e=d.sessionStorage.getItem(K);if(e){let t=JSON.parse(e);for(let[e,r]of Object.entries(t||{}))r&&Array.isArray(r)&&G.set(e,new Set(r||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,i]of t)r[e]=[...i];try{e.sessionStorage.setItem(K,JSON.stringify(r))}catch(e){h(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}})(d,G);d.addEventListener("pagehide",e),X=()=>d.removeEventListener("pagehide",e)}return B.initialized||eH(i.Pop,B.location,{initialHydration:!0}),a},subscribe:function(e){return P.add(e),()=>P.delete(e)},enableScrollRestoration:function(e,t,r){if(I=e,k=t,M=r||null,!O&&B.navigation===H){O=!0;let e=tn(B.location,B.matches);null!=e&&eG({restoreScrollPosition:e})}return()=>{I=null,k=null,M=null}},navigate:eU,fetch:function(e,t,i,n){if(m)throw Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");e5(e);let o=!0===(n&&n.flushSync),a=r||x,s=Y(B.location,B.matches,A,C.v7_prepe
2ndBasename,i,C.v7_relativeSplatPath,t,null==n?void 0:n.relative),l=v(a,s,A),u=to(l,a,s);if(u.active&&u.matches&&(l=u.matches),!l)return void e1(e,t,eb(404,{pathname:s}),{flushSync:o});let{path:c,submission:h,error:d}=Q(C.v7_normalizeFormMethod,!0,s,n);if(d)return void e1(e,t,d,{flushSync:o});let p=eO(l,c),f=!0===(n&&n.preventScrollReset);h&&eE(h.formMethod)?e$(e,t,c,p,l,u.active,o,f,h):(ek.set(e,{routeId:t,path:c}),eK(e,t,c,p,l,u.active,o,f,h))},revalidate:function(){if(eJ(),eG({revalidation:"loading"}),"submitting"!==B.navigation.state){if("idle"===B.navigation.state)return void eH(B.historyAction,B.location,{startUninterruptedRevalidation:!0});eH(F||B.historyAction,B.navigation.location,{overrideNavigation:B.navigation,enableViewTransition:!0===N})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:e2,deleteFetcher:function(e){let t=(eF.get(e)||0)-1;t<=0?(eF.delete(e),ej.add(e),C.v7_fetcherPersist||e3(e)):eF.set(e,t),eG({fetchers:new Map(B.fetchers)})},dispose:function(){E&&E(),X&&X(),P.clear(),l&&l.abort(),B.fetchers.forEach((e,t)=>e3(t)),B.blockers.forEach((e,t)=>e7(t))},getBlocker:function(e,t){let r=B.blockers.get(e)||q;return eN.get(e)!==t&&eN.set(e,t),r},deleteBlocker:e7,patchRoutes:function(e,i){let n=null==r;en(e,i,r||x,g,t),n&&(x=[...x],eG({}))},_internalFetchControllers:el,_internalActiveDeferreds:ez,_internalSetRoutes:function(e){r=y(e,t,void 0,g={})}}}function Y(e,t,r,i,n,o,a,s){let l,u;if(a){for(let e of(l=[],t))if(l.push(e),e.route.id===a){u=e;break}}else l=t,u=t[t.length-1];let c=M(n||".",I(l,o),T(e.pathname,r)||e.pathname,"path"===s);if(null==n&&(c.search=e.search,c.hash=e.hash),(null==n||""===n||"."===n)&&u){let e=ek(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();c.search=r?"?"+r:""}}return i&&"/"!==r&&(c.pathname="/"===c.pathname?r:O([r,c.pathname])),f(c)}function Q(e,t,r,i){var n;let o,a;if(!i||!(null!=i&&("formData"in i&&null!=i.formData||"body"in i&&void 0!==i.body)))return{path:r};if(i.formMethod&&(n=i.formMethod,!G.has(n.toLowerCase())))return{path:r,error:eb(405,{method:i.formMethod})};let s=()=>({path:r,error:eb(400,{type:"invalid-body"})}),l=i.formMethod||"get",u=e?l.toUpperCase():l.toLowerCase(),h=ex(r);if(void 0!==i.body){if("text/plain"===i.formEncType){if(!eE(u))return s();let e="string"==typeof i.body?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((e,t)=>{let[r,i]=t;return""+e+r+"="+i+`
3`},""):String(i.body);return{path:r,submission:{formMethod:u,formAction:h,formEncType:i.formEncType,formData:void 0,json:void 0,text:e}}}else if("application/json"===i.formEncType){if(!eE(u))return s();try{let e="string"==typeof i.body?JSON.parse(i.body):i.body;return{path:r,submission:{formMethod:u,formAction:h,formEncType:i.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(c("function"==typeof FormData,"FormData is not available in this environment"),i.formData)o=ed(i.formData),a=i.formData;else if(i.body instanceof FormData)o=ed(i.body),a=i.body;else if(i.body instanceof URLSearchParams)a=ep(o=i.body);else if(null==i.body)o=new URLSearchParams,a=new FormData;else try{o=new URLSearchParams(i.body),a=ep(o)}catch(e){return s()}let d={formMethod:u,formAction:h,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(eE(d.formMethod))return{path:r,submission:d};let p=m(r);return t&&p.search&&ek(p.search)&&o.append("index",""),p.search="?"+o,{path:f(p),submission:d}}function J(e,t,r){void 0===r&&(r=!1);let i=e.findIndex(e=>e.route.id===t);return i>=0?e.slice(0,r?i+1:i):e}function ee(e,t,r,i,n,o,a,l,u,c,h,d,p,f,m,g){let y=g?ew(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),_=e.createURL(n),x=r;o&&t.errors?x=J(r,Object.keys(t.errors)[0],!0):g&&ew(g[1])&&(x=J(r,g[0]));let A=g?g[1].statusCode:void 0,w=a&&A&&A>=400,S=x.filter((e,r)=>{var n,a;let c,h,{route:d}=e;if(d.lazy)return!0;
3if(null==d.loader)return!1;if(o)return et(d,t.loaderData,t.errors);if(n=t.loaderData,a=t.matches[r],c=!a||e.route.id!==a.route.id,h=void 0===n[e.route.id],c||h||u.some(t=>t===e.route.id))return!0;let p=t.matches[r];return ei(e,s({currentUrl:b,currentParams:p.params,nextUrl:_,nextParams:e.params},i,{actionResult:y,actionStatus:A,defaultShouldRevalidate:!w&&(l||b.pathname+b.search===_.pathname+_.search||b.search!==_.search||er(p,e))}))}),T=[];return d.forEach((e,n)=>{if(o||!r.some(t=>t.route.id===e.routeId)||h.has(n))return;let a=v(f,e.path,m);if(!a)return void T.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(n),d=eO(a,e.path),g=!1;p.has(n)?g=!1:c.has(n)?(c.delete(n),g=!0):g=u&&"idle"!==u.state&&void 0===u.data?l:ei(d,s({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:_,nextParams:r[r.length-1].params},i,{actionResult:y,actionStatus:A,defaultShouldRevalidate:!w&&l})),g&&T.push({key:n,routeId:e.routeId,path:e.path,matches:a,match:d,controller:new AbortController})}),[S,T]}function et(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let i=null!=t&&void 0!==t[e.id],n=null!=r&&void 0!==r[e.id];return(!!i||!n)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!i&&!n)}function er(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ei(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function en(e,t,r,i,n){var o;let a;if(e){let t=i[e];c(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),a=t.children}else a=r;let s=y(t.filter(e=>!a.some(t=>(function e(t,r){return"id"in t&&"id"in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,i)=>{var n;return null==(n=r.children)?void 0:n.some(r=>e(t,r))}))})(e,t))),n,[e||"_","patch",String((null==(o=a)?void 0:o.length)||"0")],i);a.push(...s)}async function eo(e,t,r){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let n=r[e.id];c(n,"No route found in manifest");let o={};for(let e in i){let t=void 0!==n[e]&&"hasErrorBoundary"!==e;h(!t,'Route "'+n.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||g.has(e)||(o[e]=i[e])}Object.assign(n,o),Object.assign(n,s({},t(n),{lazy:void 0}))}async function ea(e){let{matches:t}=e,r=t.filter(e=>e.shouldLoad);return(await Promise.all(r.map(e=>e.resolve()))).reduce((e,t,i)=>Object.assign(e,{[r[i].route.id]:t}),{})}async function es(e,t,r,i,o,a,l,u,c,h){let d=a.map(e=>e.route.lazy?eo(e.route,c,u):void 0),p=a.map((e,r)=>{let a=d[r],l=o.some(t=>t.route.id===e.route.id),u=async r=>(r&&"GET"===i.method&&(e.route.lazy||e.route.loader)&&(l=!0),l?el(t,i,e,a,r,h):Promise.resolve({type:n.data,result:void 0}));return s({},e,{shouldLoad:l,resolve:u})}),f=await e({matches:p,request:i,params:a[0].params,fetcherKey:l,context:h});try{await Promise.all(d)}catch(e){}return f}async function el(e,t,r,i,o,a){let s,l,u=i=>{let n,s=new Promise((e,t)=>n=t);l=()=>n(),t.signal.addEventListener("abort",l);let u=n=>"function"!=typeof i?Promise.reject(Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+r.route.id+"]")):i({request:t,params:r.params,context:a},...void 0!==n?[n]:[]);return Promise.race([(async()=>{try{let e=await (o?o(e=>u(e)):u());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})(),s])};try{let o=r.route[e];if(i)if(o){let e,[t]=await Promise.all([u(o).catch(t=>{e=t}),i]);if(void 0!==e)throw e;s=t}else if(await i,o=r.route[e])s=await u(o);else{if("action"!==e)return{type:n.data,result:void 0};let i=new URL(t.url),o=i.pathname+i.search;throw eb(405,{method:t.method,pathname:o,routeId:r.route.id})}else if(o)s=await u(o);else{let e=new URL(t.url),r=e.pathname+e.search;throw eb(404,{pathname:r})}c(void 0!==s.result,"You defined "+("action"===e?"an action":"a loader")+" for route "+('"'+r.route.id)+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:n.error,result:e}}finally{l&&t.signal.removeEventListener("abort",l)}return s}async function eu(e){var t,r,i,o,a,s,l,u;let{result:c,type:h}=e;if(eC(c)){let e;try{let t=c.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==c.body?null:await c.json():await c.text()}catch(e){return{type:n.error,error:e}}return h===n.error?{type:n.error,error:new F(c.status,c.statusText,e),statusCode:c.status,headers:c.headers}:{type:n.data,data:e,statusCode:c.status,headers:c.headers}}return h===n.error?eT(c)?c.data instanceof Error?{type:n.error,error:c.data,statusCode:null==(i=c.init)?void 0:i.status,headers:null!=(o=c.init)&&o.headers?new Headers(c.init.headers):void 0}:{type:n.error,error:new F((null==(t=c.init)?void 0:t.status)||500,void 0,c.data),statusCode:j(c)?c.status:void 0,headers:null!=(r=c.init)&&r.headers?new Headers(c.init.headers):void 0}:{type:n.error,error:c,statusCode:j(c)?c.status:void 0}:c&&"object"==typeof c&&"object"==typeof c.data&&"function"==typeof c.subscribe&&"function"==typeof c.cancel&&"function"==typeof c.resolveData?{type:n.deferred,deferredData:c,statusCode:null==(a=c.init)?void 0:a.status,headers:(null==(s=c.init)?void 0:s.headers)&&new Headers(c.init.headers)}:eT(c)?{type:n.data,data:c.data,statusCode:null==(l=c.init)?void 0:l.status,headers:null!=(u=c.init)&&u.headers?new Headers(c.init.headers):void 0}:{type:n.data,data:c}}function ec(e,t,r,i){let n=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Z.test(e)){let i=new URL(e.startsWith("//")?t.protocol+e:e);if(n.includes(i.protocol))throw Error("Invalid redirect location");let o=null!=T(i.pathname,r);
3if(i.origin===t.origin&&o)return k(i.pathname)+i.search+i.hash}try{let t=i.createURL(e);if(n.includes(t.protocol))throw Error("Invalid redirect location")}catch(e){}return e}function eh(e,t,r,i){let n=e.createURL(ex(t)).toString(),o={signal:r};if(i&&eE(i.formMethod)){let{formMethod:e,formEncType:t}=i;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(i.json)):"text/plain"===t?o.body=i.text:"application/x-www-form-urlencoded"===t&&i.formData?o.body=ed(i.formData):o.body=i.formData}return new Request(n,o)}function ed(e){let t=new URLSearchParams;for(let[r,i]of e.entries())t.append(r,"string"==typeof i?i:i.name);return t}function ep(e){let t=new FormData;for(let[r,i]of e.entries())t.append(r,i);return t}function ef(e,t,r,i,n,o,a){let l,u,h,d,p,f,{loaderData:m,errors:g}=(u={},h=null,d=!1,p={},f=i&&ew(i[1])?i[1].error:void 0,t.forEach(e=>{if(!(e.route.id in r))return;let i=e.route.id,n=r[i];if(c(!eS(n),"Cannot handle redirect results in processLoaderData"),ew(n)){let e=n.error;void 0!==f&&(e=f,f=void 0),h=h||{};{let r=ey(t,i);null==h[r.route.id]&&(h[r.route.id]=e)}u[i]=void 0,d||(d=!0,l=j(n.error)?n.error.status:500),n.headers&&(p[i]=n.headers)}else eA(n)?(a.set(i,n.deferredData),u[i]=n.deferredData.data,null==n.statusCode||200===n.statusCode||d||(l=n.statusCode)):(u[i]=n.data,n.statusCode&&200!==n.statusCode&&!d&&(l=n.statusCode)),n.headers&&(p[i]=n.headers)}),void 0!==f&&i&&(h={[i[0]]:f},u[i[0]]=void 0),{loaderData:u,errors:h,statusCode:l||200,loaderHeaders:p});return n.forEach(t=>{let{key:r,match:i,controller:n}=t,a=o[r];if(c(a,"Did not find corresponding fetcher result"),!n||!n.signal.aborted)if(ew(a)){let t=ey(e.matches,null==i?void 0:i.route.id);g&&g[t.route.id]||(g=s({},g,{[t.route.id]:a.error})),e.fetchers.delete(r)}else if(eS(a))c(!1,"Unhandled fetcher revalidation redirect");else if(eA(a))c(!1,"Unhandled fetcher deferred data");else{let t=eB(a.data);e.fetchers.set(r,t)}}),{loaderData:m,errors:g}}function em(e,t,r,i){let n=s({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(n[r]=t[r]):void 0!==e[r]&&o.route.loader&&(n[r]=e[r]),i&&i.hasOwnProperty(r))break}return n}function eg(e){return e?ew(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ey(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function ev(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eb(e,t){let{pathname:r,routeId:i,method:n,type:o,message:a}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",n&&r&&i?l="You made a "+n+' request to "'+r+'" but did not provide a `loader` for route "'+i+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+i+'" does not match URL "'+r+'"'):404===e?(s="Not Found",l='No route matches URL "'+r+'"'):405===e&&(s="Method Not Allowed",n&&r&&i?l="You made a "+n.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+i+'", so there is no way to handle the request.':n&&(l='Invalid request method "'+n.toUpperCase()+'"')),new F(e||500,s,Error(l),!0)}function e_(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,i]=t[e];if(eS(i))return{key:r,result:i}}}function ex(e){let t="string"==typeof e?m(e):e;return f(s({},t,{hash:""}))}function eA(e){return e.type===n.deferred}function ew(e){return e.type===n.error}function eS(e){return(e&&e.type)===n.redirect}function eT(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function eC(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function eE(e){return N.has(e.toLowerCase())}async function eP(e,t,r,i,n){let o=Object.entries(t);for(let a=0;a<o.length;a++){let[s,l]=o[a],u=e.find(e=>(null==e?void 0:e.route.id)===s);if(!u)continue;let c=i.find(e=>e.route.id===u.route.id),h=null!=c&&!er(c,u)&&(n&&n[u.route.id])!==void 0;eA(l)&&h&&await eM(l,r,!1).then(e=>{e&&(t[s]=e)})}}async function eI(e,t,r){for(let i=0;i<r.length;i++){let{key:n,routeId:o,controller:a}=r[i],s=t[n];e.find(e=>(null==e?void 0:e.route.id)===o)&&eA(s)&&(c(a,"Expected an AbortController for revalidating fetcher deferred result"),await eM(s,a.signal,!0).then(e=>{e&&(t[n]=e)}))}}async function eM(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:n.data,data:e.deferredData.unwrappedData}
3}catch(e){return{type:n.error,error:e}}return{type:n.data,data:e.deferredData.data}}}function ek(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eO(e,t){let r="string"==typeof t?m(t).search:t.search;if(e[e.length-1].route.index&&ek(r||""))return e[e.length-1];let i=P(e);return i[i.length-1]}function eD(e){let{formMethod:t,formAction:r,formEncType:i,text:n,formData:o,json:a}=e;if(t&&r&&i){if(null!=n)return{formMethod:t,formAction:r,formEncType:i,formData:void 0,json:void 0,text:n};else if(null!=o)return{formMethod:t,formAction:r,formEncType:i,formData:o,json:void 0,text:void 0};else if(void 0!==a)return{formMethod:t,formAction:r,formEncType:i,formData:void 0,json:a,text:void 0}}}function eR(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eL(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function eB(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}Symbol("deferred")},47661(e,t,r){"use strict";r.d(t,{Eq:()=>u});var i=new WeakMap,n=new WeakMap,o={},a=0,s=function(e){return e&&(e.host||s(e.parentNode))},l=function(e,t,r,l){var u=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=s(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});o[r]||(o[r]=new WeakMap);var c=o[r],h=[],d=new Set,p=new Set(u),f=function(e){!e||d.has(e)||(d.add(e),f(e.parentNode))};u.forEach(f);var m=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(d.has(e))m(e);else try{var t=e.getAttribute(l),o=null!==t&&"false"!==t,a=(i.get(e)||0)+1,s=(c.get(e)||0)+1;i.set(e,a),c.set(e,s),h.push(e),1===a&&o&&n.set(e,!0),1===s&&e.setAttribute(r,"true"),o||e.setAttribute(l,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(t),d.clear(),a++,function(){h.forEach(function(e){var t=i.get(e)-1,o=c.get(e)-1;i.set(e,t),c.set(e,o),t||(n.has(e)||e.removeAttribute(l),n.delete(e)),o||e.removeAttribute(r)}),--a||(i=new WeakMap,i=new WeakMap,n=new WeakMap,o={})}},u=function(e,t,r){void 0===r&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),n=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return n?(i.push.apply(i,Array.from(n.querySelectorAll("[aria-live], script"))),l(i,n,r,"aria-hidden")):function(){return null}}},92178(e){"use strict";e.exports=function(e){if(e)throw e}},84933(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],i=t[1];return(r+i)*3/4-i},t.toByteArray=function(e){var t,r,o=l(e),a=o[0],s=o[1],u=new n((a+s)*3/4-s),c=0,h=s>0?a-4:a;for(r=0;r<h;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,o=[],a=0,s=i-n;a<s;a+=16383)o.push(function(e,t,i){for(var n,o=[],a=t;a<i;a+=3)o.push(r[(n=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===n?o.push(r[(t=e[i-1])>>2]+r[t<<4&63]+"=="):2===n&&o.push(r[(t=(e[i-2]<<8)+e[i-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],i=[],n="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],i[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var i=r===t?0:4-r%4;return[r,i]}i[45]=62,i[95]=63},36533(e,t,r){"use strict";let i=r(84933),n=r(63328),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>
vendor: 23,010 bytes, line 3
30x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);let r=0|f(e,i),n=a(r),o=n.write(e,i);return o!==r&&(n=n.slice(0,o)),n}if(ArrayBuffer.isView(e)){if(F(e,Uint8Array)){let t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);let o=function(e){var t;if(s.isBuffer(e)){let t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|p(e))}function h(e){let t=e.length<0?0:0|p(e.length),r=a(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function d(e,t,r){let i;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),i}function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(n)return i?-1:R(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i<r;++i)n+=j[e[i]];return n}(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return function(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}(this,t,r);case"latin1":case"binary":return function(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}(this,t,r);case"base64":var o,a;return o=t,a=r,0===o&&a===this.length?i.fromByteArray(this):i.fromByteArray(this.slice(o,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let i=e.slice(t,r),n="";for(let e=0;e<i.length-1;e+=2)n+=String.fromCharCode(i[e]+256*i[e+1]);return n}(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function y(e,t,r,i,n){var o;if(0===e.length)return -1;if("string"==typeof r?(i=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(n)return -1;else r=e.length-1;else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,i)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,i,n);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(n)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return v(e,[t],r,i,n)}throw TypeError("val must be string, number or Buffer")}function v(e,t,r,i,n){let o,a=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){let i=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===i?0:o-i)){if(-1===i&&(i=o),o-i+1===l)return i*a}else -1!==i&&(o-=o-i),i=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let i=0;i<l;i++)if(u(e,o+i)!==u(t,i)){r=!1;break}if(r)return o}return -1}function b(e,t,r){r=Math.min(e.length,r);let i=[],n=t;for(;n<r;){let t=e[n],o=null,a=t>239?4:t>223?3:t>191?2:1;if(n+a<=r){let r,i,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:(192&(r=e[n+1]))==128&&(l=(31&t)<<6|63&r)>127&&(o=l);break;case 3:r=e[n+1],i=e[n+2],(192&r)==128&&(192&i)==128&&(l=(15&t)<<12|(63&r)<<6|63&i)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:r=e[n+1],i=e[n+2],s=e[n+3],(192&r)==128&&(192&i)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&s)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=a}let o=i.length;if(o<=4096)return String.fromCharCode.apply(String,i);let a="",s=0;for(;s<o;)a+=String.fromCharCode.apply(String,i.slice(s,s+=4096));return a}function _(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,i,n,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw RangeError('"value" argument is out of bounds');if(r+i>e.length)throw RangeError("Index out of range")}function A(e,t,r,i,n){M(t,i,n,e,r,7);let o=Number(t&BigInt(0xffffffff));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function w(e,t,r,i,n){M(t,i,n,e,r,7);let o=Number(t&BigInt(0xffffffff));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function S(e,t,r,i,n,o){if(r+i>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,r,i,o){return t*=1,r>>>=0,o||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}function C(e,t,r,i,o){return t*=1,r>>>=0,o||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}t.hp=s,t.IS=50,s.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(u(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:+(i<r)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let i=s.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){let t=e[r];if(F(t,Uint8Array))n+t.length>i.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(i,n)):Uint8Array.prototype.set.call(i,t,n);else if(s.isBuffer(t))t.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=t.length}return i},s.byteLength=f,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):m.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,i,n){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;let o=n-i,a=r-t,l=Math.min(o,a),u=this.slice(i,n),c=e.slice(t,r);for(let e=0;e<l;++e)if(u[e]!==c[e]){o=u[e],a=c[e];break}return o<a?-1:+(a<o)},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},s.prototype.write=function(e,t,r,i){var n,o,a,s,l,u,c,h;if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let p=!1;for(;;)switch(i){case"hex":return function(e,t,r,i){let n;r=Number(r)||0;let o=e.length-r;i?(i=Number(i))>o&&(i=o):i=o;let a=t.length;for(i>a/2&&(i=a/2),n=0;n<i;++n){let i=parseInt(t.substr(2*n,2),16);if(i!=i)break;e[r+n]=i}return n}(this,e,t,r);case"utf8":case"utf-8":return n=t,o=r,B(R(e,this.length-n),this,n,o);case"ascii":case"latin1":case"binary":return a=t,s=r,B(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,s);case"base64":return l=t,u=r,B(L(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,h=r,B(function(e,t){let r,i,n=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)i=(r=e.charCodeAt(o))>>8,n.push(r%256),n.push(i);return n}(e,this.length-c),this,c,h);default:if(p)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let i=this.subarray(e,t);return Object.setPrototypeOf(i,s.prototype),i},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return i},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||_(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=z(function(e){k(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&O(e,this.length-8);let i=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],n=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(i)+(BigInt(n)<<BigInt(32))}),s.prototype.readBigUInt64BE=z(function(e){k(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&O(e,this.length-8);let i=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],n=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<<BigInt(32))+BigInt(n)}),s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let i=t,n=1,o=this[e+--i];for(;i>0&&(n*=256);)o+=this[e+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||_(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||_(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||_(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=z(function(e){k(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&O(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),s.prototype.readBigInt64BE=z(function(e){k(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&O(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||_(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||_(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||_(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||_(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=z(function(e,t=0){return A(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=z(function(e,t=0){return w(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,r,i){if(e*=1,t>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=0,o=1,a=0;for(this[t]=255&e;++n<r&&(o*=256);)e<0&&0===a&&0!==this[t+n-1]&&(a=1),this[t+n]=(e/o|0)-a&255;return t+r},s.prototype.writeIntBE=function(e,t,r,i){if(e*=1,t>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=r-1,o=1,a=0;for(this[t+n]=255&e;--n>=0&&(o*=256);)e<0&&0===a&&0!==this[t+n+1]&&(a=1),this[t+n]=(e/o|0)-a&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=z(function(e,t=0){return A(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=z(function(e,t=0){return w(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,i){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);let n=i-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,i):Uint8Array.prototype.set.call(e,this.subarray(r,i),t),n},s.prototype.fill=function(e,t,r,i){let n;if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw TypeError("encoding must be a string");if("string"==typeof i&&!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);if(1===e.length){let t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{let o=s.isBuffer(e)?e:s.from(e,i),a=o.length;if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=o[n%a]}return this};let E={};function P(e,t,r){E[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function I(e){let t="",r=e.length,i=+("-"===e[0]);for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function M(e,t,r,i,n,o){if(e>r||e<t){let i,n="bigint"==typeof t?"n":"";throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${(o+1)*8}${n}`:`>= -(2${n} ** ${(o+1)*8-1}${n}) and < 2 ** ${(o+1)*8-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new E.ERR_OUT_OF_RANGE("value",i,e)}k(n,"offset"),(void 0===i[n]||void 0===i[n+o])&&O(n,i.length-(o+1))}function k(e,t){if("number"!=typeof e)throw new E.ERR_INVALID_ARG_TYPE(t,"number",e)}function O(e,t,r){if(Math.floor(e)!==e)throw k(e,r),new E.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new E.ERR_BUFFER_OUT_OF_BOUNDS;throw new E.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),P("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),P("ERR_OUT_OF_RANGE",function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?n=I(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=I(n)),n+="n"),i+=` It must be ${t}. Received ${n}`},RangeError);let D=/[^+/0-9A-Za-z-_]/g;function R(e,t){let r;t=t||1/0;let i=e.length,n=null,o=[];for(let a=0;a<i;++a){if((r=e.charCodeAt(a))>
355295&&r<57344){if(!n){if(r>56319||a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function L(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length)&&!(n>=e.length);++n)t[n+r]=e[n];return n}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let j=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function z(e){return"u"<typeof BigInt?N:e}function N(){throw Error("BigInt not supported")}},97785(e,t,r){"use strict";var i=r(79524),n=r(64811),o=r(46255);e.exports=r(12728)||i.call(o,n)},64811(e){"use strict";e.exports=Function.prototype.apply},46255(e){"use strict";e.exports=Function.prototype.call},92427(e,t,r){"use strict";
3var i=r(79524),n=r(71102),o=r(46255),a=r(97785);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new n("a function is required");return a(i,o,e)}},12728(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},98801(e,t,r){"use strict";var i=r(49336),n=r(92427),o=n([i("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=i(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?n([r]):r}},95866(e){"use strict";e.exports=function(e,t){var r,i=String(e),n=0;if("string"!=typeof t)throw Error("Expected character");for(r=i.indexOf(t);-1!==r;)n++,r=i.indexOf(t,r+t.length);return n}},69421(e){"use strict";var t={},r="visa",i="master-card",n="american-express",o="diners-club",a="discover",s="unionpay",l="maestro",u=[r,i,n,o,a,"jcb",s,l];function c(e){var t,r,i;return e?(t=e.prefixPattern.source,r=e.exactPattern.source,(i=JSON.parse(JSON.stringify(e))).prefixPattern=t,i.exactPattern=r,i):null}function h(e){var r,i,n=[],o=[];if(!("string"==typeof e||e instanceof String))return[];for(i=0;i<u.length;i++){if(r=t[u[i]],0===e.length){n.push(c(r));continue}r.exactPattern.test(e)?o.push(c(r)):r.prefixPattern.test(e)&&n.push(c(r))}return o.length?o:n}t[r]={niceType:"Visa",type:r,prefixPattern:/^4$/,exactPattern:/^4\d*$/,gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},t[i]={niceType:"MasterCard",type:i,prefixPattern:/^(5|5[1-5]|2|22|222|222[1-9]|2[3-6]|27|27[0-2]|2720)$/,exactPattern:/^(5[1-5]|222[1-9]|2[3-6]|27[0-1]|2720)\d*$/,gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},t[n]={niceType:"American Express",type:n,prefixPattern:/^(3|34|37)$/,exactPattern:/^3[47]\d*$/,isAmex:!0,gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},t[o]={niceType:"Diners Club",type:o,prefixPattern:/^(3|3[0689]|30[0-5])$/,exactPattern:/^3(0[0-5]|[689])\d*$/,gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},t[a]={niceType:"Discover",type:a,prefixPattern:/^(6|60|601|6011|65|64|64[4-9])$/,exactPattern:/^(6011|65|64[4-9])\d*$/,gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},t.jcb={niceType:"JCB",type:"jcb",prefixPattern:/^(2|21|213|2131|1|18|180|1800|3|35)$/,exactPattern:/^(2131|1800|35)\d*$/,gaps:[4,8,12],lengths:[16],code:{name:"CVV",size:3}},t[s]={niceType:"UnionPay",type:s,prefixPattern:/^((6|62|62\d|(621(?!83|88|98|99))|622(?!06)|627[02,06,07]|628(?!0|1)|629[1,2])|622018)$/,exactPattern:/^(((620|(621(?!83|88|98|99))|622(?!06|018)|62[3-6]|627[02,06,07]|628(?!0|1)|629[1,2]))\d*|622018\d{12})$/,gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVN",size:3}},t[l]={niceType:"Maestro",type:l,prefixPattern:/^(5|5[06-9]|6\d*)$/,exactPattern:/^(5[06-9]|6[37])\d*$/,gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},h.getTypeInfo=function(e){return c(t[e])},h.types={VISA:r,MASTERCARD:i,AMERICAN_EXPRESS:n,DINERS_CLUB:o,DISCOVER:a,JCB:"jcb",UNIONPAY:s,MAESTRO:l},e.exports=h},56080(e,t,r){var i;i="u">typeof self?self:this,function(e){var t="u">typeof globalThis&&globalThis||void 0!==i&&i||void 0!==r.g&&r.g||{},n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(n.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function d(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function p(e){var t=new FileReader,r=d(t);return t.readAsArrayBuffer(e),r}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(n.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(n.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;n.arrayBuffer&&n.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return h(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(n.blob)return this.blob().then(p);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,i,n,o=h(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,r=d(t=new FileReader),n=(i=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?i[1]:"utf-8",t.readAsText(e,n),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),i=0;i<t.length;i++)r[i]=String.fromCharCode(t[i]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},n.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=s(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=l(t)},c.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},c.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),u(e)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},c.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),u(e)},n.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var g=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function y(e,r){if(!(this instanceof y))throw TypeError('Please use the "new" operator, this DOM object c
3onstructor cannot be called as a function.');var i,n,o=(r=r||{}).body;if(e instanceof y){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,r.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=r.credentials||this.credentials||"same-origin",(r.headers||!this.headers)&&(this.headers=new c(r.headers)),this.method=(n=(i=r.method||this.method||"GET").toUpperCase(),g.indexOf(n)>-1?n:i),this.mode=r.mode||this.mode||null,this.signal=r.signal||this.signal||function(){if("AbortController"in t)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),("GET"===this.method||"HEAD"===this.method)&&("no-store"===r.cache||"no-cache"===r.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),i=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(n))}}),t}function b(e,t){if(!(this instanceof b))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},m.call(y.prototype),m.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var _=[301,302,303,307,308];b.redirect=function(e,t){if(-1===_.indexOf(t))throw RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function x(r,i){return new Promise(function(o,a){var u=new y(r,i);if(u.signal&&u.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var h=new XMLHttpRequest;function d(){h.abort()}if(h.onload=function(){var e,t,r={statusText:h.statusText,headers:(e=h.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split(`\r`).map(function(e){return 0===e.indexOf(`
4`)?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),i=r.shift().trim();if(i){var n=r.join(":").trim();try{t.append(i,n)}catch(e){console.warn("Response "+e.message)}}}),t)};0===u.url.indexOf("file://")&&(h.status<200||h.status>599)?r.status=200:r.status=h.status,r.url="responseURL"in h?h.responseURL:r.headers.get("X-Request-URL");var i="response"in h?h.response:h.responseText;setTimeout(function(){o(new b(i,r))},0)},h.onerror=function(){setTimeout(function(){a(TypeError("Network request failed"))},0)},h.ontimeout=function(){setTimeout(function(){a(TypeError("Network request timed out"))},0)},h.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},h.open(u.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?h.withCredentials=!0:"omit"===u.credentials&&(h.withCredentials=!1),"responseType"in h&&(n.blob?h.responseType="blob":n.arrayBuffer&&(h.responseType="arraybuffer")),i&&"object"==typeof i.headers&&!(i.headers instanceof c||t.Headers&&i.headers instanceof t.Headers)){var p=[];
4Object.getOwnPropertyNames(i.headers).forEach(function(e){p.push(s(e)),h.setRequestHeader(e,l(i.headers[e]))}),u.headers.forEach(function(e,t){-1===p.indexOf(t)&&h.setRequestHeader(t,e)})}else u.headers.forEach(function(e,t){h.setRequestHeader(t,e)});u.signal&&(u.signal.addEventListener("abort",d),h.onreadystatechange=function(){4===h.readyState&&u.signal.removeEventListener("abort",d)}),h.send(void 0===u._bodyInit?null:u._bodyInit)})}x.polyfill=!0,t.fetch||(t.fetch=x,t.Headers=c,t.Request=y,t.Response=b),e.Headers=c,e.Request=y,e.Response=b,e.fetch=x}({})},64963(e,t,r){var i;!function(){"use strict";var n,o,a,s=(n=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,o=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,a=/[^-+\dA-Z]/g,function(e,t,r,i){if(1!=arguments.length||"string"!==(null===(u=e)?"null":void 0===u?"undefined":"object"!=typeof u?typeof u:Array.isArray(u)?"array":({}).toString.call(u).slice(8,-1).toLowerCase())||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var u,c,h,d,p,f,m=(t=String(s.masks[t]||t||s.masks.default)).slice(0,4);("UTC:"===m||"GMT:"===m)&&(t=t.slice(4),r=!0,"GMT:"===m&&(i=!0));var g=r?"getUTC":"get",y=e[g+"Date"](),v=e[g+"Day"](),b=e[g+"Month"](),_=e[g+"FullYear"](),x=e[g+"Hours"](),A=e[g+"Minutes"](),w=e[g+"Seconds"](),S=e[g+"Milliseconds"](),T=r?0:e.getTimezoneOffset(),C=((h=new Date((c=e).getFullYear(),c.getMonth(),c.getDate())).setDate(h.getDate()-(h.getDay()+6)%7+3),(d=new Date(h.getFullYear(),0,4)).setDate(d.getDate()-(d.getDay()+6)%7+3),p=h.getTimezoneOffset()-d.getTimezoneOffset(),h.setHours(h.getHours()-p),1+Math.floor((h-d)/6048e5)),E=(0===(f=e.getDay())&&(f=7),f),P={d:y,dd:l(y),ddd:s.i18n.dayNames[v],dddd:s.i18n.dayNames[v+7],m:b+1,mm:l(b+1),mmm:s.i18n.monthNames[b],mmmm:s.i18n.monthNames[b+12],yy:String(_).slice(2),yyyy:_,h:x%12||12,hh:l(x%12||12),H:x,HH:l(x),M:A,MM:l(A),s:w,ss:l(w),l:l(S,3),L:l(Math.round(S/10)),t:x<12?"a":"p",tt:x<12?"am":"pm",T:x<12?"A":"P",TT:x<12?"AM":"PM",Z:i?"GMT":r?"UTC":(String(e).match(o)||[""]).pop().replace(a,""),o:(T>0?"-":"+")+l(100*Math.floor(Math.abs(T)/60)+Math.abs(T)%60,4),S:["th","st","nd","rd"][y%10>3?0:(y%100-y%10!=10)*y%10],W:C,N:E};return t.replace(n,function(e){return e in P?P[e]:e.slice(1,e.length-1)})});function l(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e}s.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},s.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},void 0===(i=(function(){return s}).call(t,r,t,e))||(e.exports=i)}()},817(e){e.exports=function(){"use strict";var e="millisecond",t="second",r="minute",i="hour",n="week",o="month",a="quarter",s="year",l="date",u="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=function(e,t,r){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(r)+e},p="en",f={};f[p]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var m="$isDayjsObject",g=function(e){return e instanceof _||!(!e||!e[m])},y=function e(t,r,i){var n;if(!t)return p;if("string"==typeof t){var o=t.toLowerCase();f[o]&&(n=o),r&&(f[o]=r,n=o);var a=t.split("-");if(!n&&a.length>1)return e(a[0])}else{var s=t.name;f[s]=t,n=s}return!i&&n&&(p=n),n||!i&&p},v=function(e,t){if(g(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new _(r)},b={s:d,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+d(Math.floor(r/60),2,"0")+":"+d(r%60,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var i=12*(r.year()-t.year())+(r.month()-t.month()),n=t.clone().add(i,o),a=r-n<0,s=t.clone().add(i+(a?-1:1),o);return+(-(i+(r-n)/(a?n-s:s-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(u){return({M:o,y:s,w:n,d:"day",D:l,h:i,m:r,s:t,ms:e,Q:a})[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};b.l=y,b.i=g,b.w=function(e,t){return v(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var _=function(){function d(e){this.$L=y(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[m]=!0}var p=d.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(0/0);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(c);if(i){var n=i[2]-1||0,o=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)}(e),this.init()},p.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return this.$d.toString()!==u},p.isSame=function(e,t){var r=v(e);return this.startOf(t)<=r&&r<=this.endOf(t)},p.isAfter=function(e,t){return v(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<v(e)},p.$g=function(e,t,r){return b.u(e)?this[t]:this.set(r,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,a){var u=this,c=!!b.u(a)||a,h=b.p(e),d=function(e,t){var r=b.w(u.$u?Date.UTC(u.$y,t,e):new Date(u.$y,t,e),u);return c?r:r.endOf("day")},p=function(e,t){return b.w(u.toDate()[e].apply(u.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),u)},f=this.$W,m=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case s:return c?d(1,0):d(31,11);case o:return c?d(1,m):d(0,m+1);case n:var v=this.$locale().weekStart||0,_=(f<v?f+7:f)-v;return d(c?g-_:g+(6-_),m);case"day":case l:return p(y+"Hours",0);case i:return p(y+"Minutes",1);case r:return p(y+"Seconds",2);case t:return p(y+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(n,a){var u,c=b.p(n),h="set"+(this.$u?"UTC":""),d=((u={}).day=h+"Date",u[l]=h+"Date",u[o]=h+"Month",u[s]=h+"FullYear",u[i]=h+"Hours",u[r]=h+"Minutes",u[t]=h+"Seconds",u[e]=h+"Milliseconds",u)[c],p="day"===c?this.$D+(a-this.$W):a;if(c===o||c===s){var f=this.clone().set(l,1);f.$d[d](p),f.init(),this.$d=f.set(l,Math.min(this.$D,f.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[b.p(e)]()},p.add=function(e,a){var l,u=this;e=Number(e);var c=b.p(a),h=function(t){var r=v(u);return b.w(r.date(r.date()+Math.round(t*e)),u)};if(c===o)return this.set(o,this.$M+e);if(c===s)return this.set(s,this.$y+e);if("day"===c)return h(1);if(c===n)return h(7);var d=((l={})[r]=6e4,l[i]=36e5,l[t]=1e3,l)[c]||1,p=this.$d.getTime()+e*d;return b.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||u;var i=e||"YYYY-MM-DDTHH:mm:ssZ",n=b.z(this),o=this.$H,a=this.$m,s=this.$M,l=r.weekdays,c=r.months,d=r.meri
4diem,p=function(e,r,n,o){return e&&(e[r]||e(t,i))||n[r].slice(0,o)},f=function(e){return b.s(o%12||12,e,"0")},m=d||function(e,t,r){var i=e<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(h,function(e,i){return i||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return b.s(t.$y,4,"0");case"M":return s+1;case"MM":return b.s(s+1,2,"0");case"MMM":return p(r.monthsShort,s,c,3);case"MMMM":return p(c,s);case"D":return t.$D;case"DD":return b.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,l,2);case"ddd":return p(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(o);case"HH":return b.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(o,a,!0);case"A":return m(o,a,!1);case"m":return String(a);case"mm":return b.s(a,2,"0");case"s":return String(t.$s);case"ss":return b.s(t.$s,2,"0");case"SSS":return b.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")})},p.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},p.diff=function(e,l,u){var c,h=this,d=b.p(l),p=v(e),f=(p.utcOffset()-this.utcOffset())*6e4,m=this-p,g=function(){return b.m(h,p)};switch(d){case s:c=g()/12;break;case o:c=g();break;case a:c=g()/3;break;case n:c=(m-f)/6048e5;break;case"day":c=(m-f)/864e5;break;case i:c=m/36e5;break;case r:c=m/6e4;break;case t:c=m/1e3;break;default:c=m}return u?c:b.a(c)},p.daysInMonth=function(){return this.endOf(o).$D},p.$locale=function(){return f[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),i=y(e,t,!0);return i&&(r.$L=i),r},p.clone=function(){return b.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},d}(),x=_.prototype;return v.prototype=x,[["$ms",e],["$s",t],["$m",r],["$H",i],["$W","day"],["$M",o],["$y",s],["$D",l]].forEach(function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),v.extend=function(e,t){return e.$i||(e(t,_,v),e.$i=!0),v},v.locale=y,v.isDayjs=g,v.unix=function(e){return v(1e3*e)},v.en=f[p],v.Ls=f,v.p={},v}()},44312(e){function t(e,t,r){function i(){var u=Date.now()-s;u<t&&u>=0?n=setTimeout(i,t-u):(n=null,r||(l=e.apply(a,o),a=o=null))}null==t&&(t=100);var n,o,a,s,l,u=function(){a=this,o=arguments,s=Date.now();var u=r&&!n;return n||(n=setTimeout(i,t)),u&&(l=e.apply(a,o),a=o=null),l};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(l=e.apply(a,o),a=o=null,clearTimeout(n),n=null)},u}t.debounce=t,e.exports=t},66538(e,t,r){"use strict";r.d(t,{A:()=>l});var i=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==n},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s(Array.isArray(e)?[]:{},e,t):e}function a(e,t,r){return e.concat(t).map(function(e){return o(e,r)})}function s(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||a,r.isMergeableObject=r.isMergeableObject||i;var n,l,u=Array.isArray(t);return u!==Array.isArray(e)?o(t,r):u?r.arrayMerge(e,t,r):(l={},(n=r).isMergeableObject(e)&&Object.keys(e).forEach(function(t){l[t]=o(e[t],n)}),Object.keys(t).forEach(function(r){n.isMergeableObject(t[r])&&e[r]?l[r]=s(e[r],t[r],n):l[r]=o(t[r],n)}),l)}s.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return s(e,r,t)},{})};let l=s},74579(e){"use strict";var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s(Array.isArray(e)?[]:{},e,t):e}function n(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function o(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var u,c,h=Array.isArray(r);return h!==Array.isArray(e)?i(r,l):h?l.arrayMerge(e,r,l):(c={},(u=l).isMergeableObject(e)&&o(e).forEach(function(t){c[t]=i(e[t],u)}),o(r).forEach(function(t){a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))||(a(e,t)&&u.isMergeableObject(r[t])?c[t]=(function(e,t){if(!t.customMerge)return s;var r=t.customMerge(e);return"function"==typeof r?r:s})(t,u)(e[t],r[t],u):c[t]=i(r[t],u))}),c)}s.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return s(e,r,t)},{})},e.exports=s},76320(e,t,r){var i,n=r(85945);"u">typeof navigator&&navigator&&(i=navigator.userAgent),e.exports=n(i)},85945(e,t,r){var i=r(8115);e.exports=function(e){return e?[["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;
4\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/]].map(function(t){if(t[1].test(e)){var r=t[1].exec(e),n=r&&r[1].split(/[._]/).slice(0,3);return n&&n.length<3&&Array.prototype.push.apply(n,1==n.length?[0,0]:[0]),{name:t[0],version:n.join("."),os:i(e)}}}).filter(Boolean).shift():null}},8115(e){e.exports=function(e){var t=[{name:"iOS",rule:/iP(hone|od|ad)/},{name:"Android OS",rule:/Android/},{name:"BlackBerry OS",rule:/BlackBerry|BB10/},{name:"Windows Mobile",rule:/IEMobile/},{name:"Amazon OS",rule:/Kindle/},{name:"Windows 3.11",rule:/Win16/},{name:"Windows 95",rule:/(Windows 95)|(Win95)|(Windows_95)/},{name:"Windows 98",rule:/(Windows 98)|(Win98)/},{name:"Windows 2000",rule:/(Windows NT 5.0)|(Windows 2000)/},{name:"Windows XP",rule:/(Windows NT 5.1)|(Windows XP)/},{name:"Windows Server 2003",rule:/(Windows NT 5.2)/},{name:"Windows Vista",rule:/(Windows NT 6.0)/},{name:"Windows 7",rule:/(Windows NT 6.1)/},{name:"Windows 8",rule:/(Windows NT 6.2)/},{name:"Windows 8.1",rule:/(Windows NT 6.3)/},{name:"Windows 10",rule:/(Windows NT 10.0)/},{name:"Windows ME",rule:/Windows ME/},{name:"Open BSD",rule:/OpenBSD/},{name:"Sun OS",rule:/SunOS/},{name:"Linux",rule:/(Linux)|(X11)/},{name:"Mac OS",rule:/(Mac_PowerPC)|(Macintosh)/},{name:"QNX",rule:/QNX/},{name:"BeOS",rule:/BeOS/},{name:"OS/2",rule:/OS\/2/},{name:"Search Bot",rule:/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/}].filter(function(t){if(e.match(t.rule))return!0});return t&&t[0]?t[0].name:null}},57678(e,t,r){"use strict";var i,n=r(92427),o=r(25667);try{i=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!i&&o&&o(Object.prototype,"__proto__"),s=Object,l=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?n([a.get]):"function"==typeof l&&function(e){return l(null==e?e:s(e))}},39886(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},38004(e){"use strict";e.exports=EvalError},41488(e){"use strict";e.exports=Error},96469(e){"use strict";e.exports=RangeError},12557(e){"use strict";e.exports=ReferenceError},63429(e){"use strict";e.exports=SyntaxError},71102(e){"use strict";e.exports=TypeError},85966(e){"use strict";e.exports=URIError},25153(e){"use strict";e.exports=Object},47231(e,t,r){var i=r(85409);e.exports=function(){"use strict";function e(e){return"function"==typeof e}var t,n,o,a,s=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},l=0,u=void 0,c=void 0,h=function(e,t){v[l]=e,v[l+1]=t,2===(l+=2)&&(c?c(b):_())},d="u">typeof window?window:void 0,p=d||{},f=p.MutationObserver||p.WebKitMutationObserver,m="u"<typeof self&&void 0!==i&&"[object process]"===({}).toString.call(i),g="u">typeof Uint8ClampedArray&&"u">typeof importScripts&&"u">typeof MessageChannel;function y(){var e=setTimeout;return function(){return e(b,1)}}var v=Array(1e3);function b(){for(var e=0;e<l;e+=2)(0,v[e])(v[e+1]),v[e]=void 0,v[e+1]=void 0;l=0}var _=void 0;function x(e,t){var r=this,i=new this.constructor(S);void 0===i[w]&&L(i);var n=r._state;if(n){var o=arguments[n-1];h(function(){return D(n,i,o,r._result)})}else k(r,i,e,t);return i}function A(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(S);return E(t,e),t}m?_=function(){return i.nextTick(b)}:f?(t=0,n=new f(b),o=document.createTextNode(""),n.observe(o,{characterData:!0}),_=function(){o.data=t=++t%2}):g?((a=new MessageChannel).port1.onmessage=b,_=function(){return a.port2.postMessage(0)}):_=void 0===d?function(){try{var e=Function("return this")().require("vertx");return u=e.runOnLoop||e.runOnContext,void 0!==u?function(){u(b)}:y()}catch(e){return y()}}():y();var w=Math.random().toString(36).substring(2);function S(){}var T=void 0;function C(t,r,i){r.constructor===t.constructor&&i===x&&r.constructor.resolve===A?1===r._state?I(t,r._result):2===r._state?M(t,r._result):k(r,void 0,function(e){return E(t,e)},function(e){return M(t,e)}):void 0===i?I(t,r):e(i)?h(function(e){var t=!1,n=function(e,t,r,i){try{e.call(t,r,i)}catch(e){return e}}(i,r,function(i){t||(t=!0,r!==i?E(e,i):I(e,i))},function(r){t||(t=!0,M(e,r))},e._label);!t&&n&&(t=!0,M(e,n))},t):I(t,r)}function E(e,t){if(e===t)M(e,TypeError("You cannot resolve a promise with itself"));else if(r=typeof t,null!==t&&("object"===r||"function"===r)){var r,i=void 0;try{i=t.then}catch(t){M(e,t);return}C(e,t,i)}else I(e,t)}
vendor: 2,559 bytes, line 4
4function P(e){e._onerror&&e._onerror(e._result),O(e)}function I(e,t){e._state===T&&(e._result=t,e._state=1,0!==e._subscribers.length&&h(O,e))}function M(e,t){e._state===T&&(e._state=2,e._result=t,h(P,e))}function k(e,t,r,i){var n=e._subscribers,o=n.length;e._onerror=null,n[o]=t,n[o+1]=r,n[o+2]=i,0===o&&e._state&&h(O,e)}function O(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var i=void 0,n=void 0,o=e._result,a=0;a<t.length;a+=3)i=t[a],n=t[a+r],i?D(r,i,n,o):n(o);e._subscribers.length=0}}function D(t,r,i,n){var o=e(i),a=void 0,s=void 0,l=!0;if(o){try{a=i(n)}catch(e){l=!1,s=e}if(r===a)return void M(r,TypeError("A promises callback cannot return that same promise."))}else a=n;r._state!==T||(o&&l?E(r,a):!1===l?M(r,s):1===t?I(r,a):2===t&&M(r,a))}var R=0;function L(e){e[w]=R++,e._state=void 0,e._result=void 0,e._subscribers=[]}var B=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(S),this.promise[w]||L(this.promise),s(t)?(this.length=t.length,this._remaining=t.length,this._result=Array(this.length),0===this.length?I(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&I(this.promise,this._result))):M(this.promise,Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===T&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,i=r.resolve;if(i===A){var n=void 0,o=void 0,a=!1;try{n=e.then}catch(e){a=!0,o=e}if(n===x&&e._state!==T)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(r===F){var s=new r(S);a?M(s,o):C(s,e,n),this._willSettleAt(s,t)}else this._willSettleAt(new r(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},e.prototype._settledAt=function(e,t,r){var i=this.promise;i._state===T&&(this._remaining--,2===e?M(i,r):this._result[t]=r),0===this._remaining&&I(i,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;k(e,void 0,function(e){return r._settledAt(1,t,e)},function(e){return r._settledAt(2,t,e)})},e}(),F=function(){function t(e){this[w]=R++,this._result=this._state=void 0,this._subscribers=[],S!==e&&("function"!=typeof e&&function(){throw TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t(function(t){E(e,t)},function(t){M(e,t)})}catch(t){M(e,t)}}(this,e):function(){throw TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
4onstructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var r=this.constructor;return e(t)?this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}):this.then(t,t)},t}();return F.prototype.then=x,F.all=function(e){return new B(this,e).promise},F.race=function(e){var t=this;return new t(s(e)?function(r,i){for(var n=e.length,o=0;o<n;o++)t.resolve(e[o]).then(r,i)}:function(e,t){return t(TypeError("You must pass an array to race."))})},F.resolve=A,F.reject=function(e){var t=new this(S);return M(t,e),t},F._setScheduler=function(e){c=e},F._setAsap=function(e){h=e},F._asap=h,F.polyfill=function(){var e=void 0;if(void 0!==r.g)e=r.g;else if("u">typeof self)e=self;else try{e=Function("return this")()}catch(e){throw Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===i&&!t.cast)return}e.Promise=F},F.Promise=F,F}()},2620(e,t,r){(function(){var t,i;t=r(24682),i=function(e){return e.split("").reverse().join("")},e.exports=function(e,r,n){var o;return(null==r&&(r="'"),null==n&&(n="\\"),"string"!=typeof e)?e:(o=RegExp("(["+t(r)+"])(?!"+t(n)+")","g"),i(i(e).replace(o,"$1"+n)))}}).call(this)},24682(e){"use strict";var t=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(t,"\\$&")}},65962(e){"use strict";e.exports=e=>{if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},52083(e,t,r){var i;!function(){"use strict";var n=!!("u">typeof window&&window.document&&window.document.createElement),o={canUseDOM:n,canUseWorkers:"u">typeof Worker,canUseEventListeners:n&&!!(window.addEventListener||window.attachEvent),canUseViewport:n&&!!window.screen};void 0===(i=(function(){return o}).call(t,r,t,e))||(e.exports=i)}()},49461(e){"use strict";var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var i,n=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(i in e);return void 0===i||t.call(e,i)},s=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;else if(n)return n(e,r).value}return e[r]};e.exports=function e(){var t,r,i,n,u,c,h=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof h&&(f=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<p;++d)if(t=arguments[d],null!=t)for(r in t)i=l(h,r),h!==(n=l(t,r))&&(f&&n&&(a(n)||(u=o(n)))?(u?(u=!1,c=i&&o(i)?i:[]):c=i&&a(i)?i:{},s(h,{name:r,newValue:e(f,c,n)})):void 0!==n&&s(h,{name:r,newValue:n}));return h}},43197(e,t){var r,i;r=[t,e],void 0===(i=(function(e,t){"use strict";function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e,o=t.timeout||5e3,a=t.jsonpCallback||"callback",s=void 0;return new Promise(function(l,u){var c=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),h=a+"_"+c;window[c]=function(e){l({ok:!0,json:function(){return Promise.resolve(e)}}),s&&clearTimeout(s),i(h),r(c)},n+=-1===n.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+n+a+"="+c),t.charset&&d.setAttribute("charset",t.charset),t.nonce&&d.setAttribute("nonce",t.nonce),t.referrerPolicy&&d.setAttribute("referrerPolicy",t.referrerPolicy),t.crossorigin&&d.setAttribute("crossorigin","string"==typeof t.crossorigin?t.crossorigin:"anonymous");var p=t.fetchPriority;("high"===p||"low"===p||"auto"===p)&&d.setAttribute("fetchPriority",p),d.id=h,document.getElementsByTagName("head")[0].appendChild(d),s=setTimeout(function(){u(Error("JSONP request to "+e+" timed out")),r(c),i(h),window[c]=function(){r(c)}},o),d.onerror=function(){u(Error("JSONP request to "+e+" failed")),r(c),i(h),s&&clearTimeout(s)}})}}).apply(t,r))||(e.exports=i)},17494(e,t,r){"use strict";r.d(t,{DG:()=>L,O6:()=>h,Ym:()=>g,iF:()=>b,rE:()=>I,u9:()=>S});var i=r(69932),n=r(12975),o=/\\(\\)?/g,a=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),s=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,function(e,r,i,n){var a=e;return i?a=n.replace(o,"$1"):r&&(a=r.trim()),t.push(a),""}),t},l=Object.create(null),u=/[.[\]]+/,c=function(e){if(null==e||!e.length)return[];if("string"!=typeof e)throw Error("toPath() expects a string");
4return null==l[e]&&(e.endsWith("[]")?l[e]=e.split(u).filter(Boolean):l[e]=s(e)),l[e]},h=function(e,t){for(var r=c(t),i=e,n=0;n<r.length;n++){var o=r[n];if(null==i||"object"!=typeof i||Array.isArray(i)&&isNaN(Number(o)))return;i=i[o]}return i};function d(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t);if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var p=function(e){var t=Number(e);return!isNaN(t)&&Number.isInteger(t)&&t>=0&&String(t)===e},f=function(e,t,r,o,a){if(t>=r.length)return o;var s=r[t];if(!p(s)){if(null==e){var l,u,c=f(void 0,t+1,r,o,a);return void 0===c?void 0:((u={})[s]=c,u)}if(Array.isArray(e))throw Error("Cannot set a non-numeric property on an array");var h=f(e[s],t+1,r,o,a);if(void 0===h){var m=Object.keys(e).length;if(void 0===e[s]&&0===m)return;if(void 0!==e[s]&&m<=1)if(p(r[t-1])&&!a)return{};else return;if("string"==typeof e)return e;var g=e;return g[s],(0,n.A)(g,[s].map(d))}return(0,i.A)({},e,((l={})[s]=h,l))}var y=Number(s);if(null==e){var v=f(void 0,t+1,r,o,a);if(void 0===v)return;var b=[];return b[y]=v,b}if(!Array.isArray(e))if("object"==typeof e&&null!==e){var _=[];Object.keys(e).forEach(function(t){var r=Number(t);isNaN(r)?_[t]=e[t]:_[r]=e[t]}),e=_}else throw Error("Cannot set a numeric property on an object");var x=f(e[y],t+1,r,o,a),A=[].concat(e);if(Object.keys(e).forEach(function(t){isNaN(Number(t))&&(A[t]=e[t])}),a&&void 0===x){if(A.splice(y,1),0===A.length)return}else A[y]=x;return A},m=function(e,t,r,i){if(void 0===i&&(i=!1),null==e)throw Error("Cannot call setIn() with "+String(e)+" state");if(null==t)throw Error("Cannot call setIn() with "+String(t)+" key");return f(e,0,c(t),r,i)},g="FINAL_FORM/form-error",y="FINAL_FORM/array-error";function v(e,t){var r=e.errors,i=e.initialValues,n=e.lastSubmittedValues,o=e.submitErrors,a=e.submitFailed,s=e.submitSucceeded,l=e.submitting,u=e.values,c=t.active,d=t.blur,p=t.change,f=t.data,m=t.focus,g=t.modified,v=t.modifiedSinceLastSubmit,b=t.name,_=t.touched,x=t.validating,A=t.visited,w=h(u,b),S=r?h(r,b):void 0;S&&S[y]&&(S=S[y]);var T=o&&h(o,b),C=i&&h(i,b),E=t.isEqual(C,w),P=!!(n&&!t.isEqual(h(n,b),w)),I=!S&&!T;return{active:c,blur:d,change:p,data:f,dirty:!E,dirtySinceLastSubmit:P,error:S,focus:m,initial:C,invalid:!I,length:Array.isArray(w)?w.length:void 0,modified:g,modifiedSinceLastSubmit:v,name:b,pristine:E,submitError:T,submitFailed:a,submitSucceeded:s,submitting:l,touched:_,valid:I,value:w,visited:A,validating:x}}var b=["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","value","visited","validating"],_=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var n=Object.prototype.hasOwnProperty.bind(t),o=0;o<r.length;o++){var a=r[o];if(!n(a)||e[a]!==t[a])return!1}return!0};function x(e,t,r,i,n,o){var a=!1;return n.forEach(function(n){i[n]&&(e[n]=t[n],r&&(~o.indexOf(n)?_(t[n],r[n]):t[n]===r[n])||(a=!0))}),a}var A=["data"],w=function(e,t,r,i){var n={blur:e.blur,change:e.change,focus:e.focus,name:e.name};return x(n,e,t,r,b,A)||!t||i?n:void 0},S=["active","dirty","dirtyFields","dirtyFieldsSinceLastSubmit","dirtySinceLastSubmit","error","errors","hasSubmitErrors","hasValidationErrors","initialValues","invalid","modified","modifiedSinceLastSubmit","pristine","submitting","submitError","submitErrors","submitFailed","submitSucceeded","touched","valid","validating","values","visited"],T=["touched","visited"];function C(e,t,r,i){var n={};return x(n,e,t,r,S,T)||!t||i?n:void 0}var E=function(e){var t,r;return function(){for(var i=arguments.length,n=Array(i),o=0;o<i;o++)n[o]=arguments[o];return(!t||n.length!==t.length||n.some(function(e,r){return!_(t[r],e)}))&&(t=n,r=e.apply(void 0,n)),r}},P=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},I="5.0.0-1";function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}var k=function(e,t){return e===t},O=function(e){return Object.keys(e).some(function(t){var r=e[t];return!r||"object"!=typeof r||r instanceof Error?void 0!==r:O(r)})};function D(e,t,r,i,n,o){var a=n(r,i,t,o);return!!a&&(e(a),!0)}function R(e,t,r,i,n){var o=e.entries;
4Object.keys(o).forEach(function(e){var a=o[Number(e)];if(a){var s=a.subscription,l=a.subscriber,u=a.notified;D(l,s,t,r,i,n||!u)&&(a.notified=!0)}})}function L(e){if(!e)throw Error("No config specified");var t=e.debug,r=e.destroyOnUnregister,n=e.keepDirtyOnReinitialize,o=e.initialValues,a=e.mutators,s=e.onSubmit,l=e.validate,u=e.validateOnBlur,c=e.callbackScheduler,d=e.ignoreUnregister;if(!s)throw Error("No onSubmit function specified");var p={subscribers:{index:0,entries:{}},fieldSubscribers:Object.create(null),fields:Object.create(null),formState:{asyncErrors:{},dirtySinceLastSubmit:!1,modifiedSinceLastSubmit:!1,errors:{},initialValues:o&&(0,i.A)({},o),pristine:!0,submitting:!1,submitFailed:!1,submitSucceeded:!1,resetWhileSubmitting:!1,valid:!0,validating:0,values:o?(0,i.A)({},o):{}},lastFormState:void 0},f=0,b=!1,x=!1,A=!1,S=0,T=0,I={},L=[],B=!1,F=function(e){return function(t){return delete I[e],t}},j=function(){!B&&L.length>0&&(B=!0,(c||function(e){return setTimeout(e,0)})(function(){var e=[].concat(L);L.length=0,B=!1,e.forEach(function(e){return e()})}))},z=function(e,t){t?(L.push(e),j()):e()},N=function(e,t,r){var i=r(h(e.formState.values,t));e.formState.values=m(e.formState.values,t,i)||{}},G=function(e,t,r){if(e.fields[t]){e.fields=Object.assign(Object.create(null),e.fields,((n={})[r]=(0,i.A)({},e.fields[t],{name:r,blur:function(){return et.blur(r)},change:function(e){return et.change(r,e)},focus:function(){return et.focus(r)},lastFieldState:void 0}),n)),delete e.fields[t],e.fieldSubscribers=Object.assign(Object.create(null),e.fieldSubscribers,((o={})[r]=e.fieldSubscribers[t],o)),delete e.fieldSubscribers[t];var n,o,a=h(e.formState.values,t);e.formState.values=m(e.formState.values,t,void 0)||{},e.formState.values=m(e.formState.values,r,a)||{},delete e.lastFormState}},V=function(e){return function(){if(a){for(var t={formState:p.formState,fields:p.fields,fieldSubscribers:p.fieldSubscribers,lastFormState:p.lastFormState},r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];var o=a[e](i,t,{changeValue:N,getIn:h,renameField:G,resetFieldState:et.resetFieldState,setIn:m,shallowEqual:_});return p.formState=t.formState,p.fields=t.fields,p.fieldSubscribers=t.fieldSubscribers,p.lastFormState=t.lastFormState,Z(void 0,function(){$(void 0),J()}),o}}},U=a?Object.keys(a).reduce(function(e,t){return e[t]=V(t),e},{}):{},H=function(e){var t=[];if(l){var r=l((0,i.A)({},p.formState.values));P(r)?t.push(r.then(function(t){return e(t,!0)})):e(r,!1)}return t},W=function(e){return e&&e.validators?Object.keys(e.validators).reduce(function(t,r){var i=e.validators[Number(r)]();return i&&t.push(i),t},[]):[]},q=function(e,t){var r=[],i=W(e);if(i.length){e.asyncValidationKey++;var n,o=e.asyncValidationKey;i.forEach(function(i){var a=i(h(p.formState.values,e.name),p.formState.values,0===i.length||3===i.length?v(p.formState,e):void 0);if(a&&P(a)){e.asyncValidationCount++,e.validating=!0;var s=e.instanceId,l=a.then(function(r){var i=p.fields[e.name];i&&i.instanceId===s&&(i.asyncValidationCount>0&&i.asyncValidationCount--,0===i.asyncValidationCount&&(i.validating=!1),o===i.asyncValidationKey&&t(r))});r.push(l)}else n||(n=a)}),t(n)}return r},Z=function(e,t){if(b){x=!0,t();return}var r=p.fields,n=p.formState,o=(0,i.A)({},r),a=Object.keys(o);if(!l&&!a.some(function(e){return W(o[e]).length}))return void t();var s=!1;if(e){var u=o[e];if(u){var c=u.validateFields;c&&(s=!0,a=c.length?c.concat(e):[e])}}var d={},f={},v={},A=[].concat(H(function(e,t){t?f=e||{}:d=e||{}}),a.reduce(function(e,t){return e.concat(q(r[t],function(e){v[t]=e}))},[])),w=A.length>0,T=++S,C=Promise.all(A).then(F(T)).catch(function(e){throw F(T)(void 0),e});w&&(I[T]=C);var E=function(e){var t=(0,i.A)({},s?n.errors:{},d,e?f:n.asyncErrors),u=function(i){a.forEach(function(n){if(r[n]){var a=h(d,n),u=e?h(f,n):void 0,c=h(t,n),p=W(o[n]).length,m=v[n];i(n,p&&m||l&&(u||a)||(a||s?void 0:c))}})};u(function(e,r){t=m(t,e,r)||{}}),u(function(e,r){if(r&&r[y]){var i=[].concat(h(t,e));i[y]=r[y],t=m(t,e,i)}}),_(n.errors,t)||(n.errors=t),e&&(n.asyncErrors=f),n.error=d[g]};if(w&&(p.formState.validating++,t()),E(!1),t(),w){var P=function(){p.formState.validating--,t(),0===p.formState.validating&&p.lastFormState.validating&&J()};C.then(function(){S>T||E(!0)}).then(P,P)}},$=function(e){if(!f){var t=p.fields,r=p.fieldSubscribers,n=p.formState,o=(0,i.A)({},t),a=function(e){var t=o[e],i=v(n,t),a=t.lastFieldState;t.lastFieldState=i;var s=r[e];s&&R(s,i,a,w,void 0===a)};
4e?a(e):Object.keys(o).forEach(a)}},K=function(){Object.keys(p.fields).forEach(function(e){p.fields[e].touched=!0})},X=function(){var e,t,r,n,o,a,s,l,u,c,d,f,m,g,y,v=p.fields,b=p.formState,x=p.lastFormState,A=(0,i.A)({},v),w=Object.keys(A),S=!1,T=w.reduce(function(e,t){return A[t].isEqual(h(b.values,t),h(b.initialValues||{},t))||(S=!0,e[t]=!0),e},{});if(!S)for(var C,E,P,I=new Set([].concat(Object.keys(b.values||{}),Object.keys(b.initialValues||{}))),k=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return M(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?M(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(I);!(P=k()).done;){var D=P.value;if(!A[D]&&!_(null==(C=b.values)?void 0:C[D],null==(E=b.initialValues)?void 0:E[D])){S=!0;break}}var R=w.reduce(function(e,t){var r=b.lastSubmittedValues||{};return A[t].isEqual(h(b.values,t),h(r,t))||(e[t]=!0),e},{});b.pristine=!S,b.dirtySinceLastSubmit=!!(b.lastSubmittedValues&&Object.values(R).some(function(e){return e})),b.modifiedSinceLastSubmit=!!(b.lastSubmittedValues&&Object.keys(A).some(function(e){return A[e].modifiedSinceLastSubmit})),b.valid=!b.error&&!b.submitError&&!O(b.errors)&&!(b.submitErrors&&O(b.submitErrors));var L=(e=b.active,t=b.dirtySinceLastSubmit,r=b.modifiedSinceLastSubmit,n=b.error,o=b.errors,a=b.initialValues,s=b.pristine,l=b.submitting,u=b.submitFailed,c=b.submitSucceeded,d=b.submitError,f=b.submitErrors,m=b.valid,g=b.validating,y=b.values,{active:e,dirty:!s,dirtySinceLastSubmit:t,modifiedSinceLastSubmit:r,error:n,errors:o,hasSubmitErrors:!!(d||f&&O(f)),hasValidationErrors:!!(n||o&&O(o)),invalid:!m,initialValues:a,pristine:s,submitting:l,submitFailed:u,submitSucceeded:c,submitError:d,submitErrors:f,valid:m,validating:g>0,values:y}),B=w.reduce(function(e,t){return e.modified[t]=A[t].modified,e.touched[t]=A[t].touched,e.visited[t]=A[t].visited,e},{modified:{},touched:{},visited:{}}),F=B.modified,j=B.touched,z=B.visited;return L.dirtyFields=x&&_(x.dirtyFields,T)?x.dirtyFields:T,L.dirtyFieldsSinceLastSubmit=x&&_(x.dirtyFieldsSinceLastSubmit,R)?x.dirtyFieldsSinceLastSubmit:R,L.modified=x&&_(x.modified,F)?x.modified:F,L.touched=x&&_(x.touched,j)?x.touched:j,L.visited=x&&_(x.visited,z)?x.visited:z,x&&_(x,L)?x:L},Y=!1,Q=!1,J=function(){if(Y)Q=!0;else{if(Y=!0,t&&t(X(),Object.keys(p.fields).reduce(function(e,t){return e[t]=p.fields[t],e},{})),!f&&!(b&&A)){var e=p.lastFormState,r=X();r!==e&&(p.lastFormState=r,R(p.subscribers,r,e,C))}Y=!1,Q&&(Q=!1,J())}},ee=function(){return Object.keys(p.fields).forEach(function(e){return p.fields[e].modifiedSinceLastSubmit=!1})};Z(void 0,function(){J()});var et={batch:function(e){f++,e(),f--,$(void 0),J()},blur:function(e){var t=p.fields,r=p.formState,n=t[e];n&&(delete r.active,t[e]=(0,i.A)({},n,{active:!1,touched:!0}),u?Z(e,function(){$(void 0),J()}):($(void 0),J()))},change:function(e,t){var r=p.fields,n=p.formState;if(h(n.values,e)!==t){N(p,e,function(){return t});var o=r[e];o&&(r[e]=(0,i.A)({},o,{modified:!0,modifiedSinceLastSubmit:!!n.lastSubmittedValues})),u?($(void 0),J()):Z(e,function(){$(void 0),J()})}},get destroyOnUnregister(){return!!r},set destroyOnUnregister(e){r=e},get ignoreUnregister(){return!!d},set ignoreUnregister(e){d=e},focus:function(e){var t=p.fields[e];t&&!t.active&&(p.formState.active=e,t.active=!0,t.visited=!0,$(void 0),J())},mutators:U,getFieldState:function(e){var t=p.fields[e];return t&&t.lastFieldState},getRegisteredFields:function(){return Object.keys(p.fields)},getState:function(){return X()},initialize:function(e){var t=p.fields,r=p.formState,o=(0,i.A)({},t),a="function"==typeof e?e(r.values):e;n||(r.values=a);var s=n?Object.keys(o).reduce(function(e,t){return!o[t].isEqual(h(r.values,t),h(r.initialValues||{},t))&&(Object.keys(o).some(function(e){return e!==t&&(e.startsWith(t+"[")||e.startsWith(t+"."))})||(e[t]=h(r.values,t))),e},{}):{};
5r.initialValues=a,r.values=a,Object.keys(s).forEach(function(e){r.values=m(r.values,e,s[e])||{}}),Object.keys(o).forEach(function(e){var t=o[e],i=h(r.values,e),n=h(r.initialValues||{},e),a=t.isEqual(i,n);t.modified=!a}),Z(void 0,function(){$(void 0),J()})},isValidationPaused:function(){return b},pauseValidation:function(e){void 0===e&&(e=!0),b=!0,A=e},registerField:function(e,t,i,n){void 0===i&&(i={}),p.fieldSubscribers[e]||(p.fieldSubscribers[e]={index:0,entries:{}});var o,a,s,l=p.fieldSubscribers[e].index++;p.fieldSubscribers[e].entries[l]={subscriber:E(t),subscription:i,notified:!1};var u=p.fields[e]||{active:!1,afterSubmit:n&&n.afterSubmit,beforeSubmit:n&&n.beforeSubmit,data:n&&n.data||{},isEqual:k,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,name:e,touched:!1,valid:!0,validateFields:n&&n.validateFields,validators:{},validating:!1,asyncValidationCount:0,asyncValidationKey:0,instanceId:void 0,visited:!1,blur:function(){return et.blur(e)},change:function(t){return et.change(e,t)},focus:function(){return et.focus(e)}};"function"!=typeof u.blur&&(u.blur=function(){return et.blur(e)}),"function"!=typeof u.change&&(u.change=function(t){return et.change(e,t)}),"function"!=typeof u.focus&&(u.focus=function(){return et.focus(e)}),u.isEqual=n&&n.isEqual||p.fields[e]&&p.fields[e].isEqual||k,u.instanceId=null!=(o=u.instanceId)?o:++T,u.asyncValidationCount=null!=(a=u.asyncValidationCount)?a:0,u.asyncValidationKey=null!=(s=u.asyncValidationKey)?s:0,p.fields[e]=u;var c=!1,f=n&&n.silent,g=n&&n.async,y=function(){z(function(){f&&p.fields[e]?$(e):(J(),$(void 0))},!!g)};if(n){c=!!(n.getValidator&&n.getValidator()),n.getValidator&&(p.fields[e].validators[l]=n.getValidator);var v=void 0===h(p.formState.values,e),b=h(p.formState.values,e),_=h(p.formState.initialValues,e);void 0!==n.initialValue&&(v||b===_)?(p.formState.initialValues=m(p.formState.initialValues||{},e,n.initialValue),p.formState.values=m(p.formState.values||{},e,n.initialValue)||{},Z(void 0,y)):void 0!==n.initialValue&&n.initialValue!==_&&void 0!==b&&(p.formState.initialValues=m(p.formState.initialValues||{},e,n.initialValue),Z(void 0,y)),void 0!==n.defaultValue&&void 0===n.initialValue&&void 0===h(p.formState.initialValues,e)&&v&&(p.formState.values=m(p.formState.values||{},e,n.defaultValue)||{})}return c?Z(void 0,y):y(),function(){var t=!1;p.fields[e]&&p.fields[e].validators&&(t=!!(p.fields[e].validators[l]&&p.fields[e].validators[l]()),delete p.fields[e].validators[l]);var i=!!p.fieldSubscribers[e];i&&p.fieldSubscribers[e].entries&&delete p.fieldSubscribers[e].entries[l];var n=i&&p.fieldSubscribers[e]&&p.fieldSubscribers[e].entries&&!Object.keys(p.fieldSubscribers[e].entries).length;n&&(delete p.fieldSubscribers[e],delete p.fields[e],t&&(p.formState.errors=m(p.formState.errors,e,void 0)||{}),r&&!d&&(p.formState.values=m(p.formState.values,e,void 0,!0)||{})),!f&&(t?Z(void 0,function(){J(),$(void 0)}):n&&J())}},reset:function(e){void 0===e&&(e=p.formState.initialValues),p.formState.submitting&&(p.formState.resetWhileSubmitting=!0),p.formState.submitFailed=!1,p.formState.submitSucceeded=!1,delete p.formState.submitError,delete p.formState.submitErrors,delete p.formState.lastSubmittedValues,et.initialize(e||{})},resetFieldState:function(e){var t,r,n,o=p.fields[e];p.fields[e]=(0,i.A)({},o,{active:!1,lastFieldState:void 0,modified:!1,touched:!1,valid:!0,validating:!1,instanceId:null!=(t=o.instanceId)?t:++T,asyncValidationCount:null!=(r=o.asyncValidationCount)?r:0,asyncValidationKey:(null!=(n=o.asyncValidationKey)?n:0)+1,visited:!1}),Z(void 0,function(){$(void 0),J()})},restart:function(e){void 0===e&&(e=p.formState.initialValues),et.batch(function(){var t,r,n;for(var o in p.fields){var a=p.fields[o];p.fields[o]=(0,i.A)({},a,{active:!1,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,touched:!1,valid:!0,validating:!1,instanceId:null!=(t=a.instanceId)?t:++T,asyncValidationCount:null!=(r=a.asyncValidationCount)?r:0,asyncValidationKey:(null!=(n=a.asyncValidationKey)?n:0)+1,visited:!1})}et.reset(e||{})})},resumeValidation:function(){b=!1,A=!1,x&&Z(void 0,function(){$(void 0),J()}),x=!1},setConfig:function(e,i){switch(e){case"debug":t="function"==typeof i?i:void 0;break;
5case"destroyOnUnregister":r=i;break;case"ignoreUnregister":d=i;break;case"initialValues":et.initialize(i);break;case"keepDirtyOnReinitialize":n=i;break;case"mutators":a=i,i?(Object.keys(U).forEach(function(e){e in i||delete U[e]}),Object.keys(i).forEach(function(e){U[e]=V(e)})):Object.keys(U).forEach(function(e){delete U[e]});break;case"onSubmit":s=i;break;case"validate":l=i,Z(void 0,function(){$(void 0),J()});break;case"validateOnBlur":u=i;break;case"callbackScheduler":c=i;break;default:throw Error("Unrecognised option "+e)}},setCallbackScheduler:function(e){c=e},submit:function(){var e,t=p.formState;if(t.submitting||(t.lastSubmittedValues=(0,i.A)({},t.values),Object.keys(p.fields).some(function(e){return p.fields[e].beforeSubmit&&!1===p.fields[e].beforeSubmit()})))return Promise.resolve(void 0);if(p.formState.error||O(p.formState.errors))return K(),ee(),p.formState.submitFailed=!0,J(),$(void 0),Promise.resolve(void 0);delete t.submitErrors,delete t.submitError;var r=Object.keys(I);if(r.length)return Promise.all(r.map(function(e){return I[Number(e)]})).then(function(){return et.submit()},function(e){console.error(e)});var n=!1,o=function(r){t.submitting=!1;var i=t.resetWhileSubmitting;return i&&(t.resetWhileSubmitting=!1),r&&O(r)?(t.submitFailed=!0,t.submitSucceeded=!1,t.submitErrors=r,t.submitError=r[g],K()):(i||(t.submitFailed=!1,t.submitSucceeded=!0),Object.keys(p.fields).forEach(function(e){return p.fields[e].afterSubmit&&p.fields[e].afterSubmit()})),J(),$(void 0),n=!0,e&&e(r),r};t.submitting=!0,t.submitFailed=!1,t.submitSucceeded=!1,t.lastSubmittedValues=(0,i.A)({},t.values),ee();var a=s(t.values,et,o);if(!n)if(a&&P(a))return J(),$(void 0),a.then(function(e){return o(e),e},function(e){throw o(void 0),e});else{if(s.length>=3)return J(),$(void 0),new Promise(function(t){e=t});o(a)}return Promise.resolve(void 0)},subscribe:function(e,t){if(!e)throw Error("No callback given.");if(!t)throw Error("No subscription provided. What values do you want to listen to?");var r=E(e),i=p.subscribers,n=i.index++;i.entries[n]={subscriber:r,subscription:t,notified:!1};var o=X();return D(r,t,o,o,C,!0),function(){delete i.entries[n]}},subscribeFieldState:function(e,t,r){return et.registerField(e,t,r)},getFieldSnapshot:function(e){var t=p.fields[e];if(t)return v(p.formState,t)},subscribeFormState:function(e,t){return et.subscribe(e,t)},getFormSnapshot:function(){return X()}};return et}},69992(e){"use strict";var t=Object.prototype.toString,r=Math.max,i=function(e,t){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var n=0;n<t.length;n+=1)r[n+e.length]=t[n];return r},n=function(e,t){for(var r=[],i=t||0,n=0;i<e.length;i+=1,n+=1)r[n]=e[i];return r},o=function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r};e.exports=function(e){var a,s=this;if("function"!=typeof s||"[object Function]"!==t.apply(s))throw TypeError("Function.prototype.bind called on incompatible "+s);for(var l=n(arguments,1),u=r(0,s.length-l.length),c=[],h=0;h<u;h++)c[h]="$"+h;if(a=Function("binder","return function ("+o(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=s.apply(this,i(l,arguments));return Object(t)===t?t:this}return s.apply(e,i(l,arguments))}),s.prototype){var d=function(){};d.prototype=s.prototype,a.prototype=new d,d.prototype=null}return a}},79524(e,t,r){"use strict";var i=r(69992);e.exports=Function.prototype.bind||i},49336(e,t,r){"use strict";var i,n=r(25153),o=r(41488),a=r(38004),s=r(96469),l=r(12557),u=r(63429),c=r(71102),h=r(85966),d=r(77412),p=r(52418),f=r(57958),m=r(47384),g=r(250),y=r(51844),v=r(47279),b=Function,_=function(e){try{return b('"use strict"; return ('+e+").constructor;")()}catch(e){}},x=r(25667),A=r(39886),w=function(){throw new c},S=x?function(){try{return arguments.callee,w}catch(e){try{return x(arguments,"callee").get}catch(e){return w}}}():w,T=r(21514)(),C=r(14252),E=r(23752),P=r(60248),I=r(64811),M=r(46255),k={},O="u">typeof Uint8Array&&C?C(Uint8Array):i,D={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":T&&C?C([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":"u"<typeof Atomics?i:Atomics,"%BigInt%":"u"<typeof BigInt?i:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"u"<typeof Float16Array?i:Float16Array,"%Float32Array%":"u"<typeof Float32Array?i:Float32Array,"%Float64Array%":"u"<typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":k,"%Int8Array%":"u"<typeof Int8Array?i:Int8Array,"%Int16Array%":"u"<typeof Int16Array?i:Int16Array,"%Int32Array%":"u"<typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
5IteratorPrototype%":T&&C?C(C([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"u"<typeof Map?i:Map,"%MapIteratorPrototype%":"u">typeof Map&&T&&C?C(new Map()[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?i:Promise,"%Proxy%":"u"<typeof Proxy?i:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":"u"<typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?i:Set,"%SetIteratorPrototype%":"u">typeof Set&&T&&C?C(new Set()[Symbol.iterator]()):i,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&C?C(""[Symbol.iterator]()):i,"%Symbol%":T?Symbol:i,"%SyntaxError%":u,"%ThrowTypeError%":S,"%TypedArray%":O,"%TypeError%":c,"%Uint8Array%":"u"<typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?i:Uint32Array,"%URIError%":h,"%WeakMap%":"u"<typeof WeakMap?i:WeakMap,"%WeakRef%":"u"<typeof WeakRef?i:WeakRef,"%WeakSet%":"u"<typeof WeakSet?i:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":I,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":p,"%Math.max%":f,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":P};if(C)try{null.error}catch(e){var R=C(C(e));D["%Error.prototype%"]=R}var L=function e(t){var r;if("%AsyncFunction%"===t)r=_("async function () {}");else if("%GeneratorFunction%"===t)r=_("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=_("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&C&&(r=C(n.prototype))}return D[t]=r,r},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=r(79524),j=r(837),z=F.call(M,Array.prototype.concat),N=F.call(I,Array.prototype.splice),G=F.call(M,String.prototype.replace),V=F.call(M,String.prototype.slice),U=F.call(M,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,q=function(e){var t=V(e,0,1),r=V(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var i=[];return G(e,H,function(e,t,r,n){i[i.length]=r?G(n,W,"$1"):t||e}),i},Z=function(e,t){var r,i=e;if(j(B,i)&&(i="%"+(r=B[i])[0]+"%"),j(D,i)){var n=D[i];if(n===k&&(n=L(i)),void 0===n&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:n}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=q(e),i=r.length>0?r[0]:"",n=Z("%"+i+"%",t),o=n.name,a=n.value,s=!1,l=n.alias;l&&(i=l[0],N(r,z([0,1],l)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],f=V(p,0,1),m=V(p,-1);if(('"'===f||"'"===f||"`"===f||'"'===m||"'"===m||"`"===m)&&f!==m)throw new u("property names with quotes must have matching quotes");if("constructor"!==p&&d||(s=!0),i+="."+p,j(D,o="%"+i+"%"))a=D[o];
5else if(null!=a){if(!(p in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(x&&h+1>=r.length){var g=x(a,p);a=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[p]}else d=j(a,p),a=a[p];d&&!s&&(D[o]=a)}}return a}},23752(e,t,r){"use strict";e.exports=r(25153).getPrototypeOf||null},60248(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},14252(e,t,r){"use strict";var i=r(60248),n=r(23752),o=r(57678);e.exports=i?function(e){return i(e)}:n?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return n(e)}:o?function(e){return o(e)}:null},51333(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},25667(e,t,r){"use strict";var i=r(51333);if(i)try{i([],"length")}catch(e){i=null}e.exports=i},24999(e){e.exports=function(){try{if("u"<typeof localStorage||(localStorage.setItem("Storage-Test","1"),"1"!==localStorage.getItem("Storage-Test")))return!1;localStorage.removeItem("Storage-Test")}catch(e){return!1}return!0}},21514(e,t,r){"use strict";var i="u">typeof Symbol&&Symbol,n=r(9712);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9712(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},837(e,t,r){"use strict";var i=Function.prototype.call,n=Object.prototype.hasOwnProperty;e.exports=r(79524).call(i,n)},29859(e){"use strict";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},i="function"==typeof Object.getOwnPropertySymbols;e.exports=function(e,n,o){if("string"!=typeof n){var a=Object.getOwnPropertyNames(n);i&&(a=a.concat(Object.getOwnPropertySymbols(n)));for(var s=0;s<a.length;++s)if(!t[a[s]]&&!r[a[s]]&&(!o||!o[a[s]]))try{e[a[s]]=n[a[s]]}catch(e){}}return e}},4674(e,t,r){"use strict";var i=r(17020),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return i.isMemo(e)?a:s[e.$$typeof]||n}s[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[i.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,r,i){if("string"!=typeof r){if(f){var n=p(r);n&&n!==f&&e(t,n,i)}var a=c(r);h&&(a=a.concat(h(r)));for(var s=l(t),m=l(r),g=0;g<a.length;++g){var y=a[g];if(!o[y]&&!(i&&i[y])&&!(m&&m[y])&&!(s&&s[y])){var v=d(r,y);try{u(t,y,v)}catch(e){}}}}return t}},41915(e,t){let r=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],i=r.reduce((e,t)=>
5(e[t.toLowerCase()]=t,e),{});t.CASE_SENSITIVE_TAG_NAMES=r,t.CASE_SENSITIVE_TAG_NAMES_MAP=i},52337(e,t,r){let i,n=r(94702),o="html",a="head",s="body",l=/<([a-zA-Z]+[0-9]?)/;function u(e,t){return t?t.createHTML(e):e}let c=(e,t,r)=>{throw Error("This browser does not support `document.implementation.createHTMLDocument`")},h=(e,t,r)=>{throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},d="object"==typeof window&&window.DOMParser;if("function"==typeof d){let e=new d;c=h=(t,r,i)=>(r&&(t=`<${r}>${t}</${r}>`),e.parseFromString(t,"text/html"))}if("object"==typeof document&&document.implementation){let e=document.implementation.createHTMLDocument();c=function(t,r,i){if(r){let n=e.documentElement.querySelector(r);return n&&(n.innerHTML=u(t,i)),e}return e.documentElement.innerHTML=u(t,i),e}}let p="object"==typeof document&&document.createElement("template");p&&p.content&&(i=(e,t)=>(p.innerHTML=u(e,t),p.content.childNodes)),t.default=function(e,t){e=n.escapeSpecialCharacters(e);let r=l.exec(e)?.[1]?.toLowerCase();switch(r){case o:{let t=h(e);if(!n.hasOpenTag(e,a)){let e=t.querySelector(a);e?.parentNode?.removeChild(e)}if(!n.hasOpenTag(e,s)){let e=t.querySelector(s);e?.parentNode?.removeChild(e)}return t.querySelectorAll(o)}case a:case s:{let i=c(e,void 0,t).querySelectorAll(r);if(n.hasOpenTag(e,s)&&n.hasOpenTag(e,a))return i[0].parentNode?.childNodes??document.createDocumentFragment().childNodes;return i}default:if(i)return i(e,t);return c(e,s,t).querySelector(s)?.childNodes??document.createDocumentFragment().childNodes}},t.getHTMLForInnerHTML=u},25990(e,t,r){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let i=r(94702),n=r(52337),o=/<(![a-zA-Z\s]+)>/;t.default=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];let r=o.exec(e),a=r?r[1]:void 0;return i.formatDOM(n.default(e,t?.trustedTypePolicy),null,a)}},94702(e,t,r){let i=r(80253),n=r(41915),o=`\r`,a=RegExp(o,"g"),s=`__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`,l=RegExp(s,"g");function u(e){return e.replace(l,o)}t.escapeSpecialCharacters=function(e){return e.replace(a,s)},t.formatDOM=function e(t,r=null,o){let a,s=[],l=0,c=t.length;for(;l<c;l++){let o=t[l];switch(o.nodeType){case 1:{let t=function(e){var t;return t=e=e.toLowerCase(),n.CASE_SENSITIVE_TAG_NAMES_MAP[t]||e}(o.nodeName);(a=new i.Element(t,function(e){let t={},r=0,i=e.length;for(;r<i;r++){let i=e[r];t[i.name]=i.value}return t}(o.attributes))).children=e("template"===t?o.content.childNodes:o.childNodes,a);break}case 3:a=new i.Text(u(o.nodeValue??""));break;case 8:a=new i.Comment(o.nodeValue??"");break;default:continue}let c=s[l-1]??null;c&&(c.next=a),a.parent=r,a.prev=c,a.next=null,s.push(a)}return o&&((a=new i.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=s[0]??null,a.parent=r,s.unshift(a),s[1]&&(s[1].prev=s[0])),s},t.hasOpenTag=function(e,t){let r="<"+t,i=e.toLowerCase().indexOf(r);if(-1===i)return!1;let n=e[i+r.length];return">"===n||" "===n||"	"===n||`
6`===n||`\r`===n||"/"===n},t.revertEscapedCharacters=u},93657(e,t){var r,i;(i=r||(r={})).Root="root",i.Text="text",i.Directive="directive",i.Comment="comment",i.Script="script",i.Style="style",i.Tag="tag",i.CDATA="cdata",i.Doctype="doctype",r.Root,r.Text,r.Directive,r.Comment,r.Script,r.Style,r.Tag,r.CDATA,r.Doctype,Object.defineProperty(t,"ElementType",{enumerable:!0,get:function(){return r}}),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style}},80253(e,t,r){let i=r(93657);var n=class{parent=null;prev=null;next=null;startIndex=null;endIndex=null;get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return b(this,e)}},o=class extends n{data;constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},a=class extends o{type=i.ElementType.Text;get nodeType(){return 3}},s=class extends o{type=i.ElementType.Comment;get nodeType(){return 8}},l=class extends o{type=i.ElementType.Directive;name;constructor(e,t){super(t),this.name=e}get nodeType(){return 1}"x-name";"x-publicId";"x-systemId"},u=class extends n{children;constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},c=class extends u{type=i.ElementType.CDATA;get nodeType(){return 4}},h=class extends u{type=i.ElementType.Root;get nodeType(){return 9}},d=class extends u{name;attribs;type;constructor(e,t,r=[],n="script"===e?i.ElementType.Script:"style"===e?i.ElementType.Style:i.ElementType.Tag){super(r),this.name=e,this.attribs=t,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this["x-attribsNamespace"]?.[e],prefix:this["x-attribsPrefix"]?.[e]}))}namespace;"x-attribsNamespace";"x-attribsPrefix"};function p(e){return i.isTag(e)}function f(e){return e.type===i.ElementType.CDATA}function m(e){return e.type===i.ElementType.Text}function g(e){return e.type===i.ElementType.Comment}function y(e){return e.type===i.ElementType.Directive}function v(e){return e.type===i.ElementType.Root}function b(e,t=!1){let r;if(m(e))r=new a(e.data);else if(g(e))r=new s(e.data);else if(p(e)){let i=t?_(e.children):[],n=new d(e.name,{...e.attribs},i);for(let e of i)e.parent=n;null!=e.namespace&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=n}else if(f(e)){let i=t?_(e.children):[],n=new c(i);for(let e of i)e.parent=n;r=n}else if(v(e)){let i=t?_(e.children):[],n=new h(i);for(let e of i)e.parent=n;e["x-mode"]&&(n["x-mode"]=e["x-mode"]),r=n}else if(y(e)){let t=new l(e.name,e.data);null!=e["x-name"]&&(t["x-name"]=e["x-name"],t["x-publicId"]=e["x-publicId"],t["x-systemId"]=e["x-systemId"]),r=t}else throw Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function _(e){let t=e.map(e=>b(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}t.CDATA=c,t.Comment=s,t.DataNode=o,t.Document=h,t.Element=d,t.Node=n,t.NodeWithChildren=u,t.ProcessingInstruction=l,t.Text=a,t.cloneNode=b,t.isCDATA=f,t.isComment=g,t.isDirective=y,t.isDocument=v,t.isTag=p,t.isText=m},61178(e,t,r){"use strict";
6Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e={},t){let r={},u=!!(e.type&&s[e.type]);for(let s in e){let c=e[s];if((0,i.isCustomAttribute)(s)){r[s]=c;continue}let h=s.toLowerCase(),d=l(h);if(d){let e=(0,i.getPropertyInfo)(d);switch(o.includes(d)&&a.includes(t)&&!u&&(d=l("default"+h)),r[d]=c,null==e?void 0:e.type){case i.BOOLEAN:r[d]=!0;break;case i.OVERLOADED_BOOLEAN:""===c&&(r[d]=!0)}continue}n.PRESERVE_CUSTOM_ATTRIBUTES&&(r[s]=c)}return(0,n.setStyleProp)(e.style,r),r};let i=r(66982),n=r(28048),o=["checked","value"],a=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return i.possibleStandardNames[e]}},32902(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r={}){var i,o,u,c,h;let d=[],p="function"==typeof r.replace,f=null!=(i=r.transform)?i:s.returnFirstArg,{cloneElement:m,createElement:g,isValidElement:y}=null!=(o=r.library)?o:l,v=t.length;!function e(t){for(let r of t)("tag"===r.type||"script"===r.type||"style"===r.type)&&(Object.setPrototypeOf(r,n.Element.prototype),e(r.children))}(t);for(let i=0;i<v;i++){let n,o=t[i];if(p){let e=null==(u=r.replace)?void 0:u.call(r,o,i);if(y(e)){v>1&&(e=m(e,{key:null!=(c=e.key)?c:i})),d.push(f(e,o,i));continue}}if("text"===o.type){let e=!o.data.trim().length;if(e&&o.parent&&!(0,s.canTextBeChildOfNode)(o.parent)||r.trim&&e)continue;d.push(f(o.data,o,i));continue}let l={};switch(s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===o.type&&(0,s.isCustomComponent)(o.name,o.attribs)?((0,s.setStyleProp)(o.attribs.style,o.attribs),l=o.attribs):o.attribs&&(l=(0,a.default)(o.attribs,o.name)),o.type){case"script":case"style":o.children[0]&&(l.dangerouslySetInnerHTML={__html:o.children[0].data});break;case"tag":"textarea"===o.name&&o.children[0]?l.defaultValue=o.children[0].data:(null==(h=o.children)?void 0:h.length)&&(n=e(o.children,r));break;default:continue}v>1&&(l.key=i),d.push(f(g(o.name,l,n),o,i))}return 1===d.length?d[0]:d};let n=r(35403),o=r(67308),a=i(r(61178)),s=r(28048),l={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement}},6364(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){var r;if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];let i=Object.assign(Object.assign({},null!=(r=null==t?void 0:t.htmlparser2)?r:s),{trustedTypePolicy:null==t?void 0:t.trustedTypePolicy});return(0,o.default)((0,n.default)(e,i),t)};let n=i(r(25990));t.htmlToDOM=n.default,t.attributesToProps=i(r(61178)).default;let o=i(r(32902));t.domToReact=o.default;var a=r(35403);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});let s={lowerCaseAttributeNames:!1}},28048(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!a.has(e):!!(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e){if(!e.trim()){t.style={};return}try{t.style=(0,o.default)(e,s)}catch(e){t.style={}}}};let n=r(67308),o=i(r(15753)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=e=>!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name),t.returnFirstArg=e=>e},63328(e,t){t.read=function(e,t,r,i,n){var o,a,s=8*n-i-1,l=(1<<s)-1,u=l>>1,c=-7,h=r?n-1:0,d=r?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?0/0:(p?-1:1)*2e308;a+=Math.pow(2,i),o-=u}return(p?-1:1)*a*Math.pow(2,o-i)},t.write=function(e,t,r,i,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,h=c>>1,d=5960464477539062e-23*(23===n),p=i?0:o-1,f=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||1/0===t?(s=+!!isNaN(t),a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,n),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),a=0));n>=8;e[r+p]=255&s,p+=f,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;e[r+p]=255&a,p+=f,a/=256,u-=8);e[r+p-f]|=128*m}},62122(e){"use strict";var t=/\/\*(?:[^*]|\*(?!\/))*\*\//g,r=/\n/g,i=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,s=/^[;
6\s]*/,l=`
7`;e.exports=function(e,u){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];u=u||{};var c=1,h=1;function d(e){var t=e.match(r);t&&(c+=t.length);var i=e.lastIndexOf(l);h=~i?e.length-i:h+e.length}function p(){var e={line:c,column:h};return function(t){return t.position=new f(e),g(i),t}}function f(e){this.start=e,this.end={line:c,column:h},this.source=u.source}function m(t){var r=Error(u.source+":"+c+":"+h+": "+t);if(r.reason=t,r.filename=u.source,r.line=c,r.column=h,r.source=e,u.silent);else throw r}function g(t){var r=t.exec(e);if(r){var i=r[0];return d(i),e=e.slice(i.length),r}}function y(e){for(var t;t=v();)e.push(t);return e}function v(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return m("End of comment missing");var i=e.slice(2,r-2);return h+=2,d(i),e=e.slice(r),h+=2,t({type:"comment",comment:i})}}f.prototype.content=e,g(i);var b,_=[];for(y(_);b=function(){var e=p(),r=g(n);if(r){if(v(),!g(o))return m("property missing ':'");var i=g(a),l=e({type:"declaration",property:r[0].replace(t,"").trim(),value:i?i[0].replace(t,"").trim():""});return g(s),l}}();)_.push(b),y(_);return _}},21815(e){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},14479(e){"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},1126(e,t){"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}t.isPlainObject=function(e){var t,i;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(i=t.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf"))}},42226(e,t,r){"use strict";var i=d(r(44729)),n=d(r(62811)),o=d(r(52286)),a=d(r(17332)),s=d(r(83610)),l=d(r(54847)),u=d(r(6522)),c=r(42042),h=d(r(45050));function d(e){return e&&e.__esModule?e:{default:e}}var p=function(){},f=function(e,t,r){var i=new p;if(void 0===e)throw Error("No element to render on was provided.");return i._renderProperties=(0,s.default)(e),i._encodings=[],i._options=h.default,i._errorHandler=new u.default(i),void 0!==t&&((r=r||{}).format||(r.format=y()),i.options(r)[r.format](t,r).render()),i};for(var m in f.getModule=function(e){return i.default[e]},i.default)i.default.hasOwnProperty(m)&&function(e,t){p.prototype[t]=p.prototype[t.toUpperCase()]=p.prototype[t.toLowerCase()]=function(r,i){var o=this;return o._errorHandler.wrapBarcodeCall(function(){i.text=void 0===i.text?void 0:""+i.text;var a=(0,n.default)(o._options,i);a=(0,l.default)(a);var s=g(r,e[t],a);return o._encodings.push(s),o})}}(i.default,m);function g(e,t,r){var i=new t(e=""+e,r);if(!i.valid())throw new c.InvalidInputException(i.constructor.name,e);var a=i.encode();a=(0,o.default)(a);for(var s=0;s<a.length;s++)a[s].options=(0,n.default)(r,a[s].options);return a}function y(){return i.default.CODE128?"CODE128":Object.keys(i.default)[0]}function v(e,t,r){t=(0,o.default)(t);for(var i=0;i<t.length;i++)t[i].options=(0,n.default)(r,t[i].options),(0,a.default)(t[i].options);(0,a.default)(r),new e.renderer(e.element,t,r).render(),e.afterRender&&e.afterRender()}p.prototype.options=function(e){return this._options=(0,n.default)(this._options,e),this},p.prototype.blank=function(e){var t=Array(e+1).join("0");return this._encodings.push({data:t}),this},p.prototype.init=function(){if(this._renderProperties)for(var e in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){var t=this._renderProperties[e],r=(0,n.default)(this._options,t.options);"auto"==r.format&&(r.format=y()),this._errorHandler.wrapBarcodeCall(function(){v(t,g(r.value,i.default[r.format.toUpperCase()],r),r)})}},p.prototype.render=function(){if(!this._renderProperties)throw new c.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)v(this._renderProperties[e],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},p.prototype._defaults=h.default,"u">typeof window&&(window.JsBarcode=f),"u">
7typeof jQuery&&(jQuery.fn.JsBarcode=function(e,t){var r=[];return jQuery(this).each(function(){r.push(this)}),f(r,e,t)}),e.exports=f},90885(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.data=t,this.text=r.text||t,this.options=r}},67246(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=(i=r(90885))&&i.__esModule?i:{default:i},a=r(37653);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.substring(1),r));return i.bytes=e.split("").map(function(e){return e.charCodeAt(0)}),i}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.bytes,r=e.shift()-105,i=a.SET_BY_CODE[r];if(void 0===i)throw RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&e.unshift(a.FNC1);var n=t.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:t.getBar(r)+n.result+t.getBar((n.checksum+r)%a.MODULO)+t.getBar(a.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var e=this.options.ean128||!1;return"string"==typeof e&&(e="true"===e.toLowerCase()),e}}],[{key:"getBar",value:function(e){return a.BARS[e]?a.BARS[e].toString():""}},{key:"correctIndex",value:function(e,t){if(t===a.SET_A){var r=e.shift();return r<32?r+64:r-32}return t===a.SET_B?e.shift()-32:(e.shift()-48)*10+e.shift()-48}},{key:"next",value:function(e,r,i){if(!e.length)return{result:"",checksum:0};var n=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=a.SWAP[o];void 0!==s?n=t.next(e,r+1,s):((i===a.SET_A||i===a.SET_B)&&o===a.SHIFT&&(e[0]=i===a.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),n=t.next(e,r+1,i))}else o=t.correctIndex(e,i),n=t.next(e,r+1,i);var l=t.getBar(o),u=o*r;return{result:l+n.result,checksum:u+n.checksum}}}]),t}(o.default)},4147(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=(i=r(67246))&&i.__esModule?i:{default:i},a=r(37653);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,a.A_START_CHAR+e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return RegExp("^"+a.A_CHARS+"+$").test(this.data)}}]),t}(o.default)},84502(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=(i=r(67246))&&i.__esModule?i:{default:i},a=r(37653);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,a.B_START_CHAR+e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return RegExp("^"+a.B_CHARS+"+$").test(this.data)}}]),t}(o.default)},2741(e,t,r){"use strict";
7Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=(i=r(67246))&&i.__esModule?i:{default:i},a=r(37653);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,a.C_START_CHAR+e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return RegExp("^"+a.C_CHARS+"+$").test(this.data)}}]),t}(o.default)},39962(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(67246)),n=o(r(48793));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");if(/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(0,n.default)(e),r));else var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return a(i)}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),t}(i.default)},48793(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(37653),n=function(e){return e.match(RegExp("^"+i.A_CHARS+"*"))[0].length},o=function(e){return e.match(RegExp("^"+i.B_CHARS+"*"))[0].length},a=function(e){return e.match(RegExp("^"+i.C_CHARS+"*"))[0]};function s(e,t){var r=t?i.A_CHARS:i.B_CHARS,n=e.match(RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(n)return n[1]+String.fromCharCode(204)+l(e.substring(n[1].length));var o=e.match(RegExp("^"+r+"+"))[0];return o.length===e.length?e:o+String.fromCharCode(t?205:206)+s(e.substring(o.length),!t)}function l(e){var t=a(e),r=t.length;if(r===e.length)return e;var i=n(e=e.substring(r))>=o(e);return t+String.fromCharCode(i?206:205)+s(e,i)}t.default=function(e){var t=void 0;if(a(e).length>=2)t=i.C_START_CHAR+l(e);else{var r=n(e)>o(e);t=(r?i.A_START_CHAR:i.B_START_CHAR)+s(e,r)}return t.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return String.fromCharCode(203)+t})}},37653(e,t){"use strict";function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var i,n=t.SET_A=0,o=t.SET_B=1,a=t.SET_C=2;t.SHIFT=98;var s=t.START_A=103,l=t.START_B=104,u=t.START_C=105;t.MODULO=103,t.STOP=106,t.FNC1=207,r(i={},s,n),r(i,l,o),r(i,u,a),t.SET_BY_CODE=i,t.SWAP={101:n,100:o,99:a},t.A_START_CHAR=String.fromCharCode(208),t.B_START_CHAR=String.fromCharCode(209),t.C_START_CHAR=String.fromCharCode(210),t.A_CHARS="[\0-_È-Ï]",t.B_CHARS="[ -�È-Ï]",t.C_CHARS="(Ï*[0-9]{2}Ï*)",t.BARS=[0x2904e8b0c,0x28fb77b2c,0x28fb7774e,10010011e3,0x254a47ecc,0x2541b2a8c,10011001e3,0x254b3bd24,0x2541cad44,11001001e3,0x28fb5f0a4,0x28fa83504,0x25a9a86dc,0x254b3e81c,0x254b3c116,0x25aa9a20c,0x254b547ac,0x254b543ce,0x28fb79dfa,0x28fb61b9c,0x28fb5f496,0x290500dc4,0x28fb79e54,0x295ad5c36,0x295abd58c,0x2959e19ec,0x2959e160e,0x295ad5844,0x2959e3d14,0x2959e3cba,11011011e3,0x2904e872e,0x28fa85c1e,10100011e3,10001011e3,0x2541b26ae,10110001e3,10001101e3,0x2541cacea,11010001e3,11000101e3,0
7x28fa834aa,10110111e3,0x25a9a5fd6,0x2541cb136,10111011e3,0x25aa99e2e,0x2541cd45e,0x295ad7f5e,0x2903f48d6,0x28fa838f6,11011101e3,0x290500d6a,0x2905011b6,11101011e3,0x295abd1ae,0x2959cb67e,11101101e3,0x295ad57ea,0x2959cba02,0x295ad82e2,0x28fb5f04a,0x296352972,1010011e4,0x25a01c94c,1001011e4,0x254a47aee,0x2540d6eec,0x2540d6b0e,1011001e4,0x25a9a5be4,1001101e4,0x254b3bcca,0x2540d9214,0x2540d91ba,0x28fa6d51a,1100101e4,0x29636d722,0x28fa6d574,0x2541cd7e2,0x25a0376fc,0x254a62c7c,0x254a4a5e6,0x25aab24c4,0x254b56ad4,0x254b56a7a,0x29636ac84,0x296354cf4,0x296354c9a,0x2904eb226,0x2905034de,0x29636d39e,10101111e3,0x25a01f066,0x2541b51a6,10111101e3,0x25aab246a,11110101e3,0x29636ac2a,0x25aa9c926,0x25aab28b6,0x295abfca6,0x29636b076,0x2903f44e4,1101001e4,0x2903f6fdc,0x1001dc55b53]},12672(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CODE128C=t.CODE128B=t.CODE128A=t.CODE128=void 0;var i=s(r(39962)),n=s(r(4147)),o=s(r(84502)),a=s(r(2741));function s(e){return e&&e.__esModule?e:{default:e}}t.CODE128=i.default,t.CODE128A=n.default,t.CODE128B=o.default,t.CODE128C=a.default},88363(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CODE39=void 0;var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e=e.toUpperCase(),r.mod43&&(e+=a[function(e){for(var t=0,r=0;r<e.length;r++)t+=u(e[r]);return t%43}(e)]);var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"encode",value:function(){for(var e=l("*"),t=0;t<this.data.length;t++)e+=l(this.data[t])+"0";return{data:e+=l("*"),text:this.text}}},{key:"valid",value:function(){return -1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),t}(((i=r(90885))&&i.__esModule?i:{default:i}).default),a=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],s=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function l(e){return s[u(e)].toString(2)}function u(e){return a.indexOf(e)}t.CODE39=o},89858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=r(79858);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.data.split("").flatMap(function(e){return o.MULTI_SYMBOLS[e]||e}),r=e.map(function(e){return t.getEncoding(e)}
7).join(""),i=t.checksum(e,20),n=t.checksum(e.concat(i),15);return{text:this.text,data:t.getEncoding("ÿ")+r+t.getEncoding(i)+t.getEncoding(n)+t.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(e){return o.BINARIES[t.symbolValue(e)]}},{key:"getSymbol",value:function(e){return o.SYMBOLS[e]}},{key:"symbolValue",value:function(e){return o.SYMBOLS.indexOf(e)}},{key:"checksum",value:function(e,r){var i=e.slice().reverse().reduce(function(e,i,n){return e+t.symbolValue(i)*(n%r+1)},0);return t.getSymbol(i%47)}}]),t}(((i=r(90885))&&i.__esModule?i:{default:i}).default)},75128(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),t}(((i=r(89858))&&i.__esModule?i:{default:i}).default)},79858(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],t.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],t.MULTI_SYMBOLS={"\0":["(%)","U"],"\x01":["($)","A"],"\x02":["($)","B"],"\x03":["($)","C"],"\x04":["($)","D"],"\x05":["($)","E"],"\x06":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"],"	":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"\x0e":["($)","N"],"\x0f":["($)","O"],"\x10":["($)","P"],"\x11":["($)","Q"],"\x12":["($)","R"],"\x13":["($)","S"],"\x14":["($)","T"],"\x15":["($)","U"],"\x16":["($)","V"],"\x17":["($)","W"],"\x18":["($)","X"],"\x19":["($)","Y"],"\x1a":["($)","Z"],"\x1b":["(%)","A"],"\x1c":["(%)","B"],"\x1d":["(%)","C"],"\x1e":["(%)","D"],"\x1f":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"�":["(%)","T"]}},65679(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CODE93FullASCII=t.CODE93=void 0;var i=o(r(89858)),n=o(r(75128));
7function o(e){return e&&e.__esModule?e:{default:e}}t.CODE93=i.default,t.CODE93FullASCII=n.default},91667(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=r(97134),o=a(r(59583));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return i.fontSize=!r.flat&&r.fontSize>10*r.width?10*r.width:r.fontSize,i.guardHeight=r.height+i.fontSize/2+r.textMargin,i}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),i(t,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(e,t){return this.text.substr(e,t)}},{key:"leftEncode",value:function(e,t){return(0,o.default)(e,t)}},{key:"rightText",value:function(e,t){return this.text.substr(e,t)}},{key:"rightEncode",value:function(e,t){return(0,o.default)(e,t)}},{key:"encodeGuarded",value:function(){var e={fontSize:this.fontSize},t={height:this.guardHeight};return[{data:n.SIDE_BIN,options:t},{data:this.leftEncode(),text:this.leftText(),options:e},{data:n.MIDDLE_BIN,options:t},{data:this.rightEncode(),text:this.rightText(),options:e},{data:n.SIDE_BIN,options:t}]}},{key:"encodeFlat",value:function(){return{data:[n.SIDE_BIN,this.leftEncode(),n.MIDDLE_BIN,this.rightEncode(),n.SIDE_BIN].join(""),text:this.text}}}]),t}(a(r(90885)).default)},40195(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,r,i)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(i)},a=r(97134),s=(i=r(91667))&&i.__esModule?i:{default:i},l=function(e){return(10-e.substr(0,12).split("").map(function(e){return+e}).reduce(function(e,t,r){return r%2?e+3*t:e+t},0)%10)%10};t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{12}$/)&&(e+=l(e));var i=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return i.lastChar=r.lastChar,i}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return -1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===l(this.data)}},{key:"leftText",value:function(){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var e=this.data.substr(1,6),r=a.EAN13_STRUCTURE[this.data[0]];return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftEncode",this).call(this,e,r)}},{key:"rightText",value:function(){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var e=this.data.substr(7,6);return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightEncode",this).call(this,e,"RRRRRR")}},{key:"encodeGuarded",value:function(){var e=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(e.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),t}(s.default)},7733(e,t,r){"use strict";
7Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=r(97134),o=a(r(59583));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),i(t,[{key:"valid",value:function(){return -1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var e=n.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,o.default)(this.data,e,"01"),text:this.text}}}]),t}(a(r(90885)).default)},67584(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=r(97134),o=a(r(59583));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),i(t,[{key:"valid",value:function(){return -1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var e=n.EAN5_STRUCTURE[this.data.split("").map(function(e){return+e}).reduce(function(e,t,r){return r%2?e+9*t:e+3*t},0)%10];return{data:"1011"+(0,o.default)(this.data,e,"01"),text:this.text}}}]),t}(a(r(90885)).default)},86875(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,r,i)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(i)},a=(i=r(91667))&&i.__esModule?i:{default:i},s=function(e){return(10-e.substr(0,7).split("").map(function(e){return+e}).reduce(function(e,t,r){return r%2?e+t:e+3*t},0)%10)%10};t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{7}$/)&&(e+=s(e));var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return -1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===s(this.data)}},{key:"leftText",value:function(){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var e=this.data.substr(0,4);return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"leftEncode",this).call(this,e,"
7LLLL")}},{key:"rightText",value:function(){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var e=this.data.substr(4,4);return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rightEncode",this).call(this,e,"RRRR")}}]),t}(a.default)},87365(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();t.checksum=a;var n=o(r(59583));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){var t,r=0;for(t=1;t<11;t+=2)r+=parseInt(e[t]);for(t=0;t<11;t+=2)r+=3*parseInt(e[t]);return(10-r%10)%10}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{11}$/)&&(e+=a(e));var i=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return i.displayValue=r.displayValue,r.fontSize>10*r.width?i.fontSize=10*r.width:i.fontSize=r.fontSize,i.guardHeight=r.height+i.fontSize/2+r.textMargin,i}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),i(t,[{key:"valid",value:function(){return -1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return e+="101",e+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),e+="01010",e+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),{data:e+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),e.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),e}}]),t}(o(r(90885)).default)},81206(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=s(r(59583)),o=s(r(90885)),a=r(87365);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var u=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],c=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]];function h(e,t){for(var r=u[parseInt(e[e.length-1])],i="",n=0,o=0;o<r.length;o++){var s=r[o];"X"===s?i+=e[n++]:i+=s}return(i=""+t+i)+(0,a.checksum)(i)}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));if(i.isValid=!1,-1!==e.search(/^[0-9]{6}$/))i.middleDigits=e,i.upcA=h(e,"0"),i.text=r.text||""+i.upcA[0]+e+i.upcA[i.upcA.length-1],i.isValid=!0;else{if(-1===e.search(/^[01][0-9]{7}$/)||(i.middleDigits=e.substring(1,e.length-1),i.upcA=h(i.middleDigits,e[0]),i.upcA[i.upcA.length-1]!==e[e.length-1]))return l(i);i.isValid=!0}return i.displayValue=r.displayValue,r.fontSize>10*r.width?i.fontSize=10*r.width:i.fontSize=r.fontSize,i.guardHeight=r.height+i.fontSize/2+r.textMargin,i}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),i(t,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return e+="101",e+=this.encodeMiddleDigits(),{data:e+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),e}},{key:"encodeMiddleDigits",value:function(){var e=this.upcA[0],t=c[parseInt(this.upcA[this.upcA.length-1])][parseInt(e)];return(0,n.default)(this.middleDigits,t)}}]),t}(o.default)},97134(e,t){"use strict";
7Object.defineProperty(t,"__esModule",{value:!0}),t.SIDE_BIN="101",t.MIDDLE_BIN="01010",t.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},t.EAN2_STRUCTURE=["LL","LG","GL","GG"],t.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],t.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},59583(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(97134);t.default=function(e,t,r){var n=e.split("").map(function(e,r){return i.BINARIES[t[r]]}).map(function(t,r){return t?t[e[r]]:""});if(r){var o=e.length-1;n=n.map(function(e,t){return t<o?e+r:e})}return n.join("")}},37387(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPCE=t.UPC=t.EAN2=t.EAN5=t.EAN8=t.EAN13=void 0;var i=u(r(40195)),n=u(r(86875)),o=u(r(67584)),a=u(r(7733)),s=u(r(87365)),l=u(r(81206));function u(e){return e&&e.__esModule?e:{default:e}}t.EAN13=i.default,t.EAN8=n.default,t.EAN5=o.default,t.EAN2=a.default,t.UPC=s.default,t.UPCE=l.default},28857(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericBarcode=void 0;var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();t.GenericBarcode=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),t}(((i=r(90885))&&i.__esModule?i:{default:i}).default)},44894(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=r(99002);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var e=(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&("object"==typeof e||"function"==typeof e)?e:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return -1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join("");return{data:o.START_BIN+t+o.END_BIN,text:this.text}}},{key:"encodePair",value:function(e){var t=o.BINARIES[e[1]];return o.BINARIES[e[0]].split("").map(function(e,r){return("1"===e?"111":"1")+("1"===t[r]?"000":"0")}).join("")}}]),t}(((i=r(90885))&&i.__esModule?i:{default:i}).default)},23383(e,t,r){"use strict";
7Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=(i=r(44894))&&i.__esModule?i:{default:i},a=function(e){var t=e.substr(0,13).split("").map(function(e){return parseInt(e,10)}).reduce(function(e,t,r){return e+t*(3-r%2*2)},0);return 10*Math.ceil(t/10)-t};t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{13}$/)&&(e+=a(e));var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return -1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===a(this.data)}}]),t}(o.default)},99002(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.START_BIN="1010",t.END_BIN="11101",t.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},55991(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var i=o(r(44894)),n=o(r(23383));function o(e){return e&&e.__esModule?e:{default:e}}t.ITF=i.default,t.ITF14=n.default},68154(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"encode",value:function(){for(var e="110",t=0;t<this.data.length;t++){var r=parseInt(this.data[t]).toString(2);r=function(e,t){for(var r=0;r<t;r++)e="0"+e;return e}(r,4-r.length);for(var i=0;i<r.length;i++)e+="0"==r[i]?"100":"110"}return{data:e+="1001",text:this.text}}},{key:"valid",value:function(){return -1!==this.data.search(/^[0-9]+$/)}}]),t}(((i=r(90885))&&i.__esModule?i:{default:i}).default)},16415(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=(i=r(68154))&&i.__esModule?i:{default:i},o=r(54853);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,o.mod10)(e),r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),t}(n.default)},39522(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=(i=r(68154))&&i.__esModule?i:{default:i},o=r(54853);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e+=(0,o.mod10)(e),e+=(0,o.mod10)(e);var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),t}(n.default)},81800(e,t,r){"use strict";
7Object.defineProperty(t,"__esModule",{value:!0});var i,n=(i=r(68154))&&i.__esModule?i:{default:i},o=r(54853);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,o.mod11)(e),r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),t}(n.default)},59365(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=(i=r(68154))&&i.__esModule?i:{default:i},o=r(54853);t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e+=(0,o.mod11)(e),e+=(0,o.mod10)(e);var i=(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&("object"==typeof i||"function"==typeof i)?i:this}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),t}(n.default)},54853(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mod10=function(e){for(var t=0,r=0;r<e.length;r++){var i=parseInt(e[r]);(r+e.length)%2==0?t+=i:t+=2*i%10+Math.floor(2*i/10)}return(10-t%10)%10},t.mod11=function(e){for(var t=0,r=[2,3,4,5,6,7],i=0;i<e.length;i++){var n=parseInt(e[e.length-1-i]);t+=r[i%r.length]*n}return(11-t%11)%11}},70441(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var i=l(r(68154)),n=l(r(16415)),o=l(r(81800)),a=l(r(39522)),s=l(r(59365));function l(e){return e&&e.__esModule?e:{default:e}}t.MSI=i.default,t.MSI10=n.default,t.MSI11=o.default,t.MSI1010=a.default,t.MSI1110=s.default},10684(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.codabar=void 0;var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();t.codabar=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");0===e.search(/^[0-9\-\$\:\.\+\/]+$/)&&(e="A"+e+"A");var i=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.toUpperCase(),r));return i.text=i.options.text||i.text.replace(/[A-D]/g,""),i}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"valid",value:function(){return -1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var e=[],t=this.getEncodings(),r=0;r<this.data.length;r++)e.push(t[this.data.charAt(r)]),r!==this.data.length-1&&e.push("0");return{text:this.text,data:e.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),t}(((i=r(90885))&&i.__esModule?i:{default:i}).default)},44729(e,t,r){"use strict";
7Object.defineProperty(t,"__esModule",{value:!0});var i=r(88363),n=r(12672),o=r(37387),a=r(55991),s=r(70441),l=r(88178),u=r(10684),c=r(65679),h=r(28857);t.default={CODE39:i.CODE39,CODE128:n.CODE128,CODE128A:n.CODE128A,CODE128B:n.CODE128B,CODE128C:n.CODE128C,EAN13:o.EAN13,EAN8:o.EAN8,EAN5:o.EAN5,EAN2:o.EAN2,UPC:o.UPC,UPCE:o.UPCE,ITF14:a.ITF14,ITF:a.ITF,MSI:s.MSI,MSI10:s.MSI10,MSI11:s.MSI11,MSI1010:s.MSI1010,MSI1110:s.MSI1110,pharmacode:l.pharmacode,codabar:u.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:h.GenericBarcode}},88178(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();t.pharmacode=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var i=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return i.number=parseInt(e,10),i}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"encode",value:function(){for(var e=this.number,t="";!isNaN(e)&&0!=e;)e%2==0?(t="11100"+t,e=(e-2)/2):(t="100"+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),t}(((i=r(90885))&&i.__esModule?i:{default:i}).default)},6522(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();t.default=function(){function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.api=t}return r(e,[{key:"handleCatch",value:function(e){if("InvalidInputException"===e.name)if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw e.message;else throw e;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),e}()},42042(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function n(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.name="InvalidInputException",o.symbology=e,o.input=n,o.message='"'+o.input+'" is not a valid input for '+o.symbology,o}return n(t,e),t}(Error),a=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="InvalidElementException",e.message="Not supported type to render on",e}return n(t,e),t}(Error),s=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="NoElementException",e.message="No element to render on.",e}return n(t,e),t}(Error);t.InvalidInputException=o,t.InvalidElementException=a,t.NoElementException=s},17332(e,t){"use strict";
7Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}},37273(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(54847)),n=o(r(45050));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t={};for(var r in n.default)n.default.hasOwnProperty(r)&&(e.hasAttribute("jsbarcode-"+r.toLowerCase())&&(t[r]=e.getAttribute("jsbarcode-"+r.toLowerCase())),e.hasAttribute("data-"+r.toLowerCase())&&(t[r]=e.getAttribute("data-"+r.toLowerCase())));return t.value=e.getAttribute("jsbarcode-value")||e.getAttribute("data-value"),t=(0,i.default)(t)}},83610(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=s(r(37273)),o=s(r(29296)),a=r(42042);function s(e){return e&&e.__esModule?e:{default:e}}t.default=function e(t){if("string"==typeof t){var r,s=document.querySelectorAll(t);if(0!==s.length){for(var l=[],u=0;u<s.length;u++)l.push(e(s[u]));return l}return}if(Array.isArray(t)){for(var c=[],h=0;h<t.length;h++)c.push(e(t[h]));return c}if("u">typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return{element:r=document.createElement("canvas"),options:(0,n.default)(t),renderer:o.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",r.toDataURL())}};if(t&&t.nodeName&&"svg"===t.nodeName.toLowerCase()||"u">typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,n.default)(t),renderer:o.default.SVGRenderer};if("u">typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,n.default)(t),renderer:o.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:o.default.CanvasRenderer};if(t&&(void 0===t?"undefined":i(t))==="object"&&!t.nodeName)return{element:t,renderer:o.default.ObjectRenderer};else throw new a.InvalidElementException}},52286(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];return!function e(r){if(Array.isArray(r))for(var i=0;i<r.length;i++)e(r[i]);else r.text=r.text||"",r.data=r.data||"",t.push(r)}(e),t}},62811(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e};t.default=function(e,t){return r({},e,t)}},54847(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in t)t.hasOwnProperty(r)&&"string"==typeof e[r=t[r]]&&(e[r]=parseInt(e[r],10));return"string"==typeof e.displayValue&&(e.displayValue="false"!=e.displayValue),e}},45050(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}},30122(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=(i=r(62811))&&i.__esModule?i:{default:i},a=r(64075);t.default=function(){function e(t,r,i){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.canvas=t,this.encodings=r,this.options=i}return n(e,[{key:"render",value:function(){if(!this.canvas.getContext)throw Error("The browser does not support canvas.");this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,o.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var e=this.canvas.getContext("2d");e.save(),(0,a.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,a.getTotalWidthOfEncodings)(this.encodings),r=(0,a.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=r,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(e,t){var r,i=this.canvas.getContext("2d"),n=t.data;r="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,i.fillStyle=e.lineColor;for(var o=0;o<n.length;o++){var a=o*e.width+t.barcodePadding;"1"===n[o]?i.fillRect(a,r,e.width,e.height):n[o]&&i.fillRect(a,r,e.width,e.height*n[o])}}},{key:"drawCanvasText",value:function(e,t){var r,i,n=this.canvas.getContext("2d"),o=e.fontOptions+" "+e.fontSize+"px "+e.font;e.displayValue&&(i="top"==e.textPosition?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,n.font=o,"left"==e.textAlign||t.barcodePadding>0?(r=0,n.textAlign="left"):"right"==e.textAlign?(r=t.width-1,n.textAlign="right"):(r=t.width/2,n.textAlign="center"),n.fillText(t.text,r,i))}},{key:"moveCanvasDrawing",value:function(e){this.canvas.getContext("2d").translate(e.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore(
7)}}]),e}()},29296(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(r(30122)),n=a(r(12834)),o=a(r(94341));function a(e){return e&&e.__esModule?e:{default:e}}t.default={CanvasRenderer:i.default,SVGRenderer:n.default,ObjectRenderer:o.default}},94341(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();t.default=function(){function e(t,r,i){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.object=t,this.encodings=r,this.options=i}return r(e,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),e}()},64075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTotalWidthOfEncodings=t.calculateEncodingAttributes=t.getBarcodePadding=t.getEncodingHeight=t.getMaximumHeightOfEncodings=void 0;var i,n=(i=r(62811))&&i.__esModule?i:{default:i};function o(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function a(e,t,r){if(r.displayValue&&t<e){if("center"==r.textAlign)return Math.floor((e-t)/2);else if("left"==r.textAlign);else if("right"==r.textAlign)return Math.floor(e-t)}return 0}t.getMaximumHeightOfEncodings=function(e){for(var t=0,r=0;r<e.length;r++)e[r].height>t&&(t=e[r].height);return t},t.getEncodingHeight=o,t.getBarcodePadding=a,t.calculateEncodingAttributes=function(e,t,r){for(var i=0;i<e.length;i++){var s,l=e[i],u=(0,n.default)(t,l.options);s=u.displayValue?function(e,t,r){if(r)i=r;else{if(!("u">typeof document))return 0;i=document.createElement("canvas").getContext("2d")}i.font=t.fontOptions+" "+t.fontSize+"px "+t.font;var i,n=i.measureText(e);return n?n.width:0}(l.text,u,r):0;var c=l.data.length*u.width;l.width=Math.ceil(Math.max(s,c)),l.height=o(l,u),l.barcodePadding=a(s,c,u)}},t.getTotalWidthOfEncodings=function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r].width;return t}},12834(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=(i=r(62811))&&i.__esModule?i:{default:i},a=r(64075),s="http://www.w3.org/2000/svg";t.default=function(){function e(t,r,i){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.svg=t,this.encodings=r,this.options=i,this.document=i.xmlDocument||document}return n(e,[{key:"render",value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,o.default)(this.options,r.options),n=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(n,i),this.drawSvgBarcode(n,i,r),this.drawSVGText(n,i,r),e+=r.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,a.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,a.getTotalWidthOfEncodings)(this.encodings),t=(0,a.getMaximumHeightOfEncodings)(this.encodings),r=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(r,t),this.options.background&&this.drawRect(0,0,r,t,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(e,t,r){var i,n=r.data;i="top"==t.textPosition?t.fontSize+t.textMargin:0;for(var o=0,a=0,s=0;s<n.length;s++)a=s*t.width+r.barcodePadding,"1"===n[s]?o++:o>0&&(this.drawRect(a-t.width*o,i,t.width*o,t.height,e),o=0);o>0&&this.drawRect(a-t.width*(o-1),i,t.width*o,t.height,e)}},{key:"drawSVGText",value:function(e,t,r){var i,n,o=this.document.createElementNS(s,"text");t.displayValue&&(o.setAttribute("font-family",t.font),o.setAttribute("font-size",t.fontSize),t.fontOptions.includes("bold")&&o.setAttribute("font-weight","bold"),t.fontOptions.includes("italic")&&o.setAttribute("font-style","
7italic"),n="top"==t.textPosition?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,"left"==t.textAlign||r.barcodePadding>0?(i=0,o.setAttribute("text-anchor","start")):"right"==t.textAlign?(i=r.width-1,o.setAttribute("text-anchor","end")):(i=r.width/2,o.setAttribute("text-anchor","middle")),o.setAttribute("x",i),o.setAttribute("y",n),o.appendChild(this.document.createTextNode(r.text)),e.appendChild(o))}},{key:"setSvgAttributes",value:function(e,t){var r=this.svg;r.setAttribute("width",e+"px"),r.setAttribute("height",t+"px"),r.setAttribute("x","0px"),r.setAttribute("y","0px"),r.setAttribute("viewBox","0 0 "+e+" "+t),r.setAttribute("xmlns",s),r.setAttribute("version","1.1")}},{key:"createGroup",value:function(e,t,r){var i=this.document.createElementNS(s,"g");return i.setAttribute("transform","translate("+e+", "+t+")"),r.appendChild(i),i}},{key:"setGroupOptions",value:function(e,t){e.setAttribute("fill",t.lineColor)}},{key:"drawRect",value:function(e,t,r,i,n){var o=this.document.createElementNS(s,"rect");return o.setAttribute("x",e),o.setAttribute("y",t),o.setAttribute("width",r),o.setAttribute("height",i),n.appendChild(o),o}}]),e}()},51148(e,t,r){var i=r(1047),n=function(e){var t="",r=Object.keys(e);return r.forEach(function(n,o){var a,s=e[n];a=n=i(n),/[height|width]$/.test(a)&&"number"==typeof s&&(s+="px"),!0===s?t+=n:!1===s?t+="not "+n:t+="("+n+": "+s+")",o<r.length-1&&(t+=" and ")}),t};e.exports=function(e){var t="";return"string"==typeof e?e:e instanceof Array?(e.forEach(function(r,i){t+=n(r),i<e.length-1&&(t+=", ")}),t):n(e)}},14971(e,t,r){let i=r(817);function n(e){for(e=e.replace(/[\x00-\x20]+/g,"");;){let t=e.indexOf("\x3c!--");if(-1===t)break;let r=e.indexOf("--\x3e",t+4);if(-1===r)break;e=e.substring(0,t)+e.substring(r+3)}return e}function o(e,t){let r=(t=t||{}).allowedSchemes||["http","https","ftp","mailto","tel","sms"],i=!1!==t.allowProtocolRelative;if("string"!=typeof e)return!1;let o=(e=n(e)).match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!o)return!!e.match(/^[/\\]{2}/)&&!i;let a=o[1].toLowerCase();return -1===r.indexOf(a)}e.exports=function(e){let t={};return t.options=e||{},t.filterTag=t.options.filterTag||function(e){return(e=e.trim()).toLowerCase()},t.string=function(e,t){return"string"!=typeof e&&("number"==typeof e||"boolean"==typeof e?e+="":e=""),e=e.trim(),void 0!==t&&""===e&&(e=t),e},t.strings=function(e){return Array.isArray(e)?e.map(function(e){return t.string(e)}):[]},t.integer=function(e,t,r,i){if(void 0===t&&(t=0),"number"==typeof e)e=Math.floor(e);else try{e=parseInt(e,10),isNaN(e)&&(e=t)}catch(r){e=t}return"number"==typeof r&&e<r&&(e=r),"number"==typeof i&&e>i&&(e=i),e},t.padInteger=function(e,t){let r=e+"";for(;r.length<t;)r="0"+r;return r},t.float=function(e,t,r,i){if(void 0===t&&(t=0),"number"!=typeof e)try{e=parseFloat(e,10),isNaN(e)&&(e=t)}catch(r){e=t}return"number"==typeof r&&e<r&&(e=r),"number"==typeof i&&e>i&&(e=i),e},t.naughtyHref=o,t.url=function(e,r,i){var a;return(e=t.string(e,r))===r?e:o(e=n(e))||null===(e=(a=e).match(/^(((https?|ftp):\/\/)|((mailto|tel|sms):)|#|([^/.]+)?\/|[^/.]+$)/)?a:a.match(/^[^/.]+\.[^/.]+/)?(i?"https://":"http://")+a:null)?r:e},t.select=function(e,r,i){let n;return(e=t.string(e),r&&r.length)?"object"==typeof r[0]?null!=(n=r.find(function(t){return null!==t.value&&void 0!==t.value&&t.value.toString()===e}))?n.value:i:void 0!==(n=r.find(function(t){return null!=t&&t.toString()===e}))?n:i:i},t.boolean=function(e,r){return!0===e||!1!==e&&((e=t.string(e,r))===r?void 0!==e&&e:""!==(e=e.toLowerCase().charAt(0))&&"n"!==e&&"0"!==e&&"f"!==e&&("t"===e||"y"===e||"1"===e))},t.addBooleanFilterToCriteria=function(e,r,i,n){void 0===n&&(n=null);let o="object"==typeof e&&null!==e?e[r]:e;o=void 0===o?n:o,null===(o=t.booleanOrNull(o))||(o?i[r]=!0:i[r]={$ne:!0})},t.booleanOrNull=function(e,r){return!0===e||!1===e||null===e?e:(e=t.string(e,r))===r?void 0===r?null:e:"null"===e?null:""!==(e=e.toLowerCase().charAt(0))&&"n"!==e&&"0"!==e&&"f"!==e&&("t"===e||"y"===e||"1"===e||("a"===e?null:r))},t.date=function(e,r,n){let o;function a(){return void 0===r&&(r=i().format("YYYY-MM-DD")),r}if("string"==typeof e){if(e.match(/\//)){if(2===(o=e.split("/")).length)return(n||new Date).getFullYear()+"-"+t.padInteger(o[0],2)+"-"+t.padInteger(o[1],2);if(3!==o.length)return a();if(o[2]<100){let e=n||new Date,t=e.getFullYear()%100,r=e.getFullYear()-t,i=parseInt(o[2])+r;i-e.getFullYear()>50&&(i-=100),o[2]=i}return t.padInteger(o[2],4)+"-"+t.padInteger(o[0],2)+"-"+t.padInteger(o[1],2)}else if(e.match(/-/))return 2===(o=e.split("-")).length?(n||new Date).getFullYear()+"-"+t.padInteger(o[0],2)+"-"+t.padInteger(o[1],2):3===o.length?t.padInteger(o[0],4)+"-"+t.padInteger(o[1],2)+"-"+t.padInteger(o[2],2):a()}try{if(null===e||(e=n||new Date(e),isNaN(e.getTime())))return a();return e.getFullYear()+"-"+t.padInteger(e.getMonth()+1,2)+"-"+t.padInteger(e.getDate(),2)}catch(e){return a()}},t.formatDate=function(e){return i(e).format("YYYY-MM-DD")},t.time=function(e,r){let n=(e=(e=t.string(e).toLowerCase()).trim()).match(/^(\d+)([:|.](\d+))?([:|.](\d+))?\s*(am|pm|AM|PM|a|p|A|M)?$/);if(n){let e=parseInt(n[1],10),r=void 0!==n[3]?parseInt(n[3],10):0,i=void 0!==n[5]?parseInt(n[5],10):0,o=n[6]?n[6].toLowerCase():n[6];return o=o&&o.charAt(0),12===e&&"a"===o?e-=12:12===e&&"p"===o||"p"===o&&(e+=12),(24===e||"24"===e)&&(e=0),t.padInteger(e,2)+":"+t.padInteger(r,2)+":"+t.padInteger(i,2)}return void 0!==r?r:i().format("HH:mm")},t.formatTime=function(e){return i(e).format("HH:mm:ss")},t.tags=function(e,r){return("string"==typeof e&&(e=e.split(/,\s*/)),Array.isArray(e))?e.map(e=>t.string(e)).map(r||t.filterTag).filter(e=>e.length>0):[]},t.idRegExp=t.options.idRegExp||/^[A-Za-z0-9_]+$/,t.id=function(e,r){let i=t.string(e,r);return i===r||i.match(t.idRegExp)?i:r},t.ids=function(e){return Array.isArray(e)?e.filter(function(e){return void 0!==t.id(e)}):[]},t}
7,e.exports.naughtyHref=o},2163(e){function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(Error("Failed to load "+this.src),e)}}e.exports=function(e,r,i){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");"function"==typeof r&&(i=r,r={}),i=i||function(){},o.type=(r=r||{}).type||"text/javascript",o.charset=r.charset||"utf8",o.async=!("async"in r)||!!r.async,o.src=e,r.attrs&&function(e,t){for(var r in t)e.setAttribute(r,t[r])}(o,r.attrs),r.text&&(o.text=""+r.text),("onload"in o?t:function(e,t){e.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(this.onreadystatechange=null,t(null,e))}})(o,i),o.onload||t(o,i),n.appendChild(o)}},63850(e,t,r){var i=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")(),h=Object.prototype.toString,d=Math.max,p=Math.min,f=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==h.call(t))return 0/0;if(m(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=m(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var l=o.test(e);return l||a.test(e)?s(e.slice(2),l?2:8):n.test(e)?0/0:+e}e.exports=function(e,t,r){var i,n,o,a,s,l,u=0,c=!1,h=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var r=i,o=n;return i=n=void 0,u=t,a=e.apply(o,r)}function b(e){var r=e-l,i=e-u;return void 0===l||r>=t||r<0||h&&i>=o}function _(){var e,r,i,n=f();if(b(n))return x(n);s=setTimeout(_,(e=n-l,r=n-u,i=t-e,h?p(i,o-r):i))}function x(e){return(s=void 0,y&&i)?v(e):(i=n=void 0,a)}function A(){var e,r=f(),o=b(r);if(i=arguments,n=this,l=r,o){if(void 0===s)return u=e=l,s=setTimeout(_,t),c?v(e):a;if(h)return s=setTimeout(_,t),v(l)}return void 0===s&&(s=setTimeout(_,t)),a}return t=g(t)||0,m(r)&&(c=!!r.leading,o=(h="maxWait"in r)?d(g(r.maxWait)||0,t):o,y="trailing"in r?!!r.trailing:y),A.cancel=function(){void 0!==s&&clearTimeout(s),u=0,i=l=n=s=void 0},A.flush=function(){return void 0===s?a:x(f())},A}},49808(e,t,r){"use strict";var i=r(96210);e.exports=function(e,t){for(var r,l,u,c,h,d,p,f,m,g,y,v,b=t||{},_=!1!==b.padding,x=!1!==b.delimiterStart,A=!1!==b.delimiterEnd,w=(b.align||[]).concat(),S=!1!==b.alignDelimiters,T=[],C=b.stringLength||a,E=-1,P=e.length,I=[],M=[],k=[],O=[],D=[],R=0;++E<P;){for(l=e[E],u=-1,c=l.length,k=[],O=[],c>R&&(R=c);++u<c;)p=null==(r=l[u])?"":String(r),!0===S&&(d=C(p),O[u]=d,(void 0===(h=D[u])||d>h)&&(D[u]=d)),k.push(p);I[E]=k,M[E]=O}if(u=-1,c=R,"object"==typeof w&&"length"in w)for(;++u<c;)T[u]=s(w[u]);else for(v=s(w);++u<c;)T[u]=v;for(u=-1,c=R,k=[],O=[];++u<c;)v=T[u],g="",y="",108===v?g=":":114===v?y=":":99===v&&(g=":",y=":"),d=S?Math.max(1,D[u]-g.length-y.length):1,p=g+i("-",d)+y,!0===S&&((d=g.length+d+y.length)>D[u]&&(D[u]=d),O[u]=d),k[u]=p;for(I.splice(1,0,k),M.splice(1,0,O),E=-1,P=I.length,f=[];++E<P;){for(k=I[E],O=M[E],u=-1,c=R,m=[];++u<c;)p=k[u]||"",g="",y="",!0===S&&(d=D[u]-(O[u]||0),114===(v=T[u])?g=i(" ",d):99===v?d%2==0?y=g=i(" ",d/2):(g=i(" ",d/2+.5),y=i(" ",d/2-.5)):y=i(" ",d)),!0===x&&0===u&&m.push("|"),!0===_&&(!1!==S||""!==p)&&(!0===x||0!==u)&&m.push(" "),!0===S&&m.push(g),m.push(p),!0===S&&m.push(y),!0===_&&m.push(" "),(!0===A||u!==c-1)&&m.push("|");m=m.join(""),!1===A&&(m=m.replace(n,"")),f.push(m)}return f.join(o)};var n=/ +$/,o=`
8`;function a(e){return e.length}function s(e){var t="string"==typeof e?e.charCodeAt(0):0;return 76===t||108===t?108:82===t||114===t?114:99*(67===t||99===t)}},77412(e){"use strict";e.exports=Math.abs},52418(e){"use strict";e.exports=Math.floor},19313(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},57958(e){"use strict";e.exports=Math.max},47384(e){"use strict";e.exports=Math.min},250(e){"use strict";e.exports=Math.pow},51844(e){"use strict";e.exports=Math.round},47279(e,t,r){"use strict";var i=r(19313);e.exports=function(e){return i(e)||0===e?e:e<0?-1:1}},74970(e,t,r){var i=r(59496);e.exports=function(){return function(e){return i(e,"list",function(e,t){var r,i,n=0;for(r=0,i=t.length;r<i;r++)"list"===t[r].type&&(n+=1);for(r=0,i=e.children.length;r<i;r++){var o=e.children[r];o.index=r,o.ordered=e.ordered}e.depth=n}),e}}},15769(e,t,r){"use strict";e.exports=function(e,t,r,i){var n,o;return"string"==typeof t||t&&"function"==typeof t.exec?o=[[t,r]]:(o=t,i=r),s(e,n=i||{},function e(t){var r=t[0];return function(i,o){var l,u,c,h,d=r[0],p=r[1],f=[],m=0,g=o.children.indexOf(i);for(d.lastIndex=0,u=d.exec(i.value);u&&(l=u.index,!1!==(h=p.apply(null,[].concat(u,{index:u.index,input:u.input})))&&(m!==l&&f.push({type:"text",value:i.value.slice(m,l)}),"string"==typeof h&&h.length>0&&(h={type:"text",value:h}),h&&(f=[].concat(f,h)),m=l+u[0].length),d.global);)u=d.exec(i.value);
8if(void 0===l?(f=[i],g--):(m<i.value.length&&f.push({type:"text",value:i.value.slice(m)}),f.unshift(g,1),a.apply(o.children,f)),t.length>1)for(c=e(t.slice(1)),l=-1;++l<f.length;)"text"===(i=f[l]).type?c(i,o):s(i,n,c);return g+f.length+1}}(function(e){var t,r,i=[];if("object"!=typeof e)throw Error("Expected array or object as schema");if("length"in e)for(r=-1;++r<e.length;)i.push([l(e[r][0]),u(e[r][1])]);else for(t in e)i.push([l(t),u(e[t])]);return i}(o))),e};var i=r(67343),n=r(85358),o=r(65962),a=[].splice;function s(e,t,r){var o=n(t.ignore||[]);return i(e,"text",function(e,t){for(var i,n,a=-1;++a<t.length;){if(o(i=t[a],n?n.children.indexOf(i):void 0,n))return;n=i}return r(e,n)}),[]}function l(e){return"string"==typeof e?RegExp(o(e),"g"):e}function u(e){return"function"==typeof e?e:function(){return e}}},10862(e,t,r){"use strict";e.exports=function(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),(function(e){var t=function(e,t){for(var r=-1;++r<t.length;)!function(e,t){var r,i;for(r in t)i=o.call(e,r)?e[r]:e[r]={},"canContainEols"===r||"transforms"===r?e[r]=[].concat(i,t[r]):Object.assign(i,t[r])}(e,t[r]);return e}({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:p(E),autolinkProtocol:b,autolinkEmail:b,atxHeading:p(S),blockQuote:p(function(){return{type:"blockquote",children:[]}}),characterEscape:b,characterReference:b,codeFenced:p(w),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:p(w,f),codeText:p(function(){return{type:"inlineCode",value:""}},f),codeTextData:b,data:b,codeFlowValue:b,definition:p(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:p(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:p(T),hardBreakTrailing:p(T),htmlFlow:p(C,f),htmlFlowData:b,htmlText:p(C,f),htmlTextData:b,image:p(function(){return{type:"image",title:null,url:"",alt:null}}),label:f,link:p(E),listItem:p(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){r.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=parseInt(this.sliceSerialize(e),10),r.expectingFirstListItemValue=void 0)},listOrdered:p(P,function(){r.expectingFirstListItemValue=!0}),listUnordered:p(P),paragraph:p(function(){return{type:"paragraph",children:[]}}),reference:function(){r.referenceType="collapsed"},referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:p(S),strong:p(function(){return{type:"strong",children:[]}}),thematicBreak:p(function(){return{type:"thematicBreak"}})},exit:{atxHeading:g(),atxHeadingSequence:function(e){this.stack[this.stack.length-1].depth||(this.stack[this.stack.length-1].depth=this.sliceSerialize(e).length)},autolink:g(),autolinkEmail:function(e){_.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){_.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:g(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:A,characterReferenceMarkerNumeric:A,characterReferenceValue:function(e){var t,i,n=this.sliceSerialize(e),o=r.characterReferenceType;o?(t=s(n,"characterReferenceMarkerNumeric"===o?10:16),r.characterReferenceType=void 0):t=h(n),i=this.stack.pop(),i.value+=t,i.position.end=c(e.end)},codeFenced:g(function(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),r.flowCodeInside=void 0}),codeFencedFence:function(){r.flowCodeInside||(this.buffer(),r.flowCodeInside=!0)},codeFencedFenceInfo:function(){var e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){var e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:_,codeIndented:g(function(){var e=this.resume();this.stack[this.stack.length-1].value=e}),codeText:g(function(){var e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:_,data:_,definition:g(),definitionDestinationString:function(){var e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=a(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){var e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:g(),hardBreakEscape:g(x),hardBreakTrailing:g(x),htmlFlow:g(function(){var e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:_,htmlText:g(function(){var e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:_,image:g(function(){var e=this.stack[this.stack.length-1];r.inReference?(e.type+="Reference",e.referenceType=r.referenceType||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),r.referenceType=void 0}),label:function(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,r.inReference=!0,"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t},labelText:function(e){this.stack[this.stack.length-2].identifier=a(this.sliceSerialize(e)).toLowerCase()},lineEnding:function(e){var i=this.stack[this.stack.length-1];if(r.atHardBreak){i.children[i.children.length-1].position.end=c(e.end),r.atHardBreak=void 0;return}!r.setextHeadingSlurpLineEnding&&t.canContainEols.indexOf(i.type)>-1&&(b.call(this,e),_.call(this,e))},link:g(function(){var e=this.stack[this.stack.length-1];r.inReference?(e.type+="Reference",e.referenceType=r.referenceType||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),r.referenceType=void 0}),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:function(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=a(this.sliceSerialize(e)).toLowerCase(),r.referenceType="full"},resourceDestinationString:function(){var e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){var e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){r.inReference=void 0},setextHeading:g(function(){r.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){r.setextHeadingSlurpLineEnding=!0},strong:g(),thematicBreak:g()}},(e||{}).mdastExtensions||[]),r={};return function(e){for(var r,i,a={type:"root",children:[]},s=[],h=[],p=-1,g={stack:[a],tokenStack:s,config:t,enter:m,exit:y,buffer:f,resume:v,setData:l,getData:u};++p<e.length;)("listOrdered"===e[p][1].type||"listUnordered"===e[p][1].type)&&("enter"===e[p][0]?h.push(p):p=function(e,t,r){for(var i,n,o,a,s,l,u,h=t-1,d=-1,p=!1;++h<=r;)if("listUnordered"===(s=e[h])[1].type||"listOrdered"===s[1].type||"blockQuote"===s[1].type?("enter"===s[0]?d++:d--,u=void 0):"lineEndingBlank"===s[1].type?"enter"
8===s[0]&&(!i||u||d||l||(l=h),u=void 0):"linePrefix"===s[1].type||"listItemValue"===s[1].type||"listItemMarker"===s[1].type||"listItemPrefix"===s[1].type||"listItemPrefixWhitespace"===s[1].type||(u=void 0),!d&&"enter"===s[0]&&"listItemPrefix"===s[1].type||-1===d&&"exit"===s[0]&&("listUnordered"===s[1].type||"listOrdered"===s[1].type)){if(i){for(n=h,o=void 0;n--;)if("lineEnding"===(a=e[n])[1].type||"lineEndingBlank"===a[1].type){if("exit"===a[0])continue;o&&(e[o][1].type="lineEndingBlank",p=!0),a[1].type="lineEnding",o=n}else if("linePrefix"===a[1].type||"blockQuotePrefix"===a[1].type||"blockQuotePrefixWhitespace"===a[1].type||"blockQuoteMarker"===a[1].type||"listItemIndent"===a[1].type);else break;l&&(!o||l<o)&&(i._spread=!0),i.end=c(o?e[o][1].start:s[1].end),e.splice(o||h,0,["exit",i,s[2]]),h++,r++}"listItemPrefix"===s[1].type&&(i={type:"listItem",_spread:!1,start:c(s[1].start)},e.splice(h,0,["enter",i,s[2]]),h++,r++,l=void 0,u=!0)}return e[t][1]._spread=p,r}(e,i=h.pop(p),p));for(p=-1;++p<e.length;)r=t[e[p][0]],o.call(r,e[p][1].type)&&r[e[p][1].type].call(n({sliceSerialize:e[p][2].sliceSerialize},g),e[p][1]);if(s.length)throw Error("Cannot close document, a token (`"+s[s.length-1].type+"`, "+d({start:s[s.length-1].start,end:s[s.length-1].end})+") is still open");for(a.position={start:c(e.length?e[0][1].start:{line:1,column:1,offset:0}),end:c(e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)a=t.transforms[p](a)||a;return a};function l(e,t){r[e]=t}function u(e){return r[e]}function c(e){return{line:e.line,column:e.column,offset:e.offset}}function p(e,t){return function(r){m.call(this,e(r),r),t&&t.call(this,r)}}function f(){this.stack.push({type:"fragment",children:[]})}function m(e,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push(t),e.position={start:c(t.start)},e}function g(e){return function(t){e&&e.call(this,t),y.call(this,t)}}function y(e){var t=this.stack.pop(),r=this.tokenStack.pop();if(r){if(r.type!==e.type)throw Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+d({start:r.start,end:r.end})+") is open")}else throw Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): it’s not open");return t.position.end=c(e.end),t}function v(){return i(this.stack.pop())}function b(e){var t=this.stack[this.stack.length-1].children,r=t[t.length-1];r&&"text"===r.type||((r={type:"text",value:""}).position={start:c(e.start)},this.stack[this.stack.length-1].children.push(r)),this.stack.push(r)}function _(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=c(e.end)}function x(){r.atHardBreak=!0}function A(e){r.characterReferenceType=e.type}function w(){return{type:"code",lang:null,meta:null,value:""}}function S(){return{type:"heading",depth:void 0,children:[]}}function T(){return{type:"break"}}function C(){return{type:"html",value:""}}function E(){return{type:"link",title:null,url:"",children:[]}}function P(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(r)(c(l(r).document().write(u()(e,t,!0))))};var i=r(83964),n=r(66095),o=r(73387),a=r(4843),s=r(32092),l=r(26892),u=r(49801),c=r(81484),h=r(37940),d=r(7899)},55685(e,t,r){"use strict";e.exports=r(10862)},94952(e,t,r){var i=r(95866),n=r(15769),o=r(37993),a=r(93504);function s(e){this.config.enter.autolinkProtocol.call(this,e)}function l(e,t,r,n,o){var a,s,l,u="";return!!c(o)&&(/^w/i.test(t)&&(r=t+r,t="",u="http://"),!((a=r.split(".")).length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))&&!!(s=function(e){var t,r,n,o=/[!"&'),.:;<>?\]}]+$/.exec(e);if(o)for(e=e.slice(0,o.index),t=(o=o[0]).indexOf(")"),r=i(e,"("),n=i(e,")");-1!==t&&r>n;)e+=o.slice(0,t+1),t=(o=o.slice(t+1)).indexOf(")"),n++;return[e,o]}(r+n))[0]&&(l={type:"link",title:null,url:u+t+s[0],children:[{type:"text",value:t+s[0]}]},s[1]&&(l=[l,{type:"text",value:s[1]}]),l))}
8function u(e,t,r,i){return!(!c(i,!0)||/[_-]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function c(e,t){var r=e.input.charCodeAt(e.index-1);return(r!=r||a(r)||o(r))&&(!t||47!==r)}t.transforms=[function(e){n(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/i,l],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/,u]],{ignore:["link","linkReference"]})}],t.enter={literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:s,literalAutolinkHttp:s,literalAutolinkWww:s},t.exit={literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e),this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}},1535(e,t){var r="phrasing",i=["autolink","link","image","label"];t.unsafe=[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:r,notInConstruct:i},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:r,notInConstruct:i},{character:":",before:"[ps]",after:"\\/",inConstruct:r,notInConstruct:i}]},80167(e,t){t.canContainEols=["delete"],t.enter={strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},t.exit={strikethrough:function(e){this.exit(e)}}},16592(e,t,r){var i=r(86878);function n(e,t,r){var n=r.enter("emphasis"),o=i(e,r,{before:"~",after:"~"});return n(),"~~"+o+"~~"}t.unsafe=[{character:"~",inConstruct:"phrasing"}],t.handlers={delete:n},n.peek=function(){return"~"}},83501(e,t){function r(e){this.exit(e)}function i(e){this.enter({type:"tableCell",children:[]},e)}function n(e,t){return"|"===t?t:e}t.enter={table:function(e){this.enter({type:"table",align:e._align,children:[]},e),this.setData("inTable",!0)},tableData:i,tableHeader:i,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},t.exit={codeText:function(e){var t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,n)),this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:r,tableHeader:r,tableRow:r}},72398(e,t,r){var i=r(86878),n=r(22127),o=r(49808);e.exports=function(e){var t=e||{},r=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=r?" ":"|";return{unsafe:[{character:`\r`,inConstruct:"tableCell"},{character:`
9`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,r){return c(function(e,t){for(var r=e.children,i=-1,n=r.length,o=[],a=t.enter("table");++i<n;)o[i]=h(r[i],t);return a(),o}(e,r),e.align)},tableRow:function(e,t,r){var i=c([h(e,r)]);return i.slice(0,i.indexOf(`
10`))},tableCell:u,inlineCode:function(e,t,r){var i=n(e,t,r);return -1!==r.stack.indexOf("tableCell")&&(i=i.replace(/\|/g,"\\$&")),i}}};function u(e,t,r){var n=r.enter("tableCell"),o=i(e,r,{before:l,after:l});return n(),o}function c(e,t){return o(e,{align:t,alignDelimiters:a,padding:r,stringLength:s})}function h(e,t){for(var r=e.children,i=-1,n=r.length,o=[],a=t.enter("tableRow");++i<n;)o[i]=u(r[i],e,t);return a(),o}}},98235(e,t){function r(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}t.exit={taskListCheckValueChecked:r,taskListCheckValueUnchecked:r,paragraph:function(e){var t,r=this.stack[this.stack.length-2],i=this.stack[this.stack.length-1],n=r.children,o=i.children[0],a=-1;if(r&&"listItem"===r.type&&"boolean"==typeof r.checked&&o&&"text"===o.type){for(;++a<n.length;)if("paragraph"===n[a].type){t=n[a];break}t===i&&(o.value=o.value.slice(1),0===o.value.length?i.children.shift():(o.position.start.column++,o.position.start.offset++,i.position.start=Object.assign({},o.position.start)))}this.exit(e)}}},71388(e,t,r){var i=r(71414);t.unsafe=[{atBreak:!0,character:"-",after:"[:|-]"}],t.handlers={listItem:function(e,t,r){var n=i(e,t,r),o=e.children[0];return"boolean"==typeof e.checked&&o&&"paragraph"===o.type&&(n=n.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(t){return t+"["+(e.checked?"x":" ")+"] "})),n}}},45121(e,t,r){var i=r(94952),n=r(80167),o=r(83501),a=r(98235),s={}.hasOwnProperty;e.exports=function(e){for(var t={transforms:[],canContainEols:[]}
10,r=e.length,i=-1;++i<r;)!function(e,t){var r,i,n;for(r in t)i=s.call(e,r)?e[r]:e[r]={},n=t[r],"canContainEols"===r||"transforms"===r?e[r]=[].concat(i,n):Object.assign(i,n)}(t,e[i]);return t}([i,n,o,a])},62330(e,t,r){var i=r(1535),n=r(16592),o=r(72398),a=r(71388),s=r(65239);e.exports=function(e){var t=s({handlers:{},join:[],unsafe:[],options:{}},{extensions:[i,n,o(e),a]});return Object.assign(t.options,{handlers:t.handlers,join:t.join,unsafe:t.unsafe})}},65239(e){e.exports=function e(t,r){var i,n=-1;if(r.extensions)for(;++n<r.extensions.length;)e(t,r.extensions[n]);for(i in r)"extensions"===i||("unsafe"===i||"join"===i?t[i]=t[i].concat(r[i]||[]):"handlers"===i?t[i]=Object.assign(t[i],r[i]||{}):t.options[i]=r[i]);return t}},22127(e,t,r){e.exports=n,n.peek=function(){return"`"};var i=r(47402);function n(e,t,r){for(var n,o,a,s,l=e.value||"",u="`",c=-1;RegExp("(^|[^`])"+u+"([^`]|$)").test(l);)u+="`";for(/[^ \r\n]/.test(l)&&(/[ \r\n`]/.test(l.charAt(0))||/[ \r\n`]/.test(l.charAt(l.length-1)))&&(l=" "+l+" ");++c<r.unsafe.length;)if((n=r.unsafe[c]).atBreak)for(o=i(n);a=o.exec(l);)s=a.index,10===l.charCodeAt(s)&&13===l.charCodeAt(s-1)&&s--,l=l.slice(0,s)+" "+l.slice(a.index+1);return u+l+u}},71414(e,t,r){e.exports=function(e,t,r){var l,u,c,h=n(r),d=o(r);return t&&t.ordered&&(h=(t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+"."),l=h.length+1,("tab"===d||"mixed"===d&&(t&&t.spread||e.spread))&&(l=4*Math.ceil(l/4)),c=r.enter("listItem"),u=s(a(e,r),function(e,t,r){return t?(r?"":i(" ",l))+e:(r?h:h+i(" ",l-h.length))+e}),c(),u};var i=r(96210),n=r(16085),o=r(19844),a=r(90952),s=r(26066)},16085(e){e.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}},19844(e){e.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}},90952(e,t,r){e.exports=function(e,t){for(var r,n=e.children||[],o=[],a=-1;++a<n.length;)r=n[a],o.push(t.handle(r,e,t,{before:`
11`,after:`
12`})),a+1<n.length&&o.push(function(r,n){for(var o,a=-1;++a<t.join.length&&!0!==(o=t.join[a](r,n,e,t))&&1!==o;){if("number"==typeof o)return i(`
13`,1+Number(o));if(!1===o)return`
14
15<!---->
16
17`}return`
18
19`}(r,n[a+1]));return o.join("")};var i=r(96210)},86878(e){e.exports=function(e,t,r){for(var i,n,o,a=e.children||[],s=[],l=-1,u=r.before;++l<a.length;)o=a[l],l+1<a.length?((n=t.handle.handlers[a[l+1].type])&&n.peek&&(n=n.peek),i=n?n(a[l+1],e,t,{before:"",after:""}).charAt(0):""):i=r.after,s.length>0&&(`\r`===u||`
20`===u)&&"html"===o.type&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),u=" "),s.push(t.handle(o,e,t,{before:u,after:i})),u=s[s.length-1].slice(-1);return s.join("")}},26066(e){e.exports=function(e,r){for(var i,n=[],o=0,a=0;i=t.exec(e);)s(e.slice(o,i.index)),n.push(i[0]),o=i.index+i[0].length,a++;return s(e.slice(o)),n.join("");function s(e){n.push(r(e,a,!e))}};var t=/\r?\n|\r/g},47402(e){e.exports=function(e){var t,r;return e._compiled||(t=e.before?"(?:"+e.before+")":"",r=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(r||""),"g")),e._compiled}},83964(e){"use strict";function t(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var r=[],i=-1;++i<e.length;)r[i]=t(e[i]);return r.join("")}e.exports=t},6047(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>o});var i=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function n(e,t){if(e.length!==t.length)return!1;for(var r,n,o=0;o<e.length;o++)if(!((r=e[o])===(n=t[o])||i(r)&&i(n))&&1)return!1;return!0}let o=function(e,t){void 0===t&&(t=n);var r,i,o=[],a=!1;return function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return a&&r===this&&t(n,o)||(i=e.apply(this,n),a=!0,r=this,o=n),i}}},43560(e,t,r){e.exports=r(50765)},50765(e,t,r){var i=r(7565),n=r(15166),o=r(58404),a=r(37853),s=r(37993),l=r(93504),u={tokenize:function(e,t,r){return function(t){return e.consume(t),i};function i(t){return 87===t||t-32==87?(e.consume(t),n):r(t)}function n(t){return 87===t||t-32==87?(e.consume(t),o):r(t)}function o(t){return 46===t?(e.consume(t),s):r(t)}function s(e){return null===e||a(e)?r(e):t(e)}},partial:!0},c={tokenize:function(e,t,r){var i,n;return a;function a(t){return 38===t?e.check(p,c,u)(t):46===t||95===t?e.check(d,c,u)(t):o(t)||l(t)||45!==t&&s(t)?c(t):(e.consume(t),a)}function u(t){return 46===t?(n=i,i=void 0):95===t&&(i=!0),e.consume(t),a}function c(e){return n||i?r(e):t(e)}},partial:!0},h={tokenize:function(e,t){var r=0;return i;function i(a){return 38===a?e.check(p,t,n)(a):(40===a&&r++,41===a)?e.check(d,o,n)(a):_(a)?t(a):b(a)?e.check(d,t,n)(a):(e.consume(a),i)}function n(t){return e.consume(t),i}function o(e){return--r<0?t(e):n(e)}},partial:!0},d={tokenize:function(e,t,r){return function(t){return e.consume(t),i};function i(n){return b(n)?(e.consume(n),i):_(n)?t(n):r(n)}},partial:!0},p={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return i(t)?(e.consume(t),n):59===t?(e.consume(t),o):r(t)}function o(e){return _(e)?t(e):r(e)}},partial:!0},f={tokenize:function(e,t,r){var i=this;return function(t){return 87!==t&&t-32!=87||!A(i.previous)||T(i.events)?r(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(u,e.attempt(c,e.attempt(h,n),r),r)(t))};function n(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:A},m={tokenize:function(e,t,r){var i=this;return function(t){return 72!==t&&t-32!=72||!w(i.previous)||T(i.events)?r(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),n)};function n(t){return 84===t||t-32==84?(e.consume(t),a):r(t)}function a(t){return 84===t||t-32==84?(e.consume(t),u):r(t)}function u(t){return 80===t||t-32==80?(e.consume(t),d):r(t)}function d(t){return 83===t||t-32==83?(e.consume(t),p):p(t)}function p(t){return 58===t?(e.consume(t),f):r(t)}function f(t){return 47===t?(e.consume(t),m):r(t)}function m(t){return 47===t?(e.consume(t),g):r(t)}function g(t){return o(t)||l(t)||s(t)?r(t):e.attempt(c,e.attempt(h,y),r)(t)}function y(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:w},g={tokenize:function(e,t,r){var i,o=this;return function(t){return!x(t)||!S(o.previous)||T(o.events)?r(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(i){return x(i)?(e.consume(i),t):64===i?(e.consume(i),a):r(i)}(t))};function a(t){return 46===t?e.check(d,c,s)(t):45===t||95===t?e.check(d,r,l)(t):n(t)?(e.consume(t),a):c(t)}function s(t){return e.consume(t),i=!0,a}function l(t){return e.consume(t),u}function u(t){return 46===t?e.check(d,r,s)(t):a(t)}function c(n){return i?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:S},y={};t.text=y;for(var v=48;v<123;)y[v]=g,58==++v?v=65:91===v&&(v=97);function b(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function _(e){return null===e||e<0||32===e||60===e}function x(e){return 43===e||45===e||46===e||95===e||n(e)}function A(e){return null===e||e<0||32===e||40===e||42===e||95===e||126===e}function w(e){return null===e||!i(e)}function S(e){return 47!==e&&w(e)}function T(e){for(var t=e.length;t--;)if(("labelLink"===e[t][1].type||"labelImage"===e[t][1].type)&&!e[t][1]._balanced)return!0}y[43]=g,y[45]=g,y[46]=g,y[95]=g,y[72]=[g,m],y[104]=[g,m],y[87]=[g,f],y[119]=[g,f]},58813(e,t,r){e.exports=function(e){var t=(e||{}).singleTilde,r={tokenize:function(e,r,n){var o=this.previous,a=this.events,s=0;return function(l){return 126!==l||126===o&&"characterEscape"!==a[a.length-1][1].type?n(l):(e.enter("strikethroughSequenceTemporary"),function a(l){var u,c,h=i(o);return 126===l?s>1?n(l):(e.consume(l),s++,a):s<2&&!t?n(l):((u=e.exit("strikethroughSequenceTemporary"))._open=!(c=i(l))||2===c&&h,u._close=!h||2===h&&c,r(l))}(l))}},resolveAll:function(e,t){for(var r,i,s,l,u=-1;++u<e.length;)if("enter"===e[u][0]&&"strikethroughSequenceTemporary"===e[u][1].type&&e[u][1]._close){for(s=u;s--;)if("exit"===e[s][0]&&"strikethroughSequenceTemporary"===e[s][1].type&&e[s][1]._open&&e[u][1].end.offset-e[u][1].start.offset==e[s][1].end.offset-e[s][1].start.offset){e[u][1].type="strikethroughSequence",e[s][1].type="strikethroughSequence",r={type:"strikethrough",start:a(e[s][1].start),end:a(e[u][1].end)},i={type:"strikethroughText",start:a(e[s][1].end),end:a(e[u][1].start)},n(l=[["enter",r,t],["enter",e[s][1],t],["exit",e[s][1],t],["enter",i,t]],l.length,0,o(t.parser.constructs.insideSpan.null,e.slice(s+1,u),t)),n(l,l.length,0,[["exit",i,t],["enter",e[u][1],t],["exit",e[u][1],t],["exit",r,t]]),n(e,s-1,u-s+3,l),u=s+l.length-2;break}}for(var c=-1,h=e.length;++c<h;)"strikethroughSequenceTemporary"===e[c][1].type&&(e[c][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:r}}};var i=r(70526),n=r(9057),o=r(10606),a=r(55852)},7903(e,t,r){e.exports=r(82812)},82812(e,t,r){t.flow={null:{tokenize:function(e,t,r){var a,s,l=[],u=0;return function(t){return null===t||-5===t||-4===t||-3===t?r(t):(e.enter("table")._align=l,e.enter("tableHead"),e.enter("tableRow"),124===t)?c(t):(u++,e.enter("temporaryTableCellContent"),p(t))};function c(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,h}function h(t){return null===t||-5===t||-4===t||-3===t?null===t?r(t):(e.exit("tableRow"),e.exit("tableHead"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e.check(n,r,i(e,m,"linePrefix",4))):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),d):(a&&(a=void 0,u++),124===t)?c(t):(e.enter("temporaryTableCellContent"),p(t))}function d(t){return -2===t||-1===t||32===t?(e.consume(t),d):(e.exit("whitespace"),h(t))}function p(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),h(t)):(e.consume(t),92===t?f:p)}function f(t){return 92===t||124===t?(e.consume(t),p):p(t)}function m(t){return null===t||t<0||32===t?r(t):(e.enter("tableDelimiterRow"),g(t))}function g(t){return null===t||-5===t||-4===t||-3===t?x(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),y):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,l.push(null),v):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l.push("left"),b):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),g):r(t)}function y(t){return -2===t||-1===t||32===t?(e.consume(t),y):(e.exit("whitespace"),g(t))}function v(t){return 45===t?(e.consume(t),v):(e.exit("tableDelimiterFiller"),58===t)?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l[l.length-1]="left"===l[l.length-1]?"center":"right",_):g(t)}
20function b(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,v):r(t)}function _(t){return null===t||-5===t||-4===t||-3===t?x(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),y):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),g):r(t)}function x(t){return(e.exit("tableDelimiterRow"),s&&u===l.length)?null===t?A(t):e.check(o,A,w)(t):r(t)}function A(r){return e.exit("table"),t(r)}function w(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,S,"linePrefix",4)}function S(t){return e.enter("tableBody"),T(t)}function T(t){return(e.enter("tableRow"),124===t)?C(t):(e.enter("temporaryTableCellContent"),I(t))}function C(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),E}function E(t){return null===t||-5===t||-4===t||-3===t?(e.exit("tableRow"),null===t)?k(t):e.check(o,k,O)(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),P):124===t?C(t):(e.enter("temporaryTableCellContent"),I(t))}function P(t){return -2===t||-1===t||32===t?(e.consume(t),P):(e.exit("whitespace"),E(t))}function I(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),E(t)):(e.consume(t),92===t?M:I)}function M(t){return 92===t||124===t?(e.consume(t),I):I(t)}function k(t){return e.exit("tableBody"),A(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,T,"linePrefix",4)}},resolve:function(e,t){for(var r,i,n,o,a,s,l,u,c,h,d=e.length,p=-1;++p<d;)r=e[p][1],o&&("temporaryTableCellContent"===r.type&&(u=u||p,c=p),("tableCellDivider"===r.type||"tableRow"===r.type)&&c&&(l={type:"chunkText",start:(s={type:"tableContent",start:e[u][1].start,end:e[c][1].end}).start,end:s.end,contentType:"text"},e.splice(u,c-u+1,["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]),p-=c-u-3,d=e.length,u=void 0,c=void 0)),"exit"===e[p][0]&&h&&h+1<p&&("tableCellDivider"===r.type||"tableRow"===r.type&&(h+3<p||"whitespace"!==e[h][1].type))&&(a={type:n?"tableDelimiter":i?"tableHeader":"tableData",start:e[h][1].start,end:e[p][1].end},e.splice(p+ +("tableCellDivider"===r.type),0,["exit",a,t]),e.splice(h,0,["enter",a,t]),p+=2,d=e.length,h=p+1),"tableRow"===r.type&&(o="enter"===e[p][0])&&(h=p+1),"tableDelimiterRow"===r.type&&(n="enter"===e[p][0])&&(h=p+1),"tableHead"===r.type&&(i="enter"===e[p][0]);return e},interruptible:!0}};var i=r(34408),n={tokenize:function(e,t,r){return function(i){return 45!==i?r(i):(e.enter("setextUnderline"),function i(n){return 45===n?(e.consume(n),i):function i(n){return -2===n||-1===n||32===n?(e.consume(n),i):null===n||-5===n||-4===n||-3===n?t(n):r(n)}(n)}(i))}},partial:!0},o={tokenize:function(e,t,r){var i=0;return function(t){return e.enter("check"),e.consume(t),n};function n(o){return -1===o||32===o?(e.consume(o),4==++i?t:n):null===o||o<0?t(o):r(o)}},partial:!0}},60926(e,t,r){e.exports=r(7379)},7379(e,t,r){var i=r(95964),n=r(34408),o=r(68170);function a(e,t,r){var a=this;return n(e,function(e){return o(a.events,"whitespace")&&null!==e&&!i(e)?t(e):r(e)},"whitespace")}t.text={91:{tokenize:function(e,t,r){var i=this;return function(t){return 91===t&&null===i.previous&&i._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),n):r(t)};function n(t){return -2===t||32===t?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):r(t)}function o(i){return 93===i?(e.enter("taskListCheckMarker"),e.consume(i),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:a},t,r)):r(i)}}}}},15122(e,t,r){e.exports=r(29991)},29991(e,t,r){var i=r(43780),n=r(43560),o=r(58813),a=r(7903),s=r(60926);e.exports=function(e){return i([n,o(e),a,s])}},7565(e,t,r){"use strict";e.exports=r(28078)(/[A-Za-z]/)},15166(e,t,r){"use strict";e.exports=r(28078)(/[\dA-Za-z]/)},26397(e,t,r){"use strict";e.exports=r(28078)(/[#-'*+\--9=?A-Z^-~]/)},58404(e){"use strict";e.exports=function(e){return e<32||127===e}},80220(e,t,r){"use strict";e.exports=r(28078)(/\d/)},76732(e,t,r){"use strict";e.exports=r(28078)(/[\dA-Fa-f]/)},60105(e,t,r){"use strict";e.exports=r(28078)(/[!-/:-@[-`{-~]/)},95964(e){"use strict";e.exports=function(e){return e<0||32===e}},37853(e){"use strict";e.exports=function(e){return e<-2}},52365(e){"use strict";e.exports=function(e){return -2===e||-1===e||32===e}},37993(e,t,r){"use strict";var i=r(50576);e.exports=r(28078)(i)},93504(e,t,r){"use strict";e.exports=r(28078)(/\s/)},66095(e){"use strict";e.exports=Object.assign},44961(e){"use strict";e.exports=String.fromCharCode},73387(e){"use strict";e.exports=({}).hasOwnProperty},48266(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},70313(e){"use strict";e.exports=["pre","script","style","textarea"]},68082(e){"use strict";e.exports=[].splice},50576(e){"use strict";e.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/},66621(e,t,r){"use strict";
20Object.defineProperty(t,"__esModule",{value:!0});var i=r(51355),n=r(3139),o=r(25774),a=r(78745),s=r(14324),l=r(38682),u=r(87630),c=r(69754),h=r(58698),d=r(81884),p=r(16624),f=r(20337),m=r(7561),g=r(26650),y=r(34119),v=r(68810),b=r(87467),_=r(25311),x=r(65405),A=r(74235),w=r(22284),S={null:[n,i.resolver]};t.contentInitial={91:d},t.disable={null:[]},t.document={42:x,43:x,45:x,48:x,49:x,50:x,51:x,52:x,53:x,54:x,55:x,56:x,57:x,62:a},t.flow={35:f,42:w,45:[A,w],60:m,61:A,95:w,96:u,126:u},t.flowInitial={"-2":c,"-1":c,32:c},t.insideSpan=S,t.string={38:l,92:s},t.text={"-5":_,"-4":_,"-3":_,33:v,38:l,42:n,60:[o,g],91:b,92:[p,s],93:y,95:n,96:h}},70123(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(37853),n=r(34408);t.tokenize=function(e){var t,r=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n(e,r,"linePrefix"))},function(r){return e.enter("paragraph"),function r(n){var o=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=o),t=o,function t(n){if(null===n){e.exit("chunkText"),e.exit("paragraph"),e.consume(n);return}return i(n)?(e.consume(n),e.exit("chunkText"),r):(e.consume(n),t)}(n)}(r)});return r}},29361(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(37853),n=r(34408),o=r(3306),a={tokenize:function(e,t,r){return n(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},s={tokenize:function(e,t,r){return n(e,e.lazy(this.parser.constructs.flow,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};t.tokenize=function(e){var t,r,n,l=this,u=[],c=0,h={tokenize:function(e,i){var n=0;return t={},c;function c(i){return n<u.length?(l.containerState=u[n][1],e.attempt(u[n][0].continuation,h,d)(i)):r.currentConstruct&&r.currentConstruct.concrete?(t.flowContinue=!0,m(i)):(l.interrupt=r.currentConstruct&&r.currentConstruct.interruptible,l.containerState={},e.attempt(a,f,m)(i))}function h(e){return n++,l.containerState._closeFlow?f(e):c(e)}function d(t){return r.currentConstruct&&r.currentConstruct.lazy?(l.containerState={},e.attempt(a,f,e.attempt(s,f,e.check(o,f,p)))(t)):f(t)}function p(e){return n=u.length,t.lazy=!0,t.flowContinue=!0,m(e)}function f(e){return t.flowEnd=!0,m(e)}function m(e){return t.continued=n,l.interrupt=l.containerState=void 0,i(e)}},partial:!0};return d;function d(t){return c<u.length?(l.containerState=u[c][1],e.attempt(u[c][0].continuation,p,f)(t)):f(t)}function p(e){return c++,d(e)}function f(i){return t&&t.flowContinue?g(i):(l.interrupt=r&&r.currentConstruct&&r.currentConstruct.interruptible,l.containerState={},e.attempt(a,m,g)(i))}function m(e){return u.push([l.currentConstruct,l.containerState]),l.containerState=void 0,f(e)}function g(t){if(null===t){b(0,!0),e.consume(t);return}return r=r||l.parser.flow(l.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:r}),function t(r){return null===r?(v(e.exit("chunkFlow")),g(r)):i(r)?(e.consume(r),v(e.exit("chunkFlow")),e.check(h,y)):(e.consume(r),t)}(t)}function y(e){return b(t.continued,t&&t.flowEnd),c=0,d(e)}function v(e){n&&(n.next=e),n=e,r.lazy=t&&t.lazy,r.defineSkip(e.start),r.write(l.sliceStream(e))}function b(t,i){var o=u.length;for(r&&i&&(r.write([null]),n=r=void 0);o-- >t;)l.containerState=u[o][1],u[o][0].exit.call(l,e);u.length=t}}},53348(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(58148),n=r(34408),o=r(3306);t.tokenize=function(e){var t=this,r=e.attempt(o,function(i){return null===i?void e.consume(i):(e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r)},e.attempt(this.parser.constructs.flowInitial,a,n(e,e.attempt(this.parser.constructs.flow,a,e.attempt(i,a)),"linePrefix")));return r;function a(i){return null===i?void e.consume(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r)}}},51355(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(66095),n=r(55852),o=s("text"),a=s("string");function s(e){return{tokenize:function(t){var r=this,i=this.parser.constructs[e],n=t.attempt(i,o,a);return o;function o(e){return l(e)?n(e):a(e)}function a(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),s)}function s(e){return l(e)?(t.exit("data"),n(e)):(t.consume(e),s)}function l(e){var t=i[e],n=-1;
20if(null===e)return!0;if(t){for(;++n<t.length;)if(!t[n].previous||t[n].previous.call(r,r.previous))return!0}}},resolveAll:l("text"===e?u:void 0)}}function l(e){return function(t,r){for(var i,n=-1;++n<=t.length;)void 0===i?t[n]&&"data"===t[n][1].type&&(i=n,n++):t[n]&&"data"===t[n][1].type||(n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),n=i+2),i=void 0);return e?e(t,r):t}}function u(e,t){for(var r,o,a,s,l,u,c,h,d=-1;++d<=e.length;)if((d===e.length||"lineEnding"===e[d][1].type)&&"data"===e[d-1][1].type){for(o=e[d-1][1],s=(r=t.sliceStream(o)).length,l=-1,u=0,c=void 0;s--;)if("string"==typeof(a=r[s])){for(l=a.length;32===a.charCodeAt(l-1);)u++,l--;if(l)break;l=-1}else if(-2===a)c=!0,u++;else if(-1===a);else{s++;break}u&&(h={type:d===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-u,offset:o.end.offset-u,_index:o.start._index+s,_bufferIndex:s?l:o.start._bufferIndex+l},end:n(o.end)},o.end=n(h.start),o.start.offset===o.end.offset?i(o,h):(e.splice(d,0,["enter",h,t],["exit",h,t]),d+=2)),d++}return e}t.resolver={resolveAll:l()},t.string=a,t.text=o},26892(e,t,r){"use strict";var i=r(70123),n=r(29361),o=r(53348),a=r(51355),s=r(43780),l=r(19954),u=r(49634),c=r(66621);e.exports=function(e){var t={defined:[],constructs:s([c].concat(u((e||{}).extensions))),content:r(i),document:r(n),flow:r(o),string:r(a.string),text:r(a.text)};return t;function r(e){return function(r){return l(t,e,r)}}}},81484(e,t,r){"use strict";var i=r(46215);e.exports=function(e){for(;!i(e););return e}},49801(e){"use strict";var t=/[\0\t\n\r]/g;e.exports=function(){var e,r=!0,i=1,n="";return function(o,a,s){var l,u,c,h,d,p=[];for(o=n+o.toString(a),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(t.lastIndex=c,h=(l=t.exec(o))?l.index:o.length,d=o.charCodeAt(h),!l){n=o.slice(c);break}if(10===d&&c===h&&e)p.push(-3),e=void 0;else if(e&&(p.push(-5),e=void 0),c<h&&(p.push(o.slice(c,h)),i+=h-c),0===d)p.push(65533),i++;else if(9===d)for(u=4*Math.ceil(i/4),p.push(-2);i++<u;)p.push(-1);else 10===d?p.push(-4):e=!0,i=1;c=h+1}return s&&(e&&p.push(-5),n&&p.push(n),p.push(null)),p}}},3139(e,t,r){"use strict";var i=r(41025),n=r(9057),o=r(70526),a=r(25980),s=r(10606),l=r(55852);e.exports={name:"attention",tokenize:function(e,t){var r,i=o(this.previous);return function(n){return e.enter("attentionSequence"),r=n,function n(a){var s,l,u,c;return a===r?(e.consume(a),n):(s=e.exit("attentionSequence"),u=!(l=o(a))||2===l&&i,c=!i||2===i&&l,s._open=42===r?u:u&&(i||!c),s._close=42===r?c:c&&(l||!u),t(a))}(n)}},resolveAll:function(e,t){for(var r,o,u,c,h,d,p,f,m=-1;++m<e.length;)if("enter"===e[m][0]&&"attentionSequence"===e[m][1].type&&e[m][1]._close){for(r=m;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[m][1]).charCodeAt(0)){if((e[r][1]._close||e[m][1]._open)&&(e[m][1].end.offset-e[m][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[m][1].end.offset-e[m][1].start.offset)%3))continue;c={type:(d=e[r][1].end.offset-e[r][1].start.offset>1&&e[m][1].end.offset-e[m][1].start.offset>1?2:1)>1?"strongSequence":"emphasisSequence",start:a(l(e[r][1].end),-d),end:l(e[r][1].end)},h={type:d>1?"strongSequence":"emphasisSequence",start:l(e[m][1].start),end:a(l(e[m][1].start),d)},u={type:d>1?"strongText":"emphasisText",start:l(e[r][1].end),end:l(e[m][1].start)},o={type:d>1?"strong":"emphasis",start:l(c.start),end:l(h.end)},e[r][1].end=l(c.start),e[m][1].start=l(h.end),p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=i(p,[["enter",e[r][1],t],["exit",e[r][1],t]])),p=i(p,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",u,t]]),p=i(p,s(t.parser.constructs.insideSpan.null,e.slice(r+1,m),t)),p=i(p,[["exit",u,t],["enter",h,t],["exit",h,t],["exit",o,t]]),e[m][1].end.offset-e[m][1].start.offset?(f=2,p=i(p,[["enter",e[m][1],t],["exit",e[m][1],t]])):f=0,n(e,r-1,m-r+3,p),m=r+p.length-f-2;break}}for(m=-1;++m<e.length;)"attentionSequence"===e[m][1].type&&(e[m][1].type="data");return e}}},25774(e,t,r){"use strict";var i=r(7565),n=r(15166),o=r(26397),a=r(58404);e.exports={name:"autolink",tokenize:function(e,t,r){var s=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return i(t)?(e.consume(t),u):o(t)?h(t):r(t)}function u(t){return 43===t||45===t||46===t||n(t)?function t(r){return 58===r?(e.consume(r),c):(43===r||45===r||46===r||n(r))&&s++<32?(e.consume(r),t):h(r)}(t):h(t)}function c(t){return 62===t?(e.exit("autolinkProtocol"),p(t)):32===t||60===t||a(t)?r(t):(e.consume(t),c)}function h(t){return 64===t?(e.consume(t),s=0,d):o(t)?(e.consume(t),h):r(t)}function d(t){return n(t)?function t(i){return 46===i?(e.consume(i),s=0,d):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",p(i)):function i(o){return(45===o||n(o))&&s++<63?(e.consume(o),45===o?i:t):r(o)}(i)}(t):r(t)}function p(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}}},78745(e,t,r){"use strict";var i=r(52365),n=r(34408),o={name:"blockQuote",tokenize:function(e,t,r){var n=this;return function(t){return 62===t?(n.containerState.open||(e.enter("blockQuote",{_container:!0}),n.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o):r(t)};function o(r){return i(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return n(e,e.attempt(o,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};e.exports=o},14324(e,t,r){"use strict";var i=r(60105);e.exports={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return i(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}}},38682(e,t,r){"use strict";var i=r(37940),n=r(15166),o=r(80220),a=r(76732),s=i&&"object"==typeof i&&"default"in i?i:{default:i};e.exports={name:"characterReference",tokenize:function(e,t,r){var i,l,u=this,c=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),h};function h(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),i=31,l=n,p(t))}function d(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,l=a,p):(e.enter("characterReferenceValue"),i=7,l=o,p(t))}function p(o){var a;return 59===o&&c?(a=e.exit("characterReferenceValue"),l!==n||s.default(u.sliceSerialize(a)))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(o):l(o)&&c++<i?(e.consume(o),p):r(o)}}}},87630(e,t,r){"use strict";var i=r(37853),n=r(95964),o=r(68170),a=r(34408);e.exports={name:"codeFenced",tokenize:function(e,t,r){var s,l=this,u={tokenize:function(e,t,r){var n=0;
20return a(e,function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===s?(e.consume(i),n++,t):n<h?r(i):(e.exit("codeFencedFenceSequence"),a(e,o,"whitespace")(i))}(t)},"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function o(n){return null===n||i(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0},c=o(this.events,"linePrefix"),h=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s=t,function t(i){return i===s?(e.consume(i),h++,t):(e.exit("codeFencedFenceSequence"),h<3?r(i):a(e,d,"whitespace")(i))}(t)};function d(t){return null===t||i(t)?f(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||n(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),a(e,p,"whitespace")(i)):96===i&&i===s?r(i):(e.consume(i),t)}(t))}function p(t){return null===t||i(t)?f(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(n){return null===n||i(n)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(n)):96===n&&n===s?r(n):(e.consume(n),t)}(t))}function f(r){return e.exit("codeFencedFence"),l.interrupt?t(r):function t(r){return null===r?m(r):i(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(u,m,c?a(e,t,"linePrefix",c+1):t)):(e.enter("codeFlowValue"),function r(n){return null===n||i(n)?(e.exit("codeFlowValue"),t(n)):(e.consume(n),r)}(r))}(r)}function m(r){return e.exit("codeFenced"),t(r)}},concrete:!0}},69754(e,t,r){"use strict";var i=r(37853),n=r(9057),o=r(68170),a=r(34408),s={tokenize:function(e,t,r){var n=this;return a(e,function s(l){return i(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a(e,s,"linePrefix",5)):4>o(n.events,"linePrefix")?r(l):t(l)},"linePrefix",5)},partial:!0};e.exports={name:"codeIndented",tokenize:function(e,t,r){return e.attempt(s,function r(n){return null===n?t(n):i(n)?e.attempt(s,r,t)(n):(e.enter("codeFlowValue"),function t(n){return null===n||i(n)?(e.exit("codeFlowValue"),r(n)):(e.consume(n),t)}(n))},r)},resolve:function(e,t){var r={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return n(e,0,0,[["enter",r,t]]),n(e,e.length,0,[["exit",r,t]]),e}}},58698(e,t,r){"use strict";var i=r(37853);e.exports={name:"codeText",tokenize:function(e,t,r){var n,o,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(r){return 96===r?(e.consume(r),a++,t):(e.exit("codeTextSequence"),s(r))}(t)};function s(u){return null===u?r(u):96===u?(o=e.enter("codeTextSequence"),n=0,function r(i){return 96===i?(e.consume(i),n++,r):n===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(i)):(o.type="codeTextData",l(i))}(u)):32===u?(e.enter("space"),e.consume(u),e.exit("space"),s):i(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(u))}function l(t){return null===t||32===t||96===t||i(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}},resolve:function(e){var t,r,i=e.length-4,n=3;if(("lineEnding"===e[3][1].type||"space"===e[n][1].type)&&("lineEnding"===e[i][1].type||"space"===e[i][1].type)){for(t=n;++t<i;)if("codeTextData"===e[t][1].type){e[i][1].type=e[n][1].type="codeTextPadding",n+=2,i-=2;break}}for(t=n-1,i++;++t<=i;)void 0===r?t!==i&&"lineEnding"!==e[t][1].type&&(r=t):(t===i||"lineEnding"===e[t][1].type)&&(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),i-=t-r-2,t=r+2),r=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}}},58148(e,t,r){"use strict";var i=r(37853),n=r(68170),o=r(46215),a=r(34408),s={tokenize:function(e,t,r){var o=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a(e,s,"linePrefix")};function s(a){return null===a||i(a)?r(a):o.parser.constructs.disable.null.indexOf("codeIndented")>-1||4>n(o.events,"linePrefix")?e.interrupt(o.parser.constructs.flow,r,t)(a):t(a)}},partial:!0};e.exports={tokenize:function(e,t){var r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?o(t):i(t)?e.check(s,a,o)(t):(e.consume(t),n)}function o(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function a(t){return e.consume(t),e.exit("chunkContent"),r=r.next=e.enter("chunkContent",{contentType:"content",previous:r}),n}},resolve:function(e){return o(e),e},interruptible:!0,lazy:!0}},81884(e,t,r){"use strict";var i=r(37853),n=r(95964),o=r(4843),a=r(88942),s=r(7516),l=r(34408),u=r(36113),c=r(4932),h={tokenize:function(e,t,r){return function(t){return n(t)?u(e,o)(t):r(t)};function o(t){return 34===t||39===t||40===t?c(e,l(e,a,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function a(e){return null===e||i(e)?t(e):r(e)}},partial:!0};e.exports={name:"definition",tokenize:function(e,t,r){var n,c=this;return function(t){return e.enter("definition"),s.call(c,e,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function d(t){return(n=o(c.sliceSerialize(c.events[c.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),u(e,a(e,e.attempt(h,l(e,p,"whitespace"),l(e,p,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function p(o){return null===o||i(o)?(e.exit("definition"),0>c.parser.defined.indexOf(n)&&c.parser.defined.push(n),t(o)):r(o)}}}},88942(e,t,r){"use strict";var i=r(58404),n=r(95964),o=r(37853);e.exports=function(e,t,r,a,s,l,u,c,h){var d=h||1/0,p=0;return function(t){return 60===t?(e.enter(a),e.enter(s),e.enter(l),e.consume(t),e.exit(l),f):i(t)||41===t?r(t):(e.enter(a),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),y(t))};function f(r){return 62===r?(e.enter(l),e.consume(r),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),m(r))}function m(t){return 62===t?(e.exit("chunkString"),e.exit(c),f(t)):null===t||60===t||o(t)?r(t):(e.consume(t),92===t?g:m)}function g(t){return 60===t||62===t||92===t?(e.consume(t),m):m(t)}function y(o){return 40===o?++p>d?r(o):(e.consume(o),y):41===o?p--?(e.consume(o),y):(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(a),t(o)):null===o||n(o)?p?r(o):(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(a),t(o)):i(o)?r(o):(e.consume(o),92===o?v:y)}function v(t){return 40===t||41===t||92===t?(e.consume(t),y):y(t)}}},7516(e,t,r){"use strict";var i=r(37853),n=r(52365);e.exports=function(e,t,r,o,a,s){var l,u=this,c=0;return function(t){return e.enter(o),e.enter(a),e.consume(t),e.exit(a),e.enter(s),h};function h(n){return null===n||91===n||93===n&&!l||94===n&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs||c>999?r(n):93===n?(e.exit(s),e.enter(a),e.consume(n),e.exit(a),e.exit(o),t):i(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return null===t||91===t||93===t||i(t)||c++>999?(e.exit("chunkString"),h(t)):(e.consume(t),l=l||!n(t),92===t?p:d)}function p(t){return 91===t||92===t||93===t?(e.consume(t),c++,d):d(t)}}},34408(e,t,r){"use strict";var i=r(52365);e.exports=function(e,t,r,n){var o=n?n-1:1/0,a=0;return function(n){return i(n)?(e.enter(r),function n(s){return i(s)&&a++<o?(e.consume(s),n):(e.exit(r),t(s))}(n)):t(n)}}},4932(e,t,r){"use strict";var i=r(37853),n=r(34408);e.exports=function(e,t,r,o,a,s){var l;return function(t){return e.enter(o),e.enter(a),e.consume(t),e.exit(a),l=40===t?41:t,u};function u(r){return r===l?(e.enter(a),e.consume(r),e.exit(a),e.exit(o),t):(e.enter(s),c(r))}function c(t){return t===l?(e.exit(s),u(l)):null===t?r(t):i(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),n(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return t===l||null===t||i(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?d:h)}function d(t){return t===l||92===t?(e.consume(t),h):h(t)}}},36113(e,t,r){"use strict";var i=r(37853),n=r(52365),o=r(34408);e.exports=function(e,t){var r;return function a(s){return i(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r=!0,a):n(s)?o(e,a,r?"linePrefix":"lineSuffix")(s):t(s)}}},16624(e,t,r){"use strict";var i=r(37853);e.exports={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),n};function n(n){return i(n)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(n)):r(n)}}}},20337(e,t,r){"use strict";var i=r(37853),n=r(95964),o=r(52365),a=r(9057),s=r(34408);e.exports={name:"headingAtx",tokenize:function(e,t,r){var a=this,l=0;return function(u){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),function u(c){return 35===c&&l++<6?(e.consume(c),u):null===c||n(c)?(e.exit("atxHeadingSequence"),a.interrupt?t(c):function r(a){return 35===a?(e.enter("atxHeadingSequence"),function t(i){return 35===i?(e.consume(i),t):(e.exit("atxHeadingSequence"),r(i))}(a)):null===a||i(a)?(e.exit("atxHeading"),t(a)):o(a)?s(e,r,"whitespace")(a):(e.enter("atxHeadingText"),function t(i){return null===i||35===i||n(i)?(e.exit("atxHeadingText"),r(i)):(e.consume(i),t)}(a))}(c)):r(c)}(u)}},resolve:function(e,t){var r,i,n=e.length-2,o=3;return"whitespace"===e[3][1].type&&(o+=2),n-2>o&&"whitespace"===e[n][1].type&&(n-=2),"atxHeadingSequence"===e[n][1].type&&(o===n-1||n-4>o&&"whitespace"===e[n-2][1].type)&&(n-=o+1===n?2:4),n>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},i={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},a(e,o,n-o+1,[["enter",r,t],["enter",i,t],["exit",i,t],["exit",r,t]])),e}}},7561(e,t,r){"use strict";var i=r(7565),n=r(15166),o=r(37853),a=r(95964),s=r(52365),l=r(44961),u=r(48266),c=r(70313),h=r(3306),d={tokenize:function(e,t,r){return function(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(h,t,r)}},partial:!0};e.exports={name:"htmlFlow",tokenize:function(e,t,r){var h,p,f,m,g,y=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),v};function v(n){return 33===n?(e.consume(n),b):47===n?(e.consume(n),A):63===n?(e.consume(n),h=3,y.interrupt?t:z):i(n)?(e.consume(n),f=l(n),p=!0,w):r(n)}function b(n){return 45===n?(e.consume(n),h=2,_):91===n?(e.consume(n),h=5,f="CDATA[",m=0,x):i(n)?(e.consume(n),h=4,y.interrupt?t:z):r(n)}function _(i){return 45===i?(e.consume(i),y.interrupt?t:z):r(i)}function x(i){return i===f.charCodeAt(m++)?(e.consume(i),m===f.length?y.interrupt?t:D:x):r(i)}function A(t){return i(t)?(e.consume(t),f=l(t),w):r(t)}function w(i){return null===i||47===i||62===i||a(i)?47!==i&&p&&c.indexOf(f.toLowerCase())>-1?(h=1,y.interrupt?t(i):D(i)):u.indexOf(f.toLowerCase())>-1?(h=6,47===i)?(e.consume(i),S):y.interrupt?t(i):D(i):(h=7,y.interrupt?r(i):p?T(i):function t(r){return s(r)?(e.consume(r),t):k(r)}(i)):45===i||n(i)?(e.consume(i),f+=l(i),w):r(i)}function S(i){return 62===i?(e.consume(i),y.interrupt?t:D):r(i)}function T(t){return 47===t?(e.consume(t),k):58===t||95===t||i(t)?(e.consume(t),C):s(t)?(e.consume(t),T):k(t)}function C(t){return 45===t||46===t||58===t||95===t||n(t)?(e.consume(t),C):E(t)}function E(t){return 61===t?(e.consume(t),P):s(t)?(e.consume(t),E):T(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),g=t,I):s(t)?(e.consume(t),P):(g=void 0,function t(r){return null===r||34===r||39===r||60===r||61===r||62===r||96===r||a(r)?E(r):(e.consume(r),t)}(t))}function I(t){return t===g?(e.consume(t),M):null===t||o(t)?r(t):(e.consume(t),I)}function M(e){return 47===e||62===e||s(e)?T(e):r(e)}function k(t){return 62===t?(e.consume(t),O):r(t)}function O(t){return s(t)?(e.consume(t),O):null===t||o(t)?D(t):r(t)}function D(t){return 45===t&&2===h?(e.consume(t),L):60===t&&1===h?(e.consume(t),B):62===t&&4===h?(e.consume(t),N):63===t&&3===h?(e.consume(t),z):93===t&&5===h?(e.consume(t),j):o(t)&&(6===h||7===h)?e.check(d,N,R)(t):null===t||o(t)?R(t):(e.consume(t),D)}function R(t){return e.exit("htmlFlowData"),function t(r){return null===r?G(r):o(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t):(e.enter("htmlFlowData"),D(r))}(t)}function L(t){return 45===t?(e.consume(t),z):D(t)}function B(t){return 47===t?(e.consume(t),f="",F):D(t)}function F(t){return 62===t&&c.indexOf(f.toLowerCase())>-1?(e.consume(t),N):i(t)&&f.length<8?(e.consume(t),f+=l(t),F):D(t)}function j(t){return 93===t?(e.consume(t),z):D(t)}function z(t){return 62===t?(e.consume(t),N):D(t)}function N(t){return null===t||o(t)?(e.exit("htmlFlowData"),G(t)):(e.consume(t),N)}function G(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){for(var t=e.length;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0}},26650(e,t,r){"use strict";var i=r(7565),n=r(15166),o=r(37853),a=r(95964),s=r(52365),l=r(34408);e.exports={name:"htmlText",tokenize:function(e,t,r){var u,c,h,d,p=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),f};function f(t){return 33===t?(e.consume(t),m):47===t?(e.consume(t),P):63===t?(e.consume(t),C):i(t)?(e.consume(t),M):r(t)}function m(t){return 45===t?(e.consume(t),g):91===t?(e.consume(t),c="CDATA[",h=0,x):i(t)?(e.consume(t),T):r(t)}function g(t){return 45===t?(e.consume(t),y):r(t)}function y(t){return null===t||62===t?r(t):45===t?(e.consume(t),v):b(t)}
20function v(e){return null===e||62===e?r(e):b(e)}function b(t){return null===t?r(t):45===t?(e.consume(t),_):o(t)?(d=b,F(t)):(e.consume(t),b)}function _(t){return 45===t?(e.consume(t),z):b(t)}function x(t){return t===c.charCodeAt(h++)?(e.consume(t),h===c.length?A:x):r(t)}function A(t){return null===t?r(t):93===t?(e.consume(t),w):o(t)?(d=A,F(t)):(e.consume(t),A)}function w(t){return 93===t?(e.consume(t),S):A(t)}function S(t){return 62===t?z(t):93===t?(e.consume(t),S):A(t)}function T(t){return null===t||62===t?z(t):o(t)?(d=T,F(t)):(e.consume(t),T)}function C(t){return null===t?r(t):63===t?(e.consume(t),E):o(t)?(d=C,F(t)):(e.consume(t),C)}function E(e){return 62===e?z(e):C(e)}function P(t){return i(t)?(e.consume(t),I):r(t)}function I(t){return 45===t||n(t)?(e.consume(t),I):function t(r){return o(r)?(d=t,F(r)):s(r)?(e.consume(r),t):z(r)}(t)}function M(t){return 45===t||n(t)?(e.consume(t),M):47===t||62===t||a(t)?k(t):r(t)}function k(t){return 47===t?(e.consume(t),z):58===t||95===t||i(t)?(e.consume(t),O):o(t)?(d=k,F(t)):s(t)?(e.consume(t),k):z(t)}function O(t){return 45===t||46===t||58===t||95===t||n(t)?(e.consume(t),O):function t(r){return 61===r?(e.consume(r),D):o(r)?(d=t,F(r)):s(r)?(e.consume(r),t):k(r)}(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),u=t,R):o(t)?(d=D,F(t)):s(t)?(e.consume(t),D):(e.consume(t),u=void 0,B)}function R(t){return t===u?(e.consume(t),L):null===t?r(t):o(t)?(d=R,F(t)):(e.consume(t),R)}function L(e){return 62===e||47===e||a(e)?k(e):r(e)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||a(t)?k(t):(e.consume(t),B)}function F(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l(e,j,"linePrefix",p.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function j(t){return e.enter("htmlTextData"),d(t)}function z(i){return 62===i?(e.consume(i),e.exit("htmlTextData"),e.exit("htmlText"),t):r(i)}}}},34119(e,t,r){"use strict";var i=r(95964),n=r(41025),o=r(9057),a=r(4843),s=r(10606),l=r(55852),u=r(88942),c=r(7516),h=r(4932),d=r(36113),p={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),d(e,n)};function n(t){return 41===t?s(t):u(e,o,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function o(t){return i(t)?d(e,a)(t):s(t)}function a(t){return 34===t||39===t||40===t?h(e,d(e,s),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function s(i){return 41===i?(e.enter("resourceMarker"),e.consume(i),e.exit("resourceMarker"),e.exit("resource"),t):r(i)}}},f={tokenize:function(e,t,r){var i=this;return function(t){return c.call(i,e,n,r,"reference","referenceMarker","referenceString")(t)};function n(e){return 0>i.parser.defined.indexOf(a(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?r(e):t(e)}}},m={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),i};function i(i){return 93===i?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}};e.exports={name:"labelEnd",tokenize:function(e,t,r){for(var i,n,o=this,s=o.events.length;s--;)if(("labelImage"===o.events[s][1].type||"labelLink"===o.events[s][1].type)&&!o.events[s][1]._balanced){i=o.events[s][1];break}return function(t){return i?i._inactive?u(t):(n=o.parser.defined.indexOf(a(o.sliceSerialize({start:i.end,end:o.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):r(t)};function l(r){return 40===r?e.attempt(p,t,n?t:u)(r):91===r?e.attempt(f,t,n?e.attempt(m,t,u):u)(r):n?t(r):u(r)}function u(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){for(var r,i,a,u,c,h,d,p=e.length,f=0;p--;)if(u=e[p][1],c){if("link"===u.type||"labelLink"===u.type&&u._inactive)break;"enter"===e[p][0]&&"labelLink"===u.type&&(u._inactive=!0)}else if(h){if("enter"===e[p][0]&&("labelImage"===u.type||"labelLink"===u.type)&&!u._balanced&&(c=p,"labelLink"!==u.type)){f=2;break}}else"labelEnd"===u.type&&(h=p);return r={type:"labelLink"===e[c][1].type?"link":"image",start:l(e[c][1].start),end:l(e[e.length-1][1].end)},i={type:"label",start:l(e[c][1].start),end:l(e[h][1].end)},a={type:"labelText",start:l(e[c+f+2][1].end),end:l(e[h-2][1].start)},d=n(d=[["enter",r,t],["enter",i,t]],e.slice(c+1,c+f+3)),d=n(d,[["enter",a,t]]),d=n(d,s(t.parser.constructs.insideSpan.null,e.slice(c+f+4,h-3),t)),d=n(d,[["exit",a,t],e[h-2],e[h-1],["exit",i,t]]),d=n(d,e.slice(h+1)),d=n(d,[["exit",r,t]]),o(e,c,e.length,d),e},resolveAll:function(e){for(var t,r=-1;++r<e.length;)!(t=e[r][1])._used&&("labelImage"===t.type||"labelLink"===t.type||"labelEnd"===t.type)&&(e.splice(r+1,"labelImage"===t.type?4:2),t.type="data",r++);return e}}},68810(e,t,r){"use strict";e.exports={name:"labelStartImage",tokenize:function(e,t,r){var i=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),n};function n(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):r(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?r(e):t(e)}},resolveAll:r(34119).resolveAll}},87467(e,t,r){"use strict";e.exports={name:"labelStartLink",tokenize:function(e,t,r){var i=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),n};function n(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?r(e):t(e)}},resolveAll:r(34119).resolveAll}},25311(e,t,r){"use strict";var i=r(34408);e.exports={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),i(e,t,"linePrefix")}}}},65405(e,t,r){"use strict";var i=r(80220),n=r(52365),o=r(68170),a=r(24070),s=r(34408),l=r(3306),u=r(22284),c={name:"list",tokenize:function(e,t,r){var s=this,c=o(s.events,"linePrefix"),d=0;return function(t){var n=s.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===n?!s.containerState.marker||t===s.containerState.marker:i(t)){if(s.containerState.type||(s.containerState.type=n,e.enter(n,{_container:!0})),"listUnordered"===n)return e.enter("listItemPrefix"),42===t||45===t?e.check(u,r,p)(t):p(t);if(!s.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(n){return i(n)&&++d<10?(e.consume(n),t):(!s.interrupt||d<2)&&(s.containerState.marker?n===s.containerState.marker:41===n||46===n)?(e.exit("listItemValue"),p(n)):r(n)}(t)}return r(t)};function p(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||t,e.check(l,s.interrupt?r:f,e.attempt(h,g,m))}
20function f(e){return s.containerState.initialBlankLine=!0,c++,g(e)}function m(t){return n(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),g):r(t)}function g(r){return s.containerState.size=c+a(s.sliceStream(e.exit("listItemPrefix"))),t(r)}},continuation:{tokenize:function(e,t,r){var i=this;return i.containerState._closeFlow=void 0,e.check(l,function(r){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,s(e,t,"listItemIndent",i.containerState.size+1)(r)},function(r){return i.containerState.furtherBlankLines||!n(r)?(i.containerState.furtherBlankLines=i.containerState.initialBlankLine=void 0,o(r)):(i.containerState.furtherBlankLines=i.containerState.initialBlankLine=void 0,e.attempt(d,t,o)(r))});function o(n){return i.containerState._closeFlow=!0,i.interrupt=void 0,s(e,e.attempt(c,t,r),"linePrefix",i.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(n)}}},exit:function(e){e.exit(this.containerState.type)}},h={tokenize:function(e,t,r){var i=this;return s(e,function(e){return n(e)||!o(i.events,"listItemPrefixWhitespace")?r(e):t(e)},"listItemPrefixWhitespace",i.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},d={tokenize:function(e,t,r){var i=this;return s(e,function(e){return o(i.events,"listItemIndent")===i.containerState.size?t(e):r(e)},"listItemIndent",i.containerState.size+1)},partial:!0};e.exports=c},3306(e,t,r){"use strict";var i=r(37853),n=r(34408);e.exports={tokenize:function(e,t,r){return n(e,function(e){return null===e||i(e)?t(e):r(e)},"linePrefix")},partial:!0}},74235(e,t,r){"use strict";var i=r(37853),n=r(55852),o=r(34408);e.exports={name:"setextUnderline",tokenize:function(e,t,r){for(var n,a,s=this,l=s.events.length;l--;)if("lineEnding"!==s.events[l][1].type&&"linePrefix"!==s.events[l][1].type&&"content"!==s.events[l][1].type){a="paragraph"===s.events[l][1].type;break}return function(t){return!s.lazy&&(s.interrupt||a)?(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),n=t,function t(r){return r===n?(e.consume(r),t):(e.exit("setextHeadingLineSequence"),o(e,u,"lineSuffix")(r))}(t)):r(t)};function u(n){return null===n||i(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){for(var r,i,o,a,s=e.length;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){r=s;break}"paragraph"===e[s][1].type&&(i=s)}else"content"===e[s][1].type&&e.splice(s,1),o||"definition"!==e[s][1].type||(o=s);return a={type:"setextHeading",start:n(e[i][1].start),end:n(e[e.length-1][1].end)},e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=n(e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}}},22284(e,t,r){"use strict";var i=r(37853),n=r(52365),o=r(34408);e.exports={name:"thematicBreak",tokenize:function(e,t,r){var a,s=0;return function(l){return e.enter("thematicBreak"),a=l,function l(u){return u===a?(e.enter("thematicBreakSequence"),function t(r){return r===a?(e.consume(r),s++,t):(e.exit("thematicBreakSequence"),l(r))}(u)):n(u)?o(e,l,"whitespace")(u):s<3||null!==u&&!i(u)?r(u):(e.exit("thematicBreak"),t(u))}(l)}}}},41025(e,t,r){"use strict";var i=r(9057);e.exports=function(e,t){return e.length?(i(e,e.length,0,t),e):t}},9057(e,t,r){"use strict";var i=r(68082);e.exports=function(e,t,r,n){var o,a=e.length,s=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,r=r>0?r:0,n.length<1e4)(o=Array.from(n)).unshift(t,r),i.apply(e,o);else for(r&&i.apply(e,[t,r]);s<n.length;)(o=n.slice(s,s+1e4)).unshift(t,0),i.apply(e,o),s+=1e4,t+=1e4}},70526(e,t,r){"use strict";var i=r(95964),n=r(37993),o=r(93504);e.exports=function(e){return null===e||i(e)||o(e)?1:n(e)?2:void 0}},43780(e,t,r){"use strict";var i=r(73387),n=r(9057),o=r(49634);e.exports=function(e){for(var t={},r=-1;++r<e.length;)!function(e,t){var r,a,s,l;for(r in t)for(l in a=i.call(e,r)?e[r]:e[r]={},s=t[r])a[l]=function(e,t){for(var r=-1,i=[];++r<e.length;)("after"===e[r].add?t:i).push(e[r]);return n(t,0,0,i),t}(o(s[l]),i.call(a,l)?a[l]:[])}(t,e[r]);return t}},19954(e,t,r){"use strict";var i=r(66095),n=r(37853),o=r(41025),a=r(9057),s=r(49634),l=r(10606),u=r(56829),c=r(55852),h=r(13261);e.exports=function(e,t,r){var d=r?c(r):{line:1,column:1,offset:0},p={},f=[],m=[],g=[],y={consume:function(e){n(e)?(d.line++,d.column=1,d.offset+=-3===e?2:1,T()):-1!==e&&(d.column++,d.offset++),d._bufferIndex<0?d._index++:(d._bufferIndex++,d._bufferIndex===m[d._index].length&&(d._bufferIndex=-1,d._index++)),v.previous=e}
20,enter:function(e,t){var r=t||{};return r.type=e,r.start=x(),v.events.push(["enter",r,v]),g.push(r),r},exit:function(e){var t=g.pop();return t.end=x(),v.events.push(["exit",t,v]),t},attempt:w(function(e,t){S(e,t.from)}),check:w(A),interrupt:w(A,{interrupt:!0}),lazy:w(A,{lazy:!0})},v={previous:null,events:[],parser:e,sliceStream:_,sliceSerialize:function(e){return u(_(e))},now:x,defineSkip:function(e){p[e.line]=e.column,T()},write:function(e){return(m=o(m,e),function(){for(var e,t,r;d._index<m.length;)if("string"==typeof(t=m[d._index]))for(e=d._index,d._bufferIndex<0&&(d._bufferIndex=0);d._index===e&&d._bufferIndex<t.length;)r=t.charCodeAt(d._bufferIndex),b=b(r);else b=b(t)}(),null!==m[m.length-1])?[]:(S(t,0),v.events=l(f,v.events,v),v.events)}},b=t.tokenize.call(v,y);return t.resolveAll&&f.push(t),d._index=0,d._bufferIndex=-1,v;function _(e){return h(m,e)}function x(){return c(d)}function A(e,t){t.restore()}function w(e,t){return function(r,n,o){var a,l,u,c;return r.tokenize||"length"in r?h(s(r)):function(e){return e in r||null in r?h(r.null?s(r[e]).concat(s(r.null)):r[e])(e):o(e)};function h(e){return a=e,p(e[l=0])}function p(e){return function(r){var n,o,a,s,l;return(n=x(),o=v.previous,a=v.currentConstruct,s=v.events.length,l=Array.from(g),c={restore:function(){d=n,v.previous=o,v.currentConstruct=a,v.events.length=s,g=l,T()},from:s},u=e,e.partial||(v.currentConstruct=e),e.name&&v.parser.constructs.disable.null.indexOf(e.name)>-1)?m():e.tokenize.call(t?i({},v,t):v,y,f,m)(r)}}function f(t){return e(u,c),n}function m(e){return(c.restore(),++l<a.length)?p(a[l]):o}}}function S(e,t){e.resolveAll&&0>f.indexOf(e)&&f.push(e),e.resolve&&a(v.events,t,v.events.length-t,e.resolve(v.events.slice(t),v)),e.resolveTo&&(v.events=e.resolveTo(v.events,v))}function T(){d.line in p&&d.column<2&&(d.column=p[d.line],d.offset+=p[d.line]-1)}}},49634(e){"use strict";e.exports=function(e){return null==e?[]:"length"in e?e:[e]}},25980(e){"use strict";e.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}},4843(e){"use strict";e.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},68170(e,t,r){"use strict";var i=r(24070);e.exports=function(e,t){var r=e[e.length-1];return r&&r[1].type===t?i(r[2].sliceStream(r[1])):0}},28078(e,t,r){"use strict";var i=r(44961);e.exports=function(e){return function(t){return e.test(i(t))}}},10606(e){"use strict";e.exports=function(e,t,r){for(var i,n=[],o=-1;++o<e.length;)(i=e[o].resolveAll)&&0>n.indexOf(i)&&(t=i(t,r),n.push(i));return t}},32092(e,t,r){"use strict";var i=r(44961);e.exports=function(e,t){var r=parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(65535&r)==65535||(65535&r)==65534||r>1114111?"�":i(r)}},56829(e,t,r){"use strict";var i=r(44961);e.exports=function(e){for(var t,r,n,o=-1,a=[];++o<e.length;){if("string"==typeof(t=e[o]))r=t;else if(-5===t)r=`\r`;else if(-4===t)r=`
21`;else if(-3===t)r=`\r
22`;else if(-2===t)r="	";else if(-1===t){if(n)continue;r=" "}else r=i(t);n=-2===t,a.push(r)}return a.join("")}},55852(e,t,r){"use strict";var i=r(66095);e.exports=function(e){return i({},e)}},24070(e){"use strict";e.exports=function(e){for(var t=-1,r=0;++t<e.length;)r+="string"==typeof e[t]?e[t].length:1;return r}},13261(e){"use strict";e.exports=function(e,t){var r,i=t.start._index,n=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;return i===o?r=[e[i].slice(n,a)]:(r=e.slice(i,o),n>-1&&(r[0]=r[0].slice(n)),a>0&&r.push(e[o].slice(0,a))),r}},46215(e,t,r){"use strict";var i=r(66095),n=r(9057),o=r(55852);e.exports=function(e){for(var t,r,a,s,l,u,c,h={},d=-1;++d<e.length;){for(;d in h;)d=h[d];if(t=e[d],d&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[d-1][1].type&&((a=0)<(u=t[1]._tokenizer.events).length&&"lineEndingBlank"===u[a][1].type&&(a+=2),a<u.length&&"content"===u[a][1].type))for(;++a<u.length&&"content"!==u[a][1].type;)"chunkText"===u[a][1].type&&(u[a][1].isInFirstContentOfListItem=!0,a++);if("enter"===t[0])t[1].contentType&&(i(h,function(e,t){for(var r,i,o,a,s,l,u=e[t][1],c=e[t][2],h=t-1,d=[],p=u._tokenizer||c.parser[u.contentType](u.start),f=p.events,m=[],g={};u;){for(;e[++h][1]!==u;);d.push(h),!u._tokenizer&&(r=c.sliceStream(u),u.next||r.push(null),i&&p.defineSki
22p(u.start),u.isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=!0),p.write(r),u.isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=void 0)),i=u,u=u.next}for(u=i,o=f.length;o--;)"enter"===f[o][0]?a=!0:a&&f[o][1].type===f[o-1][1].type&&f[o][1].start.line!==f[o][1].end.line&&(y(f.slice(o+1,s)),u._tokenizer=u.next=void 0,u=u.previous,s=o+1);for(p.events=u._tokenizer=u.next=void 0,y(f.slice(0,s)),o=-1,l=0;++o<m.length;)g[l+m[o][0]]=l+m[o][1],l+=m[o][1]-m[o][0]-1;return g;function y(t){var r=d.pop();m.unshift([r,r+t.length-1]),n(e,r,2,t)}}(e,d)),d=h[d],c=!0);else if(t[1]._container||t[1]._movePreviousLineEndings){for(a=d,r=void 0;a--;)if("lineEnding"===(s=e[a])[1].type||"lineEndingBlank"===s[1].type)"enter"===s[0]&&(r&&(e[r][1].type="lineEndingBlank"),s[1].type="lineEnding",r=a);else break;r&&(t[1].end=o(e[r][1].start),(l=e.slice(r,d)).unshift(t),n(e,r,d-r+1,l))}}return!c}},67280(e,t,r){((0,e.exports)?function(t){e.exports=t()}:(0,r.amdD))(function(){"use strict";var e={};e.mobileDetectRules={phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+|\\b(BBA100|BBB100|BBD100|BBE100|BBF100|STH100)\\b-[0-9]+",Pixel:"; \\bPixel\\b",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 5X|Nexus 6",Dell:"Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052",Samsung:
vendor: 4,913 bytes, line 22
22"\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-
vendor: 25,164 bytes, line 22
22I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F|SM-G610F|SM-G981B|SM-G892A|SM-A530F",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)|LM-G710",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533|SOV34|601SO|F8332",Asus:"Asus.*Galaxy|PadFone.*Mobile",Xiaomi:"^(?!.*\\bx11\\b).*xiaomi.*$|POCOPHONE F1|MI 8|Redmi Note 9S|Redmi Note 5A Prime|N2G47H|M2001J2G|M2001J2I|M1805E10A|M2004J11G|M1902F1G|M2002J9G|M2004J19G|M2003J6A1G",NokiaLumia:"Lumia [0-9]{3,4}",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo (3DS|Switch)",Amoi:"Amoi",INQ:"INQ",OnePlus:"ONEPLUS",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",GoogleTablet:"Android.*Pixel C",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V|SM-P610|SM-T290|SM-T515|SM-T590|SM-T595|SM-T725|SM-T817P|SM-P585N0|SM-T395|SM-T295|SM-T865|SM-P610N|SM-P615|SM-T970|SM-T380|SM-T5950|SM-T905|SM-T231|SM-T500|SM-T860",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30|A3-A40",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X|TB-X704F|TB-X104F|TB3-X70F|TB-X705F|TB-8504F|TB3-X70L|TB3-710F|TB-X704L",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",NokiaLumiaTablet:"Lumia 2520",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*\\b(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))\\b|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z930|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android [0-9.]+; [a-z-]+; \\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9|TECNO DP8D",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",VerizonTablet:"QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+|V10 \\b4G\\b",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MediacomTablet:"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",KocasoTablet:"\\b(TB-1207)\\b",HisenseTablet:"\\b(F5281|E2371)\\b",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Windows Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad|AppleCoreMedia",iPadOS:"CPU OS 13",SailfishOS:"Sailfish",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+$|Coast/[0-9.]+",Skyfire:"Skyfire",Edge:"\\bEdgiOS\\b|Mobile Safari/[.0-9]* Edge",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version((?!\\bEdgiOS\\b).)*Mobile.*Safari|Safari.*Mobile|MobileSafari",WeChat:"\\bMicroMessenger\\b",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger",PaleMoon:"Android.*PaleMoon|Mobile.*PaleMoon"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:["Firefox/[VER]","FxiOS/[VER]"],Fennec:"Fennec/[VER]",Edge:"Edge/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]",UCBrowser:["UCWEB[VER]","UC.*Browser/[VER]"],MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",SamsungBrowser:"SamsungBrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",PaleMoon:"PaleMoon/[VER]",SailfishBrowser:"SailfishBrowser/[VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",Goanna:"Goanna/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",Sailfish:"Sailfish [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|Google-AMPHTML|s~amp-validator|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom|contentkingapp|AspiegelBot",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},
22e.detectMobileBrowsers={fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,tabletPattern:/android|ipad|playbook|silk/i};var t,r=Object.prototype.hasOwnProperty;function i(e,t){return null!=e&&null!=t&&e.toLowerCase()===t.toLowerCase()}function n(e,t){var r,i,n=e.length;if(!n||!t)return!1;for(r=t.toLowerCase(),i=0;i<n;++i)if(r===e[i].toLowerCase())return!0;return!1}function o(e){for(var t in e)r.call(e,t)&&(e[t]=RegExp(e[t],"i"))}function a(e,t){this.ua=(e||"").substr(0,500),this._cache={},this.maxPhoneWidth=t||600}return e.FALLBACK_PHONE="UnknownPhone",e.FALLBACK_TABLET="UnknownTablet",e.FALLBACK_MOBILE="UnknownMobile",t="isArray"in Array?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},!function(){var i,n,a,s,l,u,c=e.mobileDetectRules;for(i in c.props)if(r.call(c.props,i)){for(t(n=c.props[i])||(n=[n]),l=n.length,s=0;s<l;++s)(u=(a=n[s]).indexOf("[VER]"))>=0&&(a=a.substring(0,u)+"([\\w._\\+]+)"+a.substring(u+5)),n[s]=RegExp(a,"i");c.props[i]=n}o(c.oss),o(c.phones),o(c.tablets),o(c.uas),o(c.utils),c.oss0={WindowsPhoneOS:c.oss.WindowsPhoneOS,WindowsMobileOS:c.oss.WindowsMobileOS}}(),e.findMatch=function(e,t){for(var i in e)if(r.call(e,i)&&e[i].test(t))return i;return null},e.findMatches=function(e,t){var i=[];for(var n in e)r.call(e,n)&&e[n].test(t)&&i.push(n);return i},e.getVersionStr=function(t,i){var n,o,a,s,l=e.mobileDetectRules.props;if(r.call(l,t)){for(a=(n=l[t]).length,o=0;o<a;++o)if(null!==(s=n[o].exec(i)))return s[1]}return null},e.getVersion=function(t,r){var i=e.getVersionStr(t,r);return i?e.prepareVersionNo(i):0/0},e.prepareVersionNo=function(e){var t;return 1===(t=e.split(/[a-z._ \/\-]/i)).length&&(e=t[0]),t.length>1&&(e=t[0]+".",t.shift(),e+=t.join("")),Number(e)},e.isMobileFallback=function(t){return e.detectMobileBrowsers.fullPattern.test(t)||e.detectMobileBrowsers.shortPattern.test(t.substr(0,4))},e.isTabletFallback=function(t){return e.detectMobileBrowsers.tabletPattern.test(t)},e.prepareDetectionCache=function(t,r,i){var n,o,s;if(void 0===t.mobile){if(o=e.findMatch(e.mobileDetectRules.tablets,r)){t.mobile=t.tablet=o,t.phone=null;return}if(n=e.findMatch(e.mobileDetectRules.phones,r)){t.mobile=t.phone=n,t.tablet=null;return}e.isMobileFallback(r)?void 0===(s=a.isPhoneSized(i))?(t.mobile=e.FALLBACK_MOBILE,t.tablet=t.phone=null):s?(t.mobile=t.phone=e.FALLBACK_PHONE,t.tablet=null):(t.mobile=t.tablet=e.FALLBACK_TABLET,t.phone=null):e.isTabletFallback(r)?(t.mobile=t.tablet=e.FALLBACK_TABLET,t.phone=null):t.mobile=t.tablet=t.phone=null}},e.mobileGrade=function(e){var t=null!==e.mobile();return e.os("iOS")&&e.version("iPad")>=4.3||e.os("iOS")&&e.version("iPhone")>=3.1||e.os("iOS")&&e.version("iPod")>=3.1||e.version("Android")>2.1&&e.is("Webkit")||e.version("Windows Phone OS")>=7||e.is("BlackBerry")&&e.version("BlackBerry")>=6||e.match("Playbook.*Tablet")||e.version("webOS")>=1.4&&e.match("Palm|Pre|Pixi")||e.match("hp.*TouchPad")||e.is("Firefox")&&e.version("Firefox")>=12||e.is("Chrome")&&e.is("AndroidOS")&&e.version("Android")>=4||e.is("Skyfire")&&e.version("Skyfire")>=4.1&&e.is("AndroidOS")&&e.version("Android")>=2.3||e.is("Opera")&&e.version("Opera Mobi")>11&&e.is("AndroidOS")||e.is("MeeGoOS")||e.is("Tizen")||e.is("Dolfin")&&e.version("Bada")>=2||(e.is("UC Browser")||e.is("Dolfin"))&&e.version("Android")>=2.3||e.match("Kindle Fire")||e.is("Kindle")&&e.version("Kindle")>=3||e.is("AndroidOS")&&e.is("NookTablet")||e.version("Chrome")>=11&&!t||e.version("Safari")>=5&&!t||e.version("Firefox")>=4&&!t||e.version("MSIE")>=7&&!t||e.version("Opera")>=10&&!t?"A":e.os("iOS")&&4.3>e.version("iPad")||e.os("iOS")&&3.1>e.version("iPhone")||e.os("iOS")&&3.1>e.version("iPod")||e.is("Blackberry")&&e.version("BlackBerry")>=5&&6>e.version("BlackBerry")||e.version("Opera Mini")>=5&&6.5>=e.version("Opera Mini")&&(e.version("Android")>=2.3||e.is("iOS"))||e.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||e.version("Opera Mobi")>=11&&e.is("SymbianOS")?"B":(5>e.version("BlackBerry")||e.match("MSIEMobile|Windows CE.*Mobile")||e.version("Windows Mobile"),"C")},e.detectOS=function(t){return e.findMatch(e.mobileDetectRules.oss0,t)||e.findMatch(e.mobileDetectRules.oss,t)},e.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},a.prototype={constructor:a,mobile:function(){return e.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return e.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return e.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return void 0===this._cache.userAgent&&(this._cache.userAgent=e.findMatch(e.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return void 0===this._cache.userAgents&&(this._cache.userAgents=e.findMatches(e.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return void 0===this._cache.os&&(this._cache.os=e.detectOS(this.ua)),this._cache.os},version:function(t){return e.getVersion(t,this.ua)},versionStr:function(t){return e.getVersionStr(t,this.ua)},is:function(t){return n(this.userAgents(),t)||i(t,this.os())||i(t,this.phone())||i(t,this.tablet())||n(e.findMatches(e.mobileDetectRules.utils,this.ua),t)},match:function(e){return e instanceof RegExp||(e=RegExp(e,"i")),e.test(this.ua)},isPhoneSized:function(e){return a.isPhoneSized(e||this.maxPhoneWidth)},mobileGrade:function(){return void 0===this._cache.grade&&(this._cache.grade=e.mobileGrade(this)),this._cache.grade}},"u">typeof window&&window.screen?a.isPhoneSized=function(t){return t<0?void 0:e.getDeviceSmallerSide()<=t}:a.isPhoneSized=function(){},a._impl=e,a.version="1.4.5 2021-03-13",a}
22)},46084(e){"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var n={};if("abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,n){for(var o,a,s=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]))r.call(o,u)&&(s[u]=o[u]);if(t){a=t(o);for(var c=0;c<a.length;c++)i.call(o,a[c])&&(s[a[c]]=o[a[c]])}}return s}:Object.assign},78311(e,t,r){var i="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=i&&n&&"function"==typeof n.get?n.get:null,a=i&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&l&&"function"==typeof l.get?l.get:null,c=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,_=String.prototype.toUpperCase,x=String.prototype.toLowerCase,A=RegExp.prototype.test,w=Array.prototype.concat,S=Array.prototype.join,T=Array.prototype.slice,C=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"==typeof Symbol&&"object"==typeof Symbol.iterator,k="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M?"object":"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(1/0===e||-1/0===e||e!=e||e&&e>-1e3&&e<1e3||A.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var i=e<0?-C(-e):C(e);if(i!==e){var n=String(i),o=v.call(t,n.length+1);return b.call(n,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var L=r(14058),B=L.custom,F=H(B)?B:null,j={__proto__:null,double:'"',single:"'"},z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function N(e,t,r){var i=j[r.quoteStyle||t];return i+e+i}function G(e){return!k||!("object"==typeof e&&(k in e||void 0!==e[k]))}function V(e){return"[object Array]"===Z(e)&&G(e)}function U(e){return"[object RegExp]"===Z(e)&&G(e)}function H(e){if(M)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}e.exports=function e(t,i,n,s){var l=i||{};if(q(l,"quoteStyle")&&!q(j,l.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(q(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&1/0!==l.maxStringLength:null!==l.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!q(l,"customInspect")||l.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(l,"indent")&&null!==l.indent&&"	"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var i=t.length-r.maxStringLength;return e(v.call(t,0,r.maxStringLength),r)+"... "+i+" more character"+(i>1?"s":"")}var n=z[r.quoteStyle||"single"];return n.lastIndex=0,N(b.call(b.call(t,n,"\\$1"),/[\x00-\x1f]/g,K
22),"single",r)}(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var A=String(t);return _?R(t,A):A}if("bigint"==typeof t){var C=String(t)+"n";return _?R(t,C):C}var P=void 0===l.depth?5:l.depth;if(void 0===n&&(n=0),n>=P&&P>0&&"object"==typeof t)return V(t)?"[Array]":"[Object]";var B=function(e,t){var r;if("	"===e.indent)r="	";else{if("number"!=typeof e.indent||!(e.indent>0))return null;r=S.call(Array(e.indent+1)," ")}return{base:r,prev:S.call(Array(t+1),r)}}(l,n);if(void 0===s)s=[];else if($(s,t)>=0)return"[Circular]";function W(t,r,i){if(r&&(s=T.call(s)).push(r),i){var o={depth:l.depth};return q(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),e(t,o,n+1,s)}return e(t,l,n+1,s)}if("function"==typeof t&&!U(t)){var et=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),er=ee(t,W);return"[Function"+(et?": "+et:" (anonymous)")+"]"+(er.length>0?" { "+S.call(er,", ")+" }":"")}if(H(t)){var ei=M?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(t);return"object"!=typeof t||M?ei:X(ei)}if(t&&"object"==typeof t&&("u">typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)){for(var en,eo="<"+x.call(String(t.nodeName)),ea=t.attributes||[],es=0;es<ea.length;es++)eo+=" "+ea[es].name+"="+N((en=ea[es].value,b.call(String(en),/"/g,"&quot;")),"double",l);return eo+=">",t.childNodes&&t.childNodes.length&&(eo+="..."),eo+="</"+x.call(String(t.nodeName))+">"}if(V(t)){if(0===t.length)return"[]";var el=ee(t,W);return B&&!function(e){for(var t=0;t<e.length;t++)if($(e[t],`
23`)>=0)return!1;return!0}(el)?"["+J(el,B)+"]":"[ "+S.call(el,", ")+" ]"}if("[object Error]"===Z(t)&&G(t)){var eu=ee(t,W);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===eu.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(eu,", ")+" }":"{ ["+String(t)+"] "+S.call(w.call("[cause]: "+W(t.cause),eu),", ")+" }"}if("object"==typeof t&&m){if(F&&"function"==typeof t[F]&&L)return L(t,{depth:P-n});else if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{u.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ec=[];return a&&a.call(t,function(e,r){ec.push(W(r,t,!0)+" => "+W(e,t))}),Q("Map",o.call(t),ec,B)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var eh=[];return c&&c.call(t,function(e){eh.push(W(e,t))}),Q("Set",u.call(t),eh,B)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if("[object Number]"===Z(t)&&G(t))return X(W(Number(t)));if(function(e){if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}(t))return X(W(E.call(t)));if("[object Boolean]"===Z(t)&&G(t))return X(f.call(t));if("[object String]"===Z(t)&&G(t))return X(W(String(t)));if("u">typeof window&&t===window)return"{ [object Window] }";if("u">typeof globalThis&&t===globalThis||void 0!==r.g&&t===r.g)return"{ [object globalThis] }";if(!("[object Date]"===Z(t)&&G(t))&&!U(t)){var ed=ee(t,W),ep=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,ef=t instanceof Object?"":"null prototype",em=!ep&&k&&Object(t)===t&&k in t?v.call(Z(t),8,-1):ef?"Object":"",eg=(ep||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(em||ef?"["+S.call(w.call([],em||[],ef||[]),": ")+"] ":"");return 0===ed.length?eg+"{}":B?eg+"{"+J(ed,B)+"}":eg+"{ "+S.call(ed,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function q(e,t){return W.call(e,t)}function Z(e){return m.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return -1}function K(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function X(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,r,i){return e+" ("+t+") {"+(i?J(r,i):S.call(r,", "))+"}"}function J(e,t){if(0===e.length)return"";var r=`
24`+t.prev+t.base;return r+S.call(e,","+r)+`
25`+t.prev}function ee(e,t){var r,i=V(e),n=[];if(i){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=q(e,o)?t(e[o],e):""}var a="function"==typeof P?P(e):[];if(M){r={};for(var s=0;s<a.length;s++)r["$"+a[s]]=a[s]}for(var l in e)if(q(e,l)&&(!i||String(Number(l))!==l||!(l<e.length)))if(M&&r["$"+l]instanceof Symbol)continue;else A.call(/[^\w$]/,l)?n.push(t(l,e)+": "+t(e[l],e)):n.push(l+": "+t(e[l],e));if("function"==typeof P)for(var u=0;u<a.length;u++)O.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}},73416(e,t){var r,i,n;!function(o){"use strict";"object"==typeof e.exports?e.exports=o():(i=[],void 0===(n="function"==typeof(r=o)?r.apply(t,i):r)||(e.exports=n))}(function(){"use strict";var e=Object.prototype.toString;function t(e,t){return null!=e&&Object.prototype.hasOwnProperty.call(e,t)}function r(e){if(!e||i(e)&&0===e.length)return!0;
25if("string"!=typeof e){for(var r in e)if(t(e,r))return!1;return!0}return!1}var i=Array.isArray||function(t){return"[object Array]"===e.call(t)};function n(e){var t=parseInt(e);return t.toString()===e?t:e}function o(o){var a,s,l=function(e){return Object.keys(l).reduce(function(t,r){return"create"===r||"function"==typeof l[r]&&(t[r]=l[r].bind(l,e)),t},{})};function u(e,t){if(a(e,t))return e[t]}function c(e,t,r,i){if("number"==typeof t&&(t=[t]),!t||0===t.length)return e;if("string"==typeof t)return c(e,t.split(".").map(n),r,i);var o=t[0],a=s(e,o);return 1===t.length?(void 0!==a&&i||(e[o]=r),a):(void 0===a&&("number"==typeof t[1]?e[o]=[]:e[o]={}),c(e[o],t.slice(1),r,i))}return a=(o=o||{}).includeInheritedProps?function(){return!0}:function(e,r){return"number"==typeof r&&Array.isArray(e)||t(e,r)},s=o.includeInheritedProps?function(e,t){"string"!=typeof t&&"number"!=typeof t&&(t=String(t));var r=u(e,t);if("__proto__"===t||"prototype"===t||"constructor"===t&&"function"==typeof r)throw Error("For security reasons, object's magic properties cannot be set");return r}:function(e,t){return u(e,t)},l.has=function(e,r){if("number"==typeof r?r=[r]:"string"==typeof r&&(r=r.split(".")),!r||0===r.length)return!!e;for(var a=0;a<r.length;a++){var s=n(r[a]);if(!("number"==typeof s&&i(e)&&s<e.length||(o.includeInheritedProps?s in Object(e):t(e,s))))return!1;e=e[s]}return!0},l.ensureExists=function(e,t,r){return c(e,t,r,!0)},l.set=function(e,t,r,i){return c(e,t,r,i)},l.insert=function(e,t,r,n){var o=l.get(e,t);n=~~n,i(o)||(o=[],l.set(e,t,o)),o.splice(n,0,r)},l.empty=function(t,n){var o,s;if(!r(n)&&null!=t&&(o=l.get(t,n)))if("string"==typeof o)return l.set(t,n,"");else{if("boolean"==typeof o||"[object Boolean]"===e.call(o))return l.set(t,n,!1);if("number"==typeof o)return l.set(t,n,0);if(i(o))o.length=0;else{if("object"!=typeof o||"[object Object]"!==e.call(o))return l.set(t,n,null);for(s in o)a(o,s)&&delete o[s]}}},l.push=function(e,t){var r=l.get(e,t);i(r)||(r=[],l.set(e,t,r)),r.push.apply(r,Array.prototype.slice.call(arguments,2))},l.coalesce=function(e,t,r){for(var i,n=0,o=t.length;n<o;n++)if(void 0!==(i=l.get(e,t[n])))return i;return r},l.get=function(e,t,r){if("number"==typeof t&&(t=[t]),!t||0===t.length)return e;if(null==e)return r;if("string"==typeof t)return l.get(e,t.split("."),r);var i=n(t[0]),o=s(e,i);return void 0===o?r:1===t.length?o:l.get(e[i],t.slice(1),r)},l.del=function(e,t){if("number"==typeof t&&(t=[t]),null==e||r(t))return e;if("string"==typeof t)return l.del(e,t.split("."));var o=n(t[0]);return(s(e,o),a(e,o))?1!==t.length?l.del(e[o],t.slice(1)):(i(e)?e.splice(o,1):delete e[o],e):e},l}var a=o();return a.create=o,a.withInheritedProps=o({includeInheritedProps:!0}),a})},37940(e){"use strict";var t;e.exports=function(e){var r,i="&"+e+";";return(t=t||document.createElement("i")).innerHTML=i,(59!==(r=t.textContent).charCodeAt(r.length-1)||"semi"===e)&&r!==i&&r}},5584(e,t){var r,i;void 0===(i="function"==typeof(r=function(){return function(e){function t(e){return" "===e||"	"===e||`
26`===e||"\f"===e||`\r`===e}function r(t){var r,i=t.exec(e.substring(m));if(i)return r=i[0],m+=r.length,r}for(var i,n,o,a,s,l=e.length,u=/^[ \t\n\r\u000c]+/,c=/^[, \t\n\r\u000c]+/,h=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,p=/^\d+$/,f=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,m=0,g=[];;){if(r(c),m>=l)return g;i=r(h),n=[],","===i.slice(-1)?(i=i.replace(d,""),y()):function(){for(r(u),o="",a="in descriptor";;){if(s=e.charAt(m),"in descriptor"===a)if(t(s))o&&(n.push(o),o="",a="after descriptor");else if(","===s){m+=1,o&&n.push(o),y();return}else if("("===s)o+=s,a="in parens";else if(""===s){o&&n.push(o),y();return}else o+=s;else if("in parens"===a)if(")"===s)o+=s,a="in descriptor";else if(""===s){n.push(o),y();return}else o+=s;else if("after descriptor"===a)if(t(s));else{if(""===s)return void y();a="in descriptor",m-=1}m+=1}}()}function y(){var t,r,o,a,s,l,u,c,h,d=!1,m={};for(a=0;a<n.length;a++)l=(s=n[a])[s.length-1],c=parseInt(u=s.substring(0,s.length-1),10),h=parseFloat(u),p.test(u)&&"w"===l?((t||r)&&(d=!0),0===c?d=!0:t=c):f.test(u)&&"x"===l?((t||r||o)&&(d=!0),h<0?d=!0:r=h):p.test(u)&&"h"===l?((o||r)&&(d=!0),0===c?d=!0:o=c):d=!0;d?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+s+"'."):(m.url=i,t&&(m.w=t),r&&(m.d=r),o&&(m.h=o),g.pu
26sh(m))}}})?r.apply(t,[]):r)||(e.exports=i)},97142(e){var t=String,r=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=r(),e.exports.createColors=r},547(e,t,r){"use strict";let i=r(47350);class n extends i{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=n,n.default=n,i.registerAtRule(n)},72280(e,t,r){"use strict";let i=r(48741);class n extends i{constructor(e){super(e),this.type="comment"}}e.exports=n,n.default=n},47350(e,t,r){"use strict";let i,n,o,a,s=r(72280),l=r(10177),u=r(48741),{isClean:c,my:h}=r(78948);class d extends u{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){let t=[this];for(;t.length>0;){let r=t.pop();if(r!==this&&r.cleanRaws!==d.prototype.cleanRaws){r.cleanRaws(e);continue}if(u.prototype.cleanRaws.call(r,e),r.nodes)for(let e of r.nodes)t.push(e)}}each(e){let t,r;if(!this.proxyOf.nodes)return;let i=this.getIterator();for(;this.indexes[i]<this.proxyOf.nodes.length&&(t=this.indexes[i],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[i]+=1;return delete this.indexes[i],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>e.root().toProxy();if("nodes"===t)return e.nodes.map(e=>e.toProxy());if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,i=this.index(e),n=this.normalize(t,this.proxyOf.nodes[i]).reverse();for(let t of(i=this.index(e),n))this.proxyOf.nodes.splice(i+1,0,t);for(let e in this.indexes)i<(r=this.indexes[e])&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,i=this.index(e),n=0===i&&"prepend",o=this.normalize(t,this.proxyOf.nodes[i],n).reverse();for(let t of(i=this.index(e),o))this.proxyOf.nodes.splice(i,0,t);for(let e in this.indexes)i<=(r=this.indexes[e])&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=function(e){let t=e.slice();for(;t.length>0;){let e=t.pop();if(delete e.source,e.nodes)for(let r of(e.nodes=e.nodes.slice(),e.nodes))t.push(r)}return e.slice()}(n(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(let t of e=e.slice(0))t.parent&&t.parent.removeChild(t,"ignore");else if("root"===e.type&&"document"!==this.type)for(let t of e=e.nodes.slice(0))t.parent&&t.parent.removeChild(t,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new l(e)]}else if(e.selector||e.selectors)e=[new a(e)];else if(e.name)e=[new i(e)];else if(e.text)e=[new s(e)];else throw Error("Unknown node type in node creation");return e.map(e=>(e[h]||d.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[c]&&function(e){let t=[e];for(;t.length>0;){let e=t.pop();if(e[c]=!1,e.proxyOf.nodes)for(let r of e.proxyOf.nodes)t.push(r)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepe
26nd").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||(!t.fast||i.value.includes(t.fast))&&(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){if(!this.proxyOf.nodes)return;let t=[{iterator:this.getIterator(),node:this.proxyOf}];for(;t.length>0;){let r,{iterator:i,node:n}=t[t.length-1],o=n.indexes[i];if(o>=n.proxyOf.nodes.length){delete n.indexes[i],t.pop();let e=t[t.length-1];e&&(e.node.indexes[e.iterator]+=1);continue}let a=n.proxyOf.nodes[o];try{r=e(a,o)}catch(e){throw a.addToError(e)}if(!1===r){for(let e of t)delete e.node.indexes[e.iterator];return!1}a.walk&&a.proxyOf.nodes?t.push({iterator:a.getIterator(),node:a}):n.indexes[i]+=1}}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("atrule"===r.type&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if("atrule"===r.type&&r.name===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("decl"===r.type&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if("decl"===r.type&&r.prop===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("rule"===r.type&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if("rule"===r.type&&r.selector===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}}d.registerParse=e=>{n=e},d.registerRule=e=>{a=e},d.registerAtRule=e=>{i=e},d.registerRoot=e=>{o=e},e.exports=d,d.default=d,d.rebuild=e=>{let t=[e];for(;t.length>0;){let e=t.pop();if("atrule"===e.type?Object.setPrototypeOf(e,i.prototype):"rule"===e.type?Object.setPrototypeOf(e,a.prototype):"decl"===e.type?Object.setPrototypeOf(e,l.prototype):"comment"===e.type?Object.setPrototypeOf(e,s.prototype):"root"===e.type&&Object.setPrototypeOf(e,o.prototype),e[h]=!0,e.nodes)for(let r of e.nodes)t.push(r)}}},85299(e,t,r){"use strict";let i=r(97142),n=r(15697);class o extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,o)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=i.isColorSupported);let r=e=>e,o=e=>e,a=e=>e;if(e){let{bold:e,gray:t,red:s}=i.createColors(!0);o=t=>e(s(t)),r=e=>t(e),n&&(a=e=>n(e))}let s=t.split(/\r?\n/),l=Math.max(this.line-3,0),u=Math.min(this.line+2,s.length),c=String(u).length;return s.slice(l,u).map((e,t)=>{let i=l+1+t,n=" "+(" "+i).slice(-c)+" | ";if(i===this.line){if(e.length>160){let t=Math.max(0,this.column-20),i=Math.max(this.column+20,this.endColumn+20),s=e.slice(t,i),l=r(n.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return o(">")+r(n)+a(s)+`
27 `+l+o("^")}let t=r(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+r(n)+a(e)+`
28 `+t+o("^")}return" "+r(n)+a(e)}).join(`
29`)}toString(){let e=this.showSourceCode();return e&&(e=`
30
31`+e+`
32`),this.name+": "+this.message+e}}e.exports=o,o.default=o},10177(e,t,r){"use strict";let i=r(48741);
32class n extends i{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}e.exports=n,n.default=n},22072(e,t,r){"use strict";let i,n,o=r(47350);class a extends o{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new i(new n,this,e).stringify()}}a.registerLazyResult=e=>{i=e},a.registerProcessor=e=>{n=e},e.exports=a,a.default=a},95243(e,t,r){"use strict";let i=r(547),n=r(72280),o=r(10177),a=r(13933),s=r(94963),l=r(19325),u=r(96679);function c(e,t){return e.inputs?e.inputs.map(e=>{let t={...e,__proto__:a.prototype};return t.map&&(t.map={...t.map,__proto__:s.prototype}),t}):t}function h(e,t){let r;if(Array.isArray(e))return e.map(e=>h(e));let a=[{childIndex:0,children:[],inputs:c(e,t),json:e}];for(;a.length>0;){let e=a[a.length-1],t=e.json.nodes;if(t&&e.childIndex<t.length){let r=t[e.childIndex];e.childIndex+=1,a.push({childIndex:0,children:[],inputs:c(r,e.inputs),json:r});continue}a.pop();let s=function(e,t,r){let a,s={...e};if(delete s.inputs,delete s.nodes,s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)a=new l(s);else if("decl"===s.type)a=new o(s);else if("rule"===s.type)a=new u(s);else if("comment"===s.type)a=new n(s);else if("atrule"===s.type)a=new i(s);else throw Error("Unknown node type: "+e.type);if(r)for(let e of(a.nodes=r,r))e.parent=a;return a}(e.json,e.inputs,t?e.children:void 0);a.length>0?a[a.length-1].children.push(s):r=s}return r}e.exports=h,h.default=h},13933(e,t,r){"use strict";let{nanoid:i}=r(27139),{isAbsolute:n,resolve:o}=r(20558),{SourceMapConsumer:a,SourceMapGenerator:s}=r(36059),{fileURLToPath:l,pathToFileURL:u}=r(38486),c=r(85299),h=r(94963),d=r(15697),p=Symbol("lineToIndexCache"),f=!!(a&&s),m=!!(o&&n);function g(e){if(e[p])return e[p];let t=e.css.split(`
33`),r=Array(t.length),i=0;for(let e=0,n=t.length;e<n;e++)r[e]=i,i+=t[e].length+1;return e[p]=r,r}class y{get from(){return this.file||this.id}constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!m||/^\w+:\/\//.test(t.from)||n(t.from)?this.file=t.from:this.file=o(t.from)),m&&f){let e=new h(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,a,s,l;if(t&&"object"==typeof t){let e=t,i=r;if("number"==typeof e.offset){s=e.offset;let i=this.fromOffset(s);t=i.line,r=i.col}else t=e.line,r=e.column,s=this.fromLineAndColumn(t,r);if("number"==typeof i.offset){a=i.offset;let e=this.fromOffset(a);o=e.line,n=e.col}else o=i.line,n=i.column,a=this.fromLineAndColumn(i.line,i.column)}else if(r)s=this.fromLineAndColumn(t,r);else{s=t;let e=this.fromOffset(s);t=e.line,r=e.col}let h=this.origin(t,r,o,n);return(l=h?new c(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,i.plugin):new c(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:n,line:o},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:o,endOffset:a,line:t,offset:s,source:this.css},this.file&&(u&&(l.input.url=u(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(e,t){return g(this)[e-1]+t-1}fromOffset(e){let t=g(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let r,n=t.length-2;for(;i<n;)if(e<t[r=i+(n-i>>1)])n=r-1;else if(e>=t[r+1])i=r+1;else{i=r;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){let o,a;if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t-1,line:e});if(!c.source)return!1;if("number"==typeof r){let e=s.originalPositionFor({column:i-1,line:r});e.source&&(o=e)}a=n(c.source)?u(c.source):new URL(c.source,this.map.consumer().sourceRoot||u(this.map.mapFile));let h={column:c.column+1,endColumn:o&&o.column+1,endLine:o&&o.line,line:c.line,url:a.toString()};if("file:"===a.protocol)if(l)h.file=l(a);else throw Error("file: protocol is not available in this PostCSS build");let d=s.sourceContentFor(c.source);return d&&(h.source=d),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=y,y.default=y,d&&d.registerInput&&d.registerInput(y)},17821(e,t,r){"use strict";let i=r(47350),n=r(22072),o=r(68227),a=r(82786),s=r(13740),l=r(19325),u=r(89724),{isClean:c,my:h}=r(78948);r(30415);let d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function g(e){let t=!1,r=d[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:g(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){let t=[e];for(;t.length>0;){let e=t.pop();if(e[c]=!1,e.nodes)for(let r of e.nodes)t.push(r)}return e}let b={};class _{get content(){return this.stringify().content}
33get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){let n;if(this.stringified=!1,this.processed=!1,"object"==typeof t&&null!==t&&("root"===t.type||"document"===t.type))n=v(t);else if(t instanceof _||t instanceof s)n=v(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=a;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(t,r)}catch(e){this.processed=!0,this.error=e}n&&!n[h]&&i.rebuild(n)}this.result=new s(e,n,r),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!p[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[r])if("object"==typeof t[r])for(let i in t[r])e(t,"*"===i?r:r+"-"+i.toLowerCase(),t[r][i]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(m(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[c];){e[c]=!0;let t=[y(e)];for(;t.length>0;){let e=this.visitTick(t);if(m(e))try{await e}catch(r){let e=t[t.length-1].node;throw this.handleError(r,e)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(m(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=u;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(void 0===e.map&&!(r&&r.input&&r.input.map)){let e="";return t(this.result.root,t=>{e+=t}),this.result.css=e,this.result}let i=new o(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(m(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[c];)e[c]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){let e;this.result.lastPlugin=r;try{e=i(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;
33if(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(i.length>0&&t.visitorIndex<i.length){let[e,n]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let i,n=t.iterator;for(t.descending&&(t.descending=!1,r.indexes[n]+=1);i=r.nodes[r.indexes[n]];){if(!i[c]){i[c]=!0,t.descending=!0,e.push(y(i));return}r.indexes[n]+=1}t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e){r.nodes&&r.nodes.length&&(r[c]=!0,t.iterator=r.getIterator());return}if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){e[c]=!0;let t=[{eventIndex:0,events:g(e),iterator:0,node:e}];for(;t.length>0;){let e=t[t.length-1],r=e.node;if(0!==e.iterator){let i,n=e.iterator;e.descending&&(e.descending=!1,r.indexes[n]+=1);let o=!1;for(;i=r.nodes[r.indexes[n]];){if(!i[c]){i[c]=!0,e.descending=!0,t.push({eventIndex:0,events:g(i),iterator:0,node:i}),o=!0;break}r.indexes[n]+=1}if(o)continue;e.iterator=0,delete r.indexes[n]}if(e.eventIndex<e.events.length){let i=e.events[e.eventIndex];if(e.eventIndex+=1,0===i)r.nodes&&r.nodes.length&&(e.iterator=r.getIterator());else{let e=this.listeners[i];e&&this.visitSync(e,r.toProxy())&&t.pop()}continue}t.pop()}}warnings(){return this.sync().warnings()}}_.registerPostcss=e=>{b=e},e.exports=_,_.default=_,l.registerLazyResult(_),n.registerLazyResult(_)},89029(e){"use strict";let t={comma:e=>t.split(e,[","],!0),space(e){let r=[" ",`
34`,"	"];return t.split(e,r)},split(e,t,r){if("string"!=typeof e)return[];let i=[],n="",o=!1,a=0,s=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:s?r===l&&(s=!1):'"'===r||"'"===r?(s=!0,l=r):"("===r?a+=1:")"===r?a>0&&(a-=1):0===a&&t.includes(r)&&(o=!0),o?(""!==n&&i.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&i.push(n.trim()),i}};e.exports=t,t.default=t},68227(e,t,r){"use strict";var i=r(36533).hp;let{dirname:n,relative:o,resolve:a,sep:s}=r(20558),{SourceMapConsumer:l,SourceMapGenerator:u}=r(36059),{pathToFileURL:c}=r(38486),h=r(13933),d=!!(l&&u),p=!!(n&&a&&o&&s);
34e.exports=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t=`
35`;this.css.includes(`\r
36`)&&(t=`\r
37`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),i=e.root||n(e.file);!1===this.mapOpts.sourcesContent?(t=new l(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e;for(;-1!==(e=this.css.lastIndexOf("/*#"));){let t=this.css.indexOf("*/",e+3);if(-1===t)break;for(;e>0&&`
38`===this.css[e-1];)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}}generate(){if(this.clearAnnotation(),p&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=u.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,t;this.css="",this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0});let r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(a,s,l)=>{if(this.css+=a,s&&"end"!==l&&(o.generated.line=r,o.generated.column=i-1,s.source&&s.source.start?(o.source=this.sourcePath(s),o.original.line=s.source.start.line,o.original.column=s.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(t=a.match(/\n/g))?(r+=t.length,e=a.lastIndexOf(`
39`),i=a.length-e):i+=a.length,s&&"start"!==l){let e=s.parent||{raws:{}};(!("decl"===s.type||"atrule"===s.type&&!s.nodes)||s!==e.last||e.raws.semicolon)&&(s.source&&s.source.end?(o.source=this.sourcePath(s),o.original.line=s.source.end.line,o.original.column=s.source.end.column-1,o.generated.line=r,o.generated.column=i-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1),this.map.addMapping(o))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=n(a(r,this.mapOpts.annotation)));let i=o(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new h(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return i?i.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===s&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}},66330(e,t,r){"use strict";let i=r(68227),n=r(82786),o=r(13740),a=r(89724);r(30415);class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=n(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0,this.result=new o(this._processor,void 0,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get:()=>n.root});let s=new i(a,void 0,this._opts,t);
39if(s.isMap()){let[e,t]=s.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}e.exports=s,s.default=s},48741(e,t,r){"use strict";let i=r(85299),n=r(4483),o=r(89724),{isClean:a,my:s}=r(78948);function l(e,t){if(t&&void 0!==t.offset)return t.offset;let r=1,i=1,n=0;for(let o=0;o<e.length;o++){if(i===t.line&&r===t.column){n=o;break}`
40`===e[o]?(r=1,i+=1):r+=1}return n}class u{get proxyOf(){return this}constructor(e={}){for(let t of(this.raws={},this[a]=!1,this[s]=!0,Object.keys(e)))if("__proto__"!==t)if("nodes"===t)for(let r of(this.nodes=[],e[t]))"function"==typeof r.clone&&r.parent?this.append(r.clone()):this.append(r);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function(e){let t=new e.constructor,r=[[e,t,void 0]];for(;r.length>0;){let[e,t,i]=r.pop();for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||"proxyCache"===n)continue;let o=e[n],a=typeof o;if("parent"===n&&"object"===a)i&&(t[n]=i);else if("source"===n)t[n]=o;else if(Array.isArray(o)){let e=[];for(let i of(t[n]=e,o)){let n=new i.constructor;e.push(n),r.push([i,n,t])}}else{if("object"===a&&null!==o){let e=new o.constructor;r.push([o,e,void 0]),o=e}t[n]=o}}}return t}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new i(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markClean(){this[a]=!0}
40markDirty(){if(this[a]){this[a]=!1;let e=this;for(;e=e.parent;)e[a]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:l(t,this.source.start)};if(e.index)r=this.positionInside(e.index);else if(e.word){let i=t.slice(l(t,this.source.start),l(t,this.source.end)).indexOf(e.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=l(i,this.source.start),o=n+e;for(let e=n;e<o;e++)`
41`===i[e]?(t=1,r+=1):t+=1;return{column:t,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:l(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:l(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let n=t.slice(l(t,this.source.start),l(t,this.source.end)).indexOf(e.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:l(t,e.start)}:"number"==typeof e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:l(t,e.end)}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):"number"==typeof e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new n().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r=null==t;t=t||new Map;let i=[],n=[[this,i,0]];for(let e=0;e<n.length;e++){let[r,i,o]=n[e],a={};for(let e in i[o]=a,r){if(!Object.prototype.hasOwnProperty.call(r,e)||"parent"===e||"proxyCache"===e)continue;let i=r[e];if(Array.isArray(i)){let r=[];a[e]=r;for(let e=0;e<i.length;e++){let o=i[e];"object"==typeof o&&o.toJSON?o.toJSON===u.prototype.toJSON?n.push([o,r,e]):r[e]=o.toJSON(null,t):r[e]=o}}else if("object"==typeof i&&i.toJSON)i.toJSON===u.prototype.toJSON?n.push([i,a,e]):a[e]=i.toJSON(null,t);else if("source"===e){if(null==i)continue;let r=t.get(i.input);null==r&&(r=t.size,t.set(i.input,r)),a[e]={end:i.end,inputId:r,start:i.start}}else a[e]=i}}let o=i[0];return r&&(o.inputs=[...t.keys()].map(e=>e.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=o){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r={}){let i={node:this};for(let e in r)i[e]=r[e];return e.warn(t,i)}}e.exports=u,u.default=u},82786(e,t,r){"use strict";let i=r(47350),n=r(13933),o=r(72786);function a(e,t){let r=new o(new n(e,t));try{r.parse()}catch(e){throw e}return r.root}e.exports=a,a.default=a,i.registerParse(a)},72786(e,t,r){"use strict";let i=r(547),n=r(72280),o=r(10177),a=r(19325),s=r(96679),l=r(7896),u={empty:!0,space:!0};function c(e,t,r){let i="";for(let n=t;n<r;n++)i+=e[n][1];return i}e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,o=new i;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let a=!1,s=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&u.length>0?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length)if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}else if("{"===t){s=!0;break}else if("}"===t){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),a&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),s&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let i=0;for(let n=r-1;n>
41=0&&("space"===(t=e[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,i=0;for(let[n,o]of e.entries()){if("("===(r=o[0])&&(i+=1),")"===r&&(i-=1),0===i&&":"===r)if(t)if("word"===t[0]&&"progid"===t[1])continue;else return n;else this.doubleColon(o);t=o}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(r.trim()){let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}else t.text="",t.raws.left=r,t.raws.right=""}createTokenizer(){this.tokenizer=l(this.input)}decl(e,t){let r,i=new o;this.init(i,e[0][2]);let n=e[e.length-1];";"===n[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],i=r[3]||r[2];if(i)return i}}(e)),i.source.end.offset++;let a=0;for(;"word"!==e[a][0];)a===e.length-1&&this.unknownWord([e[a]]),a++;i.raws.before+=c(e,0,a),i.source.start=this.getPosition(e[a][2]);let s=a;for(;a<e.length;){let t=e[a][0];if(":"===t||"space"===t||"comment"===t)break;a++}i.prop=c(e,s,a);let l=a;for(;a<e.length&&(r=e[a],a++,":"!==r[0]);)"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]);i.raws.between=c(e,l,a),("_"===i.prop[0]||"*"===i.prop[0])&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let u=a;for(;a<e.length;){let t=e[a][0];if("space"!==t&&"comment"!==t)break;a++}let h=e.slice(u,a);e=e.slice(a),this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(r=e[t])[1].toLowerCase()){i.important=!0;let r=this.stringFrom(e,t);" !important"!==(r=this.spacesFromEnd(e)+r)&&(i.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=e.slice(0),n="";for(let e=t;e>0;e--){let t=r[e][0];if(n.trim().startsWith("!")&&"space"!==t)break;n=r.pop()[1]+n}n.trim().startsWith("!")&&(i.important=!0,i.raws.important=n,e=r)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(i.raws.between+=h.map(e=>e[1]).join(""),h=[]),this.raw(i,"value",h.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new s;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(r=l[0],s.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(a&&i&&"{"===r)n||(n=l),o.push("}");else if(0===o.length)if(";"===r)if(i)return void this.decl(s,a);else break;else if("{"===r)return void this.rule(s);else if("}"===r){this.tokenizer.back(s.pop()),t=!0;break}else":"===r&&(i=!0);else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;s.length&&("space"===(l=s[s.length-1][0])||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a,s,l=r.length,c="",h=!0;for(let e=0;e<l;e+=1)"space"!==(o=(n=r[e])[0])||e!==l-1||i?"comment"===o?(s=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][
410]:"empty",u[s]||u[a]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let i=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:i,value:c}}e[t]=c}rule(e){e.pop();let t=new s;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},65908(e,t,r){"use strict";var i=r(85409);let n=r(547),o=r(72280),a=r(47350),s=r(85299),l=r(10177),u=r(22072),c=r(95243),h=r(13933),d=r(17821),p=r(89029),f=r(48741),m=r(82786),g=r(39005),y=r(13740),v=r(19325),b=r(96679),_=r(89724),x=r(21589);function A(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new g(e)}A.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
42https://evilmartians.com/chronicles/postcss-8-plugin-migration`),i.env.LANG&&i.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
43https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new g().version,a}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return A([o(r)]).process(e,t)},o},A.stringify=_,A.parse=m,A.fromJSON=c,A.list=p,A.comment=e=>new o(e),A.atRule=e=>new n(e),A.decl=e=>new l(e),A.rule=e=>new b(e),A.root=e=>new v(e),A.document=e=>new u(e),A.CssSyntaxError=s,A.Declaration=l,A.Container=a,A.Processor=g,A.Document=u,A.Comment=o,A.Warning=x,A.AtRule=n,A.Result=y,A.Input=h,A.Rule=b,A.Root=v,A.Node=f,d.registerPostcss(A),e.exports=A,A.default=A},94963(e,t,r){"use strict";var i=r(36533).hp;let{existsSync:n,readFileSync:o,realpathSync:a}=r(51238),{dirname:s,isAbsolute:l,join:u,relative:c,sep:h}=r(20558),{SourceMapConsumer:d,SourceMapGenerator:p}=r(36059);function f(e){try{return a(e)}catch{return e}}class m{constructor(e,t){if(!1===t.map)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new d(this.json||this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let r=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(r){var n;return n=e.substr(r[0].length),i?i.from(n,"base64").toString():window.atob(n)}let o=e.slice(22);throw Error("Unsupported source map encoding "+(o=o.slice(0,o.indexOf(","))))}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e,t,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(e)||!t)return;let r=c(f(s(t)),f(e));if(".."===r||r.startsWith(".."+h)||l(r))return}if(this.root=s(e),n(e))return this.mapFile=e,o(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t)if("string"==typeof t)return t;else if("function"==typeof t){let r=t(e);
43if(r){let t=this.loadFile(r,e,!0);if(!t)throw Error("Unable to load previous source map: "+r.toString());return t}}else if(t instanceof d)return p.fromSourceMap(t).toString();else if(t instanceof p)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;e&&(t=u(s(e),t));let r=this.loadFile(t,e,!1);if(r)try{this.json=JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return r}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=m,m.default=m},39005(e,t,r){"use strict";let i=r(22072),n=r(17821),o=r(66330),a=r(19325);class s{constructor(e=[]){this.version="8.5.26",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new n(this,e,t):new o(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,a.registerProcessor(s),i.registerProcessor(s)},13740(e,t,r){"use strict";let i=r(21589);class n{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){!t.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new i(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}}e.exports=n,n.default=n},19325(e,t,r){"use strict";let i,n,o=r(47350);class a extends o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=new Set;for(let t of Array.isArray(e)?e:[e])t&&"object"==typeof t&&!t.parent&&t.raws&&void 0!==t.raws.before&&i.add(t.raws);let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)i.has(e.raws)||(e.raws.before=t.raws.before)}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new i(new n,this,e).stringify()}}a.registerLazyResult=e=>{i=e},a.registerProcessor=e=>{n=e},e.exports=a,a.default=a,o.registerRoot(a)},96679(e,t,r){"use strict";let i=r(47350),n=r(89029);class o extends i{get selectors(){return n.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}e.exports=o,o.default=o,i.registerRule(o)},4483(e){"use strict";let t=/(<)(\/?style\b)/gi,r=/(<)(!--)/g,i=/[\t\n\f\r "#'()/;[\\\]{}]/;function n(e){return"string"==typeof e&&e.includes("<")?e.replace(t,"\\3c $2").replace(r,"\\3c $2"):e}let o={after:`
44`,beforeClose:`
45`,beforeComment:`
46`,beforeDecl:`
47`,beforeOpen:" ",beforeRule:`
48`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function a(e,t){let r="@"+t.name,n=t.params?e.rawValue(t,"params"):"",o=t.raws.afterName;return void 0===o?o=n?" ":"":""===o&&n&&!i.test(n[0])&&(o=" "),r+o+n}function s(e,t,r){let i=r.nodes,n=i.length-1;for(;n>0&&"comment"===i[n].type;)n-=1;let o=e.raw(r,"semicolon"),a="document"===r.type;for(let e=i.length-1;e>=0;e--){let r=i[e],s=n!==e||o;!s&&e<i.length-1&&("atrule"===r.type&&!r.nodes||"decl"===r.type&&r.prop.startsWith("--"))&&(s=!0),t.push({document:a,node:r,semicolon:s})}}function l(e,t,r,i){let o=e.raw(r,"between","beforeOpen");e.builder(n(i+o)+"{",r,"start");let a=r.nodes&&r.nodes.length,l=()=>{let t=a?e.raw(r,"after"):e.raw(r,"after","emptyBody");t&&e.builder(n(t)),e.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&e.builder(n(r.raws.ownSemicolon),r,"end")};a?(t.push(l),s(e,t,r)):l()}class u{constructor(e){this.builder=e}atrule(e,t){let r=a(this,e);if(e.nodes)this.block(e,r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n(r+i),e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes(`
49`)){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,i=this.raw(e,"between","beforeOpen");this.builder(n(t+i)+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(n(r)),this.builder("}",e,"end")}body(e){let t=u.prototype,r=["atrule","block","body","rule","stringify"].every(e=>this[e]===t[e]),i=[];for(s(this,i,e);i.length>0;){let e=i.pop();if("function"==typeof e){e();continue}let t=e.node,o=this.raw(t,"before");o&&this.builder(e.document?o:n(o)),r&&"rule"===t.type?l(this,i,t,this.rawValue(t,"selector")):r&&"atrule"===t.type&&t.nodes?l(this,i,t,a(this,t)):this.stringify(t,e.semicolon)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(n("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,i=this.raw(e,"between","colon"),o=e.prop+i+this.rawValue(e,"value");e.important&&(o+=r.important||" !important"),t&&(o+=";"),this.builder(n(o),e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&void 0!==(i=e.raws[t]))return i;let n=e.parent;if("before"===r&&(!n||"root"===n.type&&n.first===e||n&&"document"===n.type))return"";if(!n)return o[r];let a=e.root(),s=a.rawCache||(a.rawCache={});if(void 0!==s[r])return s[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{var l;let n="raw"+((l=r)[0].toUpperCase()+l.slice(1));this[n]?i=this[n](a,e):a.walk(e=>{if(void 0!==(i=e.raws[t]))return!1})}return void 0===i&&(i=o[r]),s[r]=i,i}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes(`
50`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
51`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes(`
52`)&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes(`
53`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split(`
54`);return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){if(e.source&&e.source.input.hasBOM&&this.builder("\uFEFF",e,"start"),this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&"document"===e.parent.type;this.builder(r?t:n(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(n(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}
54e.exports=u,u.default=u},89724(e,t,r){"use strict";let i=r(4483);function n(e,t){new i(t).stringify(e)}e.exports=n,n.default=n},78948(e){"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},7896(e){"use strict";let t=/[\t\n\f\r "#'()/;[\\\]{}]/g,r=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,i=/.[\r\n"'(/\\]/,n=/[\da-f]/i;e.exports=function(e,o={}){let a,s,l,u,c,h,d,p,f,m,g=e.css.valueOf(),y=o.ignoreErrors,v=g.length,b=0,_=[],x=[],A=-1;function w(t){throw e.error("Unclosed "+t,b)}return{back:function(e){x.push(e)},endOfFile:function(){return 0===x.length&&b>=v},nextToken:function(e){if(x.length)return x.pop();if(b>=v)return;let o=!!e&&e.ignoreUnclosed;switch(a=g.charCodeAt(b)){case 10:case 32:case 9:case 13:case 12:u=b;do u+=1,a=g.charCodeAt(u);while(32===a||10===a||9===a||13===a||12===a)h=["space",g.slice(b,u)],b=u-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(a);h=[e,e,b];break}case 40:if(m=_.length?_.pop()[1]:"",f=g.charCodeAt(b+1),"url"===m&&39!==f&&34!==f&&32!==f&&10!==f&&9!==f&&12!==f&&13!==f){u=b;do{if(d=!1,-1===(u=g.indexOf(")",u+1)))if(y||o){u=b;break}else w("bracket");for(p=u;92===g.charCodeAt(p-1);)p-=1,d=!d}while(d)h=["brackets",g.slice(b,u+1),b,u],b=u}else b<=A?h=["(","(",b]:(u=g.indexOf(")",b+1),s=g.slice(b,u+1),-1===u||i.test(s)?(A=-1===u?v:u,h=["(","(",b]):(h=["brackets",s,b,u],b=u));break;case 39:case 34:c=39===a?"'":'"',u=b;do{if(d=!1,-1===(u=g.indexOf(c,u+1)))if(y||o){u=b+1;break}else w("string");for(p=u;92===g.charCodeAt(p-1);)p-=1,d=!d}while(d)h=["string",g.slice(b,u+1),b,u],b=u;break;case 64:t.lastIndex=b+1,t.test(g),u=0===t.lastIndex?g.length-1:t.lastIndex-2,h=["at-word",g.slice(b,u+1),b,u],b=u;break;case 92:for(u=b,l=!0;92===g.charCodeAt(u+1);)u+=1,l=!l;if(a=g.charCodeAt(u+1),l&&47!==a&&32!==a&&10!==a&&9!==a&&13!==a&&12!==a&&(u+=1,n.test(g.charAt(u)))){for(;n.test(g.charAt(u+1));)u+=1;32===g.charCodeAt(u+1)&&(u+=1)}h=["word",g.slice(b,u+1),b,u],b=u;break;default:47===a&&42===g.charCodeAt(b+1)?(0===(u=g.indexOf("*/",b+2)+1)&&(y||o?u=g.length:w("comment")),h=["comment",g.slice(b,u+1),b,u]):(r.lastIndex=b+1,r.test(g),u=0===r.lastIndex?g.length-1:r.lastIndex-2,h=["word",g.slice(b,u+1),b,u],_.push(h)),b=u}return b++,h},position:function(){return b}}}},30415(e){"use strict";let t={};e.exports=function(e){!t[e]&&(t[e]=!0,"u">typeof console&&console.warn&&console.warn(e))}},21589(e,t,r){"use strict";let i=r(47350),{my:n}=r(78948);class o{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){t.node[n]||i.rebuild(t.node);let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=o,o.default=o},85409(e){var t,r,i,n=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],u=!1,c=-1;function h(){u&&i&&(u=!1,i.length?l=i.concat(l):c=-1,l.length&&d())}function d(){if(!u){var e=s(h);u=!0;for(var t=l.length;t;){for(i=l,l=[];++c<t;)i&&i[c].run();c=-1,t=l.length}i=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}n.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new p(e,t)),1!==l.length||u||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(e){return[]},n.binding=function(e){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw Error("process.chdir is not supported")},n.umask=function(){return 0}},17265(e,t,r){"use strict";var i=r(23034);function n(){}function o(){}o.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,o,a){if(a!==i){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
54:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:n};return r.PropTypes=r,r}},5821(e,t,r){e.exports=r(17265)()},23034(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},11239(e,t,r){var i;e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var n="object"==typeof r.g&&r.g;n.global===n||n.window===n||n.self;var o,a=/^xn--/,s=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,h=String.fromCharCode;function d(e){throw RangeError(u[e])}function p(e,t){for(var r=e.length,i=[];r--;)i[r]=t(e[r]);return i}function f(e,t){var r=e.split("@"),i="";return r.length>1&&(i=r[0]+"@",e=r[1]),i+p((e=e.replace(l,".")).split("."),t).join(".")}function m(e){for(var t,r,i=[],n=0,o=e.length;n<o;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<o?(64512&(r=e.charCodeAt(n++)))==56320?i.push(((1023&t)<<10)+(1023&r)+65536):(i.push(t),n--):i.push(t);return i}function g(e){return p(e,function(e){var t="";return e>65535&&(e-=65536,t+=h(e>>>10&1023|55296),e=56320|1023&e),t+=h(e)}).join("")}function y(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function v(e,t,r){var i=0;for(e=r?c(e/700):e>>1,e+=c(e/t);e>455;i+=36)e=c(e/35);return c(i+36*e/(e+38))}function b(e){var t,r,i,n,o,a,s,l,u,h,p,f=[],m=e.length,y=0,b=128,_=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&d("not-basic"),f.push(e.charCodeAt(n));for(o=i>0?i+1:0;o<m;){for(a=y,s=1,l=36;o>=m&&d("invalid-input"),((u=(t=e.charCodeAt(o++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36)>=36||u>c((0x7fffffff-y)/s))&&d("overflow"),y+=u*s,!(u<(h=l<=_?1:l>=_+26?26:l-_));l+=36)s>c(0x7fffffff/(p=36-h))&&d("overflow"),s*=p;_=v(y-a,r=f.length+1,0==a),c(y/r)>0x7fffffff-b&&d("overflow"),b+=c(y/r),y%=r,f.splice(y++,0,b)}return g(f)}function _(e){var t,r,i,n,o,a,s,l,u,p,f,g,b,_,x,A=[];for(g=(e=m(e)).length,t=128,r=0,o=72,a=0;a<g;++a)(f=e[a])<128&&A.push(h(f));for(i=n=A.length,n&&A.push("-");i<g;){for(s=0x7fffffff,a=0;a<g;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>c((0x7fffffff-r)/(b=i+1))&&d("overflow"),r+=(s-t)*b,t=s,a=0;a<g;++a)if((f=e[a])<t&&++r>0x7fffffff&&d("overflow"),f==t){for(l=r,u=36;!(l<(p=u<=o?1:u>=o+26?26:u-o));u+=36)x=l-p,_=36-p,A.push(h(y(p+x%_,0))),l=c(x/_);A.push(h(y(l,0))),o=v(r,b,i==n),r=0,++i}++r,++t}return A.join("")}o={version:"1.4.1",ucs2:{decode:m,encode:g},decode:b,encode:_,toASCII:function(e){return f(e,function(e){return s.test(e)?"xn--"+_(e):e})},toUnicode:function(e){return f(e,function(e){return a.test(e)?b(e.slice(4).toLowerCase()):e})}},void 0===(i=(function(){return o}).call(t,r,t,e))||(e.exports=i)}()},5246(e,t,r){"use strict";r.d(t,{Yw:()=>M,gi:()=>Q});var i=r(67308);function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function l(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(this,arguments)}function h(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}
54function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){if(null==e)return{};var r,i,n=function(e,t){if(null==e)return{};var r,i,n={},o=Object.keys(e);for(i=0;i<o.length;i++)r=o[i],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function m(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,i=d(e);if(r=t?Reflect.construct(i,arguments,d(this).constructor):i.apply(this,arguments),r&&("object"==typeof r||"function"==typeof r))return r;if(void 0!==r)throw TypeError("Derived constructors may only return object or undefined");return m(this)}}function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return v(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,void 0):void 0}}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
55In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function b(e,t){return e(t={exports:{}},t.exports),t.exports}function _(){}function x(){}function A(e){return e.map(function(e){return!1===e?null:e}).join(" ").replace(/\s+/g," ").trim()}function w(e){return"".concat(e,"%")}function S(e,t,r){if(e===t)return!0;var i=G[N(e)],n=G[N(t)];return!(!i||i!==n)&&i(e,t,r)}function T(e){return function(t,r,i){if(!i)return e(t,r,[]);for(var n,o=i.length;n=i[--o];)if(n[0]===t&&n[1]===r)return!0;return e(t,r,i)}}function C(e){var t=[];for(var r in e)"constructor"!==r&&t.push(r);return t}function E(e,t){return!1!==t.clone&&t.isMergeableObject(e)?I(Array.isArray(e)?[]:{},e,t):e}function P(e,t,r){return e.concat(t).map(function(e){return E(e,r)})}function I(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||P,r.isMergeableObject=r.isMergeableObject||U;var i,n,o=Array.isArray(t);return o===Array.isArray(e)?o?r.arrayMerge(e,t,r):(n={},(i=r).isMergeableObject(e)&&Object.keys(e).forEach(function(t){n[t]=E(e[t],i)}),Object.keys(t).forEach(function(r){i.isMergeableObject(t[r])&&e[r]?n[r]=I(e[r],t[r],i):n[r]=E(t[r],i)}),n):E(t,r)}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return{}},r=function(r){function n(e,r){var i;return a(this,n),(i=s.call(this,e,r)).state=t(o({},r.state)),i.updateStateProps=i.updateStateProps.bind(m(i)),i}h(n,r);var s=g(n);return l(n,[{key:"componentDidMount",value:function(){this.context.subscribe(this.updateStateProps)}},{key:"shouldComponentUpdate",value:function(e,t){return!V(t,this.state)||!V(e,this.props)}},{key:"componentWillUnmount",value:function(){this.context.unsubscribe(this.updateStateProps)}},{key:"updateStateProps",value:function(){this.setState(t(o({},this.context.state)))}},{key:"render",value:function(){var t=this,r=q(this.state,this.props);return i.createElement(e,c({ref:function(e){t.instance=e}},r,{carouselStore:{getStoreState:this.context.getStoreState,masterSpinnerError:this.context.masterSpinnerError,masterSpinnerSuccess:this.context.masterSpinnerSuccess,setStoreState:this.context.setStoreState,subscribeMasterSpinner:this.context.subscribeMasterSpinner,unsubscribeAllMasterSpinner:this.context.unsubscribeAllMasterSpinner,unsubscribeMasterSpinner:this.context.unsubscribeMasterSpinner}}),this.props.children)}}]),n}(i.Component);return u(r,"contextType",Z),u(r,"propTypes",{children:B.children}),u(r,"defaultProps",{children:null}),r}x.resetWarningCache=_;var k=function(){function e(e,t,r,i,n,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
55:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:x,resetWarningCache:_};return r.PropTypes=r,r},O=b(function(e){e.exports=k()}),D="loading",R="success",L="error",B={children:O.oneOfType([O.arrayOf(O.node),O.node]),direction:O.oneOf(["forward","backward"]),height:function(e,t){var r=e[t];return"vertical"!==e.orientation||null!==r&&"number"==typeof r?null:Error("Missing required property '".concat(t,"' when orientation is vertical.  You must supply a number representing the height in pixels"))},orientation:O.oneOf(["horizontal","vertical"]),isBgImage:function(e,t){return!0===e[t]&&"img"===e.tag?Error("HTML img elements should not have a backgroundImage.  Please use ".concat(t," for other block-level HTML tags, like div, a, section, etc...")):null}},F=function(e){var t=e.min;return Math.min(e.max,Math.max(t,e.x))},j=["carouselStore","className","currentSlide","disabled","onClick","step","totalSlides","visibleSlides","infinite"],z=function(e){function t(e){var i;return a(this,t),(i=r.call(this,e)).handleOnClick=i.handleOnClick.bind(m(i)),i}h(t,e);var r=g(t);return l(t,[{key:"handleOnClick",value:function(e){var t=this.props,r=t.carouselStore,i=t.currentSlide,n=t.onClick,o=t.step,a=t.infinite,s=t.visibleSlides,l=t.totalSlides-s,u=Math.max(i-o,0);a&&(u=0===i?l:u),r.setStoreState({currentSlide:u,isPlaying:!1},null!==n&&n.call(this,e))}},{key:"render",value:function(){var e=this.props,r=(e.carouselStore,e.className),n=(e.currentSlide,e.disabled,e.onClick,e.step,e.totalSlides,e.visibleSlides,e.infinite),o=f(e,j),a=A(["buttonBack___1mlaL","carousel__back-button",r]),s=t.setDisabled(this.props.disabled,this.props.currentSlide,n);return i.createElement("button",c({type:"button","aria-label":"previous",className:a,onClick:this.handleOnClick,disabled:s},o),this.props.children)}}],[{key:"setDisabled",value:function(e,t,r){return null!==e?e:0===t&&!r}}]),t}(i.Component);u(z,"propTypes",{carouselStore:O.object.isRequired,children:B.children.isRequired,className:O.string,currentSlide:O.number.isRequired,disabled:O.bool,onClick:O.func,step:O.number.isRequired,totalSlides:O.number.isRequired,visibleSlides:O.number.isRequired,infinite:O.bool}),u(z,"defaultProps",{className:null,disabled:null,onClick:null,infinite:!1});var N=b(function(e,t){var r={}.toString,i="u">typeof window?window.Node:Function;e.exports=t=function(e){var t=typeof e;if("object"!=t)return t;if("object"==(t=n[r.call(e)]))return e instanceof Map?"map":e instanceof Set?"set":"object";if(t)return t;if(e instanceof i)switch(e.nodeType){case 1:return"element";case 3:return"text-node";case 9:return"document";case 11:return"document-fragment";default:return"dom-node"}};var n=t.types={"[object Function]":"function","[object Date]":"date","[object RegExp]":"regexp","[object Arguments]":"arguments","[object Array]":"array","[object Set]":"set","[object String]":"string","[object Null]":"null","[object Undefined]":"undefined","[object Number]":"number","[object Boolean]":"boolean","[object Object]":"object","[object Map]":"map","[object Text]":"text-node","[object Uint8Array]":"bit-array","[object Uint16Array]":"bit-array","[object Uint32Array]":"bit-array","[object Uint8ClampedArray]":"bit-array","[object Error]":"error","[object FormData]":"form-data","[object File]":"file","[object Blob]":"blob"}}),G=(N.types,{});G.number=function(e,t){return e!=e&&t!=t},G.function=function(e,t,r){return e.toString()===t.toString()&&G.object(e,t,r)&&S(e.prototype,t.prototype)},G.date=function(e,t){return+e==+t},G.regexp=function(e,t){return e.toString()===t.toString()},G.element=function(e,t){return e.outerHTML===t.outerHTML},G.textnode=function(e,t){return e.textContent===t.textContent},G.arguments=G["bit-array"]=G.array=T(function(e,t,r){var i=e.length;if(i!==t.length)return!1;for(r.push([e,t]);i--;)if(!S(e[i],t[i],r))return!1;return!0}),G.object=T(function(e,t,r){if("function"==typeof e.equal)return r.push([e,t]),e.equal(t,r);var i=C(e),n=C(t),o=i.length;if(o!==n.length)return!1;for(i.sort(),n.sort();o--;)if(i[o]!==n[o])return!1;for(r.push([e,t]),o=i.length;o--;){var a=i[o];if(!S(e[a],t[a],r))return!1}return!0});var V=S,U=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==H},H="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;I.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return I(e,r,t)},{})};var W,q=I,Z=i.createContext(),$=function e(t){return Object.freeze(t),Object.getOwnPropertyNames(t).forEach(function(r){!t.hasOwnProperty(r)||null===t[r]||"object"!=typeof t[r]&&"function"!=typeof t[r]||Object.isFrozen(t[r])||e(t[r])}),t},K={masterSpinnerFinished:!1},X=function(){function e(t){a(this,e),this.state=$(q(K,t)),this.subscriptions=[],this.masterSpinnerSubscriptions={}
55,this.setStoreState=this.setStoreState.bind(this),this.getStoreState=this.getStoreState.bind(this),this.subscribe=this.subscribe.bind(this),this.unsubscribe=this.unsubscribe.bind(this),this.updateSubscribers=this.updateSubscribers.bind(this),this.subscribeMasterSpinner=this.subscribeMasterSpinner.bind(this),this.unsubscribeMasterSpinner=this.unsubscribeMasterSpinner.bind(this),this.unsubscribeAllMasterSpinner=this.unsubscribeAllMasterSpinner.bind(this),this.masterSpinnerSuccess=this.masterSpinnerSuccess.bind(this),this.masterSpinnerError=this.masterSpinnerError.bind(this)}return l(e,[{key:"setStoreState",value:function(e,t){this.state=$(q(this.state,e)),this.updateSubscribers(t)}},{key:"getStoreState",value:function(){return q({},this.state)}},{key:"subscribe",value:function(e){this.subscriptions.push(e)}},{key:"unsubscribe",value:function(e){var t=this.subscriptions.indexOf(e);-1!==t&&this.subscriptions.splice(t,1)}},{key:"updateSubscribers",value:function(e){this.subscriptions.forEach(function(e){return e()}),"function"==typeof e&&e(this.getStoreState())}},{key:"subscribeMasterSpinner",value:function(e){-1===Object.keys(this.masterSpinnerSubscriptions).indexOf(e)&&(this.masterSpinnerSubscriptions[e]={success:!1,error:!1,complete:!1})}},{key:"unsubscribeMasterSpinner",value:function(e){return -1!==Object.keys(this.masterSpinnerSubscriptions).indexOf(e)&&(this.setMasterSpinnerFinished(),delete this.masterSpinnerSubscriptions[e])}},{key:"unsubscribeAllMasterSpinner",value:function(){this.masterSpinnerSubscriptions={},this.setMasterSpinnerFinished()}},{key:"masterSpinnerSuccess",value:function(e){this.masterSpinnerSubscriptions[e].success=!0,this.masterSpinnerSubscriptions[e].complete=!0,this.setMasterSpinnerFinished()}},{key:"masterSpinnerError",value:function(e){this.masterSpinnerSubscriptions[e].error=!0,this.masterSpinnerSubscriptions[e].complete=!0,this.setMasterSpinnerFinished()}},{key:"setMasterSpinnerFinished",value:function(){this.setStoreState({masterSpinnerFinished:this.isMasterSpinnerFinished()})}},{key:"isMasterSpinnerFinished",value:function(){var e=this;return 0===Object.keys(this.masterSpinnerSubscriptions).filter(function(t){return!0!==e.masterSpinnerSubscriptions[t].complete}).length}}]),e}(),Y=["children","className","currentSlide","disableAnimation","disableKeyboard","hasMasterSpinner","interval","isPageScrollLocked","isPlaying","lockOnWindowScroll","naturalSlideHeight","naturalSlideWidth","orientation","playDirection","step","dragStep","tag","totalSlides","touchEnabled","dragEnabled","visibleSlides","infinite","isIntrinsicHeight"],Q=(u(W=function(e){function t(e){var i,n;if(a(this,t),n=r.call(this,e),e.isIntrinsicHeight&&"horizontal"!==e.orientation)throw Error('isIntrinsicHeight can only be used in "horizontal" orientation. See Readme for more information.');return n.carouselStore=new X({currentSlide:e.currentSlide,disableAnimation:e.disableAnimation,disableKeyboard:e.disableKeyboard,hasMasterSpinner:e.hasMasterSpinner,imageErrorCount:0,imageSuccessCount:0,interval:e.interval,isPageScrollLocked:e.isPageScrollLocked,isPlaying:e.isPlaying,lockOnWindowScroll:e.lockOnWindowScroll,masterSpinnerThreshold:0,naturalSlideHeight:e.naturalSlideHeight,naturalSlideWidth:e.naturalSlideWidth,orientation:e.orientation,playDirection:e.playDirection,privateUnDisableAnimation:!1,slideSize:100/e.totalSlides*(i=e.visibleSlides)/i,slideTraySize:100*e.totalSlides/e.visibleSlides,step:e.step,dragStep:e.dragStep,totalSlides:e.totalSlides,touchEnabled:e.touchEnabled,dragEnabled:e.dragEnabled,visibleSlides:e.visibleSlides,infinite:e.infinite,isIntrinsicHeight:e.isIntrinsicHeight}),n}h(t,e);var r=g(t);return l(t,[{key:"componentDidUpdate",value:function(e){var t,r=this,i={};["currentSlide","disableAnimation","disableKeyboard","hasMasterSpinner","interval","isPlaying","naturalSlideHeight","naturalSlideWidth","lockOnWindowScroll","orientation","playDirection","step","dragStep","totalSlides","touchEnabled","dragEnabled","visibleSlides"].forEach(function(t){e[t]!==r.props[t]&&(i[t]=r.props[t])}),this.props.currentSlide===e.currentSlide||this.props.disableAnimation||(i.disableAnimation=!0,i.privateUnDisableAnimation=!0),this.props.totalSlides===e.totalSlides&&this.props.visibleSlides===e.visibleSlides||(i.slideSize=100/this.props.totalSlides*(t=this.props.visibleSlides)/t,i.slideTraySize=100*this.props.totalSlides/this.props.visibleSlides),this.carouselStore.state.currentSlide>=this.props.totalSlides&&(i.currentSlide=Math.max(this.props.totalSlides-1,0)),Object.keys(i).length>0&&this.carouselStore.setStoreState(i)}},{key:"componentWillUnmount",value:function(){this.carouselStore.unsubscribeAllMasterSpinner()}},{key:"getStore",value:function(){return this.carouselStore}},{key:"render",value:function(){var e=this.props,t=(e.children,e.className,e.currentSlide,e.disableAnimation,e.disableKeyboard,e.hasMasterSpinner,e.interval,e.isPageScrollLocked,e.isPlaying,e.lockOnWindowScroll,e.naturalSlideHeight,e.naturalSlideWidth,e.orientation,e.playDirection,e.step,e.dragStep,e.tag),r=(e.totalSlides,e.touchEnabled,e.dragEnabled,e.visibleSlides,e.infinite,e.isIntrinsicHeight,f(e,Y)),n=A(["carousel",this.props.className]);return i.createElement(t,c({className:n},r),i.createElement(Z.Provider,{value:this.carouselStore},this.props.children))}}]),t}
55(i.Component),"propTypes",{children:B.children.isRequired,className:O.string,currentSlide:O.number,disableAnimation:O.bool,disableKeyboard:O.bool,hasMasterSpinner:O.bool,interval:O.number,isPageScrollLocked:O.bool,isPlaying:O.bool,lockOnWindowScroll:O.bool,naturalSlideHeight:O.number.isRequired,naturalSlideWidth:O.number.isRequired,orientation:B.orientation,playDirection:B.direction,step:O.number,dragStep:O.number,tag:O.string,totalSlides:O.number.isRequired,touchEnabled:O.bool,dragEnabled:O.bool,visibleSlides:O.number,infinite:O.bool,isIntrinsicHeight:O.bool}),u(W,"defaultProps",{className:null,currentSlide:0,disableAnimation:!1,disableKeyboard:!1,hasMasterSpinner:!1,interval:5e3,isPageScrollLocked:!1,isPlaying:!1,lockOnWindowScroll:!1,orientation:"horizontal",playDirection:"forward",step:1,dragStep:1,tag:"div",touchEnabled:!0,dragEnabled:!0,visibleSlides:1,infinite:!1,isIntrinsicHeight:!1}),W);Z.Consumer,M(z,function(e){return{currentSlide:e.currentSlide,step:e.step,totalSlides:e.totalSlides,visibleSlides:e.visibleSlides,infinite:e.infinite}});var J,ee,et,er,ei,en,eo=["carouselStore","className","currentSlide","disabled","onClick","totalSlides"],ea=(M((u(J=function(e){function t(){var e;return a(this,t),(e=r.call(this)).handleOnClick=e.handleOnClick.bind(m(e)),e}h(t,e);var r=g(t);return l(t,[{key:"handleOnClick",value:function(e){var t=this.props,r=t.carouselStore,i=t.onClick;r.setStoreState({currentSlide:0,isPlaying:!1},null!==i&&i.call(this,e))}},{key:"render",value:function(){var e=this.props,t=(e.carouselStore,e.className),r=e.currentSlide,n=e.disabled,o=(e.onClick,e.totalSlides,f(e,eo)),a=A(["buttonFirst___2rhFr","carousel__first-button",t]);return i.createElement("button",c({type:"button","aria-label":"first",className:a,onClick:this.handleOnClick,disabled:null!==n?n:0===r},o),this.props.children)}}]),t}(i.Component),"propTypes",{carouselStore:O.object.isRequired,children:B.children.isRequired,className:O.string,currentSlide:O.number.isRequired,disabled:O.bool,onClick:O.func,totalSlides:O.number.isRequired}),u(J,"defaultProps",{className:null,disabled:null,onClick:null}),J),function(e){return{currentSlide:e.currentSlide,totalSlides:e.totalSlides}}),"buttonLast___2yuh0"),es=["carouselStore","className","currentSlide","disabled","onClick","totalSlides","visibleSlides"],el=(M((u(ee=function(e){function t(){var e;return a(this,t),(e=r.call(this)).handleOnClick=e.handleOnClick.bind(m(e)),e}h(t,e);var r=g(t);return l(t,[{key:"handleOnClick",value:function(e){var t=this.props,r=t.carouselStore,i=t.onClick,n=t.totalSlides,o=t.visibleSlides;r.setStoreState({currentSlide:n-o,isPlaying:!1},null!==i&&i.call(this,e))}},{key:"render",value:function(){var e=this.props,t=(e.carouselStore,e.className),r=e.currentSlide,n=e.disabled,o=(e.onClick,e.totalSlides),a=e.visibleSlides,s=f(e,es),l=A([ea,"carousel__last-button",t]);return i.createElement("button",c({type:"button","aria-label":"last",className:l,onClick:this.handleOnClick,disabled:null!==n?n:r>=o-a},s),this.props.children)}}]),t}(i.Component),"propTypes",{carouselStore:O.object.isRequired,children:B.children.isRequired,className:O.string,currentSlide:O.number.isRequired,disabled:O.bool,onClick:O.func,totalSlides:O.number.isRequired,visibleSlides:O.number.isRequired}),u(ee,"defaultProps",{className:null,disabled:null,onClick:null}),ee),function(e){return{currentSlide:e.currentSlide,totalSlides:e.totalSlides,visibleSlides:e.visibleSlides}}),"buttonNext___2mOCa"),eu=["carouselStore","className","currentSlide","disabled","onClick","step","totalSlides","visibleSlides","infinite"],ec=(M((u(et=function(e){function t(e){var i;return a(this,t),(i=r.call(this,e)).handleOnClick=i.handleOnClick.bind(m(i)),i}h(t,e);var r=g(t);return l(t,[{key:"handleOnClick",value:function(e){var t=this.props,r=t.currentSlide,i=t.onClick,n=t.step,o=t.carouselStore,a=t.infinite,s=t.totalSlides-t.visibleSlides,l=Math.min(n+r,s);a&&(l=s===r?0:l),o.setStoreState({currentSlide:l,isPlaying:!1},null!==i&&i.call(this,e))}},{key:"render",value:function(){var e=this.props,r=(e.carouselStore,e.className),n=e.currentSlide,o=e.disabled,a=(e.onClick,e.step,e.totalSlides),s=e.visibleSlides,l=e.infinite,u=f(e,eu),h=A([el,"carousel__next-button",r]),d=t.setDisabled(o,n,s,a,l);return i.createElement("button",c({type:"button","aria-label":"next",className:h,onClick:this.handleOnClick,disabled:d},u),this.props.children)}}],[{key:"setDisabled",value:function(e,t,r,i,n){return null!==e?e:t>=i-r&&!n}}]),t}
55(i.PureComponent),"propTypes",{carouselStore:O.object.isRequired,children:B.children.isRequired,className:O.string,currentSlide:O.number.isRequired,disabled:O.bool,onClick:O.func,step:O.number.isRequired,totalSlides:O.number.isRequired,visibleSlides:O.number.isRequired,infinite:O.bool}),u(et,"defaultProps",{className:null,disabled:null,onClick:null,infinite:!1}),et),function(e){return{currentSlide:e.currentSlide,step:e.step,totalSlides:e.totalSlides,visibleSlides:e.visibleSlides,infinite:e.infinite}}),"buttonNext___3Lm3s"),eh=["carouselStore","children","childrenPaused","childrenPlaying","className","isPlaying","onClick"],ed=(M((u(er=function(e){function t(e){var i;return a(this,t),(i=r.call(this,e)).handleOnClick=i.handleOnClick.bind(m(i)),i}h(t,e);var r=g(t);return l(t,[{key:"handleOnClick",value:function(e){var t=this.props.onClick;this.props.carouselStore.setStoreState({isPlaying:!this.props.isPlaying},null!==t&&t.call(this,e))}},{key:"render",value:function(){var e=this.props,t=(e.carouselStore,e.children,e.childrenPaused),r=e.childrenPlaying,n=e.className,o=e.isPlaying,a=(e.onClick,f(e,eh)),s=A([ec,"carousel__play-button",n]);return i.createElement("button",c({type:"button","aria-label":"play",className:s,onClick:this.handleOnClick},a),o&&r,!o&&t,this.props.children)}}]),t}(i.PureComponent),"propTypes",{carouselStore:O.object.isRequired,children:O.node,childrenPaused:O.node,childrenPlaying:O.node,className:O.string,isPlaying:O.bool.isRequired,onClick:O.func}),u(er,"defaultProps",{children:null,childrenPaused:null,childrenPlaying:null,className:null,onClick:null}),er),function(e){return{isPlaying:e.isPlaying}}),{dot:"dot___3c3SI"}),ep=["carouselStore","children","className","currentSlide","disabled","onClick","selected","slide","totalSlides","visibleSlides"],ef=M((u(ei=function(e){function t(e){var i;return a(this,t),(i=r.call(this,e)).handleOnClick=i.handleOnClick.bind(m(i)),i}h(t,e);var r=g(t);return l(t,[{key:"handleOnClick",value:function(e){var t=this.props,r=t.carouselStore,i=t.onClick,n=t.slide,o=t.totalSlides,a=t.visibleSlides;r.setStoreState({currentSlide:n>=o-a?o-a:n,isPlaying:!1},null!==i&&i.call(this,e))}},{key:"render",value:function(){var e=this.props,t=(e.carouselStore,e.children,e.className),r=e.currentSlide,n=e.disabled,o=(e.onClick,e.selected),a=e.slide,s=(e.totalSlides,e.visibleSlides),l=f(e,ep),u=a>=r&&a<r+s,h="boolean"==typeof o?o:u,d=A([ed.dot,h&&ed.dotSelected,"carousel__dot","carousel__dot--".concat(a),h&&"carousel__dot--selected",t]);return i.createElement("button",c({"aria-label":"slide dot",type:"button",onClick:this.handleOnClick,className:d,disabled:"boolean"==typeof n?n:!0===u},l),this.props.children)}}]),t}(i.Component),"propTypes",{carouselStore:O.object.isRequired,children:B.children,className:O.string,currentSlide:O.number.isRequired,disabled:O.bool,onClick:O.func,selected:O.bool,slide:O.number.isRequired,totalSlides:O.number.isRequired,visibleSlides:O.number.isRequired}),u(ei,"defaultProps",{children:null,className:null,disabled:null,onClick:null,selected:null}),ei),function(e){return{currentSlide:e.currentSlide,totalSlides:e.totalSlides,visibleSlides:e.visibleSlides}}),em={},eg=["renderDots"],ey=["carouselStore","children","className","currentSlide","dotNumbers","totalSlides","visibleSlides","disableActiveDots","showAsSelectedForCurrentSlideOnly","renderDots"],ev=(M((u(en=function(e){function t(){return a(this,t),r.apply(this,arguments)}h(t,e);var r=g(t);return l(t,[{key:"renderDots",value:function(){var e=this.props,t=e.currentSlide,r=e.totalSlides,n=e.visibleSlides,o=e.disableActiveDots,a=e.showAsSelectedForCurrentSlideOnly,s=e.renderDots;if(s){var l=this.props;return l.renderDots,s(f(l,eg))}for(var u=[],c=0;c<r;c+=1){var h=c>=t&&c<t+n,d=c===t,p=a?d:h,m=c>=r-n?r-n:c;u.push(i.createElement(ef,{key:c,slide:m,selected:p,disabled:!!o&&p},i.createElement("span",{className:A["carousel__dot-group-dot"]},this.props.dotNumbers&&c+1)))}return u}},{key:"render",value:function(){var e=this.props,t=(e.carouselStore,e.children),r=e.className,n=(e.currentSlide,e.dotNumbers,e.totalSlides,e.visibleSlides,e.disableActiveDots,e.showAsSelectedForCurrentSlideOnly,e.renderDots,f(e,ey)),o=A([em.DotGroup,"carousel__dot-group",r]);return i.createElement("div",c({className:o},n),this.renderDots(),t)}}]),t}
55(i.Component),"propTypes",{children:B.children,className:O.string,currentSlide:O.number.isRequired,carouselStore:O.object.isRequired,totalSlides:O.number.isRequired,visibleSlides:O.number.isRequired,dotNumbers:O.bool,disableActiveDots:O.bool,showAsSelectedForCurrentSlideOnly:O.bool,renderDots:O.func}),u(en,"defaultProps",{children:null,className:null,dotNumbers:!1,disableActiveDots:!0,showAsSelectedForCurrentSlideOnly:!1,renderDots:null}),en),function(e){return{currentSlide:e.currentSlide,totalSlides:e.totalSlides,visibleSlides:e.visibleSlides}}),{image:"image___xtQGH"}),eb=["src","alt"],e_=["carouselStore","children","className","hasMasterSpinner","isBgImage","onError","onLoad","renderError","renderLoading","style","tag"],ex=function(e){function t(e){var i;return a(this,t),(i=r.call(this,e)).state={imageStatus:D},i.handleImageLoad=i.handleImageLoad.bind(m(i)),i.handleImageError=i.handleImageError.bind(m(i)),i.image=null,i}h(t,e);var r=g(t);return l(t,[{key:"componentDidMount",value:function(){t.subscribeMasterSpinner(this.props),this.initImage()}},{key:"componentDidUpdate",value:function(e){e.src!==this.props.src&&(t.unsubscribeMasterSpinner(e),t.subscribeMasterSpinner(this.props),this.initImage())}},{key:"componentWillUnmount",value:function(){t.unsubscribeMasterSpinner(this.props),this.image.removeEventListener("load",this.handleImageLoad),this.image.removeEventListener("error",this.handleImageError),this.image=null}},{key:"initImage",value:function(){if(this.setState({imageStatus:D}),this.image=document.createElement("img"),this.image.addEventListener("load",this.handleImageLoad,!1),this.image.addEventListener("error",this.handleImageError,!1),this.image.src=this.props.src,this.image.readyState||this.image.complete){var e=this.image.src;this.image.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",this.image.src=e}}},{key:"handleImageLoad",value:function(e){this.setState({imageStatus:R}),this.props.hasMasterSpinner&&this.props.carouselStore.masterSpinnerSuccess(this.props.src),this.props.onLoad&&this.props.onLoad(e)}},{key:"handleImageError",value:function(e){this.setState({imageStatus:L}),this.props.hasMasterSpinner&&this.props.carouselStore.masterSpinnerError(this.props.src),this.props.onError&&this.props.onError(e)}},{key:"tempTag",value:function(){return"img"===this.props.tag?"div":this.props.tag}},{key:"customRender",value:function(e){return"function"==typeof this.props[e]?this.props[e]():this.props.children}},{key:"renderLoading",value:function(e){var t=this.tempTag(),r=A([ev.image,ev.imageLoading,"carousel__image",this.props.isBgImage&&"carousel__image--with-background","carousel__image--loading",this.props.className]);return i.createElement(t,c({className:r},e),this.customRender("renderLoading"))}},{key:"renderError",value:function(e){var t=this.tempTag(),r=A([ev.image,ev.imageError,"carousel__image",this.props.isBgImage&&"carousel__image--with-background","carousel__image--error",this.props.className]);return i.createElement(t,c({className:r},e),this.customRender("renderError"))}},{key:"renderSuccess",value:function(e){var t=this.props,r=t.style,n=t.tag,o=A([ev.image,"carousel__image",this.props.isBgImage&&"carousel__image--with-background","carousel__image--success",this.props.className]),a=c({},r),s=e;if("img"!==n){var l=e.src;e.alt,s=f(e,eb),a=c({},r,{backgroundImage:'url("'.concat(l,'")'),backgroundSize:"cover"})}return i.createElement(n,c({className:o,style:a},s),this.props.children)}},{key:"render",value:function(){var e=this.props,t=(e.carouselStore,e.children,e.className,e.hasMasterSpinner,e.isBgImage,e.onError,e.onLoad,e.renderError,e.renderLoading,e.style,e.tag,f(e,e_));switch(this.state.imageStatus){case D:return this.renderLoading(t);case R:return this.renderSuccess(t);case L:return this.renderError(t);default:throw Error("unknown value for this.state.imageStatus")}}}],[{key:"subscribeMasterSpinner",value:function(e){e.hasMasterSpinner&&e.carouselStore.subscribeMasterSpinner(e.src)}},{key:"unsubscribeMasterSpinner",value:function(e){e.hasMasterSpinner&&e.carouselStore.unsubscribeMasterSpinner(e.src)}}]),t}(i.Component);
55u(ex,"propTypes",{alt:O.string,carouselStore:O.object.isRequired,children:B.children,className:O.string,hasMasterSpinner:O.bool.isRequired,isBgImage:B.isBgImage,onError:O.func,onLoad:O.func,renderError:O.func,renderLoading:O.func,src:O.string.isRequired,style:O.object,tag:O.string}),u(ex,"defaultProps",{alt:"",children:null,className:null,isBgImage:!1,onError:null,onLoad:null,renderError:null,renderLoading:null,style:null,tag:"img"});var eA,ew,eS,eT,eC=M(ex,function(e){return{hasMasterSpinner:e.hasMasterSpinner,orientation:e.orientation}}),eE=["className"],eP=(u(eA=function(e){function t(){return a(this,t),r.apply(this,arguments)}h(t,e);var r=g(t);return l(t,[{key:"render",value:function(){var e=this.props,t=e.className,r=f(e,eE),n=A(["spinner___27VUp","carousel__spinner",t]);return i.createElement("div",c({className:n},r))}}]),t}(i.PureComponent),"propTypes",{className:O.string}),u(eA,"defaultProps",{className:null}),eA),eI={container:"container___2O72F",overlay:"overlay___IV4qY",hover:"hover___MYy31",zoom:"zoom___3kqYk",loading:"loading___1pvNI",imageLoadingSpinnerContainer:"imageLoadingSpinnerContainer___3UIPD"},eM=["alt","bgImageProps","bgImageTag","carouselStore","className","imageClassName","overlayClassName","isPinchZoomEnabled","spinner","src","srcZoomed","tag"],ek=(M((u(ew=function(e){function t(e){var i;return a(this,t),(i=r.call(this,e)).state={isImageLoading:!0,isImageLoadingError:!0,isHovering:!1,isZooming:!1,x:null,y:null,scale:1},i.tpCache={},i.handleImageComplete=i.handleImageComplete.bind(m(i)),i.handleImageLoadError=i.handleImageLoadError.bind(m(i)),i.handleOnMouseMove=i.handleOnMouseMove.bind(m(i)),i.handleOnMouseOut=i.handleOnMouseOut.bind(m(i)),i.handleOnMouseOver=i.handleOnMouseOver.bind(m(i)),i.handleOnTouchEnd=i.handleOnTouchEnd.bind(m(i)),i.handleOnTouchMove=i.handleOnTouchMove.bind(m(i)),i.handleOnTouchStart=i.handleOnTouchStart.bind(m(i)),i}h(t,e);var r=g(t);return l(t,[{key:"componentDidUpdate",value:function(e,t){!1===t.isZooming&&!0===this.state.isZooming&&this.props.carouselStore.setStoreState({isPageScrollLocked:!0}),!0===t.isZooming&&!1===this.state.isZooming&&this.props.carouselStore.setStoreState({isPageScrollLocked:!1})}},{key:"handleImageComplete",value:function(e){this.setState({isImageLoading:!1}),this.props&&this.props.onLoad&&this.props.onLoad(e)}},{key:"handleImageLoadError",value:function(e){this.setState({isImageLoadingError:!0,isImageLoading:!1}),this.props&&this.props.onError&&this.props.onError(e)}},{key:"handleOnMouseOver",value:function(){this.state.isZooming||this.setState({isHovering:!0,scale:2})}},{key:"handleOnMouseOut",value:function(){this.state.isZooming||this.setState({isHovering:!1,scale:1})}},{key:"handleOnMouseMove",value:function(e){if(!this.state.isZooming){var t=w(e.nativeEvent.offsetX/e.target.offsetWidth*100),r=w(e.nativeEvent.offsetY/e.target.offsetHeight*100);this.setState({x:t,y:r})}}},{key:"handleOnTouchStart",value:function(e){var t=this;this.props.isPinchZoomEnabled&&(y(e.targetTouches).forEach(function(e){t.tpCache[e.identifier]={clientX:e.clientX,clientY:e.clientY}}),this.setState(function(e){return{isZooming:e.isZooming||Object.keys(t.tpCache).length>1}}))}},{key:"handleOnTouchMove",value:function(e){var r=this;if(this.state.isZooming){e.persist();var i=y(e.targetTouches).filter(function(e){return r.tpCache[e.identifier]}).slice(0,2);if(2===i.length){e.stopPropagation();var n=e.target.getBoundingClientRect(),a=i[0].identifier,s=i[1].identifier,l={x1:this.tpCache[a].clientX,y1:this.tpCache[a].clientY,x2:this.tpCache[s].clientX,y2:this.tpCache[s].clientY};l.distance=t.distanceBetweenTwoTouches(o({},l));var u=t.midpointBetweenTwoTouches(o({},l));l.cx=u.x,l.cy=u.y;var c={x1:i[0].clientX,y1:i[0].clientY,x2:i[1].clientX,y2:i[1].clientY};c.distance=t.distanceBetweenTwoTouches(o({},c));var h=t.midpointBetweenTwoTouches(o({},c));c.cx=h.x,c.cy=h.y;var d=w(F({min:0,max:100,x:(c.cx-n.left)/n.width*100})),p=w(F({min:0,max:100,x:(c.cy-n.top)/n.height*100})),f=function(e){return F({min:1,max:3,x:e.scale+(c.distance-l.distance)/100})};this.setState(function(e){return{isZooming:1!==f(e),scale:f(e),x:d,y:p}})}}}},{key:"handleOnTouchEnd",value:function(e){var t=this;
55this.props.isPinchZoomEnabled&&(y(e.changedTouches).forEach(function(e){delete t.tpCache[e.identifier]}),0===Object.keys(this.tpCache).length&&this.setState({isZooming:!1}))}},{key:"renderLoading",value:function(){if(this.state.isImageLoading){var e=this.props.spinner;return i.createElement("div",{className:A([eI.imageLoadingSpinnerContainer,"carousel__image-loading-spinner-container"])},e&&e(),!e&&i.createElement(eP,null))}return null}},{key:"render",value:function(){var e=this.props,t=e.alt,r=e.bgImageProps,n=e.bgImageTag,o=(e.carouselStore,e.className),a=e.imageClassName,s=e.overlayClassName,l=(e.isPinchZoomEnabled,e.spinner,e.src),u=e.srcZoomed,h=e.tag,d=f(e,eM),p=A([eI.container,o]),m=A([eI.image,"carousel__zoom-image",a]),g=A([eI.overlay,"carousel__zoom-image-overlay",this.state.isHovering&&eI.hover,this.state.isZooming&&eI.zoom,this.state.isHovering&&"carousel__zoom-image-overlay--hovering",this.state.isZooming&&"carousel__zoom-image-overlay--zooming",s]),y={};return(this.state.isHovering||this.state.isZooming)&&(y.transformOrigin="".concat(this.state.x," ").concat(this.state.y),y.transform="scale(".concat(this.state.scale,")")),i.createElement(h,c({className:p},d),i.createElement(eC,c({alt:t,className:m,tag:n,src:l,onLoad:this.handleImageComplete,onError:this.handleImageLoadError},r)),i.createElement(eC,{className:g,tag:"div",src:u||l,style:y,isBgImage:!0,onFocus:this.handleOnMouseOver,onMouseOver:this.handleOnMouseOver,onBlur:this.handleOnMouseOut,onMouseOut:this.handleOnMouseOut,onMouseMove:this.handleOnMouseMove,onTouchStart:this.handleOnTouchStart,onTouchEnd:this.handleOnTouchEnd,onTouchMove:this.handleOnTouchMove}),this.renderLoading())}}],[{key:"midpointBetweenTwoTouches",value:function(e){var t=e.x1,r=e.y1;return{x:(t+e.x2)/2,y:(r+e.y2)/2}}},{key:"distanceBetweenTwoTouches",value:function(e){var t=e.x1,r=e.y1;return Math.sqrt(Math.pow(e.x2-t,2)+Math.pow(e.y2-r,2))}}]),t}(i.Component),"propTypes",{alt:O.string,bgImageProps:O.object,bgImageTag:O.string,carouselStore:O.object.isRequired,className:O.string,imageClassName:O.string,overlayClassName:O.string,spinner:O.func,onLoad:O.func,onError:O.func,src:O.string.isRequired,srcZoomed:O.string,tag:O.string,isPinchZoomEnabled:O.bool}),u(ew,"defaultProps",{alt:void 0,bgImageProps:{},bgImageTag:"div",className:null,imageClassName:null,overlayClassName:null,isPinchZoomEnabled:!0,spinner:null,onLoad:null,onError:null,srcZoomed:null,tag:"div"}),ew),function(){return{}}),"slide___3-Nqo"),eO=["ariaLabel","carouselStore","children","className","classNameHidden","classNameVisible","currentSlide","index","innerClassName","innerTag","naturalSlideHeight","naturalSlideWidth","onBlur","onFocus","orientation","slideSize","style","tag","totalSlides","visibleSlides","isIntrinsicHeight"],eD=(M((u(eS=function(e){function t(e){var i;return a(this,t),(i=r.call(this,e)).handleOnFocus=i.handleOnFocus.bind(m(i)),i.handleOnBlur=i.handleOnBlur.bind(m(i)),i.state={focused:!1},i}h(t,e);var r=g(t);return l(t,[{key:"isVisible",value:function(){var e=this.props,t=e.currentSlide,r=e.index,i=e.visibleSlides;return r>=t&&r<t+i}},{key:"handleOnFocus",value:function(e){var t=this,r=this.props.onFocus;this.setState({focused:!0},function(){null!==r&&r.call(t,e)})}},{key:"handleOnBlur",value:function(e){var t=this,r=this.props.onBlur;this.setState({focused:!1},function(){null!==r&&r.call(t,e)})}},{key:"renderFocusRing",value:function(){return this.state.focused?i.createElement("div",{className:"focusRing___1airF carousel__slide-focus-ring"}):null}},{key:"render",value:function(){var e=this,t=this.props,r=t.ariaLabel,n=(t.carouselStore,t.children,t.className),o=t.classNameHidden,a=t.classNameVisible,s=(t.currentSlide,t.index,t.innerClassName),l=t.innerTag,u=t.naturalSlideHeight,h=t.naturalSlideWidth,d=(t.onBlur,t.onFocus,t.orientation),p=t.slideSize,m=t.style,g=t.tag,y=t.totalSlides,v=(t.visibleSlides,t.isIntrinsicHeight),b=f(t,eO),_={};"horizontal"===d?(_.width=w(p),_.paddingBottom=w(100*u/(h*y))):(_.width=w(100),_.paddingBottom=w(100*u/h));var x={};v&&("horizontal"===d?_.height="unset":_.width="unset",_.paddingBottom="unset",x.position="unset");var S=c({},_,m),T=this.isVisible(),C=A([ek,"horizontal"===d&&"slideHorizontal___1NzNV","carousel__slide",this.state.focused&&"carousel__slide--focused",T&&a,T&&"carousel__slide--visible",!T&&o,!T&&"carousel__slide--hidden",n]),E=A(["slideInner___2mfX9","carousel__inner-slide",s]);return i.createElement(g,c({ref:function(t){e.tagRef=t},"aria-selected":this.isVisible(),"aria-label":r,role:this.props.role,onF
55ocus:this.handleOnFocus,onBlur:this.handleOnBlur,className:C,style:S},b),i.createElement(l,{ref:function(t){e.innerTagRef=t},className:E,style:x},this.props.children,this.renderFocusRing()))}}]),t}(i.PureComponent),"propTypes",{ariaLabel:O.string,carouselStore:O.object,children:B.children,className:O.string,classNameHidden:O.string,classNameVisible:O.string,currentSlide:O.number.isRequired,index:O.number.isRequired,innerClassName:O.string,innerTag:O.string,naturalSlideHeight:O.number.isRequired,naturalSlideWidth:O.number.isRequired,onBlur:O.func,onFocus:O.func,orientation:B.orientation.isRequired,slideSize:O.number.isRequired,role:O.string,style:O.object,tag:O.string,totalSlides:O.number.isRequired,visibleSlides:O.number.isRequired,isIntrinsicHeight:O.bool}),u(eS,"defaultProps",{ariaLabel:"slide",carouselStore:null,children:null,className:null,classNameHidden:null,classNameVisible:null,innerClassName:null,innerTag:"div",onBlur:null,onFocus:null,role:"option",style:{},tag:"div",isIntrinsicHeight:!1}),eS),function(e){return{currentSlide:e.currentSlide,naturalSlideHeight:e.naturalSlideHeight,naturalSlideWidth:e.naturalSlideWidth,orientation:e.orientation,slideSize:e.slideSize,totalSlides:e.totalSlides,visibleSlides:e.visibleSlides,isIntrinsicHeight:e.isIntrinsicHeight}}),function(){function e(){a(this,e)}return l(e,[{key:"parents",value:function(e,t){return null===e.parentNode?t:this.parents(e.parentNode,t.concat([e]))}},{key:"scrollParent",value:function(t){for(var r=this.parents(t.parentNode,[]),i=0;i<r.length;i+=1)if(e.scroll(r[i]))return r[i];return document.scrollingElement||document.documentElement}},{key:"getScrollParent",value:function(t){return e.isNodeValid(t)?this.scrollParent(t):null}}],[{key:"style",value:function(e,t){return getComputedStyle(e,null).getPropertyValue(t)}},{key:"overflow",value:function(t){return e.style(t,"overflow")+e.style(t,"overflow-y")+e.style(t,"overflow-x")}},{key:"scroll",value:function(t){return/(auto|scroll)/.test(e.overflow(t))}},{key:"isNodeValid",value:function(e){return e instanceof HTMLElement||e instanceof SVGElement}}]),e}()),eR={horizontalSlider:"horizontalSlider___281Ls",touchDisabled:"touchDisabled___2qs4y",horizontalSliderTray:"horizontalSliderTray___1L-0W",verticalSlider:"verticalSlider___34ZFD",verticalSliderTray:"verticalSliderTray___267D8",verticalTray:"verticalTray___12Key",verticalSlideTrayWrap:"verticalSlideTrayWrap___2nO7o",sliderTray:"sliderTray___-vHFQ",sliderAnimation:"sliderAnimation___300FY",masterSpinnerContainer:"masterSpinnerContainer___1Z6hB"},eL=["ariaLabel","carouselStore","children","className","classNameAnimation","classNameTray","classNameTrayWrap","currentSlide","disableAnimation","disableKeyboard","dragEnabled","hasMasterSpinner","interval","isPageScrollLocked","isPlaying","lockOnWindowScroll","masterSpinnerFinished","moveThreshold","naturalSlideHeight","naturalSlideWidth","onMasterSpinner","orientation","playDirection","privateUnDisableAnimation","slideSize","slideTraySize","spinner","style","totalSlides","touchEnabled","trayProps","trayTag","visibleSlides","isIntrinsicHeight"],eB=["dragStep","step","infinite","preventVerticalScrollOnTouch","preventingVerticalScroll","horizontalPixelThreshold","verticalPixelThreshold"],eF=["className","onClickCapture","onMouseDown","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","ref","style"];M((u(eT=function(e){function t(e){var i;return a(this,t),(i=r.call(this,e)).getSliderRef=i.getSliderRef.bind(m(i)),i.handleDocumentScroll=i.handleDocumentScroll.bind(m(i)),i.handleOnClickCapture=i.handleOnClickCapture.bind(m(i)),i.handleOnKeyDown=i.handleOnKeyDown.bind(m(i)),i.handleOnMouseDown=i.handleOnMouseDown.bind(m(i)),i.handleOnMouseMove=i.handleOnMouseMove.bind(m(i)),i.handleOnMouseUp=i.handleOnMouseUp.bind(m(i)),i.handleOnTouchCancel=i.handleOnTouchCancel.bind(m(i)),i.handleOnTouchEnd=i.handleOnTouchEnd.bind(m(i)),i.handleOnTouchMove=i.handleOnTouchMove.bind(m(i)),i.handleOnTouchStart=i.handleOnTouchStart.bind(m(i)),i.playBackward=i.playBackward.bind(m(i)),i.playForward=i.playForward.bind(m(i)),i.callCallback=i.callCallback.bind(m(i)),i.blockWindowScroll=i.blockWindowScroll.bind(m(i)),i.state={cancelNextClick:!1,deltaX:0,deltaY:0,isBeingMouseDragged:!1,isBeingTouchDragged:!1,preventingVerticalScroll:!1,startX:0,startY:0},i.interval=null,i.isDocumentScrolling=null,i.moveTimer=null,i.originalOverflow=null,i.scrollParent=null,i.scrollStopTimer=null,i}h(t,e);var r=g(t);
55return l(t,[{key:"componentDidMount",value:function(){this.props.lockOnWindowScroll&&window.addEventListener("scroll",this.handleDocumentScroll,!1),(this.props.touchEnabled||this.props.preventVerticalScrollOnTouch)&&window.addEventListener("touchmove",this.blockWindowScroll,!1),document.documentElement.addEventListener("mouseleave",this.handleOnMouseUp,!1),document.documentElement.addEventListener("mousemove",this.handleOnMouseMove,!1),document.documentElement.addEventListener("mouseup",this.handleOnMouseUp,!1),this.props.isPlaying&&this.play()}},{key:"componentDidUpdate",value:function(e){!e.isPlaying&&this.props.isPlaying&&this.play(),e.isPlaying&&!this.props.isPlaying&&this.stop(),!e.isPageScrollLocked&&this.props.isPageScrollLocked&&this.lockScroll(),e.isPageScrollLocked&&!this.props.isPageScrollLocked&&this.unlockScroll(),!1===e.privateUnDisableAnimation&&!0===this.props.privateUnDisableAnimation&&this.props.carouselStore.setStoreState({privateUnDisableAnimation:!1,disableAnimation:!1})}},{key:"componentWillUnmount",value:function(){document.documentElement.removeEventListener("mouseleave",this.handleOnMouseUp,!1),document.documentElement.removeEventListener("mousemove",this.handleOnMouseMove,!1),document.documentElement.removeEventListener("mouseup",this.handleOnMouseUp,!1),window.removeEventListener("scroll",this.handleDocumentScroll,!1),window.removeEventListener("touchmove",this.blockWindowScroll,!1),this.stop(),window.cancelAnimationFrame.call(window,this.moveTimer),window.clearTimeout(this.scrollStopTimer),this.isDocumentScrolling=null,this.moveTimer=null,this.scrollStopTimer=null}},{key:"getSliderRef",value:function(e){if(this.sliderTrayElement=e,e&&window){var t=e.closest(".carousel");t&&(this.rtl="rtl"===window.getComputedStyle(t,null).getPropertyValue("direction"))}}},{key:"fakeOnDragStart",value:function(e){var t=e.screenX,r=e.screenY,i=e.touchDrag,n=e.mouseDrag;this.props.carouselStore.setStoreState({isPlaying:!1}),window.cancelAnimationFrame.call(window,this.moveTimer),"vertical"===this.props.orientation&&this.props.carouselStore.setStoreState({isPageScrollLocked:!0}),this.setState({isBeingTouchDragged:void 0!==i&&i,isBeingMouseDragged:void 0!==n&&n,startX:t,startY:r})}},{key:"fakeOnDragMove",value:function(e,t){var r=this;window.cancelAnimationFrame.call(window,this.moveTimer),this.moveTimer=window.requestAnimationFrame.call(window,function(){r.setState(function(i){return{deltaX:(e-i.startX)*(r.rtl?-1:1),deltaY:t-i.startY,preventingVerticalScroll:Math.abs(t-i.startY)<=r.props.verticalPixelThreshold&&Math.abs(e-i.startX)>=r.props.horizontalPixelThreshold}})})}},{key:"fakeOnDragEnd",value:function(){window.cancelAnimationFrame.call(window,this.moveTimer),this.computeCurrentSlide(),"vertical"===this.props.orientation&&this.props.carouselStore.setStoreState({isPageScrollLocked:!1}),this.setState({deltaX:0,deltaY:0,isBeingTouchDragged:!1,isBeingMouseDragged:!1}),this.isDocumentScrolling=!this.props.lockOnWindowScroll&&null}},{key:"callCallback",value:function(e,t){var r=this.props.trayProps;r&&"function"==typeof r[e]&&(t.persist(),r[e](t))}},{key:"handleOnMouseDown",value:function(e){this.props.dragEnabled&&(e.preventDefault(),this.fakeOnDragStart({screenX:e.screenX,screenY:e.screenY,mouseDrag:!0})),this.callCallback("onMouseDown",e)}},{key:"handleOnMouseMove",value:function(e){this.state.isBeingMouseDragged&&(this.setState({cancelNextClick:!0}),e.preventDefault(),this.fakeOnDragMove(e.screenX,e.screenY))}},{key:"handleOnMouseUp",value:function(e){this.state.isBeingMouseDragged&&(e.preventDefault(),this.fakeOnDragEnd())}},{key:"handleOnClickCapture",value:function(e){this.state.cancelNextClick&&(e.preventDefault(),this.setState({cancelNextClick:!1})),this.callCallback("onClickCapture",e)}},{key:"handleOnTouchStart",value:function(e){if(!this.props.touchEnabled)return void this.callCallback("onTouchStart",e);"vertical"===this.props.orientation&&e.preventDefault();var t=e.targetTouches[0];this.fakeOnDragStart({screenX:t.screenX,screenY:t.screenY,touchDrag:!0}),this.callCallback("onTouchStart",e)}},{key:"handleDocumentScroll",value:function(){var e=this;this.props.touchEnabled&&(this.isDocumentScrolling=!0,window.clearTimeout(this.scrollStopTimer),this.scrollStopTimer=window.setTimeout(function(){e.isDocumentScrolling=!1},66))}},{key:"handleOnTouchMove",value:function(e){if(!this.props.touchEnabled||this.props.lockOnWindowScroll&&this.isDocumentScrolling)return void this.callCallback("onTouchMove",e);var t=e.targetTouches[0];t&&(this.fakeOnDragMove(t.screenX,t.screenY),this.callCallback("onTouchMove",e))}},{key:"forward",value:function(){var e=this.props;return Math.min(e.currentSlide+e.step,e.totalSlides-e.visibleSlides)}},{key:"backward",value:function(){var e=this.props;return Math.max(e.currentSlide-e.step,0)}},{key:"handleOnKeyDown",value:function(e){var t=e.keyCode,r=this.props,i=r.carouselStore,
55n=r.currentSlide,o=r.disableKeyboard,a=r.totalSlides,s=r.visibleSlides,l={};!0===o||a<=s||(37===t&&(e.preventDefault(),this.focus(),l.currentSlide=Math.max(0,n-1),l.isPlaying=!1),39===t&&(e.preventDefault(),this.focus(),l.currentSlide=Math.min(a-s,n+1),l.isPlaying=!1),i.setStoreState(l))}},{key:"playForward",value:function(){var e=this.props,t=e.carouselStore,r=e.currentSlide;t.setStoreState({currentSlide:this.forward()===r?0:this.forward()})}},{key:"playBackward",value:function(){var e=this.props,t=e.carouselStore,r=e.currentSlide,i=e.totalSlides,n=e.visibleSlides;t.setStoreState({currentSlide:this.backward()===r?i-n:this.backward()})}},{key:"play",value:function(){var e=this.props.playDirection;this.interval=setInterval("forward"===e?this.playForward:this.playBackward,this.props.interval)}},{key:"stop",value:function(){window.clearInterval(this.interval),this.interval=null}},{key:"lockScroll",value:function(){var e=new eD;this.scrollParent=e.getScrollParent(this.sliderTrayElement),this.scrollParent&&(this.originalOverflow=this.originalOverflow||this.scrollParent.style.overflow,this.scrollParent.style.overflow="hidden")}},{key:"unlockScroll",value:function(){this.scrollParent&&(this.scrollParent.style.overflow=this.originalOverflow,this.originalOverflow=null,this.scrollParent=null)}},{key:"blockWindowScroll",value:function(e){this.state.preventingVerticalScroll&&(e.preventDefault(),e.stopImmediatePropagation())}},{key:"computeCurrentSlide",value:function(){var e=t.slideSizeInPx(this.props.orientation,this.sliderTrayElement.clientWidth,this.sliderTrayElement.clientHeight,this.props.totalSlides),r=t.slidesMoved(this.props.moveThreshold,this.props.orientation,this.state.deltaX,this.state.deltaY,e,this.props.dragStep),i=this.props.totalSlides-Math.min(this.props.totalSlides,this.props.visibleSlides),n=F({min:0,max:i,x:this.props.currentSlide+r});this.props.infinite&&(this.props.currentSlide>=i&&r>0&&(n=0),0===this.props.currentSlide&&r<0&&(n=i)),this.props.carouselStore.setStoreState({currentSlide:n})}},{key:"focus",value:function(){this.sliderElement.focus()}},{key:"handleOnTouchEnd",value:function(e){this.endTouchMove(),this.callCallback("onTouchEnd",e)}},{key:"handleOnTouchCancel",value:function(e){this.endTouchMove(),this.callCallback("onTouchCancel",e)}},{key:"endTouchMove",value:function(){this.props.touchEnabled&&this.fakeOnDragEnd()}},{key:"renderMasterSpinner",value:function(){var e=this.props,t=e.hasMasterSpinner,r=e.masterSpinnerFinished,n=e.spinner;return t&&!r?("function"==typeof this.props.onMasterSpinner&&this.props.onMasterSpinner(),i.createElement("div",{className:A([eR.masterSpinnerContainer,"carousel__master-spinner-container"])},n&&n(),!n&&i.createElement(eP,null))):null}},{key:"render",value:function(){var e=this,t=this.props,r=t.ariaLabel,n=(t.carouselStore,t.children),o=t.className,a=t.classNameAnimation,s=t.classNameTray,l=t.classNameTrayWrap,u=t.currentSlide,h=t.disableAnimation,d=(t.disableKeyboard,t.dragEnabled,t.hasMasterSpinner,t.interval,t.isPageScrollLocked,t.isPlaying,t.lockOnWindowScroll,t.masterSpinnerFinished,t.moveThreshold,t.naturalSlideHeight),p=t.naturalSlideWidth,m=(t.onMasterSpinner,t.orientation),g=(t.playDirection,t.privateUnDisableAnimation,t.slideSize),y=t.slideTraySize,v=(t.spinner,t.style),b=(t.totalSlides,t.touchEnabled),_=t.trayProps,x=t.trayTag,S=t.visibleSlides,T=t.isIntrinsicHeight,C=f(t,eL),E=c({},v),P={};"vertical"===m&&(P.height=0,P.paddingBottom=w(100*d*S/p),P.width=w(100));var I={},M=w(-(g*u*1));(this.state.isBeingTouchDragged||this.state.isBeingMouseDragged||h)&&(I.transition="none"),T&&(I.display="flex",I.alignItems="stretch"),"vertical"===m?(I.transform="translateY(".concat(M,") translateY(").concat(this.state.deltaY,"px)"),I.width=w(100),I.flexDirection="column"):(I.width=w(y),I.transform="translateX(".concat(M,") translateX(").concat(this.state.deltaX,"px)"),I.flexDirection="row");var k=A(["vertical"===m?eR.verticalSlider:eR.horizontalSlider,!b&&eR.touchDisabled,"carousel__slider","vertical"===m?"carousel__slider--vertical":"carousel__slider--horizontal",o]),O=A([eR.sliderTrayWrap,"carousel__slider-tray-wrapper","vertical"===m?eR.verticalSlideTrayWrap:eR.horizontalTrayWrap,"vertical"===m?"carousel__slider-tray-wrap--vertical":"carousel__slider-tray-wrap--horizontal",l]),D=A([eR.sliderTray,a||eR.sliderAnimation,"carousel__slider-tray","vertical"===m?eR.verticalTray:eR.horizontalTray,"vertical"===m?"carousel__slider-tray--vertical":"carousel__slider-tray--horizontal",s]),R=(C.dragStep,C.step,C.infinite,C.preventVerticalScrollOnTouch,C.preventingVerticalScroll,C.horizontalPixelThreshold,C.verticalPixelThreshold,f(C,eB)),L=(_.className,_.onClickCapture,_.onMouseDown,_.onTouchCancel,_.onTouchEnd,_.onTouchMove,_.onTouchStart,_.ref,_.style,f(_,eF));return i.createElement("div",c({ref:function(t){e.sliderElement=t},className:k,"aria-live":"polite","aria-label":r,role:this.props.role,style:E,onKeyDown:this.handleOnKeyDown},R),i.createElement("div",{className:O,style:P},i.createElement(x,c({ref:this.getSliderRef,className:D,style:I,onTouchStart:this.handleOnTouchStart,onTouchMove:this.handleOnTouchMove,onTouchEnd:this.handleOnTouchEnd,onTouchCancel:this.handleOnTouchCancel,onMouseDown:this.handleOnMouseDown,onClickCapture:this.handleOnClickCapture},L),n),this.renderMasterSpinner()))}}],[{key:"slideSizeInPx",value:function(e,t,r,i){return("horizontal"===e?t:r)/i}},{key:"slidesMoved",value:function(e,t,r,i,n,o){var a="horizontal"===t?r:i,s=Math.abs(Math.round(a/n)),l=Math.max(Math.abs(a)>=n*e?o:0,s);if(a<0)return l;var u=-l;return 0===u?0:u}}]),t}
55(i.Component),"propTypes",{ariaLabel:O.string,carouselStore:O.object.isRequired,children:O.node.isRequired,className:O.string,classNameAnimation:O.string,classNameTray:O.string,classNameTrayWrap:O.string,currentSlide:O.number.isRequired,disableAnimation:O.bool,disableKeyboard:O.bool,dragEnabled:O.bool.isRequired,dragStep:O.number,hasMasterSpinner:O.bool.isRequired,infinite:O.bool,interval:O.number.isRequired,isPageScrollLocked:O.bool.isRequired,isPlaying:O.bool.isRequired,lockOnWindowScroll:O.bool.isRequired,preventVerticalScrollOnTouch:O.bool,horizontalPixelThreshold:O.number,verticalPixelThreshold:O.number,masterSpinnerFinished:O.bool.isRequired,moveThreshold:O.number,naturalSlideHeight:O.number.isRequired,naturalSlideWidth:O.number.isRequired,onMasterSpinner:O.func,orientation:B.orientation.isRequired,playDirection:B.direction.isRequired,privateUnDisableAnimation:O.bool,role:O.string,slideSize:O.number.isRequired,slideTraySize:O.number.isRequired,spinner:O.func,step:O.number.isRequired,style:O.object,totalSlides:O.number.isRequired,touchEnabled:O.bool.isRequired,trayProps:O.shape({className:O.string,onClickCapture:O.func,onMouseDown:O.func,onTouchCancel:O.func,onTouchEnd:O.func,onTouchMove:O.func,onTouchStart:O.func,ref:O.shape({}),style:O.string}),trayTag:O.string,visibleSlides:O.number,isIntrinsicHeight:O.bool}),u(eT,"defaultProps",{ariaLabel:"slider",className:null,classNameAnimation:null,classNameTray:null,classNameTrayWrap:null,disableAnimation:!1,disableKeyboard:!1,dragStep:1,infinite:!1,preventVerticalScrollOnTouch:!0,horizontalPixelThreshold:15,verticalPixelThreshold:10,moveThreshold:.1,onMasterSpinner:null,privateUnDisableAnimation:!1,role:"listbox",spinner:null,style:{},trayProps:{},trayTag:"div",visibleSlides:1,isIntrinsicHeight:!1}),eT),function(e){return{currentSlide:e.currentSlide,disableAnimation:e.disableAnimation,privateUnDisableAnimation:e.privateUnDisableAnimation,disableKeyboard:e.disableKeyboard,dragEnabled:e.dragEnabled,hasMasterSpinner:e.hasMasterSpinner,infinite:e.infinite,interval:e.interval,isPageScrollLocked:e.isPageScrollLocked,isPlaying:e.isPlaying,lockOnWindowScroll:e.lockOnWindowScroll,preventingVerticalScroll:e.preventingVerticalScroll,masterSpinnerFinished:e.masterSpinnerFinished,naturalSlideHeight:e.naturalSlideHeight,naturalSlideWidth:e.naturalSlideWidth,orientation:e.orientation,playDirection:e.playDirection,slideSize:e.slideSize,slideTraySize:e.slideTraySize,step:e.step,dragStep:e.dragStep,totalSlides:e.totalSlides,touchEnabled:e.touchEnabled,visibleSlides:e.visibleSlides,isIntrinsicHeight:e.isIntrinsicHeight}})},62959(e){"use strict";var t=String.prototype.replace,r=/%20/g,i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:i}},99147(e,t,r){"use strict";var i=r(24970),n=r(94164);e.exports={formats:r(62959),parse:n,stringify:i}},94164(e,t,r){"use strict";var i=r(5270),n=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:i.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1){if(t.throwOnLimitExceeded)for(var i=0,n=e.indexOf(",");n>-1;){if((i+=1)>=t.arrayLimit)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");n=e.indexOf(",",n+1)}return e.split(",")}if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},l=function(e,t){var r={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=1/0===t.parameterLimit?void 0:t.parameterLimit,c=l.split(t.delimiter,t.throwOnLimitExceeded&&void 0!==u?u+1:u);if(t.throwOnLimitExceeded&&void 0!==u&&c.length>u)throw RangeError("Parameter limit exceeded. Only "+u+" parameter"+(1===u?"":"s")+" allowed.");var h=-1,d=t.charset;if(t.charsetSentinel)for(p=0;p<c.length;++p)0===c[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===c[p]?d="utf-8":"utf8=%26%2310003%3B"===c[p]&&(d="iso-8859-1"),h=p,p=c.length);for(p=0;p<c.length;++p)if(p!==h){var p,f,m,g=c[p],y=g.indexOf("]="),v=-1===y?g.indexOf("="):y+1;if(-1===v?(f=t.decoder(g,a.decoder,d,"key"),m=t.strictNullHandling?null:""):null!==(f=t.decoder(g.slice(0,v),a.decoder,d,"key"))&&(m=i.maybeMap(s(g.slice(v+1),t,o(r[f])?r[f].length:0),function(e){return t.decoder(e,a.decoder,d,"value")})),m&&t.interpretNumericEntities&&"iso-8859-1"===d&&(m=String(m).replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),g.indexOf("[]=")>-1&&(m=o(m)?[m]:m),t.comma&&o(m)&&m.length>t.arrayLimit&&(m=i.combine([],m,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded)),null!==f){var b=n.call(r,f);b&&("combine"===t.duplicates||g.indexOf("[]=")>-1)?r[f]=i.combine(r[f],m,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded):b&&"last"!==t.duplicates||(r[f]=m)}}return r},u=function(e,t,r,n){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var a=e.slice(0,-1).join("");o=Array.isArray(t)&&t[a]?t[a].length:0}for(var l=n?t:s(t,r,o),u=e.length-1;u>=0;--u){var c,h=e[u];if("[]"===h&&r.parseArrays)c=i.isOverflow(l)?l:r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:i.combine([],l,r.arrayLimit,r.plainObjects,r.throwOnLimitExceeded);else{c=r.plainObjects?{__proto__:null}:{};var d="["===h.charAt(0)&&"]"===h.charAt(h.length-1)?h.slice(1,-1):h,p=r.decodeDotInKeys?d.replace(/%2E/g,"."):d,f=parseInt(p,10),m=!isNaN(f)&&h!==p&&String(f)===p&&f>=0&&r.parseArrays;if(r.parseArrays||""!==p)if(m&&f<r.arrayLimit)(c=[])[f]=l;else if(m&&r.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");
55else m?(c[f]=l,i.markOverflow(c,f)):"__proto__"!==p&&(c[p]=l);else c={0:l}}l=c}return l},c=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&n.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var i=[],o=r.indexOf("["),a=o>=0?r.slice(0,o):r;if(a){if(!t.plainObjects&&n.call(Object.prototype,a)&&!t.allowPrototypes)return;i[i.length]=a}for(var s=r.length,l=o,u=0;l>=0&&u<t.depth;){for(var c=1,h=l+1,d=-1;h<s&&d<0;){var p=r.charCodeAt(h);91===p?c+=1:93===p&&0==(c-=1)&&(d=h),h+=1}if(d<0)return i[i.length]="["+r.slice(l)+"]",i;var f=r.slice(l,d+1),m=f.slice(1,-1);if(!t.plainObjects&&n.call(Object.prototype,m)&&!t.allowPrototypes)return;i[i.length]=f,u+=1,l=r.indexOf("[",d+1)}if(l>=0){if(!0===t.strictDepth)throw RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");i[i.length]="["+r.slice(l)+"]"}return i},h=function(e,t,r,i){if(e){var n=c(e,r);if(n)return u(n,t,r,i)}},d=function(e){if(!e)return a;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?a.charset:e.charset,r=void 0===e.duplicates?a.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||a.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||i.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:a.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:a.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};e.exports=function(e,t){var r=d(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var n="string"==typeof e?l(e,r):e,o=r.plainObjects?{__proto__:null}:{},a=Object.keys(n),s=0;s<a.length;++s){var u=a[s],c=h(u,n[u],r,"string"==typeof e);
55o=i.merge(o,c,r)}return!0===r.allowSparse?o:i.compact(o)}},24970(e,t,r){"use strict";var i=r(28513),n=r(5270),o=r(62959),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,l(t)?t:[t])},h=Date.prototype.toISOString,d=o.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",depth:1/0,encode:!0,encodeDotInKeys:!1,encoder:n.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,r,o,a,s,u,h,d,m,g,y,v,b,_,x,A,w,S,T,C){var E,P,I=t;if(C>T)throw RangeError("Input depth exceeded depth option of "+T);for(var M=S,k=0,O=!1;void 0!==(M=M.get(f))&&!O;){var D=M.get(t);if(k+=1,void 0!==D)if(D===k)throw RangeError("Cyclic object value");else O=!0;void 0===M.get(f)&&(k=0)}if((I="function"==typeof g?g(r,I):I)instanceof Date?I=b(I):"comma"===o&&l(I)&&(I=n.maybeMap(I,function(e){return e instanceof Date?b(e):e})),null===I){if(u)return x(m&&!A?m(r,p.encoder,w,"key",_):r);I=""}if("string"==typeof(E=I)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||n.isBuffer(I))return m?[x(A?r:m(r,p.encoder,w,"key",_))+"="+x(m(I,p.encoder,w,"value",_))]:[x(r)+"="+x(String(I))];var R=[];if(void 0===I)return R;if("comma"===o&&l(I))A&&m&&(I=n.maybeMap(I,function(e){return null==e?e:m(e)})),P=[{value:I.length>0?I.join(",")||null:void 0}];else if(l(g))P=g;else{var L=Object.keys(I);P=y?L.sort(y):L}var B=d?String(r).replace(/\./g,"%2E"):String(r),F=a&&l(I)&&1===I.length?B+"[]":B;if(s&&l(I)&&0===I.length&&0===Object.keys(I).length)return F+"[]";for(var j=0;j<P.length;++j){var z=P[j],N="object"==typeof z&&z&&void 0!==z.value?z.value:I[z];if(!h||null!==N){var G=v&&d?String(z).replace(/\./g,"%2E"):String(z),V=l(I)?"function"==typeof o?o(F,G):F:F+(v?"."+G:"["+G+"]");S.set(t,k);var U=i();U.set(f,S),c(R,e(N,V,o,a,s,u,h,d,"comma"===o&&A&&l(I)?null:m,g,y,v,b,_,x,A,w,U,T,C+1))}}return R},g=function(e){if(!e)return p;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t,r=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw TypeError("Unknown format option provided.");i=e.format}var n=o.formatters[i],u=p.filter;if(("function"==typeof e.filter||l(e.filter))&&(u=e.filter),t=e.arrayFormat in s?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var c=void 0===e.allowDots?!0===e.encodeDotInKeys||p.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:c,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:t,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,depth:"number"==typeof e.depth?e.depth:p.depth,encode:"boolean"==typeof e.encode?e.encode:p.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:u,format:i,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}};e.exports=function(e,t){var r,n=e,o=g(t);"function"==typeof o.filter?n=(0,o.filter)("",n):l(o.filter)&&(r=o.filter);var a=[];if("object"!=typeof n||null===n)return"";var u=s[o.arrayFormat],h="comma"===u&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var d=i(),p=0;p<r.length;++p){var f=r[p];if(null!=f){var y=n[f];o.skipNulls&&null===y||c(a,m(y,o.encodeDotInKeys?String(f).replace(/\./g,"%2E"):String(f),u,h,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,d,o.depth,0))}}var v=a.join(o.delimiter),b=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?b+="utf8=%26%2310003%3B"+o.delimiter:b+="utf8=%E2%9C%93"+o.delimiter),v.length>0?b+v:""}},5270(e,t,r){"use strict";var i=r(62959),n=r(28513),o=r(39886),a=Object.prototype.hasOwnProperty,s=Array.isArray,l=n(),u=function(e,t){return l.set(e,t),e},c=function(e){return l.has(e)},h=function(e){return l.get(e)},d=function(e,t){l.set(e,t)},p=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),f=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s(r)){for(var i=[],n=0;n<r.length;++n)void 0!==r[n]&&(i[i.length]=r[n]);t.obj[t.prop]=i}}},m=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)void 0!==e[i]&&(r[i]=e[i]);return r},g=function(e,t,r){"__proto__"===t&&o?o(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r};e.exports={arrayToObject:m,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return g(e,r,t[r]),e},e)},combine:function(e,t,r,i,n){if(c(e)){if(n)throw RangeError("Array limit exceeded. Only "+r+" element"+(1===r?"":"s")+" allowed in an array.");for(var o=s(t)?t:[t],a=h(e),l=0;l<o.length;++l)e[a+=1]=o[l];return d(e,a),e}var p=[].concat(e,t);if(p.length>r){if(n)throw RangeError("Array limit exceeded. Only "+r+" element"+(1===r?"":"s")+" allowed in an array.");return u(m(p,{plainObjects:i}),p.length-1)}return p},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=n(),i=0;i<t.length;++i)for(var o=t[i],a=o.obj[o.prop],s=Object.keys(a),l=0;l<s.length;++l){var u=s[l],c=a[u];"object"!=typeof c||null===c||r.has(c)||(t[t.length]={obj:a,prop:u},r.set(c,!0))}return f(t),e},decode:function(e,t,r){var i=e.replace(/\+/g," ");
55if("iso-8859-1"===r)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(e){return i}},encode:function(e,t,r,n,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var s="",l=0;l<a.length;l+=1024){var u=a.length>=1024?a.slice(l,l+1024):a;if(l+1024<a.length){var c=u.charCodeAt(u.length-1);c>=55296&&c<=56319&&(u=u.slice(0,-1),l-=1)}for(var h=[],d=0;d<u.length;++d){var f=u.charCodeAt(d);if(45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===i.RFC1738&&(40===f||41===f)){h[h.length]=u.charAt(d);continue}if(f<128){h[h.length]=p[f];continue}if(f<2048){h[h.length]=p[192|f>>6]+p[128|63&f];continue}if(f<55296||f>=57344){h[h.length]=p[224|f>>12]+p[128|f>>6&63]+p[128|63&f];continue}d+=1,f=65536+((1023&f)<<10|1023&u.charCodeAt(d)),h[h.length]=p[240|f>>18]+p[128|f>>12&63]+p[128|f>>6&63]+p[128|63&f]}s+=h.join("")}return s},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:c,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:u,maybeMap:function(e,t){if(s(e)){for(var r=[],i=0;i<e.length;i+=1)r[r.length]=t(e[i]);return r}return t(e)},merge:function e(t,r,i){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(s(t)){var n=t.length;if(i&&"number"==typeof i.arrayLimit&&n>=i.arrayLimit){if(i.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(1===i.arrayLimit?"":"s")+" allowed in an array.");return u(m(t.concat(r),i),n)}t[n]=r}else if(!t||"object"!=typeof t)return[t,r];else if(c(t)){var o=h(t)+1;t[o]=r,d(t,o)}else{if(i&&i.strictMerge)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!a.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t){if(c(r)){for(var l=Object.keys(r),p=i&&i.plainObjects?{__proto__:null,0:t}:{0:t},f=0;f<l.length;f++)p[parseInt(l[f],10)+1]=r[l[f]];return u(p,h(r)+1)}var y=[t].concat(r);if(i&&"number"==typeof i.arrayLimit&&y.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(1===i.arrayLimit?"":"s")+" allowed in an array.");return u(m(y,i),y.length-1)}return y}var v=t;if(s(t)&&!s(r)&&(v=m(t,i)),s(t)&&s(r)){if(r.forEach(function(r,n){if(a.call(t,n)){var o=t[n];o&&"object"==typeof o&&r&&"object"==typeof r?t[n]=e(o,r,i):t[t.length]=r}else t[n]=r}),i&&"number"==typeof i.arrayLimit&&t.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(1===i.arrayLimit?"":"s")+" allowed in an array.");return u(m(t,i),t.length-1)}return t}return Object.keys(r).reduce(function(t,n){var o=r[n];if(a.call(t,n)?g(t,n,e(t[n],o,i)):g(t,n,o),c(r)&&!c(t)&&u(t,h(r)),c(t)){var s=parseInt(n,10);String(s)===n&&s>=0&&s>h(t)&&d(t,s)}return t},v)}}},39255(e,t,r){"use strict";var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=r(29859),a=r(67308),s=r(39190);e.exports=function(e){var t=e.displayName||e.name,r=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);function r(e){if(!(this instanceof r))throw TypeError("Cannot call a class as a function");var t=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.handleClickOutside=t.handleClickOutside.bind(t),t}return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t),n(r,[{key:"c
55omponentDidMount",value:function(){document.addEventListener("click",this.handleClickOutside,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleClickOutside,!0)}},{key:"handleClickOutside",value:function(e){var t=this.__domNode;t&&t.contains(e.target)||"function"!=typeof this.__wrappedComponent.handleClickOutside||this.__wrappedComponent.handleClickOutside(e)}},{key:"render",value:function(){var t=this;return a.createElement(e,i({},this.props,{ref:function(e){t.__wrappedComponent=e,t.__domNode=s.findDOMNode(e)}}))}}]),r}(a.Component);return r.displayName="Wrapped"+t,o(r,e)}},41678(e,t,r){"use strict";let i,n;var o,a,s=Object.create,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,h=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,p=(e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of c(t))d.call(e,n)||n===r||l(e,n,{get:()=>t[n],enumerable:!(i=u(t,n))||i.enumerable});return e},f={},m={$dispatcherGuard:()=>P,$makeReadOnly:()=>M,$reset:()=>I,$structuralCheck:()=>L,c:()=>w,clearRenderCounterRegistry:()=>O,renderCounterRegistry:()=>k,useRenderCounter:()=>D};for(var g in m)l(f,g,{get:m[g],enumerable:!0});e.exports=p(l({},"__esModule",{value:!0}),f);var y=(n=null!=(i=r(67308))?s(h(i)):{},p(i&&i.__esModule?n:l(n,"default",{value:i,enumerable:!0}),i)),{useRef:v,useEffect:b,isValidElement:_}=y,x=null!=(o=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?o:y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.memo_cache_sentinel"),w="function"==typeof(null==(a=y.__COMPILER_RUNTIME)?void 0:a.c)?y.__COMPILER_RUNTIME.c:function(e){return y.useMemo(()=>{let t=Array(e);for(let r=0;r<e;r++)t[r]=A;return t[A]=!0,t},[])},S={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{S[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var T=null;function C(e){return x.ReactCurrentDispatcher.current=e,x.ReactCurrentDispatcher.current}S.useMemoCache=e=>{if(null!=T)return T.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var E=[];function P(e){let t=x.ReactCurrentDispatcher.current;if(0===e){if(E.push(t),1===E.length&&(T=t),t===S)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");C(S)}else if(1===e){let e=E.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===E.length&&(T=null),C(e)}else if(2===e)E.push(t),C(T);else if(3===e){let e=E.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");C(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function I(e){for(let t=0;t<e.length;t++)e[t]=A}function M(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var k=new Map;function O(){for(let e of k.values())e.forEach(e=>{e.count=0})}function D(e){let t=v(null);null!=t.current&&(t.current.count+=1),b(()=>{if(null==t.current){let r,i={count:0};null==(r=k.get(e))&&(r=new Set,k.set(e,r)),r.add(i),t.current=i}return()=>{var r;let i;null!==t.current&&(r=t.current,null!=(i=k.get(e))&&i.delete(r))}})}var R=new Set;function L(e,t,r,i,n,o){function a(e,t,a,s){let l=`${i}:${o} [${n}] ${r}${a} changed from ${e} to ${t} at depth ${s}`;R.has(l)||(R.add(l),console.error(l))}!function e(t,r,i,n){if(!(n>2)&&t!==r)if(typeof t!=typeof r)a(`type ${typeof t}`,`type ${typeof r}`,i,n);else if("object"==typeof t){let o=Array.isArray(t),s=Array.isArray(r);if(null===t&&null!==r)a("null",`type ${typeof r}`,i,n);else if(null===r)a(`type ${typeof t}`,"null",i,n);else if(t instanceof Map)if(r instanceof Map)if(t.size!==r.size)a(`Map instance with size ${t.size}`,`Map instance with size ${r.size}`,i,n);else for(let[o,s]of t)r.has(o)?e(s,r.get(o),`${i}.get(${o})`,n+1):a(`Map instance with key ${o}`,`Map instance without key ${o}`,i,n);else a("Map instance","other value",i,n);else if(r instanceof Map)a("other value","Map instance",i,n);else if(t instanceof Set)if(r instanceof Set)if(t.size!==r.size)a(`Set instance with size ${t.size}`,`Set instance with size ${r.size}`,i,n);else for(let e of r)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,i,n);else a("Set instance","other value",i,n);else if(r instanceof Set)a("other value","Set instance",i,n);else if(o||s)if(o!==s)a(`type ${o?"array":"object"}`,`type ${s?"array":"object"}`,i,n);else if(t.length!==r.length)a(`array with length ${t.length}`,`array with length ${r.length}`,i,n);else for(let o=0;o<t.length;o++)e(t[o],r[o],`${i}[${o}]`,n+1);else if(_(t)||_(r))_(t)!==_(r)?a(`type ${_(t)?"React element":"object"}`,`type ${_(r)?"React element":"object"}`,i,n):t.type!==r.type?a(`React element of type ${t.type}`,`React element of type ${r.type}`,i,n):e(t.props,r.props,`[props of ${i}]`,n+1);else{for(let e in r)e in t||a(`object without key ${e}`,`object with key ${e}`,i,n);for(let o in t)o in r?e(t[o],r[o],`${i}.${o}`,n+1):a(`object with key ${o}`,`object without key ${o}`,i,n)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(r)?isNaN(t)!==isNaN(r)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(r)?"NaN":"non-NaN value"}`,i,n):t!==r&&a(t,r,i,n)}}(e,t,"",0)}},98727(e){var t="u">typeof Element,r="function"==typeof Map,i="function"==typeof Set,n="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,o){try{return function e(o,a){if(o===a)return!0;
55if(o&&a&&"object"==typeof o&&"object"==typeof a){var s,l,u,c;if(o.constructor!==a.constructor)return!1;if(Array.isArray(o)){if((s=o.length)!=a.length)return!1;for(l=s;0!=l--;)if(!e(o[l],a[l]))return!1;return!0}if(r&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(c=o.entries();!(l=c.next()).done;)if(!a.has(l.value[0]))return!1;for(c=o.entries();!(l=c.next()).done;)if(!e(l.value[1],a.get(l.value[0])))return!1;return!0}if(i&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(c=o.entries();!(l=c.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if((s=o.length)!=a.length)return!1;for(l=s;0!=l--;)if(o[l]!==a[l])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&"function"==typeof o.valueOf&&"function"==typeof a.valueOf)return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&"function"==typeof o.toString&&"function"==typeof a.toString)return o.toString()===a.toString();if((s=(u=Object.keys(o)).length)!==Object.keys(a).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(a,u[l]))return!1;if(t&&o instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!o.$$typeof)&&!e(o[u[l]],a[u[l]]))return!1;return!0}return o!=o&&a!=a}(e,o)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},6711(e,t,r){"use strict";r.d(t,{R4:()=>u,Yr:()=>h,gZ:()=>p});var i=r(67308),n=r(10164),o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var l=function(e){function t(t){var r=e.call(this,t)||this;return r.state={previous:!!t.meta.active},r}return a(t,e),t.prototype.componentDidUpdate=function(){var e=this.props,t=e.children,r=e.meta.active,i=this.state.previous;i&&!r&&t(),!!r!==i&&this.setState({previous:!!r})},t.prototype.render=function(){return null},t}(i.Component),u=function(e){var t=e.name,r=e.children;return i.createElement(n.D0,{name:t,subscription:{active:!0},render:function(e){return i.createElement(l,s(s({},e),{children:r}))}})},c=function(e){var t=e.children,r=e.input,n=i.useRef(void 0),o=i.useRef(!1);return i.useLayoutEffect(function(){if(!o.current){o.current=!0,n.current=r.value;return}Object.is(r.value,n.current)||(t(r.value,n.current),n.current=r.value)}),null},h=function(e){var t=e.name,r=e.children;return i.createElement(n.D0,{name:t,subscription:{value:!0},allowNull:!0,render:function(e){return i.createElement(c,s(s({},e),{children:r}))}})},d=function(e){function t(t){var r=e.call(this,t)||this;return r.state={previous:!!t.meta.active},r}return a(t,e),t.prototype.componentDidUpdate=function(){var e=this.props,t=e.children,r=e.meta.active,i=this.state.previous;r&&!i?(this.setState({previous:!!r}),t()):!r&&i&&this.setState({previous:!!r})},t.prototype.render=function(){return null},t}(i.Component),p=function(e){var t=e.name,r=e.children;return i.createElement(n.D0,{name:t,subscription:{active:!0},render:function(e){return i.createElement(d,s(s({},e),{children:r}))}})}},10164(e,t,r){"use strict";r.d(t,{D0:()=>k,Pc:()=>x,lV:()=>v});var i=r(69932),n=r(12975),o=r(67308),a=r(17494),s=["render","children","component"];function l(e,t,r){var i=e.render,a=e.children,l=e.component,u=(0,n.A)(e,s);if(l){var c={};Object.defineProperties(c,Object.getOwnPropertyDescriptors(t));var h=Object.getOwnPropertyDescriptors(u);
55for(var d in h)d in c||Object.defineProperty(c,d,h[d]);return c.children=a,c.render=i,o.createElement(l,c)}if(i){var p={};Object.defineProperties(p,Object.getOwnPropertyDescriptors(t));var f=Object.getOwnPropertyDescriptors(u);for(var m in f)m in p||Object.defineProperty(p,m,f[m]);return void 0!==a&&(p.children=a),i(p)}if("function"!=typeof a)throw Error("Must specify either a render prop, a render function as children, or a component prop to "+r);var g={};Object.defineProperties(g,Object.getOwnPropertyDescriptors(t));var y=Object.getOwnPropertyDescriptors(u);for(var v in y)v in g||Object.defineProperty(g,v,y[v]);return a(g)}function u(e,t,r){void 0===r&&(r=function(e,t){return e===t});var i=o.useRef(e);o.useEffect(function(){r(e,i.current)||(t(),i.current=e)})}var c=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var n=Object.prototype.hasOwnProperty.bind(t),o=0;o<r.length;o++){var a=r[o];if(!n(a)||e[a]!==t[a])return!1}return!0},h=function(e){return!!(e&&"function"==typeof e.stopPropagation)},d=o.createContext(void 0),p=function(e,t,r){r.forEach(function(r){Object.defineProperty(e,r,{get:function(){return t[r]},enumerable:!0})})},f=function(e,t){return p(e,t,["active","dirty","dirtyFields","dirtySinceLastSubmit","dirtyFieldsSinceLastSubmit","error","errors","hasSubmitErrors","hasValidationErrors","initialValues","invalid","modified","modifiedSinceLastSubmit","pristine","submitError","submitErrors","submitFailed","submitSucceeded","submitting","touched","valid","validating","values","visited"])},m=["debug","decorators","destroyOnUnregister","form","initialValues","initialValuesEqual","keepDirtyOnReinitialize","mutators","onSubmit","subscription","validate","validateOnBlur"],g={"final-form":a.rE,"react-final-form":"7.0.1"},y=a.u9.reduce(function(e,t){return e[t]=!0,e},{});function v(e){var t,r,s=e.debug,p=e.decorators,v=void 0===p?[]:p,b=e.destroyOnUnregister,_=e.form,x=e.initialValues,A=e.initialValuesEqual,w=e.keepDirtyOnReinitialize,S=e.mutators,T=e.onSubmit,C=e.subscription,E=void 0===C?y:C,P=e.validate,I=e.validateOnBlur,M=(0,n.A)(e,m),k={debug:s,destroyOnUnregister:b,initialValues:x,keepDirtyOnReinitialize:w,mutators:S,onSubmit:T,validate:P,validateOnBlur:I},O=(t=function(){var e=_||(0,a.DG)(k);return e.pauseValidation(),e},(r=o.useRef(void 0)).current||(r.current=t()),r.current),D=o.useState(function(){return O.getState()}),R=D[0],L=D[1];o.useRef(R).current=R,o.useEffect(function(){O.isValidationPaused()&&O.resumeValidation();var e=[O.subscribe(function(e){L(function(t){return c(e,t)?t:e})},E)].concat(v?v.map(function(e){return e(O)}):[]);return function(){O.pauseValidation(),e.reverse().forEach(function(e){return e()})}},[]),u(s,function(){O.setConfig("debug",s)}),u(b,function(){O.destroyOnUnregister=!!b}),u(w,function(){O.setConfig("keepDirtyOnReinitialize",w)}),u(x,function(){O.setConfig("initialValues",x)},A||c),u(S,function(){O.setConfig("mutators",S)}),u(T,function(){O.setConfig("onSubmit",T)}),u(P,function(){O.setConfig("validate",P)}),u(I,function(){O.setConfig("validateOnBlur",I)});var B={form:(0,i.A)({},O,{reset:function(e){h(e)?O.reset():O.reset(e)}}),handleSubmit:function(e){return e&&("function"==typeof e.preventDefault&&e.preventDefault(),"function"==typeof e.stopPropagation&&e.stopPropagation()),O.submit()}};return f(B,R),o.createElement(d.Provider,{value:O},l((0,i.A)({},M,{__versions:g}),B,"ReactFinalForm"))}function b(e){var t=o.useContext(d);if(!t)throw Error((e||"useForm")+" must be used inside of a <Form> component");return t}var _=["onChange","subscription"];function x(e){var t,r,a,s,u,d,p,m,g,v,x,A,w,S=e.onChange,T=e.subscription,C=(0,n.A)(e,_),E=b("FormSpy"),P=(r=(t={onChange:S,subscription:T}).onChange,s=void 0===(a=t.subscription)?y:a,u=b("useFormState"),(d=o.useRef(r)).current=r,m=(p=o.useState(function(){return u.getState()}))[0],g=p[1],v=o.useRef(!0),x=o.useRef(null),A=o.useRef(null),o.useEffect(function(){return u.subscribe(function(e){var t=v.current;t&&(v.current=!1),x.current=e,g(function(r){return t||!c(e,r)?e:r})},s)},[]),o.useEffect(function(){var e=x.current;e&&d.current&&(null!==A.current&&c(e,A.current)||(d.current(e),A.current=e),x.current=null)},[m]),f(w={},m),w);if(S)return null;var I={form:(0,i.A)({},E,{reset:function(e){h(e)?E.reset():E.reset(e)}})};return l((0,i.A)({},C,I),P,"FormSpy")}var A=!!("u">typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product),w=function(e){var t=[];if(e)for(var r=0;r<e.length;r++){var i=e[r];i.selected&&t.push(i.value)}return t},S=function(e,t,r,i){if(!i&&e.nativeEvent&&void 0!==e.nativeEvent.text||i&&e.nativeEvent)return e.nativeEvent.text;var n=e.target,o=n.type,a=n.value,s=n.checked;switch(o){case"checkbox":if(void 0===r)return!!s;
55if(s)return Array.isArray(t)?t.concat(r):[r];if(!Array.isArray(t))return t;var l=t.indexOf(r);if(l<0)return t;return t.slice(0,l).concat(t.slice(l+1));case"select-multiple":return w(e.target.options);default:return a}};function T(e){var t=o.useRef(e);return o.useEffect(function(){t.current=e}),o.useCallback(function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.current.apply(null,r)},[])}var C=a.iF.reduce(function(e,t){return e[t]=!0,e},{}),E=function(e,t){return void 0===e?"":e},P=function(e,t){return""===e?void 0:e},I=["afterSubmit","allowNull","beforeSubmit","children","component","data","defaultValue","format","formatOnBlur","initialValue","input","isEqual","multiple","name","parse","subscription","type","validate","validateFields","value"],M=["name"],k=o.forwardRef(function(e,t){var r,s,u,h,d,f,m,g,y,v,_,x,w,k,O,D,R,L,B,F,j,z,N,G,V,U,H,W,q,Z=e.afterSubmit,$=e.allowNull,K=e.beforeSubmit,X=e.children,Y=e.component,Q=e.data,J=e.defaultValue,ee=e.format,et=e.formatOnBlur,er=e.initialValue,ei=e.input,en=e.isEqual,eo=e.multiple,ea=e.name,es=e.parse,el=e.subscription,eu=e.type,ec=e.validate,eh=e.validateFields,ed=e.value,ep=(0,n.A)(e,I),ef=(u=(r={afterSubmit:Z,allowNull:$,beforeSubmit:K,component:Y,data:Q,defaultValue:J,format:ee,formatOnBlur:et,initialValue:er,isEqual:en,multiple:eo,parse:es,subscription:el,type:eu,validate:ec,validateFields:eh,value:ed}).afterSubmit,h=r.allowNull,d=r.component,f=r.data,m=r.defaultValue,y=void 0===(g=r.format)?E:g,v=r.formatOnBlur,_=r.initialValue,x=r.multiple,k=void 0===(w=r.parse)?P:w,D=void 0===(O=r.subscription)?C:O,R=r.type,L=r.validateFields,B=r.value,F=b("useField"),s=o.useRef(r),o.useEffect(function(){s.current=r}),j=s,N=(z=o.useState(function(){var e=F.getFieldState(ea);if(e)return h&&null===e.initial&&null!==e.value?(0,i.A)({},e,{value:null,initial:null}):e;var t=F.getState(),r=t.initialValues?(0,a.O6)(t.initialValues,ea):void 0,n=void 0!==r?r:_;return("select"===d||"select"===R)&&x&&void 0===n&&(n=[]),{active:!1,blur:function(){F.blur(ea)},change:function(e){F.change(ea,e)},data:f||{},dirty:!1,dirtySinceLastSubmit:!1,error:void 0,focus:function(){F.focus(ea)},initial:n,invalid:!1,length:void 0,modified:!1,modifiedSinceLastSubmit:!1,name:ea,pristine:!0,submitError:void 0,submitFailed:!1,submitSucceeded:!1,submitting:!1,touched:!1,valid:!0,validating:!1,value:n,visited:!1}}))[0],G=z[1],o.useEffect(function(){if(!F.getFieldState(ea)){var e,t=F.getState(),r=t.initialValues?(0,a.O6)(t.initialValues,ea):void 0,i=void 0!==r?r:_;void 0!==i&&F.change(ea,i)}return e=function(e){G(function(t){return c(e,t)?t:e})},F.registerField(ea,e,D,{afterSubmit:u,beforeSubmit:function(){var e=j.current,t=e.beforeSubmit,r=e.formatOnBlur,i=e.format;if(r){var n=F.getFieldState(ea);if(n){var o=n.value,a=(void 0===i?E:i)(o,ea);a!==o&&F.change(ea,a)}}return t&&t()},data:f,defaultValue:m,getValidator:function(){return j.current.validate},initialValue:_,isEqual:j.current.isEqual,silent:!1,validateFields:L})},[ea,f,m,_]),V=o.useRef(_),o.useEffect(function(){var e=j.current.isEqual||function(e,t){return e===t},t=V.current;if(V.current=_,!e(t,_)&&void 0!==_){var r=F.getState();if(!e(_,r.initialValues?(0,a.O6)(r.initialValues,ea):void 0)){var i=r.values?(0,a.O6)(r.values,ea):void 0;if(F.getFieldState(ea)&&e(i,_)){var n=F.isValidationPaused();n||F.pauseValidation();try{F.registerField(ea,function(){},{},{initialValue:_,isEqual:j.current.isEqual})()}finally{n||F.resumeValidation()}}}}},[_,ea,F]),p(U={},N,["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","validating","visited"]),H=function(){var e,t=N.name!==ea?(0,a.O6)(null!=(e=F.getState().values)?e:{},ea):N.value;return(null!==t||h||(t=""),v?"input"===d&&(t=E(t)):h&&null===t||(t=y(t,ea)),("select"===d||"select"===R)&&x)?Array.isArray(t)?t:[]:("checkbox"===R||"radio"===R)&&void 0!==B?B:t},W=function(){var e,t=N.name!==ea?(0,a.O6)(null!=(e=F.getState().values)?e:{},ea):N.value;return"checkbox"===R?(t=k(t,ea),void 0===B)?!!t:!!(Array.isArray(t)&&~t.indexOf(B)):"radio"===R?k(t,ea)===B:void 0},q={name:ea,onBlur:T(function(e){if(F.blur(ea),v){var t=F.getFieldState(ea);t&&F.change(ea,y(t.value,ea))}}),onChange:T(function(e){var t,r,i=null!=(t=null==(r=F.getFieldState(ea))?void 0:r.value)?t:N.value,
55n=e&&e.target?S(e,i,B,A):e;F.change(ea,k(n,ea))}),onFocus:T(function(e){return F.focus(ea)}),get value(){return H()},get checked(){return W()}},x&&(q.multiple=x),void 0!==R&&(q.type=R),{input:q,meta:U}),em=ei?(0,i.A)({},ef,{input:(0,i.A)({},ef.input,ei)}):ef;if("function"==typeof X)return X((0,i.A)({},em,ep));if("string"==typeof Y){var eg=em.input,ey=eg.name,ev=(0,n.A)(eg,M);return"select"===Y&&eo&&!Array.isArray(ev.value)&&(ev.value=[]),o.createElement(Y,(0,i.A)({name:ey},ev,{children:X,ref:t},ep))}if(!ea)throw Error("prop name cannot be undefined in <Field> component");return l((0,i.A)({children:X,component:Y},ep,em),{},"Field("+ea+")")})},22857(e,t,r){"use strict";r.d(t,{m:()=>ei});var i,n,o,a,s=r(5821),l=r.n(s),u=r(77919),c=r.n(u),h=r(98727),d=r.n(h),p=r(67308),f=r(46084),m=r.n(f),g="bodyAttributes",y="htmlAttributes",v={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(v).map(function(e){return v[e]});var b="cssText",_="href",x="innerHTML",A="itemprop",w={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},S=Object.keys(w).reduce(function(e,t){return e[w[t]]=t,e},{}),T=[v.NOSCRIPT,v.SCRIPT,v.STYLE],C="data-react-helmet",E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},I=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},k=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},O=function(e,t){var r={};for(var i in e)!(t.indexOf(i)>=0)&&Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},D=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e},R=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},L=function(e){var t=j(e,v.TITLE),r=j(e,"titleTemplate");if(r&&t)return r.replace(/%s/g,function(){return Array.isArray(t)?t.join(""):t});var i=j(e,"defaultTitle");return t||i||void 0},B=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return M({},e,t)},{})},F=function(e,t,r){var i={};return r.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&U("Helmet: "+e+' should be of type "Array". Instead found type "'+E(t[e])+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,r){var n={};r.filter(function(e){for(var r=void 0,o=Object.keys(e),a=0;a<o.length;a++){var s=o[a],l=s.toLowerCase();-1!==t.indexOf(l)&&("rel"!==r||"canonical"!==e[r].toLowerCase())&&("rel"!==l||"stylesheet"!==e[l].toLowerCase())&&(r=l),-1!==t.indexOf(s)&&(s===x||s===b||s===A)&&(r=s)}if(!r||!e[r])return!1;var u=e[r].toLowerCase();return i[r]||(i[r]={}),n[r]||(n[r]={}),!i[r][u]&&(n[r][u]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var o=Object.keys(n),a=0;a<o.length;a++){var s=o[a],l=m()({},i[s],n[s]);i[s]=l}return e},[]).reverse()},j=function(e,t){for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.hasOwnProperty(t))return i[t]}return null},z=(i=Date.now(),function(e){var t=Date.now();t-i>16?(i=t,e(t)):setTimeout(function(){z(e)},0)}),N=function(e){return clearTimeout(e)},G="u">typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||z:r.g.requestAnimationFrame||z,V="u">typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||N:r.g.cancelAnimationFrame||N,U=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},H=null,W=function(e,t){var r=e.baseTag,i=e.bodyAttributes,n=e.htmlAttributes,o=e.linkTags,a=e.metaTags,s=e.noscriptTags,l=e.onChangeClientState,u=e.scriptTags,c=e.styleTags,h=e.title,d=e.titleAttributes;$(v.BODY,i),$(v.HTML,n),Z(h,d);var p={baseTag:K(v.BASE,r),linkTags:K(v.LINK,o),metaTags:K(v.META,a),noscriptTags:K(v.NOSCRIPT,s),scriptTags:K(v.SCRIPT,u),styleTags:K(v.STYLE,c)},f={},m={};
55Object.keys(p).forEach(function(e){var t=p[e],r=t.newTags,i=t.oldTags;r.length&&(f[e]=r),i.length&&(m[e]=p[e].oldTags)}),t&&t(),l(e,f,m)},q=function(e){return Array.isArray(e)?e.join(""):e},Z=function(e,t){void 0!==e&&document.title!==e&&(document.title=q(e)),$(v.TITLE,t)},$=function(e,t){var r=document.getElementsByTagName(e)[0];if(r){for(var i=r.getAttribute(C),n=i?i.split(","):[],o=[].concat(n),a=Object.keys(t),s=0;s<a.length;s++){var l=a[s],u=t[l]||"";r.getAttribute(l)!==u&&r.setAttribute(l,u),-1===n.indexOf(l)&&n.push(l);var c=o.indexOf(l);-1!==c&&o.splice(c,1)}for(var h=o.length-1;h>=0;h--)r.removeAttribute(o[h]);n.length===o.length?r.removeAttribute(C):r.getAttribute(C)!==a.join(",")&&r.setAttribute(C,a.join(","))}},K=function(e,t){var r=document.head||document.querySelector(v.HEAD),i=r.querySelectorAll(e+"["+C+"]"),n=Array.prototype.slice.call(i),o=[],a=void 0;return t&&t.length&&t.forEach(function(t){var r=document.createElement(e);for(var i in t)if(t.hasOwnProperty(i))if(i===x)r.innerHTML=t.innerHTML;else if(i===b)r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText));else{var s=void 0===t[i]?"":t[i];r.setAttribute(i,s)}r.setAttribute(C,"true"),n.some(function(e,t){return a=t,r.isEqualNode(e)})?n.splice(a,1):o.push(r)}),n.forEach(function(e){return e.parentNode.removeChild(e)}),o.forEach(function(e){return r.appendChild(e)}),{oldTags:n,newTags:o}},X=function(e){return Object.keys(e).reduce(function(t,r){var i=void 0!==e[r]?r+'="'+e[r]+'"':""+r;return t?t+" "+i:i},"")},Y=function(e,t,r,i){var n=X(r),o=q(t);return n?"<"+e+" "+C+'="true" '+n+">"+R(o,i)+"</"+e+">":"<"+e+" "+C+'="true">'+R(o,i)+"</"+e+">"},Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,r){return t[w[r]||r]=e[r],t},t)},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,r){return t[S[r]||r]=e[r],t},t)},ee=function(e,t,r){var i,n=Q(r,((i={key:t})[C]=!0,i));return[p.createElement(v.TITLE,n,t)]},et=function(e,t,r){switch(e){case v.TITLE:return{toComponent:function(){return ee(e,t.title,t.titleAttributes)},toString:function(){return Y(e,t.title,t.titleAttributes,r)}};case g:case y:return{toComponent:function(){return Q(t)},toString:function(){return X(t)}};default:return{toComponent:function(){return t.map(function(t,r){var i,n=((i={key:r})[C]=!0,i);return Object.keys(t).forEach(function(e){var r=w[e]||e;r===x||r===b?n.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:n[r]=t[e]}),p.createElement(e,n)})},toString:function(){return t.reduce(function(t,i){var n=Object.keys(i).filter(function(e){return e!==x&&e!==b}).reduce(function(e,t){var n=void 0===i[t]?t:t+'="'+R(i[t],r)+'"';return e?e+" "+n:n},""),o=i.innerHTML||i.cssText||"",a=-1===T.indexOf(e);return t+"<"+e+" "+C+'="true" '+n+(a?"/>":">"+o+"</"+e+">")},"")}}}},er=function(e){var t=e.baseTag,r=e.bodyAttributes,i=e.encode,n=e.htmlAttributes,o=e.linkTags,a=e.metaTags,s=e.noscriptTags,l=e.scriptTags,u=e.styleTags,c=e.title,h=e.titleAttributes;return{base:et(v.BASE,t,i),bodyAttributes:et(g,r,i),htmlAttributes:et(y,n,i),link:et(v.LINK,o,i),meta:et(v.META,a,i),noscript:et(v.NOSCRIPT,s,i),script:et(v.SCRIPT,l,i),style:et(v.STYLE,u,i),title:et(v.TITLE,{title:void 0===c?"":c,titleAttributes:h},i)}},ei=(n=c()(function(e){var t;return{baseTag:(t=[_,"target"],e.filter(function(e){return void 0!==e[v.BASE]}).map(function(e){return e[v.BASE]}).reverse().reduce(function(e,r){if(!e.length)for(var i=Object.keys(r),n=0;n<i.length;n++){var o=i[n].toLowerCase();if(-1!==t.indexOf(o)&&r[o])return e.concat(r)}return e},[])),bodyAttributes:B(g,e),defer:j(e,"defer"),encode:j(e,"encodeSpecialCharacters"),htmlAttributes:B(y,e),linkTags:F(v.LINK,["rel",_],e),metaTags:F(v.META,["name","charset","http-equiv","property",A],e),noscriptTags:F(v.NOSCRIPT,[x],e),onChangeClientState:j(e,"onChangeClientState")||function(){},scriptTags:F(v.SCRIPT,["src",x],e),styleTags:F(v.STYLE,[b],e),title:L(e),titleAttributes:B("titleAttributes",e)}},function(e){H&&V(H),e.defer?H=G(function(){W(e,function(){H=null})}):(W(e),H=null)},er)(function(){return null}),a=o=function(e){function t(){return P(this,t),D(this,e.apply(this,arguments))}return k(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case v.SCRIPT:case v.NOSCRIPT:return{innerHTML:t};case v.STYLE:return{cssText:t}}throw Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,r=e.child,i=e.arrayTypeChildren,n=e.newChildProps,o=e.nestedChildren;return M({},i,((t={})[r.type]=[].concat(i[r.type]||[],[M({},n,this.mapNestedChildrenToProps(r,o))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,r,i=e.child,n=e.newProps,o=e.newChildProps,a=e.nestedChildren;switch(i.type){case v.TITLE:return M({},n,((t={})[i.type]=a,t.titleAttributes=M({},o),t));case v.BODY:return M({},n,{bodyAttributes:M({},o)});case v.HTML:return M({},n,{htmlAttributes:M({},o)})}return M({},n,((r={})[i.type]=M({},o),r))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var r=M({},t);return Object.keys(e).forEach(function(t){var i;r=M({},r,((i={})[t]=e[t],i))}),r}
55,t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var r=this,i={};return p.Children.forEach(e,function(e){if(e&&e.props){var n=e.props,o=n.children,a=J(O(n,["children"]));switch(r.warnOnInvalidChildren(e,o),e.type){case v.LINK:case v.META:case v.NOSCRIPT:case v.SCRIPT:case v.STYLE:i=r.flattenArrayTypeChildren({child:e,arrayTypeChildren:i,newChildProps:a,nestedChildren:o});break;default:t=r.mapObjectTypeChildren({child:e,newProps:t,newChildProps:a,nestedChildren:o})}}}),t=this.mapArrayTypeChildrenToProps(i,t)},t.prototype.render=function(){var e=this.props,t=e.children,r=M({},O(e,["children"]));return t&&(r=this.mapChildrenToProps(t,r)),p.createElement(n,r)},I(t,null,[{key:"canUseDOM",set:function(e){n.canUseDOM=e}}]),t}(p.Component),o.propTypes={base:l().object,bodyAttributes:l().object,children:l().oneOfType([l().arrayOf(l().node),l().node]),defaultTitle:l().string,defer:l().bool,encodeSpecialCharacters:l().bool,htmlAttributes:l().object,link:l().arrayOf(l().object),meta:l().arrayOf(l().object),noscript:l().arrayOf(l().object),onChangeClientState:l().func,script:l().arrayOf(l().object),style:l().arrayOf(l().object),title:l().string,titleAttributes:l().object,titleTemplate:l().string},o.defaultProps={defer:!0,encodeSpecialCharacters:!0},o.peek=n.peek,o.rewind=function(){var e=n.rewind();return e||(e=er({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},a);ei.renderStatic=ei.rewind},67509(e,t,r){e.exports=function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){e.exports=r(1)},function(e,t,r){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=((i=r(2))&&i.__esModule?i:{default:i}).default,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e};t.default=function(e){var t=e.activeClassName,r=void 0===t?"":t,i=e.activeIndex,l=void 0===i?-1:i,u=e.activeStyle,c=e.autoEscape,h=e.caseSensitive,d=void 0!==h&&h,p=e.className,f=e.findChunks,m=e.highlightClassName,g=void 0===m?"":m,y=e.highlightStyle,v=void 0===y?{}:y,b=e.highlightTag,_=e.sanitize,x=e.searchWords,A=e.textToHighlight,w=e.unhighlightTag,S=void 0===w?"span":w,T=e.unhighlightClassName,C=void 0===T?"":T,E=e.unhighlightStyle,P=function(e,t){var r={};for(var i in e)!(t.indexOf(i)>=0)&&Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r}(e,["activeClassName","activeIndex","activeStyle","autoEscape","caseSensitive","className","findChunks","highlightClassName","highlightStyle","highlightTag","sanitize","searchWords","textToHighlight","unhighlightTag","unhighlightClassName","unhighlightStyle"]),I=(0,o.findAll)({autoEscape:c,caseSensitive:d,findChunks:f,sanitize:_,searchWords:x,textToHighlight:A}),M=void 0===b?"mark":b,k=-1,O="",D=void 0,R=(0,s.default)(function(e){var t={};for(var r in e)t[r.toLowerCase()]=e[r];return t});return(0,a.createElement)("span",n({className:p},P,{children:I.map(function(e,t){var i=A.substr(e.start,e.end-e.start);if(!e.highlight)return(0,a.createElement)(S,{children:i,className:C,key:t,style:E});k++;var n=void 0;n="object"==typeof g?d?g[i]:(g=R(g))[i.toLowerCase()]:g;var o=k===+l;O=n+" "+(o?r:""),D=!0===o&&null!=u?Object.assign({},v,u):v;var s={children:i,className:O,key:t,style:D};return"string"!=typeof M&&(s.highlightIndex=k),(0,a.createElement)(M,s)})}))};var o=r(3),a=r(4),s=(i=r(5))&&i.__esModule?i:{default:i};e.exports=t.default},function(e,t){e.exports=function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){e.exports=r(1)},function(e,t,r){"use strict";
55Object.defineProperty(t,"__esModule",{value:!0});var i=r(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return i.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return i.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return i.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return i.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=function(e){var t=e.autoEscape,o=e.caseSensitive,a=e.findChunks,s=void 0===a?i:a,l=e.sanitize,u=e.searchWords,c=e.textToHighlight;return n({chunksToHighlight:r({chunks:s({autoEscape:t,caseSensitive:void 0!==o&&o,sanitize:l,searchWords:u,textToHighlight:c})}),totalLength:c?c.length:0})};var r=t.combineChunks=function(e){return e.chunks.sort(function(e,t){return e.start-t.start}).reduce(function(e,t){if(0===e.length)return[t];var r=e.pop();if(t.start<=r.end){var i=Math.max(r.end,t.end);e.push({start:r.start,end:i})}else e.push(r,t);return e},[])},i=function(e){var t=e.autoEscape,r=e.caseSensitive,i=e.sanitize,n=void 0===i?o:i,a=e.searchWords,s=e.textToHighlight;return s=n(s),a.filter(function(e){return e}).reduce(function(e,i){i=n(i),t&&(i=i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var o=new RegExp(i,r?"g":"gi"),a=void 0;a=o.exec(s);){var l=a.index,u=o.lastIndex;u>l&&e.push({start:l,end:u}),a.index==o.lastIndex&&o.lastIndex++}return e},[])};t.findChunks=i;var n=t.fillInChunks=function(e){var t=e.chunksToHighlight,r=e.totalLength,i=[],n=function(e,t,r){t-e>0&&i.push({start:e,end:t,highlight:r})};if(0===t.length)n(0,r,!1);else{var o=0;t.forEach(function(e){n(o,e.start,!1),n(e.start,e.end,!0),o=e.end}),n(o,r,!1)}return i};function o(e){return e}}])},function(e,t){e.exports=r(67308)},function(e,t){"use strict";var r=function(e,t){return e===t};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,i=void 0,n=[],o=void 0,a=!1,s=function(e,r){return t(e,n[r])};return function(){for(var t=arguments.length,r=Array(t),l=0;l<t;l++)r[l]=arguments[l];return a&&i===this&&r.length===n.length&&r.every(s)?o:(a=!0,i=this,n=r,o=e.apply(this,r))}}}])},39612(e,t,r){"use strict";r.d(t,{FH:()=>ec,Jt:()=>A,Op:()=>el,as:()=>eu,mN:()=>en,xI:()=>eh,xW:()=>es});var i=r(67308),n=e=>e instanceof HTMLElement;let o="blur",a="change",s="input",l="onChange",u="onSubmit",c="select",h="undefined",d="maxLength",p="minLength",f="pattern",m="required";var g=e=>null!=e&&!Array.isArray(e)&&"object"==typeof e&&!(e instanceof Date),y=e=>/^\w*$/.test(e),v=e=>e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split(".").filter(Boolean);function b(e,t,r){let i=-1,n=y(t)?[t]:v(t),o=n.length,a=o-1;for(;++i<o;){let t=n[i],o=r;if(i!==a){let r=e[t];o=g(r)||Array.isArray(r)?r:isNaN(+n[i+1])?{}:[]}e[t]=o,e=e[t]}return e}var _=(e,t={})=>{for(let r in e)y(r)?t[r]=e[r]:b(t,r,e[r]);return t},x=e=>void 0===e,A=(e={},t,r)=>{let i=t.split(/[,[\].]+?/).filter(Boolean).reduce((e,t)=>null==e?e:e[t],e);return x(i)||i===e?x(e[t])?r:e[t]:i},w=(e,t)=>{n(e)&&e.removeEventListener&&(e.removeEventListener(s,t),e.removeEventListener(a,t),e.removeEventListener(o,t))};let S={isValid:!1,value:null};var T=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e,S):S,C=e=>e.type===`${c}-multiple`;let E={value:!1,isValid:!1},P={value:!0,isValid:!0};var I=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.ref.checked).map(({ref:{value:e}})=>e);return{value:t,isValid:!!t.length}}let{checked:t,value:r,attributes:i}=e[0].ref;return t?i&&!x(i.value)?x(r)||""===r?P:{value:r,isValid:!0}:P:E}return E};function M(e,t,r,i,n){let o=e.current[t];if(o){let{ref:{value:e,disabled:t},ref:r,valueAsNumber:a,valueAsDate:s,setValueAs:l}=o;return t&&i?void 0:"file"===r.type?r.files:"radio"===r.type?T(o.options).value:C(r)?[...r.options].filter(({selected:e})=>e).map(({value:e})=>e):"checkbox"===r.type?I(o.options).value:n?e:a?""===e?0/0:+e:s?r.valueAsDate:l?l(e):e}if(r)return A(r.current,t)}function k(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&k(e.parentNode)}var O=e=>g(e)&&!Object.keys(e).length,D=e=>"boolean"==typeof e;function R(e,t){let r,i=y(t)?[t]:v(t),n=1==i.length?e:function(e,t){let r=t.slice(0,-1).length,i=0;for(;i<r;)e=x(e)?i++:e[t[i++]];return e}(e,i),o=i[i.length-1];n&&delete n[o];for(let t=0;t<i.slice(0,-1).length;t++){let n,o=-1,a=i.slice(0,-(t+1)),s=a.length-1;for(t>0&&(r=e);++o<a.length;){let t=a[o];n=n?n[t]:e[t],s===o&&(g(n)&&O(n)||Array.isArray(n)&&!n.filter(e=>g(e)&&!O(e)||D(e)).length)&&(r?delete r[t]:delete e[t]),r=n}}return e}let L=(e,t)=>e&&e.ref===t;var B=e=>null==e||"object"!=typeof e;function F(e,t){if(B(e)||B(t))return t;for(let r in t){let i=e[r],n=t[r];try{e[r]=g(i)&&g(n)||Array.isArray(i)&&Array.isArray(n)?F(i,n):n}catch(e){}}return e}function j(e,t,r){if(B(e)||B(t)||e instanceof Date||t instanceof Date)return e===t;if(!(0,i.isValidElement)(e)){let i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(let n of i){let i=e[n];if(!(r&&"ref"===n)){let e=t[n];if((g(i)||Array.isArray(i))&&(g(e)||Array.isArray(e))?!j(i,e,r):i!==e)return!1}}}return!0}function z(e,t,r,i,n){let o=-1;for(;++o<e.length;){for(let i in e[o])Array.isArray(e[o][i])?(r[o]||(r[o]={}),r[o][i]=[],z(e[o][i],A(t[o]||{},i,[]),r[o][i],r[o],i)):j(A(t[o]||{},i),e[o][i])?b(r[o]||{},i):r[o]=Object.assign(Object.assign({},r[o]),{[i]:!0});i&&!r.length&&delete i[n]}return r}var N=e=>"string"==typeof e,G=(e,t,r,i,n)=>{let o={};for(let t in e.current)(x(n)||(N(n)?t.startsWith(n):Array.isArray(n)&&n.find(e=>t.startsWith(e))))&&(o[t]=M(e,t,void 0,i));return r?_(o):F(t,_(o))},V=e=>!g(e)||e instanceof RegExp?{value:e,message:""}:e,U=e=>N(e)||(0,i.isValidElement)(e);function H(e,t,r="validate"){if(U(e)||D(e)&&!e)return{type:r,message:U(e)?e:"",ref:t}}var W=(e,t,r,i,n)=>t?Object.assign(Object.assign({},r[e]),{types:Object.assign(Object.assign({},r[e]&&r[e].types?r[e].types:{}),{[i]:n||!0})}):{},q=async(e,t,{ref:r,ref:{value:i},options:n,required:o,maxLength:a,minLength:s,min:l,max:u,pattern:c,validate:h},y)=>{let v=r.name,b={},_="radio"===r.type,x="checkbox"===r.type,A=_||x,w=""===i,S=W.bind(null,v,t,b),C=(e,t,i,n=d,o=p)=>{let a=e?t:i;b[v]=Object.assign({type:e?n:o,message:a,ref:r},e?S(n,a):S(o,a))};if(o&&(!_&&!x&&(w||null==i)||D(i)&&!i||x&&!I(n).isValid||_&&!T(n).isValid)){let{value:i,message:n}=U(o)?{value:!!o,message:o}:V(o);if(i&&(b[v]=Object.assign({type:m,message:n,ref:A?((e.current[v].options||[])[0]||{}).ref:r},S(m,n)),!t))return b}if((null!=l||null!=u)&&""!==i){let e,n,o=V(u),a=V(l);if(isNaN(i)){let t=r.valueAsDate||new Date(i);N(o.value)&&(e=t>new Date(o.value)),N(a.value)&&(n=t<new Date(a.value))}else{let t=r.valueAsNumber||parseFloat(i);null!=o.value&&(e=t>o.value),null!=a.value&&(n=t<a.value)}if((e||n)&&(C(!!e,o.message,a.message,"max","min"),!t))return b}if(N(i)&&!w&&(a||s)){let e=V(a),r=V(s),n=null!=e.value&&i.length>e.value,o=null!=r.value&&i.length<r.value;if((n||o)&&(C(n,e.message,r.message),!t))return b}if(N(i)&&c&&!w){let{value:e,message:n}=V(c);if(e instanceof RegExp&&!e.test(i)&&(b[v]=Object.assign({type:f,message:n,ref:r},S(f,n)),!t))return b}if(h){let i=M(e,v,y,!1,!0),o=A&&n?n[0].ref:r;if("function"==typeof h){let e=H(await h(i),o);e&&(b[v]=Object.assign(Object.assign({},e),S("validate",e.message)))}else if(g(h)){let e={};for(let[r,n]of Object.entries(h)){if(!O(e)&&!t)break;let a=H(await n(i),o,r);a&&(e=Object.assign(Object.assign({},a),S(r,a.message)),t&&(b[v]=e))}O(e)||(b[v]=Object.assign({ref:o},e))}}return b};let Z=(e,t,r=[])=>{for(let i in t){let n=e+(g(t)?`.${i}`:`[${i}]`);B(t[i])?r.push(n):Z(n,t[i],r)}return r};var $=(e,t,r,i,n)=>{let o;return r.add(t),!O(e)&&(g(o=A(e,t))||Array.isArray(o))&&Z(t,o).forEac
55h(e=>r.add(e)),x(o)?n?i:A(i,t):o},K=({isOnBlur:e,isOnChange:t,isOnTouch:r,isTouched:i,isReValidateOnBlur:n,isReValidateOnChange:o,isBlurEvent:a,isSubmitted:s,isOnAll:l})=>!l&&(!s&&r?!(i||a):(s?n:e)?!a:(s?!o:!t)||a),X=e=>e.substring(0,e.indexOf("[")),Y=(e,t)=>[...e].some(e=>RegExp(`^${e}([|.)\\d+`.replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(t)),Q=typeof window!==h&&typeof document!==h;function J(e){var t;let r;if(B(e)||Q&&(e instanceof File||n(e))||!["Set","Map","Object","Date","Array"].includes(null==(t=e.constructor)?void 0:t.name))return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Set){for(let t of(r=new Set,e))r.add(t);return r}if(e instanceof Map){for(let t of(r=new Map,e.keys()))r.set(t,J(e.get(t)));return r}for(let t in r=Array.isArray(e)?[]:{},e)r[t]=J(e[t]);return r}var ee=e=>({isOnSubmit:!e||e===u,isOnBlur:"onBlur"===e,isOnChange:e===l,isOnAll:"all"===e,isOnTouch:"onTouched"===e}),et=e=>"radio"===e.type||"checkbox"===e.type;let er=typeof window===h,ei=Q?"Proxy"in window:typeof Proxy!==h;function en({mode:e=u,reValidateMode:t=l,resolver:r,context:h,defaultValues:d={},shouldFocusError:p=!0,shouldUnregister:f=!0,criteriaMode:m}={}){let v=(0,i.useRef)({}),S=(0,i.useRef)({}),T=(0,i.useRef)({}),E=(0,i.useRef)(new Set),P=(0,i.useRef)({}),I=(0,i.useRef)({}),D=(0,i.useRef)({}),V=(0,i.useRef)({}),U=(0,i.useRef)(d),H=(0,i.useRef)(!1),W=(0,i.useRef)(!1),eo=(0,i.useRef)(),ea=(0,i.useRef)({}),es=(0,i.useRef)({}),el=(0,i.useRef)(h),eu=(0,i.useRef)(r),ec=(0,i.useRef)(new Set),eh=(0,i.useRef)(ee(e)),{isOnSubmit:ed,isOnTouch:ep}=eh.current,ef="all"===m,[em,eg]=(0,i.useState)({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!ed,errors:{}}),ey=(0,i.useRef)({isDirty:!ei,dirtyFields:!ei,touched:!ei||ep,isValidating:!ei,isSubmitting:!ei,isValid:!ei}),ev=(0,i.useRef)(em),eb=(0,i.useRef)(),{isOnBlur:e_,isOnChange:ex}=(0,i.useRef)(ee(t)).current;el.current=h,eu.current=r,ev.current=em,ea.current=f?{}:O(ea.current)?J(d):ea.current;let eA=(0,i.useCallback)((e={})=>{H.current||(ev.current=Object.assign(Object.assign({},ev.current),e),eg(ev.current))},[]),ew=()=>ey.current.isValidating&&eA({isValidating:!0}),eS=(0,i.useCallback)((e,t,r=!1,i={},n)=>{let o=r||(({errors:e,name:t,error:r,validFields:i,fieldsWithValidation:n})=>{let o=x(r),a=A(e,t);return o&&!!a||!o&&!j(a,r,!0)||o&&A(n,t)&&!A(i,t)})({errors:ev.current.errors,error:t,name:e,validFields:V.current,fieldsWithValidation:D.current}),a=A(ev.current.errors,e);t?(R(V.current,e),o=o||!a||!j(a,t,!0),b(ev.current.errors,e,t)):((A(D.current,e)||eu.current)&&(b(V.current,e,!0),o=o||a),R(ev.current.errors,e)),(o&&null!=r||!O(i)||ey.current.isValidating)&&eA(Object.assign(Object.assign(Object.assign({},i),eu.current?{isValid:!!n}:{}),{isValidating:!1}))},[]),eT=(0,i.useCallback)((e,t)=>{let{ref:r,options:i}=v.current[e],o=Q&&n(r)&&null==t?"":t;"radio"===r.type?(i||[]).forEach(({ref:e})=>e.checked=e.value===o):"file"!==r.type||N(o)?C(r)?[...r.options].forEach(e=>e.selected=o.includes(e.value)):"checkbox"===r.type&&i?i.length>1?i.forEach(({ref:e})=>e.checked=Array.isArray(o)?!!o.find(t=>t===e.value):o===e.value):i[0].ref.checked=!!o:r.value=o:r.files=o},[]),eC=(0,i.useCallback)((e,t)=>{if(ey.current.isDirty){let r=eB();return e&&t&&b(r,e,t),!j(r,U.current)}return!1},[]),eE=(0,i.useCallback)((e,t=!0)=>{if(ey.current.isDirty||ey.current.dirtyFields){let r=!j(A(U.current,e),M(v,e,ea)),i=A(ev.current.dirtyFields,e),n=ev.current.isDirty;r?b(ev.current.dirtyFields,e,!0):R(ev.current.dirtyFields,e);let o={isDirty:eC(),dirtyFields:ev.current.dirtyFields},a=ey.current.isDirty&&n!==o.isDirty||ey.current.dirtyFields&&i!==A(ev.current.dirtyFields,e);return a&&t&&eA(o),a?o:{}}return{}},[]),eP=(0,i.useCallback)(async(e,t)=>{let r=(await q(v,ef,v.current[e],ea))[e];return eS(e,r,t),x(r)},[eS,ef]),eI=(0,i.useCallback)(async e=>{let{errors:t}=await eu.current(eB(),el.current,ef),r=ev.current.isValid;if(Array.isArray(e)){let r=e.map(e=>{let r=A(t,e);return r?b(ev.current.errors,e,r):R(ev.current.errors,e),!r}).every(Boolean);return eA({isValid:O(t),isValidating:!1}),r}{let i=A(t,e);return eS(e,i,r!==O(t),{},O(t)),!i}},[eS,ef]),eM=(0,i.useCallback)(async e=>{let t=e||Object.keys(v.current);if(ew(),eu.current)return eI(t);if(Array.isArray(t)){e||(ev.current.errors={});let r=await Promise.all(t.map(async e=>await eP(e,null)));return eA({isValidating:!1}),r.every(Boolean)}return await eP(t)},[eI,eP]),ek=(0,i.useCallback)((e,t,{shouldDirty:r,shouldValidate:i})=>{let n={};for(let o of(b(n,e,t),Z(e,t)))v.current[o]&&(eT(o,A(n,o)),r&&eE(o),i&&eM(o))},[eM,eT,eE]),eO=(0,i.useCallback)((e,t,r)=>{if(f||B(t)||b(ea.current,e,Array.isArray(t)?[...t]:Object.assign({},t)),v.current[e])eT(e,t),r.shouldDirty&&eE(e),r.shouldValidate&&eM(e);else if(!B(t)&&(ek(e,t,r),ec.current.has(e))){let i=X(e)||e;if(b(S.current,e,t),es.current[i]({[i]:A(S.current,i)}),(ey.current.isDirty||ey.current.dirtyFields)&&r.shouldDirty){let r,i;b(ev.current.dirtyFields,e,F(z(t,r=A(U.current,e,[]),(i=A(ev.current.dirtyFields,e,[])).slice(0,t.length)),z(r,t,i.slice(0,t.length)))),eA({isDirty:!j(Object.assign(Object.assign({},eB()),{[e]:t}),U.current)})}}
55f||b(ea.current,e,t)},[eE,eT,ek]),eD=e=>W.current||E.current.has(e)||E.current.has((e.match(/\w+/)||[])[0]),eR=e=>{let t=!0;if(!O(P.current))for(let r in P.current)(!e||!P.current[r].size||P.current[r].has(e)||P.current[r].has(X(e)))&&(I.current[r](),t=!1);return t};function eL(e){if(!f){let t=J(e);for(let e of ec.current)y(e)&&!t[e]&&(t=Object.assign(Object.assign({},t),{[e]:[]}));return t}return e}function eB(e){if(N(e))return M(v,e,ea);if(Array.isArray(e)){let t={};for(let r of e)b(t,r,M(v,r,ea));return t}return eL(G(v,J(ea.current),f))}eo.current=eo.current?eo.current:async({type:e,target:t})=>{let r,i,n=t.name,a=v.current[n];if(a){let s=e===o,l=K(Object.assign({isBlurEvent:s,isReValidateOnChange:ex,isReValidateOnBlur:e_,isTouched:!!A(ev.current.touched,n),isSubmitted:ev.current.isSubmitted},eh.current)),u=eE(n,!1),c=!O(u)||!s&&eD(n);if(s&&!A(ev.current.touched,n)&&ey.current.touched&&(b(ev.current.touched,n,!0),u=Object.assign(Object.assign({},u),{touched:ev.current.touched})),f||"checkbox"!==t.type||b(ea.current,n,M(v,n)),l)return s||eR(n),(!O(u)||c&&O(u))&&eA(u);if(ew(),eu.current){let{errors:e}=await eu.current(eB(),el.current,ef),o=ev.current.isValid;if(r=A(e,n),"checkbox"===t.type&&!r&&eu.current){let t=X(n),i=A(e,t,{});i.type&&i.message&&(r=i),t&&(i||A(ev.current.errors,t))&&(n=t)}o!==(i=O(e))&&(c=!0)}else r=(await q(v,ef,a,ea))[n];s||eR(n),eS(n,r,c,u,i)}};let eF=(0,i.useCallback)(async(e={})=>{let t=O(v.current)?U.current:{},{errors:r}=await eu.current(Object.assign(Object.assign(Object.assign({},t),eB()),e),el.current,ef)||{},i=O(r);ev.current.isValid!==i&&eA({isValid:i})},[ef]),ej=(0,i.useCallback)((e,t)=>{!function(e,t,r,i,n,o){let{ref:a,ref:{name:s}}=r,l=e.current[s];if(!n){let t=M(e,s,i);x(t)||b(i.current,s,t)}if(!a.type||!l)return delete e.current[s];"radio"===a.type||"checkbox"===a.type?Array.isArray(l.options)&&l.options.length?(l.options.filter(Boolean).forEach((e={},r)=>{(k(e.ref)&&L(e,e.ref)||o)&&(w(e.ref,t),R(l.options,`[${r}]`))}),l.options&&!l.options.filter(Boolean).length&&delete e.current[s]):delete e.current[s]:(k(a)&&L(l,a)||o)&&(w(a,t),delete e.current[s])}(v,eo.current,e,ea,f,t),f&&(R(V.current,e.ref.name),R(D.current,e.ref.name))},[f]),ez=(0,i.useCallback)(e=>{if(W.current)eA();else{for(let t of E.current)if(t.startsWith(e)){eA();break}eR(e)}},[]),eN=(0,i.useCallback)((e,t)=>{e&&(ej(e,t),f&&!(e.options||[]).filter(Boolean).length&&(R(ev.current.errors,e.ref.name),b(ev.current.dirtyFields,e.ref.name,!0),eA({isDirty:eC()}),ey.current.isValid&&eu.current&&eF(),ez(e.ref.name)))},[eF,ej]),eG=(0,i.useCallback)((e,t,r)=>{let i=r?P.current[r]:E.current,n=G(v,J(ea.current),f,!1,e);if(N(e)){let r=X(e)||e;return ec.current.has(r)&&(n=Object.assign(Object.assign({},T.current),n)),$(n,e,i,x(A(U.current,e))?t:A(U.current,e),!0)}let o=x(t)?U.current:t;return Array.isArray(e)?e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:$(n,t,i,o)}),{}):(W.current=x(r),_(!O(n)&&n||o))},[]);function eV(e,t={}){let r,{name:i,type:l,value:u}=e,h=Object.assign({ref:e},t),d=v.current,p=et(e),m=Y(ec.current,i),g=t=>Q&&(!n(e)||t===e),y=d[i],_=!0;if(y&&(p?Array.isArray(y.options)&&y.options.filter(Boolean).find(e=>u===e.ref.value&&g(e.ref)):g(y.ref))){d[i]=Object.assign(Object.assign({},y),t);return}y=l?p?Object.assign({options:[...(y&&y.options||[]).filter(Boolean),{ref:e}],ref:{type:l,name:i}},t):Object.assign({},h):h,d[i]=y;let w=x(A(ea.current,i));(!O(U.current)||!w)&&((_=x(r=A(w?U.current:ea.current,i)))||m||eT(i,r)),O(t)||(b(D.current,i,!0),!ed&&ey.current.isValid&&q(v,ef,y,ea).then(e=>{let t=ev.current.isValid;O(e)?b(V.current,i,!0):R(V.current,i),t!==O(e)&&eA()})),f&&!(m&&_)&&(m||R(ev.current.dirtyFields,i)),l&&function({ref:e},t,r){n(e)&&r&&(e.addEventListener(t?a:s,r),e.addEventListener(o,r))}(p&&y.options?y.options[y.options.length-1]:y,p||e.type===`${c}-one`,eo.current)}let eU=(0,i.useCallback)((e,t)=>async r=>{r&&r.preventDefault&&(r.preventDefault(),r.persist());let i={},n=eL(G(v,J(ea.current),f,!0));ey.current.isSubmitting&&eA({isSubmitting:!0});try{if(eu.current){let{errors:e,values:t}=await eu.current(n,el.current,ef);ev.current.errors=i=e,n=t}else for(let e of Object.values(v.current))if(e){let{name:t}=e.ref,r=await q(v,ef,e,ea);r[t]?(b(i,t,r[t]),R(V.current,t)):A(D.current,t)&&(R(ev.current.errors,t),b(V.current,t,!0))}O(i)&&Object.keys(ev.current.errors).every(e=>e in v.current)?(eA({errors:{},isSubmitting:!0}),await e(n,r)):(ev.current.errors=Object.assign(Object.assign({},ev.current.errors),i),t&&await t(ev.current.errors,r),p&&((e,t)=>{for(let r in e)if(A(t,r)){let t=e[r];if(t){if(t.ref.focus&&x(t.ref.focus()))break;else if(t.options){t.options[0].ref.focus();break}}}})(v.current,ev.current.errors))}finally{ev.current.isSubmitting=!1,eA({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:O(ev.current.errors),submitCount:ev.current.submitCount+1})}},[p,ef]);(0,i.useEffect)(()=>{let e;r&&ey.current.isValid&&eF(),eb.current=eb.current||!Q?eb.current:((e=new MutationObserver(()=>{for(let e of Object.values(v.current))if(e&&e.options)for(let t of e.options)t&&t.ref&&k(t.ref)&&eN(e);else e&&k(e.ref)&&eN(e)})).observe(window.document,{childList:!0,subtree:!0}),e)},[eN,U.current]),(0,i.useEffect)(()=>()=>{eb.current&&eb.current.disconnect(),H.current=!0,Object.values(v.current).forEach(e
55=>eN(e,!0))},[]),!r&&ey.current.isValid&&(em.isValid=j(V.current,D.current)&&O(ev.current.errors));let eH={trigger:eM,setValue:(0,i.useCallback)(function(e,t,r){eO(e,t,r||{}),eD(e)&&eA(),eR(e)},[eO,eM]),getValues:(0,i.useCallback)(eB,[]),register:(0,i.useCallback)(function(e,t){if(!er)if(N(e))eV({name:e},t);else{if(!g(e)||!("name"in e))return t=>t&&eV(t,e);eV(e,t)}},[U.current]),unregister:(0,i.useCallback)(function(e){for(let t of Array.isArray(e)?e:[e])eN(v.current[t],!0)},[]),formState:ei?new Proxy(em,{get:(e,t)=>{if(t in e)return ey.current[t]=!0,e[t]}}):em};return Object.assign({watch:function(e,t){return eG(e,t)},control:(0,i.useMemo)(()=>Object.assign({isFormDirty:eC,updateWatchedValue:ez,shouldUnregister:f,updateFormState:eA,removeFieldEventListener:ej,watchInternal:eG,mode:eh.current,reValidateMode:{isReValidateOnBlur:e_,isReValidateOnChange:ex},validateResolver:r?eF:void 0,fieldsRef:v,resetFieldArrayFunctionRef:es,useWatchFieldsRef:P,useWatchRenderFunctionsRef:I,fieldArrayDefaultValuesRef:S,validFieldsRef:V,fieldsWithValidationRef:D,fieldArrayNamesRef:ec,readFormStateRef:ey,formStateRef:ev,defaultValuesRef:U,shallowFieldsStateRef:ea,fieldArrayValuesRef:T},eH),[U.current,ez,f,ej,eG]),handleSubmit:eU,reset:(0,i.useCallback)((e,t={})=>{if(Q){for(let e of Object.values(v.current))if(e){let{ref:t,options:r}=e,i=et(t)&&Array.isArray(r)?r[0].ref:t;if(n(i))try{i.closest("form").reset();break}catch(e){}}}v.current={},U.current=Object.assign({},e||U.current),e&&eR(""),Object.values(es.current).forEach(e=>"function"==typeof e&&e()),ea.current=f?{}:J(e||U.current),(({errors:e,isDirty:t,isSubmitted:r,touched:i,isValid:n,submitCount:o,dirtyFields:a})=>{n||(V.current={},D.current={}),S.current={},E.current=new Set,W.current=!1,eA({submitCount:o?ev.current.submitCount:0,isDirty:!!t&&ev.current.isDirty,isSubmitted:!!r&&ev.current.isSubmitted,isValid:!!n&&ev.current.isValid,dirtyFields:a?ev.current.dirtyFields:{},touched:i?ev.current.touched:{},errors:e?ev.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(t)},[]),clearErrors:(0,i.useCallback)(function(e){e&&(Array.isArray(e)?e:[e]).forEach(e=>v.current[e]&&y(e)?delete ev.current.errors[e]:R(ev.current.errors,e)),eA({errors:e?ev.current.errors:{}})},[]),setError:(0,i.useCallback)(function(e,t){let r=(v.current[e]||{}).ref;b(ev.current.errors,e,Object.assign(Object.assign({},t),{ref:r})),eA({isValid:!1}),t.shouldFocus&&r&&r.focus&&r.focus()},[]),errors:em.errors},eH)}function eo(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)0>t.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}let ea=(0,i.createContext)(null);ea.displayName="RHFContext";let es=()=>(0,i.useContext)(ea),el=e=>{var{children:t}=e,r=eo(e,["children"]);return(0,i.createElement)(ea.Provider,{value:Object.assign({},r)},t)};function eu({name:e,rules:t,defaultValue:r,control:n,onFocus:o}){let a=es(),{defaultValuesRef:s,setValue:l,register:u,unregister:c,trigger:h,mode:d,reValidateMode:{isReValidateOnBlur:p,isReValidateOnChange:f},formState:m,formStateRef:{current:{isSubmitted:y,touched:v,errors:_}},updateFormState:w,readFormStateRef:S,fieldsRef:T,fieldArrayNamesRef:C,shallowFieldsStateRef:E}=n||a.control,P=!Y(C.current,e),I=()=>!x(A(E.current,e))&&P?A(E.current,e):x(r)?A(s.current,e):r,[M,k]=(0,i.useState)(I()),O=(0,i.useRef)(M),D=(0,i.useRef)({focu
55s:()=>null}),R=(0,i.useRef)(o||(()=>{"function"==typeof D.current.focus&&D.current.focus()})),L=(0,i.useCallback)(t=>!K(Object.assign({isBlurEvent:t,isReValidateOnBlur:p,isReValidateOnChange:f,isSubmitted:y,isTouched:!!A(v,e)},d)),[p,f,y,v,e,d]),F=(0,i.useCallback)(([e])=>{let t=B(e)||!g(e.target)||g(e.target)&&!e.type?e:x(e.target.value)?e.target.checked:e.target.value;return k(t),O.current=t,t},[]),j=(0,i.useCallback)(r=>{T.current[e]?T.current[e]=Object.assign({ref:T.current[e].ref},t):(u(Object.defineProperties({name:e,focus:R.current},{value:{set(e){k(e),O.current=e},get:()=>O.current}}),t),r=x(A(s.current,e))),r&&P&&k(I())},[t,e,u]);(0,i.useEffect)(()=>()=>c(e),[e]),(0,i.useEffect)(()=>{j()},[j]),(0,i.useEffect)(()=>{T.current[e]||j(!0)});let z=(0,i.useCallback)(()=>{S.current.touched&&!A(v,e)&&(b(v,e,!0),w({touched:v})),L(!0)&&h(e)},[e,w,L,h,S]);return{field:{onChange:(0,i.useCallback)((...t)=>l(e,F(t),{shouldValidate:L(),shouldDirty:!0}),[l,e,L]),onBlur:z,name:e,value:M,ref:D},meta:Object.defineProperties({invalid:!!A(_,e)},{isDirty:{get:()=>!!A(m.dirtyFields,e)},isTouched:{get:()=>!!A(m.touched,e)}})}}function ec({control:e,name:t,defaultValue:r}){let n=es(),{useWatchFieldsRef:o,useWatchRenderFunctionsRef:a,watchInternal:s,defaultValuesRef:l}=e||n.control,u=(0,i.useState)()[1],c=(0,i.useRef)(),d=(0,i.useRef)(r);return(0,i.useEffect)(()=>{let e,r=(e=typeof performance===h?Date.now():1e3*performance.now(),c.current="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=(16*Math.random()+e)%16|0;return("x"==t?r:3&r|8).toString(16)})),i=a.current,n=o.current;return n[r]=new Set,i[r]=()=>u({}),s(t,d.current,r),()=>{delete n[r],delete i[r]}},[t,a,o,s,d]),c.current?s(t,d.current,c.current):x(r)?N(t)?A(l.current,t):Array.isArray(t)?t.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:A(l.current,t)}),{}):l.current:r}let eh=e=>{let{rules:t,as:r,render:n,defaultValue:o,control:a,onFocus:s}=e,l=eo(e,["rules","as","render","defaultValue","control","onFocus"]),{field:u,meta:c}=eu(e),h=Object.assign(Object.assign({},l),u);return r?(0,i.isValidElement)(r)?(0,i.cloneElement)(r,h):(0,i.createElement)(r,h):n?n(u,c):null}},35360(e,t){"use strict";var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,f=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case c:case h:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case d:case g:case m:case l:return e;default:return t}}case n:return t}}}function A(e){return x(e)===h}t.AsyncMode=c,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=l,t.Element=i,t.ForwardRef=d,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=n,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return A(e)||x(e)===c},t.isConcurrentMode=A,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return x(e)===d},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===n},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===s||e===a||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===v||e.$$typeof===b||e.$$typeof===_||e.$$typeof===y)},t.typeOf=x},17020(e,t,r){"use strict";e.exports=r(35360)},85748(e,t){"use strict";var r=60103,i=60106,n=60107,o=60108,a=60114,s=60109,l=60110,u=60112,c=60113,h=60120,d=60115,p=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;r=f("react.element"),i=f("react.portal"),n=f("react.fragment"),o=f("react.strict_mode"),a=f("react.profiler"),s=f("react.provider"),l=f("react.context"),u=f("react.forward_ref"),c=f("react.suspense"),h=f("react.suspense_list"),d=f("react.memo"),p=f("react.lazy"),f("react.block"),f("react.server.block"),f("react.fundamental"),f("react.debug_trace_mode"),f("react.legacy_hidden")}t.isContextConsumer=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case n:case a:case o:case c:case h:return e;default:switch(e=e&&e.$$typeof){case l:case u:case p:case d:case s:return e;default:return t}}case i:return t}}}(e)===l}},77880(e,t,r){"use strict";e.exports=r(85748)},21619(e,t,r){"use strict";function i(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function n(e){this.setState((function(t){var r=this.constructor.getDerivedStateFromProps(e,t);return null!=r?r:null}).bind(this))}function o(e,t){try{var r=this.props,i=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,i)}finally{this.props=r,this.state=i}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var r=null,a=null,s=null;if("function"==typeof t.componentWillMount?r="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==r||null!==a||null!==s)throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
56
57`+(e.displayName||e.name)+" uses "+("function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()")+" but also contains the following legacy lifecycles:"+(null!==r?`
58  `+r:"")+(null!==a?`
59  `+a:"")+(null!==s?`
60  `+s:"")+`
61
62The above lifecycles should be removed. Learn more about this warning here:
63https://fb.me/react-async-component-lifecycle-hooks`);if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=i,t.componentWillReceiveProps=n),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,r){var i=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:r;l.call(this,e,t,i)}}return e}
63r.r(t),r.d(t,{polyfill:()=>a}),i.__suppressDeprecationWarning=!0,n.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},21214(e,t,r){"use strict";var i=r(67308),n=r(45918),o=r(17020);function a(e,t){for(var r in t)void 0!==t[r]&&(e[r]=t[r])}function s(e){var t=e.spread;return null==t?e.children.length>1:t}e.exports=function e(t,r){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=r.renderers[t.type];t.position||(t.position={start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}});var h=t.position.start,d=[t.type,h.line,h.column,u].join("-");if(!o.isValidElementType(c))throw Error("Renderer for type `".concat(t.type,"` not defined or is not renderable"));var p=function(t,r,o,l,u,c){var h,d,p={key:r},f="string"==typeof l||l===i.Fragment;o.sourcePos&&t.position&&(p["data-sourcepos"]=[(h=t.position).start.line,":",h.start.column,"-",h.end.line,":",h.end.column].map(String).join("")),o.rawSourcePos&&!f&&(p.sourcePosition=t.position),o.includeNodeIndex&&u.node&&u.node.children&&!f&&(p.index=u.node.children.indexOf(t),p.parentChildCount=u.node.children.length);var m=null!==t.identifier&&void 0!==t.identifier?o.definitions[t.identifier.toUpperCase()]||{}:null;switch(t.type){case"root":a(p,{className:o.className});break;case"text":p.nodeKey=r,p.children=t.value;break;case"heading":p.level=t.depth;break;case"list":p.start=t.start,p.ordered=t.ordered,p.spread=t.spread,p.depth=t.depth;break;case"listItem":p.checked=t.checked,p.spread=t.spread,p.ordered=t.ordered,p.index=t.index,p.children=((u&&u.node?function(e){for(var t=e.children,r=e.spread,i=-1;!r&&++i<t.length;)r=s(t[i]);return r}(u.node):s(t))?t.children:t.children.reduce(function(e,t){return e.concat("paragraph"===t.type?t.children:[t])},[])).map(function(r,i){return e(r,o,{node:t,props:p},i)});break;case"definition":a(p,{identifier:t.identifier,title:t.title,url:t.url});break;case"code":a(p,{language:t.lang&&t.lang.split(/\s/,1)[0]});break;case"inlineCode":p.children=t.value,p.inline=!0;break;case"link":a(p,{title:t.title||void 0,target:"function"==typeof o.linkTarget?o.linkTarget(t.url,t.children,t.title):o.linkTarget,href:o.transformLinkUri?o.transformLinkUri(t.url,t.children,t.title):t.url});break;case"image":a(p,{src:o.transformImageUri?o.transformImageUri(t.url,t.children,t.title,t.alt):t.url,alt:t.alt||"",title:t.title||void 0});break;case"linkReference":a(p,n(m,{href:o.transformLinkUri?o.transformLinkUri(m.href):m.href}));break;case"imageReference":a(p,{src:o.transformImageUri&&m.href?o.transformImageUri(m.href,t.children,m.title,t.alt):m.href,alt:t.alt||"",title:m.title||void 0});break;case"table":case"tableHead":case"tableBody":p.columnAlignment=t.align;break;case"tableRow":p.isHeader="tableHead"===u.node.type,p.columnAlignment=u.props.columnAlignment;break;case"tableCell":a(p,{isHeader:u.props.isHeader,align:u.props.columnAlignment[c]});break;case"virtualHtml":p.tag=t.tag;break;case"html":p.isBlock=t.position.start.line!==t.position.end.line,p.allowDangerousHtml=o.allowDangerousHtml,p.escapeHtml=o.escapeHtml,p.skipHtml=o.skipHtml;break;case"parsedHtml":t.children&&(d=t.children.map(function(r,i){return e(r,o,{node:t,props:p},i)})),p.allowDangerousHtml=o.allowDangerousHtml,p.escapeHtml=o.escapeHtml,p.skipHtml=o.skipHtml,p.element=t.element?function(e,t){var r=e.element;if(Array.isArray(r)){var n=i.Fragment||"div";return i.createElement(n,null,r)}if(r.props.children||t){var o=i.Children.toArray(r.props.children).concat(t);return i.cloneElement(r,null,o)}return i.cloneElement(r,null)}(t,d):null;break;default:a(p,n(t,{type:void 0,position:void 0,children:void 0}))}return!f&&t.value&&(p.value=t.value),f||(p.node=t),p}(t,d,r,c,l,u);return i.createElement(c,p,p.children||t.children&&t.children.map(function(i,n){return e(i,r,{node:t,props:p},n)})||void 0)}},95175(e,t,r){"use strict";var i=r(58849);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(e,"definition",function(e){var r=e.identifier.toUpperCase();r in t||(t[r]={href:e.url,title:e.title})}),t}},85467(e,t,r){"use strict";var i=r(58849),n=[].splice;function o(e,t){return function(e){return i(e,r),e};function r(r,i,o){if(o&&!e(r,i,o)){var a=[i,1];return"unwrap"===t&&r.children&&(a=a.concat(r.children)),n.apply(o.children,a),i}}}t.ofType=function(e,t){return o(function(t,r,i){return!e.includes(t.type)},t)},t.ifNotMatch=o},65222(e,t,r){"use strict";var i=r(58849),n="virtualHtml",o=/^<(area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)\s*\/?>$/i,a=/^<(\/?)([a-z]+)\s*>$/;e.exports=function(e){var t,r;return i(e,"html",function(e,i,s){r!==s&&(t=[],r=s);
63var l,u,c,h,d=!!(l=e.value.match(o))&&l[1];if(d)return s.children.splice(i,1,{type:n,tag:d,position:e.position}),!0;var p=!!(u=e.value.match(a))&&{tag:u[2],opening:!u[1],node:e};if(!p)return!0;var f=function(e,t){for(var r=e.length;r--;)if(e[r].tag===t)return e.splice(r,1)[0];return!1}(t,p.tag);return f?s.children.splice(i,0,(c=s.children.indexOf(p.node),h=s.children.indexOf(f.node),{type:n,children:s.children.splice(c,h-c+1).slice(1,-1),tag:p.tag,position:{start:p.node.position.start,end:f.node.position.end,indent:[]}})):p.opening||t.push(p),!0},!0),e}},46749(e,t,r){"use strict";var i=r(45918),n=r(23591),o=r(3189),a=r(5821),s=r(74970),l=r(65222),u=r(85467),c=r(21214),h=r(10413),d=r(95175),p=r(65188),f=r(62200),m=r(45381),g=Object.keys(f),y=function(e){var t,r,a,p,y,v=e.source||e.children||"";if(e.allowedTypes&&e.disallowedTypes)throw Error("Only one of `allowedTypes` and `disallowedTypes` should be defined");var b=i(f,e.renderers),_=n().use(o).use(e.plugins||[]),x=_.runSync(_.parse(v)),A=i(e,{renderers:b,definitions:d(x)});return(t=[h,s()],r=e.disallowedTypes,e.allowedTypes&&(r=g.filter(function(t){return"root"!==t&&-1===e.allowedTypes.indexOf(t)})),a=e.unwrapDisallowed?"unwrap":"remove",r&&r.length>0&&t.push(u.ofType(r,a)),e.allowNode&&t.push(u.ifNotMatch(e.allowNode,a)),p=(e.allowDangerousHtml||!1===e.escapeHtml)&&!e.skipHtml,y=(e.astPlugins||[]).some(function(e){return e.identity===m.HtmlParser}),p&&!y&&t.push(l),e.astPlugins&&(t=t.concat(e.astPlugins)),t.push(c),t).forEach(function(e){x=e(x,A)}),x};y.defaultProps={transformLinkUri:p},y.propTypes={className:a.string,source:a.string,children:a.string,sourcePos:a.bool,rawSourcePos:a.bool,escapeHtml:a.bool,allowDangerousHtml:a.bool,ski
63pHtml:a.bool,allowNode:a.func,allowedTypes:a.arrayOf(a.oneOf(g)),disallowedTypes:a.arrayOf(a.oneOf(g)),transformLinkUri:a.oneOfType([a.func,a.bool]),linkTarget:a.oneOfType([a.func,a.string]),transformImageUri:a.func,astPlugins:a.arrayOf(a.func),unwrapDisallowed:a.bool,renderers:a.object,plugins:a.array},y.types=g,y.renderers=f,y.uriTransformer=p,e.exports=y},62200(e,t,r){"use strict";var i=r(45918),n=r(67308),o=parseInt((n.version||"16").slice(0,2),10)>=16,a=n.createElement;function s(e,t){return a(e,l(t),t.children)}function l(e){var t=e["data-sourcepos"];return t?{"data-sourcepos":t}:{}}e.exports={break:"br",paragraph:"p",emphasis:"em",strong:"strong",thematicBreak:"hr",blockquote:"blockquote",delete:"del",link:"a",image:"img",linkReference:"a",imageReference:"img",table:s.bind(null,"table"),tableHead:s.bind(null,"thead"),tableBody:s.bind(null,"tbody"),tableRow:s.bind(null,"tr"),tableCell:function(e){var t=e.align?{textAlign:e.align}:void 0,r=l(e);return a(e.isHeader?"th":"td",t?i({style:t},r):r,e.children)},root:function(e){var t=e.className;return a(!t&&n.Fragment||"div",t?{className:t}:null,e.children)},text:function(e){var t=e.children||"";return o?t:a("span",null,t)},list:function(e){var t=l(e);return null!==e.start&&1!==e.start&&void 0!==e.start&&(t.start=e.start.toString()),a(e.ordered?"ol":"ul",t,e.children)},listItem:function(e){var t=null;return null!==e.checked&&void 0!==e.checked&&(t=a("input",{type:"checkbox",checked:e.checked,readOnly:!0})),a("li",l(e),t,e.children)},definition:function(){return null},heading:function(e){return a("h".concat(e.level),l(e),e.children)},inlineCode:function(e){return a("code",l(e),e.children)},code:function(e){var t=e.language&&"language-".concat(e.language),r=a("code",t?{className:t}:null,e.value);return a("pre",l(e),r)},html:function(e){if(e.skipHtml)return null;var t=e.allowDangerousHtml||!1===e.escapeHtml,r=e.isBlock?"div":"span";return t?a(r,{dangerouslySetInnerHTML:{__html:e.value}}):a(n.Fragment||r,null,e.value)},virtualHtml:function(e){return a(e.tag,l(e),e.children)},parsedHtml:function(e){return e["data-sourcepos"]?n.cloneElement(e.element,{"data-sourcepos":e["data-sourcepos"]}):e.element}}},45381(e,t){"use strict";var r="__RMD_HTML_PARSER__";t.HtmlParser="u"<typeof Symbol?r:Symbol(r)},65188(e){"use strict";var t=["http","https","mailto","tel"];e.exports=function(e){var r=(e||"").trim(),i=r.charAt(0);if("#"===i||"/"===i)return r;var n=r.indexOf(":");if(-1===n)return r;for(var o=t.length,a=-1;++a<o;){var s=t[a];if(n===s.length&&r.slice(0,s.length).toLowerCase()===s)return r}return -1!==(a=r.indexOf("?"))&&n>a||-1!==(a=r.indexOf("#"))&&n>a?r:"javascript:void(0)"}},10413(e,t,r){"use strict";var i=r(58849);function n(e){var t=e.children;e.children=[{type:"tableHead",align:e.align,children:[t[0]],position:t[0].position}],t.length>1&&e.children.push({type:"tableBody",align:e.align,children:t.slice(1),position:{start:t[1].position.start,end:t[t.length-1].position.end}})}e.exports=function(e){return i(e,"table",n),e}},78519(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=r(67308),a=f(o),s=f(r(39190)),l=f(r(5821)),u=f(r(39617)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(98345)),h=r(99475),d=f(h),p=r(21619);function f(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var g=t.portalClassName="ReactModalPortal",y=t.bodyOpenClassName="ReactModal__Body--open",v=h.canUseDOM&&void 0!==s.default.createPortal,b=function(e){return document.createElement(e)},_=function(){return v?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer},x=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");for(var e,r,n,o=arguments.length,l=Array(o),c=0;c<o;c++)l[c]=arguments[c];return r=n=m(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),n.removePortal=function(){v||s.default.unmountComponentAtNode(n.node);var e=(0,n.props.parentSelector)();e&&e.contains(n.node)?e.removeChild(n.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},n.portalRef=function(e){n.portal=e},n.renderPortal=function(e){var r=_()(n,a.default.createElement(u.default,i({defaultStyles:t.defaultStyles},e)),n.node);n.portalRef(r)},m(n,r)}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"c
63omponentDidMount",value:function(){h.canUseDOM&&(v||(this.node=b("div")),this.node.className=this.props.portalClassName,(0,this.props.parentSelector)().appendChild(this.node),v||this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:(0,e.parentSelector)(),nextParent:(0,this.props.parentSelector)()}}},{key:"componentDidUpdate",value:function(e,t,r){if(h.canUseDOM){var i=this.props,n=i.isOpen,o=i.portalClassName;e.portalClassName!==o&&(this.node.className=o);var a=r.prevParent,s=r.nextParent;s!==a&&(a.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||n)&&(v||this.renderPortal(this.props))}}},{key:"componentWillUnmount",value:function(){if(h.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),r=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);r?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,r-t)):this.removePortal()}}},{key:"render",value:function(){return h.canUseDOM&&v?(!this.node&&v&&(this.node=b("div")),_()(a.default.createElement(u.default,i({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){c.setElement(e)}}]),t}(o.Component);x.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.oneOfType([l.default.instanceOf(d.default),l.default.instanceOf(h.SafeHTMLCollection),l.default.instanceOf(h.SafeNodeList),l.default.arrayOf(l.default.instanceOf(d.default))]),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func},x.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:y,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return a.default.createElement("div",e,t)},contentElement:function(e,t){return a.default.createElement("div",e,t)}},x.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,p.polyfill)(x),t.default=x},39617(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=r(67308),s=g(r(5821)),l=m(r(43384)),u=g(r(89468)),c=m(r(98345)),h=m(r(34643)),d=r(99475),p=g(d),f=g(r(46373));
63function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}r(73560);var y={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},v=0,b=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.setOverlayRef=function(e){r.overlay=e,r.props.overlayRef&&r.props.overlayRef(e)},r.setContentRef=function(e){r.content=e,r.props.contentRef&&r.props.contentRef(e)},r.afterClose=function(){var e=r.props,t=e.appElement,i=e.ariaHideApp,n=e.htmlOpenClassName,o=e.bodyOpenClassName,a=e.parentSelector,s=a&&a().ownerDocument||document;o&&h.remove(s.body,o),n&&h.remove(s.getElementsByTagName("html")[0],n),i&&v>0&&0==(v-=1)&&c.show(t),r.props.shouldFocusAfterRender&&(r.props.shouldReturnFocusAfterClose?(l.returnFocus(r.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),r.props.onAfterClose&&r.props.onAfterClose(),f.default.deregister(r)},r.open=function(){r.beforeOpen(),r.state.afterOpen&&r.state.beforeClose?(clearTimeout(r.closeTimer),r.setState({beforeClose:!1})):(r.props.shouldFocusAfterRender&&(l.setupScopedFocus(r.node),l.markForFocusLater()),r.setState({isOpen:!0},function(){r.openAnimationFrame=requestAnimationFrame(function(){r.setState({afterOpen:!0}),r.props.isOpen&&r.props.onAfterOpen&&r.props.onAfterOpen({overlayEl:r.overlay,contentEl:r.content})})}))},r.close=function(){r.props.closeTimeoutMS>0?r.closeWithTimeout():r.closeWithoutTimeout()},r.focusContent=function(){return r.content&&!r.contentHasFocus()&&r.content.focus({preventScroll:!0})},r.closeWithTimeout=function(){var e=Date.now()+r.props.closeTimeoutMS;r.setState({beforeClose:!0,closesAt:e},function(){r.closeTimer=setTimeout(r.closeWithoutTimeout,r.state.closesAt-Date.now())})},r.closeWithoutTimeout=function(){r.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},r.afterClose)},r.handleKeyDown=function(e){("Tab"===e.code||9===e.keyCode)&&(0,u.default)(r.content,e),r.props.shouldCloseOnEsc&&("Escape"===e.code||27===e.keyCode)&&(e.stopPropagation(),r.requestClose(e))},r.handleOverlayOnClick=function(e){null===r.shouldClose&&(r.shouldClose=!0),r.shouldClose&&r.props.shouldCloseOnOverlayClick&&(r.ownerHandlesClose()?r.requestClose(e):r.focusContent()),r.shouldClose=null},r.handleContentOnMouseUp=function(){r.shouldClose=!1},r.handleOverlayOnMouseDown=function(e){r.props.shouldCloseOnOverlayClick||e.target!=r.overlay||e.preventDefault()},r.handleContentOnClick=function(){r.shouldClose=!1},r.handleContentOnMouseDown=function(){r.shouldClose=!1},r.requestClose=function(e){return r.ownerHandlesClose()&&r.props.onRequestClose(e)},r.ownerHandlesClose=function(){return r.props.onRequestClose},r.shouldBeClosed=function(){return!r.state.isOpen&&!r.state.beforeClose},r.contentHasFocus=function(){return document.activeElement===r.content||r.content.contains(document.activeElement)},r.buildClassName=function(e,t){var i=(void 0===t?"undefined":n(t))==="object"?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},o=i.base;return r.state.afterOpen&&(o=o+" "+i.afterOpen),r.state.beforeClose&&(o=o+" "+i.beforeClose),"string"==typeof t&&t?o+" "+t:o},r.attributesFromObject=function(e,t){return Object.keys(t).reduce(function(r,i){return r[e+"-"+i]=t[i],r},{})},r.state={afterOpen:!1,beforeClose:!1},r.shouldClose=null,r.moveFromContentToOverlay=null,r}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),o(t,[{key:"c
63omponentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,r=e.ariaHideApp,i=e.htmlOpenClassName,n=e.bodyOpenClassName,o=e.parentSelector,a=o&&o().ownerDocument||document;n&&h.add(a.body,n),i&&h.add(a.getElementsByTagName("html")[0],i),r&&(v+=1,c.hide(t)),f.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,r=e.className,n=e.overlayClassName,o=e.defaultStyles,a=e.children,s=r?{}:o.content,l=n?{}:o.overlay;if(this.shouldBeClosed())return null;var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",n),style:i({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=i({id:t,ref:this.setContentRef,style:i({},s,this.props.style.content),className:this.buildClassName("content",r),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",i({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),h=this.props.contentElement(c,a);return this.props.overlayElement(u,h)}}]),t}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(p.default),s.default.instanceOf(d.SafeHTMLCollection),s.default.instanceOf(d.SafeNodeList),s.default.arrayOf(s.default.instanceOf(p.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},98345(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a&&(a.removeAttribute?a.removeAttribute("aria-hidden"):null!=a.length?a.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(a).forEach(function(e){return e.removeAttribute("aria-hidden")})),a=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&o.canUseDOM){var r=document.querySelectorAll(t);s(r,t),t=r}return a=t||a},t.validateElement=l,t.hide=function(e){var t=!0,r=!1,i=void 0;try{for(var n,o=l(e)[Symbol.iterator]();!(t=(n=o.next()).done);t=!0)n.value.setAttribute("aria-hidden","true")}catch(e){r=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw i}}},t.show=function(e){var t=!0,r=!1,i=void 0;try{for(var n,o=l(e)[Symbol.iterator]();!(t=(n=o.next()).done);t=!0)n.value.removeAttribute("aria-hidden")}catch(e){r=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw i}}},t.documentNotReadyOrSSRTesting=function(){a=null};var i,n=(i=r(70453))&&i.__esModule?i:{default:i},o=r(99475),a=null;function s(e,t){if(!e||!e.length)throw Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||a;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,n.default)(!1,"react-modal: App element is not defined. Please use `Modal.setAppElement(el)` or set `appElement={el}`. This is needed so screen readers don't see main content when modal is opened. It is not recommended, but you can opt-out by setting `ariaHideApp={false}`."),[])}},73560(e,t,r){"use strict";
63Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[o,a],t=0;t<e.length;t++){var r=e[t];r&&r.parentNode&&r.parentNode.removeChild(r)}o=a=null,s=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(s.length);for(var e=[o,a],t=0;t<e.length;t++){var r=e[t]||{};console.log(r.nodeName,r.className,r.id)}console.log("edn bodyTrap ----------")};var i,n=(i=r(46373))&&i.__esModule?i:{default:i},o=void 0,a=void 0,s=[];function l(){0===s.length||s[s.length-1].focusContent()}n.default.subscribe(function(e,t){o||a||((o=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),o.style.position="absolute",o.style.opacity="0",o.setAttribute("tabindex","0"),o.addEventListener("focus",l),(a=o.cloneNode()).addEventListener("focus",l)),(s=t).length>0?(document.body.firstChild!==o&&document.body.insertBefore(o,document.body.firstChild),document.body.lastChild!==a&&document.body.appendChild(a)):(o.parentElement&&o.parentElement.removeChild(o),a.parentElement&&a.parentElement.removeChild(a))})},34643(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in r)n(e,r[t]);var o=document.body;for(var a in i)n(o,i[a]);r={},i={}},t.log=function(){};var r={},i={};function n(e,t){e.classList.remove(t)}var o=function(e,t,r){r.forEach(function(r){t[r]||(t[r]=0),t[r]+=1,e.add(r)})},a=function(e,t,r){r.forEach(function(r){t[r]&&(t[r]-=1),0===t[r]&&e.remove(r)})};t.add=function(e,t){return o(e.classList,"html"==e.nodeName.toLowerCase()?r:i,t.split(" "))},t.remove=function(e,t){return a(e.classList,"html"==e.nodeName.toLowerCase()?r:i,t.split(" "))}},43384(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){o=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=u,t.markForFocusLater=function(){o.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{0!==o.length&&(t=o.pop()).focus({preventScroll:e});return}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){o.length>0&&o.pop()},t.setupScopedFocus=function(e){a=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",u,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",u))},t.teardownScopedFocus=function(){a=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",u)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",u))};var i,n=(i=r(76972))&&i.__esModule?i:{default:i},o=[],a=null,s=!1;function l(){s=!0}function u(){s&&(s=!1,a&&setTimeout(function(){a.contains(document.activeElement)||((0,n.default)(a)[0]||a).focus()},0))}},46373(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(i.openInstances.length),i.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")},t.resetState=function(){i=new r};var r=function e(){var t=this;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this.register=function(e){-1!==t.openInstances.indexOf(e)||(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var r=t.openInstances.indexOf(e);-1===r||(t.openInstances.splice(r,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach(function(r){return r(e,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},i=new r;t.default=i},99475(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var i,n=((i=r(52083))&&i.__esModule?i:{default:i}).default,o=n.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=n.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=n.canUseDOM?window.NodeList:{},t.canUseDOM=n.canUseDOM,t.default=o},89468(e,t,r){"use strict";
63Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=(0,n.default)(e);if(!r.length)return void t.preventDefault();var i=void 0,o=t.shiftKey,a=r[0],s=r[r.length-1],l=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement}();if(e===l){if(!o)return;i=s}if(s!==l||o||(i=a),a===l&&o&&(i=s),i){t.preventDefault(),i.focus();return}var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var c=r.indexOf(l);if(c>-1&&(c+=o?-1:1),void 0===(i=r[c])){t.preventDefault(),(i=o?s:a).focus();return}t.preventDefault(),i.focus()}};var i,n=(i=r(76972))&&i.__esModule?i:{default:i};e.exports=t.default},76972(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce(function(t,r){return t.concat(r.shadowRoot?e(r.shadowRoot):[r])},[]).filter(i)};var r=/^(input|select|textarea|button|object|iframe)$/;function i(e){var t,i,n=e.getAttribute("tabindex");null===n&&(n=void 0);var o=isNaN(n);return(o||n>=0)&&(t=!o,i=e.nodeName.toLowerCase(),(r.test(i)&&!e.disabled||"a"===i&&e.href||t)&&function(e){for(var t=e,r=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(r&&t===r&&(t=r.host.parentNode),function(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?"contents"!==i&&("visible"!==r.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0):"none"===i}catch(e){return console.warn("Failed to inspect element style"),!1}}(t))return!1;t=t.parentNode}return!0}(e))}e.exports=t.default},21157(e,t,r){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=((i=r(78519))&&i.__esModule?i:{default:i}).default,e.exports=t.default},86770(e,t,r){var i=r(17876).createReactPlayer,n=r(64104).default;e.exports=i([{key:"file",canPlay:n.canPlay,lazyPlayer:n}])},13501(e,t,r){var i=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))l.call(e,s)||s===r||n(e,s,{get:()=>t[s],enumerable:!(i=o(t,s))||i.enumerable});return e},c=(e,t,r)=>(r=null!=e?i(s(e)):{},u(!t&&e&&e.__esModule?r:n(r,"default",{value:e,enumerable:!0}),e)),h=(e,t,r)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?n(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r,r},d={},p={default:()=>b};for(var f in p)n(d,f,{get:p[f],enumerable:!0});e.exports=u(n({},"__esModule",{value:!0}),d);var m=c(r(67308)),g=c(r(98727)),y=r(13724),v=r(27819);class b extends m.Component{constructor(){super(...arguments),h(this,"mounted",!1),h(this,"isReady",!1),h(this,"isPlaying",!1),h(this,"isLoading",!0),h(this,"loadOnReady",null),h(this,"startOnPlay",!0),h(this,"seekOnPlay",null),h(this,"onDurationCalled",!1),h(this,"handlePlayerMount",e=>{this.player||(this.player=e,this.player.load(this.props.url)),this.progress()}),h(this,"getInternalPlayer",e=>this.player?this.player[e]:null),h(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){let e=this.getCurrentTime()||0,t=this.getSecondsLoaded(),r=this.getDuration();if(r){let i={playedSeconds:e,played:e/r};null!==t&&(i.loadedSeconds=t,i.loaded=t/r),(i.playedSeconds!==this.prevPlayed||i.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(i),this.prevPlayed=i.playedSeconds,this.prevLoaded=i.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),h(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;let{onReady:e,playing:t,volume:r,muted:i}=this.props;e(),i||null===r||this.player.setVolume(r),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):t&&this.player.play(),this.handleDurationCheck()}),h(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;let{onStart:e,onPlay:t,playbackRate:r}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&1!==r&&this.player.setPlaybackRate(r),e(),this.startOnPlay=!1),t(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),h(this,"handlePause",e=>{this.isPlaying=!1,this.isLoading||this.props.onPause(e)}),h(this,"handleEnded",()=>{let{activePlayer:e,loop:t,onEnded:r}=this.props;e.loopOnEnded&&t&&this.seekTo(0),t||(this.isPlaying=!1,r())}),h(this,"handleError",(...e)=>{this.isLoading=!1,this.props.onError(...e)}),h(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);let e=this.getDuration();e?this.onDurationCalled||(this.props.onDuration(e),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),h(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP(
63)),this.mounted=!1}componentDidUpdate(e){if(!this.player)return;let{url:t,playing:r,volume:i,muted:n,playbackRate:o,pip:a,loop:s,activePlayer:l,disableDeferredLoading:u}=this.props;if(!(0,g.default)(e.url,t)){if(this.isLoading&&!l.forceLoad&&!u&&!(0,v.isMediaStream)(t)){console.warn(`ReactPlayer: the attempt to load ${t} is being deferred until the player has loaded`),this.loadOnReady=t;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(t,this.isReady)}e.playing||!r||this.isPlaying||this.player.play(),e.playing&&!r&&this.isPlaying&&this.player.pause(),!e.pip&&a&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!a&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==i&&null!==i&&this.player.setVolume(i),e.muted!==n&&(n?this.player.mute():(this.player.unmute(),null!==i&&setTimeout(()=>this.player.setVolume(i)))),e.playbackRate!==o&&this.player.setPlaybackRate&&this.player.setPlaybackRate(o),e.loop!==s&&this.player.setLoop&&this.player.setLoop(s)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(e,t,r){if(!this.isReady){0!==e&&(this.seekOnPlay=e,setTimeout(()=>{this.seekOnPlay=null},5e3));return}if(t?"fraction"===t:e>0&&e<1){let t=this.player.getDuration();return t?void this.player.seekTo(t*e,r):void console.warn("ReactPlayer: could not seek using fraction – duration not yet available")}this.player.seekTo(e,r)}render(){let e=this.props.activePlayer;return e?m.default.createElement(e,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}h(b,"displayName","Player"),h(b,"propTypes",y.propTypes),h(b,"defaultProps",y.defaultProps)},17876(e,t,r){var i=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))l.call(e,s)||s===r||n(e,s,{get:()=>t[s],enumerable:!(i=o(t,s))||i.enumerable});return e},c=(e,t,r)=>(r=null!=e?i(s(e)):{},u(!t&&e&&e.__esModule?r:n(r,"default",{value:e,enumerable:!0}),e)),h=(e,t,r)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?n(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r,r},d={},p={createReactPlayer:()=>P};for(var f in p)n(d,f,{get:p[f],enumerable:!0});e.exports=u(n({},"__esModule",{value:!0}),d);var m=c(r(67308)),g=c(r(74579)),y=c(r(6047)),v=c(r(98727)),b=r(13724),_=r(27819),x=c(r(13501));let A=(0,_.lazy)(()=>r.e(6353).then(r.t.bind(r,22966,23))),w="u">typeof window&&window.document&&"u">typeof document,S=void 0!==r.g&&r.g.window&&r.g.window.document,T=Object.keys(b.propTypes),C=w||S?m.Suspense:()=>null,E=[],P=(e,t)=>{var r;return r=class extends m.Component{constructor(){super(...arguments),h(this,"state",{showPreview:!!this.props.light}),h(this,"references",{wrapper:e=>{this.wrapper=e},player:e=>{this.player=e}}),h(this,"handleClickPreview",e=>{this.setState({showPreview:!1}),this.props.onClickPreview(e)}),h(this,"showPreview",()=>{this.setState({showPreview:!0})}),h(this,"getDuration",()=>this.player?this.player.getDuration():null),h(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),h(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),h(this,"getInternalPlayer",(e="player")=>this.player?this.player.getInternalPlayer(e):null),h(this,"seekTo",(e,t,r)=>{if(!this.player)return null;this.player.seekTo(e,t,r)}),h(this,"handleReady",()=>{this.props.onReady(this)}),h(this,"getActivePlayer",(0,y.default)(r=>{for(let t of[...E,...e])if(t.canPlay(r))return t;return t||null})),h(this,"getConfig",(0,y.default)((e,t)=>{let{config:r}=this.props;return g.default.all([b.defaultProps.config,b.defaultProps.config[t]||{},r,r[t]||{}])})),h(this,"getAttributes",(0,y.default)(e=>(0,_.omit)(this.props,T))),h(this,"renderActivePlayer",e=>{if(!e)return null;let t=this.getActivePlayer(e);if(!t)return null;
63let r=this.getConfig(e,t.key);return m.default.createElement(x.default,{...this.props,key:t.key,ref:this.references.player,config:r,activePlayer:t.lazyPlayer||t,onReady:this.handleReady})})}shouldComponentUpdate(e,t){return!(0,v.default)(this.props,e)||!(0,v.default)(this.state,t)}componentDidUpdate(e){let{light:t}=this.props;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1})}renderPreview(e){if(!e)return null;let{light:t,playIcon:r,previewTabIndex:i,oEmbedUrl:n,previewAriaLabel:o}=this.props;return m.default.createElement(A,{url:e,light:t,playIcon:r,previewTabIndex:i,previewAriaLabel:o,oEmbedUrl:n,onClick:this.handleClickPreview})}render(){let{url:e,style:t,width:r,height:i,fallback:n,wrapper:o}=this.props,{showPreview:a}=this.state,s=this.getAttributes(e),l="string"==typeof o?this.references.wrapper:void 0;return m.default.createElement(o,{ref:l,style:{...t,width:r,height:i},...s},m.default.createElement(C,{fallback:n},a?this.renderPreview(e):this.renderActivePlayer(e)))}},h(r,"displayName","ReactPlayer"),h(r,"propTypes",b.propTypes),h(r,"defaultProps",b.defaultProps),h(r,"addCustomPlayer",e=>{E.push(e)}),h(r,"removeCustomPlayers",()=>{E.length=0}),h(r,"canPlay",t=>{for(let r of[...E,...e])if(r.canPlay(t))return!0;return!1}),h(r,"canEnablePIP",t=>{for(let r of[...E,...e])if(r.canEnablePIP&&r.canEnablePIP(t))return!0;return!1}),r}},42426(e,t,r){let i,n;var o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,h=(e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of l(t))c.call(e,n)||n===r||a(e,n,{get:()=>t[n],enumerable:!(i=s(t,n))||i.enumerable});return e},d={},p={default:()=>v};for(var f in p)a(d,f,{get:p[f],enumerable:!0});e.exports=h(a({},"__esModule",{value:!0}),d);var m=(n=null!=(i=r(99055))?o(u(i)):{},h(i&&i.__esModule?n:a(n,"default",{value:i,enumerable:!0}),i)),g=r(17876);let y=m.default[m.default.length-1];var v=(0,g.createReactPlayer)(m.default,y)},72047(e,t,r){var i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={},l={AUDIO_EXTENSIONS:()=>T,DASH_EXTENSIONS:()=>P,FLV_EXTENSIONS:()=>I,HLS_EXTENSIONS:()=>E,MATCH_URL_DAILYMOTION:()=>x,MATCH_URL_FACEBOOK:()=>m,MATCH_URL_FACEBOOK_WATCH:()=>g,MATCH_URL_KALTURA:()=>S,MATCH_URL_MIXCLOUD:()=>A,MATCH_URL_MUX:()=>f,MATCH_URL_SOUNDCLOUD:()=>d,MATCH_URL_STREAMABLE:()=>y,MATCH_URL_TWITCH_CHANNEL:()=>_,MATCH_URL_TWITCH_VIDEO:()=>b,MATCH_URL_VIDYARD:()=>w,MATCH_URL_VIMEO:()=>p,MATCH_URL_WISTIA:()=>v,MATCH_URL_YOUTUBE:()=>h,VIDEO_EXTENSIONS:()=>C,canPlay:()=>k};for(var u in l)i(s,u,{get:l[u],enumerable:!0});e.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of o(t))a.call(e,s)||void 0===s||i(e,s,{get:()=>t[s],enumerable:!(r=n(t,s))||r.enumerable});return e})(i({},"__esModule",{value:!0}),s);var c=r(27819);let h=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,d=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,p=/vimeo\.com\/(?!progressive_redirect).+/,f=/stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/,m=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,g=/^https?:\/\/fb\.watch\/.+$/,y=/streamable\.com\/([a-z0-9]+)$/,v=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,b=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,_=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,x=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,A=/mixcloud\.com\/([^/]+\/[^/]+)/,w=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,S=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,T=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,C=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,E=/\.(m3u8)($|\?)/i,P=/\.(mpd)($|\?)/i,I=/\.(flv)($|\?)/i,M=e=>{if(e instanceof Array){for(let t of e)if("string"==typeof t&&M(t)||M(t.src))return!0;return!1}return!!((0,c.isMediaStream)(e)||(0,c.isBlobUrl)(e))||T.test(e)||C.test(e)||E.test(e)||P.test(e)||I.test(e)},k={youtube:e=>e instanceof Array?e.every(e=>h.test(e)):h.test(e),soundcloud:e=>d.test(e)&&!T.test(e),vimeo:e=>p.test(e)&&!C.test(e)&&!E.test(e),mux:e=>f.test(e),facebook:e=>m.test(e)||g.test(e),streamable:e=>y.test(e),wistia:e=>v.test(e),twitch:e=>b.test(e)||_.test(e),dailymotion:e=>x.test(e),mixcloud:e=>A.test(e),vidyard:e=>
63w.test(e),kaltura:e=>S.test(e),file:M}},64104(e,t,r){let i,n;var o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,h=(e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of l(t))c.call(e,n)||n===r||a(e,n,{get:()=>t[n],enumerable:!(i=s(t,n))||i.enumerable});return e},d=(e,t,r)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?a(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r,r},p={},f={default:()=>T};for(var m in f)a(p,m,{get:f[m],enumerable:!0});e.exports=h(a({},"__esModule",{value:!0}),p);var g=(n=null!=(i=r(67308))?o(u(i)):{},h(i&&i.__esModule?n:a(n,"default",{value:i,enumerable:!0}),i)),y=r(27819),v=r(72047);let b="u">typeof navigator,_=b&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,x=b&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||_)&&!window.MSStream,A=b&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,w=/www\.dropbox\.com\/.+/,S=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/;class T extends g.Component{constructor(){super(...arguments),d(this,"onReady",(...e)=>this.props.onReady(...e)),d(this,"onPlay",(...e)=>this.props.onPlay(...e)),d(this,"onBuffer",(...e)=>this.props.onBuffer(...e)),d(this,"onBufferEnd",(...e)=>this.props.onBufferEnd(...e)),d(this,"onPause",(...e)=>this.props.onPause(...e)),d(this,"onEnded",(...e)=>this.props.onEnded(...e)),d(this,"onError",(...e)=>this.props.onError(...e)),d(this,"onPlayBackRateChange",e=>this.props.onPlaybackRateChange(e.target.playbackRate)),d(this,"onEnablePIP",(...e)=>this.props.onEnablePIP(...e)),d(this,"onDisablePIP",e=>{let{onDisablePIP:t,playing:r}=this.props;t(e),r&&this.play()}),d(this,"onPresentationModeChange",e=>{if(this.player&&(0,y.supportsWebKitPresentationMode)(this.player)){let{webkitPresentationMode:t}=this.player;"picture-in-picture"===t?this.onEnablePIP(e):"inline"===t&&this.onDisablePIP(e)}}),d(this,"onSeek",e=>{this.props.onSeek(e.target.currentTime)}),d(this,"mute",()=>{this.player.muted=!0}),d(this,"unmute",()=>{this.player.muted=!1}),d(this,"renderSourceElement",(e,t)=>"string"==typeof e?g.default.createElement("source",{key:t,src:e}):g.default.createElement("source",{key:t,...e})),d(this,"renderTrack",(e,t)=>g.default.createElement("track",{key:t,...e})),d(this,"ref",e=>{this.player&&(this.prevPlayer=this.player),this.player=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);let e=this.getSource(this.props.url);e&&(this.player.src=e),(x||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url===e.url||(0,y.isMediaStream)(this.props.url)||this.props.url instanceof Array||(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){let{url:t,playsinline:r}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),r&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return!e.config.forceVideo&&!e.config.attributes.poster&&(v.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio)}shouldUseHLS(e){return!!A&&!!this.props.config.forceSafariHLS||!!this.props.config.forceHLS||!x&&!this.props.config.forceDisableHls&&(v.HLS_EXTENSIONS.test(e)||S.test(e))}shouldUseDASH(e){return v.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return v.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){let{hlsVersion:t,hlsOptions:r,dashVersion:i,flvVersion:n}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,y.getSDK)("https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js".replace("VERSION",t),"Hls").then(t=>{if(this.hls=new t(r),this.hls.on(t.Events.MANIFEST_PARSED,()=>{this.props.onReady()}),this.hls.on(t.Events.ERROR,(e,r)=>{this.props.onError(e,r,this.hls,t)}),S.test(e)){let t=e.match(S)[1];this.hls.loadSource("https://videodelivery.net/{id}/manifest/video.m3u8".replace("{id}",t))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()}),this.shouldUseDASH(e)&&(0,y.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js".replace("VERSION",i),"dashjs").then(t=>{this.dash=t.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),3>
63parseInt(i)?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:t.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()}),this.shouldUseFLV(e)&&(0,y.getSDK)("https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js".replace("VERSION",n),"flvjs").then(t=>{this.flv=t.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(t.Events.ERROR,(e,r)=>{this.props.onError(e,r,this.flv,t)}),this.flv.load(),this.props.onLoaded()}),e instanceof Array)this.player.load();else if((0,y.isMediaStream)(e))try{this.player.srcObject=e}catch(t){this.player.src=window.URL.createObjectURL(e)}}play(){let e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,y.supportsWebKitPresentationMode)(this.player)&&"picture-in-picture"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,y.supportsWebKitPresentationMode)(this.player)&&"inline"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(e){this.props.onError(e)}}getDuration(){if(!this.player)return null;let{duration:e,seekable:t}=this.player;return 1/0===e&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;let{buffered:e}=this.player;if(0===e.length)return 0;let t=e.end(e.length-1),r=this.getDuration();return t>r?r:t}getSource(e){let t=this.shouldUseHLS(e),r=this.shouldUseDASH(e),i=this.shouldUseFLV(e);if(!(e instanceof Array||(0,y.isMediaStream)(e))&&!t&&!r&&!i)return w.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){let{url:e,playing:t,loop:r,controls:i,muted:n,config:o,width:a,height:s}=this.props,l=this.shouldUseAudio(this.props);return g.default.createElement(l?"audio":"video",{ref:this.ref,src:this.getSource(e),style:{width:"auto"===a?a:"100%",height:"auto"===s?s:"100%"},preload:"auto",autoPlay:t||void 0,controls:i,muted:n,loop:r,...o.attributes},e instanceof Array&&e.map(this.renderSourceElement),o.tracks.map(this.renderTrack))}}d(T,"displayName","FilePlayer"),d(T,"canPlay",v.canPlay.file)},99055(e,t,r){var i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={},l={default:()=>d};for(var u in l)i(s,u,{get:l[u],enumerable:!0});e.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of o(t))a.call(e,s)||void 0===s||i(e,s,{get:()=>t[s],enumerable:!(r=n(t,s))||r.enumerable});return e})(i({},"__esModule",{value:!0}),s);var c=r(27819),h=r(72047),d=[{key:"youtube",name:"YouTube",canPlay:h.canPlay.youtube,lazyPlayer:(0,c.lazy)(()=>r.e(8446).then(r.t.bind(r,15750,23)))},{key:"soundcloud",name:"SoundCloud",canPlay:h.canPlay.soundcloud,lazyPlayer:(0,c.lazy)(()=>r.e(9979).then(r.t.bind(r,43583,23)))},{key:"vimeo",name:"Vimeo",canPlay:h.canPlay.vimeo,lazyPlayer:(0,c.lazy)(()=>r.e(6173).then(r.t.bind(r,64951,23)))},{key:"mux",name:"Mux",canPlay:h.canPlay.mux,lazyPlayer:(0,c.lazy)(()=>r.e(2723).then(r.t.bind(r,38134,23)))},{key:"facebook",name:"Facebook",canPlay:h.canPlay.facebook,lazyPlayer:(0,c.lazy)(()=>r.e(6887).then(r.t.bind(r,5607,23)))},{key:"streamable",name:"Streamable",canPlay:h.canPlay.streamable,lazyPlayer:(0,c.lazy)(()=>r.e(7627).then(r.t.bind(r,9923,23)))},{key:"wistia",name:"Wistia",canPlay:h.canPlay.wistia,lazyPlayer:(0,c.lazy)(()=>r.e(9340).then(r.t.bind(r,81786,23)))},{key:"twitch",name:"Twitch",canPlay:h.canPlay.twitch,lazyPlayer:(0,c.lazy)(()=>r.e(2042).then(r.t.bind(r,7056,23)))},{key:"dailymotion",name:"DailyMotion",canPlay:h.canPlay.dailymotion,lazyPlayer:(0,c.lazy)(()=>r.e(6328).then(r.t.bind(r,91836,23)))},{key:"mixcloud",name:"Mixcloud",canPlay:h.canPlay.mixcloud,lazyPlayer:(0,c.lazy)(()=>r.e(7570).then(r.t.bind(r,84308,23)))}
63,{key:"vidyard",name:"Vidyard",canPlay:h.canPlay.vidyard,lazyPlayer:(0,c.lazy)(()=>r.e(3392).then(r.t.bind(r,99608,23)))},{key:"kaltura",name:"Kaltura",canPlay:h.canPlay.kaltura,lazyPlayer:(0,c.lazy)(()=>r.e(6463).then(r.t.bind(r,6113,23)))},{key:"file",name:"FilePlayer",canPlay:h.canPlay.file,canEnablePIP:e=>h.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,c.supportsWebKitPresentationMode)())&&!h.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,c.lazy)(()=>Promise.resolve().then(r.t.bind(r,64104,23)))}]},13724(e,t,r){let i,n;var o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,h=(e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of l(t))c.call(e,n)||n===r||a(e,n,{get:()=>t[n],enumerable:!(i=s(t,n))||i.enumerable});return e},d={},p={defaultProps:()=>C,propTypes:()=>S};for(var f in p)a(d,f,{get:p[f],enumerable:!0});e.exports=h(a({},"__esModule",{value:!0}),d);let{string:m,bool:g,number:y,array:v,oneOfType:b,shape:_,object:x,func:A,node:w}=(n=null!=(i=r(5821))?o(u(i)):{},h(i&&i.__esModule?n:a(n,"default",{value:i,enumerable:!0}),i)).default,S={url:b([m,v,x]),playing:g,loop:g,controls:g,volume:y,muted:g,playbackRate:y,width:b([m,y]),height:b([m,y]),style:x,progressInterval:y,playsinline:g,pip:g,stopOnUnmount:g,light:b([g,m,x]),playIcon:w,previewTabIndex:y,previewAriaLabel:m,fallback:w,oEmbedUrl:m,wrapper:b([m,A,_({render:A.isRequired})]),config:_({soundcloud:_({options:x}),youtube:_({playerVars:x,embedOptions:x,onUnstarted:A}),facebook:_({appId:m,version:m,playerId:m,attributes:x}),dailymotion:_({params:x}),vimeo:_({playerOptions:x,title:m}),mux:_({attributes:x,version:m}),file:_({attributes:x,tracks:v,forceVideo:g,forceAudio:g,forceHLS:g,forceSafariHLS:g,forceDisableHls:g,forceDASH:g,forceFLV:g,hlsOptions:x,hlsVersion:m,dashVersion:m,flvVersion:m}),wistia:_({options:x,playerId:m,customControls:v}),mixcloud:_({options:x}),twitch:_({options:x,playerId:m}),vidyard:_({options:x})}),onReady:A,onStart:A,onPlay:A,onPause:A,onBuffer:A,onBufferEnd:A,onEnded:A,onError:A,onDuration:A,onSeek:A,onPlaybackRateChange:A,onPlaybackQualityChange:A,onProgress:A,onClickPreview:A,onEnablePIP:A,onDisablePIP:A},T=()=>{},C={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,previewAriaLabel:"",oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:T},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},mux:{attributes:{},version:"2"},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:T,onStart:T,onPlay:T,onPause:T,onBuffer:T,onBufferEnd:T,onEnded:T,onError:T,onDuration:T,onSeek:T,onPlaybackRateChange:T,onPlaybackQualityChange:T,onProgress:T,onClickPreview:T,onEnablePIP:T,onDisablePIP:T}},27819(e,t,r){var i=Object.create,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))l.call(e,s)||s===r||n(e,s,{get:()=>t[s],enumerable:!(i=o(t,s))||i.enumerable});return e},c=(e,t,r)=>(r=null!=e?i(s(e)):{},u(!t&&e&&e.__esModule?r:n(r,"default",{value:e,enumerable:!0}),e)),h={},d={callPlayer:()=>O,getConfig:()=>M,getSDK:()=>I,isBlobUrl:()=>R,isMediaStream:()=>D,lazy:()=>y,omit:()=>k,parseEndTime:()=>S,parseStartTime:()=>w,queryString:()=>C,randomString:()=>T,supportsWebKitPresentationMode:()=>L};for(var p in d)n(h,p,{get:d[p],enumerable:!0});e.exports=u(n({},"__esModule",{value:!0}),h);var f=c(r(67308)),m=c(r(2163)),g=c(r(74579));let y=e=>f.default.lazy(async()=>{let t=await e();return"function"==typeof t.default?t:t.default}),v=/[?&#](?:start|t)=([0-9hms]+)/,b=/[?&#]end=([0-9hms]+)/,_=/(\d+)(h|m|s)/g,x=/^\d+$/;function A(e,t){if(e instanceof Array)return;let r=e.match(t);if(r){let e=r[1];if(e.match(_)){let t=0,r=_.exec(e);for(;null!==r;){let[,i,n]=r;"h"===n&&(t+=60*parseInt(i,10)*60),"m"===n&&(t+=60*parseInt(i,10)),"s"===n&&(t+=parseInt(i,10)),r=_.exec(e)}return t}if(x.test(e))return parseInt(e)}}function w(e){return A(e,v)}function S(e){return A(e,b)}function T(){return Math.random().toString(36).substr(2,5)}function C(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function E(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}let P={},I=function(e,t,r=null,i=()=>!0,n=m.default){let o=E(t);return o&&i(o)?Promise.resolve(o):new Promise((i,o)=>
63{if(P[e])return void P[e].push({resolve:i,reject:o});P[e]=[{resolve:i,reject:o}];let a=t=>{P[e].forEach(e=>e.resolve(t))};if(r){let e=window[r];window[r]=function(){e&&e(),a(E(t))}}n(e,i=>{i?(P[e].forEach(e=>e.reject(i)),P[e]=null):r||a(E(t))})})};function M(e,t){return(0,g.default)(t.config,e.config)}function k(e,...t){let r=[].concat(...t),i={};for(let t of Object.keys(e))-1===r.indexOf(t)&&(i[t]=e[t]);return i}function O(e,...t){if(!this.player||!this.player[e]){let t=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c \u2013 `;return this.player?this.player[e]||(t+="The method was not available"):t+="The player was not available",console.warn(t,"font-weight: bold",""),null}return this.player[e](...t)}function D(e){return"u">typeof window&&void 0!==window.MediaStream&&e instanceof window.MediaStream}function R(e){return/^blob:/.test(e)}function L(e=document.createElement("video")){let t=!1===/iPhone|iPod/.test(navigator.userAgent);return e.webkitSupportsPresentationMode&&"function"==typeof e.webkitSetPresentationMode&&t}},66982(e,t,r){"use strict";function i(e,t,r,i,n,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}let n={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{n[e]=new i(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{n[e]=new i(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{n[e]=new i(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{n[e]=new i(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{n[e]=new i(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{n[e]=new i(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{n[e]=new i(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{n[e]=new i(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{n[e]=new i(e,5,!1,e.toLowerCase(),null,!1,!1)});let o=/[\-\:]([a-z])/g,a=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{let t=e.replace(o,a);n[t]=new i(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{let t=e.replace(o,a);n[t]=new i(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}
63),["xml:base","xml:lang","xml:space"].forEach(e=>{let t=e.replace(o,a);n[t]=new i(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{n[e]=new i(e,1,!1,e.toLowerCase(),null,!1,!1)}),n.xlinkHref=new i("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{n[e]=new i(e,1,!1,e.toLowerCase(),null,!0,!0)});let{CAMELCASE:s,SAME:l,possibleStandardNames:u}=r(26439),c=RegExp.prototype.test.bind(RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),h=Object.keys(u).reduce((e,t)=>{let r=u[t];return r===l?e[t]=t:r===s?e[t.toLowerCase()]=t:e[t]=r,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return n.hasOwnProperty(e)?n[e]:null},t.isCustomAttribute=c,t.possibleStandardNames=h},26439(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode
63-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},2232(e,t,r){"use strict";r.d(t,{Kq:()=>S,Ng:()=>Q,wA:()=>er,d4:()=>en,Pj:()=>et});var i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v=r(67308),b=v.createContext(null),_=function(e){e()},x={notify:function(){},get:function(){return[]}};function A(e,t){var r,i=x;function n(){a.onStateChange&&a.onStateChange()}function o(){if(!r){var o,a,s;r=t?t.addNestedSub(n):e.subscribe(n),o=_,a=null,s=null,i={clear:function(){a=null,s=null},notify:function(){o(function(){for(var e=a;e;)e.callback(),e=e.next})},get:function(){for(var e=[],t=a;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,r=s={callback:e,next:null,prev:s};return r.prev?r.prev.next=r:a=r,function(){t&&null!==a&&(t=!1,r.next?r.next.prev=r.prev:s=r.prev,r.prev?r.prev.next=r.next:a=r.next)}}}}}var a={addNestedSub:function(e){return o(),i.subscribe(e)},notifyNestedSubs:function(){i.notify()},handleChangeWrapper:n,isSubscribed:function(){return!!r},trySubscribe:o,tryUnsubscribe:function(){r&&(r(),r=void 0,i.clear(),i=x)},getListeners:function(){return i}};return a}var w="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?v.useLayoutEffect:v.useEffect;let S=function(e){var t=e.store,r=e.context,i=e.children,n=(0,v.useMemo)(function(){var e=A(t);return{store:t,subscription:e}},[t]),o=(0,v.useMemo)(function(){return t.getState()},[t]);w(function(){var e=n.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[n,o]);var a=r||b;return v.createElement(a.Provider,{value:n},i)};var T=r(69932),C=r(12975),E=r(4674),P=r.n(E),I=r(77880),M=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],k=["reactReduxForwardedRef"],O=[],D=[null,null];function R(e,t){var r=e[1];return[t.payload,r+1]}function L(e,t,r){w(function(){return e.apply(void 0,t)},r)}function B(e,t,r,i,n,o,a){e.current=i,t.current=n,r.current=!1,o.current&&(o.current=null,a())}function F(e,t,r,i,n,o,a,s,l,u){if(e){var c=!1,h=null,d=function(){if(!c){var e,r,d=t.getState();try{e=i(d,n.current)}catch(e){r=e,h=e}r||(h=null),e===o.current?a.current||l():(o.current=e,s.current=e,a.current=!0,u({type:"STORE_UPDATED",payload:{error:r}}))}};return r.onStateChange=d,r.trySubscribe(),d(),function(){if(c=!0,r.tryUnsubscribe(),r.onStateChange=null,h)throw h}}}var j=function(){return[null,0]};function z(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function N(e,t){if(z(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!z(e[r[n]],t[r[n]]))return!1;return!0}function G(e){return function(t,r){var i=e(t,r);function n(){return i}return n.dependsOnOwnProps=!1,n}}function V(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function U(e,t){return function(t,r){r.displayName;var i=function(e,t){return i.dependsOnOwnProps?i.mapToProps(e,t):i.mapToProps(e)};return i.dependsOnOwnProps=!0,i.mapToProps=function(t,r){i.mapToProps=e,i.dependsOnOwnProps=V(e);var n=i(t,r);return"function"==typeof n&&(i.mapToProps=n,i.dependsOnOwnProps=V(n),n=i(t,r)),n},i}}let H=[function(e){return"function"==typeof e?U(e,"mapDispatchToProps"):void 0},function(e){return e?void 0:G(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?G(function(t){var r={};for(var i in e)!function(i){var n=e[i];"function"==typeof n&&(r[i]=function(){return t(n.apply(void 0,arguments))})}(i);return r}):void 0}],W=[function(e){return"function"==typeof e?U(e,"mapStateToProps"):void 0},function(e){return e?void 0:G(function(){return{}})}];function q(e,t,r){return(0,T.A)({},r,e,t)}let Z=[function(e){return"function"==typeof e?function(t,r){r.displayName;var i,n=r.pure,o=r.areMergedPropsEqual,a=!1;return function(t,r,s){var l=e(t,r,s);return a?n&&o(l,i)||(i=l):(a=!0,i=l),i}}:void 0},function(e){return e?void 0:function(){return q}}];
63var $=["initMapStateToProps","initMapDispatchToProps","initMergeProps"],K=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function X(e,t,r){for(var i=t.length-1;i>=0;i--){var n=t[i](e);if(n)return n}return function(t,i){throw Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+i.wrappedComponentName+".")}}function Y(e,t){return e===t}let Q=(o=void 0===(n=(i={}).connectHOC)?function(e,t){void 0===t&&(t={});var r=t,i=r.getDisplayName,n=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,o=r.methodName,a=void 0===o?"connectAdvanced":o,s=r.renderCountProp,l=void 0===s?void 0:s,u=r.shouldHandleStateChanges,c=void 0===u||u,h=r.storeKey,d=void 0===h?"store":h,p=(r.withRef,r.forwardRef),f=void 0!==p&&p,m=r.context,g=void 0===m?b:m,y=(0,C.A)(r,M);return function(t){var r=t.displayName||t.name||"Component",i=n(r),o=(0,T.A)({},y,{getDisplayName:n,methodName:a,renderCountProp:l,shouldHandleStateChanges:c,storeKey:d,displayName:i,wrappedComponentName:r,WrappedComponent:t}),s=y.pure,u=s?v.useMemo:function(e){return e()};function h(r){var i=(0,v.useMemo)(function(){var e=r.reactReduxForwardedRef,t=(0,C.A)(r,k);return[r.context,e,t]},[r]),n=i[0],a=i[1],s=i[2],l=(0,v.useMemo)(function(){return n&&n.Consumer&&(0,I.isContextConsumer)(v.createElement(n.Consumer,null))?n:g},[n,g]),h=(0,v.useContext)(l),d=!!r.store&&!!r.store.getState&&!!r.store.dispatch;h&&h.store;var p=d?r.store:h.store,f=(0,v.useMemo)(function(){return e(p.dispatch,o)},[p]),m=(0,v.useMemo)(function(){if(!c)return D;var e=A(p,d?null:h.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[p,d,h]),y=m[0],b=m[1],_=(0,v.useMemo)(function(){return d?h:(0,T.A)({},h,{subscription:y})},[d,h,y]),x=(0,v.useReducer)(R,O,j),w=x[0][0],S=x[1];if(w&&w.error)throw w.error;var E=(0,v.useRef)(),P=(0,v.useRef)(s),M=(0,v.useRef)(),z=(0,v.useRef)(!1),N=u(function(){return M.current&&s===P.current?M.current:f(p.getState(),s)},[p,w,s]);L(B,[P,E,z,s,N,M,b]),L(F,[c,p,y,f,P,E,z,M,b,S],[p,y,f]);var G=(0,v.useMemo)(function(){return v.createElement(t,(0,T.A)({},N,{ref:a}))},[a,t,N]);return(0,v.useMemo)(function(){return c?v.createElement(l.Provider,{value:_},G):G},[l,G,_])}var p=s?v.memo(h):h;if(p.WrappedComponent=t,p.displayName=h.displayName=i,f){var m=v.forwardRef(function(e,t){return v.createElement(p,(0,T.A)({},e,{reactReduxForwardedRef:t}))});return m.displayName=i,m.WrappedComponent=t,P()(m,t)}return P()(p,t)}}:n,s=void 0===(a=i.mapStateToPropsFactories)?W:a,u=void 0===(l=i.mapDispatchToPropsFactories)?H:l,h=void 0===(c=i.mergePropsFactories)?Z:c,p=void 0===(d=i.selectorFactory)?function(e,t){var r=t.initMapStateToProps,i=t.initMapDispatchToProps,n=t.initMergeProps,o=(0,C.A)(t,$),a=r(e,o),s=i(e,o),l=n(e,o);return(o.pure?function(e,t,r,i,n){var o,a,s,l,u,c=n.areStatesEqual,h=n.areOwnPropsEqual,d=n.areStatePropsEqual,p=!1;return function(n,f){var m,g,y,v;return p?(y=!h(f,a),v=!c(n,o,f,a),(o=n,a=f,y&&v)?(s=e(o,a),t.dependsOnOwnProps&&(l=t(i,a)),u=r(s,l,a)):y?(e.dependsOnOwnProps&&(s=e(o,a)),t.dependsOnOwnProps&&(l=t(i,a)),u=r(s,l,a)):(v&&(g=!d(m=e(o,a),s),s=m,g&&(u=r(s,l,a))),u)):(s=e(o=n,a=f),l=t(i,a),u=r(s,l,a),p=!0,u)}}:function(e,t,r,i){return function(n,o){return r(e(n,o),t(i,o),o)}})(a,s,l,e,o)}:d,function(e,t,r,i){void 0===i&&(i={});var n=i,a=n.pure,l=n.areStatesEqual,c=n.areOwnPropsEqual,d=void 0===c?N:c,f=n.areStatePropsEqual,m=void 0===f?N:f,g=n.areMergedPropsEqual,y=void 0===g?N:g,v=(0,C.A)(n,K),b=X(e,s,"mapStateToProps"),_=X(t,u,"mapDispatchToProps"),x=X(r,h,"mergeProps");return o(p,(0,T.A)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:b,initMapDispatchToProps:_,initMergeProps:x,pure:void 0===a||a,areStatesEqual:void 0===l?Y:l,areOwnPropsEqual:d,areStatePropsEqual:m,areMergedPropsEqual:y},v))});function J(){return(0,v.useContext)(b)}function ee(e){void 0===e&&(e=b);var t=e===b?J:function(){return(0,v.useContext)(e)};return function(){return t().store}}var et=ee(),er=(void 0===f&&(f=b),m=f===b?et:ee(f),function(){return m().dispatch}),ei=function(e,t){return e===t},en=(void 0===g&&(g=b),y=g===b?J:function(){return(0,v.useContext)(g)},function(e,t){void 0===t&&(t=ei);var r=y(),i=function(e,t,r,i){var n,o=(0,v.useReducer)(function(e){return e+1},0)[1],a=(0,v.useMemo)(function(){return A(r,i)},[r,i]),s=(0,v.useRef)(),l=(0,v.useRef)(),u=(0,v.useRef)(),c=(0,v.useRef)(),h=r.getState();try{if(e!==l.current||h!==u.current||s.current){var d=e(h);n=void 0!==c.current&&t(d,c.current)?c.current:d}else n=c.current}catch(e){throw s.current&&(e.message+=`
64The error may be correlated with this previous error:
65`+s.current.stack+`
66
67`),e}return w(function(){l.current=e,u.current=h,c.current=n,s.current=void 0}),w(function(){function e(){try{var e=r.getState();if(e===u.current)return;var i=l.current(e);
67if(t(i,c.current))return;c.current=i,u.current=e}catch(e){s.current=e}o()}return a.onStateChange=e,a.trySubscribe(),e(),function(){return a.tryUnsubscribe()}},[r,a]),n}(e,t,r.store,r.subscription);return(0,v.useDebugValue)(i),i});_=r(39190).unstable_batchedUpdates},61917(e,t,r){"use strict";r.d(t,{A:()=>K});var i,n,o,a,s,l,u,c=r(65959),h=r(67308),d="right-scroll-bar-position",p="width-before-scroll-bar";function f(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var m="u">typeof window?h.useLayoutEffect:h.useEffect,g=new WeakMap,y=(void 0===i&&(i={}),(void 0===n&&(n=function(e){return e}),o=[],a=!1,s={read:function(){if(a)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:null},useMedium:function(e){var t=n(e);return o.push(t),function(){o=o.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(a=!0;o.length;){var t=o;o=[],t.forEach(e)}o={push:function(t){return e(t)},filter:function(){return o}}},assignMedium:function(e){a=!0;var t=[];if(o.length){var r=o;o=[],r.forEach(e),t=o}var i=function(){var r=t;t=[],r.forEach(e)},n=function(){return Promise.resolve().then(i)};n(),o={push:function(e){t.push(e),n()},filter:function(e){return t=t.filter(e),o}}}}).options=(0,c.Cl)({async:!0,ssr:!1},i),s),v=function(){},b=h.forwardRef(function(e,t){var r,i,n,o,a=h.useRef(null),s=h.useState({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:v}),l=s[0],u=s[1],d=e.forwardProps,p=e.children,b=e.className,_=e.removeScrollBar,x=e.enabled,A=e.shards,w=e.sideCar,S=e.noRelative,T=e.noIsolation,C=e.inert,E=e.allowPinchZoom,P=e.as,I=e.gapMode,M=(0,c.Tt)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=(r=[a,t],i=function(e){return r.forEach(function(t){return f(t,e)})},(n=(0,h.useState)(function(){return{value:null,callback:i,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0]).callback=i,o=n.facade,m(function(){var e=g.get(o);if(e){var t=new Set(e),i=new Set(r),n=o.current;t.forEach(function(e){i.has(e)||f(e,null)}),i.forEach(function(e){t.has(e)||f(e,n)})}g.set(o,r)},[r]),o),O=(0,c.Cl)((0,c.Cl)({},M),l);return h.createElement(h.Fragment,null,x&&h.createElement(w,{sideCar:y,removeScrollBar:_,shards:A,noRelative:S,noIsolation:T,inert:C,setCallbacks:u,allowPinchZoom:!!E,lockRef:a,gapMode:I}),d?h.cloneElement(h.Children.only(p),(0,c.Cl)((0,c.Cl)({},O),{ref:k})):h.createElement(void 0===P?"div":P,(0,c.Cl)({},O,{className:b,ref:k}),p))});b.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},b.classNames={fullWidth:p,zeroRight:d};var _=function(e){var t=e.sideCar,r=(0,c.Tt)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw Error("Sidecar medium not found");return h.createElement(i,(0,c.Cl)({},r))};_.isSideCarExport=!0;var x=function(){var e=0,t=null;return{add:function(i){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=u||r.nc;return t&&e.setAttribute("nonce",t),e}())){var n,o;(n=t).styleSheet?n.styleSheet.cssText=i:n.appendChild(document.createTextNode(i)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},A=function(){var e=x();return function(t,r){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},w=function(){var e=A();return function(t){return e(t.styles,t.dynamic),null}},S={left:0,top:0,right:0,gap:0},T=function(e){return parseInt(e||"",10)||0},C=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],i=t["padding"===e?"paddingTop":"marginTop"],n=t["padding"===e?"paddingRight":"marginRight"];return[T(r),T(i),T(n)]},E=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return S;var t=C(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-r+t[2]-t[0])}},P=w(),I="data-scroll-locked",M=function(e,t,r,i){var n=e.left,o=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),`
68  .`.concat("with-scroll-bars-hidden",` {
69   overflow: hidden `).concat(i,`;
70   padding-right: `).concat(s,"px ").concat(i,`;
71  }
72  body[`).concat(I,`] {
73    overflow: hidden `).concat(i,`;
74    overscroll-behavior: contain;
75    `).concat([t&&"position: relative ".concat(i,";"),"margin"===r&&`
76    padding-left: `.concat(n,`px;
77    padding-top: `).concat(o,`px;
78    padding-right: `).concat(a,`px;
79    margin-left:0;
80    margin-top:0;
81    margin-right: `).concat(s,"px ").concat(i,`;
82    `),"padding"===r&&"padding-right: ".concat(s,"px ").concat(i,";")].filter(Boolean).join(""),`
83  }
84  
85  .`).concat(d,` {
86    right: `).concat(s,"px ").concat(i,`;
87  }
88  
89  .`).concat(p,` {
90    margin-right: `).concat(s,"px ").concat(i,`;
91  }
92  
93  .`).concat(d," .").concat(d,` {
94    right: 0 `).concat(i,`;
95  }
96  
97  .`).concat(p," .").concat(p,` {
98    margin-right: 0 `).concat(i,`;
99  }
100  
101  body[`).concat(I,`] {
102    `).concat("--removed-body-scroll-bar-size",": ").concat(s,`px;
103  }
104`)},k=function(){var e=parseInt(document.body.getAttribute(I)||"0",10);return isFinite(e)?e:0},O=function(){h.useEffect(function(){return document.body.setAttribute(I,(k()+1).toString()),function(){var e=k()-1;e<=0?document.body.removeAttribute(I):document.body.setAttribute(I,e.toString())}},[])},D=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,n=void 0===i?"margin":i;O();var o=h.useMemo(function(){return E(n)},[n]);return h.createElement(P,{styles:M(o,!t,n,r?"":"!important")})},R=!1;if("u">typeof window)try{var L=Object.defineProperty({},"passive",{get:function(){return R=!0,!0}});window.addEventListener("test",L,L),window.removeEventListener("test",L,L)}catch(e){R=!1}var B=!!R&&{passive:!1},F=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},j=function(e,t){var r=t.ownerDocument,i=t;do{if("u">typeof ShadowRoot&&i instanceof ShadowRoot&&(i=i.host),z(e,i)){var n=N(e,i);if(n[1]>n[2])return!0}i=i.parentNode}while(i&&i!==r.body)return!1},z=function(e,t){return"v"===e?F(t,"overflowY"):F(t,"overflowX")},N=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},G=function(e,t,r,i,n){var o,a=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),s=a*i,l=r.target,u=t.contains(l),c=!1,h=s>0,d=0,p=0;do{if(!l)break;var f=N(e,l),m=f[0],g=f[1]-f[2]-a*m;(m||g)&&z(e,l)&&(d+=g,p+=m);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&l!==document.body||u&&(t.contains(l)||t===l))return h&&(n&&1>Math.abs(d)||!n&&s>d)?c=!0:!h&&(n&&1>Math.abs(p)||!n&&-s>p)&&(c=!0),c},V=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},U=function(e){return[e.deltaX,e.deltaY]},H=function(e){return e&&"current"in e?e.current:e},W=0,q=[];let Z=(l=function(e){var t=h.useRef([]),r=h.useRef([0,0]),i=h.useRef(),n=h.useState(W++)[0],o=h.useState(w)[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var t=(0,c.fX)([e.lockRef.current],(e.shards||[]).map(H),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=h.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var n,o=V(e),s=r.current,l="deltaX"in e?e.deltaX:s[0]-o[0],u="deltaY"in e?e.deltaY:s[1]-o[1],c=e.target,h=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===h&&"range"===c.type)return!1;var d=window.getSelection(),p=d&&d.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var f=j(h,c);if(!f)return!0;if(f?n=h:(n="v"===h?"h":"v",f=j(h,c)),!f)return!1;if(!i.current&&"changedTouches"in e&&(l||u)&&(i.current=n),!n)return!0;var m=i.current||n;return G(m,t,e,"h"===m?l:u,!0)},[]),l=h.useCallback(function(e){if(q.length&&q[q.length-1]===o){var r="deltaY"in e?U(e):V(e),i=t.current.filter(function(t){var i;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(i=t.delta)[0]===r[0]&&i[1]===r[1]})[0];if(i&&i.should){e.cancelable&&e.preventDefault();return}
104if(!i){var n=(a.current.shards||[]).map(H).filter(Boolean).filter(function(t){return t.contains(e.target)});(n.length>0?s(e,n[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=h.useCallback(function(e,r,i,n){var o={name:e,delta:r,target:i,should:n,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(i)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),d=h.useCallback(function(e){r.current=V(e),i.current=void 0},[]),p=h.useCallback(function(t){u(t.type,U(t),t.target,s(t,e.lockRef.current))},[]),f=h.useCallback(function(t){u(t.type,V(t),t.target,s(t,e.lockRef.current))},[]);h.useEffect(function(){return q.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",l,B),document.addEventListener("touchmove",l,B),document.addEventListener("touchstart",d,B),function(){q=q.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,B),document.removeEventListener("touchmove",l,B),document.removeEventListener("touchstart",d,B)}},[]);var m=e.removeScrollBar,g=e.inert;return h.createElement(h.Fragment,null,g?h.createElement(o,{styles:`
105  .block-interactivity-`.concat(n,` {pointer-events: none;}
106  .allow-interactivity-`).concat(n,` {pointer-events: all;}
107`)}):null,m?h.createElement(D,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},y.useMedium(l),_);var $=h.forwardRef(function(e,t){return h.createElement(b,(0,c.Cl)({},e,{ref:t,sideCar:Z}))});$.classNames=b.classNames;let K=$},77919(e,t,r){"use strict";var i=r(67308),n=i&&"object"==typeof i&&"default"in i?i.default:i;function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=!!("u">typeof window&&window.document&&window.document.createElement);e.exports=function(e,t,r){if("function"!=typeof e)throw Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==r&&"function"!=typeof r)throw Error("Expected mapStateOnServer to either be undefined or a function.");return function(s){if("function"!=typeof s)throw Error("Expected WrappedComponent to be a React component.");var l,u=[];function c(){l=e(u.map(function(e){return e.props})),h.canUseDOM?t(l):r&&(l=r(l))}var h=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t.peek=function(){return l},t.rewind=function(){if(t.canUseDOM)throw Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=l;return l=void 0,u=[],e};var r=t.prototype;return r.UNSAFE_componentWillMount=function(){u.push(this),c()},r.componentDidUpdate=function(){c()},r.componentWillUnmount=function(){var e=u.indexOf(this);u.splice(e,1),c()},r.render=function(){return n.createElement(s,this.props)},t}(i.PureComponent);return o(h,"displayName","SideEffect("+(s.displayName||s.name||"Component")+")"),o(h,"canUseDOM",a),h}}},3422(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PrevArrow=t.NextArrow=void 0;var n=s(r(67308)),o=s(r(30395)),a=r(4744);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(null,arguments)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
107t%2?u(Object(r),!0).forEach(function(t){var i,n;i=t,n=r[t],(i=f(i))in e?Object.defineProperty(e,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[i]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,f(i.key),i)}}function p(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}function m(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=v();return function(){var r,n=b(e);return r=t?Reflect.construct(n,arguments,b(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.PrevArrow=function(e){m(r,e);var t=y(r);function r(){return h(this,r),t.apply(this,arguments)}return p(r,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var r={key:"0","data-role":"none",className:(0,o.default)(e),style:{display:"block"},onClick:t},i={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.prevArrow?n.default.cloneElement(this.props.prevArrow,c(c({},r),i)):n.default.createElement("button",l({key:"0",type:"button"},r)," ","Previous")}}]),r}(n.default.PureComponent),t.NextArrow=function(e){m(r,e);var t=y(r);function r(){return h(this,r),t.apply(this,arguments)}return p(r,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});(0,a.canGoNext)(this.props)||(e["slick-disabled"]=!0,t=null);var r={key:"1","data-role":"none",className:(0,o.default)(e),style:{display:"block"},onClick:t},i={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.nextArrow?n.default.cloneElement(this.props.nextArrow,c(c({},r),i)):n.default.createElement("button",l({key:"1",type:"button"},r)," ","Next")}}]),r}(n.default.PureComponent)},72544(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,n=(i=r(67308))&&i.__esModule?i:{default:i};t.default={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return n.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return n.default.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,asNavFor:null,unslick:!1}},66760(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
107Object.defineProperty(t,"__esModule",{value:!0}),t.Dots=void 0;var n=s(r(67308)),o=s(r(30395)),a=r(4744);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function u(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.Dots=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");p.prototype=Object.create(e&&e.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),e&&c(p,e);var t,r,s=(t=h(),function(){var e,r=d(p);return e=t?Reflect.construct(r,arguments,d(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,e)});function p(){if(!(this instanceof p))throw TypeError("Cannot call a class as a function");return s.apply(this,arguments)}return r=[{key:"clickHandler",value:function(e,t){t.preventDefault(),this.props.clickHandler(e)}},{key:"render",value:function(){for(var e,t=this.props,r=t.onMouseEnter,i=t.onMouseOver,s=t.onMouseLeave,c=t.infinite,h=t.slidesToScroll,d=t.slidesToShow,p=t.slideCount,f=t.currentSlide,m=(e={slideCount:p,slidesToScroll:h,slidesToShow:d,infinite:c}).infinite?Math.ceil(e.slideCount/e.slidesToScroll):Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,g=[],y=0;y<m;y++){var v=(y+1)*h-1,b=c?v:(0,a.clamp)(v,0,p-1),_=b-(h-1),x=c?_:(0,a.clamp)(_,0,p-1),A=(0,o.default)({"slick-active":c?f>=x&&f<=b:f===x}),w={message:"dots",index:y,slidesToScroll:h,currentSlide:f},S=this.clickHandler.bind(this,w);g=g.concat(n.default.createElement("li",{key:y,className:A},n.default.cloneElement(this.props.customPaging(y),{onClick:S})))}return n.default.cloneElement(this.props.appendDots(g),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){var i,n;i=t,n=r[t],(i=u(i))in e?Object.defineProperty(e,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[i]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:this.props.dotsClass},{onMouseEnter:r,onMouseOver:i,onMouseLeave:s}))}}],function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i)}}(p.prototype,r),Object.defineProperty(p,"prototype",{writable:!1}),p}(n.default.PureComponent)},51478(e,t,r){"use strict";var i;t.A=void 0,t.A=((i=r(66841))&&i.__esModule?i:{default:i}).default},6742(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0}},39850(e,t,r){"use strict";
107Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSlider=void 0;var i=d(r(67308)),n=d(r(6742)),o=d(r(63850)),a=d(r(30395)),s=r(4744),l=r(3337),u=r(66760),c=r(3422),h=d(r(87922));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(null,arguments)}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){x(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y(e,t){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function x(e,t,r){return(t=A(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=p(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}t.InnerSlider=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");m.prototype=Object.create(e&&e.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),e&&y(m,e);var t,r,d=(t=b(),function(){var e,r=_(m);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return v(e)}(this,e)});function m(e){if(!(this instanceof m))throw TypeError("Cannot call a class as a function");x(v(t=d.call(this,e)),"listRefHandler",function(e){return t.list=e}),x(v(t),"trackRefHandler",function(e){return t.track=e}),x(v(t),"adaptHeight",function(){if(t.props.adaptiveHeight&&t.list){var e=t.list.querySelector('[data-index="'.concat(t.state.currentSlide,'"]'));t.list.style.height=(0,s.getHeight)(e)+"px"}}),x(v(t),"componentDidMount",function(){if(t.props.onInit&&t.props.onInit(),t.props.lazyLoad){var e=(0,s.getOnDemandLazySlides)(g(g({},t.props),t.state));e.length>0&&(t.setState(function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),t.props.onLazyLoad&&t.props.onLazyLoad(e))}var r=g({listRef:t.list,trackRef:t.track},t.props);t.updateState(r,!0,function(){t.adaptHeight(),t.props.autoplay&&t.autoPlay("update")}),"progressive"===t.props.lazyLoad&&(t.lazyLoadTimer=setInterval(t.progressiveLazyLoad,1e3)),t.ro=new h.default(function(){t.state.animating?(t.onWindowResized(!1),t.callbackTimers.push(setTimeout(function(){return t.onWindowResized()},t.props.speed))):t.onWindowResized()}),t.ro.observe(t.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),function(e){e.onfocus=t.props.pauseOnFocus?t.onSlideFocus:null,e.onblur=t.props.pauseOnFocus?t.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",t.onWindowResized):window.attachEvent("onresize",t.onWindowResized)}),x(v(t),"componentWillUnmount",function(){t.animationEndCallback&&clearTimeout(t.animationEndCallback),t.lazyLoadTimer&&clearInterval(t.lazyLoadTimer),t.callbackTimers.length&&(t.callbackTimers.forEac
107h(function(e){return clearTimeout(e)}),t.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",t.onWindowResized):window.detachEvent("onresize",t.onWindowResized),t.autoplayTimer&&clearInterval(t.autoplayTimer),t.ro.disconnect()}),x(v(t),"componentDidUpdate",function(e){if(t.checkImagesLoad(),t.props.onReInit&&t.props.onReInit(),t.props.lazyLoad){var r=(0,s.getOnDemandLazySlides)(g(g({},t.props),t.state));r.length>0&&(t.setState(function(e){return{lazyLoadedList:e.lazyLoadedList.concat(r)}}),t.props.onLazyLoad&&t.props.onLazyLoad(r))}t.adaptHeight();var n=g(g({listRef:t.list,trackRef:t.track},t.props),t.state),o=t.didPropsChange(e);o&&t.updateState(n,o,function(){t.state.currentSlide>=i.default.Children.count(t.props.children)&&t.changeSlide({message:"index",index:i.default.Children.count(t.props.children)-t.props.slidesToShow,currentSlide:t.state.currentSlide}),t.props.autoplay?t.autoPlay("update"):t.pause("paused")})}),x(v(t),"onWindowResized",function(e){t.debouncedResize&&t.debouncedResize.cancel(),t.debouncedResize=(0,o.default)(function(){return t.resizeWindow(e)},50),t.debouncedResize()}),x(v(t),"resizeWindow",function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(t.track&&t.track.node){var r=g(g({listRef:t.list,trackRef:t.track},t.props),t.state);t.updateState(r,e,function(){t.props.autoplay?t.autoPlay("update"):t.pause("paused")}),t.setState({animating:!1}),clearTimeout(t.animationEndCallback),delete t.animationEndCallback}}),x(v(t),"updateState",function(e,r,n){var o=(0,s.initializedState)(e);e=g(g(g({},e),o),{},{slideIndex:o.currentSlide});var a=(0,s.getTrackLeft)(e);e=g(g({},e),{},{left:a});var l=(0,s.getTrackCSS)(e);(r||i.default.Children.count(t.props.children)!==i.default.Children.count(e.children))&&(o.trackStyle=l),t.setState(o,n)}),x(v(t),"ssrInit",function(){if(t.props.variableWidth){var e=0,r=0,n=[],o=(0,s.getPreClones)(g(g(g({},t.props),t.state),{},{slideCount:t.props.children.length})),a=(0,s.getPostClones)(g(g(g({},t.props),t.state),{},{slideCount:t.props.children.length}));t.props.children.forEach(function(t){n.push(t.props.style.width),e+=t.props.style.width});for(var l=0;l<o;l++)r+=n[n.length-1-l],e+=n[n.length-1-l];for(var u=0;u<a;u++)e+=n[u];for(var c=0;c<t.state.currentSlide;c++)r+=n[c];var h={width:e+"px",left:-r+"px"};if(t.props.centerMode){var d="".concat(n[t.state.currentSlide],"px");h.left="calc(".concat(h.left," + (100% - ").concat(d,") / 2 ) ")}return{trackStyle:h}}var p=i.default.Children.count(t.props.children),f=g(g(g({},t.props),t.state),{},{slideCount:p}),m=(0,s.getPreClones)(f)+(0,s.getPostClones)(f)+p,y=100/t.props.slidesToShow*m,v=100/m,b=-v*((0,s.getPreClones)(f)+t.state.currentSlide)*y/100;return t.props.centerMode&&(b+=(100-v*y/100)/2),{slideWidth:v+"%",trackStyle:{width:y+"%",left:b+"%"}}}),x(v(t),"checkImagesLoad",function(){var e=t.list&&t.list.querySelectorAll&&t.list.querySelectorAll(".slick-slide img")||[],r=e.length,i=0;Array.prototype.forEach.call(e,function(e){var n=function(){return++i&&i>=r&&t.onWindowResized()};if(e.onclick){var o=e.onclick;e.onclick=function(t){o(t),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(t.props.lazyLoad?e.onload=function(){t.adaptHeight(),t.callbackTimers.push(setTimeout(t.onWindowResized,t.props.speed))}:(e.onload=n,e.onerror=function(){n(),t.props.onLazyLoadError&&t.props.onLazyLoadError()}))})}),x(v(t),"progressiveLazyLoad",function(){for(var e=[],r=g(g({},t.props),t.state),i=t.state.currentSlide;i<t.state.slideCount+(0,s.getPostClones)(r);i++)if(0>t.state.lazyLoadedList.indexOf(i)){e.push(i);break}for(var n=t.state.currentSlide-1;n>=-(0,s.getPreClones)(r);n--)if(0>t.state.lazyLoadedList.indexOf(n)){e.push(n);break}e.length>0?(t.setState(function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),t.props.onLazyLoad&&t.props.onLazyLoad(e)):t.lazyLoadTimer&&(clearInterval(t.lazyLoadTimer),delete t.lazyLoadTimer)}),x(v(t),"slideHandler",function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.props,n=i.asNavFor,o=i.beforeChange,a=i.onLazyLoad,l=i.speed,u=i.afterChange,c=t.state.currentSlide,h=(0,s.slideHandler)(g(g(g({index:e},t.props),t.state),{},{trackRef:t.track,useCSS:t.props.useCSS&&!r})),d=h.state,p=h.nextState;if(d){o&&o(c,d.currentSlide);var f=d.lazyLoadedList.filter(function(e){return 0>t.state.lazyLoadedList.indexOf(e)});a&&f.length>0&&a(f),!t.props.waitForAnimate&&t.animationEndCallback&&(clearTimeout(t.animationEndCallback),u&&u(c),delete t.animationEndCallback),t.setState(d,function(){n&&t.asNavForIndex!==e&&(t.asNavForIndex=e,n.innerSlider.slideHandler(e)),p&&(t.animationEndCallback=setTimeout(function(){var e=p.animating,r=function(e,t){if(null==e)return{};var r,i,n=function(e,t){if(null==e)return{};var r={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(t.includes(i))continue;
vendor: 5,198 bytes, line 107
107r[i]=e[i]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],t.includes(r)||({}).propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(p,["animating"]);t.setState(r,function(){t.callbackTimers.push(setTimeout(function(){return t.setState({animating:e})},10)),u&&u(d.currentSlide),delete t.animationEndCallback})},l))})}}),x(v(t),"changeSlide",function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=g(g({},t.props),t.state),n=(0,s.changeSlide)(i,e);if((0===n||n)&&(!0===r?t.slideHandler(n,r):t.slideHandler(n),t.props.autoplay&&t.autoPlay("update"),t.props.focusOnSelect)){var o=t.list.querySelectorAll(".slick-current");o[0]&&o[0].focus()}}),x(v(t),"clickHandler",function(e){!1===t.clickable&&(e.stopPropagation(),e.preventDefault()),t.clickable=!0}),x(v(t),"keyHandler",function(e){var r=(0,s.keyHandler)(e,t.props.accessibility,t.props.rtl);""!==r&&t.changeSlide({message:r})}),x(v(t),"selectHandler",function(e){t.changeSlide(e)}),x(v(t),"disableBodyScroll",function(){window.ontouchmove=function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}}),x(v(t),"enableBodyScroll",function(){window.ontouchmove=null}),x(v(t),"swipeStart",function(e){t.props.verticalSwiping&&t.disableBodyScroll();var r=(0,s.swipeStart)(e,t.props.swipe,t.props.draggable);""!==r&&t.setState(r)}),x(v(t),"swipeMove",function(e){var r=(0,s.swipeMove)(e,g(g(g({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));r&&(r.swiping&&(t.clickable=!1),t.setState(r))}),x(v(t),"swipeEnd",function(e){var r=(0,s.swipeEnd)(e,g(g(g({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));if(r){var i=r.triggerSlideHandler;delete r.triggerSlideHandler,t.setState(r),void 0!==i&&(t.slideHandler(i),t.props.verticalSwiping&&t.enableBodyScroll())}}),x(v(t),"touchEnd",function(e){t.swipeEnd(e),t.clickable=!0}),x(v(t),"slickPrev",function(){t.callbackTimers.push(setTimeout(function(){return t.changeSlide({message:"previous"})},0))}),x(v(t),"slickNext",function(){t.callbackTimers.push(setTimeout(function(){return t.changeSlide({message:"next"})},0))}),x(v(t),"slickGoTo",function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(isNaN(e=Number(e)))return"";t.callbackTimers.push(setTimeout(function(){return t.changeSlide({message:"index",index:e,currentSlide:t.state.currentSlide},r)},0))}),x(v(t),"play",function(){var e;if(t.props.rtl)e=t.state.currentSlide-t.props.slidesToScroll;else{if(!(0,s.canGoNext)(g(g({},t.props),t.state)))return!1;e=t.state.currentSlide+t.props.slidesToScroll}t.slideHandler(e)}),x(v(t),"autoPlay",function(e){t.autoplayTimer&&clearInterval(t.autoplayTimer);var r=t.state.autoplaying;if("update"===e){if("hovered"===r||"focused"===r||"paused"===r)return}else if("leave"===e){if("paused"===r||"focused"===r)return}else if("blur"===e&&("paused"===r||"hovered"===r))return;t.autoplayTimer=setInterval(t.play,t.props.autoplaySpeed+50),t.setState({autoplaying:"playing"})}),x(v(t),"pause",function(e){t.autoplayTimer&&(clearInterval(t.autoplayTimer),t.autoplayTimer=null);var r=t.state.autoplaying;"paused"===e?t.setState({autoplaying:"paused"}):"focused"===e?("hovered"===r||"playing"===r)&&t.setState({autoplaying:"focused"}):"playing"===r&&t.setState({autoplaying:"hovered"})}),x(v(t),"onDotsOver",function(){return t.props.autoplay&&t.pause("hovered")}),x(v(t),"onDotsLeave",function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")}),x(v(t),"onTrackOver",function(){return t.props.autoplay&&t.pause("hovered")}),x(v(t),"onTrackLeave",function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")}),x(v(t),"onSlideFocus",function(){return t.props.autoplay&&t.pause("focused")}),x(v(t),"onSlideBlur",function(){return t.props.autoplay&&"focused"===t.state.autoplaying&&t.autoPlay("blur")}),x(v(t),"render",function(){var e,r,n,o=(0,a.default)("slick-slider",t.props.className,{"slick-vertical":t.props.vertical,"slick-initialized":!0}),h=g(g({},t.props),t.state),d=(0,s.extractObject)(h,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),p=t.props.pauseOnHover;if(d=g(g({},d),{},{onMouseEnter:p?t.onTrackOver:null,onMouseLeave:p?t.onTrackLeave:null,onMouseOver:p?t.onTrackOver:null,focusOnSelect:t.props.focusOnSelect&&t.clickable?t.selectHandler:null}),!0===t.props.dots&&t.state.slideCount>=t.props.slidesToShow){var m=(0,s.extractObject)(h,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),y=t.props.pauseOnDotsHover;m=g(g({},m),{},{clickHandler:t.changeSlide,onMouseEnter:y?t.onDotsLeave:null,onMouseOver:y?t.onDotsOver:null,onMouseLeave:y?t.onDotsLeave:null}),e=i.default.createElement(u.Dots,m)}var v=(0,s.extractObject)(h,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","
107nextArrow"]);v.clickHandler=t.changeSlide,t.props.arrows&&(r=i.default.createElement(c.PrevArrow,v),n=i.default.createElement(c.NextArrow,v));var b=null;t.props.vertical&&(b={height:t.state.listHeight});var _=null;!1===t.props.vertical?!0===t.props.centerMode&&(_={padding:"0px "+t.props.centerPadding}):!0===t.props.centerMode&&(_={padding:t.props.centerPadding+" 0px"});var x=g(g({},b),_),A=t.props.touchMove,w={className:"slick-list",style:x,onClick:t.clickHandler,onMouseDown:A?t.swipeStart:null,onMouseMove:t.state.dragging&&A?t.swipeMove:null,onMouseUp:A?t.swipeEnd:null,onMouseLeave:t.state.dragging&&A?t.swipeEnd:null,onTouchStart:A?t.swipeStart:null,onTouchMove:t.state.dragging&&A?t.swipeMove:null,onTouchEnd:A?t.touchEnd:null,onTouchCancel:t.state.dragging&&A?t.swipeEnd:null,onKeyDown:t.props.accessibility?t.keyHandler:null},S={className:o,dir:"ltr",style:t.props.style};return t.props.unslick&&(w={className:"slick-list"},S={className:o,style:t.props.style}),i.default.createElement("div",S,t.props.unslick?"":r,i.default.createElement("div",f({ref:t.listRefHandler},w),i.default.createElement(l.Track,f({ref:t.trackRefHandler},d),t.props.children)),t.props.unslick?"":n,t.props.unslick?"":e)}),t.list=null,t.track=null,t.state=g(g({},n.default),{},{currentSlide:t.props.initialSlide,targetSlide:t.props.initialSlide?t.props.initialSlide:0,slideCount:i.default.Children.count(t.props.children)}),t.callbackTimers=[],t.clickable=!0,t.debouncedResize=null;var t,r=t.ssrInit();return t.state=g(g({},t.state),r),t}return r=[{key:"didPropsChange",value:function(e){for(var t=!1,r=0,n=Object.keys(this.props);r<n.length;r++){var o=n[r];if(!e.hasOwnProperty(o)||!("object"===p(e[o])||"function"==typeof e[o]||isNaN(e[o]))&&e[o]!==this.props[o]){t=!0;break}}return t||i.default.Children.count(this.props.children)!==i.default.Children.count(e.children)}}],function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,A(i.key),i)}}(m.prototype,r),Object.defineProperty(m,"prototype",{writable:!1}),m}(i.default.Component)},66841(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=l(r(67308)),n=r(39850),o=l(r(51148)),a=l(r(72544)),s=r(4744);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(null,arguments)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach(function(t){y(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=u(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");h.prototype=Object.create(e&&e.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),e&&p(h,e);var t,r,l=(t=m(),function(){var e,r=g(h);return e=t?Reflect.construct(r,arguments,g(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return f(e)}(this,e)});function h(e){var t;if(!(this instanceof h))throw TypeError("Cannot call a class as a function");return y(f(t=l.call(this,e)),"innerSliderRefHandler",function(e){return t.innerSlider=e}),y(f(t),"slickPrev",function(){return t.innerSlider.slickPrev()}),y(f(t),"slickNext",function(){return t.innerSlider.slickNext()}),y(f(t),"slickGoTo",function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.innerSlider.slickGoTo(e,r)}),y(f(t),"slickPause",function(){return t.innerSlider.pause("paused")}),y(f(t),"slickPlay",function(){return t.innerSlider.autoPlay("play")}),t.state={breakpoint:null},t._responsiveMediaHandlers=[],t}return r=[{key:"media",value:function(e,t){var r=window.matchMedia(e),i=function(e){e.matches&&t()};r.addListener(i),this._responsiveMediaHandlers.push({mql:r,query:e,listener:i})}},{key:"componentDidMount",value:function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map(function(e){return e.breakpoint});t.sort(function(e,t){return e-t}),t.forEach(function(r,i){var n;n=0===i?(0,o.default)({minWidth:0,maxWidth:r}):(0,o.default)({minWidth:t[i-1]+1,maxWidth:r}),(0,s.canUseDOM)()&&e.media(n,function(){e.setState({breakpoint:r})})});var r=(0,o.default)({minWidth:t.slice(-1)[0]});(0,s.canUseDOM)()&&this.media(r,function(){e.setState({breakpoint:null})})}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEac
107h(function(e){e.mql.removeListener(e.listener)})}},{key:"render",value:function(){var e,t,r=this;(e=this.state.breakpoint?"unslick"===(t=this.props.responsive.filter(function(e){return e.breakpoint===r.state.breakpoint}))[0].settings?"unslick":d(d(d({},a.default),this.props),t[0].settings):d(d({},a.default),this.props)).centerMode&&(e.slidesToScroll,e.slidesToScroll=1),e.fade&&(e.slidesToShow,e.slidesToScroll,e.slidesToShow=1,e.slidesToScroll=1);var o=i.default.Children.toArray(this.props.children);o=o.filter(function(e){return"string"==typeof e?!!e.trim():!!e}),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var l=[],u=null,h=0;h<o.length;h+=e.rows*e.slidesPerRow){for(var p=[],f=h;f<h+e.rows*e.slidesPerRow;f+=e.slidesPerRow){for(var m=[],g=f;g<f+e.slidesPerRow&&(e.variableWidth&&o[g].props.style&&(u=o[g].props.style.width),!(g>=o.length));g+=1)m.push(i.default.cloneElement(o[g],{key:100*h+10*f+g,tabIndex:-1,style:{width:"".concat(100/e.slidesPerRow,"%"),display:"inline-block"}}));p.push(i.default.createElement("div",{key:10*h+f},m))}e.variableWidth?l.push(i.default.createElement("div",{key:h,style:{width:u}},p)):l.push(i.default.createElement("div",{key:h},p))}if("unslick"===e){var y="regular slider "+(this.props.className||"");return i.default.createElement("div",{className:y},o)}return l.length<=e.slidesToShow&&(e.unslick=!0),i.default.createElement(n.InnerSlider,c({style:this.props.style,ref:this.innerSliderRefHandler},(0,s.filterSettings)(e)),l)}}],function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,v(i.key),i)}}(h.prototype,r),Object.defineProperty(h,"prototype",{writable:!1}),h}(i.default.Component)},3337(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var i=a(r(67308)),n=a(r(30395)),o=r(4744);function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(null,arguments)}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function m(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=s(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var y=function(e){var t,r,i,n,o;return i=(o=e.rtl?e.slideCount-1-e.index:e.index)<0||o>=e.slideCount,e.centerMode?(n=Math.floor(e.slidesToShow/2),r=(o-e.currentSlide)%e.slideCount==0,o>e.currentSlide-n-1&&o<=e.currentSlide+n&&(t=!0)):t=e.currentSlide<=o&&o<e.currentSlide+e.slidesToShow,{"slick-slide":!0,"slick-active":t,"slick-center":r,"slick-cloned":i,"slick-current":o===(e.targetSlide<0?e.targetSlide+e.slideCount:e.targetSlide>=e.slideCount?e.targetSlide-e.slideCount:e.targetSlide)}},v=function(e){var t={};return(void 0===e.variableWidth||!1===e.variableWidth)&&(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=+(e.currentSlide===e.index),t.zIndex=e.currentSlide===e.index?999:998,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t},b=function(e,t){return e.key||t},_=function(e){var t,r=[],a=[],s=[],l=i.default.Children.count(e.children),u=(0,o.lazyStartIndex)(e),c=(0,o.lazyEndIndex)(e);
107return(i.default.Children.forEach(e.children,function(h,d){var p,m={message:"children",index:d,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};p=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(d)>=0?h:i.default.createElement("div",null);var g=v(f(f({},e),{},{index:d})),_=p.props.className||"",x=y(f(f({},e),{},{index:d}));if(r.push(i.default.cloneElement(p,{key:"original"+b(p,d),"data-index":d,className:(0,n.default)(x,_),tabIndex:"-1","aria-hidden":!x["slick-active"],style:f(f({outline:"none"},p.props.style||{}),g),onClick:function(t){p.props&&p.props.onClick&&p.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(m)}})),e.infinite&&l>1&&!1===e.fade&&!e.unslick){var A=l-d;A<=(0,o.getPreClones)(e)&&((t=-A)>=u&&(p=h),x=y(f(f({},e),{},{index:t})),a.push(i.default.cloneElement(p,{key:"precloned"+b(p,t),"data-index":t,tabIndex:"-1",className:(0,n.default)(x,_),"aria-hidden":!x["slick-active"],style:f(f({},p.props.style||{}),g),onClick:function(t){p.props&&p.props.onClick&&p.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(m)}}))),d<(0,o.getPostClones)(e)&&((t=l+d)<c&&(p=h),x=y(f(f({},e),{},{index:t})),s.push(i.default.cloneElement(p,{key:"postcloned"+b(p,t),"data-index":t,tabIndex:"-1",className:(0,n.default)(x,_),"aria-hidden":!x["slick-active"],style:f(f({},p.props.style||{}),g),onClick:function(t){p.props&&p.props.onClick&&p.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(m)}})))}}),e.rtl)?a.concat(r,s).reverse():a.concat(r,s)};t.Track=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),e&&u(o,e);var t,r,n=(t=h(),function(){var e,r=d(o);return e=t?Reflect.construct(r,arguments,d(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c(e)}(this,e)});function o(){var e;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return m(c(e=n.call.apply(n,[this].concat(r))),"node",null),m(c(e),"handleRef",function(t){e.node=t}),e}return r=[{key:"render",value:function(){var e=_(this.props),t=this.props,r=t.onMouseEnter,n=t.onMouseOver,o=t.onMouseLeave;return i.default.createElement("div",l({ref:this.handleRef,className:"slick-track",style:this.props.trackStyle},{onMouseEnter:r,onMouseOver:n,onMouseLeave:o}),e)}}],function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,g(i.key),i)}}(o.prototype,r),Object.defineProperty(o,"prototype",{writable:!1}),o}(i.default.PureComponent)},4744(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkSpecKeys=t.checkNavigable=t.changeSlide=t.canUseDOM=t.canGoNext=void 0,t.clamp=u,t.extractObject=void 0,t.filterSettings=function(e){return D.reduce(function(t,r){return e.hasOwnProperty(r)&&(t[r]=e[r]),t},{})},t.validSettings=t.swipeStart=t.swipeMove=t.swipeEnd=t.slidesOnRight=t.slidesOnLeft=t.slideHandler=t.siblingDirection=t.safePreventDefault=t.lazyStartIndex=t.lazySlidesOnRight=t.lazySlidesOnLeft=t.lazyEndIndex=t.keyHandler=t.initializedState=t.getWidth=t.getTrackLeft=t.getTrackCSS=t.getTrackAnimateCSS=t.getTotalSlides=t.getSwipeDirection=t.getSlideCount=t.getRequiredLazySlides=t.getPreClones=t.getPostClones=t.getOnDemandLazySlides=t.getNavigableIndexes=t.getHeight=void 0;var i=o(r(67308)),n=o(r(72544));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
107t%2?s(Object(r),!0).forEach(function(t){var i,n;i=t,n=r[t],(i=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=a(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}(i))in e?Object.defineProperty(e,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[i]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e,t,r){return Math.max(t,Math.min(e,r))}var c=t.safePreventDefault=function(e){["onTouchStart","onTouchMove","onWheel"].includes(e._reactName)||e.preventDefault()},h=t.getOnDemandLazySlides=function(e){for(var t=[],r=d(e),i=p(e),n=r;n<i;n++)0>e.lazyLoadedList.indexOf(n)&&t.push(n);return t};t.getRequiredLazySlides=function(e){for(var t=[],r=d(e),i=p(e),n=r;n<i;n++)t.push(n);return t};var d=t.lazyStartIndex=function(e){return e.currentSlide-f(e)},p=t.lazyEndIndex=function(e){return e.currentSlide+m(e)},f=t.lazySlidesOnLeft=function(e){return e.centerMode?Math.floor(e.slidesToShow/2)+ +(parseInt(e.centerPadding)>0):0},m=t.lazySlidesOnRight=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+ +(parseInt(e.centerPadding)>0):e.slidesToShow},g=t.getWidth=function(e){return e&&e.offsetWidth||0},y=t.getHeight=function(e){return e&&e.offsetHeight||0},v=t.getSwipeDirection=function(e){var t,r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t=e.startX-e.curX,(r=Math.round(180*Math.atan2(e.startY-e.curY,t)/Math.PI))<0&&(r=360-Math.abs(r)),r<=45&&r>=0||r<=360&&r>=315)return"left";if(r>=135&&r<=225)return"right";if(!0===i)if(r>=35&&r<=135)return"up";else return"down";return"vertical"},b=t.canGoNext=function(e){var t=!0;return!e.infinite&&(e.centerMode&&e.currentSlide>=e.slideCount-1?t=!1:(e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1)),t};t.extractObject=function(e,t){var r={};return t.forEach(function(t){return r[t]=e[t]}),r},t.initializedState=function(e){var t,r=i.default.Children.count(e.children),n=e.listRef,o=Math.ceil(g(n)),a=Math.ceil(g(e.trackRef&&e.trackRef.node));if(e.vertical)t=o;else{var s=e.centerMode&&2*parseInt(e.centerPadding);"string"==typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(s*=o/100),t=Math.ceil((o-s)/e.slidesToShow)}var u=n&&y(n.querySelector('[data-index="0"]')),c=u*e.slidesToShow,d=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(d=r-1-e.initialSlide);var p=e.lazyLoadedList||[],f=h(l(l({},e),{},{currentSlide:d,lazyLoadedList:p})),m={slideCount:r,slideWidth:t,listWidth:o,trackWidth:a,currentSlide:d,slideHeight:u,listHeight:c,lazyLoadedList:p=p.concat(f)};return null===e.autoplaying&&e.autoplay&&(m.autoplaying="playing"),m},t.slideHandler=function(e){var t=e.waitForAnimate,r=e.animating,i=e.fade,n=e.infinite,o=e.index,a=e.slideCount,s=e.lazyLoad,c=e.currentSlide,d=e.centerMode,p=e.slidesToScroll,f=e.slidesToShow,m=e.useCSS,g=e.lazyLoadedList;if(t&&r)return{};var y,v,_,x=o,A={},w={},E=n?o:u(o,0,a-1);if(i){if(!n&&(o<0||o>=a))return{};o<0?x=o+a:o>=a&&(x=o-a),s&&0>g.indexOf(x)&&(g=g.concat(x)),A={animating:!0,currentSlide:x,lazyLoadedList:g,targetSlide:x},w={animating:!1,targetSlide:x}}else y=x,x<0?(y=x+a,n?a%p!=0&&(y=a-a%p):y=0):!b(e)&&x>c?x=y=c:d&&x>=a?(x=n?a:a-1,y=n?0:a-1):x>=a&&(y=x-a,n?a%p!=0&&(y=0):y=a-f),!n&&x+f>=a&&(y=a-f),v=C(l(l({},e),{},{slideIndex:x})),_=C(l(l({},e),{},{slideIndex:y})),n||(v===_&&(x=y),v=_),s&&(g=g.concat(h(l(l({},e),{},{currentSlide:x})))),m?(A={animating:!0,currentSlide:y,trackStyle:T(l(l({},e),{},{left:v})),lazyLoadedList:g,targetSlide:E},w={animating:!1,currentSlide:y,trackStyle:S(l(l({},e),{},{left:_})),swipeLeft:null,targetSlide:E}):A={currentSlide:y,trackStyle:S(l(l({},e),{},{left:_})),lazyLoadedList:g,targetSlide:E};return{state:A,nextState:w}},t.changeSlide=function(e,t){var r,i,n,o,a=e.slidesToScroll,s=e.slidesToShow,u=e.slideCount,c=e.currentSlide,h=e.targetSlide,d=e.lazyLoad,p=e.infinite;if(r=u%a!=0?0:(u-c)%a,"previous"===t.message)o=c-(n=0===r?a:s-r),d&&!p&&(o=-1==(i=c-n)?u-1:i),p||(o=h-a);else if("next"===t.message)o=c+(n=0===r?a:r),d&&!p&&(o=(c+a)%u+r),p||(o=h+a);
107else if("dots"===t.message)o=t.index*t.slidesToScroll;else if("children"===t.message){if(o=t.index,p){var f=M(l(l({},e),{},{targetSlide:o}));o>t.currentSlide&&"left"===f?o-=u:o<t.currentSlide&&"right"===f&&(o+=u)}}else"index"===t.message&&(o=Number(t.index));return o},t.keyHandler=function(e,t,r){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":37===e.keyCode?r?"next":"previous":39===e.keyCode?r?"previous":"next":""},t.swipeStart=function(e,t,r){return("IMG"===e.target.tagName&&c(e),t&&(r||-1===e.type.indexOf("mouse")))?{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}:""},t.swipeMove=function(e,t){var r=t.scrolling,i=t.animating,n=t.vertical,o=t.swipeToSlide,a=t.verticalSwiping,s=t.rtl,u=t.currentSlide,h=t.edgeFriction,d=t.edgeDragged,p=t.onEdge,f=t.swiped,m=t.swiping,g=t.slideCount,y=t.slidesToScroll,_=t.infinite,x=t.touchObject,A=t.swipeEvent,w=t.listHeight,T=t.listWidth;if(!r){if(i)return c(e);n&&o&&a&&c(e);var E,P={},I=C(t);x.curX=e.touches?e.touches[0].pageX:e.clientX,x.curY=e.touches?e.touches[0].pageY:e.clientY,x.swipeLength=Math.round(Math.sqrt(Math.pow(x.curX-x.startX,2)));var M=Math.round(Math.sqrt(Math.pow(x.curY-x.startY,2)));if(!a&&!m&&M>10)return{scrolling:!0};a&&(x.swipeLength=M);var k=(s?-1:1)*(x.curX>x.startX?1:-1);a&&(k=x.curY>x.startY?1:-1);var O=Math.ceil(g/y),D=v(t.touchObject,a),R=x.swipeLength;return!_&&(0===u&&("right"===D||"down"===D)||u+1>=O&&("left"===D||"up"===D)||!b(t)&&("left"===D||"up"===D))&&(R=x.swipeLength*h,!1===d&&p&&(p(D),P.edgeDragged=!0)),!f&&A&&(A(D),P.swiped=!0),E=n?I+w/T*R*k:s?I-R*k:I+R*k,a&&(E=I+R*k),P=l(l({},P),{},{touchObject:x,swipeLeft:E,trackStyle:S(l(l({},t),{},{left:E}))}),Math.abs(x.curX-x.startX)<.8*Math.abs(x.curY-x.startY)||x.swipeLength>10&&(P.swiping=!0,c(e)),P}},t.swipeEnd=function(e,t){var r=t.dragging,i=t.swipe,n=t.touchObject,o=t.listWidth,a=t.touchThreshold,s=t.verticalSwiping,u=t.listHeight,h=t.swipeToSlide,d=t.scrolling,p=t.onSwipe,f=t.targetSlide,m=t.currentSlide,g=t.infinite;if(!r)return i&&c(e),{};var y=s?u/a:o/a,b=v(n,s),_={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(d||!n.swipeLength)return _;if(n.swipeLength>y){c(e),p&&p(b);var w,S,E=g?m:f;switch(b){case"left":case"up":S=E+A(t),w=h?x(t,S):S,_.currentDirection=0;break;case"right":case"down":S=E-A(t),w=h?x(t,S):S,_.currentDirection=1;break;default:w=E}_.triggerSlideHandler=w}else{var P=C(t);_.trackStyle=T(l(l({},t),{},{left:P}))}return _};var _=t.getNavigableIndexes=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,r=e.infinite?-1*e.slidesToShow:0,i=e.infinite?-1*e.slidesToShow:0,n=[];r<t;)n.push(r),r=i+e.slidesToScroll,i+=Math.min(e.slidesToScroll,e.slidesToShow);return n},x=t.checkNavigable=function(e,t){var r=_(e),i=0;if(t>r[r.length-1])t=r[r.length-1];else for(var n in r){if(t<r[n]){t=i;break}i=r[n]}return t},A=t.getSlideCount=function(e){var t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(!e.swipeToSlide)return e.slidesToScroll;var r,i=e.listRef;if(Array.from(i.querySelectorAll&&i.querySelectorAll(".slick-slide")||[]).every(function(i){if(e.vertical){if(i.offsetTop+y(i)/2>-1*e.swipeLeft)return r=i,!1}else if(i.offsetLeft-t+g(i)/2>-1*e.swipeLeft)return r=i,!1;return!0}),!r)return 0;var n=!0===e.rtl?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(r.dataset.index-n)||1},w=t.checkSpecKeys=function(e,t){return t.reduce(function(t,r){return t&&e.hasOwnProperty(r)},!0)?null:console.error("Keys Missing:",e)},S=t.getTrackCSS=function(e){if(w(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]),e.vertical){var t,r;r=(e.unslick?e.slideCount:e.slideCount+2*e.slidesToShow)*e.slideHeight}else t=I(e)*e.slideWidth;var i={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var n=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",o=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";i=l(l({},i),{},{WebkitTransform:n,transform:o,msTransform:a})}
107else e.vertical?i.top=e.left:i.left=e.left;return e.fade&&(i={opacity:1}),t&&(i.width=t),r&&(i.height=r),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?i.marginTop=e.left+"px":i.marginLeft=e.left+"px"),i},T=t.getTrackAnimateCSS=function(e){w(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=S(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},C=t.getTrackLeft=function(e){if(e.unslick)return 0;w(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t=e.slideIndex,r=e.trackRef,i=e.infinite,n=e.centerMode,o=e.slideCount,a=e.slidesToShow,s=e.slidesToScroll,l=e.slideWidth,u=e.listWidth,c=e.variableWidth,h=e.slideHeight,d=e.fade,p=e.vertical,f=0,m=0;if(d||1===e.slideCount)return 0;var g=0;if(i?(g=-E(e),o%s!=0&&t+s>o&&(g=-(t>o?a-(t-o):o%s)),n&&(g+=parseInt(a/2))):(o%s!=0&&t+s>o&&(g=a-o%s),n&&(g=parseInt(a/2))),f=g*l,m=g*h,y=p?-(t*h*1)+m:-(t*l*1)+f,!0===c){var y,v,b,_=r&&r.node;if(b=t+E(e),y=(v=_&&_.childNodes[b])?-1*v.offsetLeft:0,!0===n){b=i?t+E(e):t,v=_&&_.children[b],y=0;for(var x=0;x<b;x++)y-=_&&_.children[x]&&_.children[x].offsetWidth;y-=parseInt(e.centerPadding),y+=v&&(u-v.offsetWidth)/2}}return y},E=t.getPreClones=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+ +!!e.centerMode},P=t.getPostClones=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+ +!!e.centerMode},I=t.getTotalSlides=function(e){return 1===e.slideCount?1:E(e)+e.slideCount+P(e)},M=t.siblingDirection=function(e){return e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+k(e)?"left":"right":e.targetSlide<e.currentSlide-O(e)?"right":"left"},k=t.slidesOnRight=function(e){var t=e.slidesToShow,r=e.centerMode,i=e.rtl,n=e.centerPadding;if(r){var o=(t-1)/2+1;return parseInt(n)>0&&(o+=1),i&&t%2==0&&(o+=1),o}return i?0:t-1},O=t.slidesOnLeft=function(e){var t=e.slidesToShow,r=e.centerMode,i=e.rtl,n=e.centerPadding;if(r){var o=(t-1)/2+1;return parseInt(n)>0&&(o+=1),i||t%2!=0||(o+=1),o}return i?t-1:0};t.canUseDOM=function(){return!!("u">typeof window&&window.document&&window.document.createElement)};var D=t.validSettings=Object.keys(n.default)},68454(e,t,r){"use strict";r.d(t,{GT:()=>eg,WZ:()=>ey});var i=r(67308),n=function(e,t){return Number(e.toFixed(t))},o=function(e,t,r){r&&"function"==typeof r&&r(e,t)},a={easeOut:function(e){return-Math.cos(e*Math.PI)/2+.5},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}},s=function(e){"number"==typeof e&&cancelAnimationFrame(e)},l=function(e){e.mounted&&(s(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};
107function u(e,t,r,i){if(e.mounted){var n=new Date().getTime();l(e),e.animation=function(){if(!e.mounted)return s(e.animation);var o=new Date().getTime()-n,l=(0,a[t])(o/r);o>=r?(i(1),e.animation=null):e.animation&&(i(l),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function c(e,t,r,i){var n,o,a,s=(n=t.scale,o=t.positionX,a=t.positionY,!(Number.isNaN(n)||Number.isNaN(o)||Number.isNaN(a)));if(e.mounted&&s){var l=e.setTransformState,c=e.transformState,h=c.scale,d=c.positionX,p=c.positionY,f=t.scale-h,m=t.positionX-d,g=t.positionY-p;0===r?l(t.scale,t.positionX,t.positionY):u(e,i,r,function(e){l(h+f*e,d+m*e,p+g*e)})}}var h=function(e,t,r,i,n,o,a){var s=e>t?r*(a?1:.5):0,l=i>n?o*(a?1:.5):0;return{minPositionX:e-t-s,maxPositionX:s,minPositionY:i-n-l,maxPositionY:l}},d=function(e,t){var r,i,n,o,a,s,l=e.wrapperComponent,u=e.contentComponent,c=e.setup.centerZoomedOut;if(!l||!u)throw Error("Components are not mounted");var d=(r=l.offsetWidth,i=l.offsetHeight,n=u.offsetWidth,o=u.offsetHeight,{wrapperWidth:r,wrapperHeight:i,newContentWidth:a=n*t,newDiffWidth:r-a,newContentHeight:s=o*t,newDiffHeight:i-s}),p=d.wrapperWidth,f=d.wrapperHeight;return h(p,d.newContentWidth,d.newDiffWidth,f,d.newContentHeight,d.newDiffHeight,!!c)},p=function(e,t,r,i){return i?e<t?n(t,2):e>r?n(r,2):n(e,2):n(e,2)},f=function(e,t){var r=d(e,t);return e.bounds=r,r};function m(e,t,r,i,n,o,a){var s=r.minPositionX,l=r.minPositionY,u=r.maxPositionX,c=r.maxPositionY,h=0,d=0;return a&&(h=n,d=o),{x:p(e,s-h,u+h,i),y:p(t,l-d,c+d,i)}}function g(e,t,r,i,n,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,c=i-s;return"number"!=typeof t||"number"!=typeof r?(console.error("Mouse X and Y position were not provided!"),{x:l,y:u}):m(l-t*c,u-r*c,n,o,0,0,null)}function y(e,t,r,i,n){var o=t-(n?i:0);return!Number.isNaN(r)&&e>=r?r:!Number.isNaN(t)&&e<=o?o:e}var v=function(e,t){var r=e.setup.panning.excluded,i=e.isInitialized,n=e.wrapperComponent,o=t.target,a="shadowRoot"in o&&"composedPath"in t?t.composedPath().some(function(e){return e instanceof Element&&(null==n?void 0:n.contains(e))}):null==n?void 0:n.contains(o);return!(!(i&&o&&a)||q(o,r))},b=function(e){var t=e.isInitialized,r=e.isPanning,i=e.setup.panning.disabled;return!!(t&&r&&!i)},_=function(e,t){var r=e.transformState,i=r.positionX,n=r.positionY;e.isPanning=!0,e.startCoords={x:t.clientX-i,y:t.clientY-n}},x=function(e,t){var r=t.touches,i=e.transformState,n=i.positionX,o=i.positionY;e.isPanning=!0,1===r.length&&(e.startCoords={x:r[0].clientX-n,y:r[0].clientY-o})};function A(e,t,r,i,n){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,c=l.positionX,h=l.positionY;if(null!==a&&null!==s&&(t!==c||r!==h)){var d=m(t,r,s,o,i,n,a),p=d.x,f=d.y;e.setTransformState(u,p,f)}}var w=function(e,t,r){var i=e.startCoords,n=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=n.positionX,u=n.positionY;if(!i)return{x:l,y:u};var c=t-i.x,h=r-i.y;return{x:a?l:c,y:s?u:h}},S=function(e,t){var r=e.setup,i=e.transformState.scale,n=r.minScale,o=r.disablePadding;return t>0&&i>=n&&!o?t:0},T=function(e){var t=e.mounted,r=e.setup,i=r.disabled,n=r.velocityAnimation,o=e.transformState.scale;return!!(!n.disabled||o>1||!i||t)},C=function(e){var t=e.mounted,r=e.velocity,i=e.bounds,n=e.setup,o=n.disabled,a=n.velocityAnimation,s=e.transformState.scale;return!!(!a.disabled||s>1||!o||t)&&!!r&&!!i};function E(e,t,r,i,n,o,a,s,l,u){if(n){if(t>a&&r>a){var c=a+(e-a)*u;return c>l?l:c<a?a:c}if(t<o&&r<o){var c=o+(e-o)*u;return c<s?s:c>o?o:c}}return i?t:p(e,o,a,n)}function P(e,t){var r=e.transformState.scale;l(e),f(e,r),void 0!==window.TouchEvent&&t instanceof TouchEvent?x(e,t):_(e,t)}function I(e,t){var r=e.transformState.scale,i=e.setup,n=i.minScale,o=i.alignmentAnimation,a=o.disabled,s=o.sizeX,l=o.sizeY,u=o.animationTime,h=o.animationType;if(!(a||r<n||!s&&!l)){var d=function(e){var t=e.transformState,r=t.positionX,i=t.positionY,n=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!a&&u&&e.bounds){var c=e.bounds,h=c.maxPositionX,d=c.minPositionX,p=c.maxPositionY,f=c.minPositionY,m=r>h?u.offsetWidth:e.setup.minPositionX||0,y=i>p?u.offsetHeight:e.setup.minPositionY||0,v=g(e,m,y,n,e.bounds,s||l),b=v.x,_=v.y;return{scale:n,positionX:r>h||r<d?b:r,positionY:i>p||i<f?_:i}}}(e);d&&c(e,d,null!=t?t:u,h)}}function M(e,t,r){var i=e.startCoords,n=e.setup.alignmentAnimation,o=n.sizeX,a=n.sizeY;if(i){var s=w(e,t,r),l=s.x,u=s.y,c=S(e,o),h=S(e,a);!function(e,t){if(T(e)){var r=e.lastMousePosition,i=e.velocityTime,n=e.setup,o=e.wrapperComponent,a=n.velocityAnimation.equalToMove,s=Date.now();if(r&&i&&o){var l=a?Math.min(1,o.offsetWidth/window.innerWidth):1,u=t.x-r.x,c=t.y-r.y,h=Math.sqrt(u*u+c*c)/(s-i);e.velocity={velocityX:u/l,velocityY:c/l,total:h}}e.lastMousePosition=t,e.velocityTime=s}}(e,{x:l,y:u}),A(e,l,u,c,h)}}function k(e,t,r,i){var o=e.setup,a=o.minScale,s=o.maxScale,l=o.limitToBounds,u=y(n(t,2),a,s,0,!1),c=f(e,u),h=g(e,r,i,u,c,l);return{scale:u,positionX:h.x,positionY:h.y}}function O(e,t,r){var i=e.transformState.scale,n=e.wrapperComponent,o=e.setup,a=o.minScale,s=o.limitToBounds,l=o.zoomAnimation,u=l.disabled,h=l.animationTime,d=l.animationType,p=u||i>=a;if((i>=1||s)&&I(e),!p&&n&&e.mounted){var f=k(e,a,t||n.offsetWidth/2,r||n.offsetHeight/2);f&&c(e,f,h,d)}}var D=function(){return(D=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function R(e,t,r){if(r||2==arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var L={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,disablePadding:!1,smooth:!0,wheel:{step:.2,disabled:!1,smoothStep:.001,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,allowLeftClickPan:!0,allowMiddleClickPan:!0,allowRightClickPan:!0,wheelPanning:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},B="react-transform-wrapper",F=function(e){var t,r,i,n;return{previousScale:null!=(t=e.initialScale)?t:1,scale:null!=(r=e.initialScale)?r:1,positionX:null!=(i=e.initialPositionX)?i:0,positionY:null!=(n=e.initialPositionY)?n:0}},j=function(e){var t=D({},L);return Object.keys(e).forEach(function(r){var i=void 0!==e[r];if(void 0!==L[r]&&i){var n=Object.prototype.toString.call(L[r]);"[object Object]"===n?t[r]=D(D({},L[r]),e[r]):"[object Array]"===n?t[r]=R(R([],L[r],!0),e[r],!0):t[r]=e[r]}}),t},z=function(e,t,r){var i=e.transformState.scale,o=e.wrapperComponent,a=e.setup,s=a.maxScale,l=a.minScale,u=a.zoomAnimation,c=a.smooth,h=u.size;if(!o)throw Error("Wrapper is not mounted");return y(n(c?i*Math.exp(t*r):i+t*r,3),l,s,h,!1)};function N(e,t,r,i,n){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,d=o.offsetHeight,p=z(e,t,r),f=k(e,p,(h/2-l)/s,(
107d/2-u)/s);if(!f)return console.error("Error during zoom event. New transformation state was not calculated.");c(e,f,i,n)}function G(e,t,r,i){var n=e.setup,o=e.wrapperComponent,a=n.limitToBounds,s=F(e.props),l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY;if(o){var f=d(e,s.scale),g=m(s.positionX,s.positionY,f,a,0,0,o),y={scale:s.scale,positionX:g.x,positionY:g.y};(u!==s.scale||h!==s.positionX||p!==s.positionY)&&(null==i||i(),c(e,y,t,r))}}var V=function(e){return{instance:e,zoomIn:function(t,r,i){void 0===t&&(t=.5),void 0===r&&(r=300),void 0===i&&(i="easeOut"),N(e,1,t,r,i)},zoomOut:function(t,r,i){void 0===t&&(t=.5),void 0===r&&(r=300),void 0===i&&(i="easeOut"),N(e,-1,t,r,i)},setTransform:function(t,r,i,n,o){void 0===n&&(n=300),void 0===o&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,d=e.contentComponent;!e.setup.disabled&&h&&d&&c(e,{positionX:Number.isNaN(t)?s:t,positionY:Number.isNaN(r)?l:r,scale:Number.isNaN(i)?u:i},n,o)},resetTransform:function(t,r){void 0===t&&(t=200),void 0===r&&(r="easeOut"),G(e,t,r)},centerView:function(t,r,i){void 0===r&&(r=200),void 0===i&&(i="easeOut");var n=e.transformState,o=e.wrapperComponent,a=e.contentComponent;o&&a&&c(e,$(t||n.scale,o,a),r,i)},zoomToElement:function(t,r,i,n){void 0===i&&(i=600),void 0===n&&(n="easeOut"),l(e);var o=e.wrapperComponent,a="string"==typeof t?document.getElementById(t):t;if(o&&a&&o.contains(a)){var s=function(e,t,r){var i,n,o,a,s,l=e.wrapperComponent,u=e.contentComponent,c=e.transformState,h=e.setup,p=h.limitToBounds,f=h.minScale,g=h.maxScale;if(!l||!u)return c;var v=l.getBoundingClientRect(),b=t.getBoundingClientRect(),_=(i=t.getBoundingClientRect(),n=l.getBoundingClientRect(),o=u.getBoundingClientRect(),a=n.x*c.scale,s=n.y*c.scale,{x:(i.x-o.x+a)/c.scale,y:(i.y-o.y+s)/c.scale}),x=_.x,A=_.y,w=b.width/c.scale,S=b.height/c.scale,T=l.offsetWidth/w,C=l.offsetHeight/S,E=y(r||Math.min(T,C),f,g,0,!1),P=(v.width-w*E)/2,I=(v.height-S*E)/2,M=m((v.left-x)*E+P,(v.top-A)*E+I,d(e,E),p,0,0,l);return{positionX:M.x,positionY:M.y,scale:E}}(e,a,r);c(e,s,i,n)}}}},U=function(e){var t={};return Object.assign(t,{instance:e,state:e.transformState}),Object.assign(t,V(e)),t};function H(){try{return{get passive(){return!1}}}catch(e){return!1}}var W=".".concat(B),q=function(e,t){return t.some(function(t){return e.matches("".concat(W," ").concat(t,", ").concat(W," .").concat(t,", ").concat(W," ").concat(t," *, ").concat(W," .").concat(t," *"))})},Z=function(e){e&&clearTimeout(e)},$=function(e,t,r){var i=r.offsetWidth*e,n=r.offsetHeight*e;return{scale:e,positionX:(t.offsetWidth-i)/2,positionY:(t.offsetHeight-n)/2}},K=function(e,t){var r=e.setup.wheel,i=r.disabled,n=r.wheelDisabled,o=r.touchPadDisabled,a=r.excluded,s=e.isInitialized,l=e.isPanning,u=t.target;return!(!(s&&!l&&!i&&u)||n&&!t.ctrlKey||o&&t.ctrlKey||q(u,a))};function X(e,t,r){var i=t.getBoundingClientRect(),n=0,o=0;if("clientX"in e)n=(e.clientX-i.left)/r,o=(e.clientY-i.top)/r;else{var a=e.touches[0];n=(a.clientX-i.left)/r,o=(a.clientY-i.top)/r}return(Number.isNaN(n)||Number.isNaN(o))&&console.error("No mouse or touch offset found"),{x:n,y:o}}var Y=function(e,t,r,i,o){var a=e.transformState.scale,s=e.wrapperComponent,l=e.setup,u=l.maxScale,c=l.minScale,h=l.zoomAnimation,d=l.disablePadding,p=h.size,f=h.disabled;if(!s)throw Error("Wrapper is not mounted");var m=a+t*r;return o?m:y(n(m,3),c,u,p,!i&&!f&&!d)},Q=function(e,t){var r=e.previousWheelEvent,i=e.transformState.scale,n=e.setup,o=n.maxScale,a=n.minScale;return!!r&&(i<o||i>a||Math.sign(r.deltaY)!==Math.sign(t.deltaY)||r.deltaY>0&&r.deltaY<t.deltaY||r.deltaY<0&&r.deltaY>t.deltaY||Math.sign(r.deltaY)!==Math.sign(t.deltaY))},J=function(e,t){var r=e.setup.pinch,i=r.disabled,n=r.excluded,o=e.isInitialized,a=t.target;return!(!(o&&!i&&a)||q(a,n))},ee=function(e){var t=e.setup.pinch.disabled,r=e.isInitialized,i=e.pinchStartDistance;return!!(r&&!t&&i)},et=function(e,t,r){var i=r.getBoundingClientRect(),o=e.touches,a=n(o[0].clientX-i.left,5),s=n(o[0].clientY-i.top,5);return{x:(a+n(o[1].clientX-i.left,5))/2/t,y:(s+n(o[1].clientY-i.top,5))/2/t}},er=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},ei=function(e,t){var r=e.pinchStartScale,i=e.pinchStartDistance,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=o.disablePadding,c=l.size,h=l.disabled;if(!r||null===i||!t)throw Error("Pinch touches distance was not provided");return t<0?e.transformState.scale:y(n(t/i*r,2),s,a,c,!h&&!u)},en=function(e,t){var r=e.props,i=r.onWheelStart,n=r.onZoomStart;e.wheelStopEventTimer||(l(e),o(U(e),t,i),o(U(e),t,n))},eo=function(e,t){var r=e.props,i=r.onWheel,n=r.onZoom,a=e.contentComponent,s=e.setup,l=e.transformState.scale,u=s.limitToBounds,c=s.centerZoomedOut,h=s.zoomAnimation,d=s.wheel,p=s.disablePadding,m=s.smooth,y=h.size,v=h.disabled,b=d.step,_=d.smoothStep;if(!a)throw Error("Component not mounted");t.preventDefault(),t.stopPropagation();var x=Y(e,t?t.deltaY<0?1:-1:0,m?_*Math.abs(t.deltaY):b,!t.ctrlKey);if(l!==x){var A=f(e,x),w=X(t,a,l),S=g(e,w.x,w.y,x,A,u&&(v||0===y||c||p)),T=S.x,C=S.y;e.previousWheelEvent=t,e.setTransformState(x,T,C),o(U(e),t,i),o(U(e),t,n)}},ea=function(e,t){var r=e.props,i=r.onWheelStop,n=r.onZoomStop;Z(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){e.mounted&&(O(e,t.x,t.y),e.wheelAnimationTimer=null)},100),Q(e,t)&&(Z(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){e.mounted&&(e.wheelStopEventTimer=null,o(U(e),t,i),o(U(e),t,n))},160))},es=function(e){for(var t=0,r=0,i=0;i<2;i+=1)t+=e.touches[i].clientX,r+=e.touches[i].clientY;return{x:t/2,y:r/2}},el=function(e,t){var r=er(t);e.pinchStartDistance=r,e.lastDistance=r,e.pinchStartScale=e.transformState.scale,e.isPanning=!1;var i=es(t);e.pinchLastCenterX=i.x,e.pinchLastCenterY=i.y,l(e)},eu=function(e,t){var r=e.contentComponent,i=e.pinchStartDistance,n=e.wrapperComponent,o=e.transformState.scale,a=e.setup,s=a.limitToBounds,l=a.centerZoomedOut,u=a.zoomAnimation,c=a.alignmentAnimation,h=u.disabled,d=u.size;if(null!==i&&r){var p=et(t,o,r);if(Number.isFinite(p.x)&&Number.isFinite(p.y)){var y=er(t),v=ei(e,y),b=es(t),_=b.x-(e.pinchLastCenterX||0),x=b.y-(e.pinchLastCenterY||0);if(v!==o||0!==_||0!==x){e.pinchLastCenterX=b.x,e.pinchLastCenterY=b.y;var A=f(e,v),w=g(e,p.x,p.y,v,A,s&&(h||0===d||l)),T=w.x,C=w.y;e.pinchMidpoint=p,e.lastDistance=y;var E=c.sizeX,P=c.sizeY,I=m(T+_,C+x,A,s,S(e,E),S(e,P),n),M=I.x,k=I.y;e.setTransformState(v,M,k)}}}},ec=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,O(e,null==t?void 0:t.x,null==t?void 0:t.y)},eh=function(e,t){var r=e.props.onZoomStop,i=e.setup.doubleClick.animationTime;Z(e.doubleClickStopEventTimer),e.doubleClickStopEventTimer=setTimeout(function(){e.doubleClickStopEventTimer=null,o(U(e),t,r)},i)},ed=function(e,t){var r=e.props,i=r.onZoomStart,n=r.onZoom,a=e.setup.doubleClick,s=a.animationTime,l=a.animationType;o(U(e),t,i),G(e,s,l,function(){return o(U(e),t,n)}),eh(e,t)},ep=function(e,t){var r=e.isInitialized,i=e.setup,n=e.wrapperComponent,o=i.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=null==n?void 0:n.contains(l);
107return!(!(r&&l&&u&&!a)||q(l,s))},ef=function(e){var t=this;this.mounted=!0,this.pinchLastCenterX=null,this.pinchLastCenterY=null,this.onChangeCallbacks=new Set,this.onInitCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.isWheelPanning=!1,this.startCoords=null,this.lastTouch=null,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.animate=!1,this.animation=null,this.maxBounds=null,this.pressedKeys={},this.mount=function(){t.initializeWindowEvents()},this.unmount=function(){t.cleanupWindowEvents()},this.update=function(e){t.props=e,f(t,t.transformState.scale),t.setup=j(e)},this.initializeWindowEvents=function(){var e,r,i=H(),n=null==(e=t.wrapperComponent)?void 0:e.ownerDocument,o=null==n?void 0:n.defaultView;null==(r=t.wrapperComponent)||r.addEventListener("wheel",t.onWheelPanning,i),null==o||o.addEventListener("mousedown",t.onPanningStart,i),null==o||o.addEventListener("mousemove",t.onPanning,i),null==o||o.addEventListener("mouseup",t.onPanningStop,i),null==n||n.addEventListener("mouseleave",t.clearPanning,i),null==o||o.addEventListener("keyup",t.setKeyUnPressed,i),null==o||o.addEventListener("keydown",t.setKeyPressed,i)},this.cleanupWindowEvents=function(){var e,r,i=H(),n=null==(e=t.wrapperComponent)?void 0:e.ownerDocument,o=null==n?void 0:n.defaultView;null==o||o.removeEventListener("mousedown",t.onPanningStart,i),null==o||o.removeEventListener("mousemove",t.onPanning,i),null==o||o.removeEventListener("mouseup",t.onPanningStop,i),null==n||n.removeEventListener("mouseleave",t.clearPanning,i),null==o||o.removeEventListener("keyup",t.setKeyUnPressed,i),null==o||o.removeEventListener("keydown",t.setKeyPressed,i),document.removeEventListener("mouseleave",t.clearPanning,i),l(t),null==(r=t.observer)||r.disconnect()},this.handleInitializeWrapperEvents=function(e){var r=H();e.addEventListener("wheel",t.onWheelZoom,r),e.addEventListener("dblclick",t.onDoubleClick,r),e.addEventListener("touchstart",t.onTouchPanningStart,r),e.addEventListener("touchmove",t.onTouchPanning,r),e.addEventListener("touchend",t.onTouchPanningStop,r)},this.handleInitialize=function(e,r){var i=!1,n=t.setup.centerOnInit,o=function(e,t){for(var r=0;r<e.length;r++)if(e[r].target===t)return!0;return!1};t.applyTransformation(),t.onInitCallbacks.forEach(function(e){e(U(t))}),t.observer=new ResizeObserver(function(a){if(o(a,e)||o(a,r))if(n&&!i){var s=r.offsetWidth,u=r.offsetHeight;(s>0||u>0)&&(i=!0,t.setCenter())}else l(t),f(t,t.transformState.scale),I(t,0)}),t.observer.observe(e),t.observer.observe(r)},this.onWheelZoom=function(e){t.setup.disabled||!K(t,e)||t.isPressingKeys(t.setup.wheel.activationKeys)&&(en(t,e),eo(t,e),ea(t,e))},this.onWheelPanning=function(e){var r=t.setup,i=r.disabled,n=r.wheel,o=r.panning;if(t.wrapperComponent&&t.contentComponent&&!i&&n.wheelDisabled&&!o.disabled&&o.wheelPanning&&!e.ctrlKey){e.preventDefault(),e.stopPropagation();var a=t.transformState,s=a.positionX,l=a.positionY,u=s-e.deltaX,c=l-e.deltaY,h=o.lockAxisX?s:u,d=o.lockAxisY?l:c,p=t.setup.alignmentAnimation,f=p.sizeX,m=p.sizeY,g=S(t,f),y=S(t,m);(h!==s||d!==l)&&A(t,h,d,g,y)}},this.onPanningStart=function(e){var r=t.setup.disabled,i=t.props.onPanningStart;!r&&v(t,e)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(0!==e.button||t.setup.panning.allowLeftClickPan)&&(1!==e.button||t.setup.panning.allowMiddleClickPan)&&(2!==e.button||t.setup.panning.allowRightClickPan)&&(e.preventDefault(),e.stopPropagation(),l(t),P(t,e),o(U(t),e,i))},this.onPanning=function(e){var r=t.setup.disabled,i=t.props.onPanning;r||!b(t)||t.isPressingKeys(t.setup.panning.activationKeys)&&(e.preventDefault(),e.stopPropagation(),M(t,e.clientX,e.clientY),o(U(t),e,i))},this.onPanningStop=function(e){var r=t.props.onPanningStop;t.isPanning&&(!function(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,r=e.velocity,i=e.wrapperComponent,n=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=null==i?void 0:i.getBoundingClientRect(),s=null==n?void 0:n.getBoundingClientRect(),l=(null==o?void 0:o.width)||0,c=(null==o?void 0:o.height)||0,h=(null==s?void 0:s.width)||0,d=(null==s?void 0:s.height)||0;!t&&r&&(null==r?void 0:r.total)>.1&&(l<h||c<d)?function(e){var t=e.velocity,r=e.bounds,i=e.setup,n=e.wrapperComponent;if(C(e)&&t&&r&&n){var o,s,l,c,h=t.velocityX,d=t.velocityY,p=t.total,f=r.maxPositionX,m=r.minPositionX,g=r.maxPositionY,y=r.minPositionY,v=i.limitToBounds,b=i.alignmentAnimation,_=i.zoomAnimation,x=i.panning,A=x.lockAxisY,w=x.lockAxisX,T=_.animationType,P=b.sizeX,I=b.sizeY,M=b.velocityAlignmentTime,k=Math.max((s=(o=e.setup.velocityAnimation).equalToMove,l=o.animationTime,c=o.sensitivity,s?l*p*c:l),M),O=S(e,P),D=S(e,I),R=O*n.offsetWidth/100,L=D*n.offsetHeight/100,B=f+R,F=m-R,j=g+L,z=y-L,N=e.transformState,G=new Date().getTime();u(e,T,k,function(t){var r=e.transformState,i=r.scale,n=r.positionX,o=r.positionY,s=new Date().getTime()-G,l=1-(0,a[b.animationType])(Math.min(1,s/M)),u=1-t,c=n+h*u,p=o+d*u,_=E(c,N.positionX,n,w,v,m,f,F,B,l),x=E(p,N.positionY,o,A,v,y,g,z,j,l);(n!==c||o!==p)&&e.setTransformState(i,_,x)})}}(e):I(e)}}(t),o(U(t),e,r))},this.onPinchStart=function(e){var r=t.setup.disabled,i=t.props,n=i.onPinchingStart,a=i.onZoomStart;r||J(t,e)&&(el(t,e),l(t),o(U(t),e,n),o(U(t),e,a))},this.onPinch=function(e){var r=t.setup.disabled,i=t.props,n=i.onPinching,a=i.onZoom;r||ee(t)&&(e.preventDefault(),e.stopPropagation(),eu(t,e),o(U(t),e,n),o(U(t),e,a))},this.onPinchStop=function(e){var r=t.props,i=r.onPinchingStop,n=r.onZoomStop;t.pinchStartScale&&(ec(t),o(U(t),e,i),o(U(t),e,n))},this.onTouchPanningStart=function(e){var r=t.setup.disabled,i=t.props.onPanningStart;if(!r&&v(t,e)&&!(t.lastTouch&&new Date-t.lastTouch<200&&1===e.touches.length)){t.lastTouch=+new Date,l(t);var n=e.touches,a=1===n.length,s=2===n.length;a&&(l(t),P(t,e),o(U(t),e,i)),s&&t.onPinchStart(e)}},this.onTouchPanning=function(e){var r=t.setup.disabled,i=t.props.onPanning;if(t.isPanning&&1===e.touches.length){if(r||!b(t))return;e.preventDefault(),e.stopPropagation();var n=e.touches[0];M(t,n.clientX,n.clientY),o(U(t),e,i)}else e.touches.length>1&&t.onPinch(e)},this.onTouchPanningStop=function(e){t.onPanningStop(e),t.onPinchStop(e)},this.onDoubleClick=function(e){t.setup.disabled||ep(t,e)&&function(e,t){var r,i=e.setup,n=e.doubleClickStopEventTimer,a=e.transformState,s=e.contentComponent,l=a.scale,u=e.props,h=u.onZoomStart,d=u.onZoom,p=i.doubleClick,f=p.disabled,m=p.mode,g=p.step,y=p.animationTime,v=p.animationType;if(!f&&!n){if("reset"===m)return ed(e,t);if(!s)return console.error("No ContentComponent found");var b=(r=e.transformState.scale,"toggle"===m?1===r?1:-1:"zoomOut"===m?-1:1),_=z(e,b,g);if(l!==_){o(U(e),t,h);var x=X(t,s,l),A=k(e,_,x.x,x.y);if(!A)return console.error("Error during zoom event. New transformation state was not calculated.");o(U(e),t,d),c(e,A,y,v),eh(e,t)}}}(t,e)},this.clearPanning=function(e){t.isPanning&&t.onPanningStop(e)},this.setKeyPressed=function(e){t.pressedKeys[e.key]=!0},this.setKeyUnPressed=function(e){t.pressedKeys[e.key]=!1},this.isPressingKeys=function(e){return!e.length||!!e.find(function(e){return t.pressedKeys[e]})},this.setTransformState=function(e,r,i){var n=t.props.onTransformed;if(Number.isNaN(e)||Number.isNaN(r)||Number.isNaN(i))console.error("Detected NaN set state values");else{e!==t.transformState.scale&&(t.transformState.previousScale=t.transformState.scale,t.transformState.scale=e),t.transformState.positionX=r,t.transformState.positionY=i,t.applyTransformation();var a=U(t);
107t.onChangeCallbacks.forEach(function(e){return e(a)}),o(a,{scale:e,positionX:r,positionY:i},n)}},this.setCenter=function(){if(t.wrapperComponent&&t.contentComponent){var e=$(t.transformState.scale,t.wrapperComponent,t.contentComponent);t.setTransformState(e.scale,e.positionX,e.positionY)}},this.handleTransformStyles=function(e,r,i){return t.props.customTransform?t.props.customTransform(e,r,i):"translate(".concat(e,"px, ").concat(r,"px) scale(").concat(i,")")},this.applyTransformation=function(){if(t.mounted&&t.contentComponent){var e=t.transformState,r=e.scale,i=e.positionX,n=e.positionY,o=t.handleTransformStyles(i,n,r);t.contentComponent.style.transform=o}},this.getContext=function(){return U(t)},this.onChange=function(e){return t.onChangeCallbacks.has(e)||t.onChangeCallbacks.add(e),function(){t.onChangeCallbacks.delete(e)}},this.onInit=function(e){return t.onInitCallbacks.has(e)||t.onInitCallbacks.add(e),function(){t.onInitCallbacks.delete(e)}},this.init=function(e,r){t.cleanupWindowEvents(),t.wrapperComponent=e,t.contentComponent=r,f(t,t.transformState.scale),t.handleInitializeWrapperEvents(e),t.handleInitialize(e,r),t.initializeWindowEvents(),t.isInitialized=!0,o(U(t),void 0,t.props.onInit)},this.props=e,this.setup=j(this.props),this.transformState=F(this.props)},em=i.createContext(null),eg=i.forwardRef(function(e,t){var r,n,o=(0,i.useRef)(new ef(e)).current,a=(r=e.children,n=V(o),"function"==typeof r?r(n):r);return(0,i.useImperativeHandle)(t,function(){return V(o)},[o]),(0,i.useEffect)(function(){o.update(e)},[o,e]),i.createElement(em.Provider,{value:o},a)});i.forwardRef(function(e,t){var r,n=(0,i.useRef)(null),o=(0,i.useContext)(em);return(0,i.useEffect)(function(){return o.onChange(function(e){n.current&&(n.current.style.transform=o.handleTransformStyles(0,0,1/e.instance.transformState.scale))})},[o]),i.createElement("div",D({},e,{ref:(r=[n,t],function(e){r.forEach(function(t){"function"==typeof t?t(e):null!=t&&(t.current=e)})})}))}),!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"u">typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(`.transform-component-module_wrapper__SPB86 {
108  position: relative;
109  width: -moz-fit-content;
110  width: fit-content;
111  height: -moz-fit-content;
112  height: fit-content;
113  overflow: hidden;
114  -webkit-touch-callout: none; /* iOS Safari */
115  -webkit-user-select: none; /* Safari */
116  -khtml-user-select: none; /* Konqueror HTML */
117  -moz-user-select: none; /* Firefox */
118  -ms-user-select: none; /* Internet Explorer/Edge */
119  user-select: none;
120  margin: 0;
121  padding: 0;
122  transform: translate3d(0, 0, 0);
123}
124.transform-component-module_content__FBWxo {
125  display: flex;
126  flex-wrap: wrap;
127  width: -moz-fit-content;
128  width: fit-content;
129  height: -moz-fit-content;
130  height: fit-content;
131  margin: 0;
132  padding: 0;
133  transform-origin: 0% 0%;
134}
135.transform-component-module_content__FBWxo img {
136  pointer-events: none;
137}
138`);var ey=function(e){var t=e.children,r=e.wrapperClass,n=e.contentClass,o=e.wrapperStyle,a=e.contentStyle,s=e.wrapperProps,l=e.contentProps,u=(0,i.useContext)(em),c=u.init,h=u.cleanupWindowEvents,d=(0,i.useRef)(null),p=(0,i.useRef)(null);return(0,i.useEffect)(function(){var e=d.current,t=p.current;return null!==e&&null!==t&&c&&(null==c||c(e,t)),function(){null==h||h()}},[]),i.createElement("div",D({},void 0===s?{}:s,{ref:d,className:"".concat(B," ").concat("transform-component-module_wrapper__SPB86"," ").concat(void 0===r?"":r),style:o}),i.createElement("div",D({},void 0===l?{}:l,{ref:p,className:"".concat("react-transform-component"," ").concat("transform-component-module_content__FBWxo"," ").concat(void 0===n?"":n),style:a}),t))}},53689(e,t,r){!function(e){"use strict";function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function i(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function n(e,t,r){n.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,r){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function l(e,t,r){var i=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,i),e}function u(e){var t=void 0===e?"undefined":_(e);return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function c(e,t,r,i,h,d,p){h=h||[],p=p||[];var f,m=h.slice(0);if(void 0!==d){if(i){if("function"==typeof i&&i(m,d))return;if("object"===(void 0===i?"undefined":_(i))){if(i.prefilter&&i.prefilter(m,d))return;if(i.normalize){var g=i.normalize(m,d,e,t);g&&(e=g[0],t=g[1])}}}m.push(d)}"regexp"===u(e)&&"regexp"===u(t)&&(e=e.toString(),t=t.toString());var y=void 0===e?"undefined":_(e),v=void 0===t?"undefined":_(t),b="undefined"!==y||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(d),x="undefined"!==v||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(d);if(!b&&x)r(new o(m,t));else if(!x&&b)r(new a(m,e));else if(u(e)!==u(t))r(new n(m,e,t));else if("date"===u(e)&&e-t!=0)r(new n(m,e,t));else if("object"===y&&null!==e&&null!==t)if(p.filter(function(t){return t.lhs===e}).length)e!==t&&r(new n(m,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){for(e.length,f=0;f<e.length;f++)f>=t.length?r(new s(m,f,new a(void 0,e[f]))):c(e[f],t[f],r,i,m,f,p);for(;f<t.length;)r(new s(m,f,new o(void 0,t[f++])))}else{var A=Object.keys(e),w=Object.keys(t);A.forEach(function(n,o){var a=w.indexOf(n);a>=0?(c(e[n],t[n],r,i,m,n,p),w=l(w,a)):c(e[n],void 0,r,i,m,n,p)}
138),w.forEach(function(e){c(void 0,t[e],r,i,m,e,p)})}p.length=p.length-1}else e!==t&&("number"===y&&isNaN(e)&&isNaN(t)||r(new n(m,e,t)))}function h(e,t,r,i){return i=i||[],c(e,t,function(e){e&&i.push(e)},r),i.length?i:void 0}function d(e,t,r){if(e&&t&&r&&r.kind){for(var i=e,n=-1,o=r.path?r.path.length-1:0;++n<o;)void 0===i[r.path[n]]&&(i[r.path[n]]="number"==typeof r.path[n]?[]:{}),i=i[r.path[n]];switch(r.kind){case"A":!function e(t,r,i){if(i.path&&i.path.length){var n,o=t[r],a=i.path.length-1;for(n=0;n<a;n++)o=o[i.path[n]];switch(i.kind){case"A":e(o[i.path[n]],i.index,i.item);break;case"D":delete o[i.path[n]];break;case"E":case"N":o[i.path[n]]=i.rhs}}else switch(i.kind){case"A":e(t[r],i.index,i.item);break;case"D":t=l(t,r);break;case"E":case"N":t[r]=i.rhs}return t}(r.path?i[r.path[n]]:i,r.index,r.item);break;case"D":delete i[r.path[n]];break;case"E":case"N":i[r.path[n]]=r.rhs}}}function p(e,t,r,i){switch(void 0===e?"undefined":_(e)){case"object":return"function"==typeof e[i]?e[i].apply(e,x(r)):e[i];case"function":return e(t);default:return e}}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},S,e),r=t.logger,i=t.stateTransformer,n=t.errorTransformer,o=t.predicate,a=t.logErrors,s=t.diffPredicate;if(void 0===r)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error(`[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:
139// Logger with default options
140import { logger } from 'redux-logger'
141const store = createStore(
142  reducer,
143  applyMiddleware(logger)
144)
145// Or you can create your own logger with custom options http://bit.ly/redux-logger-options
146import createLogger from 'redux-logger'
147const logger = createLogger({
148  // ...options
149});
150const store = createStore(
151  reducer,
152  applyMiddleware(logger)
153)
154`),function(){return function(e){return function(t){return e(t)}}};var l=[];return function(e){var r=e.getState;return function(e){return function(u){if("function"==typeof o&&!o(r,u))return e(u);var c,d,f,m,g,y,_,A,S,T,C,E,P={};l.push(P),P.started=b.now(),P.startedTime=new Date,P.prevState=i(r()),P.action=u;var I=void 0;if(a)try{I=e(u)}catch(e){P.error=n(e)}else I=e(u);P.took=b.now()-P.started,P.nextState=i(r());var M=t.diff&&"function"==typeof s?s(r,u):t.diff;if(m=(c=Object.assign({},t,{diff:M})).logger,g=c.actionTransformer,_=void 0===(y=c.titleFormatter)?(d=c.timestamp,f=c.duration,function(e,t,r){var i=["action"];return i.push("%c"+String(e.type)),d&&i.push("%c@ "+t),f&&i.push("%c(in "+r.toFixed(2)+" ms)"),i.join(" ")}):y,A=c.collapsed,S=c.colors,T=c.level,C=c.diff,E=void 0===c.titleFormatter,l.forEach(function(e,t){var r=e.started,i=e.startedTime,n=e.action,o=e.prevState,a=e.error,s=e.took,u=e.nextState,d=l[t+1];d&&(u=d.prevState,s=d.started-r);var f=g(n),y="function"==typeof A?A(function(){return u},n,e):A,b=v(i),P=S.title?"color: "+S.title(f)+";":"",I=["color: gray; font-weight: lighter;"];I.push(P),c.timestamp&&I.push("color: gray; font-weight: lighter;"),c.duration&&I.push("color: gray; font-weight: lighter;");var M=_(f,b,s);try{y?S.title&&E?m.groupCollapsed.apply(m,["%c "+M].concat(I)):m.groupCollapsed(M):S.title&&E?m.group.apply(m,["%c "+M].concat(I)):m.group(M)}catch(e){m.log(M)}var k=p(T,f,[o],"prevState"),O=p(T,f,[f],"action"),D=p(T,f,[a,o],"error"),R=p(T,f,[u],"nextState");if(k)if(S.prevState){var L="color: "+S.prevState(o)+"; font-weight: bold";m[k]("%c prev state",L,o)}else m[k]("prev state",o);if(O)if(S.action){var B="color: "+S.action(f)+"; font-weight: bold";m[O]("%c action    ",B,f)}else m[O]("action    ",f);if(a&&D)if(S.error){var F="color: "+S.error(a,o)+"; font-weight: bold;";m[D]("%c error     ",F,a)}else m[D]("error     ",a);if(R)if(S.nextState){var j="color: "+S.nextState(u)+"; font-weight: bold";m[R]("%c next state",j,u)}else m[R]("next state",u);C&&function(e,t,r,i){var n=h(e,t);try{i?r.groupCollapsed("diff"):r.group("diff")}catch(e){r.log("diff")}n?n.forEach(function(e){var t=e.kind,i=function(e){var t=e.kind,r=e.path,i=e.lhs,n=e.rhs,o=e.index,a=e.item;switch(t){case"E":return[r.join("."),i,"→",n];case"N":return[r.join("."),n];case"D":return[r.join(".")];case"A":return[r.join(".")+"["+o+"]",a];default:return[]}}(e);r.log.apply(r,["%c "+w[t].text,"color: "+w[t].color+"; font-weight: bold"].concat(x(i)))}):r.log("—— no diff ——");try{r.groupEnd()}catch(e){r.log("—— diff end —— ")}}(o,u,m,y);try{m.groupEnd()}catch(e){m.log("—— log end ——")}}),l.length=0,P.error)throw P.error;return I}}}}var m,g,y=function(e,t){return Array(t-e.toString().length+1).join("0")+e},v=function(e){return y(e.getHours(),2)+":"+y(e.getMinutes(),2)+":"+y(e.getSeconds(),2)+"."+y(e.getMilliseconds(),3)},b="u">typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},A=[];(g=(m="object"===(void 0===r.g?"undefined":_(r.g))&&r.g?r.g:"u">typeof window?window:{}).DeepDiff)&&A.push(function(){void 0!==g&&m.DeepDiff===h&&(m.DeepDiff=g,g=void 0)}),t(n,i),t(o,i),t(a,i),t(s,i),Object.defineProperties(h,{diff:{value:h,enumerable:!0},observableDiff:{value:c,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&c(e,t,function(i){r&&!r(e,t,i)||d(e,t,i)})},enumerable:!0},applyChange:{value:d,enumerable:!0},revertChange:{value:function(e,t,r){if(e&&t&&r&&r.kind){var i,n,o=e;for(n=r.path.length-1,i=0;i<n;i++)void 0===o[r.path[i]]&&(o[r.path[i]]={}),o=o[r.path[i]];switch(r.kind){case"A":!function e(t,r,i){if(i.path&&i.path.length){var n,o=t[r],a=i.path.length-1;for(n=0;n<a;n++)o=o[i.path[n]];switch(i.kind){case"A":e(o[i.path[n]],i.index,i.item);break;case"D":case"E":o[i.path[n]]=i.lhs;break;case"N":delete o[i.path[n]]}}else switch(i.kind){case"A":e(t[r],i.index,i.item);break;case"D":case"E":t[r]=i.lhs;break;case"N":t=l(t,r)}return t}(o[r.path[i]],r.index,r.item);break;case"D":case"E":o[r.path[i]]=r.lhs;break;case"N":delete o[r.path[i]]}}},enumerable:!0},isConflict:{value:function(){return void 0!==g},enumerable:!0},noConflict:{value:function(){return A&&(A.forEach(function(e){e()}),A=null),h},enumerable:!0}});var w={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},S={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(e){return e},actionTransformer:function(e){return e},errorTransformer:function(e){return e},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
154,t=e.dispatch,r=e.getState;return"function"==typeof t||"function"==typeof r?f()({dispatch:t,getState:r}):void console.error(`
155[redux-logger v3] BREAKING CHANGE
156[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.
157[redux-logger v3] Change
158[redux-logger v3] import createLogger from 'redux-logger'
159[redux-logger v3] to
160[redux-logger v3] import { createLogger } from 'redux-logger'
161`)};e.defaults=S,e.createLogger=f,e.logger=T,e.default=T,Object.defineProperty(e,"__esModule",{value:!0})}(t)},42128(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r="@@reduxTimeout/ADD_TIMEOUT",i="@@reduxTimeout/REMOVE_TIMEOUT",n="@@reduxTimeout/WATCH_ALL";e.exports={reduxTimeout:function(){var e={};return function(o){return function(o){return function(a){var s=function(t){var r=e[t];r&&(clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.toCall,r.timeout))},l=function(t){var r=e[t];r&&(clearTimeout(r.timeoutId),delete e[t])};return a.type===i&&a.payload.action&&(a.payload.action instanceof Array?a.payload.action.forEach(function(e){l(e)}):l(a.payload.action)),a.type===r&&a.payload.action&&(a.payload,!function(r){var i=r.timeout,n=r.action,o=r.toCall;if("number"!=typeof i)return Error("Expected timeout to be a number");if("string"!=typeof n&&!(n instanceof Array))return Error("Expected action to be a string or an array");if((void 0===o?"undefined":t(o))!=="object"&&"function"!=typeof o)return Error("Expected toCall to be an object or a function that would return an object");var a={timeout:i,toCall:o};a.timeoutId=setTimeout(a.toCall,a.timeout);var s=function(t){if("string"!=typeof t)return Error("Expected action to be a string");e[t]=a};n instanceof Array?n.forEach(function(e){s(e)}):s(n)}(a.payload)),s(a.type),s(n),o(a)}}}},addTimeout:function(e,t,i){return{type:r,payload:{timeout:e,action:t,toCall:i}}},removeTimeout:function(e){return{type:i,payload:{action:e}}},WATCH_ALL:n}},35213(e,t,r){"use strict";r.d(t,{Tw:()=>E,HY:()=>S,Zz:()=>T,y$:()=>w});var i,n,o="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,a="object"==typeof self&&self&&self.Object===Object&&self,s=(o||a||Function("return this")()).Symbol,l=Object.prototype,u=l.hasOwnProperty,c=l.toString,h=s?s.toStringTag:void 0;let d=function(e){var t=u.call(e,h),r=e[h];try{e[h]=void 0;var i=!0}catch(e){}var n=c.call(e);return i&&(t?e[h]=r:delete e[h]),n};var p=Object.prototype.toString,f=s?s.toStringTag:void 0,m=(i=Object.getPrototypeOf,n=Object,function(e){return i(n(e))}),g=Object.prototype,y=Function.prototype.toString,v=g.hasOwnProperty,b=y.call(Object);let _=function(e){if(null==e||"object"!=typeof e||"[object Object]"!=(null==(t=e)?void 0===t?"[object Undefined]":"[object Null]":f&&f in Object(t)?d(t):p.call(t)))return!1;var t,r=m(e);if(null===r)return!0;var i=v.call(r,"constructor")&&r.constructor;return"function"==typeof i&&i instanceof i&&y.call(i)==b};var x=r(24963),A="@@redux/INIT";function w(e,t,r){if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error("Expected the enhancer to be a function.");return r(w)(e,t)}if("function"!=typeof e)throw Error("Expected the reducer to be a function.");var i,n=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(e){if("function"!=typeof e)throw Error("Expected listener to be a function.");var t=!0;return u(),s.push(e),function(){if(t){t=!1,u();var r=s.indexOf(e);s.splice(r,1)}}}function h(e){if(!_(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw Error("Reducers may not dispatch actions.");try{l=!0,o=n(o,e)}finally{l=!1}for(var t=a=s,r=0;r<t.length;r++)(0,t[r])();return e}return h({type:A}),(i={dispatch:h,subscribe:c,getState:function(){return o},replaceReducer:function(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");n=e,h({type:A})}})[x.A]=function(){var e;return(e={subscribe:function(e){if("object"!=typeof e)throw TypeError("Expected the observer to be an object.");function t(){e.next&&e.next(o)}return t(),{unsubscribe:c(t)}}})[x.A]=function(){return this},e},i}function S(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];"function"==typeof e[n]&&(r[n]=e[n])}var o=Object.keys(r),a=void 0;try{Object.keys(r).forEach(function(e){var t=r[e];if(void 0===t(void 0,{type:A}))throw Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===t(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+A+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}catch(e){a=e}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(a)throw a;for(var i=!1,n={},s=0;s<o.length;s++){var l=o[s],u=r[l],c=e[l],h=u(c,t);if(void 0===h)throw Error(function(e,t){var r=t&&t.type;return"Given action "+(r&&'"'+r.toString()+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}(l,t));n[l]=h,i=i||h!==c}return i?n:e}}function T(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}var C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e};function E(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(r,i,n){var o=e(r,i,n),a=o.dispatch,s=[],l={getState:o.getState,dispatch:function(e){return a(e)}};return s=t.map(function(e){return e(l)}),a=T.apply(void 0,s)(o.dispatch),C({},o,{dispatch:a})}}}},76897(e,t,r){"use strict";var i,n=r(15122),o=r(45121),a=r(62330);e.exports=function(e){var t=this.data();function r(e,r){t[e]?t[e].push(r):t[e]=[r]}!i&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(i=!0,console.warn("[remark-gfm] Warning: please upgrade to remark 13 to use this plugin")),r("micromarkExtensions",n(e)),r("fromMarkdownExtensions",o),r("toMarkdownExtensions",a(e))}},3189(e,t,r){"use strict";e.exports=function(e){var t=this;this.Parser=function(r){return i(r,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var i=r(55685)},96210(e){"use strict";var t,r="";e.exports=function(e,i){if("string"!=typeof e)throw TypeError("expected a string");if(1===i)return e;if(2===i)return e+e;var n=e.length*i;if(t!==e||void 0===t)t=e,r="";else if(r.length>=n)return r.substr(0,n);for(;n>r.length&&i>1;)1&i&&(r+=e),i>>=1,e+=e;return r+=e,r=r.substr(0,n)}},76628(e,t){"use strict";function r(e,t){return e===t}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,i=null,n=null;return function(){return!function(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var i=t.length,n=0;n<i;n++)if(!e(t[n],r[n]))return!1;return!0}(t,i,arguments)&&(n=e.apply(null,arguments)),i=arguments,n}}t.Mz=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];var a=0,s=n.pop(),l=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e}))throw Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+t.map(function(e){return typeof e}).join(", ")+"]");return t}(n),u=e.apply(void 0,[function(){return a++,s.apply(null,arguments)}].concat(r)),c=i(function(){for(var e=[],t=l.length,r=0;r<t;r++)e.push(l[r].apply(null,arguments));return u.apply(null,e)});return c.resultFunc=s,c.recomputations=function(){return a},c.resetRecomputations=function(){return a=0},c}}(i)},96816(e,t,r){"use strict";r.d(t,{Mz:()=>
161o});var i="NOT_FOUND",n=function(e,t){return e===t},o=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return function(){for(var t,i=arguments.length,n=Array(i),o=0;o<i;o++)n[o]=arguments[o];var a=0,s={memoizeOptions:void 0},l=n.pop();if("object"==typeof l&&(s=l,l=n.pop()),"function"!=typeof l)throw Error("createSelector expects an output function after the inputs, but received: ["+typeof l+"]");var u=s.memoizeOptions,c=void 0===u?r:u,h=Array.isArray(c)?c:[c],d=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e}))throw Error("createSelector expects all input-selectors to be functions, but received the following types: ["+t.map(function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e}).join(", ")+"]");return t}(n),p=e.apply(void 0,[function(){return a++,l.apply(null,arguments)}].concat(h)),f=e(function(){for(var e=[],r=d.length,i=0;i<r;i++)e.push(d[i].apply(null,arguments));return t=p.apply(null,e)});return Object.assign(f,{resultFunc:l,memoizedResultFunc:p,dependencies:d,lastResult:function(){return t},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),f}}(function(e,t){var r,o,a="object"==typeof t?t:{equalityCheck:t},s=a.equalityCheck,l=a.maxSize,u=void 0===l?1:l,c=a.resultEqualityCheck,h=(r=void 0===s?n:s,function(e,t){if(null===e||null===t||e.length!==t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(!r(e[n],t[n]))return!1;return!0}),d=1===u?{get:function(e){return o&&h(o.key,e)?o.value:i},put:function(e,t){o={key:e,value:t}},getEntries:function(){return o?[o]:[]},clear:function(){o=void 0}}:function(e,t){var r=[];function n(e){var n=r.findIndex(function(r){return t(e,r.key)});if(n>-1){var o=r[n];return n>0&&(r.splice(n,1),r.unshift(o)),o.value}return i}return{get:n,put:function(t,o){n(t)===i&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(u,h);function p(){var t=d.get(arguments);if(t===i){if(t=e.apply(null,arguments),c){var r=d.getEntries().find(function(e){return c(e.value,t)});r&&(t=r.value)}d.put(arguments,t)}return t}return p.clearCache=function(){return d.clear()},p})},87922(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>A});var i=function(){if("u">typeof Map)return Map;function e(e,t){var r=-1;return e.some(function(e,i){return e[0]===t&&(r=i,!0)}),r}function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(t,r){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,i=e(r,t);~i&&r.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,i=this.__entries__;r<i.length;r++){var n=i[r];e.call(t,n[1],n[0])}},t}(),n="u">typeof window&&"u">typeof document&&window.document===document,o=void 0!==r.g&&r.g.Math===Math?r.g:"u">typeof self&&self.Math===Math?self:"u">typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},s=["top","right","bottom","left","width","height","size","weight"],l="u">typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,r=!1,i=0;function n(){t&&(t=!1,e()),r&&s()}function o(){a(n)}function s(){var e=Date.now();if(t){if(e-i<2)return;r=!0}else t=!0,r=!1,setTimeout(o,20);i=e}return s}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;s.some(function(e){return!!~r.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=ne
161w e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var r=0,i=Object.keys(t);r<i.length;r++){var n=i[r];Object.defineProperty(e,n,{value:t[n],enumerable:!1,writable:!1,configurable:!0})}return e},h=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},d=g(0,0,0,0);function p(e){return parseFloat(e)||0}function f(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(t,r){return t+p(e["border-"+r+"-width"])},0)}var m="u">typeof SVGGraphicsElement?function(e){return e instanceof h(e).SVGGraphicsElement}:function(e){return e instanceof h(e).SVGElement&&"function"==typeof e.getBBox};function g(e,t,r,i){return{x:e,y:t,width:r,height:i}}var y=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!n)return d;if(m(e)){var t;return g(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return d;var i=h(e).getComputedStyle(e),n=function(e){for(var t={},r=0,i=["top","right","bottom","left"];r<i.length;r++){var n=i[r],o=e["padding-"+n];t[n]=p(o)}return t}(i),o=n.left+n.right,a=n.top+n.bottom,s=p(i.width),l=p(i.height);if("border-box"===i.boxSizing&&(Math.round(s+o)!==t&&(s-=f(i,"left","right")+o),Math.round(l+a)!==r&&(l-=f(i,"top","bottom")+a)),e!==h(e).document.documentElement){var u=Math.round(s+o)-t,c=Math.round(l+a)-r;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return g(n.left,n.top,s,l)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),v=function(e,t){var r,i,n,o,a,s=(r=t.x,i=t.y,n=t.width,o=t.height,c(a=Object.create(("u">typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:r,y:i,width:n,height:o,top:i,right:r+n,bottom:o+i,left:r}),a);c(this,{target:e,contentRect:s})},b=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new i,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof h(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof h(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new v(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),_="u">typeof WeakMap?new WeakMap:new i,x=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var r=new b(t,u.getInstance(),this);_.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){x.prototype[e]=function(){var t;return(t=_.get(this))[e].apply(t,arguments)}});let A=void 0!==o.ResizeObserver?o.ResizeObserver:x},95347(e,t,r){let i=r(14547),n=r(65962),{isPlainObject:o}=r(1126),a=r(74579),s=r(5584),{parse:l}=r(65908),{naughtyHref:u}=r(14971),c=["img","audio","video","picture","svg","object","map","iframe","embed"],h=["script","style"],d=["animate","animatecolor","animatemotion","animatetransform","set"],p=["href"];function f(e,t){e&&Object.keys(e).forEach(function(r){t(e[r],r)})}function m(e,t){return({}).hasOwnProperty.call(e,t)}function g(e,t){let r=[];return f(e,function(e){t(e)&&r.push(e)}),r}e.exports=v;let y=/^[^\0\t\n\f\r /<=>]+$/;function v(e,t,r){let _,x,A,w,S,T,C,E,P;if(null==e)return"";"number"==typeof e&&(e=e.toString());let I="",M="";function k(e,t){let r=this;this.tag=e,this.attribs=t||{},this.tagPosition=I.length,this.text="",this.openingTagLength=0,this.mediaChildren=[],this.updateParentNodeText=function(){if(S.length){let e=S[S.length-1];e.text+=r.text}},this.updateParentNodeMediaChildren=function(){S.length&&c.includes(this.tag)&&S[S.length-1].mediaChildren.push(this.tag)}}(t=Object.assign({},v.defaults,t)).parser=Object.assign({},b,t.parser);let O=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};h.forEach(function(e){O(e)&&!t.allowVulnerableTags&&console.warn(`
162
163⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently
164vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
165Or, to disable this warning, add the \`allowVulnerableTags\` option
166and ensure you are accounting for this risk.
167
168`)});let D=t.nonTextTags||["script","style","textarea","option","xmp"];t.allowedAttributes&&(_={},x={},f(t.allowedAttributes,function(e,t){_[t]=[];let r=[];e.forEach(function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(n(e).replace(/\\\*/g,".*")):_[t].push(e)}),r.length&&(x[t]=RegExp("^("+r.join("|")+")$"))}));let R={},L={},B={};
168f(t.allowedClasses,function(e,t){if(_&&(m(_,t)||(_[t]=[]),_[t].push("class")),R[t]=e,Array.isArray(e)){let r=[];R[t]=[],B[t]=[],e.forEach(function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(n(e).replace(/\\\*/g,".*")):e instanceof RegExp?B[t].push(e):R[t].push(e)}),r.length&&(L[t]=RegExp("^("+r.join("|")+")$"))}});let F={};f(t.transformTags,function(e,t){let r;"function"==typeof e?r=e:"string"==typeof e&&(r=v.simpleTransform(e)),"*"===t?A=r:F[t]=r});let j=!1;N();let z=new i.Parser({onopentag:function(e,r){let i;if(t.onOpenTag&&t.onOpenTag(e,r),t.enforceHtmlBoundary&&"html"===e&&N(),E)return void P++;let n=new k(e,r);S.push(n);let u=!1,c=!!n.text;if(m(F,e)&&(n.attribs=r=(i=F[e](e,r)).attribs,void 0!==i.text&&(n.innerText=i.text),e!==i.tagName&&(n.name=e=i.tagName,C[w]=i.tagName)),A&&(n.attribs=r=(i=A(e,r)).attribs,e!==i.tagName&&(n.name=e=i.tagName,C[w]=i.tagName)),(!O(e)||function(e,r){if(-1===d.indexOf(e.toLowerCase()))return!1;let i=t.allowedSchemesAppliedToAttributes||[];return Object.keys(r||{}).some(function(e){if("attributename"!==e.toLowerCase())return!1;let t=(r[e]||"").trim().toLowerCase(),n=t.slice(t.lastIndexOf(":")+1);return -1!==p.indexOf(n)||-1!==i.indexOf(t)||-1!==i.indexOf(n)})}(e,r)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(let t in e)if(m(e,t))return!1;return!0}(T)||null!=t.nestingLimit&&w>=t.nestingLimit)&&(u=!0,T[w]=!0,("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)&&-1!==D.indexOf(e)&&(E=!0,P=1)),w++,u){if("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode){if(n.innerText&&!c){let r=G(n.innerText);t.textFilter?I+=t.textFilter(r,e):I+=r,j=!0}return}M=I,I=""}if(I+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(n.innerText=""),u&&("escape"===t.disallowedTagsMode||"recursiveEscape"===t.disallowedTagsMode)&&t.preserveEscapedAttributes?f(r,function(e,t){I+=" "+t+'="'+G(e||"",!0)+'"'}):(!_||m(_,e)||_["*"])&&f(r,function(r,i){if(!y.test(i)||""===r&&!t.allowedEmptyAttributes.includes(i)&&(t.nonBooleanAttributes.includes(i)||t.nonBooleanAttributes.includes("*")))return void delete n.attribs[i];let u=!1;if(!_||m(_,e)&&-1!==_[e].indexOf(i)||_["*"]&&-1!==_["*"].indexOf(i)||m(x,e)&&x[e].test(i)||x["*"]&&x["*"].test(i))u=!0;else if(_&&_[e]){for(let t of _[e])if(o(t)&&t.name&&t.name===i){u=!0;let e="";if(!0===t.multiple)for(let i of r.split(" "))-1!==t.values.indexOf(i)&&(""===e?e=i:e+=" "+i);else t.values.indexOf(r)>=0&&(e=r);r=e}}if(u){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&V(e,r))return void delete n.attribs[i];if("script"===e&&"src"===i){let e=!0;try{let i=U(r);if(t.allowedScriptHostnames||t.allowedScriptDomains){let r=(t.allowedScriptHostnames||[]).find(function(e){return e===i.url.hostname}),n=(t.allowedScriptDomains||[]).find(function(e){return i.url.hostname===e||i.url.hostname.endsWith(`.${e}`)});e=r||n}}catch(t){e=!1}if(!e)return void delete n.attribs[i]}if("iframe"===e&&"src"===i){let e=!0;try{let i=U(r);if(i.isRelativeUrl)e=m(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){let r=(t.allowedIframeHostnames||[]).find(function(e){return e===i.url.hostname}),n=(t.allowedIframeDomains||[]).find(function(e){return i.url.hostname===e||i.url.hostname.endsWith(`.${e}`)});e=r||n}}catch(t){e=!1}if(!e)return void delete n.attribs[i]}if("srcset"===i||"imagesrcset"===i)try{let e=s(r);if(e.forEach(function(e){V(i,e.url)&&(e.evil=!0)}
168),!(e=g(e,function(e){return!e.evil})).length)return void delete n.attribs[i];r=g(e,function(e){return!e.evil}).map(function(e){if(!e.url)throw Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", "),n.attribs[i]=r}catch(e){delete n.attribs[i];return}if("class"===i){let t=R[e],o=R["*"],s=L[e],l=B[e],u=B["*"],c=[s,L["*"]].concat(l,u).filter(function(e){return e});if(!(r=t&&o?H(r,a(t,o),c):H(r,t||o,c)).length)return void delete n.attribs[i]}if("style"===i){if(t.parseStyleAttributes)try{let o=l(e+" {"+r+"}",{map:!1});if(r=(function(e,t){let r;if(!t)return e;let i=e.nodes[0];return(r=t[i.selector]&&t["*"]?a(t[i.selector],t["*"]):t[i.selector]||t["*"])&&(e.nodes[0].nodes=i.nodes.reduce(function(e,t){return m(r,t.prop)&&r[t.prop].some(function(e){return e.test(t.value)})&&e.push(t),e},[])),e})(o,t.allowedStyles).nodes[0].nodes.reduce(function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e},[]).join(";"),0===r.length)return void delete n.attribs[i]}catch(t){"u">typeof window&&console.warn('Failed to parse "'+e+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),delete n.attribs[i];return}else if(t.allowedStyles)throw Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}I+=" "+i,r&&r.length?I+='="'+G(r,!0)+'"':t.allowedEmptyAttributes.includes(i)&&(I+='=""')}else delete n.attribs[i]}),-1!==t.selfClosing.indexOf(e))I+=" />";else if(I+=">",n.innerText&&!c){let r=G(n.innerText);t.textFilter?I+=t.textFilter(r,e):I+=r,j=!0}u&&(I=M+G(I),M=""),n.openingTagLength=I.length-n.tagPosition},ontext:function(e){let r;if(E)return;let i=S[S.length-1];if(i&&(r=i.tag,e=void 0!==i.innerText?i.innerText:e),"completelyDiscard"!==t.disallowedTagsMode||O(r)){if(r&&O(r)&&("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)&&("script"===r||"style"===r))I+=e;else if(r&&O(r)&&("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)&&("textarea"===r||"xmp"===r))"xmp"===r?I+=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"):I+=G(e,!1);else if(!j){let i=G(e,!1);t.textFilter?I+=t.textFilter(i,r):I+=i}}else e="";if(S.length){let t=S[S.length-1];t.text+=e}},onclosetag:function(e,r){if(t.onCloseTag&&t.onCloseTag(e,r),E){if
168(--P)return;E=!1}let i=S.pop();if(!i)return;if(i.tag!==e)return void S.push(i);E=!!t.enforceHtmlBoundary&&"html"===e;let n=T[--w];if(n){if(delete T[w],"discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)return void i.updateParentNodeText();M=I,I=""}if(C[w]&&(e=C[w],delete C[w]),t.exclusiveFilter){let e=t.exclusiveFilter(i);if("excludeTag"===e){n&&(I=M,M=""),I=I.substring(0,i.tagPosition)+I.substring(i.tagPosition+i.openingTagLength);return}if(e){I=I.substring(0,i.tagPosition);return}}if(i.updateParentNodeMediaChildren(),i.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||r&&!O(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0){n&&(I=M,M="");return}I+="</"+e+">",n&&(I=M+G(I),M=""),j=!1}},t.parser);if(z.write(e),z.end(),"escape"===t.disallowedTagsMode||"recursiveEscape"===t.disallowedTagsMode){let t=z.endIndex;if(null!=t&&t>=0&&t<e.length){let r=e.substring(t);I+=G(r)}else(null==t||t<0)&&e.length>0&&""===I&&(I=G(e))}return I;function N(){I="",w=0,S=[],T={},C={},E=!1,P=0}function G(e,r){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r&&(e=e.replace(/"/g,"&quot;"))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r&&(e=e.replace(/"/g,"&quot;")),e}function V(e,r){return u(r,{allowedSchemes:m(t.allowedSchemesByTag,e)?t.allowedSchemesByTag[e]:t.allowedSchemes||[],allowProtocolRelative:t.allowProtocolRelative})}function U(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;let r=new URL(e,t);return{isRelativeUrl:r&&"relative-site"===r.hostname&&"relative:"===r.protocol,url:r}}function H(e,t,r){return t?(e=e.split(/\s+/)).filter(function(e){return -1!==t.indexOf(e)||r.some(function(t){return t.test(e)})}).join(" "):e}}let b={decodeEntities:!0};v.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","on
168pause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta","col"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite","action","formaction","data","xlink:href","poster","background","ping","longdesc","usemap","codebase","classid","archive","profile","manifest","itemid","dynsrc","lowsrc"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1},v.simpleTransform=function(e,t,r){return r=void 0===r||r,t=t||{},function(i,n){let o;if(r)for(o in t)n[o]=t[o];else n=t;return{tagName:e,attribs:n}}}},75551(e,t){"use strict";if("object"==typeof performance&&"function"==typeof performance.now){var r,i,n,o,a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}if("u"<typeof window||"function"!=typeof MessageChannel){var u=null,c=null,h=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(h,0),e}};r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(h,0))},i=function(e,t){c=setTimeout(e,t)},n=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("u">typeof console){var f=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof f&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,g=null,y=-1,v=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var _=new MessageChannel,x=_.port2;_.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();b=e+v;try{g(!0,e)?x.postMessage(null):(m=!1,g=null)}catch(e){throw x.postMessage(null),e}}else m=!1},r=function(e){g=e,m||(m=!0,x.postMessage(null))},i=function(e,r){y=d(function(){e(t.unstable_now())},r)},n=function(){p(y),y=-1}}function A(e,t){var r=e.length;for(e.push(t);;){var i=r-1>>>1,n=e[i];if(void 0!==n&&0<T(n,t))e[i]=t,e[r]=n,r=i;else break}}function w(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var r=e.pop();if(r!==t){e[0]=r;for(var i=0,n=e.length;i<n;){var o=2*(i+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>T(a,r))void 0!==l&&0>T(l,a)?(e[i]=l,e[s]=r,i=s):(e[i]=a,e[o]=r,i=o);else if(void 0!==l&&0>T(l,r))e[i]=l,e[s]=r,i=s;else break}}return t}return null}function T(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}var C=[],E=[],P=1,I=null,M=3,k=!1,O=!1,D=!1;function R(e){for(var t=w(E);null!==t;){if(null===t.callback)S(E);else if(t.startTime<=e)S(E),t.sortIndex=t.expirationTime,A(C,t);else break;t=w(E)}}function L(e){if(D=!1,R(e),!O)if(null!==w(C))O=!0,r(B);else{var t=w(E);null!==t&&i(L,t.startTime-e)}}function B(e,r){O=!1,D&&(D=!1,n()),k=!0;var o=M;try{for(R(r),I=w(C);null!==I&&(!(I.expirationTime>r)||e&&!t.unstable_shouldYield());){var a=I.callback;if("function"==typeof a){I.callback=null,M=I.priorityLevel;var s=a(I.expirationTime<=r);r=t.unstable_now(),"function"==typeof s?I.callback=s:I===w(C)&&S(C),R(r)}else S(C);I=w(C)}if(null!==I)var l=!0;else{var u=w(E);null!==u&&i(L,u.startTime-r),l=!1}return l}finally{I=null,M=o,k=!1}}var F=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){O||k||(O=!0,r(B))},t.unstable_getCurrentPriorityLevel=function(){return M},t.unstable_getFirstCallbackNode=function(){return w(C)},t.unstable_next=function(e){switch(M){case 1:case 2:case 3:var t=3;break;default:t=M}var r=M;M=t;try{return e()}finally{M=r}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=M;M=e;try{return t()}finally{M=r}},t.unstable_scheduleCallback=function(e,o,a){var s=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=0x3fffffff;break;case 4:l=1e4;break;default:l=5e3}return l=a+l,e={id:P++,callback:o,priorityLevel:e,startTime:a,expirationTime:l,sortIndex:-1},a>s?(e.sortIndex=a,A(E,e),null===w(C)&&e===w(E)&&(D?n():D=!0,i(L,a-s))):(e.sortIndex=l,A(C,e),O||k||(O=!0,r(B))),e},t.unstable_wrapCallback=function(e){var t=M;return function(){var r=M;M=t;try{return e.apply(this,arguments)}finally{M=r}}}},21766(e,t,r){"use strict";e.exports=r(75551)},43902(e,t,r){"use strict";var i=r(78311),n=r(71102),o=function(e,t,r){for(var i,n=e;null!=(i=n.next);n=i)if(i.key===t)return n.next=i.next,r||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var r=o(e,t);return r&&r.value}},s=function(e,t,r){var i=o(e,t);i?i.value=r:e.next={key:t,next:e.next,value:r}},l=function(e,t){if(e)return o(e,t,!0)};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){var r=l(e,t);return r&&e&&!e.next&&(e=void 0),!!r},get:function(t){return a(e,t)},has:function(t){var r;return!!(r=e)&&!!o(r,t)},set:function(t,r){e||(e={next:void 0}),s(e,t,r)}};return t}},84566(e,t,r){"use strict";
168var i=r(49336),n=r(98801),o=r(78311),a=r(71102),s=i("%Map%",!0),l=n("Map.prototype.get",!0),u=n("Map.prototype.set",!0),c=n("Map.prototype.has",!0),h=n("Map.prototype.delete",!0),d=n("Map.prototype.size",!0);e.exports=!!s&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a("Side channel does not contain "+o(e))},delete:function(t){if(e){var r=h(e,t);return 0===d(e)&&(e=void 0),r}return!1},get:function(t){if(e)return l(e,t)},has:function(t){return!!e&&c(e,t)},set:function(t,r){e||(e=new s),u(e,t,r)}};return t}},53635(e,t,r){"use strict";var i=r(49336),n=r(98801),o=r(78311),a=r(84566),s=r(71102),l=i("%WeakMap%",!0),u=n("WeakMap.prototype.get",!0),c=n("WeakMap.prototype.set",!0),h=n("WeakMap.prototype.has",!0),d=n("WeakMap.prototype.delete",!0);e.exports=l?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+o(e))},delete:function(r){if(l&&r&&("object"==typeof r||"function"==typeof r)){if(e)return d(e,r)}else if(a&&t)return t.delete(r);return!1},get:function(r){return l&&r&&("object"==typeof r||"function"==typeof r)&&e?u(e,r):t&&t.get(r)},has:function(r){return l&&r&&("object"==typeof r||"function"==typeof r)&&e?h(e,r):!!t&&t.has(r)},set:function(r,i){l&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new l),c(e,r,i)):a&&(t||(t=a()),t.set(r,i))}};return r}:a},28513(e,t,r){"use strict";var i=r(71102),n=r(78311),o=r(43902),a=r(84566),s=r(53635)||a||o;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+(e&&Object(e)===e?"the given object key":n(e)))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=s()),e.set(t,r)}};return t}},1047(e){e.exports=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}).toLowerCase()}},15753(e,t,r){let i,n;var o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;let h=r(18673);n=null!=(i=h)?o(u(i)):{},h=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,n=l(t),o=0,u=n.length;o<u;o++)i=n[o],c.call(e,i)||void 0===i||a(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=s(t,i))||r.enumerable});return e})(i&&i.__esModule?n:a(n,"default",{value:i,enumerable:!0}),i);let d=/^--[a-zA-Z0-9_-]+$/,p=/-([a-z])/g,f=/^[^-]+$/,m=/^-(webkit|moz|ms|o|khtml)-/,g=/^-(ms)-/,y=(e,t)=>t.toUpperCase(),v=(e,t)=>`${t}-`;e.exports=function(e,t){let r={};return e&&"string"==typeof e&&(0,h.default)(e,(e,i)=>{e&&i&&(r[((e,t={})=>{let r;return!(r=e)||f.test(r)||d.test(r)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(g,v):e.replace(m,v)).replace(p,y))})(e,t)]=i)}),r}},18673(e,t,r){let i,n;var o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;let h=r(62122);n=null!=(i=h)?o(u(i)):{},h=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,n=l(t),o=0,u=n.length;o<u;o++)i=n[o],c.call(e,i)||void 0===i||a(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=s(t,i))||r.enumerable});return e})(i&&i.__esModule?n:a(n,"default",{value:i,enumerable:!0}),i),e.exports=function(e,t){let r=null;if(!e||"string"!=typeof e)return r;let i=(0,h.default)(e),n="function"==typeof t;return i.forEach(e=>{if("declaration"!==e.type)return;let{property:i,value:o}=e;n?t(i,o,e):o&&((r=r??{})[i]=o)}),r}},24963(e,t,r){"use strict";var i,n;r.d(t,{A:()=>o}),e=r.hmd(e);let o=("function"==typeof(n=("u">typeof self?self:"u">typeof window?window:void 0!==r.g?r.g:e).Symbol)?n.observable?i=n.observable:(i=n("observable"),n.observable=i):i="@@observable",i)},67678(e,t,r){"use strict";var i=r(57908);e.exports=o,o.wrap=i;var n=[].slice;function o(){var e=[],t={};return t.run=function(){var t=-1,r=n.call(arguments,0,-1),o=arguments[arguments.length-1];if("function"!=typeof o)throw Error("Expected function as last argument, not "+o);function a(s){var l=e[++t],u=n.call(arguments,0),c=u.slice(1),h=r.length,d=-1;if(s)return void o(s);for(;++d<h;)(null===c[d]||void 0===c[d])&&(c[d]=r[d]);r=c,l?i(l,a).apply(null,r):o.apply(null,[null].concat(r))}a.apply(null,[null].concat(r))},t.use=function(r){if("function"!=typeof r)throw Error("Expected `fn` to be a function, not "+r);return e.push(r),t},t}},57908(e){"use strict";var t=[].slice;e.exports=function(e,r){var i;return function(){var r,a=t.call(arguments,0),s=e.length>a.length;s&&a.push(n);try{r=e.apply(null,a)}catch(e){if(s&&i)throw e;return n(e)}s||(r&&"function"==typeof r.then?r.then(o,n):r instanceof Error?n(r):o(r))};function n(){i||(i=!0,r.apply(null,arguments))}function o(e){n(null,e)}}},23591(e,t,r){"use strict";var i=r(92178),n=r(21815),o=r(49461),a=r(14479),s=r(67678),l=r(76829);e.exports=(function e(){var t,r=[],n=s(),v={},b=-1;return _.data=function(e,r){return"string"==typeof e?2==arguments.length?(m("data",t),v[e]=r,_):c.call(v,e)&&v[e]||null:e?(m("data",t),v=e,_):v},_.freeze=x,_.attachers=r,_.use=function(e){var i;if(m("use",t),null==e);else if("function"==typeof e)l.apply(null,arguments);else if("object"==typeof e)"length"in e?s(e):n(e);else throw Error("Expected usable value, not `"+e+"`");return i&&(v.settings=o(v.settings||{},i)),_;function n(e){s(e.plugins),e.settings&&(i=o(i||{},e.settings))}function s(e){var t=-1;if(null==e);else if("object"==typeof e&&"length"in e)for(;++t<e.length;){var r=e[t];if("function"==typeof r)l(r);else if("object"==typeof r)"length"in r?l.apply(null,r):n(r);else throw Error("Expected usable value, not `"+r+"`")}else throw Error("Expected a list of plugins, not `"+e+"`")}function l(e,t){var i=function(e){for(var t=-1;++t<r.length;)if(r[t][0]===e)return r[t]}(e);i?(a(i[1])&&a(t)&&(t=o(!0,i[1],t)),i[1]=t):r.push(u.call(arguments))}},_.parse=function(e){var t,r=l(e);return(x(),p("parse",t=_.Parser),d(t,"parse"))?new t(String(r),r).parse():t(String(r),r)},_.stringify=function(e,t){var r,i=l(t);return(x(),f("stringify",r=_.Compiler),g(e),d(r,"compile"))?new r(e,i).compile():r(e,i)},_.run=A,_.runSync=function(e,t){var r,n;return A(e,t,function(e,t){n=!0,r=t,i(e)}),y("runSync","run",n),r},_.process=w,_.processSync=function(e){var t,r;return x(),p("processSync",_.Parser),f("processSync",_.Compiler),w(t=l(e),function(e){r=!0,i(e)}),y("processSync","process",r),t},_;function _(){for(var t=e(),i=-1;++i<r.length;)t.use.apply(null,r[i]);return t.data(o(!0,{},v)),t}function x(){var e,i;if(t)return _;for(;++b<r.length;)!1!==(e=r[b])[1]&&(!0===e[1]&&(e[1]=void 0),"function"==typeof(i=e[0].apply(_,e.slice(1)))&&n.use(i));return t=!0,b=1/0,_}function A(e,t,r){if(g(e),x(),r||"function"!=typeof t||(r=t,t=null),!r)return new Promise(i);function i(i,o){n.run(e,l(t),function(t,n,a){n=n||e,t?o(t):i?i(n):r(null,n,a)})}i(null,r)}function w(e,t){if(x(),p("process",_.Parser),f("process",_.Compiler),!t)return new Promise(r);function r(r,i){var n=l(e);h.run(_,{file:n},function(e){e?i(e):r?r(n):t(null,n)})}r(null,t)}})().freeze();var u=[].slice,c={}.hasOwnProperty,h=s().use(function(e,t){t.tree=e.parse(t.file)}).use(function(e,t,r){e.run(t.tree,t.file,function(e,i,n){e?r(e):(t.tree=i,t.file=n,r())})}).use(function(e,t){var r=e.stringify(t.tree,t.file);null==r||("string"==typeof r||n(r)?("value"in t.file&&(t.file.value=r),t.file.contents=r):t.file.result=r)});function d(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)return!0;return!1}(e.prototype)||t in e.prototype)}function p(e,t){if("function"!=typeof t)throw Error("Cannot `"+e+"` without `Parser`")}function f(e,t){if("function"!=typeof t)throw Error("Cannot `"+e+"` without `Compiler`")}function m(e,t){if(t)throw Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function g(e){if(!e||"string"!=typeof e.type)throw Error("Expected node, got `"+e+"`")}function y(e,t,r){if(!r)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}},85358(e){"use strict";function t(){return!0}e.exports=function e(r){if(null==r)return t;if("string"==typeof r)return function(e){return!!(e&&e.type===r)};if("object"==typeof r)return"length"in r?function(t){for(var r=[],i=-1;++i<t.length;)r[i]=e(t[i]);return function(){for(var e=-1;++e<r.length;)if(r[e].apply(this,arguments))return!0;return!1}}(r):function(e){var t;for(t in r)if(e[t]!==r[t])return!1;return!0};if("function"==typeof r)return r;throw Error("Expected function, string, or object as test")}},7899(e){"use strict";var t={}.hasOwnProperty;function r(e){return e&&"object"==typeof e||(e={}),n(e.line)+":"+n(e.column)}function i(e){return e&&"object"==typeof e||(e={}),r(e.start)+"-"+r(e.end)}function n(e){return e&&"number"==typeof e?e:1}e.exports=function(e){return e&&"object"==typeof e?t.call(e,"position")||t.call(e,"type")?i(e.position):t.call(e,"start")||t.call(e,"end")?i(e):t.call(e,"line")||t.call(e,"column")?r(e):"":""}},59496(e){"use strict";e.exports=function(e,t,r){var i=[];"function"==typeof t&&(r=t,t=null),function e(n){var o;return(t&&n.type!==t||(o=r(n,i.concat())),n.children&&!1!==o)?function(t,r){var n,o=t.length,a=-1;for(i.push(r);++a<o;)if((n=t[a])&&!1===e(n))return!1;return i.pop(),!0}(n.children,n):o}(e)}},49990(e){e.exports=function(e){return e}},67343(e,t,r){"use strict";e.exports=a;var i=r(85358),n=r(49990),o="skip";function a(e,t,r,a){var s,l;"function"==typeof t&&"function"!=typeof r&&(a=r,r=t,t=null),l=i(t),s=a?-1:1,(function e(i,u,c){var h,d="object"==typeof i&&null!==i?i:{};return"string"==typeof d.type&&(h="string"==typeof d.tagName?d.tagName:"string"==typeof d.name?d.name:void 0,p.displayName="node ("+n(d.type+(h?"<"+h+">":""))+")"),p;function p(){var n,h,d,p=c.concat(i),f=[];if((!t||l(i,u,c[c.length-1]||null))&&!1===(f=null!==(n=r(i,c))&&"object"==typeof n&&"length"in n?n:"number"==typeof n?[!0,n]:[n])[0])return f;if(i.children&&f[0]!==o)for(d=(a?i.children.length:-1)+s;d>
168-1&&d<i.children.length;){if(!1===(h=e(i.children[d],d,p)())[0])return h;d="number"==typeof h[1]?h[1]:d+s}return f}})(e,null,[])()}a.CONTINUE=!0,a.SKIP=o,a.EXIT=!1},58849(e,t,r){"use strict";e.exports=s;var i=r(67343),n=i.CONTINUE,o=i.SKIP,a=i.EXIT;function s(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),i(e,t,function(e,t){var i=t[t.length-1],n=i?i.children.indexOf(e):null;return r(e,n,i)},n)}s.CONTINUE=n,s.SKIP=o,s.EXIT=a},71481(e,t,r){"use strict";var i=r(11239);function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ",`\r`,`
169`,"	"])),u=["%","/","?",";","#"].concat(l),c=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(99147);function y(e,t,r){if(e&&"object"==typeof e&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,t,r){if("string"!=typeof e)throw TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),a=-1!==n&&n<e.indexOf("#")?"?":"#",y=e.split(a);y[0]=y[0].replace(/\\/g,"/");var v=e=y.join(a);if(v=v.trim(),!r&&1===e.split("#").length){var b=s.exec(v);if(b)return this.path=v,this.href=v,this.pathname=b[1],b[2]?(this.search=b[2],t?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=o.exec(v);if(_){var x=(_=_[0]).toLowerCase();this.protocol=x,v=v.substr(_.length)}if(r||_||v.match(/^\/\/[^@/]+@[^@/]+/)){var A="//"===v.substr(0,2);A&&!(_&&f[_])&&(v=v.substr(2),this.slashes=!0)}if(!f[_]&&(A||_&&!m[_])){for(var w,S,T=-1,C=0;C<c.length;C++){var E=v.indexOf(c[C]);-1!==E&&(-1===T||E<T)&&(T=E)}-1!==(S=-1===T?v.lastIndexOf("@"):v.lastIndexOf("@",T))&&(w=v.slice(0,S),v=v.slice(S+1),this.auth=decodeURIComponent(w)),T=-1;for(var C=0;C<u.length;C++){var E=v.indexOf(u[C]);-1!==E&&(-1===T||E<T)&&(T=E)}-1===T&&(T=v.length),this.host=v.slice(0,T),v=v.slice(T),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var I=this.hostname.split(/\./),C=0,M=I.length;C<M;C++){var k=I[C];if(k&&!k.match(h)){for(var O="",D=0,R=k.length;D<R;D++)k.charCodeAt(D)>127?O+="x":O+=k[D];if(!O.match(h)){var L=I.slice(0,C),B=I.slice(C+1),F=k.match(d);F&&(L.push(F[1]),B.unshift(F[2])),B.length&&(v="/"+B.join(".")+v),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=i.toASCII(this.hostname));var j=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+j,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!p[x])for(var C=0,M=l.length;C<M;C++){var N=l[C];if(-1!==v.indexOf(N)){var G=encodeURIComponent(N);G===N&&(G=escape(N)),v=v.split(N).join(G)}}var V=v.indexOf("#");-1!==V&&(this.hash=v.substr(V),v=v.slice(0,V));var U=v.indexOf("?");if(-1!==U?(this.search=v.substr(U),this.query=v.substr(U+1),t&&(this.query=g.parse(this.query)),v=v.slice(0,U)):t&&(this.search="",this.query={}),v&&(this.pathname=v),m[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var j=this.pathname||"",H=this.search||"";this.path=j+H}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":")+"@");var t=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,o="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(o=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),t+n+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+i},n.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if("string"==typeof e){var t=new n;t.parse(e,!1,!0),e=t}for(var r=new n,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var u=s[l];"protocol"!==u&&(r[u]=e[u])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var c=Object.keys(e),h=0;h<c.length;h++){var d=c[h];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||f[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var g=r.pathname||"",y=r.search||"";r.path=g+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=b||v||r.host&&e.pathname,x=_,A=r.pathname&&r.pathname.split("/")||[],p=e.pathname&&e.pathname.split("/")||[],w=r.protocol&&!m[r.protocol];if(w&&(r.hostname="",r.port=null,r.host&&(""===A[0]?A[0]=r.host:A.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===A[0])),b)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,A=p;else if(p.length)A||(A=[]),A.pop(),A=A.concat(p),r.search=e.search,r.query=e.query;else if(null!=e.search){if(w){r.host=A.shift(),r.hostname=r.host;var S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(null!==r.pathname||null!==r.search)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!A.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=A.slice(-1)[0],C=(r.host||e.host||A.length>1)&&("."===T||".."===T)||""===T,E=0,P=A.length;P>=0;P--)"."===(T=A[P])?A.splice(P,1):".."===T?(A.splice(P,1),E++):E&&(A.splice(P,1),E--);if(!_&&!x)for(;E--;)A.unshift("..");_&&""!==A[0]&&(!A[0]||"/"!==A[0].charAt(0))&&A.unshift(""),C&&"/"!==A.join("/").substr(-1)&&A.push("");var I=""===A[0]||A[0]&&"/"===A[0].charAt(0);if(w){r.hostname=I?"":A.length?A.shift():"",r.host=r.hostname;var S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return(_=_||r.host&&A.length)&&!I&&A.unshift(""),A.length>0?r.pathname=A.join("/"):(r.pathname=null,r.path=null),(null!==r.pathname||null!==r.search)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){return("string"==typeof e&&(e=y(e)),e instanceof n)?e.format():n.prototype.format.call(e)},t.Url=n},21760(e,t,r){"use strict";var i=r(67308),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useState,a=i.useEffect,s=i.useLayoutEffect,l=i.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),i=o({inst:{value:r,getSnapshot:t}}),n=i[0].inst,c=i[1];return s(function(){n.value=r,n.getSnapshot=t,u(n)&&c({inst:n})},[e,r,t]),a(function(){return u(n)&&c({inst:n}),e(function(){u(n)&&c({inst:n})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:c},33163(e,t,r){"use strict";e.exports=r(21760)},24984(e,t,r){"use strict";var i=r(7899);function n(){}e.exports=a,n.prototype=Error.prototype,a.prototype=new n;var o=a.prototype;function a(e,t,r){var n,o,a,s,l;"string"==typeof t&&(r=t,t=null),l=[null,null],"string"==typeof(a=r)&&(-1===(s=a.indexOf(":"))?l[1]=a:(l[0]=a.slice(0,s),l[1]=a.slice(s+1))),n=i(t)||"1:1",o={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(o=t,t=t.start):o.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=n,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=o,this.source=l[0],this.ruleId=l[1]}o.file="",o.name="",o.reason="",o.message="",o.stack="",o.fatal=null,o.column=null,o.line=null},76829(e,t,r){"use strict";e.exports=r(14821)},58762(e,t,r){"use strict";var i=r(14380),n=r(1311),o=r(21815);e.exports=l;var a={}.hasOwnProperty,s=["history","path","basename","stem","extname","dirname"];function l(e){var t,r;if(e){if("string"==typeof e||o(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof l))return new l(e);for(this.data={},this.messages=[],this.history=[],this.cwd=n.cwd(),r=-1;++r<s.length;)t=s[r],a.call(e,t)&&(this[t]=e[t]);for(t in e)0>s.indexOf(t)&&(this[t]=e[t])}function u(e,t){if(e&&e.indexOf(i.sep)>-1)throw Error("`"+t+"` cannot be a path: did not expect `"+i.sep+"`")}function c(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function h(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}l.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(l.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){c(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(l.prototype,"dirname",{get:function(){return"string"==typeof this.path?i.dirname(this.path):void 0},set:function(e){h(this.path,"dirname"),this.path=i.join(e||"",this.basename)}}),Object.defineProperty(l.prototype,"basename",{get:function(){return"string"==typeof this.path?i.basename(this.path):void 0},set:function(e){c(e,"basename"),u(e,"basename"),this.path=i.join(this.dirname||"",e)}}),Object.defineProperty(l.prototype,"extname",{get:function(){return"string"==typeof this.path?i.extname(this.path):void 0},set:function(e){if(u(e,"extname"),h(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw Error("`extname` must start with `.`");
169if(e.indexOf(".",1)>-1)throw Error("`extname` cannot contain multiple dots")}this.path=i.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(l.prototype,"stem",{get:function(){return"string"==typeof this.path?i.basename(this.path,this.extname):void 0},set:function(e){c(e,"stem"),u(e,"stem"),this.path=i.join(this.dirname||"",e+(this.extname||""))}})},14821(e,t,r){"use strict";var i=r(24984),n=r(58762);e.exports=n,n.prototype.message=function(e,t,r){var n=new i(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n},n.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},n.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}},14380(e,t){"use strict";function r(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}t.basename=function(e,t){var i,n,o,a,s=0,l=-1;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');if(r(e),i=e.length,void 0===t||!t.length||t.length>e.length){for(;i--;)if(47===e.charCodeAt(i)){if(o){s=i+1;break}}else l<0&&(o=!0,l=i+1);return l<0?"":e.slice(s,l)}if(t===e)return"";for(n=-1,a=t.length-1;i--;)if(47===e.charCodeAt(i)){if(o){s=i+1;break}}else n<0&&(o=!0,n=i+1),a>-1&&(e.charCodeAt(i)===t.charCodeAt(a--)?a<0&&(l=i):(a=-1,l=n));return s===l?l=n:l<0&&(l=e.length),e.slice(s,l)},t.dirname=function(e){var t,i,n;if(r(e),!e.length)return".";for(t=-1,n=e.length;--n;)if(47===e.charCodeAt(n)){if(i){t=n;break}}else i||(i=!0);return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)},t.extname=function(e){var t,i,n,o=-1,a=0,s=-1,l=0;for(r(e),n=e.length;n--;){if(47===(i=e.charCodeAt(n))){if(t){a=n+1;break}continue}s<0&&(t=!0,s=n+1),46===i?o<0?o=n:1!==l&&(l=1):o>-1&&(l=-1)}return o<0||s<0||0===l||1===l&&o===s-1&&o===a+1?"":e.slice(o,s)},t.join=function(){for(var e,t,i,n,o=-1;++o<arguments.length;)r(arguments[o]),arguments[o]&&(n=void 0===n?arguments[o]:n+"/"+arguments[o]);return void 0===n?".":(r(e=n),t=47===e.charCodeAt(0),(i=function(e,t){for(var r,i,n="",o=0,a=-1,s=0,l=-1;++l<=e.length;){if(l<e.length)r=e.charCodeAt(l);else if(47===r)break;else r=47;if(47===r){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2)){if(n.length>2){if((i=n.lastIndexOf("/"))!==n.length-1){i<0?(n="",o=0):o=(n=n.slice(0,i)).length-1-n.lastIndexOf("/"),a=l,s=0;continue}}else if(n.length){n="",o=0,a=l,s=0;continue}}t&&(n=n.length?n+"/..":"..",o=2)}else n.length?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),o=l-a-1;a=l,s=0}else 46===r&&s>-1?s++:s=-1}return n}(e,!t)).length||t||(i="."),i.length&&47===e.charCodeAt(e.length-1)&&(i+="/"),t?"/"+i:i)},t.sep="/"},1311(e,t){"use strict";t.cwd=function(){return"/"}},70453(e){"use strict";e.exports=function(){}},45918(e){e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var i=arguments[r];for(var n in i)t.call(i,n)&&(e[n]=i[n])}return e};var t=Object.prototype.hasOwnProperty},30395(e,t){var r;!function(){"use strict";var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=o(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)i.call(e,r)&&e[r]&&(t=o(t,r));return t}(r)))}return e}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):void 0===(r=(function(){return n}).apply(t,[]))||(e.exports=r)}()},87799(e){e.exports=function(){"use strict";var e={},t={};function r(r,i,n){if(t[r]=n,"index"===r){var o="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",a={};return t.shared(a),t.index(e,a),"u">typeof window&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))),e}}return r("shared",["exports"],function(e){let t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v,b;
169function _(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}function x(e,t){this.x=e,this.y=t}function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError,x.prototype={clone(){return new x(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),r=Math.sin(e),i=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=i,this},_rotateAround(e,t){let r=Math.cos(e),i=Math.sin(e),n=t.y+i*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-i*(this.y-t.y),this.y=n,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:x},x.convert=function(e){if(e instanceof x)return e;if(Array.isArray(e))return new x(+e[0],+e[1]);if(void 0!==e.x&&void 0!==e.y)return new x(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};var w,S,T,C,E,P,I,M,k,O,D,R,L,B,F,j,z,N,G,V,U,H,W,q,Z=A(function(){if(rh)return rc;function e(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return rh=1,rc=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)<t)return r;var o=this.sampleCurveDerivativeX(r);if(1e-6>Math.abs(o))break;r-=n/o}var a=0,s=1;for(r=e,i=0;i<20&&!(Math.abs((n=this.sampleCurveX(r))-e)<t);i++)e>n?a=r:s=r,r=.5*(s-a)+a;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},rc}());function $(){return null!=t||(t="u">typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),t}function K(){if(null==r&&(r=!1,$())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){r=!0;break}}}return r||!1}var X="u">typeof Float32Array?Float32Array:Array;function Y(){var e=new X(9);return X!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function Q(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
169]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function J(){var e=new X(3);return X!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function ee(e){var t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function et(e,t,r){var i=new X(3);return i[0]=e,i[1]=t,i[2]=r,i}function er(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function ei(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function en(e,t,r){var i=t[0],n=t[1],o=t[2],a=r[0],s=r[1],l=r[2];return e[0]=n*l-o*s,e[1]=o*a-i*l,e[2]=i*s-n*a,e}function eo(e,t,r){var i=t[0],n=t[1],o=t[2],a=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,e[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,e[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,e[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,e}function ea(){var e=new X(4);return X!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function es(e,t,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",o=Math.PI/360;t*=o,i*=o,r*=o;var a=Math.sin(t),s=Math.cos(t),l=Math.sin(r),u=Math.cos(r),c=Math.sin(i),h=Math.cos(i);switch(n){case"xyz":e[0]=a*u*h+s*l*c,e[1]=s*l*h-a*u*c,e[2]=s*u*c+a*l*h,e[3]=s*u*h-a*l*c;break;case"xzy":e[0]=a*u*h-s*l*c,e[1]=s*l*h-a*u*c,e[2]=s*u*c+a*l*h,e[3]=s*u*h+a*l*c;break;case"yxz":e[0]=a*u*h+s*l*c,e[1]=s*l*h-a*u*c,e[2]=s*u*c-a*l*h,e[3]=s*u*h+a*l*c;break;case"yzx":e[0]=a*u*h+s*l*c,e[1]=s*l*h+a*u*c,e[2]=s*u*c-a*l*h,e[3]=s*u*h-a*l*c;break;case"zxy":e[0]=a*u*h-s*l*c,e[1]=s*l*h+a*u*c,e[2]=s*u*c+a*l*h,e[3]=s*u*h-a*l*c;break;case"zyx":e[0]=a*u*h-s*l*c,e[1]=s*l*h+a*u*c,e[2]=s*u*c-a*l*h,e[3]=s*u*h+a*l*c;break;default:throw Error("Unknown angle order "+n)}return e}function el(){var e=new X(2);return X!=Float32Array&&(e[0]=0,e[1]=0),e}function eu(e,t){var r=new X(2);return r[0]=e,r[1]=t,r}function ec(e,t,r){return t*(8192/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}function eh(e){return e instanceof Error?e:Error("string"==typeof e?e:String(e))}function ed(e,t){return(e%t+t)%t}function ep(e,t,r){return e*(1-r)+t*r}function ef(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function em(e,t,r,i){let n=new Z(e,t,r,i);return e=>n.solve(e)}J(),rd=new X(4),X!=Float32Array&&(rd[0]=0,rd[1]=0,rd[2]=0,rd[3]=0),J(),et(1,0,0),et(0,1,0),ea(),ea(),Y(),el();let eg=em(.25,.1,.25,1);function ey(e,t,r){return Math.min(r,Math.max(t,e))}function ev(e,t,r){let i=r-t,n=((e-t)%i+i)%i+t;return n===t?r:n}function eb(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}let e_=1;function ex(e,t,r){let i={};for(let r in e)i[r]=t.call(this,e[r],r,e);return i}function eA(e,t,r){let i={};for(let r in e)t.call(this,e[r],r,e)&&(i[r]=e[r]);return i}function ew(e){return Array.isArray(e)?e.map(ew):"object"==typeof e&&e?ex(e,ew):e}let eS={};function eT(e){eS[e]||("u">typeof console&&console.warn(e),eS[e]=!0)}function eC(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function eE(e){return"u">typeof WorkerGlobalScope&&void 0!==e&&e instanceof WorkerGlobalScope}let eP=null;function eI(e){return"u">typeof ImageBitmap&&e instanceof ImageBitmap}let eM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ek(e,t,r,i,n){return _(this,void 0,void 0,function*(){if("u"<typeof VideoFrame)throw Error("VideoFrame not supported");let o=new VideoFrame(e,{timestamp:0});try{let a,s,l,u,c=null==o?void 0:o.format;if(!c||!c.startsWith("BGR")&&!c.startsWith("RGB"))throw Error(`Unrecognized format ${c}`);let h=c.startsWith("BGR"),d=new Uint8ClampedArray(i*n*4);if(yield o.copyTo(d,(a=4*Math.max(-t,0),s=(Math.max(0,r)-r)*i*4+a,l=Math.max(0,t),u=Math.max(0,r),{rect:{x:l,y:u,width:Math.min(e.width,t+i)-l,height:Math.min(e.height,r+n)-u},layout:[{offset:s,stride:4*i}]})),h)for(let e=0;e<d.length;e+=4){let t=d[e];d[e]=d[e+2],d[e+2]=t}return d}finally{o.close()}})}function eO(e,t,r,i){return e.addEventListener(t,r,i),{unsubscribe:()=>{e.removeEventListener(t,r,i)}}}function eD(e){return e*Math.PI/180}function eR(e){return e/Math.PI*180}let eL={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},eB={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},eF="AbortError";
169class ej extends Error{constructor(e=eF){super(e instanceof Error?e.message:e),this.name=eF,e instanceof Error&&e.stack&&(this.stack=e.stack)}}function ez(e){return e instanceof Error&&e.name===eF}function eN(e){if(e.aborted)throw new ej(e.reason)}let eG={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function eV(e){return eG.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}let eU="global-dispatcher";class eH extends Error{constructor(e,t,r,i){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=i}}let eW=()=>{var e;return eE(self)?null==(e=self.worker)?void 0:e.referrer:("blob:"===window.location.protocol?window.parent:window).location.href},eq=function(e,t){return _(this,void 0,void 0,function*(){var r,i,n,o;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let i=eV(e.url);if(i){let r=yield i(e,t);return r.data||"arrayBuffer"!==e.type?r:eb(r,{data:new ArrayBuffer(0)})}if(eE(self)&&(null==(r=self.worker)?void 0:r.actor))return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:eU},t)}if(!((n=e.url).startsWith("file:")||(null==(o=eW())?void 0:o.startsWith("file:"))&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(e,t){return _(this,void 0,void 0,function*(){let r,i,n=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:eW(),referrerPolicy:e.referrerPolicy,signal:t.signal});"json"!==e.type||n.headers.has("Accept")||n.headers.set("Accept","application/json");try{r=yield fetch(n)}catch(t){if(ez(t))throw t;throw new eH(0,eh(t).message,e.url,new Blob)}if(!r.ok){let t=yield r.blob();throw new eH(r.status,r.statusText,e.url,t)}i="arrayBuffer"===e.type||"image"===e.type?r.arrayBuffer():"json"===e.type?r.json():r.text();let o=yield i;return eN(t.signal),{data:o,cacheControl:r.headers.get("Cache-Control"),expires:r.headers.get("Expires"),etag:r.headers.get("ETag")}})}(e,t);if(eE(self)&&(null==(i=self.worker)?void 0:i.actor))return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:eU},t)}return new Promise((r,i)=>{var n;let o=new XMLHttpRequest;for(let t in o.open(e.method||"GET",e.url,!0),"arrayBuffer"!==e.type&&"image"!==e.type||(o.responseType="arraybuffer"),e.headers)o.setRequestHeader(t,e.headers[t]);"json"===e.type&&(o.responseType="text",(null==(n=e.headers)?void 0:n.Accept)||o.setRequestHeader("Accept","application/json")),o.withCredentials="include"===e.credentials,o.onerror=()=>{i(Error(o.statusText))},o.onload=()=>{if(!t.signal.aborted)if((o.status>=200&&o.status<300||0===o.status)&&null!==o.response){let t=o.response;if("json"===e.type)try{t=JSON.parse(o.response)}catch(e){return void i(e)}r({data:t,cacheControl:o.getResponseHeader("Cache-Control"),expires:o.getResponseHeader("Expires"),etag:o.getResponseHeader("ETag")})}else{let t=new Blob([o.response],{type:o.getResponseHeader("Content-Type")});i(new eH(o.status,o.statusText,e.url,t))}},t.signal.addEventListener("abort",()=>{o.abort(),i(new ej(t.signal.reason))}),o.send(e.body)})})};function eZ(e){if(!e||0>=e.indexOf("://")||e.startsWith("data:image/")||e.startsWith("blob:"))return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function e$(e,t,r){var i;(null==(i=r[e])?void 0:i.includes(t))||(r[e]||(r[e]=[]),r[e].push(t))}function eK(e,t,r){if(null==r?void 0:r[e]){let i=r[e].indexOf(t);-1!==i&&r[e].splice(i,1)}}class eX{constructor(e,t={}){eb(this,t),this.type=e}}class eY extends eX{constructor(e,t={}){super("error",eb({error:e},t))}}class eQ{on(e,t){return this._listeners||(this._listeners={}),e$(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return eK(e,t,this._listeners),eK(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||(this._oneTimeListeners={}),e$(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){var r,i;"string"==typeof e&&(e=new eX(e,t||{}));let n=e.type;if(this.listens(n)){for(let t of(e.target=this,(null==(r=this._listeners)?void 0:r[n])?this._listeners[n].slice():[]))t.call(this,e);for(let t of(null==(i=this._oneTimeListeners)?void 0:i[n])?this._oneTimeListeners[n].slice():[])eK(n,t,this._oneTimeListeners),t.call(this,e);let t=this._eventedParent;t&&(eb(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),t.fire(e))}
vendor: 5,755 bytes, line 169
169else e instanceof eY&&console.error(e.error);return this}listens(e){var t,r,i,n,o;return(null==(r=null==(t=this._listeners)?void 0:t[e])?void 0:r.length)>0||(null==(n=null==(i=this._oneTimeListeners)?void 0:i[e])?void 0:n.length)>0||(null==(o=this._eventedParent)?void 0:o.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var eJ={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{}
vendor: 15,845 bytes, line 169
169,miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven
vendor: 12,722 bytes, line 169
169"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}}
169;let e0=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function e1(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!e1(e[r],t[r]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(!e1(e[r],t[r]))return!1;return!0}return e===t}function e2(e,t){e.push(t)}function e3(e,t,r){e2(r,{command:"addSource",args:[e,t[e]]})}function e5(e,t,r){e2(t,{command:"removeSource",args:[e]}),r[e]=!0}function e4(e,t,r,i,n,o){for(let a in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,a)&&(e1(e[a],t[a])||r.push({command:o,args:[i,a,t[a],n]}));for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&!Object.prototype.hasOwnProperty.call(e,a)&&(e1(e[a],t[a])||r.push({command:o,args:[i,a,t[a],n]}))}function e6(e){return e.id}function e8(e,t){return e[t.id]=t,e}
169class e7{constructor(e,t,r,i){this.message=(e?`${e}: `:"")+r,i&&(this.identifier=i),null!=t&&t.__line__&&(this.line=t.__line__)}}function e9(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}class te extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class tt{constructor(e,t=[]){for(let[r,i]of(this.parent=e,this.bindings={},t))this.bindings[r]=i}concat(e){return new tt(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}let tr={kind:"null"},ti={kind:"number"},tn={kind:"string"},to={kind:"boolean"},ta={kind:"color"},ts={kind:"projectionDefinition"},tl={kind:"object"},tu={kind:"value"},tc={kind:"collator"},th={kind:"formatted"},td={kind:"padding"},tp={kind:"colorArray"},tf={kind:"numberArray"},tm={kind:"resolvedImage"},tg={kind:"variableAnchorOffsetCollection"};function ty(e,t){return{kind:"array",itemType:e,N:t}}function tv(e){if("array"===e.kind){let t=tv(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let tb=[tr,ti,tn,to,ta,ts,th,tl,ty(tu),td,tf,tp,tm,tg];function t_(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!t_(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind){for(let e of tb)if(!t_(e,t))return null}}return`Expected ${tv(e)} but found ${tv(t)} instead.`}function tx(e,t){return t.some(t=>t.kind===e.kind)}function tA(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function tw(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let tS=4/29,tT=6/29,tC=6/29*3*(6/29),tE=6/29*(6/29)*(6/29),tP=Math.PI/180,tI=180/Math.PI;function tM(e){return(e%=360)<0&&(e+=360),e}function tk([e,t,r,i]){let n,o,a=tD((.2225045*(e=tO(e))+.7168786*(t=tO(t))+.0606169*(r=tO(r)))/1);e===t&&t===r?n=o=a:(n=tD((.4360747*e+.3850649*t+.1430804*r)/.96422),o=tD((.0139322*e+.0971045*t+.7141733*r)/.82521));let s=116*a-16;return[s<0?0:s,500*(n-a),200*(a-o),i]}function tO(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function tD(e){return e>tE?Math.pow(e,1/3):e/tC+tS}function tR([e,t,r,i]){let n=(e+16)/116,o=isNaN(t)?n:n+t/500,a=isNaN(r)?n:n-r/200;return n=+tB(n),[tL(3.1338561*(o=.96422*tB(o))-1.6168667*n-.4906146*(a=.82521*tB(a))),tL(-.9787684*o+1.9161415*n+.033454*a),tL(.0719453*o-.2289914*n+1.4052427*a),i]}function tL(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function tB(e){return e>tT?e*e*e:tC*(e-tS)}let tF=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function tj(e,t){return tF(e,t)?e[t]:void 0}function tz(e){return parseInt(e.padEnd(2,e),16)/255}function tN(e,t){return tG(t?e/100:e,0,1)}function tG(e,t,r){return Math.min(Math.max(t,e),r)}function tV(e){return!e.some(Number.isNaN)}let tU={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
169ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function tH(e,t,r){return e.map((e,i)=>e+r*(t[i]-e))}class tW{constructor(e,t,r,i=1,n=!0){this.r=e,this.g=t,this.b=r,this.a=i,n||(this.r*=i,this.g*=i,this.b*=i,i||this.overwriteGetter("rgb",[e,t,r,i]))}static parse(e){if(e instanceof tW)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=tj(tU,e);if(t){let[e,r,i]=t;return[e/255,r/255,i/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[tz(e.slice(r,r+=t)),tz(e.slice(r,r+=t)),tz(e.slice(r,r+=t)),tz(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,i,n,o,a,s,l,u,c,h,d]=t,p=[n||" ",s||" ",c].join("");if("  "===p||"  /"===p||",,"===p||",,,"===p){let e=[i,a,u].join(""),t="%%%"===e?100:255*(""===e);if(t){let e=[tG(r/t,0,1),tG(o/t,0,1),tG(l/t,0,1),h?tN(+h,d):1];if(tV(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,i,n,o,a,s,l,u]=r,c=[i||" ",o||" ",s].join("");if("  "===c||"  /"===c||",,"===c||",,,"===c){let e=[+t,tG(+n,0,100),tG(+a,0,100),l?tN(+l,u):1];if(tV(e))return function([e,t,r,i]){function n(i){let n=(i+e/30)%12,o=t*Math.min(r,1-r);return r-o*Math.max(-1,Math.min(n-3,9-n,1))}return e=tM(e),t/=100,r/=100,[n(0),n(8),n(4),i]}(e)}}}(e);return t?new tW(...t,!1):void 0}get rgb(){let{r:e,g:t,b:r,a:i}=this,n=i||1/0;return this.overwriteGetter("rgb",[e/n,t/n,r/n,i])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,i,n]=tk(e),o=Math.sqrt(r*r+i*i);return[Math.round(1e4*o)?tM(Math.atan2(i,r)*tI):0/0,o,t,n]}(this.rgb))}get lab(){return this.overwriteGetter("lab",tk(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,i]=this.rgb;return`rgba(${[e,t,r].map(e=>Math.round(255*e)).join(",")},${i})`}static interpolate(e,t,r,i="rgb"){switch(i){case"rgb":{let[i,n,o,a]=tH(e.rgb,t.rgb,r);return new tW(i,n,o,a,!1)}case"hcl":{let i,n,[o,a,s,l]=e.hcl,[u,c,h,d]=t.hcl;if(isNaN(o)||isNaN(u))isNaN(o)?isNaN(u)?i=0/0:(i=u,1!==s&&0!==s||(n=c)):(i=o,1!==h&&0!==h||(n=a));else{let e=u-o;u>o&&e>180?e-=360:u<o&&o-u>180&&(e+=360),i=o+r*e}let[p,f,m,g]=function([e,t,r,i]){return tR([r,Math.cos(e=isNaN(e)?0:e*tP)*t,Math.sin(e)*t,i])}([i,null!=n?n:a+r*(c-a),s+r*(h-s),l+r*(d-l)]);return new tW(p,f,m,g,!1)}case"lab":{let[i,n,o,a]=tR(tH(e.lab,t.lab,r));return new tW(i,n,o,a,!1)}}}}tW.black=new tW(0,0,0,1),tW.white=new tW(1,1,1,1),tW.transparent=new tW(0,0,0,0),tW.red=new tW(1,0,0,1);class tq{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let tZ=["bottom","center","top"];class t${constructor(e,t,r,i,n,o){this.text=e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=o}}class tK{constructor(e){this.sections=e}static fromString(e){return new tK([new t$(e,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof tK?e:tK.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}}class tX{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tX)return e;if("number"==typeof e)return new tX([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new tX(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tX(tH(e.values,t.values,r))}}class tY{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tY)return e;if("number"==typeof e)return new tY([e]);if(Array.isArray(e)){for(let t of e)if("number"!=typeof t)return;return new tY(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tY(tH(e.values,t.values,r))}}class tQ{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tQ)return e;if("string"==typeof e){let t=tW.parse(e);if(!t)return;return new tQ([t])}if(!Array.isArray(e))return;let t=[];for(let r of e){if("string"!=typeof r)return;let e=tW.parse(r);if(!e)return;t.push(e)}return new tQ(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r,i="rgb"){let n=[];if(e.values.length!=t.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let o=0;o<e.values.length;o++)n.push(tW.interpolate(e.values[o],t.values[o],r,i));return new tQ(n)}}
169class tJ extends Error{constructor(e){super(e),this.name="RuntimeError"}toJSON(){return this.message}}let t0=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class t1{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof t1)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let t=0;t<e.length;t+=2){let r=e[t],i=e[t+1];if("string"!=typeof r||!t0.has(r)||!Array.isArray(i)||2!==i.length||"number"!=typeof i[0]||"number"!=typeof i[1])return}return new t1(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){let i=e.values,n=t.values;if(i.length!==n.length)throw new tJ(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);let o=[];for(let e=0;e<i.length;e+=2){if(i[e]!==n[e])throw new tJ(`Cannot interpolate values containing mismatched anchors. from[${e}]: ${i[e]}, to[${e}]: ${n[e]}`);o.push(i[e]);let[t,a]=i[e+1],[s,l]=n[e+1];o.push([t+r*(s-t),a+r*(l-a)])}return new t1(o)}}class t2{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new t2({name:e,available:!1}):null}}class t3{constructor(e,t,r){this.from=e,this.to=t,this.transition=r}static interpolate(e,t,r){return new t3(e,t,r)}static parse(e){return e instanceof t3?e:Array.isArray(e)&&3===e.length&&"string"==typeof e[0]&&"string"==typeof e[1]&&"number"==typeof e[2]?new t3(e[0],e[1],e[2]):"object"==typeof e&&"string"==typeof e.from&&"string"==typeof e.to&&"number"==typeof e.transition?new t3(e.from,e.to,e.transition):"string"==typeof e?new t3(e,e,1):void 0}}function t5(e,t,r,i){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof i?[e,t,r,i]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function t4(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof t3||e instanceof tW||e instanceof tq||e instanceof tK||e instanceof tX||e instanceof tY||e instanceof tQ||e instanceof t1||e instanceof t2)return!0;if(Array.isArray(e)){for(let t of e)if(!t4(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!t4(e[t]))return!1;return!0}return!1}function t6(e){if(null===e)return tr;if("string"==typeof e)return tn;if("boolean"==typeof e)return to;if("number"==typeof e)return ti;if(e instanceof tW)return ta;if(e instanceof t3)return ts;if(e instanceof tq)return tc;if(e instanceof tK)return th;if(e instanceof tX)return td;if(e instanceof tY)return tf;if(e instanceof tQ)return tp;if(e instanceof t1)return tg;if(e instanceof t2)return tm;if(Array.isArray(e)){let t,r=e.length;for(let r of e){let e=t6(r);if(t){if(t===e)continue;t=tu;break}t=e}return ty(t||tu,r)}return tl}function t8(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof tW||e instanceof t3||e instanceof tK||e instanceof tX||e instanceof tY||e instanceof tQ||e instanceof t1||e instanceof t2?e.toString():JSON.stringify(e)}class t7{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!t4(e[1]))return t.error("invalid value");let r=e[1],i=t6(r),n=t.expectedType;return"array"===i.kind&&0===i.N&&n&&"array"===n.kind&&("number"!=typeof n.N||0===n.N)&&(i=n),new t7(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let t9={string:tn,number:ti,boolean:to,object:tl};class re{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,i=1,n=e[0];if("array"===n){let n,o;if(e.length>2){let r=e[1];if("string"!=typeof r||!(r in t9)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);n=t9[r],i++}else n=tu;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],i++}r=ty(n,o)}else{if(!t9[n])throw Error(`Types doesn't contain name = ${n}`);r=t9[n]}let o=[];for(;i<e.length;i++){let r=t.parse(e[i],i,tu);if(!r)return null;o.push(r)}return new re(r,o)}evaluate(e){for(let t=0;t<this.args.length;t++){let r=this.args[t].evaluate(e);
169if(!t_(this.type,t6(r)))return r;if(t===this.args.length-1)throw new tJ(`Expected value to be of type ${tv(this.type)}, but found ${tv(t6(r))} instead.`)}throw Error()}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let rt={"to-boolean":to,"to-color":ta,"to-number":ti,"to-string":tn};class rr{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[0];if(!rt[r])throw Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");let i=rt[r],n=[];for(let r=1;r<e.length;r++){let i=t.parse(e[r],r,tu);if(!i)return null;n.push(i)}return new rr(i,n)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,r;for(let i of this.args){if(t=i.evaluate(e),r=null,t instanceof tW)return t;if("string"==typeof t){let r=e.parseColor(t);if(r)return r}else if(Array.isArray(t)&&!(r=t.length<3||t.length>4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:t5(t[0],t[1],t[2],t[3])))return new tW(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new tJ(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let i=tX.parse(t);if(i)return i}throw new tJ(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(let r of this.args){t=r.evaluate(e);let i=tY.parse(t);if(i)return i}throw new tJ(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(let r of this.args){t=r.evaluate(e);let i=tQ.parse(t);if(i)return i}throw new tJ(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let i=t1.parse(t);if(i)return i}throw new tJ(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let r of this.args){if(null===(t=r.evaluate(e)))return 0;let i=Number(t);if(!isNaN(i))return i}throw new tJ(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return tK.fromString(t8(this.args[0].evaluate(e)));case"resolvedImage":return t2.fromString(t8(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return t8(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let ri=["Unknown","Point","LineString","Polygon"];class rn{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?ri[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||{}}parseColor(e){let t=this._parseColorCache.get(e);return t||(t=tW.parse(e),this._parseColorCache.set(e,t)),t}}class ro{constructor(e,t,r=[],i,n=new tt,o=[]){this.registry=e,this.path=r,this.key=r.map(e=>`[${e}]`).join(""),this.scope=n,this.errors=o,this.expectedType=i,this._isConstant=t}parse(e,t,r,i,n={}){return t?this.concat(t,r,i)._parse(e,n):this._parse(e,n)}_parse(e,t){function r(e,t,r){return"assert"===r?new re(t,[e]):"coerce"===r?new rr(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let i=e[0];if("string"!=typeof i)return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let n=this.registry[i];if(n){let i=n.parse(e,this);if(!i)return null;if(this.expectedType){let e=this.expectedType,n=i.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==n.kind){if("projectionDefinition"===e.kind&&["string","array"].includes(n.kind)||["color","formatted","resolvedImage"].includes(e.kind)&&["value","string"].includes(n.kind)||["padding","numberArray"].includes(e.kind)&&["value","number","array"].includes(n.kind)||"colorArray"===e.kind&&["value","string","array"].includes(n.kind)||"variableAnchorOffsetCollection"===e.kind&&["value","array"].includes(n.kind))i=r(i,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,n))return null}else i=r(i,e,t.typeAnnotation||"assert")}if(!(i instanceof t7)&&"resolvedImage"!==i.type.kind&&this._isConstant(i)){let e=new rn;try{i=new t7(i.type,i.evaluate(e))}catch(e){return this.error(e.message),null}}return i}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){let i="number"==typeof e?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new ro(this.registry,this._isConstant,i,t||null,n,this.errors)}error(e,...t){let r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new te(r,e))}checkSubtype(e,t){let r=t_(e,t);return r&&this.error(r),r}}class ra{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let r=[];for(let i=1;i<e.length-1;i+=2){let n=e[i];if("string"!=typeof n)return t.error(`Expected string, but found ${typeof n} instead.`,i);if(/[^a-zA-Z0-9_]/.test(n))return t.error("Variable names must contain only alphanumeric characters or '_'.",i);let o=t.parse(e[i+1],i+1);if(!o)return null;
169r.push([n,o])}let i=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return i?new ra(r,i):null}outputDefined(){return this.result.outputDefined()}}class rs{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");let r=e[1];return t.scope.has(r)?new rs(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}}function rl(e,t){let r=e.length-1,i,n,o=0,a=r,s=0;for(;o<=a;)if(i=e[s=Math.floor((o+a)/2)],n=e[s+1],i<=t){if(s===r||t<n)return s;o=s+1}else{if(!(i>t))throw new tJ("Input is not a number.");a=s-1}return 0}class ru{constructor(e,t,r){for(let[i,n]of(this.type=e,this.input=t,this.labels=[],this.outputs=[],r))this.labels.push(i),this.outputs.push(n)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");let r=t.parse(e[1],1,ti);if(!r)return null;let i=[],n=null;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(let r=1;r<e.length;r+=2){let o=1===r?-1/0:e[r],a=e[r+1],s=r,l=r+1;if("number"!=typeof o)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',s);if(i.length&&i[i.length-1][0]>=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);let u=t.parse(a,l,n);if(!u)return null;n=n||u.type,i.push([o,u])}return new ru(n,r,i)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);let n=t.length;return i>=t[n-1]?r[n-1].evaluate(e):r[rl(t,i)].evaluate(e)}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}var rc,rh,rd,rp,rf,rm,rg=(rp=function(){if(rm)return rf;function e(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return rm=1,rf=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)<t)return r;var o=this.sampleCurveDerivativeX(r);if(1e-6>Math.abs(o))break;r-=n/o}var a=0,s=1;for(r=e,i=0;i<20&&!(Math.abs((n=this.sampleCurveX(r))-e)<t);i++)e>n?a=r:s=r,r=.5*(s-a)+a;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},rf}())&&rp.__esModule&&Object.prototype.hasOwnProperty.call(rp,"default")?rp.default:rp;class ry{constructor(e,t,r,i,n){for(let[o,a]of(this.type=e,this.operator=t,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[],n))this.labels.push(o),this.outputs.push(a)}static interpolationFactor(e,t,r,i){let n=0;if("exponential"===e.name)n=rv(t,e.base,r,i);else if("linear"===e.name)n=rv(t,1,r,i);else if("cubic-bezier"===e.name){let o=e.controlPoints;n=new rg(o[0],o[1],o[2],o[3]).solve(rv(t,1,r,i))}return n}static parse(e,t){let[r,i,n,...o]=e;if(!Array.isArray(i)||0===i.length)return t.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){let e=i[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:e}}else{if("cubic-bezier"!==i[0])return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);{let e=i.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(n=t.parse(n,2,ti)))return null;let a=[],s=null;"interpolate-hcl"!==r&&"interpolate-lab"!==r||t.expectedType==tp?t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType):s=ta;for(let e=0;e<o.length;e+=2){let r=o[e],i=o[e+1],n=e+3,l=e+4;if("number"!=typeof r)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not c
169omputed expressions) for the input values.',n);if(a.length&&a[a.length-1][0]>=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);let u=t.parse(i,l,s);if(!u)return null;s=s||u.type,a.push([r,u])}return tw(s,ti)||tw(s,ts)||tw(s,ta)||tw(s,td)||tw(s,tf)||tw(s,tp)||tw(s,tg)||tw(s,ty(ti))?new ry(s,r,i,n,a):t.error(`Type ${tv(s)} is not interpolatable.`)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);let n=t.length;if(i>=t[n-1])return r[n-1].evaluate(e);let o=rl(t,i),a=ry.interpolationFactor(this.interpolation,i,t[o],t[o+1]),s=r[o].evaluate(e),l=r[o+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return s+a*(l-s);case"color":return tW.interpolate(s,l,a);case"padding":return tX.interpolate(s,l,a);case"colorArray":return tQ.interpolate(s,l,a);case"numberArray":return tY.interpolate(s,l,a);case"variableAnchorOffsetCollection":return t1.interpolate(s,l,a);case"array":return tH(s,l,a);case"projectionDefinition":return t3.interpolate(s,l,a)}case"interpolate-hcl":switch(this.type.kind){case"color":return tW.interpolate(s,l,a,"hcl");case"colorArray":return tQ.interpolate(s,l,a,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return tW.interpolate(s,l,a,"lab");case"colorArray":return tQ.interpolate(s,l,a,"lab")}}}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function rv(e,t,r,i){let n=i-r,o=e-r;return 0===n?0:1===t?o/n:(Math.pow(t,o)-1)/(Math.pow(t,n)-1)}let rb={color:tW.interpolate,number:function(e,t,r){return e+r*(t-e)},padding:tX.interpolate,numberArray:tY.interpolate,colorArray:tQ.interpolate,variableAnchorOffsetCollection:t1.interpolate,array:tH};class r_{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=null,i=t.expectedType;i&&"value"!==i.kind&&(r=i);let n=[];for(let i of e.slice(1)){let e=t.parse(i,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,n.push(e)}if(!r)throw Error("No output type");return new r_(i&&n.some(e=>t_(i,e.type))?tu:r,n)}evaluate(e){let t,r=null,i=0;for(let n of this.args)if(i++,(r=n.evaluate(e))&&r instanceof t2&&!r.available&&(t||(t=r.name),r=null,i===this.args.length&&(r=t)),null!==r)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function rx(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function rA(e,t,r,i){return 0===i.compare(t,r)}function rw(e,t,r){let i="=="!==e&&"!="!==e;return class n{constructor(e,t,r){this.type=to,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],o=t.parse(e[1],1,tu);if(!o)return null;if(!rx(r,o.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${tv(o.type)}'.`);let a=t.parse(e[2],2,tu);if(!a)return null;
169if(!rx(r,a.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${tv(a.type)}'.`);if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error(`Cannot compare types '${tv(o.type)}' and '${tv(a.type)}'.`);i&&("value"===o.type.kind&&"value"!==a.type.kind?o=new re(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new re(o.type,[a])));let s=null;if(4===e.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,tc)))return null}return new n(o,a,s)}evaluate(n){let o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){let t=t6(o),r=t6(a);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new tJ(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){let e=t6(o),r=t6(a);if("string"!==e.kind||"string"!==r.kind)return t(n,o,a)}return this.collator?r(n,o,a,this.collator.evaluate(n)):t(n,o,a)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let rS=rw("==",function(e,t,r){return t===r},rA),rT=rw("!=",function(e,t,r){return t!==r},function(e,t,r,i){return!rA(0,t,r,i)}),rC=rw("<",function(e,t,r){return t<r},function(e,t,r,i){return 0>i.compare(t,r)}),rE=rw(">",function(e,t,r){return t>r},function(e,t,r,i){return i.compare(t,r)>0}),rP=rw("<=",function(e,t,r){return t<=r},function(e,t,r,i){return 0>=i.compare(t,r)}),rI=rw(">=",function(e,t,r){return t>=r},function(e,t,r,i){return i.compare(t,r)>=0});class rM{constructor(e,t,r){this.type=tc,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");let i=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,to);if(!i)return null;let n=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,to);if(!n)return null;let o=null;return!r.locale||(o=t.parse(r.locale,1,tn))?new rM(i,n,o):null}evaluate(e){return new tq(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class rk{constructor(e){this.type=th,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");let i=[],n=!1;for(let r=1;r<=e.length-1;++r){let o=e[r];if(n&&"object"==typeof o&&!Array.isArray(o)){n=!1;let e=null;if(o["font-scale"]&&!(e=t.parse(o["font-scale"],1,ti)))return null;let r=null;if(o["text-font"]&&!(r=t.parse(o["text-font"],1,ty(tn))))return null;let a=null;if(o["text-color"]&&!(a=t.parse(o["text-color"],1,ta)))return null;let s=null;if(o["vertical-align"]){if("string"==typeof o["vertical-align"]&&!tZ.includes(o["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${o["vertical-align"]}' instead.`);if(!(s=t.parse(o["vertical-align"],1,tn)))return null}let l=i[i.length-1];l.scale=e,l.font=r,l.textColor=a,l.verticalAlign=s}else{let o=t.parse(e[r],1,tu);if(!o)return null;let a=o.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,i.push({content:o,scale:null,font:null,textColor:null,verticalAlign:null})}}return new rk(i)}evaluate(e){return new tK(this.sections.map(t=>{let r=t.content.evaluate(e);return t6(r)===tm?new t$("",r,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new t$(t8(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null,t.verticalAlign?t.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}}function rO(e,t){let r=Math.pow(2,t.z);return[360*((e[0]/8192+t.x)/r)-180,360/Math.PI*Math.atan(Math.exp((180-360*((e[1]/8192+t.y)/r))*Math.PI/180)
169)-90]}function rD(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function rR(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function rL(e,t,r,i){var n,o;return 0!=(n=[i[0]-r[0],i[1]-r[1]])[0]*(o=[t[0]-e[0],t[1]-e[1]])[1]-n[1]*o[0]&&!(!rj(e,t,r,i)||!rj(r,i,e,t))}function rB(e,t,r=!1){var i,n;let o=!1;for(let a of t)for(let t=0;t<a.length-1;t++){if(function(e,t,r){let i=e[0]-t[0],n=e[1]-t[1],o=e[0]-r[0],a=e[1]-r[1];return i*a-o*n==0&&i*o<=0&&n*a<=0}(e,a[t],a[t+1]))return r;(i=a[t])[1]>e[1]!=(n=a[t+1])[1]>e[1]&&e[0]<(n[0]-i[0])*(e[1]-i[1])/(n[1]-i[1])+i[0]&&(o=!o)}return o}function rF(e,t){for(let r of e)if(!rB(r,t))return!1;for(let r=0;r<e.length-1;++r)if(function(e,t,r){for(let i of r)for(let r=0;r<i.length-1;++r)if(rL(e,t,i[r],i[r+1]))return!0;return!1}(e[r],e[r+1],t))return!1;return!0}function rj(e,t,r,i){let n=i[0]-r[0],o=i[1]-r[1],a=(e[0]-r[0])*o-n*(e[1]-r[1]),s=(t[0]-r[0])*o-n*(t[1]-r[1]);return a>0&&s<0||a<0&&s>0}function rz(e,t,r){let i=[];for(let n=0;n<e.length;n++){let o=[];for(let i=0;i<e[n].length;i++){let a=function(e,t){let r=(180+e[0])/360,i=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,n=Math.pow(2,t.z);return[Math.round(r*n*8192),Math.round(i*n*8192)]}(e[n][i],r);rD(t,a),o.push(a)}i.push(o)}return i}function rN(e,t,r){let i=[];for(let n=0;n<e.length;n++){let o=rz(e[n],t,r);i.push(o)}return i}function rG(e,t,r,i){if(e[0]<r[0]||e[0]>r[2]){let t=.5*i,n=e[0]-r[0]>t?-i:r[0]-e[0]>t?i:0;0===n&&(n=e[0]-r[2]>t?-i:r[2]-e[0]>t?i:0),e[0]+=n}rD(t,e)}function rV(e,t,r,i){let n=8192*Math.pow(2,i.z),o=[8192*i.x,8192*i.y],a=[];for(let i of e)for(let e of i){let i=[e.x+o[0],e.y+o[1]];rG(i,t,r,n),a.push(i)}return a}function rU(e,t,r,i){let n=8192*Math.pow(2,i.z),o=[8192*i.x,8192*i.y],a=[];for(let r of e){let e=[];for(let i of r){let r=[i.x+o[0],i.y+o[1]];rD(t,r),e.push(r)}a.push(e)}if(t[2]-t[0]<=n/2)for(let e of(t[0]=t[1]=1/0,t[2]=t[3]=-1/0,a))for(let i of e)rG(i,t,r,n);return a}class rH{constructor(e,t){this.type=to,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(t4(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let r of t.features){let{type:t,coordinates:i}=r.geometry;"Polygon"===t&&e.push(i),"MultiPolygon"===t&&e.push(...i)}if(e.length)return new rH(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new rH(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new rH(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let o=rz(t.coordinates,i,n),a=rV(e.geometry(),r,i,n);if(!rR(r,i))return!1;for(let e of a)if(!rB(e,o))return!1}if("MultiPolygon"===t.type){let o=rN(t.coordinates,i,n),a=rV(e.geometry(),r,i,n);if(!rR(r,i))return!1;for(let e of a)if(!function(e,t){for(let r of t)if(rB(e,r))return!0;return!1}(e,o))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let o=rz(t.coordinates,i,n),a=rU(e.geometry(),r,i,n);if(!rR(r,i))return!1;for(let e of a)if(!rF(e,o))return!1}if("MultiPolygon"===t.type){let o=rN(t.coordinates,i,n),a=rU(e.geometry(),r,i,n);if(!rR(r,i))return!1;for(let e of a)if(!function(e,t){for(let r of t)if(rF(e,r))return!0;return!1}(e,o))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let rW=class{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,o=t[n];if(r(i,o)>=0)break;t[e]=o,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;e<i;){let i=1+(e<<1),o=i+1;if(o<this.length&&0>r(t[o],t[i])&&(i=o),r(t[i],n)>=0)break;t[e]=t[i],e=i}t[e]=n}};function rq(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function rZ(e,t){let r,i;if(e.length<=1)return[e];let n=[];for(let t of e){let e=function(e){let t=0;for(let r,i,n=0,o=e.length,a=o-1;n<o;a=n++)r=e[n],t+=((i=e[a]).x-r.x)*(r.y+i.y);return t}(t);0!==e&&(t.area=Math.abs(e),void 0===i&&(i=e<0),i===e<0?(r&&n.push(r),r=[t]):r.push(t))}if(r&&n.push(r),t>1)for(let e=0;e<n.length;e++)n[e].length<=t||(function e(t,r,i=0,n=t.length-1,o=function(e,t){return e<t?-1:+(e>t)}){for(;n>i;){if(n-i>600){let a=n-i+1,s=r-i+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-s*u/a+c)),Math.min(n,Math.floor(r+(a-s)*u/a+c)),o)}let a=t[r],s=i,l=n;for(rq(t,i,r),o(t[n],a)>0&&rq(t,i,n);s<l;){for(rq(t,s,l),s++,l--;0>o(t[s],a);)s++;for(;o(t[l],a)>0;)l--}0===o(t[i],a)?rq(t,i,l):rq(t,++l,n),l<=r&&(i=l+1),r<=l&&(n=l-1)}}(n[e],t,1,n[e].length-1,r$),n[e]=n[e].slice(0,t));return n}function r$(e,t){return t.area-e.area}let rK=1/298.257223563*(2-1/298.257223563),rX=Math.PI/180;class rY{constructor(e){let t=6378.137*rX*1e3,r=Math.cos(e*rX),i=1/(1-rK*(1-r*r)),n=Math.sqrt(i);this.kx=t*n*r,this.ky=t*n*i*(1-rK)}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,i=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(e,t){let r,i,n,o,a=1/0;for(let s=0;s<e.length-1;s++){let l=e[s][0],u=e[s][1],c=this.wrap(e[s+1][0]-l)*this.kx,h=(e[s+1][1]-u)*this.ky,d=0;0===c&&0===h||((d=(this.wrap(t[0]-l)*this.kx*c+(t[1]-u)*this.ky*h)/(c*c+h*h))>1?(l=e[s+1][0],u=e[s+1][1]):d>0&&(l+=c/this.kx*d,u+=h/this.ky*d));let p=(c=this.wrap(t[0]-l)*this.kx)*c+(h=(t[1]-u)*this.ky)*h;p<a&&(a=p,r=l,i=u,n=s,o=d)}return{point:[r,i],index:n,t:Math.max(0,Math.min(1,o))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}}function rQ(e,t){return t[0]-e[0]}function rJ(e){return e[1]-e[0]+1}function r0(e,t){return e[1]>=e[0]&&e[1]<t}function r1(e,t){if(e[0]>
169e[1])return[null,null];let r=rJ(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let i=Math.floor(r/2)-1;return[[e[0],e[0]+i],[e[0]+i+1,e[1]]]}function r2(e,t){if(!r0(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=t[0];i<=t[1];++i)rD(r,e[i]);return r}function r3(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)rD(t,e);return t}function r5(e){return -1/0!==e[0]&&-1/0!==e[1]&&1/0!==e[2]&&1/0!==e[3]}function r4(e,t,r){if(!r5(e)||!r5(t))return 0/0;let i=0,n=0;return e[2]<t[0]&&(i=t[0]-e[2]),e[0]>t[2]&&(i=e[0]-t[2]),e[1]>t[3]&&(n=e[1]-t[3]),e[3]<t[1]&&(n=t[1]-e[3]),r.distance([0,0],[i,n])}function r6(e,t,r){let i=r.pointOnLine(t,e);return r.distance(e,i.point)}function r8(e,t,r,i,n){return Math.min(Math.min(r6(e,[r,i],n),r6(t,[r,i],n)),Math.min(r6(r,[e,t],n),r6(i,[e,t],n)))}function r7(e,t){for(let r of e)for(let e of r)if(rB(e,t,!0))return!0;return!1}function r9(e,t,r,i,n,o){if(!o)return;let a=r4(r2(i,o),n,r);a<t&&e.push([a,o,[0,0]])}function ie(e,t,r,i,n,o,a){if(!o||!a)return;let s=r4(r2(i,o),r2(n,a),r);s<t&&e.push([s,o,a])}function it(e,t,r,i,n=1/0){let o=Math.min(i.distance(e[0],r[0][0]),n);if(0===o)return o;let a=new rW([[0,[0,e.length-1],[0,0]]],rQ),s=r3(r);for(;a.length>0;){let n=a.pop();if(n[0]>=o)continue;let l=n[1],u=t?50:100;if(rJ(l)<=u){if(!r0(l,e.length))return 0/0;if(t){let t=function(e,t,r,i){if(!r0(t,e.length))return 0/0;for(let i=t[0];i<=t[1];++i)if(rB(e[i],r,!0))return 0;let n=1/0;for(let o=t[0];o<t[1];++o){let t=e[o],a=e[o+1];for(let e of r)for(let r=0,o=e.length,s=o-1;r<o;s=r++){let o=e[s],l=e[r];if(rL(t,a,o,l))return 0;n=Math.min(n,r8(t,a,o,l,i))}}return n}(e,l,r,i);if(isNaN(t)||0===t)return t;o=Math.min(o,t)}else for(let t=l[0];t<=l[1];++t)if(0===(o=Math.min(o,function(e,t,r){if(rB(e,t,!0))return 0;let i=1/0;for(let n of t){let t=n[0],o=n[n.length-1];if(t!==o&&0===(i=Math.min(i,r6(e,[o,t],r))))break;let a=r.pointOnLine(n,e);if(0===(i=Math.min(i,r.distance(e,a.point))))break}return i}(e[t],r,i))))return 0}else{let r=r1(l,t);r9(a,o,i,e,s,r[0]),r9(a,o,i,e,s,r[1])}}return o}function ir(e,t,r,i,n,o=1/0){let a=Math.min(o,n.distance(e[0],r[0]));if(0===a)return a;let s=new rW([[0,[0,e.length-1],[0,r.length-1]]],rQ);for(;s.length>0;){let o=s.pop();if(o[0]>=a)continue;let l=o[1],u=o[2],c=t?50:100,h=i?50:100;if(rJ(l)<=c&&rJ(u)<=h){if(!r0(l,e.length)&&r0(u,r.length))return 0/0;if(t&&i)a=Math.min(a,function(e,t,r,i,n){if(!r0(t,e.length)||!r0(i,r.length))return 1/0;let o=1/0;for(let a=t[0];a<t[1];++a){let t=e[a],s=e[a+1];for(let e=i[0];e<i[1];++e){let i=r[e],a=r[e+1];if(rL(t,s,i,a))return 0;o=Math.min(o,r8(t,s,i,a,n))}}return o}(e,l,r,u,n));else if(t&&!i){let t=e.slice(l[0],l[1]+1);for(let e=u[0];e<=u[1];++e)if(0===(a=Math.min(a,r6(r[e],t,n))))return a}else if(!t&&i){let t=r.slice(u[0],u[1]+1);for(let r=l[0];r<=l[1];++r)if(0===(a=Math.min(a,r6(e[r],t,n))))return a}else a=Math.min(a,function(e,t,r,i,n){if(!r0(t,e.length)||!r0(i,r.length))return 0/0;let o=1/0;for(let a=t[0];a<=t[1];++a)for(let t=i[0];t<=i[1];++t)if(0===(o=Math.min(o,n.distance(e[a],r[t]))))return o;return o}(e,l,r,u,n))}else{let o=r1(l,t),c=r1(u,i);ie(s,a,n,e,r,o[0],c[0]),ie(s,a,n,e,r,o[0],c[1]),ie(s,a,n,e,r,o[1],c[0]),ie(s,a,n,e,r,o[1],c[1])}}return a}function ii(e){return"MultiPolygon"===e.type?e.coordinates.map(e=>({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}class io{constructor(e,t){this.type=ti,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(t4(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new io(t,t.features.map(e=>ii(e.geometry)).flat());if("Feature"===t.type)return new io(t,ii(t.geometry));if("type"in t&&"coordinates"in t)return new io(t,ii(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),i=r.flat().map(t=>rO([t.x,t.y],e.canonical));if(0===r.length)return 0/0;let n=new rY(i[0][1]),o=1/0;for(let e of t){switch(e.type){case"Point":o=Math.min(o,ir(i,!1,[e.coordinates],!1,n,o));break;case"LineString":o=Math.min(o,ir(i,!1,e.coordinates,!0,n,o));break;case"Polygon":o=Math.min(o,it(i,!1,e.coordinates,n,o))}if(0===o)break}return o}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),i=r.flat().map(t=>rO([t.x,t.y],e.canonical));if(0===r.length)return 0/0;let n=new rY(i[0][1]),o=1/0;for(let e of t){switch(e.type){case"Point":o=Math.min(o,ir(i,!0,[e.coordinates],!1,n,o));break;case"LineString":o=Math.min(o,ir(i,!0,e.coordinates,!0,n,o));break;case"Polygon":o=Math.min(o,it(i,!0,e.coordinates,n,o))}if(0===o)break}return o}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return 0/0;let i=rZ(r,0).map(t=>t.map(t=>t.map(t=>rO([t.x,t.y],e.canonical)))),n=new rY(i[0][0][0][1]),o=1/0;for(let e of t)for(let t of i){switch(e.type){case"Point":o=Math.min(o,it([e.coordinates],!1,t,n,o));break;case"LineString":o=Math.min(o,it(e.coordinates,!0,t,n,o));break;case"Polygon":o=Math.min(o,function(e,t,r,i=1/0){let n=r3(e),o=r3(t);if(1/0!==i&&r4(n,o,r)>=i)return i;
169if(rR(n,o)){if(r7(e,t))return 0}else if(r7(t,e))return 0;let a=1/0;for(let i of e)for(let e=0,n=i.length,o=n-1;e<n;o=e++){let n=i[o],s=i[e];for(let e of t)for(let t=0,i=e.length,o=i-1;t<i;o=t++){let i=e[o],l=e[t];if(rL(n,s,i,l))return 0;a=Math.min(a,r8(n,s,i,l,r))}}return a}(t,e.coordinates,n,o))}if(0===o)return o}return o}(e,this.geometries)}return 0/0}eachChild(){}outputDefined(){return!0}}class ia{constructor(e){this.type=tu,this.key=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);let r=e[1];return null==r?t.error("Global state property must be defined."):"string"!=typeof r?t.error(`Global state property must be string, but found ${typeof e[1]} instead.`):new ia(r)}evaluate(e){var t;let r=null==(t=e.globals)?void 0:t.globalState;return r&&0!==Object.keys(r).length?tj(r,this.key):null}eachChild(){}outputDefined(){return!1}}let is={"==":rS,"!=":rT,">":rE,"<":rC,">=":rI,"<=":rP,array:re,at:class e{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,ti),n=r.parse(t[2],2,ty(r.expectedType||tu));return i&&n?new e(n.type.itemType,i,n):null}evaluate(e){let t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new tJ(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new tJ(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new tJ(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},boolean:re,case:class e{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(t,r){let i;if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(i=r.expectedType);let n=[];for(let e=1;e<t.length-1;e+=2){let o=r.parse(t[e],e,to);if(!o)return null;let a=r.parse(t[e+1],e+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}let o=r.parse(t[t.length-1],t.length-1,i);if(!o)return null;if(!i)throw Error("Can't infer output type");return new e(i,n,o)}evaluate(e){for(let[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(let[t,r]of this.branches)e(t),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}},coalesce:r_,collator:rM,format:rk,image:class e{constructor(e){this.type=tm,this.input=e}static parse(t,r){if(2!==t.length)return r.error("Expected two arguments.");let i=r.parse(t[1],1,tn);return i?new e(i):r.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=t2.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},in:class e{constructor(e,t){this.type=to,this.needle=e,this.haystack=t}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tu);return i&&n?tx(i.type,[to,tn,ti,tr,tu])?new e(i,n):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${tv(i.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!tA(t,["boolean","string","number","null"]))throw new tJ(`Expected first argument to be of type boolean, string, number or null, but found ${tv(t6(t))} instead.`);if(!tA(r,["string","array"]))throw new tJ(`Expected second argument to be of type array or string, but found ${tv(t6(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},"index-of":class e{constructor(e,t,r){this.type=ti,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tu);if(!i||!n)return null;if(!tx(i.type,[to,tn,ti,tr,tu]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${tv(i.type)} instead`);if(4===t.length){let o=r.parse(t[3],3,ti);return o?new e(i,n,o):null}return new e(i,n)}evaluate(e){let t,r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!tA(r,["boolean","string","number","null"]))throw new tJ(`Expected first argument to be of type boolean, string, number or null, but found ${tv(t6(r))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),tA(i,["string"])){let e=i.indexOf(r,t);return -1===e?-1:[...i.slice(0,e)].length}if(tA(i,["array"]))return i.indexOf(r,t);throw new tJ(`Expected second argument to be of type array or string, but found ${tv(t6(i))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},interpolate:ry,"interpolate-hcl":ry,"interpolate-lab":ry,length:class e{constructor(e){this.type=ti,this.input=e}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=r.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?r.error(`Expected argument of type string or array, but found ${tv(i.type)} instead.`):new e(i):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new tJ(`Expected value to be of type string or array, but found ${tv(t6(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}},let:ra,literal:t7,match:class e{constructor(e,t,r,i,n,o){this.inputType=e,this.type=t,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o}static parse(t,r){let i,n;if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(n=r.expectedType);let o={},a=[];for(let e=2;e<t.length-1;e+=2){let s=t[e],l=t[e+1];Array.isArray(s)||(s=[s]);let u=r.concat(e);
169if(0===s.length)return u.error("Expected at least one branch label.");for(let e of s){if("number"!=typeof e&&"string"!=typeof e)return u.error("Branch labels must be numbers or strings.");if("number"==typeof e&&Math.abs(e)>Number.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,t6(e)))return null}else i=t6(e);if(void 0!==o[String(e)])return u.error("Branch labels must be unique.");o[String(e)]=a.length}let c=r.parse(l,e,n);if(!c)return null;n=n||c.type,a.push(c)}let s=r.parse(t[1],1,tu);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,n);return l?"value"!==s.type.kind&&r.concat(1).checkSubtype(i,s.type)?null:new e(i,n,s,o,a,l):null}evaluate(e){let t=this.input.evaluate(e);return(t6(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},number:re,"number-format":class e{constructor(e,t,r,i,n,o){this.type=tn,this.number=e,this.locale=t,this.currency=r,this.unit=i,this.minFractionDigits=n,this.maxFractionDigits=o}static parse(t,r){if(3!==t.length)return r.error("Expected two arguments.");let i=r.parse(t[1],1,ti);if(!i)return null;let n=t[2];if("object"!=typeof n||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let o=null;if(n.locale&&!(o=r.parse(n.locale,1,tn)))return null;let a=null;if(n.currency&&!(a=r.parse(n.currency,1,tn)))return null;let s=null;if(n.unit&&!(s=r.parse(n.unit,1,tn)))return null;if(a&&s)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&!(l=r.parse(n["min-fraction-digits"],1,ti)))return null;let u=null;return!n["max-fraction-digits"]||(u=r.parse(n["max-fraction-digits"],1,ti))?new e(i,o,a,s,l,u):null}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}
vendor: 1,077 bytes, line 169
169,object:re,slice:class e{constructor(e,t,r,i){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=i}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,ti);if(!i||!n)return null;if(!tx(i.type,[ty(tu),tn,tu]))return r.error(`Expected first argument to be of type array or string, but found ${tv(i.type)} instead`);if(4===t.length){let o=r.parse(t[3],3,ti);return o?new e(i.type,i,n,o):null}return new e(i.type,i,n)}evaluate(e){let t,r=this.input.evaluate(e),i=this.beginIndex.evaluate(e);if(this.endIndex&&(t=this.endIndex.evaluate(e)),tA(r,["string"]))return[...r].slice(i,t).join("");if(tA(r,["array"]))return r.slice(i,t);throw new tJ(`Expected first argument to be of type array or string, but found ${tv(t6(r))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},step:ru,string:re,"to-boolean":rr,"to-color":rr,"to-number":rr,"to-string":rr,var:rs,within:rH,distance:io,"global-state":ia};
169class il{constructor(e,t,r,i){this.name=e,this.type=t,this._evaluate=r,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){let r=e[0],i=il.definitions[r];if(!i)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);let n=Array.isArray(i)?i[0]:i.type,o=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,a=o.filter(([t])=>!Array.isArray(t)||t.length===e.length-1),s=null;for(let[i,o]of a){s=new ro(t.registry,id,t.path,null,t.scope);let a=[],l=!1;for(let t=1;t<e.length;t++){let r=e[t],n=Array.isArray(i)?i[t-1]:i.type,o=s.parse(r,1+a.length,n);if(!o){l=!0;break}a.push(o)}if(!l)if(Array.isArray(i)&&i.length!==a.length)s.error(`Expected ${i.length} arguments, but found ${a.length} instead.`);else{for(let e=0;e<a.length;e++){let t=Array.isArray(i)?i[e]:i.type,r=a[e];s.concat(e+1).checkSubtype(t,r.type)}if(0===s.errors.length)return new il(r,n,o,a)}}if(1===a.length)t.errors.push(...s.errors);else{let r=(a.length?a:o).map(([e])=>Array.isArray(e)?`(${e.map(tv).join(", ")})`:`(${tv(e.type)}...)`).join(" | "),i=[];for(let r=1;r<e.length;r++){let n=t.parse(e[r],1+i.length);if(!n)return null;i.push(tv(n.type))}t.error(`Expected arguments of type ${r}, but found (${i.join(", ")}) instead.`)}return null}static register(e,t){for(let r in il.definitions=t,t)e[r]=il}}function iu(e,[t,r,i,n]){t=t.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);let o=n?n.evaluate(e):1,a=t5(t,r,i,o);if(a)throw new tJ(a);return new tW(t/255,r/255,i/255,o,!1)}function ic(e,t){let r=t[e];return void 0===r?null:r}function ih(e){return{type:e}}function id(e){if(e instanceof rs)return id(e.boundExpression);if(e instanceof il&&"error"===e.name||e instanceof rM||e instanceof rH||e instanceof io||e instanceof ia)return!1;let t=e instanceof rr||e instanceof re,r=!0;return e.eachChild(e=>{r=t?r&&id(e):r&&e instanceof t7}),!!r&&ip(e)&&ig(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function ip(e){if(e instanceof il&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof rH||e instanceof io)return!1;let t=!0;return e.eachChild(e=>{t&&!ip(e)&&(t=!1)}),t}function im(e){if(e instanceof il&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!im(e)&&(t=!1)}),t}function ig(e,t){if(e instanceof il&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!ig(e,t)&&(r=!1)}),r}function iy(e){return{result:"success",value:e}}function iv(e){return{result:"error",value:e}}function ib(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function i_(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function ix(e){return!!e.expression&&e.expression.interpolated}function iA(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function iw(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&t6(e)===tl}function iS(e){return e}function iT(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function iC(e,t,r,i,n){return iT(typeof r===n?i[r]:void 0,e.default,t.default)}function iE(e,t,r){if("number"!==iA(r))return iT(e.default,t.default);let i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let n=rl(e.stops.map(e=>e[0]),r);return e.stops[n][1]}function iP(e,t,r){var i;let n,o,a=void 0!==e.base?e.base:1;if("number"!==iA(r))return iT(e.default,t.default);let s=e.stops.length;if(1===s||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[s-1][0])return e.stops[s-1][1];let l=rl(e.stops.map(e=>e[0]),r),u=(i=e.stops[l][0],n=e.stops[l+1][0]-i,o=r-i,0===n?0:1===a?o/n:(Math.pow(a,o)-1)/(Math.pow(a,n)-1)),c=e.stops[l][1],h=e.stops[l+1][1],d=rb[t.type]||iS;return"function"==typeof c.evaluate?{evaluate(...t){let r=c.evaluate.apply(void 0,t),i=h.evaluate.apply(void 0,t);
169if(void 0!==r&&void 0!==i)return d(r,i,u,e.colorSpace)}}:d(c,h,u,e.colorSpace)}function iI(e,t,r){switch(t.type){case"color":r=tW.parse(r);break;case"formatted":r=tK.fromString(r.toString());break;case"resolvedImage":r=t2.fromString(r.toString());break;case"padding":r=tX.parse(r);break;case"colorArray":r=tQ.parse(r);break;case"numberArray":r=tY.parse(r);break;default:iA(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0)}return iT(r,e.default,t.default)}il.register(is,{error:[{kind:"error"},[tn],(e,[t])=>{throw new tJ(t.evaluate(e))}],typeof:[tn,[tu],(e,[t])=>tv(t6(t.evaluate(e)))],"to-rgba":[ty(ti,4),[ta],(e,[t])=>{let[r,i,n,o]=t.evaluate(e).rgb;return[255*r,255*i,255*n,o]}],rgb:[ta,[ti,ti,ti],iu],rgba:[ta,[ti,ti,ti,ti],iu],has:{type:to,overloads:[[[tn],(e,[t])=>t.evaluate(e)in e.properties()],[[tn,tl],(e,[t,r])=>t.evaluate(e)in r.evaluate(e)]]},get:{type:tu,overloads:[[[tn],(e,[t])=>ic(t.evaluate(e),e.properties())],[[tn,tl],(e,[t,r])=>ic(t.evaluate(e),r.evaluate(e))]]},"feature-state":[tu,[tn],(e,[t])=>ic(t.evaluate(e),e.featureState||{})],properties:[tl,[],e=>e.properties()],"geometry-type":[tn,[],e=>e.geometryType()],id:[tu,[],e=>e.id()],zoom:[ti,[],e=>e.globals.zoom],"heatmap-density":[ti,[],e=>e.globals.heatmapDensity||0],elevation:[ti,[],e=>e.globals.elevation||0],"line-progress":[ti,[],e=>e.globals.lineProgress||0],accumulated:[tu,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[ti,ih(ti),(e,t)=>{let r=0;for(let i of t)r+=i.evaluate(e);return r}],"*":[ti,ih(ti),(e,t)=>{let r=1;for(let i of t)r*=i.evaluate(e);return r}],"-":{type:ti,overloads:[[[ti,ti],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[ti],(e,[t])=>-t.evaluate(e)]]},"/":[ti,[ti,ti],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[ti,[ti,ti],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[ti,[],()=>Math.LN2],pi:[ti,[],()=>Math.PI],e:[ti,[],()=>Math.E],"^":[ti,[ti,ti],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[ti,[ti],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[ti,[ti],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[ti,[ti],(e,[t])=>Math.log(t.evaluate(e))],log2:[ti,[ti],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[ti,[ti],(e,[t])=>Math.sin(t.evaluate(e))],cos:[ti,[ti],(e,[t])=>Math.cos(t.evaluate(e))],tan:[ti,[ti],(e,[t])=>Math.tan(t.evaluate(e))],asin:[ti,[ti],(e,[t])=>Math.asin(t.evaluate(e))],acos:[ti,[ti],(e,[t])=>Math.acos(t.evaluate(e))],atan:[ti,[ti],(e,[t])=>Math.atan(t.evaluate(e))],min:[ti,ih(ti),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[ti,ih(ti),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[ti,[ti],(e,[t])=>Math.abs(t.evaluate(e))],round:[ti,[ti],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[ti,[ti],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[ti,[ti],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[to,[tn,tu],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[to,[tu],(e,[t])=>e.id()===t.value],"filter-type-==":[to,[tn],(e,[t])=>e.geometryType()===t.value],"filter-<":[to,[tn,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<n}],"filter-id-<":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<i}],"filter->":[to,[tn,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>i}],"filter-<=":[to,[tn,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<=i}],"filter->=":[to,[tn,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>=i}],"filter-has":[to,[tu],(e,[t])=>t.value in e.properties()],"filter-has-id":[to,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[to,[ty(tn)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[to,[ty(tu)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[to,[tn,ty(tu)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[to,[tn,ty(tu)],(e,[t,r])=>(function(e,t,r,i){for(;r<=i;){let n=r+i>>1;if(t[n]===e)return!0;t[n]>e?i=n-1:r=n+1}
169return!1})(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:to,overloads:[[[to,to],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[ih(to),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:to,overloads:[[[to,to],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[ih(to),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[to,[to],(e,[t])=>!t.evaluate(e)],"is-supported-script":[to,[tn],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[tn,[tn],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[tn,[tn],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[tn,ih(tu),(e,t)=>t.map(t=>t8(t.evaluate(e))).join("")],split:[ty(tn),[tn,tn],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[tn,[ty(tn),tn],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[tn,[tc],(e,[t])=>t.evaluate(e).resolvedLocale()]});class iM{constructor(e,t,r){this.expression=e,this._warningHistory={},this._evaluator=new rn,this._defaultValue=t?function(e){if("color"===e.type&&iw(e.default))return new tW(0,0,0,0);switch(e.type){case"color":return tW.parse(e.default)||null;case"padding":return tX.parse(e.default)||null;case"numberArray":return tY.parse(e.default)||null;case"colorArray":return tQ.parse(e.default)||null;case"variableAnchorOffsetCollection":return t1.parse(e.default)||null;case"projectionDefinition":return t3.parse(e.default)||null;default:return void 0===e.default?null:e.default}}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null,this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,o){return this._globalState&&(e=ij(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,n,o){this._globalState&&(e=ij(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new tJ(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"u">typeof console&&console.warn(e.message)),this._defaultValue}}}function ik(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in is}function iO(e,t,r){let i,n=new ro(is,id,[],t?(i={color:ta,string:tn,number:ti,enum:tn,boolean:to,formatted:th,padding:td,numberArray:tf,colorArray:tp,projectionDefinition:ts,resolvedImage:tm,variableAnchorOffsetCollection:tg},"array"===t.type?ty(i[t.value]||tu,t.length):i[t.type]):void 0),o=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return o?iy(new iM(o,t,r)):iv(n.errors)}class iD{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!im(t.expression),this.globalStateRefs=iF(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,o){return this._globalState&&(e=ij(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,o)}evaluate(e,t,r,i,n,o){return this._globalState&&(e=ij(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,o)}}class iR{constructor(e,t,r,i,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!im(t.expression),this.globalStateRefs=iF(t.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(e,t,r,i,n,o){return this._globalState&&(e=ij(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,o)}evaluate(e,t,r,i,n,o){return this._globalState&&(e=ij(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,o)}interpolationFactor(e,t,r){return this.interpolationType?ry.interpolationFactor(this.interpolationType,e,t,r):0}}function iL(e,t,r){let i=iO(e,t,r);if("error"===i.result)return i;let n=i.value.expression,o=ip(n);if(!o&&!ib(t))return iv([new te("","data expressions not supported")]);let a=ig(n,["zoom"]);if(!a&&!i_(t))return iv([new te("","zoom expressions not supported")]);let s=function e(t){let r=null;if(t instanceof ra)r=e(t.result);else if(t instanceof r_){for(let i of t.args)if(r=e(i))break}else(t instanceof ru||t instanceof ry)&&t.input instanceof il&&"zoom"===t.input.name&&(r=t);return r instanceof te||t.eachChild(t=>{let i=e(t);i instanceof te?r=i:!r&&i?r=new te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new te("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(n);return s||a?s instanceof te?iv([s]):s instanceof ry&&!ix(t)?iv([new te("",'"interpolate" expressions cannot be used with this property')]):iy(s?new iR(o?"camera":"composite",i.value,s.labels,s instanceof ry?s.interpolation:void 0,r):new iD(o?"constant":"source",i.value,r)):iv([new te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class iB{constructor(e,t){this._parameters=e,this._specification=t,e9(this,function e(t,r){var i;let n,o,a=t.stops&&"object"==typeof t.stops[0][0],s=a||!(a||void 0!==t.property),l=t.type||(ix(r)?"exponential":"interval"),u=function(e){switch(e.type){case"color":return tW.parse;case"padding":return tX.parse;case"numberArray":return tY.parse;case"colorArray":return tQ.parse;default:return null}}(r);if(u&&((t=e9({},t)).stops&&(t.stops=t.stops.map(e=>[e[0],u(e[1])])),t.default=u(t.default?t.default:r.default)),t.colorSpace&&"rgb"!==(i=t.colorSpace)&&"hcl"!==i&&"lab"!==i)throw Error(`Unknown color space: "${t.colorSpace}"`);let c=function(e){switch(e){case"exponential":return iP;case"interval":return iE;case"categorical":return iC;case"identity":return iI;default:throw Error(`Unknown function type "${e}"`)}}(l);if("categorical"===l){for(let e of(n=Object.create(null),t.stops))n[e[0]]=e[1];o=typeof t.stops[0][0]}if(a){let i={},n=[];for(let e=0;e<t.stops.length;e++){let r=t.stops[e],o=r[0].zoom;void 0===i[o]&&(i[o]={zoom:o,type:t.type,property:t.property,default:t.default,stops:[]},n.push(o)),i[o].stops.push([r[0].value,r[1]])}let o=[];for(let t of n)o.push([i[t].zoom,e(i[t],r)]);let a={name:"linear"};return{kind:"composite",interpolationType:a,interpolationFactor:ry.interpolationFactor.bind(void 0,a),zoomStops:o.map(e=>e[0]),evaluate:({zoom:e},i)=>iP({stops:o,base:t.base},r,e).evaluate(e,i)}}if(s){let e="exponential"===l?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:e,interpolationFactor:ry.interpolationFactor.bind(void 0,e),zoomStops:t.stops.map(e=>e[0]),evaluate:({zoom:e})=>c(t,r,e,n,o)}}return{kind:"source",evaluate(e,i){let a=i&&i.properties?i.properties[t.property]:void 0;return void 0===a?iT(t.default,r.default):c(t,r,a,n,o)}}}(this._parameters,this._specification))}static deserialize(e){return new iB(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function iF(e,t=new Set){return e instanceof ia&&t.add(e.key),e.eachChild(e=>{iF(e,t)}),t}function ij(e,t){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:o,isSupportedScript:a,accumulated:s}=null!=e?e:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:o,isSupportedScript:a,accumulated:s,globalState:t}}function iz(e){if(!0===e||!1===e)return!0;
169if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(let t of e.slice(1))if(!iz(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}let iN={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function iG(e,t){if(null==e)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};iz(e)||(e=function e(t){if(!t)return!0;let r=t[0];return t.length<=1?"any"!==r:"=="===r?iU(t[1],t[2],"=="):"!="===r?iq(iU(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?iU(t[1],t[2],r):"any"===r?["any"].concat(t.slice(1).map(e)):"all"===r?["all"].concat(t.slice(1).map(e)):"none"===r?["all"].concat(t.slice(1).map(e).map(iq)):"in"===r?iH(t[1],t.slice(2)):"!in"===r?iq(iH(t[1],t.slice(2))):"has"===r?iW(t[1]):"!has"!==r||iq(iW(t[1]))}(e));let r=iO(e,iN,t);if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,t,i)=>r.value.evaluate(e,t,{},i),needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let r=1;r<t.length;r++)if(e(t[r]))return!0;return!1}(e),getGlobalStateRefs:()=>iF(r.value.expression)}}function iV(e,t){return e<t?-1:+(e>t)}function iU(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function iH(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(iV)]]:["filter-in-small",e,["literal",t]]}}function iW(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function iq(e){return["!",e]}function iZ(e){let t=e.value;return t?[new e7(e.key,t,"constants have been deprecated as of v8")]:[]}function i$(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function iK(e){if(Array.isArray(e))return e.map(iK);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=iK(e[r]);return t}return i$(e)}function iX(e){let t=e.key,r=e.value,i=e.valueSpec||{},n=e.objectElementValidators||{},o=e.style,a=e.styleSpec,s=e.validateSpec,l=[],u=iA(r);if("object"!==u)return[new e7(t,r,`object expected, ${u} found`)];for(let e in r){let u,c=e.split(".")[0],h=tj(i,c)||i["*"];if(tj(n,c))u=n[c];else if(tj(i,c)){if(void 0===r[e])continue;u=s}else if(n["*"])u=n["*"];else{if(!i["*"]){l.push(new e7(t,r[e],`unknown property "${e}"`));continue}u=s}l=l.concat(u({key:(t?`${t}.`:t)+e,value:r[e],valueSpec:h,style:o,styleSpec:a,object:r,objectKey:e,validateSpec:s},r))}for(let e in i)n[e]||i[e].required&&void 0===i[e].default&&void 0===r[e]&&l.push(new e7(t,r,`missing required property "${e}"`));return l}function iY(e){let t=e.value,r=e.valueSpec,i=e.style,n=e.styleSpec,o=e.key,a=e.arrayElementValidator||e.validateSpec;if("array"!==iA(t))return[new e7(o,t,`array expected, ${iA(t)} found`)];if(r.length&&t.length!==r.length)return[new e7(o,t,`array length ${r.length} expected, length ${t.length} found`)];let s={type:r.value,values:r.values};n.$version<7&&(s.function=r.function),"object"===iA(r.value)&&(s=r.value);let l=[];for(let r=0;r<t.length;r++)l=l.concat(a({array:t,arrayIndex:r,value:t[r],valueSpec:s,validateSpec:e.validateSpec,style:i,styleSpec:n,key:`${o}[${r}]`}));return l}function iQ(e){let t=e.key,r=e.value,i=e.valueSpec,n=iA(r);return"number"===n&&r!=r&&(n="NaN"),"number"!==n?[new e7(t,r,`number expected, ${n} found`)]:"minimum"in i&&r<i.minimum?[new e7(t,r,`${r} is less than the minimum value ${i.minimum}`)]:"maximum"in i&&r>i.maximum?[new e7(t,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]}function iJ(e){let t=e.valueSpec,r=i$(e.value.type),i,n,o,a={},s="categorical"!==r&&void 0===e.value.property,l="array"===iA(e.value.stops)&&"array"===iA(e.value.stops[0])&&"object"===iA(e.value.stops[0][0]),u=iX({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new e7(e.key,e.value,'identity function may not have a "stops" property')];let t=[],i=e.value;return t=t.concat(iY({key:e.key,value:i,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:c}
169)),"array"===iA(i)&&0===i.length&&t.push(new e7(e.key,i,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&u.push(new e7(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||u.push(new e7(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!ix(e.valueSpec)&&u.push(new e7(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(s||ib(e.valueSpec)?s&&!i_(e.valueSpec)&&u.push(new e7(e.key,e.value,"zoom functions not supported")):u.push(new e7(e.key,e.value,"property functions not supported"))),("categorical"===r||l)&&void 0===e.value.property&&u.push(new e7(e.key,e.value,'"property" property is required')),u;function c(e){let r=[],i=e.value,s=e.key;if("array"!==iA(i))return[new e7(s,i,`array expected, ${iA(i)} found`)];if(2!==i.length)return[new e7(s,i,`array length 2 expected, length ${i.length} found`)];if(l){if("object"!==iA(i[0]))return[new e7(s,i,`object expected, ${iA(i[0])} found`)];if(void 0===i[0].zoom)return[new e7(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new e7(s,i,"object stop key must have value")];if(o&&o>i$(i[0].zoom))return[new e7(s,i[0].zoom,"stop zoom values must appear in ascending order")];i$(i[0].zoom)!==o&&(o=i$(i[0].zoom),n=void 0,a={}),r=r.concat(iX({key:`${s}[0]`,value:i[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:iQ,value:h}}))}else r=r.concat(h({key:`${s}[0]`,value:i[0],validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},i));return ik(iK(i[1]))?r.concat([new e7(`${s}[1]`,i[1],"expressions are not allowed in function stops.")]):r.concat(e.validateSpec({key:`${s}[1]`,value:i[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function h(e,o){let s=iA(e.value),l=i$(e.value),u=null!==e.value?e.value:o;if(i){if(s!==i)return[new e7(e.key,u,`${s} stop domain type must match previous stop domain type ${i}`)]}else i=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new e7(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){let i=`number expected, ${s} found`;return ib(t)&&void 0===r&&(i+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new e7(e.key,u,i)]}return"categorical"!==r||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&void 0!==n&&l<n?[new e7(e.key,u,"stop domain values must appear in ascending order")]:(n=l,"categorical"===r&&l in a?[new e7(e.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new e7(e.key,u,`integer expected, found ${l}`)]}}function i0(e){let t=("property"===e.expressionContext?iL:iO)(iK(e.value),e.valueSpec);if("error"===t.result)return t.value.map(t=>new e7(`${e.key}${t.key}`,e.value,t.message));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new e7(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!im(r))return[new e7(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!im(r))return[new e7(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!ig(r,["zoom","feature-state"]))return[new e7(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!ip(r))return[new e7(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function i1(e){let t=e.key,r=e.value,i=iA(r);return"string"!==i?[new e7(t,r,`color expected, ${i} found`)]:tW.parse(String(r))?[]:[new e7(t,r,`color expected, "${r}" found`)]}function i2(e){let t=e.key,r=e.value,i=e.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(i$(r))&&n.push(new e7(t,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(i.values).indexOf(i$(r))&&n.push(new e7(t,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function i3(e){return iz(iK(e.value))?i0(e9({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){let r=t.value,i=t.key;if("array"!==iA(r))return[new e7(i,r,`array expected, ${iA(r)} found`)];let n=t.styleSpec,o,a=[];if(r.length<1)return[new e7(i,r,"filter array must have at least 1 element")];switch(a=a.concat(i2({key:`${i}[0]`,value:r[0],valueSpec:n.filter_operator,style:t.style,styleSpec:t.styleSpec})),i$(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===i$(r[1])&&a.push(new e7(i,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":3!==r.length&&a.push(new e7(i,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&"string"!==(o=iA(r[1]))&&a.push(new e7(`${i}[1]`,r[1],`string expected, ${o} found`));for(let e=2;e<r.length;e++)o=iA(r[e]),"$type"===i$(r[1])?a=a.concat(i2({key:`${i}[${e}]`,value:r[e],valueSpec:n.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==o&&"number"!==o&&"boolean"!==o&&a.push(new e7(`${i}[${e}]`,r[e],`string, number, or boolean expected, ${o} found`));break;case"any":case"all":case"none":for(let n=1;n<r.length;n++)a=a.concat(e({key:`${i}[${n}]`,value:r[n],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":o=iA(r[1]),2!==r.length?a.push(new e7(i,r,`filter array for "${r[0]}" operator must have 2 elements`)):"string"!==o&&a.push(new e7(`${i}[1]`,r[1],`string expected, ${o} found`))}return a}(e)}function i5(e,t){let r,i=e.key,n=e.validateSpec,o=e.style,a=e.styleSpec,s=e.value,l=e.objectKey,u=a[`${t}_${e.layerType}`];if(!u)return[];let c=l.match(/^(.*)-transition$/);if("paint"===t&&c&&u[c[1]]&&u[c[1]].transition)return n({key:i,value:s,valueSpec:a.transition,style:o,styleSpec:a});let h=e.valueSpec||u[l];if(!h)return[new e7(i,s,`unknown property "${l}"`)];if("string"===iA(s)&&ib(h)&&!h.tokens&&(r=/^{([^}]+)}$/.exec(s)))return[new e7(i,s,`"${l}" does not support interpolation syntax
170Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(r[1])} }\`.`)];let d=[];return"symbol"===e.layerType&&"text-font"===l&&iw(iK(s))&&"identity"===i$(s.type)&&d.push(new e7(i,s,'"text-font" does not support identity functions')),d.concat(n({key:e.key,value:s,valueSpec:h,style:o,styleSpec:a,expressionContext:"property",propertyType:t,propertyKey:l}))}function i4(e){return i5(e,"paint")}function i6(e){return i5(e,"layout")}function i8(e){var t,r;
170let i=[],n=e.value,o=e.key,a=e.style,s=e.styleSpec;if("object"!==iA(n))return[new e7(o,n,`object expected, ${iA(n)} found`)];n.type||n.ref||i.push(new e7(o,n,'either "type" or "ref" is required'));let l=i$(n.type),u=i$(n.ref);if(n.id){let t=i$(n.id);for(let r=0;r<e.arrayIndex;r++){let e=a.layers[r];i$(e.id)===t&&i.push(new e7(o,n.id,`duplicate layer id "${n.id}", previously used at line ${e.id.__line__}`))}}if("ref"in n){let e;["type","source","source-layer","filter","layout"].forEach(e=>{e in n&&i.push(new e7(o,n[e],`"${e}" is prohibited for ref layers`))}),a.layers.forEach(t=>{i$(t.id)===u&&(e=t)}),e?e.ref?i.push(new e7(o,n.ref,"ref cannot reference another ref layer")):l=i$(e.type):i.push(new e7(o,n.ref,`ref layer "${u}" not found`))}else if("background"!==l)if(n.source){let e=a.sources&&a.sources[n.source],t=e&&i$(e.type);e?"vector"===t&&"raster"===l?i.push(new e7(o,n.source,`layer "${n.id}" requires a raster source`)):"raster-dem"!==t&&"hillshade"===l||"raster-dem"!==t&&"color-relief"===l?i.push(new e7(o,n.source,`layer "${n.id}" requires a raster-dem source`)):"raster"===t&&"raster"!==l?i.push(new e7(o,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==t||n["source-layer"]?"raster-dem"===t&&"hillshade"!==l&&"color-relief"!==l?i.push(new e7(o,n.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===l&&n.paint&&n.paint["line-gradient"]&&("geojson"!==t||!e.lineMetrics)&&i.push(new e7(o,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):i.push(new e7(o,n,`layer "${n.id}" must specify a "source-layer"`)):i.push(new e7(o,n.source,`source "${n.source}" not found`))}else i.push(new e7(o,n,'missing required property "source"'));return"raster"===l&&(null==(t=n.paint)?void 0:t.resampling)&&(null==(r=n.paint)?void 0:r["raster-resampling"])&&i.push(new e7(o,n.paint,`layer "${n.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),i=i.concat(iX({key:o,value:n,valueSpec:s.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${o}.type`,value:n.type,valueSpec:s.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:n,objectKey:"type"}),filter:i3,layout:e=>iX({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>i6(e9({layerType:l},e))}}),paint:e=>iX({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>i4(e9({layerType:l},e))}})}}))}function i7(e){let t=e.value,r=e.key,i=iA(t);return"string"!==i?[new e7(r,t,`string expected, ${i} found`)]:[]}let i9={promoteId:function({key:e,value:t}){if("string"===iA(t))return i7({key:e,value:t});{let r=[];for(let i in t)r.push(...i7({key:`${e}.${i}`,value:t[i]}));return r}}};function ne(e){let t,r=e.value,i=e.key,n=e.styleSpec,o=e.style,a=e.validateSpec;if(!r.type)return[new e7(i,r,'"type" is required')];let s=i$(r.type);switch(s){case"vector":case"raster":return iX({key:i,value:r,valueSpec:n[`source_${s.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:i9,validateSpec:a});case"raster-dem":return function(e){var t;let r=null!=(t=e.sourceName)?t:"",i=e.value,n=e.styleSpec,o=n.source_raster_dem,a=e.style,s=[],l=iA(i);if(void 0===i)return s;if("object"!==l)return s.push(new e7("source_raster_dem",i,`object expected, ${l} found`)),s;let u="custom"===i$(i.encoding),c=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in i)!u&&c.includes(t)?s.push(new e7(t,i[t],`In "${r}": "${t}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):o[t]?s=s.concat(e.validateSpec({key:t,value:i[t],valueSpec:o[t],validateSpec:e.validateSpec,style:a,styleSpec:n})):s.push(new e7(t,i[t],`unknown property "${t}"`));return s}({sourceName:i,value:r,style:e.style,styleSpec:n,validateSpec:a});case"geojson":if(t=iX({key:i,value:r,valueSpec:n.source_geojson,style:o,styleSpec:n,validateSpec:a,objectElementValidators:i9}
170),r.cluster)for(let e in r.clusterProperties){let[n,o]=r.clusterProperties[e],a="string"==typeof n?[n,["accumulated"],["get",e]]:n;t.push(...i0({key:`${i}.${e}.map`,value:o,expressionContext:"cluster-map"})),t.push(...i0({key:`${i}.${e}.reduce`,value:a,expressionContext:"cluster-reduce"}))}return t;case"video":return iX({key:i,value:r,valueSpec:n.source_video,style:o,validateSpec:a,styleSpec:n});case"image":return iX({key:i,value:r,valueSpec:n.source_image,style:o,validateSpec:a,styleSpec:n});case"canvas":return[new e7(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return i2({key:`${i}.type`,value:r.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function nt(e){let t=e.value,r=e.styleSpec,i=r.light,n=e.style,o=[],a=iA(t);if(void 0===t)return o;if("object"!==a)return o.concat([new e7("light",t,`object expected, ${a} found`)]);for(let a in t){let s=a.match(/^(.*)-transition$/);o=o.concat(s&&i[s[1]]&&i[s[1]].transition?e.validateSpec({key:a,value:t[a],valueSpec:r.transition,validateSpec:e.validateSpec,style:n,styleSpec:r}):i[a]?e.validateSpec({key:a,value:t[a],valueSpec:i[a],validateSpec:e.validateSpec,style:n,styleSpec:r}):[new e7(a,t[a],`unknown property "${a}"`)])}return o}function nr(e){let t=e.value,r=e.styleSpec,i=r.sky,n=e.style,o=iA(t);if(void 0===t)return[];if("object"!==o)return[new e7("sky",t,`object expected, ${o} found`)];let a=[];for(let o in t)a=a.concat(i[o]?e.validateSpec({key:o,value:t[o],valueSpec:i[o],style:n,styleSpec:r}):[new e7(o,t[o],`unknown property "${o}"`)]);return a}function ni(e){let t=e.value,r=e.styleSpec,i=r.terrain,n=e.style,o=[],a=iA(t);if(void 0===t)return o;if("object"!==a)return o.concat([new e7("terrain",t,`object expected, ${a} found`)]);for(let a in t)o=o.concat(i[a]?e.validateSpec({key:a,value:t[a],valueSpec:i[a],validateSpec:e.validateSpec,style:n,styleSpec:r}):[new e7(a,t[a],`unknown property "${a}"`)]);return o}function nn(e){let t=[],r=e.value,i=e.key;if(Array.isArray(r)){let n=[],o=[];for(let a in r)r[a].id&&n.includes(r[a].id)&&t.push(new e7(i,r,`all the sprites' ids must be unique, but ${r[a].id} is duplicated`)),n.push(r[a].id),r[a].url&&o.includes(r[a].url)&&t.push(new e7(i,r,`all the sprites' URLs must be unique, but ${r[a].url} is duplicated`)),o.push(r[a].url),t=t.concat(iX({key:`${i}[${a}]`,value:r[a],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return i7({key:i,value:r})}function no(e){return!!e&&e.constructor===Object}function na(e){return no(e.value)?[]:[new e7(e.key,e.value,`object expected, ${iA(e.value)} found`)]}let ns={"*":()=>[],array:iY,boolean:function(e){let t=e.value,r=e.key,i=iA(t);return"boolean"!==i?[new e7(r,t,`boolean expected, ${i} found`)]:[]},number:iQ,color:i1,constants:iZ,enum:i2,filter:i3,function:iJ,layer:i8,object:iX,source:ne,light:nt,sky:nr,terrain:ni,projection:function(e){let t=e.value,r=e.styleSpec,i=r.projection,n=e.style,o=iA(t);if(void 0===t)return[];if("object"!==o)return[new e7("projection",t,`object expected, ${o} found`)];let a=[];for(let o in t)a=a.concat(i[o]?e.validateSpec({key:o,value:t[o],valueSpec:i[o],style:n,styleSpec:r}):[new e7(o,t[o],`unknown property "${o}"`)]);return a},projectionDefinition:function(e){var t;let r=e.key,i=e.value,n=iA(i=i instanceof String?i.valueOf():i);return"array"!==n||Array.isArray(t=i)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]||["interpolate","step","literal"].includes(i[0])?["array","string"].includes(n)?[]:[new e7(r,i,`projection expected, invalid type "${n}" found`)]:[new e7(r,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:i7,formatted:function(e){return 0===i7(e).length?[]:i0(e)},resolvedImage:function(e){return 0===i7(e).length?[]:i0(e)},padding:function(e){let t=e.key,r=e.value;if("array"===iA(r)){if(r.length<1||r.length>4)return[new e7(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let o=0;o<r.length;o++)n=n.concat(e.validateSpec({key:`${t}[${o}
170]`,value:r[o],validateSpec:e.validateSpec,valueSpec:i}));return n}return iQ({key:t,value:r,valueSpec:{}})},numberArray:function(e){let t=e.key,r=e.value;if("array"===iA(r)){let i={type:"number"};if(r.length<1)return[new e7(t,r,"array length at least 1 expected, length 0 found")];let n=[];for(let o=0;o<r.length;o++)n=n.concat(e.validateSpec({key:`${t}[${o}]`,value:r[o],validateSpec:e.validateSpec,valueSpec:i}));return n}return iQ({key:t,value:r,valueSpec:{}})},colorArray:function(e){let t=e.key,r=e.value;if("array"===iA(r)){if(r.length<1)return[new e7(t,r,"array length at least 1 expected, length 0 found")];let e=[];for(let i=0;i<r.length;i++)e=e.concat(i1({key:`${t}[${i}]`,value:r[i]}));return e}return i1({key:t,value:r})},variableAnchorOffsetCollection:function(e){let t=e.key,r=e.value,i=iA(r),n=e.styleSpec;if("array"!==i||r.length<1||r.length%2!=0)return[new e7(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let o=[];for(let i=0;i<r.length;i+=2)o=(o=o.concat(i2({key:`${t}[${i}]`,value:r[i],valueSpec:n.layout_symbol["text-anchor"]}))).concat(iY({key:`${t}[${i+1}]`,value:r[i+1],valueSpec:{length:2,value:"number"},validateSpec:e.validateSpec,style:e.style,styleSpec:n}));return o},sprite:nn,state:na,fontFaces:function(e){let t=e.key,r=e.value,i=e.validateSpec,n=e.styleSpec,o=e.style;if(!no(r))return[new e7(t,r,`object expected, ${iA(r)} found`)];let a=[];for(let e in r){let s=r[e],l=iA(s);if("string"===l)a.push(...i7({key:`${t}.${e}`,value:s}));else if("array"===l){let r={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[l,u]of s.entries())a.push(...iX({key:`${t}.${e}[${l}]`,value:u,valueSpec:r,styleSpec:n,style:o,validateSpec:i}))}else a.push(new e7(`${t}.${e}`,s,`string or array expected, ${l} found`))}return a}};function nl(e){let t=e.value,r=e.valueSpec,i=e.styleSpec;return e.validateSpec=nl,r.expression&&iw(i$(t))?iJ(e):r.expression&&ik(iK(t))?i0(e):r.type&&ns[r.type]?ns[r.type](e):iX(e9({},e,{valueSpec:r.type?i[r.type]:r}))}function nu(e){let t=e.value,r=e.key,i=i7(e);return i.length||(-1===t.indexOf("{fontstack}")&&i.push(new e7(r,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&i.push(new e7(r,t,'"glyphs" url must include a "{range}" token'))),i}function nc(e,t=eJ){let r=[];return r=r.concat(nl({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:nl,objectElementValidators:{glyphs:nu,"*":()=>[]}})),e.constants&&(r=r.concat(iZ({key:"constants",value:e.constants}))),nd(r)}function nh(e){return function(t){return e(Object.assign({},t,{validateSpec:nl}))}}function nd(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function np(e){return function(...t){return nd(e.apply(this,t))}}nc.source=np(nh(ne)),nc.sprite=np(nh(nn)),nc.glyphs=np(nh(nu)),nc.light=np(nh(nt)),nc.sky=np(nh(nr)),nc.terrain=np(nh(ni)),nc.state=np(nh(na)),nc.layer=np(nh(i8)),nc.filter=np(nh(i3)),nc.paintProperty=np(nh(i4)),nc.layoutProperty=np(nh(i6));let nf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class nm{constructor(e,t){this._globalState=t,this.setValue(e)}evaluate(){var e;return null!=(e=this._literalValue)?e:this._compiledValue.evaluate({})}setValue(e){if(null==e||"visible"===e||"none"===e)return this._literalValue="none"===e?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let t=iO(e,nf,this._globalState);if("error"===t.result)throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=iF(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let ng=nc.light,ny=nc.sky,nv=nc.paintProperty,nb=nc.layoutProperty;function n_(e,t){let r=!1;if(null==t?void 0:t.length)for(let i of t)e.fire(new eY(Error(i.message))),r=!0;return r}class nx{constructor(e,t,r){let i=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let n=new Int32Array(this.arrayBuffer);e=n[0],this.d=(t=n[1])+2*(r=n[2]);for(let e=0;e<this.d*this.d;e++){let t=n[3+e],r=n[3+e+1];i.push(t===r?null:n.subarray(t,r))}let o=n[3+i.length+1];this.keys=n.subarray(n[3+i.length],o),this.bboxes=n.subarray(o),this.insert=this._insertReadonly}else{this.d=t+2*r;for(let e=0;e<this.d*this.d;e++)i.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=r,this.scale=t/e,this.uid=0;let n=r/t*e;this.min=-n,this.max=e+n}
170insert(e,t,r,i,n){this._forEachCell(t,r,i,n,this._insertCell,this.uid++,void 0,void 0),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)}_insertReadonly(){throw Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(e,t,r,i,n,o){this.cells[n].push(o)}query(e,t,r,i,n){let o=this.min,a=this.max;if(e<=o&&t<=o&&a<=r&&a<=i&&!n)return[...this.keys];{let o=[];return this._forEachCell(e,t,r,i,this._queryCell,o,{},n),o}}_queryCell(e,t,r,i,n,o,a,s){let l=this.cells[n];if(null!==l){let n=this.keys,u=this.bboxes;for(let c of l)if(void 0===a[c]){let l=4*c;(s?s(u[l+0],u[l+1],u[l+2],u[l+3]):e<=u[l+2]&&t<=u[l+3]&&r>=u[l+0]&&i>=u[l+1])?(a[c]=!0,o.push(n[c])):a[c]=!1}}}_forEachCell(e,t,r,i,n,o,a,s){let l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(r),h=this._convertToCellCoord(i);for(let d=l;d<=c;d++)for(let l=u;l<=h;l++){let u=this.d*l+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(l),this._convertFromCellCoord(d+1),this._convertFromCellCoord(l+1)))&&n.call(this,e,t,r,i,u,o,a,s))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,t=3+this.cells.length+1+1,r=0;for(let e of this.cells)r+=e.length;let i=new Int32Array(t+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;let n=t;for(let t=0;t<e.length;t++){let r=e[t];i[3+t]=n,i.set(r,n),n+=r.length}return i[3+e.length]=n,i.set(this.keys,n),n+=this.keys.length,i[3+e.length+1]=n,i.set(this.bboxes,n),n+=this.bboxes.length,i.buffer}static serialize(e,t){let r=e.toArrayBuffer();return t&&t.push(r),{buffer:r}}static deserialize(e){return new nx(e.buffer)}}let nA={};function nw(e,t,r={}){if(nA[e])throw Error(`${e} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),nA[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}for(let e in nw("Object",Object),nw("Set",Set),nw("TransferableGridIndex",nx),nw("Color",tW),nw("Error",Error),nw("AJAXError",eH),nw("ResolvedImage",t2),nw("StylePropertyFunction",iB),nw("StyleExpression",iM,{omit:["_evaluator"]}),nw("ZoomDependentExpression",iR),nw("ZoomConstantExpression",iD),nw("CompoundExpression",il,{omit:["_evaluate"]}),is)is[e]._classRegistryKey||nw(`Expression_${e}`,is[e]);function nS(e){var t;return e&&"u">typeof ArrayBuffer&&(e instanceof ArrayBuffer||"ArrayBuffer"===(null==(t=e.constructor)?void 0:t.name))}function nT(e){return e.$name||e.constructor._classRegistryKey}function nC(e){return!function(e){if(null===e||"object"!=typeof e)return!1;let t=nT(e);return t&&"Object"!==t}(e)&&(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||nS(e)||eI(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function nE(e,t){if(nC(e))return(nS(e)||eI(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let r=[];for(let i of e)r.push(nE(i,t));return r}if("object"!=typeof e)throw Error("can't serialize object of type "+typeof e);let r=nT(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!nA[r])throw Error(`${r} is not registered.`);let{klass:i}=nA[r],n=i.serialize?i.serialize(e,t):{};if(i.serialize){if(n===(null==t?void 0:t[t.length-1]))throw Error("statically serialized object won't survive transfer of $name property")}else{for(let i in e){if(!e.hasOwnProperty(i)||nA[r].omit.includes(i))continue;let o=e[i];n[i]=nA[r].shallow.includes(i)?o:nE(o,t)}e instanceof Error&&(n.message=e.message)}if(n.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(n.$name=r),n}function nP(e){if(nC(e))return e;if(Array.isArray(e))return e.map(nP);if("object"!=typeof e)throw Error("can't deserialize object of type "+typeof e);let t=nT(e)||"Object";if(!nA[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=nA[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let i=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let n=e[r];i[r]=nA[t].shallow.includes(r)?n:nP(n)}return i}class nI{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=r,!0))}}function nM(e){return/[\u02EA\u02EB\u1100-\u11FF\u1400-\u167F\u18B0-\u18F5\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3007\u3012\u3013\u3020-\u302F\u3031-\u303F\u3041-\u3096\u309D-\u30FB\u30FD-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFE4\uDFF0-\uDFF6]|[\uD81C-\uD822\uD83D\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD30-\uDEFB]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83C[\uDC00-\uDE00\uDF00-\uDFFF]|\uD83E[\uDD00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function nk(e){return/\s/u.test(String.fromCodePoint(e))}function nO(e){for(let t of e)if(nM(t.codePointAt(0)))return!0;return!1}function nD(e){return RegExp(e.map(e=>{try{return RegExp(`\\p{sc=${e}}`,"u").source}catch(e){return null}}).filter(e=>e).join("|"),"u")}let nR=nD(["Arab","Dupl","Mong","Ougr","Syrc"]);function nL(e){return!(nM(e)||/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e)))}
170let nB=nD(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function nF(e){return nB.test(String.fromCodePoint(e))}let nj=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(nj.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,t){return _(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if("loading"!==e.pluginStatus)return this.setState(e),e;let r=e.pluginURL,i=new Promise(e=>{this.loadScriptResolve=e});t(r);let n=new Promise(e=>setTimeout(()=>e(),this.TIMEOUT));if(yield Promise.race([i,n]),this.isParsed()){let e={pluginStatus:"loaded",pluginURL:r};return this.setState(e),e}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};class nz{constructor(e,t){this.isSupportedScript=nN,this.zoom=e,t?(this.now=t.now||0,this.fadeDuration=t.fadeDuration||0,this.zoomHistory=t.zoomHistory||new nI,this.transition=t.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new nI,this.transition={})}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}}function nN(e){var t,r="loaded"===nj.getRTLTextPluginStatus();for(let i of e)if(t=i.codePointAt(0),!r&&nF(t)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(t)))return!1;return!0}let nG="-transition";class nV{constructor(e,t,r){this.property=e,this.value=t,this.expression=function(e,t,r){if(iw(e))return new iB(e,t);if(ik(e)){let i=iL(e,t,r);if("error"===i.result)throw Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));return i.value}{let r=e;return"color"===t.type&&"string"==typeof e?r=tW.parse(e):"padding"===t.type&&("number"==typeof e||Array.isArray(e))?r=tX.parse(e):"numberArray"===t.type&&("number"==typeof e||Array.isArray(e))?r=tY.parse(e):"colorArray"===t.type&&("string"==typeof e||Array.isArray(e))?r=tQ.parse(e):"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)?r=t1.parse(e):"projectionDefinition"===t.type&&"string"==typeof e&&(r=t3.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification,r)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class nU{constructor(e,t){this.property=e,this.value=new nV(e,void 0,t)}transitioned(e,t){return new nW(this.property,this.value,t,eb({},e.transition,this.transition),e.now)}untransitioned(){return new nW(this.property,this.value,null,{},0)}}class nH{constructor(e,t){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=t}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return ew(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new nU(this._values[e].property,this._globalState)),this._values[e].value=new nV(this._values[e].property,null===t?void 0:e
170w(t),this._globalState)}getTransition(e){return ew(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new nU(this._values[e].property,this._globalState)),this._values[e].transition=ew(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let i=this.getTransition(t);void 0!==i&&(e[`${t}${nG}`]=i)}return e}transitioned(e,t){let r=new nq(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(e,t._values[i]);return r}untransitioned(){let e=new nq(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class nW{constructor(e,t,r,i,n){this.property=e,this.value=t,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,e.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let i=e.now||0,n=this.value.possiblyEvaluate(e,t,r),o=this.prior;if(o){if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return o.possiblyEvaluate(e,t,r);{let a=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(e,t,r),n,ef(a))}}return n}}class nq{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,r){let i=new nK(this._properties);for(let n of Object.keys(this._values))i._values[n]=this._values[n].possiblyEvaluate(e,t,r);return i}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class nZ{constructor(e,t){this._properties=e,this._values=Object.create(e.defaultPropertyValues),this._globalState=t}hasValue(e){return void 0!==this._values[e].value}hasProperty(e){return e in this._properties.defaultPropertyValues}getValue(e){return ew(this._values[e].value)}setValue(e,t){this._values[e]=new nV(this._values[e].property,null===t?void 0:ew(t),this._globalState)}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r)}return e}possiblyEvaluate(e,t,r){let i=new nK(this._properties);for(let n of Object.keys(this._values))i._values[n]=this._values[n].possiblyEvaluate(e,t,r);return i}}class n${constructor(e,t,r){this.property=e,this.value=t,this.parameters=r}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,r,i){return this.property.evaluate(this.value,this.parameters,e,t,r,i)}}class nK{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class nX{constructor(e){this.specification=e}possiblyEvaluate(e,t){if(e.isDataDriven())throw Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,r){let i=rb[this.specification.type];return i?i(e,t,r):e}}class nY{constructor(e,t){this.specification=e,this.overrides=t}possiblyEvaluate(e,t,r,i){return new n$(this,"constant"===e.expression.kind||"camera"===e.expression.kind?{kind:"constant",value:e.expression.evaluate(t,null,{},r,i)}:e.expression,t)}interpolate(e,t,r){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new n$(this,{kind:"constant",value:void 0},e.parameters);let i=rb[this.specification.type];return i?new n$(this,{kind:"constant",value:i(e.value.value,t.value.value,r)},e.parameters):e}evaluate(e,t,r,i,n,o){return"constant"===e.kind?e.value:e.evaluate(t,r,i,n,o)}}class nQ extends nY{possiblyEvaluate(e,t,r,i){if(void 0===e.value)return new n$(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){let n=e.expression.evaluate(t,null,{},r,i),o="resolvedImage"===e.property.specification.type&&"string"!=typeof n?n.name:n;return new n$(this,{kind:"constant",value:this._calculate(o,o,o,t)},t)}return"camera"===e.expression.kind?new n$(this,{kind:"constant",value:this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t)},t):new n$(this,e.expression,t)}evaluate(e,t,r,i,n,o){if("source"===e.kind){let a=e.evaluate(t,r,i,n,o);return this._calculate(a,a,a,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},r,i),e.evaluate({zoom:Math.floor(t.zoom)},r,i),e.evaluate({zoom:Math.floor(t.zoom)+1},r,i),t):e.value}
170_calculate(e,t,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class nJ{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,i){if(void 0!==e.value){if("constant"===e.expression.kind){let n=e.expression.evaluate(t,null,{},r,i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new nz(Math.floor(t.zoom-1),t)),e.expression.evaluate(new nz(Math.floor(t.zoom),t)),e.expression.evaluate(new nz(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n0{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,i){return!!e.expression.evaluate(t,null,{},r,i)}interpolate(){return!1}}class n1{constructor(e){for(let t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let i=this.defaultPropertyValues[t]=new nV(r,void 0,void 0),n=this.defaultTransitionablePropertyValues[t]=new nU(r,void 0);this.defaultTransitioningPropertyValues[t]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=i.possiblyEvaluate({})}}}nw("DataDrivenProperty",nY),nw("DataConstantProperty",nX),nw("CrossFadedDataDrivenProperty",nQ),nw("CrossFadedProperty",nJ),nw("ColorRampProperty",n0);let n2=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",n3=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class n5 extends eQ{constructor(e,t,r){if(super(),this.id=e.id,this.type=e.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=new nm(this.visibility,r),"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=iG(e.filter,r)),t.layout&&(this._unevaluatedLayout=new nZ(t.layout,r)),t.paint)){for(let i in this._transitionablePaint=new nH(t.paint,r),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new nK(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=iG(e,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var t;if("visibility"===e)return this.visibility;if(null==(t=this._transitionablePaint)?void 0:t.hasProperty(e))throw Error(e+n2);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${e}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;for(let t of this._visibilityExpression.getGlobalStateRefs())e.add(t);if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values)for(let r of this._unevaluatedLayout._values[t].getGlobalStateRefs())e.add(r);for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}getPaintAffectingGlobalStateRefs(){var e;let t=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let o=null!=(e=t.get(n))?e:[];o.push({name:r,value:i.value}),t.set(n,o)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){var i;"visibility"===e?(this.visibility=t,this._visibilityExpression.setValue(t),this.recalculateVisibility()):(null==(i=this._transitionablePaint)?void 0:i.hasProperty(e))?this.fire(new eY(Error(e+n2))):null!=t&&this._validate(nb,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){var t,r;if(e.endsWith(nG)){let r=e.slice(0,-11);if("visibility"===r||(null==(t=this._unevaluatedLayout)?void 0:t.hasProperty(r)))throw Error(e+n3);return this._transitionablePaint.getTransition(r)}if("visibility"===e||(null==(r=this._unevaluatedLayout)?void 0:r.hasProperty(e)))throw Error(e+n3);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){var i;if("visibility"===e||(null==(i=this._unevaluatedLayout)?void 0:i.hasProperty(e)))return this.fire(new eY(Error(e+n3))),!1;
170if(null!=t&&this._validate(nv,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith(nG))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],i="cross-faded-data-driven"===r.property.specification["property-type"],n=r.value.isDataDriven(),o=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let a=this._transitionablePaint._values[e].value;return a.isDataDriven()||n||i||this._handleOverridablePaintPropertyUpdate(e,o,a)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e=this.minzoom,t=!1){return!!(this.minzoom&&e<(t?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this._evaluatedVisibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){var e,t;
170let r={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:null==(e=this._unevaluatedLayout)?void 0:e.serialize(),paint:null==(t=this._transitionablePaint)?void 0:t.serialize()};return this.visibility&&(r.layout||(r.layout={}),r.layout.visibility=this.visibility),eA(r,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,r,i,n={}){return!1!==(null==n?void 0:n.validate)&&n_(this,e.call(nc,{key:t,layerType:this.type,objectKey:r,value:i,styleSpec:eJ,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof n$&&ib(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}var n4={get paint(){return o=o||new n1({"raster-opacity":new nX(eJ.paint_raster["raster-opacity"]),"raster-hue-rotate":new nX(eJ.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new nX(eJ.paint_raster["raster-brightness-min"]),"raster-brightness-max":new nX(eJ.paint_raster["raster-brightness-max"]),"raster-saturation":new nX(eJ.paint_raster["raster-saturation"]),"raster-contrast":new nX(eJ.paint_raster["raster-contrast"]),resampling:new nX(eJ.paint_raster.resampling),"raster-resampling":new nX(eJ.paint_raster["raster-resampling"]),"raster-fade-duration":new nX(eJ.paint_raster["raster-fade-duration"])})}};class n6 extends n5{constructor(e,t){super(e,n4,t)}}let n8={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};
170class n7{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class n9{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_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(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function oe(e,t=1){let r=0,i=0;return{members:e.map(e=>{let n=n8[e.type].BYTES_PER_ELEMENT,o=r=ot(r,Math.max(t,n)),a=e.components||1;return i=Math.max(i,n),r+=n*a,{name:e.name,type:e.type,components:a,offset:o}}),size:ot(r,Math.max(i,t)),alignment:t}}function ot(e,t){return Math.ceil(e/t)*t}class or extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.int16[i+0]=t,this.int16[i+1]=r,e}}or.prototype.bytesPerElement=4,nw("StructArrayLayout2i4",or);class oi extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.int16[n+0]=t,this.int16[n+1]=r,this.int16[n+2]=i,e}}oi.prototype.bytesPerElement=6,nw("StructArrayLayout3i6",oi);class on extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let o=4*e;return this.int16[o+0]=t,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,e}}on.prototype.bytesPerElement=8,nw("StructArrayLayout4i8",on);class oo extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n,o)}emplace(e,t,r,i,n,o,a){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,e}}oo.prototype.bytesPerElement=12,nw("StructArrayLayout2i4i12",oo);class oa extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n,o)}emplace(e,t,r,i,n,o,a){let s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=o,this.uint8[l+7]=a,e}}oa.prototype.bytesPerElement=8,nw("StructArrayLayout2i4ub8",oa);class os extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.float32[i+0]=t,this.float32[i+1]=r,e}}os.prototype.bytesPerElement=8,nw("StructArrayLayout2f8",os);class ol extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o,a,s,l,u){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,i,n,o,a,s,l,u)}emplace(e,t,r,i,n,o,a,s,l,u,c){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=i,this.uint16[h+3]=n,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=u,this.uint16[h+9]=c,e}}ol.prototype.bytesPerElement=20,nw("StructArrayLayout10ui20",ol);class ou extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o,a,s){let l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,i,n,o,a,s)}emplace(e,t,r,i,n,o,a,s,l){let u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e}}ou.prototype.bytesPerElement=16,nw("StructArrayLayout8ui16",ou);class oc extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o,a,s,l,u,c,h){let d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,i,n,o,a,s,l,u,c,h)}emplace(e,t,r,i,n,o,a,s,l,u,c,h,d){let p=12*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=i,this.int16[p+3]=n,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=u,this.int16[p+9]=c,this.int16[p+10]=h,this.int16[p+11]=d,e}}oc.prototype.bytesPerElement=24,nw("StructArrayLayout4i4ui4i24",oc);class oh extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}
170emplace(e,t,r,i){let n=3*e;return this.float32[n+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}}oh.prototype.bytesPerElement=12,nw("StructArrayLayout3f12",oh);class od extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[+e+0]=t,e}}od.prototype.bytesPerElement=4,nw("StructArrayLayout1ul4",od);class op extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o,a,s,l){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,i,n,o,a,s,l)}emplace(e,t,r,i,n,o,a,s,l,u){let c=10*e;return this.int16[c+0]=t,this.int16[c+1]=r,this.int16[c+2]=i,this.int16[c+3]=n,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[5*e+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,e}}op.prototype.bytesPerElement=20,nw("StructArrayLayout6i1ul2ui20",op);class of extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n,o)}emplace(e,t,r,i,n,o,a){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,e}}of.prototype.bytesPerElement=12,nw("StructArrayLayout2i2i2i12",of);class om extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n)}emplace(e,t,r,i,n,o){let a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,this.int16[s+6]=n,this.int16[s+7]=o,e}}om.prototype.bytesPerElement=16,nw("StructArrayLayout2f1f2i16",om);class og extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n,o)}emplace(e,t,r,i,n,o,a){let s=16*e,l=4*e,u=8*e;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=o,this.int16[u+7]=a,e}}og.prototype.bytesPerElement=16,nw("StructArrayLayout2ub2f2i16",og);class oy extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,this.uint16[n+2]=i,e}}oy.prototype.bytesPerElement=6,nw("StructArrayLayout3ui6",oy);class ov extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g){let y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g)}emplace(e,t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g,y){let v=24*e,b=12*e,_=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[b+2]=o,this.uint32[b+3]=a,this.uint32[b+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=c,this.float32[b+7]=h,this.float32[b+8]=d,this.uint8[_+36]=p,this.uint8[_+37]=f,this.uint8[_+38]=m,this.uint32[b+10]=g,this.int16[v+22]=y,e}}ov.prototype.bytesPerElement=48,nw("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ov);class ob extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v,b,_,x,A,w,S,T,C,E){let P=this.length;return this.resize(P+1),this.emplace(P,e,t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v,b,_,x,A,w,S,T,C,E)}emplace(e,t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v,b,_,x,A,w,S,T,C,E,P){let I=32*e,M=16*e;return this.int16[I+0]=t,this.int16[I+1]=r,this.int16[I+2]=i,this.int16[I+3]=n,this.int16[I+4]=o,this.int16[I+5]=a,this.int16[I+6]=s,this.int16[I+7]=l,this.uint16[I+8]=u,this.uint16[I+9]=c,this.uint16[I+10]=h,this.uint16[I+11]=d,this.uint16[I+12]=p,this.uint16[I+13]=f,this.uint16[I+14]=m,this.uint16[I+15]=g,this.uint16[I+16]=y,this.uint16[I+17]=v,this.uint16[I+18]=b,this.uint16[I+19]=_,this.uint16[I+20]=x,this.uint16[I+21]=A,this.uint16[I+22]=w,this.uint32[M+12]=S,this.float32[M+13]=T,this.float32[M+14]=C,this.uint16[I+30]=E,this.uint16[I+31]=P,e}}ob.prototype.bytesPerElement=64,nw("StructArrayLayout8i15ui1ul2f2ui64",ob);class o_ extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[+e+0]=t,e}}
170o_.prototype.bytesPerElement=4,nw("StructArrayLayout1f4",o_);class ox extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.uint16[6*e+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}}ox.prototype.bytesPerElement=12,nw("StructArrayLayout1ui2f12",ox);class oA extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=4*e;return this.uint32[2*e+0]=t,this.uint16[n+2]=r,this.uint16[n+3]=i,e}}oA.prototype.bytesPerElement=8,nw("StructArrayLayout1ul2ui8",oA);class ow extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,e}}ow.prototype.bytesPerElement=4,nw("StructArrayLayout2ui4",ow);class oS extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[+e+0]=t,e}}oS.prototype.bytesPerElement=2,nw("StructArrayLayout1ui2",oS);class oT extends n9{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let o=4*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=i,this.float32[o+3]=n,e}}oT.prototype.bytesPerElement=16,nw("StructArrayLayout4f16",oT);class oC extends n7{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new x(this.anchorPointX,this.anchorPointY)}}oC.prototype.size=20;class oE extends op{get(e){return new oC(this,e)}}nw("CollisionBoxArray",oE);class oP extends n7{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}oP.prototype.size=48;class oI extends ov{get(e){return new oP(this,e)}}nw("PlacedSymbolArray",oI);class oM extends n7{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}
170get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}oM.prototype.size=64;class ok extends ob{get(e){return new oM(this,e)}}nw("SymbolInstanceArray",ok);class oO extends o_{getoffsetX(e){return this.float32[+e+0]}}nw("GlyphOffsetArray",oO);class oD extends oi{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}nw("SymbolLineVertexArray",oD);class oR extends n7{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}oR.prototype.size=12;class oL extends ox{get(e){return new oR(this,e)}}nw("TextAnchorOffsetArray",oL);class oB extends n7{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]}}oB.prototype.size=8;class oF extends oA{get(e){return new oB(this,e)}}nw("FeatureIndexArray",oF);class oj extends or{}class oz extends or{}class oN extends or{}class oG extends oo{}class oV extends oa{}class oU extends os{}class oH extends ol{}class oW extends ou{}class oq extends oc{}class oZ extends oh{}class o$ extends od{}class oK extends of{}class oX extends og{}class oY extends oy{}class oQ extends ow{}let{members:oJ}=oe([{name:"a_pos",components:2,type:"Int16"}],4);class o0{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,t,r,i){let n=this.segments[this.segments.length-1];return e>o0.MAX_VERTEX_ARRAY_LENGTH&&eT(`Max vertices per segment is ${o0.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${o0.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!n||n.vertexLength+e>o0.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==i?this.createNewSegment(t,r,i):n}createNewSegment(e,t,r){let i={vertexOffset:e.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==r&&(i.sortKey=r),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(i),i}getOrCreateLatestSegment(e,t,r){return this.prepareSegment(0,e,t,r)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,i){return new o0([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:i,vaos:{},sortKey:0}])}}function o1(e,t){return 256*(e=ey(Math.floor(e),0,255))+ey(Math.floor(t),0,255)}o0.MAX_VERTEX_ARRAY_LENGTH=65535,nw("SegmentVector",o0);let o2=oe([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),o3=oe([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var o5,o4,o6,o8={exports:{}},o7={exports:{}},o9={exports:{}},ae=A(function(){if(o6)return o8.exports;o6=1;var e=(o5||(o5=1,o7.exports=function(e,t){var r,i,n,o,a,s;for(i=e.length-(r=3&e.length),n=t,s=0;s<i;)a=255&e.charCodeAt(s)|(255&e.charCodeAt(++s))<<8|(255&e.charCodeAt(++s))<<16|(255&e.charCodeAt(++s))<<24,++s,n=27492+(65535&(o=5*(65535&(n=(n^=a=(65535&(a=(a=(65535&a)*0xcc9e2d51+(((a>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|a>>>17))*0x1b873593+(((a>>>16)*0x1b873593&65535)<<16)|0)<<13|n>>>19))+((5*(n>
170>>16)&65535)<<16)|0))+((58964+(o>>>16)&65535)<<16);switch(a=0,r){case 3:a^=(255&e.charCodeAt(s+2))<<16;case 2:a^=(255&e.charCodeAt(s+1))<<8;case 1:n^=a=(65535&(a=(a=(65535&(a^=255&e.charCodeAt(s)))*0xcc9e2d51+(((a>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|a>>>17))*0x1b873593+(((a>>>16)*0x1b873593&65535)<<16)|0}return n^=e.length,n=0x85ebca6b*(65535&(n^=n>>>16))+((0x85ebca6b*(n>>>16)&65535)<<16)|0,n=0xc2b2ae35*(65535&(n^=n>>>13))+((0xc2b2ae35*(n>>>16)&65535)<<16)|0,(n^=n>>>16)>>>0}),o7.exports),t=(o4||(o4=1,o9.exports=function(e,t){for(var r,i=e.length,n=t^i,o=0;i>=4;)r=0x5bd1e995*(65535&(r=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((0x5bd1e995*(r>>>16)&65535)<<16),n=0x5bd1e995*(65535&n)+((0x5bd1e995*(n>>>16)&65535)<<16)^(r=0x5bd1e995*(65535&(r^=r>>>24))+((0x5bd1e995*(r>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=0x5bd1e995*(65535&(n^=255&e.charCodeAt(o)))+((0x5bd1e995*(n>>>16)&65535)<<16)}return n=0x5bd1e995*(65535&(n^=n>>>13))+((0x5bd1e995*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}
170),o9.exports);return o8.exports=e,o8.exports.murmur3=e,o8.exports.murmur2=t,o8.exports}());class at{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,i){this.ids.push(ar(e)),this.positions.push(t,r,i)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=ar(e),r=0,i=this.ids.length-1;for(;r<i;){let e=r+i>>1;this.ids[e]>=t?i=e:r=e+1}let n=[];for(;this.ids[r]===t;)n.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return n}static serialize(e,t){let r=new Float64Array(e.ids),i=new Uint32Array(e.positions);return function e(t,r,i,n){for(;i<n;){let o=t[i+n>>1],a=i-1,s=n+1;for(;;){do a++;while(t[a]<o)do s--;while(t[s]>o)if(a>=s)break;ai(t,a,s),ai(r,3*a,3*s),ai(r,3*a+1,3*s+1),ai(r,3*a+2,3*s+2)}s-i<n-s?(e(t,r,i,s),i=s+1):(e(t,r,s+1,n),n=s)}}(r,i,0,r.length-1),t&&t.push(r.buffer,i.buffer),{ids:r,positions:i}}static deserialize(e){let t=new at;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t}}function ar(e){let t=+e;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:ae(String(e))}function ai(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}nw("FeaturePositionMap",at);class an{constructor(e,t){this.gl=e.gl,this.location=t}}class ao extends an{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}}class aa extends an{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}}class as extends an{constructor(e,t){super(e,t),this.current=tW.transparent}set(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}}let al=new Float32Array(16);function au(e){return[o1(255*e.r,255*e.g),o1(255*e.b,255*e.a)]}class ac{constructor(e,t,r){this.value=e,this.uniformNames=t.map(e=>`u_${e}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new as(e,t):new ao(e,t)}}class ah{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,t){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,t.y,t.height,t.width]}setUniform(e,t,r,i){let n=null;"u_pattern_to"===i?n=this.patternTo:"u_pattern_from"===i?n=this.patternFrom:"u_dasharray_to"===i?n=this.dashTo:"u_dasharray_from"===i?n=this.dashFrom:"u_pixel_ratio_to"===i?n=this.pixelRatioTo:"u_pixel_ratio_from"===i&&(n=this.pixelRatioFrom),null!==n&&e.set(n)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new aa(e,t):new ao(e,t)}}
170class ad{constructor(e,t,r,i){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new nz(0,r),t,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(i,e,n)}updatePaintArray(e,t,r,i,n){let o=this.expression.evaluate(new nz(0,n),r,i);this._setPaintValue(e,t,o)}_setPaintValue(e,t,r){if("color"===this.type){let i=au(r);for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,i[0],i[1])}else{for(let i=e;i<t;i++)this.paintVertexArray.emplace(i,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}}upload(e){var t,r;(null==(t=this.paintVertexArray)?void 0:t.arrayBuffer.byteLength)&&((null==(r=this.paintVertexBuffer)?void 0:r.buffer)?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class ap{constructor(e,t,r,i,n,o){this.expression=e,this.uniformNames=t.map(e=>`u_${e}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0})),this.paintVertexArray=new o}populatePaintArray(e,t,r){let i=this.expression.evaluate(new nz(this.zoom,r),t,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new nz(this.zoom+1,r),t,{},r.canonical,[],r.formattedSection),o=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(o,e,i,n)}updatePaintArray(e,t,r,i,n){let o=this.expression.evaluate(new nz(this.zoom,n),r,i),a=this.expression.evaluate(new nz(this.zoom+1,n),r,i);this._setPaintValue(e,t,o,a)}_setPaintValue(e,t,r,i){if("color"===this.type){let n=au(r),o=au(i);for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,n[0],n[1],o[0],o[1])}else{for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,r,i);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(i))}}upload(e){var t,r;(null==(t=this.paintVertexArray)?void 0:t.arrayBuffer.byteLength)&&((null==(r=this.paintVertexBuffer)?void 0:r.buffer)?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(e,t){let r=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,i=ey(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);e.set(i)}getBinding(e,t,r){return new ao(e,t)}}class af{constructor(e,t,r,i,n,o){this.expression=e,this.type=t,this.useIntegerZoom=r,this.zoom=i,this.layerId=o,this.zoomInPaintVertexArray=new n,this.zoomOutPaintVertexArray=new n}populatePaintArray(e,t,r){let i=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(i,e,this.getPositionIds(t),r)}updatePaintArray(e,t,r,i,n){this._setPaintValues(e,t,this.getPositionIds(r),n)}_setPaintValues(e,t,r,i){let n=this.getPositions(i);if(!n||!r)return;let o=n[r.min],a=n[r.mid],s=n[r.max];if(o&&a&&s)for(let r=e;r<t;r++)this.emplace(this.zoomInPaintVertexArray,r,a,o),this.emplace(this.zoomOutPaintVertexArray,r,a,s)}upload(e){var t,r;if((null==(t=this.zoomInPaintVertexArray)?void 0:t.arrayBuffer.byteLength)&&(null==(r=this.zoomOutPaintVertexArray)?void 0:r.arrayBuffer.byteLength)){let t=this.getVertexAttributes();this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,t,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,t,this.expression.isStateDependent)}}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class am extends af{getPositions(e){return e.imagePositions}getPositionIds(e){var t;return null==(t=e.patterns)?void 0:t[this.layerId]}getVertexAttributes(){return o2.members}
170emplace(e,t,r,i){e.emplace(t,r.tlbr[0],r.tlbr[1],r.tlbr[2],r.tlbr[3],i.tlbr[0],i.tlbr[1],i.tlbr[2],i.tlbr[3],r.pixelRatio,i.pixelRatio)}}class ag extends af{getPositions(e){return e.dashPositions}getPositionIds(e){var t;return null==(t=e.dashes)?void 0:t[this.layerId]}getVertexAttributes(){return o3.members}emplace(e,t,r,i){e.emplace(t,0,r.y,r.height,r.width,0,i.y,i.height,i.width)}}class ay{constructor(e,t,r){this.binders={},this._buffers=[];let i=[];for(let o in e.paint._values){var n;if(!r(o))continue;let a=e.paint.get(o);if(!(a instanceof n$&&ib(a.property.specification)))continue;let s=(n=e.type,({"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]})[o]||[o.replace(`${n}-`,"").replace(/-/g,"_")]),l=a.value,u=a.property.specification.type,c=a.property.useIntegerZoom,h=a.property.specification["property-type"],d="cross-faded"===h||"cross-faded-data-driven"===h;if("constant"===l.kind)this.binders[o]=d?new ah(l.value,s):new ac(l.value,s,u),i.push(`/u_${o}`);else if("source"===l.kind||d){let r=ab(o,u,"source");this.binders[o]=d?"line-dasharray"===o?new ag(l,u,c,t,r,e.id):new am(l,u,c,t,r,e.id):new ad(l,s,u,r),i.push(`/a_${o}`)}else{let e=ab(o,u,"composite");this.binders[o]=new ap(l,s,u,c,t,e),i.push(`/z_${o}`)}}this.cacheKey=i.sort().join("")}getMaxValue(e){let t=this.binders[e];return t instanceof ad||t instanceof ap?t.maxValue:0}populatePaintArrays(e,t,r){for(let i in this.binders){let n=this.binders[i];(n instanceof ad||n instanceof ap||n instanceof af)&&n.populatePaintArray(e,t,r)}}setConstantPatternPositions(e,t){for(let r in this.binders){let i=this.binders[r];i instanceof ah&&i.setConstantPatternPositions(e,t)}}setConstantDashPositions(e,t){for(let r in this.binders){let i=this.binders[r];i instanceof ah&&i.setConstantDashPositions(e,t)}}updatePaintArrays(e,t,r,i,n){let o=!1;for(let a in e)for(let s of t.getPositions(a)){let t=r.feature(s.index);for(let r in this.binders){let l=this.binders[r];(l instanceof ad||l instanceof ap||l instanceof af)&&!0===l.expression.isStateDependent&&(l.expression=i.paint.get(r).value,l.updatePaintArray(s.start,s.end,t,e[a],n),o=!0)}}return o}defines(){let e=[];for(let t in this.binders){let r=this.binders[t];(r instanceof ac||r instanceof ah)&&e.push(...r.uniformNames.map(e=>`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof ad||r instanceof ap)for(let t of r.paintVertexAttributes)e.push(t.name);else if(r instanceof af)for(let t of r.getVertexAttributes())e.push(t.name)}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof ac||r instanceof ah||r instanceof ap)for(let t of r.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof ac||n instanceof ah||n instanceof ap){for(let o of n.uniformNames)if(t[o]){let a=n.getBinding(e,t[o],o);r.push({name:o,property:i,binding:a})}}}return r}setUniforms(e,t,r,i){for(let{name:e,property:n,binding:o}of t)this.binders[n].setUniform(o,i,r.get(n),e)}updatePaintBuffers(e){for(let t in this._buffers=[],this.binders){let r=this.binders[t];if(e&&r instanceof af){let t=2===e.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(r instanceof ad||r instanceof ap)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof ad||r instanceof ap||r instanceof af)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof ad||t instanceof ap||t instanceof af)&&t.destroy()}}}class av{constructor(e,t,r=()=>!0){for(let i of(this.programConfigurations={},e))this.programConfigurations[i.id]=new ay(i,t,r);this.needsUpload=!1,this._featureMap=new at,this._bufferOffset=0}populatePaintArrays(e,t,r,i){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,i);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(e,this._featureMap,t,n,i)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function ab(e,t,r){let i={"line-pattern":{source:oH,composite:oH},"fill-pattern":{source:oH,composite:oH},"fill-extrusion-pattern":{source:oH,composite:oH},"line-dasharray":{source:oW,composite:oW}}[e];return(null==i?void 0:i[r])||({color:{source:os,composite:oT},number:{source:o_,composite:os}})[t][r]}function a_(e){let t=8192/e.extent,r=e.loadGeometry();for(let e of r)for(let r of e){let e=Math.round(r.x*t),i=Math.round(r.y*t);r.x=ey(e,-16384,16383),r.y=ey(i,-16384,16383),(e<r.x||e>r.x+1||i<r.y||i>r.y+1)&&eT("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function ax(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?a_(e):[]}}nw("ConstantBinder",ac),nw("CrossFadedConstantBinder",ah),nw("SourceExpressionBinder",ad),nw("CrossFadedPatternBinder",am),nw("CrossFadedDash
170arrayBinder",ag),nw("CompositeExpressionBinder",ap),nw("ProgramConfiguration",ay,{omit:["_buffers"]}),nw("ProgramConfigurationSet",av);class aA{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new oz,this.indexArray=new oY,this.segments=new o0,this.programConfigurations=new av(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){let i=this.layers[0],n=[],o=null,a=!1,s="heatmap"===i.type;"circle"===i.type&&(a=!(o=i.layout.get("circle-sort-key")).isConstant(),s||(s="map"===i.paint.get("circle-pitch-alignment")));let l=s?t.subdivisionGranularity.circle:1;for(let{feature:t,id:i,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,u=ax(t,e);if(!this.layers[0]._featureFilter.filter(new nz(this.zoom),u,r))continue;let c=a?o.evaluate(u,{},r):void 0,h={id:i,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?u.geometry:a_(t),patterns:{},sortKey:c};n.push(h)}for(let i of(a&&n.sort((e,t)=>
170e.sortKey-t.sortKey),n)){let{geometry:n,index:o,sourceLayerIndex:a}=i,s=e[o].feature;this.addFeature(i,n,o,r,l),t.featureIndex.insert(s,n,o,a,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,oJ),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,i,n=1){let o;switch(n){case 1:o=[0,7];break;case 3:o=[0,2,5,7];break;case 5:o=[0,1,3,4,6,7];break;case 7:o=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let a=o.length;for(let r of t)for(let t of r){let r=t.x,i=t.y;if(r<0||r>=8192||i<0||i>=8192)continue;let n=this.segments.prepareSegment(a*a,this.layoutVertexArray,this.indexArray,e.sortKey),c=n.vertexLength;for(let e=0;e<a;e++)for(let t=0;t<a;t++){var s,l,u;s=this.layoutVertexArray,l=o[t],u=o[e],s.emplaceBack(-32768+8*r+l,-32768+8*i+u)}for(let e=0;e<a-1;e++)for(let t=0;t<a-1;t++){let r=c+e*a+t,i=c+(e+1)*a+t;this.indexArray.emplaceBack(r,i+1,r+1),this.indexArray.emplaceBack(r,i,i+1)}n.vertexLength+=a*a,n.primitiveLength+=(a-1)*(a-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:{},canonical:i})}}function aw(e,t){for(let r of e)if(aM(t,r))return!0;for(let r of t)if(aM(e,r))return!0;return aC(e,t)}function aS(e,t,r){return!!aM(e,t)||aE(t,e,r)}function aT(e,t){if(1===e.length)return aI(t,e[0]);for(let r of t)for(let t of r)if(aM(e,t))return!0;for(let r of e)if(aI(t,r))return!0;for(let r of t)if(aC(e,r))return!0;return!1}function aC(e,t){if(0===e.length||0===t.length)return!1;for(let n=0;n<e.length-1;n++){let o=e[n],a=e[n+1];for(let e=0;e<t.length-1;e++){var r,i;if(eC(o,r=t[e],i=t[e+1])!==eC(a,r,i)&&eC(o,a,r)!==eC(o,a,i))return!0}}return!1}function aE(e,t,r){let i=r*r;if(1===t.length)return e.distSqr(t[0])<i;for(let r=1;r<t.length;r++)if(aP(e,t[r-1],t[r])<i)return!0;return!1}function aP(e,t,r){let i=t.distSqr(r);if(0===i)return e.distSqr(t);let n=((e.x-t.x)*(r.x-t.x)+(e.y-t.y)*(r.y-t.y))/i;return e.distSqr(n<0?t:n>1?r:r.sub(t)._mult(n)._add(t))}function aI(e,t){let r,i,n=!1;for(let o of e)for(let e=0,a=o.length-1;e<o.length;a=e++)r=o[e],i=o[a],r.y>t.y!=i.y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(n=!n);return n}function aM(e,t){let r=!1;for(let i=0,n=e.length-1;i<e.length;n=i++){let o=e[i],a=e[n];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function ak(e,t,r){let i=t.paint.get(e).value;return"constant"===i.kind?i.value:r.programConfigurations.get(t.id).getMaxValue(e)}function aO(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function aD(e,t,r,i,n){if(!t[0]&&!t[1])return e;let o=x.convert(t)._mult(n);"viewport"===r&&o._rotate(-i);let a=[];for(let t of e)a.push(t.sub(o));return a}function aR({queryGeometry:e,size:t},r){return aS(e,r,t)}function aL({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},o){return aS(e,o,t*(r.projectTileCoordinates(o.x,o.y,i,n).signedDistanceFromCamera/r.cameraToCenterDistance))}function aB({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},o){let a=r.projectTileCoordinates(o.x,o.y,i,n).signedDistanceFromCamera,s=t*(r.cameraToCenterDistance/a);return aS(e,az(o,r,i,n),s)}function aF({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},o){return aS(e,az(o,r,i,n),t)}function aj({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n,pitchAlignment:o="map",pitchScale:a="map"},s){let l="map"===o?"map"===a?aR:aL:"map"===a?aB:aF,u={queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n};for(let e of s)for(let t of e)if(l(u,t))return!0;return!1}
170function az(e,t,r,i){let n=t.projectTileCoordinates(e.x,e.y,r,i).point;return new x((.5*n.x+.5)*t.width,(-(.5*n.y)+.5)*t.height)}nw("CircleBucket",aA,{omit:["layers"]});var aN={get paint(){return s=s||new n1({"circle-radius":new nY(eJ.paint_circle["circle-radius"]),"circle-color":new nY(eJ.paint_circle["circle-color"]),"circle-blur":new nY(eJ.paint_circle["circle-blur"]),"circle-opacity":new nY(eJ.paint_circle["circle-opacity"]),"circle-translate":new nX(eJ.paint_circle["circle-translate"]),"circle-translate-anchor":new nX(eJ.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new nX(eJ.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new nX(eJ.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new nY(eJ.paint_circle["circle-stroke-width"]),"circle-stroke-color":new nY(eJ.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new nY(eJ.paint_circle["circle-stroke-opacity"])})},get layout(){return a=a||new n1({"circle-sort-key":new nY(eJ.layout_circle["circle-sort-key"])})}};class aG extends n5{constructor(e,t){super(e,aN,t)}createBucket(e){return new aA(e)}queryRadius(e){return ak("circle-radius",this,e)+ak("circle-stroke-width",this,e)+aO(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:o,unwrappedTileID:a,getElevation:s}){let l,u,c=aD(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,o),h=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),d=this.paint.get("circle-pitch-scale"),p=this.paint.get("circle-pitch-alignment");return"map"===p?(l=c,u=h*o):(l=c.map(e=>az(e,n,a,s)),u=h),aj({queryGeometry:l,size:u,transform:n,unwrappedTileID:a,getElevation:s,pitchAlignment:p,pitchScale:d},i)}}class aV extends aA{}nw("HeatmapBucket",aV,{omit:["layers"]});var aU={get paint(){return l=l||new n1({"heatmap-radius":new nY(eJ.paint_heatmap["heatmap-radius"]),"heatmap-weight":new nY(eJ.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new nX(eJ.paint_heatmap["heatmap-intensity"]),"heatmap-color":new n0(eJ.paint_heatmap["heatmap-color"]),"heatmap-opacity":new nX(eJ.paint_heatmap["heatmap-opacity"])})}};function aH(e,{width:t,height:r},i,n){if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==t*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${t*r*i}`)}else n=new Uint8Array(t*r*i);return e.width=t,e.height=r,e.data=n,e}function aW(e,{width:t,height:r},i){if(t===e.width&&r===e.height)return;let n=aH({},{width:t,height:r},i);aq(e,n,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},i),e.width=t,e.height=r,e.data=n.data}function aq(e,t,r,i,n,o){if(0===n.width||0===n.height)return t;if(n.width>e.width||n.height>e.height||r.x>e.width-n.width||r.y>e.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>t.width||n.height>t.height||i.x>t.width-n.width||i.y>t.height-n.height)throw RangeError("out of range destination coordinates for image copy");let a=e.data,s=t.data;if(a===s)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l<n.height;l++){let u=((r.y+l)*e.width+r.x)*o,c=((i.y+l)*t.width+i.x)*o;for(let e=0;e<n.width*o;e++)s[c+e]=a[u+e]}return t}class aZ{constructor(e,t){aH(this,e,1,t)}resize(e){aW(this,e,1)}clone(){return new aZ({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,r,i,n){aq(e,t,r,i,n,1)}}class a${constructor(e,t){aH(this,e,4,t)}resize(e){aW(this,e,4)}replace(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e}clone(){return new a$({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,r,i,n){aq(e,t,r,i,n,4)}setPixel(e,t,r){let i=4*(e*this.width+t);this.data[i+0]=Math.round(255*r.r/r.a),this.data[i+1]=Math.round(255*r.g/r.a),this.data[i+2]=Math.round(255*r.b/r.a),this.data[i+3]=Math.round(255*r.a)}}function aK(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=4){let i=e[r+3];t[r+0]=Math.round(e[r+0]*i/255),t[r+1]=Math.round(e[r+1]*i/255),t[r+2]=Math.round(e[r+2]*i/255),t[r+3]=i}return t}function aX(e){let t={},r=e.resolution||256,i=e.clips?e.clips.length:1,n=e.image||new a$({width:r,height:i});if(Math.log(r)/Math.LN2%1!=0)throw Error(`width is not a power of 2 - ${r}`);let o=(i,o,a)=>{t[e.evaluationKey]=a;let s=e.expression.evaluate(t);n.setPixel(i/4/r,o/4,s)};if(e.clips)for(let t=0,n=0;t<i;++t,n+=4*r)for(let i=0,a=0;i<r;i++,a+=4){let s=i/(r-1),{start:l,end:u}=e.clips[t];o(n,a,l*(1-s)+u*s)}else for(let e=0,t=0;e<r;e++,t+=4)o(0,t,e/(r-1));return n}nw("AlphaImage",aZ),nw("RGBAImage",a$);let aY="big-fb";class aQ extends n5{createBucket(e){return new aV(e)}constructor(e,t){super(e,aU,t),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){"heatmap-color"===e&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=aX({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(aY)&&this.heatmapFbos.delete(aY)}queryRadius(e){return ak("heatmap-radius",this,e)}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:o,unwrappedTileID:a,getElevation:s}){return aj({queryGeometry:e,size:this.paint.get("heatmap-radius").evaluate(t,r)*o,transform:n,unwrappedTileID:a,getElevation:s},i)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&!this.isHidden()}}var aJ={get paint(){return u=u||new n1({"hillshade-illumination-direction":new nX(eJ.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new nX(eJ.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new nX(eJ.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new nX(eJ.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new nX(eJ.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new nX(eJ.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new nX(eJ.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new nX(eJ.paint_hillshade["hillshade-method"]),resampling:new nX(eJ.paint_hillshade.resampling)})}};class a0 extends n5{constructor(e,t){super(e,aJ,t),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,t=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(e.length,t.length,r.length,i.length);e=e.concat(Array(n-e.length).fill(e.at(-1))),t=t.concat(Array(n-t.length).fill(t.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let o=t.map(eD);return{directionRadians:e.map(eD),altitudeRadians:o,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&!this.isHidden()}}var a1={get paint(){return c=c||new n1({"color-relief-opacity":new nX(eJ["paint_color-relief"]["color-relief-opacity"]),"color-relief-color":new n0(eJ["paint_color-relief"]["color-relief-color"]),resampling:new nX(eJ["paint_color-relief"].resampling)})}};
170class a2{constructor(e,t,r,i){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this._ownedHandle=this.texture,this.update(t,i)}update(e,t,r){var i;let{width:n,height:o}=e,a=((null==(i=this.size)?void 0:i[0])!==n||this.size[1]!==o)&&!r,{context:s}=this,{gl:l}=s;this.useMipmap=!!(null==t?void 0:t.useMipmap),l.bindTexture(l.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1);let u=this.format===l.RGBA&&!1!==(null==t?void 0:t.premultiply);if(a)this.size=[n,o],"data"in e?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(e,u,n,o,l)):(s.pixelStoreUnpackPremultiplyAlpha.set(u),this._uploadDomImage(e,l));else{let{x:t,y:i}=r||{x:0,y:0};"data"in e?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(e,u,t,i,n,o,l)):(s.pixelStoreUnpackPremultiplyAlpha.set(u),this._updateDomImage(e,t,i,l))}this.useMipmap&&this.isSizePowerOfTwo()&&l.generateMipmap(l.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(e,t){t.texImage2D(t.TEXTURE_2D,0,this.format,this.format,t.UNSIGNED_BYTE,e)}_uploadRawData(e,t,r,i,n){let{data:o}=e;t&&o&&(o=aK(o)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,o)}_updateDomImage(e,t,r,i){i.texSubImage2D(i.TEXTURE_2D,0,t,r,i.RGBA,i.UNSIGNED_BYTE,e)}_updateRawData(e,t,r,i,n,o,a){let{data:s}=e;t&&s&&(s=aK(s)),a.texSubImage2D(a.TEXTURE_2D,0,r,i,n,o,a.RGBA,a.UNSIGNED_BYTE,s)}bind(e,t,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),e!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||e),this.filter=e),t!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,t),this.wrap=t)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}}class a3{constructor(e,t,r,i=1,n=1,o=1,a=0){if(this.uid=e,t.height!==t.width)throw RangeError("DEM tiles must be square");if(r&&!["mapbox","terrarium","custom"].includes(r))return void eT(`"${r}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=t.height;let s=this.dim=t.height-2;switch(this.data=new Uint32Array(t.data.buffer),r){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=i,this.greenFactor=n,this.blueFactor=o,this.baseShift=a;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let e=0;e<s;e++)this.data[this._idx(-1,e)]=this.data[this._idx(0,e)],this.data[this._idx(s,e)]=this.data[this._idx(s-1,e)],this.data[this._idx(e,-1)]=this.data[this._idx(e,0)],this.data[this._idx(e,s)]=this.data[this._idx(e,s-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(s,-1)]=this.data[this._idx(s-1,0)],this.data[this._idx(-1,s)]=this.data[this._idx(0,s-1)],this.data[this._idx(s,s)]=this.data[this._idx(s-1,s-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let e=0;e<s;e++)for(let t=0;t<s;t++){let r=this.get(e,t);r>this.max&&(this.max=r),r<this.min&&(this.min=r)}}get(e,t){let r=new Uint8Array(this.data.buffer),i=4*this._idx(e,t);return this.unpack(r[i],r[i+1],r[i+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,t){if(e<-1||e>=this.dim+1||t<-1||t>=this.dim+1)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${t}, dim: ${this.dim}`);return(t+1)*this.stride+(e+1)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}pack(e){return a5(e,this.getUnpackVector())}getPixels(){return new a$({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,r){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let i=t*this.dim,n=t*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(t){case -1:i=n-1;break;case 1:n=i+1}switch(r){case -1:o=a-1;break;case 1:a=o+1}let s=-t*this.dim,l=-r*this.dim;for(let t=o;t<a;t++)for(let r=i;r<n;r++)this.data[this._idx(r,t)]=e.data[this._idx(r+s,t+l)]}}function a5(e,t){let r=t[0],i=t[1],n=t[2],o=t[3],a=Math.min(r,i,n),s=Math.round((e+o)/a);return{r:Math.floor(s*a/r)%256,g:Math.floor(s*a/i)%256,b:Math.floor(s*a/n)%256}}nw("DEMData",a3);class a4 extends n5{constructor(e,t){super(e,a1,t)}_createColorRamp(e){let t={elevationStops:[],colorStops:[]},r=this._transitionablePaint._values["color-relief-color"].value.expression;if(r instanceof iD&&r._styleExpression.expression instanceof ry){this.colorRampExpression=r;let e=r._styleExpression.expression;for(let r of(t.elevationStops=e.labels,t.colorStops=[],t.elevationStops))t.colorStops.push(e.evaluate({globals:{elevation:r}}))}if(t.elevationStops.length<1&&(t.elevationStops=[0],t.colorStops=[tW.transparent]),t.elevationStops.length<2&&(t.elevationStops.push(t.elevationStops[0]+1),t.colorStops.push(t.colorStops[0])),t.elevationStops.length<=e)return t;let i={elevationStops:[],colorStops:[]},n=(t.elevationStops.length-1)/(e-1);for(let e=0;e<t.elevationStops.length-.5;e+=n)i.elevationStops.push(t.elevationStops[Math.round(e)]),i.colorStops.push(t.colorStops[Math.round(e)]);return eT(`Too many colors in specification of ${this.id}
170 color-relief layer, may not render properly. Max possible colors: ${e}, provided: ${t.elevationStops.length}`),i}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(e,t,r){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;let i=this._createColorRamp(t),n=new a$({width:i.colorStops.length,height:1}),o=new a$({width:i.colorStops.length,height:1});for(let e=0;e<i.elevationStops.length;e++){let t=a5(i.elevationStops[e],r);o.setPixel(0,e,new tW(t.r/255,t.g/255,t.b/255,1)),n.setPixel(0,e,i.colorStops[e])}return this.colorRampTextures={elevationTexture:new a2(e,o,e.gl.RGBA),colorTexture:new a2(e,n,e.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return!this.isHidden()&&!!this.colorRampTextures}}let{members:a6}=oe([{name:"a_pos",components:2,type:"Int16"}],4);function a8(e,t,r){let i=r.patternDependencies,n=!1;for(let r of t){let t=r.paint.get(`${e}-pattern`);t.isConstant()||(n=!0);let o=t.constantOr(null);o&&(n=!0,i[o.to]=!0,i[o.from]=!0)}return n}function a7(e,t,r,i,n){let{zoom:o}=i,a=n.patternDependencies;for(let i of t){let t=i.paint.get(`${e}-pattern`).value;if("constant"!==t.kind){let e=t.evaluate({zoom:o-1},r,{},n.availableImages),s=t.evaluate({zoom:o},r,{},n.availableImages),l=t.evaluate({zoom:o+1},r,{},n.availableImages);e=(null==e?void 0:e.name)?e.name:e,s=(null==s?void 0:s.name)?s.name:s,l=(null==l?void 0:l.name)?l.name:l,a[e]=!0,a[s]=!0,a[l]=!0,r.patterns[i.id]={min:e,mid:s,max:l}}}return r}function a9(e,t,r,i,n){let o;if(n===function(e,t,r,i){let n=0;for(let o=t,a=r-i;o<r;o+=i)n+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return n}(e,t,r,i)>0)for(let n=t;n<r;n+=i)o=sd(n/i|0,e[n],e[n+1],o);else for(let n=r-i;n>=t;n-=i)o=sd(n/i|0,e[n],e[n+1],o);return o&&sa(o,o.next)&&(sp(o),o=o.next),o}function se(e,t){if(!e)return e;t||(t=e);let r,i=e;do if(r=!1,i.steiner||!sa(i,i.next)&&0!==so(i.prev,i,i.next))i=i.next;else{if(sp(i),(i=t=i.prev)===i.next)break;r=!0}while(r||i!==t)return t}function st(e,t){let r=e.x-t.x;return 0===r&&0==(r=e.y-t.y)&&(r=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),r}function sr(e,t,r,i,n){return(e=0x55555555&((e=0x33333333&((e=0xf0f0f0f&((e=0xff00ff&((e=(e-r)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=0x55555555&((t=0x33333333&((t=0xf0f0f0f&((t=0xff00ff&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function si(e,t,r,i,n,o,a,s){return(n-a)*(t-s)>=(e-a)*(o-s)&&(e-a)*(i-s)>=(r-a)*(t-s)&&(r-a)*(o-s)>=(n-a)*(i-s)}function sn(e,t,r,i,n,o,a,s){return(e!==a||t!==s)&&si(e,t,r,i,n,o,a,s)}function so(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function sa(e,t){return e.x===t.x&&e.y===t.y}function ss(e,t,r,i){let n=su(so(e,t,r)),o=su(so(e,t,i)),a=su(so(r,i,e)),s=su(so(r,i,t));return n!==o&&a!==s||!(0!==n||!sl(e,r,t))||!(0!==o||!sl(e,i,t))||!(0!==a||!sl(r,e,i))||!(0!==s||!sl(r,t,i))}function sl(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function su(e){return e>0?1:e<0?-1:0}function sc(e,t){return 0>so(e.prev,e,e.next)?so(e,t,e.next)>=0&&so(e,e.prev,t)>=0:0>so(e,t,e.prev)||0>so(e,e.next,t)}function sh(e,t){let r=sf(e.i,e.x,e.y),i=sf(t.i,t.x,t.y),n=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function sd(e,t,r,i){let n=sf(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function sp(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function sf(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class sm{constructor(e,t){if(t>e)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){return Math.max(Math.floor(this._baseZoomGranularity/(1<<e)),this._minGranularity,1)}}class sg{constructor(e){this.fill=e.fill,this.line=e.line,this.tile=e.tile,this.stencil=e.stencil,this.circle=e.circle}}sg.noSubdivision=new sg({fill:new sm(0,0),line:new sm(0,0),tile:new sm(0,0),stencil:new sm(0,0),circle:1}),nw("SubdivisionGranularityExpression",sm),nw("SubdivisionGranularitySetting",sg);class sy{constructor(e,t){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=e,this._granularityCellSize=8192/e,this._canonical=t}_getKey(e,t){return(e+=32768)<<16|t+32768}_vertexToIndex(e,t){if(e<-32768||t<-32768||e>32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=0|Math.round(e),i=0|Math.round(t),n=this._getKey(r,i);if(this._vertexDictionary.has(n))return this._vertexDictionary.get(n);let o=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,o),this._vertexBuffer.push(r,i),o}_subdivideTrianglesScanline(e){if(this._granularity<2)return function(e,t){let r=[];for(let i=0;i<t.length;i+=3){let n=t[i],o=t[i+1],a=t[i+2],s=e[2*n],l=e[2*n+1];(e[2*o]-s)*(e[2*a+1]-l)-(e[2*o+1]-l)*(e[2*a]-s)>0?(r.push(n),r.push(a),r.push(o)):(r.push(n),r.push(o),r.push(a))}return r}(this._vertexBuffer,e);let t=[],r=e.length;for(let i=0;i<r;i+=3){let r=[e[i+0],e[i+1],e[i+2]],n=[this._vertexBuffer[2*e[i+0]+0],this._vertexBuffer[2*e[i+0]+1],this._vertexBuffer[2*e[i+1]+0],this._vertexBuffer[2*e[i+1]+1],this._vertexBuffer[2*e[i+2]+0],this._vertexBuffer[2*e[i+2]+1]],o=1/0,a=1/0,s=-1/0,l=-1/0;for(let e=0;e<3;e++){let t=n[2*e],r=n[2*e+1];o=Math.min(o,t),s=Math.max(s,t),a=Math.min(a,r),l=Math.max(l,r)}if(o===s||a===l)continue;let u=Math.floor(o/this._granularityCellSize),c=Math.ceil(s/this._granularityCellSize),h=Math.floor(a/this._granularityCellSize),d=Math.ceil(l/this._granularityCellSize);if(u!==c||h!==d)for(let e=h;e<d;e++){let i=this._scanlineGenerateVertexRingForCellRow(e,n,r);!function(e,t,r){if(0===t.length)throw Error("Subdivision vertex ring is empty.");let i=0,n=e[2*t[0]];for(let r=1;r<t.length;r++){let o=e[2*t[r]];o<n&&(n=o,i=r)}let o=t.length,a=i,s=(a+1)%o;for(;;){let i=a-1>=0?a-1:o-1,n=(s+1)%o,l=e[2*t[i]],u=e[2*t[n]],c=e[2*t[a]],h=e[2*t[a]+1],d=e[2*t[s]+1],p=!1;if(l<u)p=!0;else if(l>u)p=!1;else{let r=d-h,o=-(e[2*t[s]]-c),a=h<d?1:-1;((l-c)*r+(e[2*t[i]+1]-h)*o)*a>((u-c)*r+(e[2*t[n]+1]-h)*o)*a&&(p=!0)}if(p){let e=t[i],n=t[a],l=t[s];e!==n&&e!==l&&n!==l&&r.push(l,n,e),--a<0&&(a=o-1)}else{let e=t[n],i=t[a],l=t[s];e!==i&&e!==l&&i!==l&&r.push(l,i,e),++s>=o&&(s=0)}if(i===n)break}}(this._vertexBuffer,i,t)}else t.push(...r)}return t}_scanlineGenerateVertexRingForCellRow(e,t,r){let i=e*this._granularityCellSize,n=i+this._granularityCellSize,o=[];for(let e=0;e<3;e++){let a=t[2*e],s=t[2*e+1],l=t[2*(e+1)%6],u=t[(2*(e+1)+1)%6],c=t[2*(e+2)%6],h=t[(2*(e+2)+1)%6],d=l-a,p=u-s,f=0===d,m=0===p,g=(i-s)/p,y=(n-s)/p,v=Math.min(g,y),b=Math.max(g,y);if(!m&&(v>=1||b<=0)||m&&(s<i||s>n)){u>=i&&u<=n&&o.push(r[(e+1)%3]);continue}!m&&v>0&&o.push(this._vertexToIndex(a+d*v,s+p*v));let _=a+d*Math.max(v,0),x=a+d*Math.min(b,1);f||this._generateIntraEdgeVertices(o,a,s,l,u,_,x),!m&&b<1&&o.push(this._vertexToIndex(a+d*b,s+p*b)),(m||u>=i&&u<=n)&&o.push(r[(e+1)%3]),!m&&(u<=i||u>=n)&&this._generateInterEdgeVertices(o,a,s,l,u,c,h,x,i,n)}return o}_generateIntraEdgeVertices(e,t,r,i,n,o,a){let s=i-t,l=n-r,u=0===l,c=u?Math.min(t,i):Math.min(o,a),h=u?Math.max(t,i):Math.max(o,a),d=Math.floor(c/this._granularityCellSize)+1,p=Math.ceil(h/this._granularityCellSize)-1;
170if(u?t<i:o<a)for(let i=d;i<=p;i++){let n=i*this._granularityCellSize;e.push(this._vertexToIndex(n,r+l*(n-t)/s))}else for(let i=p;i>=d;i--){let n=i*this._granularityCellSize;e.push(this._vertexToIndex(n,r+l*(n-t)/s))}}_generateInterEdgeVertices(e,t,r,i,n,o,a,s,l,u){let c=a-n,h=(l-n)/c,d=(u-n)/c,p=Math.min(h,d),f=Math.max(h,d),m=i+(o-i)*p,g=Math.floor(Math.min(m,s)/this._granularityCellSize)+1,y=Math.ceil(Math.max(m,s)/this._granularityCellSize)-1,v=s<m,b=0===c;if(b&&(a===l||a===u))return;if(b||p>=1||f<=0){let e=r-a,i=o+(t-o)*Math.min((l-a)/e,(u-a)/e);g=Math.floor(Math.min(i,s)/this._granularityCellSize)+1,y=Math.ceil(Math.max(i,s)/this._granularityCellSize)-1,v=s<i}let _=n-r>0?u:l;if(v)for(let t=g;t<=y;t++)e.push(this._vertexToIndex(t*this._granularityCellSize,_));else for(let t=y;t>=g;t--)e.push(this._vertexToIndex(t*this._granularityCellSize,_))}_generateOutline(e){let t=[];for(let r of e){let e=sb(r,this._granularity,!0),i=this._pointArrayToIndices(e),n=[];for(let e=1;e<i.length;e++)n.push(i[e-1]),n.push(i[e]);t.push(n)}return t}_handlePoles(e){let t=!1,r=!1;this._canonical&&(0===this._canonical.y&&(t=!0),this._canonical.y===(1<<this._canonical.z)-1&&(r=!0)),(t||r)&&this._fillPoles(e,t,r)}_ensureNoPoleVertices(){let e=this._vertexBuffer;for(let t=0;t<e.length;t+=2){let r=e[t+1];-32768===r&&(e[t+1]=-32767),32767===r&&(e[t+1]=32766)}}_generatePoleQuad(e,t,r,i,n,o){i>n!=(-32768===o)?(e.push(t),e.push(r),e.push(this._vertexToIndex(i,o)),e.push(r),e.push(this._vertexToIndex(n,o))):(e.push(r),e.push(t),e.push(this._vertexToIndex(i,o)),e.push(this._vertexToIndex(n,o)),e.push(r)),e.push(this._vertexToIndex(i,o))}_fillPoles(e,t,r){let i=this._vertexBuffer,n=e.length;for(let o=2;o<n;o+=3){let n=e[o-2],a=e[o-1],s=e[o],l=i[2*n],u=i[2*n+1],c=i[2*a],h=i[2*a+1],d=i[2*s],p=i[2*s+1];t&&(0===u&&0===h&&this._generatePoleQuad(e,n,a,l,c,-32768),0===h&&0===p&&this._generatePoleQuad(e,a,s,c,d,-32768),0===p&&0===u&&this._generatePoleQuad(e,s,n,d,l,-32768)),r&&(8192===u&&8192===h&&this._generatePoleQuad(e,n,a,l,c,32767),8192===h&&8192===p&&this._generatePoleQuad(e,a,s,c,d,32767),8192===p&&8192===u&&this._generatePoleQuad(e,s,n,d,l,32767))}}_initializeVertices(e){for(let t=0;t<e.length;t+=2)this._vertexToIndex(e[t],e[t+1])}subdividePolygonInternal(e,t){let r;if(this._used)throw Error("Subdivision: multiple use not allowed.");this._used=!0;let{flattened:i,holeIndices:n}=function(e){let t=[],r=[];for(let i of e)if(0!==i.length)for(let n of(i!==e[0]&&t.push(r.length/2),i))r.push(n.x),r.push(n.y);return{flattened:r,holeIndices:t}}(e);this._initializeVertices(i);try{let e=function(e,t,r=2){let i,n,o,a=t&&t.length,s=a?t[0]*r:e.length,l=a9(e,0,s,r,!0),u=[];if(!l||l.next===l.prev)return u;if(a&&(l=function(e,t,r,i){let n=[];for(let r=0,o=t.length;r<o;r++){let a=a9(e,t[r]*i,r<o-1?t[r+1]*i:e.length,i,!1);a===a.next&&(a.steiner=!0),n.push(function(e){let t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e)return r}(a))}n.sort(st);for(let e=0;e<n.length;e++)r=function(e,t){let r=function(e,t){let r=t,i=e.x,n=e.y,o,a=-1/0;if(sa(e,r))return r;do{if(sa(e,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let e=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y
170);if(e<=i&&e>a&&(a=e,o=r.x<r.next.x?r:r.next,e===i))return o}r=r.next}while(r!==t)if(!o)return null;let s=o,l=o.x,u=o.y,c=1/0;r=o;do{if(i>=r.x&&r.x>=l&&i!==r.x&&si(n<u?i:a,n,l,u,n<u?a:i,n,r.x,r.y)){var h,d;let t=Math.abs(n-r.y)/(i-r.x);sc(r,e)&&(t<c||t===c&&(r.x>o.x||r.x===o.x&&(h=o,d=r,0>so(h.prev,h,d.prev)&&0>so(d.next,h,h.next))))&&(o=r,c=t)}r=r.next}while(r!==s)return o}(e,t);if(!r)return t;let i=sh(r,e);return se(i,i.next),se(r,r.next)}(n[e],r);return r}(e,t,l,r)),e.length>80*r){i=e[0],n=e[1];let t=i,a=n;for(let o=r;o<s;o+=r){let r=e[o],s=e[o+1];r<i&&(i=r),s<n&&(n=s),r>t&&(t=r),s>a&&(a=s)}o=Math.max(t-i,a-n),o=0!==o?32767/o:0}return function e(t,r,i,n,o,a,s){if(!t)return;!s&&a&&function(e,t,r,i){let n=e;do 0===n.z&&(n.z=sr(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e)n.prevZ.nextZ=null,n.prevZ=null,function(e){let t,r=1;do{let i,n=e;e=null;let o=null;for(t=0;n;){t++;let a=n,s=0;for(let e=0;e<r&&(s++,a=a.nextZ);e++);let l=r;for(;s>0||l>0&&a;)0!==s&&(0===l||!a||n.z<=a.z)?(i=n,n=n.nextZ,s--):(i=a,a=a.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=a}o.nextZ=null,r*=2}while(t>1)}(n)}(t,n,o,a);let l=t;for(;t.prev!==t.next;){let u=t.prev,c=t.next;if(a?function(e,t,r,i){let n=e.prev,o=e.next;if(so(n,e,o)>=0)return!1;let a=n.x,s=e.x,l=o.x,u=n.y,c=e.y,h=o.y,d=Math.min(a,s,l),p=Math.min(u,c,h),f=Math.max(a,s,l),m=Math.max(u,c,h),g=sr(d,p,t,r,i),y=sr(f,m,t,r,i),v=e.prevZ,b=e.nextZ;for(;v&&v.z>=g&&b&&b.z<=y;){if(v.x>=d&&v.x<=f&&v.y>=p&&v.y<=m&&v!==n&&v!==o&&sn(a,u,s,c,l,h,v.x,v.y)&&so(v.prev,v,v.next)>=0||(v=v.prevZ,b.x>=d&&b.x<=f&&b.y>=p&&b.y<=m&&b!==n&&b!==o&&sn(a,u,s,c,l,h,b.x,b.y)&&so(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;v&&v.z>=g;){if(v.x>=d&&v.x<=f&&v.y>=p&&v.y<=m&&v!==n&&v!==o&&sn(a,u,s,c,l,h,v.x,v.y)&&so(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=y;){if(b.x>=d&&b.x<=f&&b.y>=p&&b.y<=m&&b!==n&&b!==o&&sn(a,u,s,c,l,h,b.x,b.y)&&so(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}(t,n,o,a):function(e){let t=e.prev,r=e.next;if(so(t,e,r)>=0)return!1;let i=t.x,n=e.x,o=r.x,a=t.y,s=e.y,l=r.y,u=Math.min(i,n,o),c=Math.min(a,s,l),h=Math.max(i,n,o),d=Math.max(a,s,l),p=r.next;for(;p!==t;){if(p.x>=u&&p.x<=h&&p.y>=c&&p.y<=d&&sn(i,a,n,s,o,l,p.x,p.y)&&so(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}(t))r.push(u.i,t.i,c.i),sp(t),t=c.next,l=c.next;else if((t=c)===l){s?1===s?e(t=function(e,t){let r=e;do{let i=r.prev,n=r.next.next;!sa(i,n)&&ss(i,r,r.next,n)&&sc(i,n)&&sc(n,i)&&(t.push(i.i,r.i,n.i),sp(r),sp(r.next),r=e=n),r=r.next}while(r!==e)return se(r)}(se(t),r),r,i,n,o,a,2):2===s&&function(t,r,i,n,o,a){let s=t;do{let t=s.next.next;for(;t!==s.prev;){var l,u;if(s.i!==t.i&&(l=s,u=t,l.next.i!==u.i&&l.prev.i!==u.i&&!function(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&ss(r,r.next,e,t))return!0;r=r.next}while(r!==e)return!1}(l,u)&&(sc(l,u)&&sc(u,l)&&function(e,t){let r=e,i=!1,n=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>
170o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e)return i}(l,u)&&(so(l.prev,l,u.prev)||so(l,u.prev,u))||sa(l,u)&&so(l.prev,l,l.next)>0&&so(u.prev,u,u.next)>0))){let l=sh(s,t);return s=se(s,s.next),l=se(l,l.next),e(s,r,i,n,o,a,0),void e(l,r,i,n,o,a,0)}t=t.next}s=s.next}while(s!==t)}(t,r,i,n,o,a):e(se(t),r,i,n,o,a,1);break}}}(l,u,r,i,n,o,0),u}(i,n),t=this._convertIndices(i,e);r=this._subdivideTrianglesScanline(t)}catch(e){console.error(e)}let o=[];return t&&(o=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(r),{verticesFlattened:this._vertexBuffer,indicesTriangles:r,indicesLineList:o}}_convertIndices(e,t){let r=[];for(let i of t)r.push(this._vertexToIndex(e[2*i],e[2*i+1]));return r}_pointArrayToIndices(e){let t=[];for(let r of e)t.push(this._vertexToIndex(r.x,r.y));return t}}function sv(e,t,r,i=!0){return new sy(r,t).subdividePolygonInternal(e,i)}function sb(e,t,r=!1){if(!e||e.length<1||e.length<2)return[];let i=e[0],n=e[e.length-1],o=r&&(i.x!==n.x||i.y!==n.y);if(t<2)return o?[...e,e[0]]:[...e];let a=Math.floor(8192/t),s=[];s.push(new x(e[0].x,e[0].y));let l=e.length,u=o?l:l-1;for(let t=0;t<u;t++){let r=e[t],i=t<l-1?e[t+1]:e[0],n=r.x,o=r.y,u=i.x,c=i.y,h=n!==u,d=o!==c;if(!h&&!d)continue;let p=u-n,f=c-o,m=Math.abs(p),g=Math.abs(f),y=n,v=o;for(;;){let e=p>0?(Math.floor(y/a)+1)*a:(Math.ceil(y/a)-1)*a,t=f>0?(Math.floor(v/a)+1)*a:(Math.ceil(v/a)-1)*a,r=Math.abs(y-e),i=Math.abs(v-t),n=Math.abs(v-c),o=h?r/m:1/0,l=d?i/g:1/0;if((Math.abs(y-u)<=r||!h)&&(n<=i||!d))break;if(o<l&&h||!d){let t=new x(y=e,Math.round(v+=f*o));s[s.length-1].x===t.x&&s[s.length-1].y===t.y||s.push(t)}else{let e=new x(Math.round(y+=p*l),v=t);s[s.length-1].x===e.x&&s[s.length-1].y===e.y||s.push(e)}}let b=new x(u,c);s[s.length-1].x===b.x&&s[s.length-1].y===b.y||s.push(b)}return s}function s_(e,t,r,i,n,o,a,s,l){let u=n.length/2,c=a&&s&&l;if(u<o0.MAX_VERTEX_ARRAY_LENGTH){let h,d,p=t.prepareSegment(u,r,i),f=p.vertexLength;for(let e=0;e<o.length;e+=3)i.emplaceBack(f+o[e],f+o[e+1],f+o[e+2]);p.vertexLength+=u,p.primitiveLength+=o.length/3,c&&(h=(d=a.prepareSegment(u,r,s)).vertexLength,d.vertexLength+=u);for(let t=0;t<n.length;t+=2)e(n[t],n[t+1]);if(c)for(let e of l){for(let t=1;t<e.length;t+=2)s.emplaceBack(h+e[t-1],h+e[t]);d.primitiveLength+=e.length/2}}else!function(e,t,r,i,n,o){let a=[];for(let e=0;e<i.length/2;e++)a.push(-1);let s={count:0},l=0,u=e.getOrCreateLatestSegment(t,r),c=u.vertexLength;for(let h=2;h<n.length;h+=3){let d=n[h-2],p=n[h-1],f=n[h],m=a[d]<l,g=a[p]<l,y=a[f]<l;u.vertexLength+(+!!m+ +!!g+ +!!y)>o0.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,m=!0,g=!0,y=!0,c=0);let v=sx(a,i,o,s,d,m,u),b=sx(a,i,o,s,p,g,u),_=sx(a,i,o,s,f,y,u);r.emplaceBack(c+v-l,c+b-l,c+_-l),u.primitiveLength++}}(t,r,i,n,o,e),c&&function(e,t,r,i,n,o){let a=[];for(let e=0;e<i.length/2;e++)a.push(-1);let s={count:0},l=0,u=e.getOrCreateLatestSegment(t,r),c=u.vertexLength;for(let h of n)for(let n=1;n<h.length;n+=2){let d=h[n-1],p=h[n],f=a[d]<l,m=a[p]<l;u.vertexLength+(+!!f+ +!!m)>o0.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,f=!0,m=!0,c=0);let g=sx(a,i,o,s,d,f,u),y=sx(a,i,o,s,p,m,u);r.emplaceBack(c+g-l,c+y-l),u.primitiveLength++}}(a,r,s,n,l,e),t.forceNewSegmentOnNextPrepare(),null==a||a.forceNewSegmentOnNextPrepare()}function sx(e,t,r,i,n,o,a){if(o){let o=i.count;return r(t[2*n],t[2*n+1]),e[n]=i.count,i.count++,a.vertexLength++,o}return e[n]}class sA{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new oN,this.indexArray=new oY,this.indexArray2=new oQ,this.programConfigurations=new av(e.layers,e.zoom),this.segments=new o0,this.segments2=new o0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=a8("fill",this.layers,t);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),o=[];for(let{feature:a,id:s,index:l,sourceLayerIndex:u}of e){let e=this.layers[0]._featureFilter.needGeometry,c=ax(a,e);if(!this.layers[0]._featureFilter.filter(new nz(this.zoom),c,r))continue;let h=n?i.evaluate(c,{},r,t.availableImages):void 0,d={id:s,properties:a.properties,type:a.type,sourceLayerIndex:u,index:l,geometry:e?c.geometry:a_(a),patterns:{},sortKey:h};o.push(d)}for(let i of(n&&o.sort((e,t)=>
170e.sortKey-t.sortKey),o)){let{geometry:n,index:o,sourceLayerIndex:a}=i;if(this.hasDependencies){let e=a7("fill",this.layers,i,{zoom:this.zoom},t);this.patternFeatures.push(e)}else this.addFeature(i,n,o,r,{},t.subdivisionGranularity);t.featureIndex.insert(e[o].feature,n,o,a,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e,t,r){for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,t,r,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,a6),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,t,r,i,n,o){for(let e of rZ(t,500)){let t=sv(e,i,o.fill.getGranularityForZoomLevel(i.z)),r=this.layoutVertexArray;s_((e,t)=>{r.emplaceBack(e,t)},this.segments,this.layoutVertexArray,this.indexArray,t.verticesFlattened,t.indicesTriangles,this.segments2,this.indexArray2,t.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}}nw("FillBucket",sA,{omit:["layers","patternFeatures"]});var sw={get paint(){return d=d||new n1({"fill-antialias":new nX(eJ.paint_fill["fill-antialias"]),"fill-opacity":new nY(eJ.paint_fill["fill-opacity"]),"fill-color":new nY(eJ.paint_fill["fill-color"]),"fill-outline-color":new nY(eJ.paint_fill["fill-outline-color"]),"fill-translate":new nX(eJ.paint_fill["fill-translate"]),"fill-translate-anchor":new nX(eJ.paint_fill["fill-translate-anchor"]),"fill-pattern":new nQ(eJ.paint_fill["fill-pattern"])})},get layout(){return h=h||new n1({"fill-sort-key":new nY(eJ.layout_fill["fill-sort-key"])})}};class sS extends n5{constructor(e,t){super(e,sw,t)}recalculate(e,t){super.recalculate(e,t);let 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(e){return new sA(e)}queryRadius(){return aO(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:i}){return aT(aD(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),t)}isTileClipped(){return!0}}let sT=oe([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),sC=oe([{name:"a_centroid",components:2,type:"Int16"}],4),{members:sE}=sT;class sP{constructor(e,t,r,i,n){this.properties={},this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=n,e.readFields(sI,this,t)}loadGeometry(){let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=[],i,n=1,o=0,a=0,s=0;for(;e.pos<t;){if(o<=0){let t=e.readVarint();n=7&t,o=t>>3}if(o--,1===n||2===n)a+=e.readSVarint(),s+=e.readSVarint(),1===n&&(i&&r.push(i),i=[]),i&&i.push(new x(a,s));else{if(7!==n)throw Error(`unknown command ${n}`);i&&i.push(i[0].clone())}}return i&&r.push(i),r}bbox(){let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=1,i=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;for(;e.pos<t;){if(i<=0){let t=e.readVarint();r=7&t,i=t>>3}if(i--,1===r||2===r)n+=e.readSVarint(),o+=e.readSVarint(),n<a&&(a=n),n>s&&(s=n),o<l&&(l=o),o>u&&(u=o);else if(7!==r)throw Error(`unknown command ${r}`)}return[a,l,s,u]}toGeoJSON(e,t,r){let i,n=this.extent*Math.pow(2,r),o=this.extent*e,a=this.extent*t,s=this.loadGeometry();function l(e){return[360*(e.x+o)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+a)/n)*Math.PI))-90]}function u(e){return e.map(l)}if(1===this.type){let e=[];for(let t of s)e.push(t[0]);let t=u(e);i=1===e.length?{type:"Point",coordinates:t[0]}:{type:"MultiPoint",coordinates:t}}else if(2===this.type){let e=s.map(u);i=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}}else{if(3!==this.type)throw Error("unknown feature type");{let e=sM(s),t=[];for(let r of e)t.push(r.map(u));i=1===t.length?{type:"Polygon",coordinates:t[0]}:{type:"MultiPolygon",coordinates:t}}}let c={type:"Feature",geometry:i,properties:this.properties};return null!=this.id&&(c.id=this.id),c}}function sI(e,t,r){1===e?t.id=r.readVarint():2===e?function(e,t){let r=e.readVarint()+e.pos;for(;e.pos<r;){let r=t._keys[e.readVarint()],i=t._values[e.readVarint()];t.properties[r]=i}}
170(r,t):3===e?t.type=r.readVarint():4===e&&(t._geometry=r.pos)}function sM(e){let t,r,i=e.length;if(i<=1)return[e];let n=[];for(let o=0;o<i;o++){let i=function(e){let t=0;for(let r,i,n=0,o=e.length,a=o-1;n<o;a=n++)r=e[n],t+=((i=e[a]).x-r.x)*(r.y+i.y);return t}(e[o]);0!==i&&(void 0===r&&(r=i<0),r===i<0?(t&&n.push(t),t=[e[o]]):t&&t.push(e[o]))}return t&&n.push(t),n}sP.types=["Unknown","Point","LineString","Polygon"];class sk{constructor(e,t){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(sO,this,t),this.length=this._features.length}feature(e){if(e<0||e>=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let t=this._pbf.readVarint()+this._pbf.pos;return new sP(this._pbf,t,this.extent,this._keys,this._values)}}function sO(e,t,r){15===e?t.version=r.readVarint():1===e?t.name=r.readString():5===e?t.extent=r.readVarint():2===e?t._features.push(r.pos):3===e?t._keys.push(r.readString()):4===e&&t._values.push(function(e){let t=null,r=e.readVarint()+e.pos;for(;e.pos<r;){let r=e.readVarint()>>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}if(null==t)throw Error("unknown feature value");return t}(r))}class sD{constructor(e,t){this.layers=e.readFields(sR,{},t)}}function sR(e,t,r){if(3===e){let e=new sk(r,r.readVarint()+r.pos);e.length&&(t[e.name]=e)}}function sL(e,t,r,i,n,o,a,s){e.emplaceBack(t,r,2*Math.floor(8192*i)+a,8192*n*2,8192*o*2,Math.round(s))}class sB{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new oG,this.centroidVertexArray=new oj,this.indexArray=new oY,this.programConfigurations=new av(e.layers,e.zoom),this.segments=new o0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){for(let{feature:i,id:n,index:o,sourceLayerIndex:a}of(this.features=[],this.hasDependencies=a8("fill-extrusion",this.layers,t),e)){let e=this.layers[0]._featureFilter.needGeometry,s=ax(i,e);if(!this.layers[0]._featureFilter.filter(new nz(this.zoom),s,r))continue;let l={id:n,sourceLayerIndex:a,index:o,geometry:e?s.geometry:a_(i),properties:i.properties,type:i.type,patterns:{}};this.hasDependencies?this.features.push(a7("fill-extrusion",this.layers,l,{zoom:this.zoom},t)):this.addFeature(l,l.geometry,o,r,{},t.subdivisionGranularity),t.featureIndex.insert(i,l.geometry,o,a,this.index,!0)}}addFeatures(e,t,r){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,t,r,e.subdivisionGranularity)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,sE),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,sC.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,i,n,o){for(let r of rZ(t,500)){let t={x:0,y:0,sampleCount:0},n=this.layoutVertexArray.length;this.processPolygon(t,i,e,r,o);let a=this.layoutVertexArray.length-n,s=Math.floor(t.x/t.sampleCount),l=Math.floor(t.y/t.sampleCount);for(let e=0;e<a;e++)this.centroidVertexArray.emplaceBack(s,l)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}processPolygon(e,t,r,i,n){if(i.length<1||sF(i[0]))return;for(let t of i)0!==t.length&&function(e,t){for(let r=0;r<t.length;r++){let i=t[r];r===t.length-1&&t[0].x===i.x&&t[0].y===i.y||(e.x+=i.x,e.y+=i.y,e.sampleC
170ount++)}}(e,t);let o={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},a=n.fill.getGranularityForZoomLevel(t.z),s="Polygon"===sP.types[r.type];for(let e of i){if(0===e.length||sF(e))continue;let t=sb(e,a,s);this._generateSideFaces(t,o)}if(!s)return;let l=sv(i,t,a,!1),u=this.layoutVertexArray;s_((e,t)=>{sL(u,e,t,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let i=1;i<e.length;i++){let n=e[i],o=e[i-1];if(n.x===o.x&&(n.x<0||n.x>8192)||n.y===o.y&&(n.y<0||n.y>8192))continue;t.segment.vertexLength+4>o0.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let a=n.sub(o)._perp()._unit(),s=o.dist(n);r+s>32768&&(r=0),sL(this.layoutVertexArray,n.x,n.y,a.x,a.y,0,0,r),sL(this.layoutVertexArray,n.x,n.y,a.x,a.y,0,1,r),r+=s,sL(this.layoutVertexArray,o.x,o.y,a.x,a.y,0,0,r),sL(this.layoutVertexArray,o.x,o.y,a.x,a.y,0,1,r);let l=t.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}}function sF(e){return e.every(e=>e.x<0)||e.every(e=>e.x>8192)||e.every(e=>e.y<0)||e.every(e=>e.y>8192)}nw("FillExtrusionBucket",sB,{omit:["layers","features"]});var sj={get paint(){return p=p||new n1({"fill-extrusion-opacity":new nX(eJ["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new nY(eJ["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new nX(eJ["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new nX(eJ["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new nQ(eJ["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new nY(eJ["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new nY(eJ["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new nX(eJ["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class sz extends n5{constructor(e,t){super(e,sj,t)}createBucket(e){return new sB(e)}queryRadius(){return aO(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:o,pixelPosMatrix:a}){let s=aD(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,o),l=this.paint.get("fill-extrusion-height").evaluate(t,r),u=this.paint.get("fill-extrusion-base").evaluate(t,r),c=function(e,t){let r=[];for(let i of e){let e=[i.x,i.y,0,1];eo(e,e,t),r.push(new x(e[0]/e[3],e[1]/e[3]))}return r}(s,a),h=function(e,t,r,i){let n=[],o=[],a=i[8]*t,s=i[9]*t,l=i[10]*t,u=i[11]*t,c=i[8]*r,h=i[9]*r,d=i[10]*r,p=i[11]*r;for(let t of e){let e=[],r=[];for(let n of t){let t=n.x,o=n.y,f=i[0]*t+i[4]*o+i[12],m=i[1]*t+i[5]*o+i[13],g=i[2]*t+i[6]*o+i[14],y=i[3]*t+i[7]*o+i[15],v=g+l,b=y+u,_=f+c,A=m+h,w=g+d,S=y+p,T=new x((f+a)/b,(m+s)/b);T.z=v/b,e.push(T);let C=new x(_/S,A/S);C.z=w/S,r.push(C)}n.push(e),o.push(r)}return[n,o]}(i,u,l,a);return function(e,t,r){let i=1/0;aT(r,t)&&(i=sG(r,t[0]));for(let n=0;n<t.length;n++){let o=t[n],a=e[n];for(let e=0;e<o.length-1;e++){let t=o[e],n=[t,o[e+1],a[e+1],a[e],t];aw(r,n)&&(i=Math.min(i,sG(r,n)))}}return 1/0!==i&&i}(h[0],h[1],c)}}function sN(e,t){return e.x*t.x+e.y*t.y}function sG(e,t){if(1===e.length){let r,i=0,n=t[i++];for(;!r||n.equals(r);)if(!(r=t[i++]))return 1/0;for(;i<t.length;i++){let o=t[i],a=e[0],s=r.sub(n),l=o.sub(n),u=a.sub(n),c=sN(s,s),h=sN(s,l),d=sN(l,l),p=sN(u,s),f=sN(u,l),m=c*d-h*h,g=(d*p-h*f)/m,y=(c*f-h*p)/m,v=n.z*(1-g-y)+r.z*g+o.z*y;if(isFinite(v))return v}return 1/0}{let e=1/0;for(let r of t)e=Math.min(e,r.z);return e}}let sV=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class sU{static from(e){if(!(e instanceof ArrayBuffer))throw Error("Data must be an instance of ArrayBuffer.");let[t,r]=new Uint8Array(e,0,2);if(219!==t)throw Error("Data does not appear to be in a KDBush format.");let i=r>>4;if(1!==i)throw Error(`Got v${i} data when expected v1.`);let n=sV[15&r];if(!n)throw Error("Unrecognized array type.");
170let[o]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new sU(a,o,n,e)}constructor(e,t=64,r=Float64Array,i){if(isNaN(e)||e<0)throw Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let n=sV.indexOf(this.ArrayType),o=2*e*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-a%8)%8;if(n<0)throw Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+a+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+o+a+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+a+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+n]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return function e(t,r,i,n,o,a){if(o-n<=i)return;let s=n+o>>1;(function e(t,r,i,n,o,a){for(;o>n;){if(o-n>600){let s=o-n+1,l=i-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(t,r,i,Math.max(n,Math.floor(i-l*c/s+h)),Math.min(o,Math.floor(i+(s-l)*c/s+h)),a)}let s=r[2*i+a],l=n,u=o;for(sH(t,r,n,i),r[2*o+a]>s&&sH(t,r,n,o);l<u;){for(sH(t,r,l,u),l++,u--;r[2*l+a]<s;)l++;for(;r[2*u+a]>s;)u--}
170r[2*n+a]===s?sH(t,r,n,u):sH(t,r,++u,o),u<=i&&(n=u+1),i<=u&&(o=u-1)}})(t,r,s,n,o,a),e(t,r,i,n,s-1,1-a),e(t,r,i,s+1,o,1-a)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:n,coords:o,nodeSize:a}=this,s=[0,n.length-1,0],l=[];for(;s.length;){let u=s.pop()||0,c=s.pop()||0,h=s.pop()||0;if(c-h<=a){for(let a=h;a<=c;a++){let s=o[2*a],u=o[2*a+1];s>=e&&s<=r&&u>=t&&u<=i&&l.push(n[a])}continue}let d=h+c>>1,p=o[2*d],f=o[2*d+1];p>=e&&p<=r&&f>=t&&f<=i&&l.push(n[d]),(0===u?e<=p:t<=f)&&(s.push(h),s.push(d-1),s.push(1-u)),(0===u?r>=p:i>=f)&&(s.push(d+1),s.push(c),s.push(1-u))}return l}within(e,t,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:i,coords:n,nodeSize:o}=this,a=[0,i.length-1,0],s=[],l=r*r;for(;a.length;){let u=a.pop()||0,c=a.pop()||0,h=a.pop()||0;if(c-h<=o){for(let r=h;r<=c;r++)sq(n[2*r],n[2*r+1],e,t)<=l&&s.push(i[r]);continue}let d=h+c>>1,p=n[2*d],f=n[2*d+1];sq(p,f,e,t)<=l&&s.push(i[d]),(0===u?e-r<=p:t-r<=f)&&(a.push(h),a.push(d-1),a.push(1-u)),(0===u?e+r>=p:t+r>=f)&&(a.push(d+1),a.push(c),a.push(1-u))}return s}}function sH(e,t,r,i){sW(e,r,i),sW(t,2*r,2*i),sW(t,2*r+1,2*i+1)}function sW(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function sq(e,t,r,i){let n=e-r,o=t-i;return n*n+o*o}function sZ(e,t,r,i){let n={id:null==e?null:e,type:t,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(t){case"Point":case"MultiPoint":sK(n,r);break;case"LineString":sK(n,r.points);break;case"Polygon":sK(n,r[0].points);break;case"MultiLineString":for(let e of r)sK(n,e.points);break;case"MultiPolygon":for(let e of r)sK(n,e[0].points)}return n}function s$(e){e.points.length>64&&(e.points=new Float64Array(e.points))}function sK(e,t){for(let r=0;r<t.length;r+=3)e.minX=Math.min(e.minX,t[r]),e.minY=Math.min(e.minY,t[r+1]),e.maxX=Math.max(e.maxX,t[r]),e.maxY=Math.max(e.maxY,t[r+1])}function sX(e,t){let r=[];switch(e.type){case"FeatureCollection":for(let i=0;i<e.features.length;i++)sY(r,e.features[i],t,i);break;case"Feature":sY(r,e,t);break;default:sY(r,{geometry:e,properties:void 0},t)}return r}function sY(e,t,r,i){var n,o,a,s,l,u;if(!t.geometry)return;if("GeometryCollection"===t.geometry.type)return void function(e,t,r,i,n){for(let o of r.geometries)sY(e,{id:t.id,geometry:o,properties:t.properties},i,n)}(e,t,t.geometry,r,i);let c=t.geometry.coordinates;if(!c?.length)return;let h=r.promoteId?t.properties?.[r.promoteId]:r.generateId?i||0:t.id,d=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2);switch(t.geometry.type){case"Point":let p;return void(n=t.geometry,o=t.properties,(p=[]).push(s0(n.coordinates[0]),s1(n.coordinates[1]),0),e.push(sZ(h,"Point",p,o)));case"MultiPoint":return void function(e,t,r,i){let n=[];for(let e of r.coordinates)n.push(s0(e[0]),s1(e[1]),0);e.push(sZ(t,"MultiPoint",n,i))}(e,h,t.geometry,t.properties);case"LineString":let f;return void(a=t.geometry,s=t.properties,f={points:[]},sQ(a.coordinates,f,d,!1),e.push(sZ(h,"LineString",f,s)));case"MultiLineString":return void function(e,t,r,i,n,o){if(n.lineMetrics)for(let n of r.coordinates){let r={points:[]};sQ(n,r,i,!1),e.push(sZ(t,"LineString",r,o))}else{let n=[];sJ(r.coordinates,n,i,!1),e.push(sZ(t,"MultiLineString",n,o))}}(e,h,t.geometry,d,r,t.properties);case"Polygon":let m;return void(l=t.geometry,u=t.properties,m=[],sJ(l.coordinates,m,d,!0),e.push(sZ(h,"Polygon",m,u)));case"MultiPolygon":return void function(e,t,r,i,n){let o=[];for(let e of r.coordinates){let t=[];sJ(e,t,i,!0),o.push(t)}e.push(sZ(t,"MultiPolygon",o,n))}(e,h,t.geometry,d,t.properties);default:throw Error("Input data is not a valid GeoJSON object.")}}function sQ(e,t,r,i){let n,o,a=0;for(let r=0;r<e.length;r++){let s=s0(e[r][0]),l=s1(e[r][1]);t.points.push(s,l,0),r>0&&(a+=i?(n*l-s*o)/2:Math.sqrt(Math.pow(s-n,2)+Math.pow(l-o,2))),n=s,o=l}let s=t.points.length-3;t.points[2]=1,r>0&&function e(t,r,i,n){let o=n,a=r+(i-r>>1),s,l=i-r,u=t[r],c=t[r+1],h=t[i],d=t[i+1];for(let e=r+3;e<i;e+=3){let r=function(e,t,r,i,n,o){let a=n-r,s=o-i;if(0!==a||0!==s){let l=((e-r)*a+(t-i)*s)/(a*a+s*s);l>1?(r=n,i=o):l>0&&(r+=a*l,i+=s*l)}return(a=e-r)*a+(s=t-i)*s}(t[e],t[e+1],u,c,h,d);if(r>o)s=e,o=r;else if(r===o){let t=Math.abs(e-a);t<l&&(s=e,l=t)}}o>n&&(s-r>3&&e(t,r,s,n),t[s+2]=o,i-s>3&&e(t,s,i,n))}(t.points,0,s,r),t.points[s+2]=1,s$(t),t.size=Math.abs(a),t.start=0,t.end=t.size}
170function sJ(e,t,r,i){for(let n=0;n<e.length;n++){let o={points:[]};sQ(e[n],o,r,i),t.push(o)}}function s0(e){return e/360+.5}function s1(e){let t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function s2(e){let t={type:"Feature",geometry:function(e){let{type:t,geometry:r}=e;switch(t){case"Point":var i,n;return{type:t,coordinates:(i=r[0],n=r[1],[s5(i),s4(n)])};case"MultiPoint":return{type:t,coordinates:s3(r)};case"LineString":return{type:t,coordinates:s3(r.points)};case"MultiLineString":case"Polygon":return{type:t,coordinates:r.map(e=>s3(e.points))};case"MultiPolygon":return{type:t,coordinates:r.map(e=>e.map(e=>s3(e.points)))}}}(e),properties:e.tags};return null!=e.id&&(t.id=e.id),t}function s3(e){let t=[];for(let n=0;n<e.length;n+=3){var r,i;t.push((r=e[n],i=e[n+1],[s5(r),s4(i)]))}return t}function s5(e){return 360*(e-.5)}function s4(e){return 360*Math.atan(Math.exp((180-360*e)*Math.PI/180))/Math.PI-90}function s6(e,t,r,i,n,o,a,s){if(i/=t,o>=(r/=t)&&a<i)return e;if(a<r||o>=i)return null;let l=[];for(let t of e){let e=n===R.X?t.minX:t.minY,o=n===R.X?t.maxX:t.maxY;if(e>=r&&o<i)l.push(t);else if(!(o<r||e>=i))switch(t.type){case"Point":case"MultiPoint":!function(e,t,r,i,n){let o=[];(function(e,t,r,i,n){for(let o=0;o<e.length;o+=3){let a=e[o+n];a>=r&&a<=i&&le(t,e[o],e[o+1],e[o+2])}})(e.geometry,o,r,i,n),o.length&&t.push(sZ(e.id,3===o.length?"Point":"MultiPoint",o,e.tags))}(t,l,r,i,n);continue;case"LineString":!function(e,t,r,i,n,o){let a=[];if(s8(e.geometry,a,r,i,n,!1,o.lineMetrics),a.length)if(o.lineMetrics)for(let r of a)t.push(sZ(e.id,"LineString",r,e.tags));else t.push(a.length>1?sZ(e.id,"MultiLineString",a,e.tags):sZ(e.id,"LineString",a[0],e.tags))}(t,l,r,i,n,s);continue;case"MultiLineString":!function(e,t,r,i,n){let o=[];s9(e.geometry,o,r,i,n,!1),o.length&&t.push(1!==o.length?sZ(e.id,"MultiLineString",o,e.tags):sZ(e.id,"LineString",o[0],e.tags))}(t,l,r,i,n);continue;case"Polygon":!function(e,t,r,i,n){let o=[];s9(e.geometry,o,r,i,n,!0),o.length&&t.push(sZ(e.id,"Polygon",o,e.tags))}(t,l,r,i,n);continue;case"MultiPolygon":!function(e,t,r,i,n){let o=[];for(let t of e.geometry){let e=[];s9(t,e,r,i,n,!0),e.length&&o.push(e)}o.length&&t.push(sZ(e.id,"MultiPolygon",o,e.tags))}(t,l,r,i,n);continue}}return l.length?l:null}function s8(e,t,r,i,n,o,a){let s=s7(e),l=n===R.X?lt:lr,u,c,h=e.start;for(let d=0;d<e.points.length-3;d+=3){let p=e.points[d],f=e.points[d+1],m=e.points[d+2],g=e.points[d+3],y=e.points[d+4],v=n===R.X?p:f,b=n===R.X?g:y,_=!1;a&&(u=Math.sqrt(Math.pow(p-g,2)+Math.pow(f-y,2))),v<r?b>r&&(c=l(s,p,f,g,y,r),a&&(s.start=h+u*c)):v>i?b<i&&(c=l(s,p,f,g,y,i),a&&(s.start=h+u*c)):le(s.points,p,f,m),b<r&&v>=r&&(c=l(s,p,f,g,y,r),_=!0),b>i&&v<=i&&(c=l(s,p,f,g,y,i),_=!0),!o&&_&&(a&&(s.end=h+u*c),t.push(s),s=s7(e)),a&&(h+=u)}let d=e.points.length-3,p=e.points[d],f=e.points[d+1],m=n===R.X?p:f;m>=r&&m<=i&&le(s.points,p,f,e.points[d+2]),d=s.points.length-3,o&&d>=3&&(s.points[d]!==s.points[0]||s.points[d+1]!==s.points[1])&&le(s.points,s.points[0],s.points[1],s.points[2]),s.points.length&&(s$(s),t.push(s))}function s7(e){return{points:[],size:e.size,start:e.start,end:e.end}}function s9(e,t,r,i,n,o){for(let a of e)s8(a,t,r,i,n,o,!1)}function le(e,t,r,i){e.push(t,r,i)}function lt(e,t,r,i,n,o){let a=(o-t)/(i-t);return le(e.points,o,r+(n-r)*a,1),a}function lr(e,t,r,i,n,o){let a=(o-r)/(n-r);return le(e.points,t+(i-t)*a,o,1),a}function li(e,t){let r=t.buffer/t.extent,i=e,n=s6(e,1,-1-r,r,R.X,-1,2,t),o=s6(e,1,1-r,2+r,R.X,-1,2,t);return(n||o)&&(i=s6(e,1,-r,1+r,R.X,-1,2,t)||[],n&&(i=ln(n,1).concat(i)),o&&(i=i.concat(ln(o,-1)))),i}function ln(e,t){let r=[];for(let i of e)switch(i.type){case"Point":case"MultiPoint":{let e=function(e,t){let r=[];for(let i=0;i<e.length;i+=3)r.push(e[i]+t,e[i+1],e[i+2]);return r}(i.geometry,t);r.push(sZ(i.id,i.type,e,i.tags));continue}case"LineString":{let e=lo(i.geometry,t);r.push(sZ(i.id,i.type,e,i.tags));continue}case"MultiLineString":case"Polygon":{let e=[];for(let r of i.geometry)e.push(lo(r,t));r.push(sZ(i.id,i.type,e,i.tags));continue}case"MultiPolygon":{let e=[];for(let r of i.geometry){let i=[];for(let e of r)i.push(lo(e,t));e.push(i)}r.push(sZ(i.id,i.type,e,i.tags));continue}}return r}function lo(e,t){let r={points:[],size:e.size};void 0!==e.start&&(r.start=e.start,r.end=e.end);for(let i=0;i<e.points.length;i+=3)r.points.push(e.points[i]+t,e.points[i+1],e.points[i+2]);return s$(r),r}function la(e,t){if(t.removeAllProperties)return{};let r={...e||{}};if(t.removeProperties)for(let e of t.removeProperties)delete r[e];
170if(t.addOrUpdateProperties)for(let{key:e,value:i}of t.addOrUpdateProperties)r[e]=i;return r}(w=R||(R={}))[w.X=0]="X",w[w.Y=1]="Y";let ls={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e};class ll{constructor(e){this.options=Object.assign(Object.create(ls),e),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(e){let t=[];for(let r of e){if(!r.geometry)continue;let[e,i]=r.geometry.coordinates,[n,o]=[s0(e),s1(i)];t.push({id:r.id,type:"Point",geometry:[n,o],tags:r.properties})}this.createIndex(t)}initialize(e){let t=[];for(let r of e)"Point"===r.type&&t.push(r);this.createIndex(t)}updateIndex(e,t,r){this.options=Object.assign(Object.create(ls),r.clusterOptions),this.initialize(e)}createIndex(e){let{log:t,minZoom:r,maxZoom:i}=this.options;t&&console.time("total time");let n=`prepare ${e.length} points`;t&&console.time(n),this.points=e;let o=[];for(let t=0;t<e.length;t++){let r=e[t];if(!r?.geometry)continue;let[i,n]=r.geometry;i=Math.fround(i),n=Math.fround(n),o.push(i,n,1/0,t,-1,1),this.options.reduce&&o.push(0)}let a=this.trees[i+1]=this.createTree(o);t&&console.timeEnd(n);for(let e=i;e>=r;e--){let r=Date.now();a=this.trees[e]=this.createTree(this.cluster(a,e)),t&&console.log("z%d: %d clusters in %dms",e,a.numItems,Date.now()-r)}t&&console.timeEnd("total time")}getClusters(e,t){return this.getClustersInternal(e,t).map(e=>s2(e))}getClustersInternal(e,t){let r=((e[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[1])),n=180===e[2]?180:((e[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,n=180;else if(r>n){let e=this.getClustersInternal([r,i,180,o],t),a=this.getClustersInternal([-180,i,n,o],t);return e.concat(a)}let a=this.trees[this.limitZoom(t)],s=a.range(s0(r),s1(o),s0(n),s1(i)),l=a.flatData,u=[];for(let e of s){var c;let t=this.stride*e;u.push(l[t+5]>1?(c=this.clusterProps,{id:l[t+3],type:"Point",tags:lu(l,t,c),geometry:[l[t],l[t+1]]}):this.points[l[t+3]])}return u}getChildren(e){let t=this.getOriginId(e),r=this.getOriginZoom(e),i=Error("No cluster with the specified id: "+e),n=this.trees[r];if(!n)throw i;let o=n.flatData;if(t*this.stride>=o.length)throw i;let a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=n.within(o[t*this.stride],o[t*this.stride+1],a),l=[];for(let t of s){var u;let r=t*this.stride;o[r+4]===e&&l.push(o[r+5]>1?(u=this.clusterProps,{type:"Feature",id:o[r+3],properties:lu(o,r,u),geometry:{type:"Point",coordinates:[s5(o[r]),s4(o[r+1])]}}):s2(this.points[o[r+3]]))}if(0===l.length)throw i;return l}getLeaves(e,t,r){let i=[];return this.appendLeaves(i,e,t=t||10,r=r||0,0),i}getTile(e,t,r){let i=this.trees[this.limitZoom(e)];if(!i)return null;let n=Math.pow(2,e),{extent:o,radius:a}=this.options,s=a/o,l=(r-s)/n,u=(r+1+s)/n,c={transformed:!0,features:[],source:null,x:t,y:r,z:e};return this.addTileFeatures(i.range((t-s)/n,l,(t+1+s)/n,u),i.flatData,t,r,n,c),0===t&&this.addTileFeatures(i.range(1-s/n,l,1,u),i.flatData,n,r,n,c),t===n-1&&this.addTileFeatures(i.range(0,l,s/n,u),i.flatData,-1,r,n,c),c}getClusterExpansionZoom(e){return this.getOriginZoom(e)}appendLeaves(e,t,r,i,n){for(let o of this.getChildren(t)){let t=o.properties;if(t?.cluster?n+t.point_count<=i?n+=t.point_count:n=this.appendLeaves(e,t.cluster_id,r,i,n):n<i?n++:e.push(o),e.length===r)break}return n}createTree(e){let t=new sU(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)t.add(e[r],e[r+1]);return t.finish(),t.flatData=e,t.data=null,t}addTileFeatures(e,t,r,i,n,o){for(let a of e){let e,s,l,u,c=a*this.stride,h=t[c+5]>1;if(h)e=lu(t,c,this.clusterProps),s=t[c],l=t[c+1];else{let r=this.points[t[c+3]];e=r.tags,[s,l]=r.geometry}let d={type:1,geometry:[[Math.round(this.options.extent*(s*n-r)),Math.round(this.options.extent*(l*n-i))]],tags:e};void 0!==(u=h||this.options.generateId?t[c+3]:this.points[t[c+3]].id)&&(d.id=u),o.features.push(d)}}limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}cluster(e,t){let{radius:r,extent:i,reduce:n,minPoints:o}=this.options,a=r/(i*Math.pow(2,t)),s=e.flatData,l=[],u=this.stride;for(let r=0;r<s.length;r+=u){if(s[r+2]<=t)continue;s[r+2]=t;let i=s[r],c=s[r+1],h=e.within(s[r],s[r+1],a),d=s[r+5],p=d;for(let e of h){let r=e*u;s[r+2]>t&&(p+=s[r+5])}if(p>d&&p>=o){let e,o=i*d,a=c*d,f=-1,m=(r/u<<5)+(t+1)+this.points.length;for(let i of h){let l=i*u;if(s[l+2]<=t)continue;s[l+2]=t;
170let c=s[l+5];o+=s[l]*c,a+=s[l+1]*c,s[l+4]=m,n&&(e||(e=this.map(s,r,!0),f=this.clusterProps.length,this.clusterProps.push(e)),n(e,this.map(s,l)))}s[r+4]=m,l.push(o/p,a/p,1/0,m,-1,p),n&&l.push(f)}else{for(let e=0;e<u;e++)l.push(s[r+e]);if(p>1)for(let e of h){let r=e*u;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e<u;e++)l.push(s[r+e])}}}}return l}getOriginId(e){return e-this.points.length>>5}getOriginZoom(e){return(e-this.points.length)%32}map(e,t,r){if(e[t+5]>1){let i=this.clusterProps[e[t+6]];return r?Object.assign({},i):i}let i=this.points[e[t+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}}function lu(e,t,r){let i=e[t+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?Math.round(i/100)/10+"k":i,o=e[t+6];return Object.assign(-1===o?{}:Object.assign({},r[o]),{cluster:!0,cluster_id:e[t+3],point_count:i,point_count_abbreviated:n})}let lc="geojsonvt_clip_start",lh="geojsonvt_clip_end";function ld(e,t,r,i,n){let o=t===n.maxZoom?0:n.tolerance/((1<<t)*n.extent),a={transformed:!1,features:[],source:null,x:r,y:i,z:t,minX:2,minY:1,maxX:-1,maxY:0,numPoints:0,numSimplified:0,numFeatures:e.length};for(let t of e)!function(e,t,r,i){switch(e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),t.type){case"Point":case"MultiPoint":return function(e,t){let r=[];for(let i=0;i<t.geometry.length;i+=3)r.push(t.geometry[i],t.geometry[i+1]),e.numPoints++,e.numSimplified++;if(!r.length)return;let i={type:1,tags:t.tags||null,geometry:r};null!==t.id&&(i.id=t.id),e.features.push(i)}(e,t);case"LineString":return function(e,t,r,i){let n=[];if(lp(n,t.geometry,e,r,!1,!1),!n.length)return;let o=t.tags||null;if(i.lineMetrics){for(let e in o={},t.tags)o[e]=t.tags[e];o[lc]=t.geometry.start/t.geometry.size,o[lh]=t.geometry.end/t.geometry.size}let a={type:2,tags:o,geometry:n};null!==t.id&&(a.id=t.id),e.features.push(a)}(e,t,r,i);case"MultiLineString":case"Polygon":return function(e,t,r){let i=[];for(let n=0;n<t.geometry.length;n++)lp(i,t.geometry[n],e,r,"Polygon"===t.type,0===n);if(!i.length)return;let n={type:"Polygon"===t.type?3:2,tags:t.tags||null,geometry:i};null!==t.id&&(n.id=t.id),e.features.push(n)}(e,t,r);case"MultiPolygon":return function(e,t,r){let i=[];for(let n=0;n<t.geometry.length;n++){let o=t.geometry[n];for(let t=0;t<o.length;t++)lp(i,o[t],e,r,!0,0===t)}if(!i.length)return;let n={type:3,tags:t.tags||null,geometry:i};null!==t.id&&(n.id=t.id),e.features.push(n)}(e,t,r)}}(a,t,o,n);return a}function lp(e,t,r,i,n,o){let a=i*i;if(i>0&&t.size<(n?a:i))return void(r.numPoints+=t.points.length/3);let s=[];for(let e=0;e<t.points.length;e+=3)(0===i||t.points[e+2]>a)&&(r.numSimplified++,s.push(t.points[e],t.points[e+1])),r.numPoints++;n&&function(e,t){let r=0;for(let t=0,i=e.length,n=i-2;t<i;n=t,t+=2)r+=(e[t]-e[n])*(e[t+1]+e[n+1]);if(r>0===t)for(let t=0,r=e.length;t<r/2;t+=2){let i=e[t],n=e[t+1];e[t]=e[r-2-t],e[t+1]=e[r-1-t],e[r-2-t]=i,e[r-1-t]=n}}(s,o),e.push(s)}function lf(e,t){if(e.transformed)return e;let r=1<<e.z,i=e.x,n=e.y;for(let o of e.features)1===o.type?function(e,t,r,i,n){let o=e.geometry,a=[];for(let e=0;e<o.length;e+=2)a.push(lm(o[e],o[e+1],t,r,i,n));e.geometry=a}(o,t,r,i,n):function(e,t,r,i,n){let o=e.geometry,a=[];for(let e of o){let o=[];for(let a=0;a<e.length;a+=2)o.push(lm(e[a],e[a+1],t,r,i,n));a.push(o)}e.geometry=a}(o,t,r,i,n);return e.transformed=!0,e}function lm(e,t,r,i,n,o){return[Math.round(r*(e*i-n)),Math.round(r*(t*i-o))]}class lg{constructor(e){this.options=e,this.total=0,this.stats={},this.tiles={},this.tileCoords=[],this.stats={},this.total=0}initialize(e){this.splitTile(e,0,0,0),this.options.debug&&(e.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)))}updateIndex(e,t,r){r.debug>1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(t),r.debug>1&&console.timeEnd("invalidating");let[i,n,o]=[0,0,0],a=ld(e,i,n,o,r);a.source=e;let s=ly(i,n,o);if(this.tiles[s]=a,this.tileCoords.push({z:i,x:n,y:o,id:s}),r.debug){let e=`z${i}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}}getClusterExpansionZoom(e){return null}getChildren(e){return null}getLeaves(e,t,r){return null}getTile(e,t,r){let{extent:i,debug:n}=this.options,o=1<<e,a=ly(e,t=t+o&o-1,r);if(this.tiles[a])return lf(this.tiles[a],i);n>1&&console.log("drilling down to z%d-%d-%d",e,t,r);let s,l=e,u=t,c=r;for(;!s&&l>0;)l--,u>>=1,c>>=1,s=this.tiles[ly(l,u,c)];return s?.source?(n>1&&(console.log("found parent tile z%d-%d-%d",l,u,c),console.time("drilling down")),this.splitTile(s.source,l,u,c,e,t,r),n>1&&console.timeEnd("drilling down"),this.tiles[a]?lf(this.tiles[a],i):null):null}splitTile(e,t,r,i,n,o,a){let s=[e,t,r,i],l=this.options,u=l.debug;for(;s.length;){i=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();let c=1<<t,h=ly(t,r,i),d=this.tiles[h];if(!d&&(u>1&&console.time("creation"),d=this.tiles[h]=ld(e,t,r,i,l),this.tileCoords.push({z:t,x:r,y:i,id:h}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,i,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(d.source=e,null==n){if(t===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue}else{if(t===l.maxZoom||t===n)continue;if(null!=n){let e=n-t;if(r!==o>>e||i!==a>>e)continue}}if(d.source=null,!e.length)continue;u>1&&console.time("clipping");let p=.5*l.buffer/l.extent,f=.5-p,m=.5+p,g=1+p,y=null,v=null,b=null,_=null,x=s6(e,c,r-p,r+m,R.X,d.minX,d.maxX,l),A=s6(e,c,r+f,r+g,R.X,d.minX,d.maxX,l);x&&(y=s6(x,c,i-p,i+m,R.Y,d.minY,d.maxY,l),v=s6(x,c,i+f,i+g,R.Y,d.minY,d.maxY,l)),A&&(b=s6(A,c,i-p,i+m,R.Y,d.minY,d.maxY,l),_=s6(A,c,i+f,i+g,R.Y,d.minY,d.maxY,l)),u>
1701&&console.timeEnd("clipping"),s.push(y||[],t+1,2*r,2*i),s.push(v||[],t+1,2*r,2*i+1),s.push(b||[],t+1,2*r+1,2*i),s.push(_||[],t+1,2*r+1,2*i+1)}}invalidateTiles(e){if(!e.length)return;let t=this.options,{debug:r}=t,i=1/0,n=-1/0,o=1/0,a=-1/0;for(let t of e)i=Math.min(i,t.minX),n=Math.max(n,t.maxX),o=Math.min(o,t.minY),a=Math.max(a,t.maxY);let s=t.buffer/t.extent,l=new Set;for(let t in this.tiles){let u=this.tiles[t],c=1<<u.z,h=(u.x-s)/c,d=(u.x+1+s)/c,p=(u.y-s)/c,f=(u.y+1+s)/c;if(n<h||i>=d||a<p||o>=f)continue;let m=!1;for(let t of e)if(t.maxX>=h&&t.minX<d&&t.maxY>=p&&t.minY<f){m=!0;break}if(m){if(r){r>1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",u.z,u.x,u.y,u.numFeatures,u.numPoints,u.numSimplified);let e=`z${u.z}`;this.stats[e]=(this.stats[e]||0)-1,this.total--}delete this.tiles[t],l.add(t)}}l.size&&(this.tileCoords=this.tileCoords.filter(e=>!l.has(e.id)))}}function ly(e,t,r){return 32*((1<<e)*r+t)+e}let lv={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,updateable:!1,cluster:!1,clusterOptions:ls,debug:0},{members:lb}=oe([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:l_}=oe([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),lx=Math.cos(Math.PI/180*37.5);class lA{constructor(e){for(let t of(this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers))this.gradients[t.id]={};this.layoutVertexArray=new oV,this.layoutVertexArray2=new oU,this.indexArray=new oY,this.programConfigurations=new av(e.layers,e.zoom),this.segments=new o0,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=a8("line",this.layers,t)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),o=[];for(let{feature:t,id:a,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,u=ax(t,e);if(!this.layers[0]._featureFilter.filter(new nz(this.zoom),u,r))continue;let c=n?i.evaluate(u,{},r):void 0,h={id:a,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?u.geometry:a_(t),patterns:{},dashes:{},sortKey:c};o.push(h)}for(let i of(n&&o.sort((e,t)=>
170e.sortKey-t.sortKey),o)){let{geometry:n,index:o,sourceLayerIndex:a}=i;this.hasDependencies?(a8("line",this.layers,t)?a7("line",this.layers,i,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,i,this.zoom,t),this.patternFeatures.push(i)):this.addFeature(i,n,o,r,{},{},t.subdivisionGranularity),t.featureIndex.insert(e[o].feature,n,o,a,this.index)}}update(e,t,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures(e,t,r,i){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,i,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,l_)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,lb),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,lc)&&Object.hasOwn(e.properties,lh))return{start:+e.properties[lc],end:+e.properties[lh]}}addFeature(e,t,r,i,n,o,a){let s=this.layers[0].layout,l=s.get("line-join").evaluate(e,{}),u=s.get("line-cap").evaluate(e,{}),c=s.get("line-miter-limit").evaluate(e,{}),h=s.get("line-round-limit").evaluate(e,{});for(let r of(this.lineClips=this.lineFeatureClips(e),t))this.addLine(r,e,l,u,c,h,i,a);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,dashPositions:o,canonical:i})}addLine(e,t,r,i,n,o,a,s){let l,u,c,h,d;if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e=sb(e,a?s.line.getGranularityForZoomLevel(a.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t<e.length-1;t++)this.totalDistance+=e[t].dist(e[t+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let p="Polygon"===sP.types[t.type],f=e.length;for(;f>=2&&e[f-1].equals(e[f-2]);)f--;let m=0;for(;m<f-1&&e[m].equals(e[m+1]);)m++;if(f<(p?3:2))return;"bevel"===r&&(n=1.05);let g=this.overscaling<=16?122880/(512*this.overscaling):0,y=this.segments.prepareSegment(10*f,this.layoutVertexArray,this.indexArray);this.e1=this.e2=-1,p&&(l=e[f-2],d=e[m].sub(l)._unit()._perp());for(let t=m;t<f;t++){if((c=t===f-1?p?e[m+1]:void 0:e[t+1])&&e[t].equals(c))continue;d&&(h=d),l&&(u=l),l=e[t],d=c?c.sub(l)._unit()._perp():h,h||(h=d);let a=h.add(d);0===a.x&&0===a.y||a._unit();let s=h.x*d.x+h.y*d.y,v=a.x*d.x+a.y*d.y,b=0!==v?1/v:1/0,_=2*Math.sqrt(2-2*v),x=v<lx&&u&&c,A=h.x*d.y-h.y*d.x>0;if(x&&t>m){let e=l.dist(u);if(e>2*g){let t=l.sub(l.sub(u)._mult(g/e)._round());this.updateDistance(u,t),this.addCurrentVertex(t,h,0,0,y),u=t}}let w=u&&c,S=w?r:p?"butt":i;if(w&&"round"===S&&(b<o?S="miter":b<=2&&(S="fakeround")),"miter"===S&&b>n&&(S="bevel"),"bevel"===S&&(b>2&&(S="flipbevel"),b<n&&(S="miter")),u&&this.updateDistance(u,l),"miter"===S)a._mult(b),this.addCurrentVertex(l,a,0,0,y);else if("flipbevel"===S){if(b>100)a=d.mult(-1);else{let e=b*h.add(d).mag()/h.sub(d).mag();a._perp()._mult(e*(A?-1:1))}this.addCurrentVertex(l,a,0,0,y),this.addCurrentVertex(l,a.mult(-1),0,0,y)}else if("bevel"===S||"fakeround"===S){let e=-Math.sqrt(b*b-1),t=A?e:0,r=A?0:e;if(u&&this.addCurrentVertex(l,h,t,r,y),"fakeround"===S){let e=Math.round(180*_/Math.PI/20);for(let t=1;t<e;t++){let r=t/e;if(.5!==r){let e=r-.5;r+=r*e*(r-1)*((1.0904+s*(s*(3.55645-1.43519*s)-3.2452))*e*e+(.848013+s*(.215638*s-1.06021)))}let i=d.sub(h)._mult(r)._add(h)._unit()._mult(A?-1:1);this.addHalfVertex(l,i.x,i.y,!1,A,0,y)}}c&&this.addCurrentVertex(l,d,-t,-r,y)}else if("butt"===S)this.addCurrentVertex(l,a,0,0,y);else if("square"===S){let e=u?1:-1;this.addCurrentVertex(l,a,e,e,y)}else"round"===S&&(u&&(this.addCurrentVertex(l,h,0,0,y),this.addCurrentVertex(l,h,1,1,y,!0)),c&&(this.addCurrentVertex(l,d,-1,-1,y,!0),this.addCurrentVertex(l,d,0,0,y)));if(x&&t<f-1){let e=l.dist(c);if(e>2*g){let t=l.add(c.sub(l)._mult(g/e)._round());this.updateDistance(l,t),this.addCurrentVertex(t,d,0,0,y),l=t}}}}addCurrentVertex(e,t,r,i,n,o=!1){let a=t.y*i-t.x,s=-t.y-t.x*i;
170this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,o,!1,r,n),this.addHalfVertex(e,a,s,o,!0,-i,n),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,i,n,o))}addHalfVertex({x:e,y:t},r,i,n,o,a,s){let l=.5*(this.lineClips?32767*this.scaledDistance:this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+ +!!n,(t<<1)+ +!!o,Math.round(63*r)+128,Math.round(63*i)+128,1+(0===a?0:a<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let u=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),s.primitiveLength++),o?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let e=t.paint.get("line-dasharray");if(e&&!e.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,i){for(let n of e){let e=n.paint.get("line-dasharray");if(!e||"constant"===e.value.kind)continue;let o="round"===n.layout.get("line-cap").evaluate(t,{}),a={dasharray:e.value.evaluate({zoom:r-1},t,{}),round:o},s={dasharray:e.value.evaluate({zoom:r},t,{}),round:o},l={dasharray:e.value.evaluate({zoom:r+1},t,{}),round:o},u=`${a.dasharray.join(",")},${a.round}`,c=`${s.dasharray.join(",")},${s.round}`,h=`${l.dasharray.join(",")},${l.round}`;i.dashDependencies[u]=a,i.dashDependencies[c]=s,i.dashDependencies[h]=l,t.dashes[n.id]={min:u,mid:c,max:h}}}}nw("LineBucket",lA,{omit:["layers","patternFeatures"]});var lw={get paint(){return m=m||new n1({"line-opacity":new nY(eJ.paint_line["line-opacity"]),"line-color":new nY(eJ.paint_line["line-color"]),"line-translate":new nX(eJ.paint_line["line-translate"]),"line-translate-anchor":new nX(eJ.paint_line["line-translate-anchor"]),"line-width":new nY(eJ.paint_line["line-width"]),"line-gap-width":new nY(eJ.paint_line["line-gap-width"]),"line-offset":new nY(eJ.paint_line["line-offset"]),"line-blur":new nY(eJ.paint_line["line-blur"]),"line-dasharray":new nQ(eJ.paint_line["line-dasharray"]),"line-pattern":new nQ(eJ.paint_line["line-pattern"]),"line-gradient":new n0(eJ.paint_line["line-gradient"])})},get layout(){return f=f||new n1({"line-cap":new nY(eJ.layout_line["line-cap"]),"line-join":new nY(eJ.layout_line["line-join"]),"line-miter-limit":new nY(eJ.layout_line["line-miter-limit"]),"line-round-limit":new nY(eJ.layout_line["line-round-limit"]),"line-sort-key":new nY(eJ.layout_line["line-sort-key"])})}};class lS extends nY{possiblyEvaluate(e,t){return t=new nz(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,i){return t=eb({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,i)}}class lT extends n5{constructor(e,t){super(e,lw,t),this.gradientVersion=0,g||((g=new lS(lw.paint.properties["line-width"].specification)).useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=void 0!==e._styleExpression&&e._styleExpression.expression instanceof ru,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=g.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new lA(e)}queryRadius(e){var t,r;return t=ak("line-width",this,e),((r=ak("line-gap-width",this,e))>0?r+2*t:t)/2+Math.abs(ak("line-offset",this,e))+aO(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:o}){var a,s;let l=aD(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,o),u=o/2*(a=this.paint.get("line-width").evaluate(t,r),(s=this.paint.get("line-gap-width").evaluate(t,r))>0?s+2*a:a),c=this.paint.get("line-offset").evaluate(t,r);return c&&(i=function(e,t){let r=[];for(let i of e){let e=function(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],n=t.at(-1);
170(0===r||n&&!i.equals(n))&&t.push(i)}return t}(i),n=[];for(let r=0;r<e.length;r++){let i=e[r],o=e[r-1],a=e[r+1],s=0===r?new x(0,0):i.sub(o)._unit()._perp(),l=r===e.length-1?new x(0,0):a.sub(i)._unit()._perp(),u=s._add(l)._unit(),c=u.x*l.x+u.y*l.y;0!==c&&u._mult(1/c),n.push(u._mult(t)._add(i))}r.push(n)}return r}(i,c*o)),function(e,t,r){for(let i of t){if(e.length>=3){for(let t of i)if(aM(e,t))return!0}if(function(e,t,r){if(e.length>1){if(aC(e,t))return!0;for(let i of t)if(aE(i,e,r))return!0}for(let i of e)if(aE(i,t,r))return!0;return!1}(e,i,r))return!0}return!1}(l,i,u)}isTileClipped(){return!0}}let lC=oe([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),lE=oe([{name:"a_projected_pos",components:3,type:"Float32"}],4);oe([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let lP=oe([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);oe([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let lI=oe([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),lM=oe([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);oe([{name:"triangle",components:3,type:"Uint16"}]),oe([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),oe([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),oe([{type:"Float32",name:"offsetX"}]),oe([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),oe([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let lk={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","⋯":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},lO={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},lD={40:!0};function lR(e,t,r,i,n,o){if("fontStack"in t){let i=r[t.fontStack],o=null==i?void 0:i[e];return o?o.metrics.advance*t.scale+n:0}{let e=i[t.imageName];return e?e.displaySize[0]*t.scale*24/o+n:0}}function lL(e,t,r,i){let n=Math.pow(e-t,2);return i?e<t?n/2:2*n:n+Math.abs(r)*r}function lB(e,t,r,i,n,o){let a=null,s=lL(t,r,n,o);for(let e of i){let i=lL(t-e.x,r,n,o)+e.badness;i<=s&&(a=e,s=i)}return{index:e,x:t,priorBreak:a,badness:s}}class lF{constructor(e="",t=[],r=[]){this.text=e,this.sections=t,this.sectionIndex=r,this.imageSectionID=null}static fromFeature(e,t){let r=new lF;for(let i of e.sections)i.image?r.addImageSection(i):r.addTextSection(i,t);return r}length(){return[...this.text].length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}verticalizePunctuation(){this.text=function(e){let t="",r={premature:!0,value:void 0},i=e[Symbol.iterator](),n=i.next(),o=e[Symbol.iterator]();o.next();let a=o.next();for(;!n.done;)t+=!a.done&&nL(a.value.codePointAt(0))&&!lk[a.value]||!r.premature&&nL(r.value.codePointAt(0))&&!lk[r.value]||!lk[n.value]?n.value:lk[n.value],r={value:n.value,premature:!1},n=i.next(),a=o.next();return t}(this.text)}hasZeroWidthSpaces(){return this.text.includes("​")}trim(){let e=this.text.match(/^\s*/),t=e?e[0].length:0,r=this.text.match(/\S\s*$/),i=r?r[0].length-1:0;this.text=this.text.substring(t,this.text.length-i),this.sectionIndex=this.sectionIndex.slice(t,this.sectionIndex.length-i)}substring(e,t){let r=[...this.text].slice(e,t).join(""),i=this.sectionIndex.slice(e,t);return new lF(r,this.sections,i)}toCodeUnitIndex(e){return[...this.text].slice(0,e).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>
170Math.max(e,this.sections[t].scale),0)}getMaxImageSize(e){let t=0,r=0;for(let i=0;i<this.length();i++){let n=this.getSection(i);if("imageName"in n){let i=e[n.imageName];if(!i)continue;let o=i.displaySize;t=Math.max(t,o[0]),r=Math.max(r,o[1])}}return{maxImageWidth:t,maxImageHeight:r}}addTextSection(e,t){this.text+=e.text,this.sections.push({scale:e.scale||1,verticalAlign:e.verticalAlign||"bottom",fontStack:e.fontStack||t});let r=this.sections.length-1;this.sectionIndex.push(...[...e.text].map(()=>r))}addImageSection(e){let t=e.image?e.image.name:"";if(0===t.length)return void eT("Can't add FormattedSection with an empty image.");let r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push({scale:1,verticalAlign:e.verticalAlign||"bottom",imageName:t}),this.sectionIndex.push(this.sections.length-1)):eT("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,t,r,i,n){let o=[],a=this.determineAverageLineWidth(e,t,r,i,n),s=this.hasZeroWidthSpaces(),l=0,u=0,c=this.text[Symbol.iterator](),h=c.next(),d=this.text[Symbol.iterator]();d.next();let p=d.next(),f=this.text[Symbol.iterator]();f.next(),f.next();let m=f.next();for(;!h.done;){let t=this.getSection(u),g=h.value.codePointAt(0);if(nk(g)||(l+=lR(g,t,r,i,e,n)),!p.done){let e=/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(g)),r=p.value.codePointAt(0);(lO[g]||e||"imageName"in t||!m.done&&lD[r])&&o.push(lB(u+1,l,a,o,function(e,t,r){let i=0;return 10===e&&(i-=1e4),r&&(i+=150),40!==e&&65288!==e||(i+=50),41!==t&&65289!==t||(i+=50),i}(g,r,e&&s),!1))}u++,h=c.next(),p=d.next(),m=f.next()}return function e(t){return t?e(t.priorBreak).concat(t.index):[]}(lB(this.length(),l,a,o,0,!0))}determineAverageLineWidth(e,t,r,i,n){let o=0,a=0;for(let t of this.text){let s=this.getSection(a);o+=lR(t.codePointAt(0),s,r,i,e,n),a++}return o/Math.max(1,Math.ceil(o/t))}}let lj=1/0x100000000,lz="u"<typeof TextDecoder?null:new TextDecoder("utf-8");class lN{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(e,t,r=this.length){for(;this.pos<r;){let r=this.readVarint(),i=r>>3,n=this.pos;this.type=7&r,e(i,t,this),this.pos===n&&this.skip(r)}return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+0x100000000*this.dataView.getUint32(this.pos+4,!0);return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+0x100000000*this.dataView.getInt32(this.pos+4,!0);return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let t,r,i=this.buf;return t=127&(r=i[this.pos++]),r<128?t:(t|=(127&(r=i[this.pos++]))<<7,r<128?t:(t|=(127&(r=i[this.pos++]))<<14,r<128?t:(t|=(127&(r=i[this.pos++]))<<21,r<128?t:function(e,t,r){let i,n,o=r.buf;if(i=(112&(n=o[r.pos++]))>>4,n<128||(i|=(127&(n=o[r.pos++]))<<3,n<128)||(i|=(127&(n=o[r.pos++]))<<10,n<128)||(i|=(127&(n=o[r.pos++]))<<17,n<128)||(i|=(127&(n=o[r.pos++]))<<24,n<128)||(i|=(1&(n=o[r.pos++]))<<31,n<128)){var a,s;return a=e,s=i,t?0x100000000*s+(a>>>0):0x100000000*(s>>>0)+(a>>>0)}throw Error("Expected varint not more than 10 bytes")}(t|=(15&(r=i[this.pos]))<<28,e,this))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let e=this.readVarint();return e%2==1?-((e+1)/2):e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&lz?lz.decode(this.buf.subarray(t,e)):function(e,t,r){let i="",n=t;
170for(;n<r;){let t=e[n],o,a,s,l=null,u=t>239?4:t>223?3:t>191?2:1;if(n+u>r)break;1===u?t<128&&(l=t):2===u?128==(192&(o=e[n+1]))&&(l=(31&t)<<6|63&o)<=127&&(l=null):3===u?(o=e[n+1],a=e[n+2],128==(192&o)&&128==(192&a)&&((l=(15&t)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===u&&(o=e[n+1],a=e[n+2],s=e[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&t)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,u=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=u}return i}(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let r=this.readPackedEnd();for(;this.pos<r;)e.push(this.readVarint(t));return e}readPackedSVarint(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFloat());return e}readPackedDouble(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed64());return e}readPackedEnd(){return 2===this.type?this.readVarint()+this.pos:this.pos+1}skip(e){let t=7&e;if(0===t)for(;this.buf[this.pos++]>127;);else if(2===t)this.pos=this.readVarint()+this.pos;else if(5===t)this.pos+=4;else{if(1!==t)throw Error(`Unimplemented type: ${t}`);this.pos+=8}}writeTag(e,t){this.writeVarint(e<<3|t)}realloc(e){let t=this.length||16;for(;t<this.pos+e;)t*=2;if(t!==this.length){let e=new Uint8Array(t);e.set(this.buf),this.buf=e,this.dataView=new DataView(e.buffer),this.length=t}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeSFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,-1&e,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*lj),!0),this.pos+=8}writeSFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,-1&e,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*lj),!0),this.pos+=8}writeVarint(e){(e=+e||0)>0xfffffff||e<0?function(e,t){var r,i;let n,o,a;if(e>=0?(n=e%0x100000000|0,o=e/0x100000000|0):(n=~(-e%0x100000000),o=~(-e/0x100000000),0xffffffff^n?n=n+1|0:(n=0,o=o+1|0)),e>=0xffffffffffffffff||e<-0xffffffffffffffff)throw Error("Given varint doesn't fit into 10 bytes");t.realloc(10),r=n,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,t.buf[t.pos]=127&(r>>>=7),a=(7&(i=o))<<4,t.buf[t.pos++]|=a|128*!!(i>>>=3),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i)))))}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=e>>>7&127))))}writeSVarint(e){this.writeVarint(e<0?-(2*e)-1:2*e)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(4*e.length),this.pos++;let t=this.pos;this.pos=function(e,t,r){for(let i,n,o=0;o<t.length;o++){if((i=t.charCodeAt(o))>
17055295&&i<57344){if(!n){i>56319||o+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):n=i;continue}if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(e[r++]=239,e[r++]=191,e[r++]=189,n=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=63&i|128)}return r}(this.buf,e,this.pos);let r=this.pos-t;r>=128&&lG(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){let t=e.length;this.writeVarint(t),this.realloc(t);for(let r=0;r<t;r++)this.buf[this.pos++]=e[r]}writeRawMessage(e,t){this.pos++;let r=this.pos;e(t,this);let i=this.pos-r;i>=128&&lG(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(e,t,r){this.writeTag(e,2),this.writeRawMessage(t,r)}writePackedVarint(e,t){t.length&&this.writeMessage(e,lV,t)}writePackedSVarint(e,t){t.length&&this.writeMessage(e,lU,t)}writePackedBoolean(e,t){t.length&&this.writeMessage(e,lq,t)}writePackedFloat(e,t){t.length&&this.writeMessage(e,lH,t)}writePackedDouble(e,t){t.length&&this.writeMessage(e,lW,t)}writePackedFixed32(e,t){t.length&&this.writeMessage(e,lZ,t)}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,l$,t)}writePackedFixed64(e,t){t.length&&this.writeMessage(e,lK,t)}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,lX,t)}writeBytesField(e,t){this.writeTag(e,2),this.writeBytes(t)}writeFixed32Field(e,t){this.writeTag(e,5),this.writeFixed32(t)}writeSFixed32Field(e,t){this.writeTag(e,5),this.writeSFixed32(t)}writeFixed64Field(e,t){this.writeTag(e,1),this.writeFixed64(t)}writeSFixed64Field(e,t){this.writeTag(e,1),this.writeSFixed64(t)}writeVarintField(e,t){this.writeTag(e,0),this.writeVarint(t)}writeSVarintField(e,t){this.writeTag(e,0),this.writeSVarint(t)}writeStringField(e,t){this.writeTag(e,2),this.writeString(t)}writeFloatField(e,t){this.writeTag(e,5),this.writeFloat(t)}writeDoubleField(e,t){this.writeTag(e,1),this.writeDouble(t)}writeBooleanField(e,t){this.writeVarintField(e,+t)}}function lG(e,t,r){let i=t<=16383?1:t<=2097151?2:t<=0xfffffff?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(i);for(let t=r.pos-1;t>=e;t--)r.buf[t+i]=r.buf[t]}function lV(e,t){for(let r=0;r<e.length;r++)t.writeVarint(e[r])}function lU(e,t){for(let r=0;r<e.length;r++)t.writeSVarint(e[r])}function lH(e,t){for(let r=0;r<e.length;r++)t.writeFloat(e[r])}function lW(e,t){for(let r=0;r<e.length;r++)t.writeDouble(e[r])}function lq(e,t){for(let r=0;r<e.length;r++)t.writeBoolean(e[r])}function lZ(e,t){for(let r=0;r<e.length;r++)t.writeFixed32(e[r])}function l$(e,t){for(let r=0;r<e.length;r++)t.writeSFixed32(e[r])}function lK(e,t){for(let r=0;r<e.length;r++)t.writeFixed64(e[r])}function lX(e,t){for(let r=0;r<e.length;r++)t.writeSFixed64(e[r])}function lY(e,t,r){1===e&&r.readMessage(lQ,t)}function lQ(e,t,r){if(3===e){let{id:e,bitmap:i,width:n,height:o,left:a,top:s,advance:l}=r.readMessage(lJ,{});t.push({id:e,bitmap:new aZ({width:n+6,height:o+6},i),metrics:{width:n,height:o,left:a,top:s,advance:l}})}}function lJ(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function l0(e){let t=0,r=0;for(let i of e)t+=i.w*i.h,r=Math.max(r,i.w);e.sort((e,t)=>t.h-e.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],n=0,o=0;for(let t of e)for(let e=i.length-1;e>=0;e--){let r=i[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,o=Math.max(o,t.y+t.h),n=Math.max(n,t.x+t.w),t.w===r.w&&t.h===r.h){let t=i.pop();t&&e<i.length&&(i[e]=t)}else t.h===r.h?(r.x+=t.w,r.w-=t.w):(t.w===r.w||i.push({x:r.x+t.w,y:r.y,w:r.w-t.w,h:t.h}),r.y+=t.h,r.h-=t.h);break}}return{w:n,h:o,fill:t/(n*o)||0}}class l1{constructor(e,{pixelRatio:t,version:r,stretchX:i,stretchY:n,content:o,textFitWidth:a,textFitHeight:s}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=i,this.stretchY=n,this.content=o,this.version=r,this.textFitWidth=a,this.textFitHeight=s}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class l2{constructor(e,t){let r={},i={};this.haveRenderCallbacks=[];let n=[];this.addImages(e,r,n),this.addImages(t,i,n);let{w:o,h:a}=l0(n),s=new a$({width:o||1,height:a||1});for(let t in e){let i=e[t],n=r[t].paddedRect;a$.copy(i.data,s,{x:0,y:0},{x:n.x+1,y:n.y+1},i.data)}for(let e in t){let r=t[e],n=i[e].paddedRect,o=n.x+1,a=n.y+1,l=r.data.width,u=r.data.height;a$.copy(r.data,s,{x:0,y:0},{x:o,y:a},r.data),a$.copy(r.data,s,{x:0,y:u-1},{x:o,y:a-1},{width:l,height:1}),a$.copy(r.data,s,{x:0,y:0},{x:o,y:a+u},{width:l,height:1}),a$.copy(r.data,s,{x:l-1,y:0},{x:o-1,y:a},{width:1,height:u}),a$.copy(r.data,s,{x:0,y:0},{x:o+l,y:a},{width:1,height:u})}this.image=s,this.iconPositions=r,this.patternPositions=i}addImages(e,t,r){for(let i in e){let n=e[i],o={x:0,y:0,w:n.data.width+2,h:n.data.height+2};r.push(o),t[i]=new l1(o,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(i)}}patchUpdatedImages(e,t){for(let r in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t),this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)}patchUpdatedImage(e,t,r){if(!e||!t||e.version===t.version)return;e.version=t.version;let[i,n]=e.tl;r.update(t.data,void 0,{x:i,y:n})}}function l3(t,r,i,n,o,a,s,l,u,c,h,d,p,f,m){let g,y=lF.fromFeature(t,o);d===e.ax.vertical&&y.verticalizePunctuation();let v=y.determineLineBreaks(c,a,r,n,f),{processBidirectionalText:b,processStyledBidirectionalText:_}=nj;if(b&&1===y.sections.length)for(let e of(g=[],v=v.map(e=>y.toCodeUnitIndex(e)),b(y.toString(),v))){let t=[...e].map(()=>0);g.push(new lF(e,y.sections,t))}else if(_){g=[],v=v.map(e=>y.toCodeUnitIndex(e));let e=0,t=[];for(let r of y.text)t.push(...Array(r.length).fill(y.sectionIndex[e])),e++;for(let e of _(y.text,t,v)){let t=[],r="";for(let i of e[0])t.push(e[1][r.length]),r+=i;g.push(new lF(e[0],y.sections,t))}}else g=function(e,t){let r=[],i=0;for(let n of t)r.push(e.substring(i,n)),i=n;return i<e.length()&&r.push(e.substring(i,e.length())),r}(y,v);let x=[],A={positionedLines:x,text:y.toString(),top:h[1],bottom:h[1],left:h[0],right:h[0],writingMode:d,iconsInText:!1,verticalizable:!1};return function(t,r,i,n,o,a,s,l,u,c,h,d){let p=0,f=0,m=0,g=0,y="right"===l?1:.5*("left"!==l),v=24/d,b=0;for(let s of o){s.trim();let o=s.getMaxScale(),l={positionedGlyphs:[],lineOffset:0};t.positionedLines[b]=l;let d=l.positionedGlyphs,_=0;if(!s.length()){f+=a,++b;continue}let x=function(e,t,r){let i=24*t.getMaxScale(),{maxImageWidth:n,maxImageHeight:o}=t.getMaxImageSize(e),a=Math.max(i,o*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:a}}(n,s,v),A=0;for(let a of s.text){let l,m=s.getSection(A),g=a.codePointAt(0),y=!(u===e.ax.horizontal||!h&&
170!nM(g)||h&&(nk(g)||/\p{sc=Arab}/u.test(String.fromCodePoint(g)))),b={glyph:g,imageName:null,x:p,y:f+-17,vertical:y,scale:1,fontStack:"",sectionIndex:s.getSectionIndex(A),metrics:null,rect:null};if("fontStack"in m){if(!(l=function(e,t,r,i,n,o){let a,s=o[e.fontStack],l=function(e,t,r,i){if(null==e?void 0:e.rect)return e;let n=t[r.fontStack],o=null==n?void 0:n[i];return o?{rect:null,metrics:o.metrics}:null}(null==s?void 0:s[t],n,e,t);if(null===l)return null;if(r)a=i.verticalLineContentWidth-24*e.scale;else{let t=l4(e.verticalAlign);a=(i.horizontalLineContentHeight-24*e.scale)*t}return{rect:l.rect,metrics:l.metrics,baselineOffset:a}}(m,g,y,x,r,i)))continue;b.fontStack=m.fontStack}else{if(t.iconsInText=!0,m.scale*=v,!(l=function(e,t,r,i,n){let o,a=n[e.imageName];if(!a)return null;let s=a.paddedRect,l=a.displaySize,u={width:l[0],height:l[1],left:1,top:-3,advance:t?l[1]:l[0]};if(t)o=i.verticalLineContentWidth-l[1]*e.scale;else{let t=l4(e.verticalAlign);o=(i.horizontalLineContentHeight-l[1]*e.scale)*t}return{rect:s,metrics:u,baselineOffset:o,imageOffset:(t?l[0]:l[1])*e.scale-24*r}}(m,y,o,x,n)))continue;_=Math.max(_,l.imageOffset),b.imageName=m.imageName}let{rect:w,metrics:S,baselineOffset:T}=l;b.y+=T,b.scale=m.scale,b.metrics=S,b.rect=w,d.push(b),y?(t.verticalizable=!0,p+=("imageName"in m?S.advance:24)*m.scale+c):p+=S.advance*m.scale+c,A++}0!==d.length&&(m=Math.max(p-c,m),function(e,t,r){if(0===r)return;let i=e[t],n=(e[t].x+i.metrics.advance*i.scale)*r;for(let r=0;r<=t;r++)e[r].x-=n}(d,d.length-1,y)),p=0,l.lineOffset=Math.max(_,(o-1)*24);let w=a*o+_;f+=w,g=Math.max(w,g),++b}let{horizontalAlign:_,verticalAlign:x}=l5(s);(function(e,t,r,i,n,o,a,s,l){let u=(t-r)*n,c=0;for(let t of(c=o!==a?-s*i- -17:-i*l*a+.5*a,e))for(let e of t.positionedGlyphs)e.x+=u,e.y+=c})(t.positionedLines,y,_,x,m,g,a,f,o.length),t.top+=-x*f,t.bottom=t.top+f,t.left+=-_*m,t.right=t.left+m}(A,r,i,n,g,s,l,u,d,c,p,m),!function(e){for(let t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(x)&&A}function l5(e){let t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function l4(e){switch(e){case"top":return 0;case"center":return .5;default:return 1}}function l6(e){var t,r;let i=e.left,n=e.top,o=e.right-i,a=e.bottom-n,s=null!=(t=e.image.textFitWidth)?t:"stretchOrShrink",l=null!=(r=e.image.textFitHeight)?r:"stretchOrShrink",u=(e.image.content[2]-e.image.content[0])/(e.image.content[3]-e.image.content[1]);if("proportional"===l){if("stretchOnly"===s&&o/a<u||"proportional"===s){let e=Math.ceil(a*u);i*=e/o,o=e}}else if("proportional"===s&&"stretchOnly"===l&&0!==u&&o/a>u){let e=Math.ceil(o/u);n*=e/a,a=e}return{x1:i,y1:n,x2:i+o,y2:n+a}}function l8(e,t,r,i,n,o){let a,s,l,u,c,h=e.image;if(h.content){let e=h.content,t=h.pixelRatio||1;a=[e[0]/t,e[1]/t,h.displaySize[0]-e[2]/t,h.displaySize[1]-e[3]/t]}let d=t.left*o,p=t.right*o;"width"===r||"both"===r?(c=n[0]+d-i[3],l=n[0]+p+i[1]):l=(c=n[0]+(d+p-h.displaySize[0])/2)+h.displaySize[0];let f=t.top*o,m=t.bottom*o;return"height"===r||"both"===r?(s=n[1]+f-i[0],u=n[1]+m+i[2]):u=(s=n[1]+(f+m-h.displaySize[1])/2)+h.displaySize[1],{image:h,top:s,right:l,bottom:u,left:c,collisionPadding:a}}function l7(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new nz(e+1))};if("source"===r.kind)return{kind:"source"};{let{zoomStops:t,interpolationType:i}=r,n=0;for(;n<t.length&&t[n]<=e;)n++;let o=n=Math.max(0,n-1);for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);let a=t[n],s=t[o];return"composite"===r.kind?{kind:"composite",minZoom:a,maxZoom:s,interpolationType:i}:{kind:"camera",minZoom:a,maxZoom:s,minSize:r.evaluate(new nz(a)),maxSize:r.evaluate(new nz(s)),interpolationType:i}}}function l9(e,t,r){let i="never",n=e.get(t);return n?i=n:e.get(r)&&(i="always"),i}nw("ImagePosition",l1),nw("ImageAtlas",l2),e.ax=void 0,(L=e.ax||(e.ax={}))[L.none=0]="none",L[L.horizontal=1]="horizontal",L[L.vertical=2]="vertical",L[L.horizontalOnly=3]="horizontalOnly";let ue=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function ut(e,t,r,i,n,o,a,s,l,u,c,h,d){let p=s?Math.min(32640,Math.round(s[0])):0,f=s?Math.min(32640,Math.round(s[1])):0;e.emplaceBack(t,r,Math.round(32*i),Math.round(32*n),o,a,(p<<1)+ +!!l,f,16*u,16*c,256*h,256*d)}function ur(e,t,r){e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r)}class ui{constructor(e){this.layoutVertexArray=new oq,this.indexArray=new oY,this.programConfigurations=e,this.segments=new o0,this.dynamicLayoutVertexArray=new oZ,this.opacityVertexArray=new o$,this.hasVisibleVertices=!1,this.placedSymbolArray=new oI}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(e,t,r,i){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,lC.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,lE.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,ue,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}nw("SymbolBuffers",ui);class un{constructor(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new o0,this.collisionVertexArray=new oX}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,lP.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}
170nw("CollisionBuffers",un);class uo{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=l7(this.zoom,r["text-size"]),this.iconSizeData=l7(this.zoom,r["icon-size"]);let i=this.layers[0].layout,n=i.get("symbol-sort-key"),o=i.get("symbol-z-order");this.canOverlap="never"!==l9(i,"text-overlap","text-allow-overlap")||"never"!==l9(i,"icon-overlap","icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==o&&!n.isConstant(),this.sortFeaturesByY=("viewport-y"===o||"auto"===o&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map(t=>e.ax[t])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=t.sourceID}createArrays(){this.text=new ui(new av(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new ui(new av(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new oO,this.lineVertexArray=new oD,this.symbolInstances=new ok,this.textAnchorOffsets=new oL}calculateGlyphDependencies(e,t,r,i,n){for(let o of e)if(t[o.codePointAt(0)]=!0,(r||i)&&n){let e=lk[o];e&&(t[e.codePointAt(0)]=!0)}}populate(t,r,i){var n;let o=this.layers[0],a=o.layout,s=a.get("text-font"),l=a.get("text-field"),u=a.get("icon-image"),c=("constant"!==l.value.kind||l.value.value instanceof tK&&!l.value.value.isEmpty()||l.value.value.toString().length>0)&&("constant"!==s.value.kind||s.value.value.length>0),h="constant"!==u.value.kind||!!u.value.value||Object.keys(u.parameters).length>0,d=a.get("symbol-sort-key");if(this.features=[],!c&&!h)return;let p=r.iconDependencies,f=r.glyphDependencies,m=r.availableImages,g=new nz(this.zoom);for(let{feature:r,id:l,index:u,sourceLayerIndex:y}of t){let t,v,b=o._featureFilter.needGeometry,_=ax(r,b);if(!o._featureFilter.filter(g,_,i))continue;if(b||(_.geometry=a_(r)),c){let e=o.getValueAndResolveTokens("text-field",_,i,m),r=tK.factory(e);this.hasRTLText||(this.hasRTLText=function(e){for(let t of e.sections)if(function(e){for(let t of e)if(nF(t.codePointAt(0)))return!0;return!1}(t.text))return!0;return!1}(r)),(!this.hasRTLText||"unavailable"===nj.getRTLTextPluginStatus()||this.hasRTLText&&nj.isParsed())&&(t=function(e,t,r){for(let i of e.sections)i.text=function(e,t,r){let i=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?e=e.toLocaleUpperCase():"lowercase"===i&&(e=e.toLocaleLowerCase()),nj.applyArabicShaping&&(e=nj.applyArabicShaping(e)),e}(i.text,t,r);return e}(r,o,_))}if(h){let e=o.getValueAndResolveTokens("icon-image",_,i,m);v=e instanceof t2?e:t2.fromString(e)}if(!t&&!v)continue;let x=this.sortFeaturesByKey?d.evaluate(_,{},i):void 0;if(this.features.push({id:l,text:t,icon:v,index:u,sourceLayerIndex:y,geometry:_.geometry,properties:r.properties,type:sP.types[r.type],sortKey:x}),v&&(p[v.name]=!0),t){let r=s.evaluate(_,{},i).join(","),o="viewport"!==a.get("text-rotation-alignment")&&"point"!==a.get("symbol-placement");for(let i of(this.allowVerticalPlacement=null==(n=this.writingModes)?void 0:n.includes(e.ax.vertical),t.sections))if(i.image)p[i.image.name]=!0;else{let e=nO(t.toString()),n=i.fontStack||r;f[n]||(f[n]={}),this.calculateGlyphDependencies(i.text,f[n],o,this.allowVerticalPlacement,e)}}}"line"===a.get("symbol-placement")&&(this.features=function(e){let t={},r={},i=[],n=0;function o(t){i.push(e[t]),n++}function a(e,t,n){let o=r[e];return delete r[e],r[t]=o,i[o].geometry[0].pop(),i[o].geometry[0]=i[o].geometry[0].concat(n[0]),o}function s(e,r,n){let o=t[r];return delete t[r],t[e]=o,i[o].geometry[0].shift(),i[o].geometry[0]=n[0].concat(i[o].geometry[0]),o}function l(e,t,r){let i=r?t[0][t[0].length-1]:t[0][0];return`${e}:${i.x}:${i.y}`}for(let u=0;u<e.length;u++){let c=e[u],h=c.geometry,d=c.text?c.text.toString():null;if(!d){o(u);continue}let p=l(d,h),f=l(d,h,!0);if(p in r&&f in t&&r[p]!==t[f]){let e=s(p,f,h),n=a(p,f,i[e].geometry);delete t[p],delete r[f],r[l(d,i[n].geometry,!0)]=n,i[e].geometry=null}else p in r?a(p,f,h):f in t?s(p,f,h):(o(u),t[p]=n-1,r[f]=n-1)}return i.filter(e=>e.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>
vendor: 5,897 bytes, line 170
170e.sortKey-t.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),i=e.dist(t[e.segment]),n={};for(let i=e.segment+1;i<t.length;i++)n[i]={x:t[i].x,y:t[i].y,tileUnitDistanceFromAnchor:r},i<t.length-1&&(r+=t[i+1].dist(t[i]));for(let r=e.segment||0;r>=0;r--)n[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:i},r>0&&(i+=t[r-1].dist(t[r]));for(let e=0;e<t.length;e++){let t=n[e];this.lineVertexArray.emplaceBack(t.x,t.y,t.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}}addSymbols(t,r,i,n,o,a,s,l,u,c,h,d){let p=t.indexArray,f=t.layoutVertexArray,m=t.segments.prepareSegment(4*r.length,f,p,this.canOverlap?a.sortKey:void 0),g=this.glyphOffsetArray.length,y=m.vertexLength,v=this.allowVerticalPlacement&&s===e.ax.vertical?Math.PI/2:0,b=a.text&&a.text.sections;for(let e=0;e<r.length;e++){let{tl:n,tr:o,bl:s,br:u,tex:c,pixelOffsetTL:h,pixelOffsetBR:g,minFontScaleX:y,minFontScaleY:_,glyphOffset:x,isSDF:A,sectionIndex:w}=r[e],S=m.vertexLength,T=x[1];ut(f,l.x,l.y,n.x,T+n.y,c.x,c.y,i,A,h.x,h.y,y,_),ut(f,l.x,l.y,o.x,T+o.y,c.x+c.w,c.y,i,A,g.x,h.y,y,_),ut(f,l.x,l.y,s.x,T+s.y,c.x,c.y+c.h,i,A,h.x,g.y,y,_),ut(f,l.x,l.y,u.x,T+u.y,c.x+c.w,c.y+c.h,i,A,g.x,g.y,y,_),ur(t.dynamicLayoutVertexArray,l,v),p.emplaceBack(S,S+2,S+1),p.emplaceBack(S+1,S+2,S+3),m.vertexLength+=4,m.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(x[0]),e!==r.length-1&&w===r[e+1].sectionIndex||t.programConfigurations.populatePaintArrays(f.length,a,a.index,{imagePositions:{},canonical:d,formattedSection:null==b?void 0:b[w]})}t.placedSymbolArray.emplaceBack(l.x,l.y,g,this.glyphOffsetArray.length-g,y,u,c,l.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],s,0,!1,0,h)}_addCollisionDebugVertex(e,t,r,i,n,o){return t.emplaceBack(0,0),e.emplaceBack(r.x,r.y,i,n,Math.round(o.x),Math.round(o.y))}addCollisionDebugVertices(e,t,r,i,n,o,a){let s=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),l=s.vertexLength,u=n.layoutVertexArray,c=n.collisionVertexArray,h=a.anchorX,d=a.anchorY;this._addCollisionDebugVertex(u,c,o,h,d,new x(e,t)),this._addCollisionDebugVertex(u,c,o,h,d,new x(r,t)),this._addCollisionDebugVertex(u,c,o,h,d,new x(r,i)),this._addCollisionDebugVertex(u,c,o,h,d,new x(e,i)),s.vertexLength+=4;let p=n.indexArray;p.emplaceBack(l,l+1),p.emplaceBack(l+1,l+2),p.emplaceBack(l+2,l+3),p.emplaceBack(l+3,l),s.primitiveLength+=4}addDebugCollisionBoxes(e,t,r,i){for(let n=e;n<t;n++){let e=this.collisionBoxArray.get(n);this.addCollisionDebugVertices(e.x1,e.y1,e.x2,e.y2,i?this.textCollisionBox:this.iconCollisionBox,e.anchorPoint,r)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new un(oK,lI.members,oQ),this.iconCollisionBox=new un(oK,lI.members,oQ);for(let e=0;e<this.symbolInstances.length;e++){let t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}}_deserializeCollisionBoxesForSymbol(e,t,r,i,n,o,a,s,l){let u={};for(let i=t;i<r;i++){let t=e.get(i);u.textBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},u.textFeatureIndex=t.featureIndex;break}for(let t=i;t<n;t++){let r=e.get(t);u.verticalTextBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.verticalTextFeatureIndex=r.featureIndex;break}for(let t=o;t<a;t++){let r=e.get(t);u.iconBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.iconFeatureIndex=r.featureIndex;break}for(let t=s;t<l;t++){let r=e.get(t);u.verticalIconBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.verticalIconFeatureIndex=r.featureIndex;break}return u}deserializeCollisionBoxes(e){this.collisionArrays=[];for(let t=0;t<this.symbolInstances.length;t++){let r=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,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}addIndicesForPlacedSymbol(e,t){let r=e.placedSymbolArray.get(t),i=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;t<i;t+=4)e.indexArray.emplaceBack(t,t+2,t+1),e.indexArray.emplaceBack(t+1,t+2,t+3)}
170getSortedSymbolIndexes(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;let t=Math.sin(e),r=Math.cos(e),i=[],n=[],o=[];for(let e=0;e<this.symbolInstances.length;++e){o.push(e);let a=this.symbolInstances.get(e);i.push(0|Math.round(t*a.anchorX+r*a.anchorY)),n.push(a.featureIndex)}return o.sort((e,t)=>i[e]-i[t]||n[t]-n[e]),o}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(null==r?void 0:r.sortKey)===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){for(let t of(this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[],this.symbolInstanceIndexes)){let e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex);let r=[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex];for(let e=0;e<r.length;e++){let t=r[e];t>=0&&r.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)}e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}nw("SymbolBucket",uo,{omit:["layers","collisionBoxArray","features","compareText"]}),uo.MAX_GLYPHS=65535,uo.addDynamicAttributes=ur;var ua={get paint(){return v=v||new n1({"icon-opacity":new nY(eJ.paint_symbol["icon-opacity"]),"icon-color":new nY(eJ.paint_symbol["icon-color"]),"icon-halo-color":new nY(eJ.paint_symbol["icon-halo-color"]),"icon-halo-width":new nY(eJ.paint_symbol["icon-halo-width"]),"icon-halo-blur":new nY(eJ.paint_symbol["icon-halo-blur"]),"icon-translate":new nX(eJ.paint_symbol["icon-translate"]),"icon-translate-anchor":new nX(eJ.paint_symbol["icon-translate-anchor"]),"text-opacity":new nY(eJ.paint_symbol["text-opacity"]),"text-color":new nY(eJ.paint_symbol["text-color"],{runtimeType:ta,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new nY(eJ.paint_symbol["text-halo-color"]),"text-halo-width":new nY(eJ.paint_symbol["text-halo-width"]),"text-halo-blur":new nY(eJ.paint_symbol["text-halo-blur"]),"text-translate":new nX(eJ.paint_symbol["text-translate"]),"text-translate-anchor":new nX(eJ.paint_symbol["text-translate-anchor"])})},get layout(){return y=y||new n1({"symbol-placement":new nX(eJ.layout_symbol["symbol-placement"]),"symbol-spacing":new nX(eJ.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new nX(eJ.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new nY(eJ.layout_symbol["symbol-sort-key"]),"symbol-z-order":new nX(eJ.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new nX(eJ.layout_symbol["icon-allow-overlap"]),"icon-overlap":new nX(eJ.layout_symbol["icon-overlap"]),"icon-ignore-placement":new nX(eJ.layout_symbol["icon-ignore-placement"]),"icon-optional":new nX(eJ.layout_symbol["icon-optional"]),"icon-rotation-alignment":new nX(eJ.layout_symbol["icon-rotation-alignment"]),"icon-size":new nY(eJ.layout_symbol["icon-size"]),"icon-text-fit":new nX(eJ.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new nX(eJ.layout_symbol["icon-text-fit-padding"]),"icon-image":new nY(eJ.layout_symbol["icon-image"]),"icon-rotate":new nY(eJ.layout_symbol["icon-rotate"]),"icon-padding":new nY(eJ.layout_symbol["icon-padding"]),"icon-keep-upright":new nX(eJ.layout_symbol["icon-keep-upright"]),"icon-offset":new nY(eJ.layout_symbol["icon-offset"]),"icon-anchor":new nY(eJ.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new nX(eJ.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new nX(eJ.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new nX(eJ.layout_symbol["text-rotation-alignment"]),"text-field":new nY(eJ.layout_symbol["text-field"]),"text-font":new nY(eJ.layout_symbol["text-font"]),"text-size":new nY(eJ.layout_symbol["text-size"]),"text-max-width":new nY(eJ.layout_symbol["text-max-width"]),"text-line-height":new nX(eJ.layout_symbol["text-line-height"]),"text-letter-spacing":new nY(eJ.layout_symbol["text-letter-spacing"]),"text-justify":new nY(eJ.layout_symbol["text-justify"]),"text-radial-offset":new nY(eJ.layout_symbol["text-radial-offset"]),"text-variable-anchor":new nX(eJ.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new nY(eJ.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new nY(eJ.layout_symbol["text-anchor"]),"text-max-angle":new nX(eJ.layout_symbol["text-max-angle"]),"text-writing-mode":new nX(eJ.layout_symbol["text-writing-mode"]),"text-rotate":new nY(eJ.layout_symbol["text-rotate"]),"text-padding":new nX(eJ.layout_symbol["text-padding"]),"text-keep-upright":new nX(eJ.layout_symbol["text-keep-upright"]),"text-transform":new nY(eJ.layout_symbol["text-transform"]),"text-offset":new nY(eJ.layout_symbol["text-offset"]),"text-allow-overlap":new nX(eJ.layout_symbol["text-allow-overlap"]),"text-overlap":new nX(eJ.layout_symbol["text-overlap"]),"text-ignore-placement":new nX(eJ.layout_symbol["text-ignore-placement"]),"text-optional":new nX(eJ.layout_symbol["text-optional"])})}};class us{constructor(e){if(void 0===e.property.overrides)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:tr,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(null==t?void 0:t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}nw("FormatSectionOverride",us,{omit:["defaultValue"]});class ul extends n5{constructor(e,t){super(e,ua,t)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)t.includes(r)||t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,i){var n;let o=this.layout.get(e).evaluate(t,{},r,i),a=this._unevaluatedLayout._values[e];return a.isDataDriven()||ik(a.value)||!o?o:(n=t.properties,o.replace(/{([^{}]+)}/g,(e,t)=>n&&t in n?String(n[t]):""))}createBucket(e){return new uo(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of ua.paint.overridableProperties){if(!ul.hasPaintOverride(this.layout,e))continue;let t=this.paint.get(e),r=new iM(new us(t),t.property.specification),i=null;i="constant"===t.value.kind||"source"===t.value.kind?new iD("source",r):new iR("composite",r,t.value.zoomStops),this.paint._values[e]=new n$(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&ul.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){let r=e.get("text-field"),i=ua.paint.properties[t],n=!1,o=e=>{var t;for(let r of e)if(null==(t=i.overrides)?void 0:t.hasOverride(r))return void(n=!0)};if("constant"===r.value.kind&&r.value.value instanceof tK)o(r.value.value.sections);else if("source"===r.value.kind||"composite"===r.value.kind){let e=t=>{n||(t instanceof t7&&t6(t.value)===th?o(t.value.sections):t instanceof rk?o(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return n}}var uu={get paint(){return b=b||new n1({"background-color":new nX(eJ.paint_background["background-color"]),"background-pattern":new nJ(eJ.paint_background["background-pattern"]),"background-opacity":new nX(eJ.paint_background["background-opacity"])})}};class uc extends n5{constructor(e,t){super(e,uu,t)}}class uh extends n5{constructor(e,t){super(e,{},t),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}}class ud{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var e;this._triggered||(this._triggered=!0,null==(e=this._channel)||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let up={once:!0};class uf{constructor(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new uf(ev(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,i=e.lat*t;return 6371008.8*Math.acos(Math.min(Math.sin(r)*Math.sin(i)+Math.cos(r)*Math.cos(i)*Math.cos((e.lng-this.lng)*t),1))}static convert(e){if(e instanceof uf)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new uf(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new uf(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw 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>]")}}let um=2*Math.PI*6371008.8;function ug(e){return um*Math.cos(e*Math.PI/180)}function uy(e){return(180+e)/360}function uv(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function ub(e){return 360*e-180}function u_(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180)
170)-90}function ux(e,t){return e*ug(u_(t))}class uA{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){let r=uf.convert(e);return new uA(uy(r.lng),uv(r.lat),t/ug(r.lat))}toLngLat(){return new uf(ub(this.x),u_(this.y))}toAltitude(){return ux(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/um*(1/Math.cos(u_(this.y)*Math.PI/180))}}function uw(e,t,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[e*i-2*Math.PI*6378137/2,t*i-2*Math.PI*6378137/2]}class uS{constructor(e,t,r){if(e<0||e>25||r<0||r>=Math.pow(2,e)||t<0||t>=Math.pow(2,e))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=uE(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){var i,n,o,a,s;let l=(n=this.y,o=this.z,a=uw(256*(i=this.x),256*(n=Math.pow(2,o)-n-1),o),s=uw(256*(i+1),256*(n+1),o),a[0]+","+a[1]+","+s[0]+","+s[1]),u=function(e,t,r){let i="";for(let n=e;n>0;n--){let e=1<<n-1;i+=(t&e?1:0)+(r&e?2:0)}return i}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(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"===r?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,t>1?"@2x":"").replace(/{quadkey}/g,u).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=Math.pow(2,this.z);return new x((e.x*t-this.x)*8192,(e.y*t-this.y)*8192)}toString(){return`${this.z}/${this.x}/${this.y}`}}class uT{constructor(e,t){this.wrap=e,this.canonical=t,this.key=uE(e,t.z,t.z,t.x,t.y)}}class uC{constructor(e,t,r,i,n){if(this.terrainRttPosMatrix32f=null,e<r)throw Error(`overscaledZ should be >= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new uS(r,+i,+n),this.key=uE(t,e,r,i,n)}clone(){return new uC(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let t=this.canonical.z-e;return e>this.canonical.z?new uC(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new uC(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,t){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?uE(this.wrap*t,e,this.canonical.z,this.canonical.x,this.canonical.y):uE(this.wrap*t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(0===e.overscaledZ)return this.overscaledZ>0;let t=this.canonical.z-e.canonical.z;return!(t<0)&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new uC(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new uC(t,this.wrap,t,r,i),new uC(t,this.wrap,t,r+1,i),new uC(t,this.wrap,t,r,i+1),new uC(t,this.wrap,t,r+1,i+1)]}isLessThan(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))}wrapped(){return new uC(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(e){return new uC(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new uT(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(e){return this.canonical.getTilePoint(new uA(e.x-this.wrap,e.y))}normalizeCoordinates(e,t,r=8192){if(e>=0&&e<r&&t>=0&&t<r)return{tileID:this,x:e,y:t};let i=Math.floor(e/r),n=Math.floor(t/r),o=this.canonical.z,a=1<<o,s=this.canonical.y+n;if(s<0||s>=a)return null;let l=this.canonical.x+i,u=this.wrap;return l<0?(u-=Math.ceil(-l/a),l=(l%a+a)%a):l>=a&&(u+=Math.floor(l/a),l%=a),{tileID:new uC(this.overscaledZ,u,o,l,
170s),x:e-i*r,y:t-n*r}}}function uE(e,t,r,i,n){(e*=2)<0&&(e=-1*e-1);let o=1<<r;return(o*o*e+o*n+i).toString(36)+r.toString(36)+t.toString(36)}nw("CanonicalTileID",uS),nw("OverscaledTileID",uC,{omit:["terrainRttPosMatrix32f"]});class uP{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let t=new uP;return t.extend(e(new x(this.minX,this.minY))),t.extend(e(new x(this.maxX,this.minY))),t.extend(e(new x(this.minX,this.maxY))),t.extend(e(new x(this.maxX,this.maxY))),t}static fromPoints(e){let t=new uP;for(let r of e)t.extend(r);return t}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}}class uI{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t<e.length;t++){let r=e[t];this._stringToNumber[r]=t,this._numberToString[t]=r}}encode(e){return this._stringToNumber[e]}decode(e){if(e>=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class uM{constructor(e,t,r,i,n){this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=i,this._z=t,this.properties=e.properties,this.id=n}projectPoint(e,t,r,i){return[360*(e.x+t)/i-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+r)/i)*Math.PI))-90]}projectLine(e,t,r,i){return e.map(e=>this.projectPoint(e,t,r,i))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*Math.pow(2,this._z),r=e.extent*this._x,i=e.extent*this._y,n=e.loadGeometry();switch(e.type){case 1:{let e=[];for(let t of n)e.push(t[0]);let o=this.projectLine(e,r,i,t);this._geometry=1===e.length?{type:"Point",coordinates:o[0]}:{type:"MultiPoint",coordinates:o};break}case 2:{let e=n.map(e=>this.projectLine(e,r,i,t));this._geometry=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e};break}case 3:{let e=sM(n),o=[];for(let n of e)o.push(n.map(e=>this.projectLine(e,r,i,t)));this._geometry=1===o.length?{type:"Polygon",coordinates:o[0]}:{type:"MultiPolygon",coordinates:o};break}default:throw Error(`unknown feature type: ${e.type}`)}return this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&"_x"!==t&&"_y"!==t&&"_z"!==t&&(e[t]=this[t]);return e}}class uk{constructor(e,t,r){this._name=e,this.dataBuffer=t,"number"==typeof r?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){return this.nullabilityBuffer?.get(e)||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class uO extends uk{}class uD extends uO{getValueFromBuffer(e){return this.dataBuffer[e]}}class uR extends uO{getValueFromBuffer(e){return this.dataBuffer[e]}}
170class uL extends uk{constructor(e,t,r,i){super(e,t,i),this.delta=r}}class uB extends uL{constructor(e,t,r,i){super(e,Int32Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}}class uF extends uk{constructor(e,t,r,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}}class uj{constructor(e,t,r,i,n=4096){this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=i,this._extent=n}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],t=this.geometryVector.getGeometries();for(let r=0;r<this.numFeatures;r++){let i;if(this.idVector){let e=this.idVector.getValue(r);i=this.containsMaxSafeIntegerValues(this.idVector)&&null!==e?Number(e):e}let n={coordinates:t[r],type:this.geometryVector.geometryType(r)},o={};for(let e of this.propertyVectors){if(!e)continue;let t=e.name,i=e.getValue(r);null!==i&&(o[t]=i)}e.push({id:i,geometry:n,properties:o})}return e}containsMaxSafeIntegerValues(e){return e instanceof uD||e instanceof uF||e instanceof uB||e instanceof uR}}class uz{constructor(e){this.value=e}get(){return this.value}set(e){this.value=e}increment(){return this.value++}add(e){this.value+=e}}(S=B||(B={})).NONE="NONE",S.DELTA="DELTA",S.COMPONENTWISE_DELTA="COMPONENTWISE_DELTA",S.RLE="RLE",S.MORTON="MORTON",S.PDE="PDE",(T=F||(F={})).NONE="NONE",T.FAST_PFOR="FAST_PFOR",T.VARINT="VARINT",T.ALP="ALP";let uN=new Uint32Array(33);uN[0]=0;for(let e=1;e<=32;e++)uN[e]=32===e?0xffffffff:0xffffffff>>>32-e;let uG=(Number.isFinite(65536),65536),uV=3*uG/256+uG|0;function uU(){let e=new Uint8Array(uV);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:e,byteContainerI32:new Int32Array(e.buffer,e.byteOffset,e.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function uH(e,t,r){let i=new Uint32Array(r),n=0,o=t.get();for(let t=0;t<i.length;t++){let t=e[o++],r=127&t;t<128||(r|=(127&(t=e[o++]))<<7,t<128||(r|=(127&(t=e[o++]))<<14,t<128||(r|=(127&(t=e[o++]))<<21,t<128||(r|=(15&(t=e[o++]))<<28)))),i[n++]=r}return t.set(o),i}function uW(e,t,r){let i=new BigUint64Array(r);for(let r=0;r<i.length;r++)i[r]=function(e,t){let r=0n,i=0,n=t.get();for(;n<e.length;){let t=e[n++];if(r|=BigInt(127&t)<<BigInt(i),!(128&t))break;if((i+=7)>=64)throw Error("Varint too long")}return t.set(n),r}(e,t);return i}function uq(e){return e>>>1^-(1&e)}function uZ(e){return e>>1n^-(1n&e)}function u$(e){return e%2==1?-((e+1)/2):e/2}function uK(e,t,r){if(void 0===r){r=0;for(let i=0;i<t;i++)r+=e[i]}let i=new Uint32Array(r),n=0;for(let r=0;r<t;r++){let o=e[r];i.fill(e[r+t],n,n+o),n+=o}return i}function uX(e,t,r){if(void 0===r){r=0;for(let i=0;i<t;i++)r+=Number(e[i])}let i=new BigUint64Array(r),n=0;for(let r=0;r<t;r++){let o=Number(e[r]);i.fill(e[r+t],n,n+o),n+=o}return i}function uY(e,t,r){let i=new Float64Array(r),n=0;for(let r=0;r<t;r++){let o=e[r];i.fill(e[r+t],n,n+o),n+=o}return i}function uQ(e){let t=new Int32Array(e.length);t[0]=uq(e[0]);let r=e.length/4*4,i=1;if(r>=4)for(;i<r-4;i+=4){let r=e[i+1],n=e[i+2],o=e[i+3];t[i]=uq(e[i])+t[i-1],t[i+1]=uq(r)+t[i],t[i+2]=uq(n)+t[i+1],t[i+3]=uq(o)+t[i+2]}for(;i!==e.length;++i)t[i]=uq(e[i])+t[i-1];return t}function uJ(e){let t=new BigInt64Array(e.length);t[0]=uZ(e[0]);let r=e.length/4*4,i=1;if(r>=4)for(;i<r-4;i+=4){let r=e[i+1],n=e[i+2],o=e[i+3];t[i]=uZ(e[i])+t[i-1],t[i+1]=uZ(r)+t[i],t[i+2]=uZ(n)+t[i+1],t[i+3]=uZ(o)+t[i+2]}for(;i!==t.length;++i)t[i]=uZ(e[i])+t[i-1];return t}function u0(e){let t=e.length/4*4,r=1;if(t>=4)for(let i=e[0];r<t-4;r+=4)i=e[r]+=i,i=e[r+1]+=i,i=e[r+2]+=i,i=e[r+3]+=i;for(;r!==e.length;)e[r]+=e[r-1],++r}function u1(e,t){let r,i,n=function(e,t){let r=e[t.get()],i=Object.values(j)[r>>4],n=null;switch(i){case j.DATA:n={dictionaryType:Object.values(z)[15&r]};break;case j.OFFSET:n={offsetType:Object.values(N)[15&r]};break;case j.LENGTH:n={lengthType:Object.values(G)[15&r]}}t.increment();let o=e[t.get()],a=Object.values(B)[o>>5],s=Object.values(B)[o>>2&7],l=Object.values(F)[3&o];t.increment();let u=uH(e,t,2),c=u[0];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:a,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:c,byteLength:u[1],decompressedCount:c}}(e,t);return n.logicalLevelTechnique1===B.MORTON?(r=uH(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:n.decompressedCount,numBits:r[0],coordinateShift:r[1]}):B.RLE!==n.logicalLevelTechnique1&&B.RLE!==n.logicalLevelTechnique2||F.NONE===n.physicalLevelTechnique?n:(i=uH(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]})}(C=j||(j={})).PRESENT="PRESENT",C.DATA="DATA",C.OFFSET="OFFSET",C.LENGTH="LENGTH",(E=z||(z={})).NONE="NONE",E.SINGLE="SINGLE",E.SHARED="SHARED",E.VERTEX="VERTEX",E.MORTON="MORTON",E.FSST="FSST",(P=N||(N={})).VERTEX="VERTEX",P.INDEX="INDEX",P.STRING="STRING",P.KEY="KEY",(I=G||(G={})).VAR_BINARY="VAR_BINARY",I.GEOMETRIES="GEOMETRIES",I.PARTS="PARTS",I.RINGS="RINGS",I.TRIANGLES="TRIANGLES",I.SYMBOL="SYMBOL",I.DICTIONARY="DICTIONARY",(M=V||(V={}))[M.FLAT=0]="FLAT",M[M.CONST=1]="CONST",M[M.SEQUENCE=2]="SEQUENCE",M[M.DICTIONARY=3]="DICTIONARY",M[M.FSST_DICTIONARY=4]="FSST_DICTIONARY";class u2{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8);return 1==(this.values[t]>>e%8&1)}set(e,t){let r=Math.floor(e/8);this.values[r]=this.values[r]|!!t<<e%8}getInt(e){let t=Math.floor(e/8);return this.values[t]>>e%8&1}size(){return this._size}getBuffer(){return this.values}}function u3(e,t,r){if(!t)return e;let i=t.size(),n=new(0,e.constructor)(i),o=0;for(let a=0;a<i;a++)n[a]=t.get(a)?e[o++]:r;return n}function u5(e,t,r,i,n){let o;var a=u8(e,t,r);switch(r.logicalLevelTechnique1){case B.DELTA:if(r.logicalLevelTechnique2===B.RLE){if(!n)return function(e,t,r){let i=new Int32Array(r),n=0,o=0;for(let r=0;r<t;r++){let a=e[r],s=uq(e[r+t]);for(let e=0;e<a;e++)o+=s,i[n++]=o}return i}(a,r.runs,r.numRleValues);o=uQ(a=uK(a,r.runs,r.numRleValues))}else o=uQ(a);break;case B.RLE:o=function(e,t,r){if(void 0===r){r=0;for(let i=0;i<t;i++)r+=e[i]}let i=new Int32Array(r),n=0;for(let r=0;r<t;r++){let o=e[r],a=e[r+t];a=uq(a),i.fill(a,n,n+o),n+=o}return i}(a,r.runs,r.numRleValues);break;case B.MORTON:u0(a),o=new Int32Array(a);break;case B.COMPONENTWISE_DELTA:o=function(e){if(e.length<2)return new Int32Array(e);let t=new Int32Array(e.length);t[0]=uq(e[0]),t[1]=uq(e[1]);let r=e.length/4*4,i=2;if(r>=4)for(;i<r-4;i+=4){let r=e[i+1],n=e[i+2],o=e[i+3];t[i]=uq(e[i])+t[i-2],t[i+1]=uq(r)+t[i-1],t[i+2]=uq(n)+t[i],t[i+3]=uq(o)+t[i+1]}for(;i!==e.length;i+=2)t[i]=uq(e[i])+t[i-2],t[i+1]=uq(e[i+1])+t[i-1];return t}(a);break;case B.NONE:o=function(e){let t=new Int32Array(e.length);for(let r=0;r<e.length;r++)t[r]=uq(e[r]);return t}(a);break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}
vendor: 4,411 bytes, line 170
170return n?u3(o,n,0):o}function u4(e,t,r,i,n){let o;var a=u8(e,t,r);switch(r.logicalLevelTechnique1){case B.DELTA:o=function(e){let t=new Uint32Array(e.length);t[0]=uq(e[0])>>>0;for(let r=1;r<e.length;r++)t[r]=t[r-1]+uq(e[r])>>>0;return t}(r.logicalLevelTechnique2===B.RLE?uK(a,r.runs,r.numRleValues):a);break;case B.RLE:o=uK(a,r.runs,r.numRleValues);break;case B.MORTON:u0(a),o=a;break;case B.COMPONENTWISE_DELTA:o=function(e){if(e.length<2)return new Uint32Array(e);let t=new Uint32Array(e.length);t[0]=uq(e[0])>>>0,t[1]=uq(e[1])>>>0;for(let r=2;r<e.length;r+=2)t[r]=t[r-2]+uq(e[r])>>>0,t[r+1]=t[r-1]+uq(e[r+1])>>>0;return t}(a);break;case B.NONE:o=a;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return n?u3(o,n,0):o}function u6(e,t,r){return function(e,t){if(t.logicalLevelTechnique1===B.DELTA&&t.logicalLevelTechnique2===B.NONE){let t=new Int32Array(e.length+1);t[0]=0,t[1]=uq(e[0]);let r=t[1];for(let i=2;i!==t.length;++i)r+=uq(e[i-1]),t[i]=t[i-1]+r;return new Uint32Array(t)}if(t.logicalLevelTechnique1===B.RLE&&t.logicalLevelTechnique2===B.NONE)return function(e,t,r){let i=new Uint32Array(r+1);i[0]=0;let n=1,o=i[0];for(let r=0;r<t;r++){let a=e[r],s=e[r+t];for(let e=n;e<n+a;e++)i[e]=s+o,o=i[e];n+=a}return i}(e,t.runs,t.numRleValues);if(t.logicalLevelTechnique1===B.NONE&&t.logicalLevelTechnique2===B.NONE){let r=0;for(let t=0;t<e.length;t++)e[t]+=r,r=e[t];let i=new Uint32Array(t.numValues+1);return i[0]=0,i.set(e,1),i}if(t.logicalLevelTechnique1===B.DELTA&&t.logicalLevelTechnique2===B.RLE){let r=function(e,t,r){let i=new Int32Array(r+1);i[0]=0;let n=1,o=i[0];for(let r=0;r<t;r++){let a=e[r],s=e[r+t];s=uq(s);for(let e=n;e<n+a;e++)i[e]=s+o,o=i[e];n+=a}return i}(e,t.runs,t.numRleValues);return u0(r),new Uint32Array(r)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}(u8(e,t,r),r)}function u8(e,t,r){let i=r.physicalLevelTechnique;switch(i){case F.FAST_PFOR:var n;return function(e,t,r,i,n){let o=i.get();if(3&r)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${o} (encodedBytes.length=${e.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let a=r>>>2,s=function(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,2*t));return e.encodedWords=r,r}(n,a);!function(e,t,r,i){if(t<0||r<0||t+r>e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${t}, byteLength=${r}, bytes.length=${e.length})`);let n=Math.floor(r/4),o=r%4!=0,a=o?n+1:n;if(i.length<a)throw RangeError(`decodeBigEndianInt32sInto: out.length=${i.length} < ${a}`);if(n>0){let r=e.byteOffset+t;if(3&r)for(let r=0;r<n;r++){let n=t+4*r;i[r]=e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]}else{let t=new Uint32Array(e.buffer,r,n);for(let e=0;e<n;e++)i[e]=0|function(e){let t=e>>>0;return((255&t)<<24|(65280&t)<<8|t>>>8&65280|t>>>24&255)>>>0}(t[e])}}if(o){let o=t+4*n,a=r-4*n,s=0;for(let t=0;t<a;t++)s|=e[o+t]<<24-8*t;i[n]=0|s}}(e,o,r,s);let l=function(e,t,r){let i=0,n=0,o=new Uint32Array(t),a=r??uU();if(e.length>0){let t=0|e[i];if(i=i+1|0,255&t)throw Error(`FastPFOR decode: invalid alignedLength=${t} (expected multiple of 256)`);if(n+t>o.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${t}, out.length=${o.length})`);i=function(e,t,r,i,n,o){let a=i+(n-n%256),s=i,l=r;for(;s!==a;){let r=Math.min(uG,a-s);l=function(e,t,r,i,n,o){let a=0|r,s=0|e[a];if(s<=0||a+s>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${s} at pageStart=${a} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let l=a+s|0,u=e[l]>>>0,c=u+3>>>2,h=l+1,d=h+c;if(d>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${u} (metaInts=${c}, pageStart=${a}, packedEnd=${l}, byteContainerStart=${h}) causes bitmapPos=${d} out of bounds (encoded.length=${e.length})`);let p=function(e,t,r,i){i.byteContainer.length<r&&(i.byteContainer=new Uint8Array(2*r),i.byteContainerI32=void 0);let n=i.byteContainer,o=r>>>2;if(3&n.byteOffset)for(let r=0;r<o;r=r+1|0){let i=0|e[t+r|0],o=r<<2;n[o]=255&i,n[o+1|0]=i>>>8&255,n[o+2|0]=i>>>16&255,n[o+3|0]=i>>>24&255}else{let r=i.byteContainerI32;(!r||r.buffer!==n.buffer||r.byteOffset!==n.byteOffset||r.length<o)&&(r=i.byteContainerI32=new Int32Array(n.buffer,n.byteOffset,n.byteLength>>>2)),r.set(e.subarray(t,t+o))}let a=3&r;if(a>0){let r=0|e[t+o|0],i=o<<2;
170for(let e=0;e<a;e=e+1|0)n[i+e|0]=r>>>(e<<3)&255}return n}(e,h,u,o),f=function(e,t,r){let i=0|e[t++],n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){var o;if(!(i>>>a-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let s=e[t++]>>>0,l=(o=s+31)-o%32,u=s*a+31>>>5;if(t+u>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${s}, streamWordIndex=${t}, needWords=${u}, availableWords=${e.length-t}, encodedWords=${e.length})`);let c=n[a];(!c||c.length<l)&&(c=n[a]=new Uint32Array(l));let h=0;for(;h<s;h=h+32|0)(function(e,t,r,i,n){switch(n){case 2:let o,a,s;return o=i,a=e[t]>>>0,s=e[t+1]>>>0,r[o++]=a>>>0&3,r[o++]=a>>>2&3,r[o++]=a>>>4&3,r[o++]=a>>>6&3,r[o++]=a>>>8&3,r[o++]=a>>>10&3,r[o++]=a>>>12&3,r[o++]=a>>>14&3,r[o++]=a>>>16&3,r[o++]=a>>>18&3,r[o++]=a>>>20&3,r[o++]=a>>>22&3,r[o++]=a>>>24&3,r[o++]=a>>>26&3,r[o++]=a>>>28&3,r[o++]=a>>>30&3,r[o++]=s>>>0&3,r[o++]=s>>>2&3,r[o++]=s>>>4&3,r[o++]=s>>>6&3,r[o++]=s>>>8&3,r[o++]=s>>>10&3,r[o++]=s>>>12&3,r[o++]=s>>>14&3,r[o++]=s>>>16&3,r[o++]=s>>>18&3,r[o++]=s>>>20&3,r[o++]=s>>>22&3,r[o++]=s>>>24&3,r[o++]=s>>>26&3,r[o++]=s>>>28&3,r[o]=s>>>30&3;case 3:let l,u,c,h;return l=i,u=e[t]>>>0,c=e[t+1]>>>0,h=e[t+2]>>>0,r[l++]=u>>>0&7,r[l++]=u>>>3&7,r[l++]=u>>>6&7,r[l++]=u>>>9&7,r[l++]=u>>>12&7,r[l++]=u>>>15&7,r[l++]=u>>>18&7,r[l++]=u>>>21&7,r[l++]=u>>>24&7,r[l++]=u>>>27&7,r[l++]=7&(u>>>30|(1&c)<<2),r[l++]=c>>>1&7,r[l++]=c>>>4&7,r[l++]=c>>>7&7,r[l++]=c>>>10&7,r[l++]=c>>>13&7,r[l++]=c>>>16&7,r[l++]=c>>>19&7,r[l++]=c>>>22&7,r[l++]=c>>>25&7,r[l++]=c>>>28&7,r[l++]=7&(c>>>31|(3&h)<<1),r[l++]=h>>>2&7,r[l++]=h>>>5&7,r[l++]=h>>>8&7,r[l++]=h>>>11&7,r[l++]=h>>>14&7,r[l++]=h>>>17&7,r[l++]=h>>>20&7,r[l++]=h>>>23&7,r[l++]=h>>>26&7,r[l]=h>>>29&7;case 4:let d,p,f,m,g;return d=i,p=e[t]>>>0,f=e[t+1]>>>0,m=e[t+2]>>>0,g=e[t+3]>>>0,r[d++]=p>>>0&15,r[d++]=p>>>4&15,r[d++]=p>>>8&15,r[d++]=p>>>12&15,r[d++]=p>>>16&15,r[d++]=p>>>20&15,r[d++]=p>>>24&15,r[d++]=p>>>28&15,r[d++]=f>>>0&15,r[d++]=f>>>4&15,r[d++]=f>>>8&15,r[d++]=f>>>12&15,r[d++]=f>>>16&15,r[d++]=f>>>20&15,r[d++]=f>>>24&15,r[d++]=f>>>28&15,r[d++]=m>>>0&15,r[d++]=m>>>4&15,r[d++]=m>>>8&15,r[d++]=m>>>12&15,r[d++]=m>>>16&15,r[d++]=m>>>20&15,r[d++]=m>>>24&15,r[d++]=m>>>28&15,r[d++]=g>>>0&15,r[d++]=g>>>4&15,r[d++]=g>>>8&15,r[d++]=g>>>12&15,r[d++]=g>>>16&15,r[d++]=g>>>20&15,r[d++]=g>>>24&15,r[d]=g>>>28&15;case 5:let y,v,b,_,x,A;return y=i,v=e[t]>>>0,b=e[t+1]>>>0,_=e[t+2]>>>0,x=e[t+3]>>>0,A=e[t+4]>>>0,r[y++]=v>>>0&31,r[y++]=v>>>5&31,r[y++]=v>>>10&31,r[y++]=v>>>15&31,r[y++]=v>>>20&31,r[y++]=v>>>25&31,r[y++]=31&(v>>>30|(7&b)<<2),r[y++]=b>>>3&31,r[y++]=b>>>8&31,r[y++]=b>>>13&31,r[y++]=b>>>18&31,r[y++]=b>>>23&31,r[y++]=31&(b>>>28|(1&_)<<4),r[y++]=_>>>1&31,r[y++]=_>>>6&31,r[y++]=_>>>11&31,r[y++]=_>>>16&31,r[y++]=_>>>21&31,r[y++]=_>>>26&31,r[y++]=31&(_>>>31|(15&x)<<1),r[y++]=x>>>4&31,r[y++]=x>>>9&31,r[y++]=x>>>14&31,r[y++]=x>>>19&31,r[y++]=x>>>24&31,r[y++]=31&(x>>>29|(3&A)<<3),r[y++]=A>>>2&31,r[y++]=A>>>7&31,r[y++]=A>>>12&31,r[y++]=A>>>17&31,r[y++]=A>>>22&31,r[y]=A>>>27&31;case 6:let w,S,T,C,E,P,I;return w=i,S=e[t]>>>0,T=e[t+1]>>>0,C=e[t+2]>>>0,E=e[t+3]>>>0,P=e[t+4]>>>0,I=e[t+5]>>>0,r[w++]=S>>>0&63,r[w++]=S>>>6&63,r[w++]=S>>>12&63,r[w++]=S>>>18&63,r[w++]=S>>>24&63,r[w++]=63&(S>>>30|(15&T)<<2),r[w++]=T>>>4&63,r[w++]=T>>>10&63,r[w++]=T>>>16&63,r[w++]=T>>>22&63,r[w++]=63&(T>>>28|(3&C)<<4),r[w++]=C>>>2&63,r[w++]=C>>>8&63,r[w++]=C>>>14&63,r[w++]=C>>>20&63,r[w++]=C>>>26&63,r[w++]=E>>>0&63,r[w++]=E>>>6&63,r[w++]=E>>>12&63,r[w++]=E>>>18&63,r[w++]=E>>>24&63,r[w++]=63&(E>>>30|(15&P)<<2),r[w++]=P>>>4&63,r[w++]=P>>>10&63,r[w++]=P>>>16&63,r[w++]=P>>>22&63,r[w++]=63&(P>>>28|(3&I)<<4),r[w++]=I>>>2&63,r[w++]=I>>>8&63,r[w++]=I>>>14&63,r[w++]=I>>>20&63,r[w]=I>>>26&63;case 7:let M,k,O,D,R,L,B,F;return M=i,k=e[t]>>>0,O=e[t+1]>>>0,D=e[t+2]>>>0,R=e[t+3]>>>0,L=e[t+4]>>>0,B=e[t+5]>>>0,F=e[t+6]>>>0,r[M++]=k>>>0&127,r[M++]=k>>>7&127,r[M++]=k>>>14&127,r[M++]=k>>>21&127,r[M++]=127&(k>>>28|(7&O)<<4),r[M++]=O>>>3&127,r[M++]=O>>>10&127,r[M++]=O>>>17&127,r[M++]=O>>>24&127,r[M++]=127&(O>>>31|(63&D)<<1),r[M++]=D>>>6&127,r[M++]=D>>>13&127,r[M++]=D>>>20&127,r[M++]=127&(D>>>27|(3&R)<<5),r[M++]=R>>>2&127,r[M++]=R>>>9&127,r[M++]=R>>>16&127,r[M++]=R>>>23&127,r[M++]=127&(R>>>30|(31&L)<<2),r[M++]=L>>>5&127,r[M++]=L>>>12&127,r[M++]=L>>>19&127,r[M++]=127&(L>>>26|(1&B)<<6),r[M++]=B>>>1&127,r[M++]=B>>>8&127,r[M++]=B>>>15&127,r[M++]=B>>>22&127,r[M++]=127&(B>>>29|(15&F)<<3),r[M++]=F>>>4&127,r[M++]=F>>>11&127,r[M++]=F>>>18&127,r[M]=F>>>25&127;case 8:let j,z,N,G,V,U,H,W,q;return j=i,z=e[t]>>>0,N=e[t+1]>>>0,G=e[t+2]>>>0,V=e[t+3]>>>0,U=e[t+4]>>>0,H=e[t+5]>>>0,W=e[t+6]>>>0,q=e[t+7]>>>0,r[j++]=z>>>0&255,r[j++]=z>>>8&255,r[j++]=z>>>16&255,r[j++]=z>>>24&255,r[j++]=N>>>0&255,r[j++]=N>>>8&255,r[j++]=N>>>16&255,r[j++]=N>>>24&255,r[j++]=G>>>0&255,r[j++]=G>>>8&255,r[j++]=G>>>16&255,r[j++]=G>>>24&255,r[j++]=V>>>0&255,r[j++]=V>>>8&255,r[j++]=V>>>16&255,r[j++]=V>>>24&255,r[j++]=U>>>0&255,r[j++]=U>>>8&255,r[j++]=U>>>16&255,r[j++]=U>>>24&255,r[j++]=H>>>0&255,r[j++]=H>>>8&255,r[j++]=H>>>16&255,r[j++]=H>>>24&255,r[j++]=W>>>0&255,r[j++]=W>>>8&255,r[j++]=W>>>16&255,r[j++]=W>>>24&255,r[j++]=q>>>0&255,r[j++]=q>>>8&255,r[j++]=q>>>16&255,r[j]=q>>>24&255;case 9:let Z,$,K,X,Y,Q,J,ee,et,er;return Z=i,$=e[t]>>>0,K=e[t+1]>>>0,X=e[t+2]>>>0,Y=e[t+3]>>>0,Q=e[t+4]>>>0,J=e[t+5]>>>0,ee=e[t+6]>>>0,et=e[t+7]>>>0,er=e[t+8]>>>0,r[Z++]=$>>
170>0&511,r[Z++]=$>>>9&511,r[Z++]=$>>>18&511,r[Z++]=511&($>>>27|(15&K)<<5),r[Z++]=K>>>4&511,r[Z++]=K>>>13&511,r[Z++]=K>>>22&511,r[Z++]=511&(K>>>31|(255&X)<<1),r[Z++]=X>>>8&511,r[Z++]=X>>>17&511,r[Z++]=511&(X>>>26|(7&Y)<<6),r[Z++]=Y>>>3&511,r[Z++]=Y>>>12&511,r[Z++]=Y>>>21&511,r[Z++]=511&(Y>>>30|(127&Q)<<2),r[Z++]=Q>>>7&511,r[Z++]=Q>>>16&511,r[Z++]=511&(Q>>>25|(3&J)<<7),r[Z++]=J>>>2&511,r[Z++]=J>>>11&511,r[Z++]=J>>>20&511,r[Z++]=511&(J>>>29|(63&ee)<<3),r[Z++]=ee>>>6&511,r[Z++]=ee>>>15&511,r[Z++]=511&(ee>>>24|(1&et)<<8),r[Z++]=et>>>1&511,r[Z++]=et>>>10&511,r[Z++]=et>>>19&511,r[Z++]=511&(et>>>28|(31&er)<<4),r[Z++]=er>>>5&511,r[Z++]=er>>>14&511,r[Z]=er>>>23&511;case 10:let ei,en,eo,ea,es,el,eu,ec,eh,ed,ep;return ei=i,en=e[t]>>>0,eo=e[t+1]>>>0,ea=e[t+2]>>>0,es=e[t+3]>>>0,el=e[t+4]>>>0,eu=e[t+5]>>>0,ec=e[t+6]>>>0,eh=e[t+7]>>>0,ed=e[t+8]>>>0,ep=e[t+9]>>>0,r[ei++]=en>>>0&1023,r[ei++]=en>>>10&1023,r[ei++]=en>>>20&1023,r[ei++]=1023&(en>>>30|(255&eo)<<2),r[ei++]=eo>>>8&1023,r[ei++]=eo>>>18&1023,r[ei++]=1023&(eo>>>28|(63&ea)<<4),r[ei++]=ea>>>6&1023,r[ei++]=ea>>>16&1023,r[ei++]=1023&(ea>>>26|(15&es)<<6),r[ei++]=es>>>4&1023,r[ei++]=es>>>14&1023,r[ei++]=1023&(es>>>24|(3&el)<<8),r[ei++]=el>>>2&1023,r[ei++]=el>>>12&1023,r[ei++]=el>>>22&1023,r[ei++]=eu>>>0&1023,r[ei++]=eu>>>10&1023,r[ei++]=eu>>>20&1023,r[ei++]=1023&(eu>>>30|(255&ec)<<2),r[ei++]=ec>>>8&1023,r[ei++]=ec>>>18&1023,r[ei++]=1023&(ec>>>28|(63&eh)<<4),r[ei++]=eh>>>6&1023,r[ei++]=eh>>>16&1023,r[ei++]=1023&(eh>>>26|(15&ed)<<6),r[ei++]=ed>>>4&1023,r[ei++]=ed>>>14&1023,r[ei++]=1023&(ed>>>24|(3&ep)<<8),r[ei++]=ep>>>2&1023,r[ei++]=ep>>>12&1023,r[ei]=ep>>>22&1023;case 11:let ef,em,eg,ey,ev,eb,e_,ex,eA,ew,eS,eT;return ef=i,em=e[t]>>>0,eg=e[t+1]>>>0,ey=e[t+2]>>>0,ev=e[t+3]>>>0,eb=e[t+4]>>>0,e_=e[t+5]>>>0,ex=e[t+6]>>>0,eA=e[t+7]>>>0,ew=e[t+8]>>>0,eS=e[t+9]>>>0,eT=e[t+10]>>>0,r[ef++]=em>>>0&2047,r[ef++]=em>>>11&2047,r[ef++]=2047&(em>>>22|(1&eg)<<10),r[ef++]=eg>>>1&2047,r[ef++]=eg>>>12&2047,r[ef++]=2047&(eg>>>23|(3&ey)<<9),r[ef++]=ey>>>2&2047,r[ef++]=ey>>>13&2047,r[ef++]=2047&(ey>>>24|(7&ev)<<8),r[ef++]=ev>>>3&2047,r[ef++]=ev>>>14&2047,r[ef++]=2047&(ev>>>25|(15&eb)<<7),r[ef++]=eb>>>4&2047,r[ef++]=eb>>>15&2047,r[ef++]=2047&(eb>>>26|(31&e_)<<6),r[ef++]=e_>>>5&2047,r[ef++]=e_>>>16&2047,r[ef++]=2047&(e_>>>27|(63&ex)<<5),r[ef++]=ex>>>6&2047,r[ef++]=ex>>>17&2047,r[ef++]=2047&(ex>>>28|(127&eA)<<4),r[ef++]=eA>>>7&2047,r[ef++]=eA>>>18&2047,r[ef++]=2047&(eA>>>29|(255&ew)<<3),r[ef++]=ew>>>8&2047,r[ef++]=ew>>>19&2047,r[ef++]=2047&(ew>>>30|(511&eS)<<2),r[ef++]=eS>>>9&2047,r[ef++]=eS>>>20&2047,r[ef++]=2047&(eS>>>31|(1023&eT)<<1),r[ef++]=eT>>>10&2047,r[ef]=eT>>>21&2047;case 12:let eC,eE,eP,eI,eM,ek,eO,eD,eR,eL,eB,eF,ej;return eC=i,eE=e[t]>>>0,eP=e[t+1]>>>0,eI=e[t+2]>>>0,eM=e[t+3]>>>0,ek=e[t+4]>>>0,eO=e[t+5]>>>0,eD=e[t+6]>>>0,eR=e[t+7]>>>0,eL=e[t+8]>>>0,eB=e[t+9]>>>0,eF=e[t+10]>>>0,ej=e[t+11]>>>0,r[eC++]=eE>>>0&4095,r[eC++]=eE>>>12&4095,r[eC++]=4095&(eE>>>24|(15&eP)<<8),r[eC++]=eP>>>4&4095,r[eC++]=eP>>>16&4095,r[eC++]=4095&(eP>>>28|(255&eI)<<4),r[eC++]=eI>>>8&4095,r[eC++]=eI>>>20&4095,r[eC++]=eM>>>0&4095,r[eC++]=eM>>>12&4095,r[eC++]=4095&(eM>>>24|(15&ek)<<8),r[eC++]=ek>>>4&4095,r[eC++]=ek>>>16&4095,r[eC++]=4095&(ek>>>28|(255&eO)<<4),r[eC++]=eO>>>8&4095,r[eC++]=eO>>>20&4095,r[eC++]=eD>>>0&4095,r[eC++]=eD>>>12&4095,r[eC++]=4095&(eD>>>24|(15&eR)<<8),r[eC++]=eR>>>4&4095,r[eC++]=eR>>>16&4095,r[eC++]=4095&(eR>>>28|(255&eL)<<4),r[eC++]=eL>>>8&4095,r[eC++]=eL>>>20&4095,r[eC++]=eB>>>0&4095,r[eC++]=eB>>>12&4095,r[eC++]=4095&(eB>>>24|(15&eF)<<8),r[eC++]=eF>>>4&4095,r[eC++]=eF>>>16&4095,r[eC++]=4095&(eF>>>28|(255&ej)<<4),r[eC++]=ej>>>8&4095,r[eC]=ej>>>20&4095;case 16:let ez,eN,eG,eV,eU,eH,eW,eq,eZ,e$,eK,eX,eY,eQ,eJ,e0,e1;return ez=i,eN=e[t]>>>0,eG=e[t+1]>>>0,eV=e[t+2]>>>0,eU=e[t+3]>>>0,eH=e[t+4]>>>0,eW=e[t+5]>>>0,eq=e[t+6]>>>0,eZ=e[t+7]>>>0,e$=e[t+8]>>>0,eK=e[t+9]>>>0,eX=e[t+10]>>>0,eY=e[t+11]>>>0,eQ=e[t+12]>>>0,eJ=e[t+13]>>>0,e0=e[t+14]>>>0,e1=e[t+15]>>>0,r[ez++]=eN>>>0&65535,r[ez++]=eN>>>16&65535,r[ez++]=eG>>>0&65535,r[ez++]=eG>>>16&65535,r[ez++]=eV>>>0&65535,r[ez++]=eV>>>16&65535,r[ez++]=eU>>>0&65535,r[ez++]=eU>>>16&65535,r[ez++]=eH>>>0&65535,r[ez++]=eH>>>16&65535,r[ez++]=eW>>>0&65535,r[ez++]=eW>>>16&65535,r[ez++]=eq>>>0&65535,r[ez++]=eq>>>16&65535,r[ez++]=eZ>>>0&65535,r[ez++]=eZ>>>16&65535,r[ez++]=e$>>>0&65535,r[ez++]=e$>>>16&65535,r[ez++]=eK>>>0&65535,r[ez++]=eK>>>16&65535,r[ez++]=eX>>>0&65535,r[ez++]=eX>>>16&65535,r[ez++]=eY>>>0&65535,r[ez++]=eY>>>16&65535,r[ez++]=eQ>>>0&65535,r[ez++]=eQ>>>16&65535,r[ez++]=eJ>>>0&65535,r[ez++]=eJ>>>16&65535,r[ez++]=e0>>>0&65535,r[ez++]=e0>>>16&65535,r[ez++]=e1>>>0&65535,r[ez]=e1>>>16&65535;case 32:for(let n=0;n<32;n=n+1|0)r[i+n|0]=0|e[t+n|0];return}let e2=uN[n]>>>0,e3=t,e5=0,e4=e[e3]>>>0;for(let t=0;t<32;t++)if(e5+n<=32)r[i+t]=e4>>>e5&e2,32===(e5+=n)&&(e5=0,e3++,31!==t&&(e4=e[e3]>>>0));else{let o=32-e5,a=e4>>>e5;e4=e[++e3]>>>0,r[i+t]=(a|(e4&uN[n-o]>>>0)<<o)&e2,e5=n-o}})(e,t,c,h,a),t=t+a|0;t=t-((h-s|0)*a>>>5)|0,r.exceptionSizes[a]=s}return t}(e,d,o);return o.dataPointers.fill(0),function(e,t,r,i,n,o,a,s,l,u){let c=0|r,h=0;for(let t=0;t<a;t=t+1|0){let r=function(e,t,r,i){if(r+2>t)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${t})`);let n=e[r++],o=e[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:o,bytePosIn:r}}(s,l,h,t);h=r.bytePosIn;let i=r.bitWidth,a=r.exceptionCount,d=o+256*t|0;switch(i){case 0:n.fill(0,d,d+256);break;case 32:for(let t=0;t<256;t=t+1|0)n[d+t|0]=0|e[c+t|0];c=c+256|0;break;default:c=function(e,t,r,i,n){switch(n){case 1:let o=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0;r[o++]=t>>
170>0&1,r[o++]=t>>>1&1,r[o++]=t>>>2&1,r[o++]=t>>>3&1,r[o++]=t>>>4&1,r[o++]=t>>>5&1,r[o++]=t>>>6&1,r[o++]=t>>>7&1,r[o++]=t>>>8&1,r[o++]=t>>>9&1,r[o++]=t>>>10&1,r[o++]=t>>>11&1,r[o++]=t>>>12&1,r[o++]=t>>>13&1,r[o++]=t>>>14&1,r[o++]=t>>>15&1,r[o++]=t>>>16&1,r[o++]=t>>>17&1,r[o++]=t>>>18&1,r[o++]=t>>>19&1,r[o++]=t>>>20&1,r[o++]=t>>>21&1,r[o++]=t>>>22&1,r[o++]=t>>>23&1,r[o++]=t>>>24&1,r[o++]=t>>>25&1,r[o++]=t>>>26&1,r[o++]=t>>>27&1,r[o++]=t>>>28&1,r[o++]=t>>>29&1,r[o++]=t>>>30&1,r[o++]=t>>>31&1}break;case 2:!function(e,t,r,i){let n=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0,i=e[o++]>>>0;r[n++]=t>>>0&3,r[n++]=t>>>2&3,r[n++]=t>>>4&3,r[n++]=t>>>6&3,r[n++]=t>>>8&3,r[n++]=t>>>10&3,r[n++]=t>>>12&3,r[n++]=t>>>14&3,r[n++]=t>>>16&3,r[n++]=t>>>18&3,r[n++]=t>>>20&3,r[n++]=t>>>22&3,r[n++]=t>>>24&3,r[n++]=t>>>26&3,r[n++]=t>>>28&3,r[n++]=t>>>30&3,r[n++]=i>>>0&3,r[n++]=i>>>2&3,r[n++]=i>>>4&3,r[n++]=i>>>6&3,r[n++]=i>>>8&3,r[n++]=i>>>10&3,r[n++]=i>>>12&3,r[n++]=i>>>14&3,r[n++]=i>>>16&3,r[n++]=i>>>18&3,r[n++]=i>>>20&3,r[n++]=i>>>22&3,r[n++]=i>>>24&3,r[n++]=i>>>26&3,r[n++]=i>>>28&3,r[n++]=i>>>30&3}}(e,t,r,i);break;case 3:!function(e,t,r,i){let n=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0,i=e[o++]>>>0,a=e[o++]>>>0;r[n++]=t>>>0&7,r[n++]=t>>>3&7,r[n++]=t>>>6&7,r[n++]=t>>>9&7,r[n++]=t>>>12&7,r[n++]=t>>>15&7,r[n++]=t>>>18&7,r[n++]=t>>>21&7,r[n++]=t>>>24&7,r[n++]=t>>>27&7,r[n++]=7&(t>>>30|(1&i)<<2),r[n++]=i>>>1&7,r[n++]=i>>>4&7,r[n++]=i>>>7&7,r[n++]=i>>>10&7,r[n++]=i>>>13&7,r[n++]=i>>>16&7,r[n++]=i>>>19&7,r[n++]=i>>>22&7,r[n++]=i>>>25&7,r[n++]=i>>>28&7,r[n++]=7&(i>>>31|(3&a)<<1),r[n++]=a>>>2&7,r[n++]=a>>>5&7,r[n++]=a>>>8&7,r[n++]=a>>>11&7,r[n++]=a>>>14&7,r[n++]=a>>>17&7,r[n++]=a>>>20&7,r[n++]=a>>>23&7,r[n++]=a>>>26&7,r[n++]=a>>>29&7}}(e,t,r,i);break;case 4:!function(e,t,r,i){let n=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0,i=e[o++]>>>0,a=e[o++]>>>0,s=e[o++]>>>0;r[n++]=t>>>0&15,r[n++]=t>>>4&15,r[n++]=t>>>8&15,r[n++]=t>>>12&15,r[n++]=t>>>16&15,r[n++]=t>>>20&15,r[n++]=t>>>24&15,r[n++]=t>>>28&15,r[n++]=i>>>0&15,r[n++]=i>>>4&15,r[n++]=i>>>8&15,r[n++]=i>>>12&15,r[n++]=i>>>16&15,r[n++]=i>>>20&15,r[n++]=i>>>24&15,r[n++]=i>>>28&15,r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15}}(e,t,r,i);break;case 5:!function(e,t,r,i){let n=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0,i=e[o++]>>>0,a=e[o++]>>>0,s=e[o++]>>>0,l=e[o++]>>>0;r[n++]=t>>>0&31,r[n++]=t>>>5&31,r[n++]=t>>>10&31,r[n++]=t>>>15&31,r[n++]=t>>>20&31,r[n++]=t>>>25&31,r[n++]=31&(t>>>30|(7&i)<<2),r[n++]=i>>>3&31,r[n++]=i>>>8&31,r[n++]=i>>>13&31,r[n++]=i>>>18&31,r[n++]=i>>>23&31,r[n++]=31&(i>>>28|(1&a)<<4),r[n++]=a>>>1&31,r[n++]=a>>>6&31,r[n++]=a>>>11&31,r[n++]=a>>>16&31,r[n++]=a>>>21&31,r[n++]=a>>>26&31,r[n++]=31&(a>>>31|(15&s)<<1),r[n++]=s>>>4&31,r[n++]=s>>>9&31,r[n++]=s>>>14&31,r[n++]=s>>>19&31,r[n++]=s>>>24&31,r[n++]=31&(s>>>29|(3&l)<<3),r[n++]=l>>>2&31,r[n++]=l>>>7&31,r[n++]=l>>>12&31,r[n++]=l>>>17&31,r[n++]=l>>>22&31,r[n++]=l>>>27&31}}(e,t,r,i);break;case 6:!function(e,t,r,i){let n=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0,i=e[o++]>>>0,a=e[o++]>>>0,s=e[o++]>>>0,l=e[o++]>>>0,u=e[o++]>>>0;r[n++]=t>>>0&63,r[n++]=t>>>6&63,r[n++]=t>>>12&63,r[n++]=t>>>18&63,r[n++]=t>>>24&63,r[n++]=63&(t>>>30|(15&i)<<2),r[n++]=i>>>4&63,r[n++]=i>>>10&63,r[n++]=i>>>16&63,r[n++]=i>>>22&63,r[n++]=63&(i>>>28|(3&a)<<4),r[n++]=a>>>2&63,r[n++]=a>>>8&63,r[n++]=a>>>14&63,r[n++]=a>>>20&63,r[n++]=a>>>26&63,r[n++]=s>>>0&63,r[n++]=s>>>6&63,r[n++]=s>>>12&63,r[n++]=s>>>18&63,r[n++]=s>>>24&63,r[n++]=63&(s>>>30|(15&l)<<2),r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=63&(l>>>28|(3&u)<<4),r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63}}(e,t,r,i);break;case 7:!function(e,t,r,i){let n=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0,i=e[o++]>>>0,a=e[o++]>>>0,s=e[o++]>>>0,l=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0;r[n++]=t>>>0&127,r[n++]=t>>>7&127,r[n++]=t>>>14&127,r[n++]=t>>>21&127,r[n++]=127&(t>>>28|(7&i)<<4),r[n++]=i>>>3&127,r[n++]=i>>>10&127,r[n++]=i>>>17&127,r[n++]=i>>>24&127,r[n++]=127&(i>>>31|(63&a)<<1),r[n++]=a>>>6&127,r[n++]=a>>>13&127,r[n++]=a>>>20&127,r[n++]=127&(a>>>27|(3&s)<<5),r[n++]=s>>>2&127,r[n++]=s>>>9&127,r[n++]=s>>>16&127,r[n++]=s>>>23&127,r[n++]=127&(s>>>30|(31&l)<<2),r[n++]=l>>>5&127,r[n++]=l>>>12&127,r[n++]=l>>>19&127,r[n++]=127&(l>>>26|(1&u)<<6),r[n++]=u>>>1&127,r[n++]=u>>>8&127,r[n++]=u>>>15&127,r[n++]=u>>>22&127,r[n++]=127&(u>>>29|(15&c)<<3),r[n++]=c>>>4&127,r[n++]=c>>>11&127,r[n++]=c>>>18&127,r[n++]=c>>>25&127}}(e,t,r,i);break;case 8:!function(e,t,r,i){let n=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0,i=e[o++]>>>0,a=e[o++]>>>0,s=e[o++]>>>0,l=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,h=e[o++]>>>0;r[n++]=t>>>0&255,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=i>>>0&255,r[n++]=i>>>8&255,r[n++]=i>>>16&255,r[n++]=i>>>24&255,r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255}}(e,t,r,i);break;case 16:let s=i,l=t;for(let t=0;t<128;t++){let t=e[l++]>>>0;r[s++]=65535&t,r[s++]=t>>>16&65535}break;default:!function(e,t,r,i,n){let o=uN[n]>>>0,a=t,s=0,l=e[a]>>>0,u=i;for(let t=0;t<8;t++){for(let t=0;t<32;t++)if(s+n<=32)r[u+t]=l>>>s&o,32===(s+=n)&&(s=0,a++,31!==t&&(l=e[a]>>>0));else{let i=32-s,c=l>>>s;l=e[++a]>>>0;let h=n-i;r[u+t]=(c|(l&-1>>>32-h>>>0)<<i)&o,s=h}u+=32,s=0,t<7&&(l=e[a]>>>0)}}(e,t,r,i,n)}return t+(n<<3)|0}(e,c,n,d,i)}a>0&&(h=function(e,t,r,i,n,o,a,s,l){let{maxBits:u,exceptionBitWidth:c,bytePosIn:h}=function(e,t,r,i,n,o){if(r+1>t)throw Error(`FastPFOR decode: exception header underflow at block=${o} (need 1 byte for maxBits, bytePos=${r}, byteSize=${t})`);let a=e[r++];if(a<i||a>32)throw Error(`FastPFOR decode: invalid maxBits=${a} at block=${o} (bitWidth=${i}, expected ${i}..32)`);let s=a-i|0;if(s<1||s>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${s} at block=${o} (bitWidth=${i}, maxBits=${a})`);if(r+n>t)throw Error(`FastPFOR decode: exception positions underflow at block=${o} (need=${n}, have=${t-r})`);return{maxBits:a,exceptionBitWidth:s,bytePosIn:r}}(n,o,a,r,i,l);if(a=h,1===c){let o=1<<r;for(let r=0;r<i;r=r+1|0)e[n[a++]+t|0]|=o;return a}let d=s.dataToBePacked[c];if(!d)throw Error(`FastPFOR decode: missing exception stream for exceptionBitWidth=${c} (bitWidth=${r}, maxBits=${u}) at block ${l}`);let p=s.dataPointers,f=0|p[c],m=0|s.exceptionSizes[c];if(f+i>m)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${c} (ptr=${f}, need ${i}, size=${m}) at block ${l}`);for(let o=0;o<i;o=o+1|0){let i=n[a++],o=0|d[f++];e[i+t|0]|=o<<r}return p[c]=f,a}(n,d,i,a,s,l,h,u,t))}if(c!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${t}, packedStart=${r}, consumedPackedEnd=${c}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${e.length})`)}(e,a,a+1|0,l,t,0|i,n/256|0,p,u,o),f}(e,t,l,s,r,o),s=s+r|0}return l}(e,o,i,n,t,a),n=n+t|0}return function(e,t,r,i,n,o){if(0===o)return;let a=0,s=t,l=t+r,u=n,c=n+o,h=0,d=0;for(;s<l&&u<c;){let t=e[s]>>>a&255;if(a+=8,s+=a>>>5,a&=31,h|=(127&t)<<d,128&t)i[u++]=0|h,h=0,d=0;else if((d+=7)>28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${h}, decoded=${u-n}/${o}, inPos=${s}, inEnd=${l})`)}if(u!==c)throw Error(`FastPFOR VByte: truncated stream (decoded=${u-n}, expected=${o}, consumedWords=${s-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`)}(e,i,e.length-i|0,o,n,t-n|0),o}(s.subarray(0,a),t,n.decoderWorkspace);return i.add(r),l}(e,r.numValues,n=r.byteLength,t,function(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);return{encodedWords:new Uint32Array(Math.max(16,0|e)),decoderWorkspace:uU()}}(n>>>2));case F.VARINT:return uH(e,t,r.numValues);case F.NONE:{let i=t.get();return t.add(r.byteLength),new Uint32Array(e.subarray(i,t.get()))}default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function u7(e,t,r){let i=u8(e,t,r);return 1===i.length?i[0]:i[1]}function u9(e,t,r){var i=u8(e,t,r);if(2===i.length){let e=uq(i[1]);return[e,e]}return[uq(i[2]),uq(i[3])]}function ce(e,t,r){var i=uW(e,t,r.numValues);if(2===i.length){let e=uZ(i[1]);return[e,e]}return[uZ(i[2]),uZ(i[3])]}
170function ct(e,t,r,i){let n;var o=uW(e,t,r.numValues);switch(r.logicalLevelTechnique1){case B.DELTA:n=function(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,uZ(e[0]));for(let r=1;r<e.length;r++)t[r]=BigInt.asUintN(64,t[r-1]+uZ(e[r]));return t}(r.logicalLevelTechnique2===B.RLE?uX(o,r.runs,r.numRleValues):o);break;case B.RLE:n=uX(o,r.runs,r.numRleValues);break;case B.NONE:n=o;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return i?u3(n,i,0n):n}function cr(e,t,r){let i=uW(e,t,r.numValues);return 1===i.length?i[0]:i[1]}function ci(e,t,r,i,n="int32"){let o=e.logicalLevelTechnique1;if(o===B.RLE)return 1===e.runs?V.CONST:V.FLAT;if(o!==B.DELTA||e.logicalLevelTechnique2!==B.RLE)return 1===e.numValues?V.CONST:V.FLAT;let a=t instanceof u2?t.size():t;if(e.numRleValues!==a)return V.FLAT;if(1===e.runs)return V.SEQUENCE;if(2!==e.runs)return 1===e.numValues?V.CONST:V.FLAT;let s=i.get();if(e.physicalLevelTechnique===F.VARINT)return!function(e,t,r){let i=new uz(t.get());if("int64"===r){let t=uW(e,i,4);return 2n===t[2]&&2n===t[3]}let n=uH(e,i,4);return 2===n[2]&&2===n[3]}(r,i,n)?1===e.numValues?V.CONST:V.FLAT:V.SEQUENCE;let l=i.get(),u=new Int32Array(r.buffer,r.byteOffset+l,4);return i.set(s),2===u[2]&&2===u[3]?V.SEQUENCE:1===e.numValues?V.CONST:V.FLAT}class cn extends uO{getValueFromBuffer(e){return this.dataBuffer[e]}}
170class co extends uL{constructor(e,t,r,i){super(e,BigInt64Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+BigInt(e)*this.delta}}function ca(e,t,r){return{x:cs(e,t)-r,y:cs(e>>1,t)-r}}function cs(e,t){let r=0;for(let i=0;i<t;i++)r|=(e&1<<2*i)>>i;return r}function cl(e,t,r,i,n,o,a){return e===W.MORTON?function(e,t,r,i,n,o){let a=Array(n?i+1:i);for(let n=0;n<i;n++){let i=ca(e[t[r+n]],o.numBits,o.coordinateShift);a[n]=new x(i.x,i.y)}return n&&(a[a.length-1]=a[0]),a}(t,r,i,n,o,a):function(e,t,r,i,n){let o=Array(n?i+1:i);for(let n=0;n<2*i;n+=2){let i=2*t[r+n/2];o[n/2]=new x(e[i],e[i+1])}return n&&(o[o.length-1]=o[0]),o}(t,r,i,n,o)}function cu(e,t,r,i){let n=Array(i?r+1:r);for(let i=0;i<2*r;i+=2)n[i/2]=new x(e[t+i],e[t+i+1]);return i&&(n[n.length-1]=n[0]),n}(k=U||(U={}))[k.POINT=0]="POINT",k[k.LINESTRING=1]="LINESTRING",k[k.POLYGON=2]="POLYGON",k[k.MULTIPOINT=3]="MULTIPOINT",k[k.MULTILINESTRING=4]="MULTILINESTRING",k[k.MULTIPOLYGON=5]="MULTIPOLYGON",(O=H||(H={}))[O.POINT=0]="POINT",O[O.LINESTRING=1]="LINESTRING",O[O.POLYGON=2]="POLYGON",(D=W||(W={}))[D.MORTON=0]="MORTON",D[D.VEC_2=1]="VEC_2",D[D.VEC_3=2]="VEC_3";class cc{constructor(e,t,r,i,n){this._vertexBufferType=e,this._topologyVector=t,this._vertexOffsets=r,this._vertexBuffer=i,this._mortonSettings=n}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(e){let t=this.vertexOffsets?2*this.vertexOffsets[e]:2*e;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getVertex(e){if(this.vertexOffsets&&this.mortonSettings){let t=ca(this.vertexBuffer[this.vertexOffsets[e]],this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[t.x,t.y]}let t=this.vertexOffsets?2*this.vertexOffsets[e]:2*e;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getGeometries(){return function(e){let t=Array(e.numGeometries),r=1,i=1,n=1,o=0,a=0,s=0,l=e.mortonSettings,u=e.topologyVector,c=u.geometryOffsets,h=u.partOffsets,d=u.ringOffsets,p=e.vertexOffsets,f=!p||0===p.length,m=e.containsPolygonGeometry(),g=e.vertexBuffer;for(let u=0;u<e.numGeometries;u++)switch(e.geometryType(u)){case U.POINT:{let u,m;if(f)u=g[a++],m=g[a++];else if(e.vertexBufferType===W.MORTON){let e=ca(g[p[s++]],l.numBits,l.coordinateShift);u=e.x,m=e.y}else{let e=2*p[s++];u=g[e],m=g[e+1]}t[o++]=[[new x(u,m)]],c&&n++,h&&r++,d&&i++}break;case U.MULTIPOINT:{let e=c[n]-c[n-1];n++;let l=Array(e);if(f)for(let t=0;t<e;t++){let e=g[a++],r=g[a++];l[t]=new x(e,r)}else for(let t=0;t<e;t++){let e=2*p[s++];l[t]=new x(g[e],g[e+1])}t[o++]=l.map(e=>[e]),r+=e,i+=e}break;case U.LINESTRING:{let u,y;m?(u=d[i]-d[i-1],i++):u=h[r]-h[r-1],r++,f?(y=cu(g,a,u,!1),a+=2*u):(y=cl(e.vertexBufferType,g,p,s,u,!1,l),s+=u),t[o++]=[y],c&&n++}break;case U.POLYGON:{let u=h[r]-h[r-1];r++;let m=Array(u-1),y,v=d[i]-d[i-1];if(i++,f){y=cu(g,a,v,!0),a+=2*v;for(let e=0;e<m.length;e++)v=d[i]-d[i-1],i++,m[e]=cu(g,a,v,!0),a+=2*v}else{y=cl(e.vertexBufferType,g,p,s,v,!0,l),s+=v;for(let t=0;t<m.length;t++)v=d[i]-d[i-1],i++,m[t]=cl(e.vertexBufferType,g,p,s,v,!0,l),s+=v}t[o++]=[y].concat(m),c&&n++}break;case U.MULTILINESTRING:{let u=c[n]-c[n-1];n++;let y=Array(u);for(let t=0;t<u;t++){let n;if(m?(n=d[i]-d[i-1],i++):n=h[r]-h[r-1],r++,f)y[t]=cu(g,a,n,!1),a+=2*n;else{let r=cl(e.vertexBufferType,g,p,s,n,!1,l);y[t]=r,s+=n}}t[o++]=y}break;case U.MULTIPOLYGON:{let u=c[n]-c[n-1];n++;let m=Array(u);for(let t=0;t<u;t++){let n,o=h[r]-h[r-1];r++;let u=Array(o-1),c=d[i]-d[i-1];i++,f?(n=cu(g,a,c,!0),a+=2*c):(n=cl(e.vertexBufferType,g,p,s,c,!0,l),s+=c);for(let t=0;t<u.length;t++){let r=d[i]-d[i-1];i++,f?(u[t]=cu(g,a,r,!0),a+=2*r):(u[t]=cl(e.vertexBufferType,g,p,s,r,!0,l),s+=r)}m[t]=[n].concat(u)}t[o++]=m.flat()}break;default:throw Error("The specified geometry type is currently not supported.")}return t}(this)}get mortonSettings(){return this._mortonSettings}}class ch extends cc{constructor(e,t,r,i,n,o,a){super(r,i,n,o,a),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===U.POLYGON||this._geometryType===U.MULTIPOLYGON}containsSingleGeometryType(){return!0}}class cd extends cc{constructor(e,t,r,i,n,o){super(e,r,i,n,o),this._geometryTypes=t}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let e=0;e<this.numGeometries;e++)if(this.geometryType(e)===U.POLYGON||this.geometryType(e)===U.MULTIPOLYGON)return!0;return!1}containsSingleGeometryType(){return!1}}
170class cp{constructor(e,t,r,i){this._triangleOffsets=e,this._indexBuffer=t,this._vertexBuffer=r,this._topologyVector=i}get triangleOffsets(){return this._triangleOffsets}get indexBuffer(){return this._indexBuffer}get vertexBuffer(){return this._vertexBuffer}get topologyVector(){return this._topologyVector}getGeometries(){if(!this._topologyVector)throw Error("Cannot convert GpuVector to coordinates without topology information");let e=Array(this.numGeometries),t=this._topologyVector,r=t.partOffsets,i=t.ringOffsets,n=t.geometryOffsets,o=0,a=1,s=1,l=1;for(let t=0;t<this.numGeometries;t++)switch(this.geometryType(t)){case U.POLYGON:{let u=r[a]-r[a-1];a++;let c=[];for(let e=0;e<u;e++){let e=i[s]-i[s-1];s++;let t=[];for(let r=0;r<e;r++){let e=this._vertexBuffer[o++],r=this._vertexBuffer[o++];t.push(new x(e,r))}t.length>0&&t.push(t[0]),c.push(t)}e[t]=c,n&&l++}break;case U.MULTIPOLYGON:{let u=n[l]-n[l-1];l++;let c=[];for(let e=0;e<u;e++){let e=r[a]-r[a-1];a++;for(let t=0;t<e;t++){let e=i[s]-i[s-1];s++;let t=[];for(let r=0;r<e;r++){let e=this._vertexBuffer[o++],r=this._vertexBuffer[o++];t.push(new x(e,r))}t.length>0&&t.push(t[0]),c.push(t)}}e[t]=c}}return e}[Symbol.iterator](){return null}}class cf extends cp{constructor(e,t,r,i,n,o){super(r,i,n,o),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}class cm extends cp{constructor(e,t,r,i,n){super(t,r,i,n),this._geometryTypes=e}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function cg(e,t,r){let i=new Uint32Array(e.length+1),n=0;i[0]=n;let o=0;for(let a=0;a<e.length;a++)n=i[a+1]=n+(e[a]>r?t[o++]:1);return i}function cy(e,t,r,i){let n=new Uint32Array(t[t.length-1]+1),o=0;n[0]=o;let a=1,s=0;for(let l=0;l<e.length;l++){let u=e[l],c=t[l+1]-t[l];if(5===u||2===u||i&&(4===u||1===u))for(let e=0;e<c;e++)o=n[a++]=o+r[s++];else for(let e=0;e<c;e++)n[a++]=++o}return n}class cv extends uk{constructor(e,t,r){super(e,t.getBuffer(),r),this.dataVector=t}getValueFromBuffer(e){return this.dataVector.get(e)}}class cb extends uO{getValueFromBuffer(e){return this.dataBuffer[e]}}
170class c_ extends uk{constructor(e,t,r,i){super(e,i?BigInt64Array.of(t):BigUint64Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}}function cx(e,t,r,i,n){let o=function(e,t,r,i){let n=new Uint8Array(t),o=0,a=i.get()+r;for(;o<t&&!(i.get()>=a);){let r=e[i.increment()];if(r<=127){let a=r+3,s=e[i.increment()],l=Math.min(o+a,t);n.fill(s,o,l),o=l}else{let a=256-r;for(let r=0;r<a&&o<t;r++)n[o++]=e[i.increment()]}}return i.set(a),n}(e,Math.ceil(t/8),r,i);return n?function(e,t,r){if(!r)return e;let i=r.size(),n=new u2(e,t),o=new u2(new Uint8Array(Math.ceil(i/8)),i),a=0;for(let e=0;e<i;e++){let t=!!r.get(e)&&n.get(a++);o.set(e,t)}return o.getBuffer()}(o,t,n):o}let cA=new TextDecoder;function cw(e,t,r){return r-t>=12?cA.decode(e.subarray(t,r)):function(e,t,r){let i="",n=t;for(;n<r;){let t=e[n],o,a,s,l=null,u=t>239?4:t>223?3:t>191?2:1;if(n+u>r)break;1===u?t<128&&(l=t):2===u?128==(192&(o=e[n+1]))&&(l=(31&t)<<6|63&o)<=127&&(l=null):3===u?(o=e[n+1],a=e[n+2],128==(192&o)&&128==(192&a)&&((l=(15&t)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===u&&(o=e[n+1],a=e[n+2],s=e[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&t)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,u=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=u}return i}(e,t,r)}
170class cS extends uk{constructor(e,t,r,i){super(e,r,i),this.offsetBuffer=t}}class cT extends cS{constructor(e,t,r,i){super(e,t,r,i??t.length-1)}getValueFromBuffer(e){return cw(this.dataBuffer,this.offsetBuffer[e],this.offsetBuffer[e+1])}}class cC extends cS{constructor(e,t,r,i,n){super(e,r,i,n??t.length),this.indexBuffer=t,this.indexBuffer=t}getValueFromBuffer(e){let t=this.indexBuffer[e];return cw(this.dataBuffer,this.offsetBuffer[t],this.offsetBuffer[t+1])}}class cE extends cS{constructor(e,t,r,i,n,o,a){super(e,r,i,a),this.indexBuffer=t,this.symbolOffsetBuffer=n,this.symbolTableBuffer=o}getValueFromBuffer(e){null==this.decodedDictionary&&(null==this.symbolLengthBuffer&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(e,t,r){let i=[],n=Array(t.length).fill(0);for(let e=1;e<t.length;e++)n[e]=n[e-1]+t[e-1];for(let o=0;o<r.length;o++)if(255===r[o])i.push(r[++o]);else{let a=t[r[o]],s=n[r[o]];for(let t=0;t<a;t++)i.push(e[s+t])}return new Uint8Array(i)}(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer));let t=this.indexBuffer[e];return cw(this.decodedDictionary,this.offsetBuffer[t],this.offsetBuffer[t+1])}offsetToLengthBuffer(e){let t=new Uint32Array(e.length-1),r=e[0];for(let i=1;i<e.length;i++){let n=e[i];t[i-1]=n-r,r=n}return t}}function cP(e){return e instanceof u2}function cI(e){switch(e){case 0:case 1:case 2:case 3:{let t={};t.nullable=!!(1&e),t.columnScope=0;let r={type:"logicalType",logicalType:0};return r.longID=!!(2&e),t.scalarType=r,t.type="scalarType",t}case 4:{let e={nullable:!1,columnScope:0};return e.type="complexType",e.complexType={type:"physicalType",physicalType:0},e}case 30:{let e={nullable:!1,columnScope:0};return e.type="complexType",e.complexType={type:"physicalType",physicalType:1},e}default:let t;switch(e){case 10:case 11:t=0;break;case 12:case 13:t=1;break;case 14:case 15:t=2;break;case 16:case 17:t=3;break;case 18:case 19:t=4;break;case 20:case 21:t=5;break;case 22:case 23:t=6;break;case 24:case 25:t=7;break;case 26:case 27:t=8;break;case 28:case 29:t=9;break;default:return null}let r={};r.nullable=!!(1&e),r.columnScope=0;let i={type:"physicalType"};return i.physicalType=t,r.type="scalarType",r.scalarType=i,r}}let cM=new TextDecoder;function ck(e,t){let r=uH(e,t,1)[0];if(0===r)return"";let i=t.get(),n=e.subarray(i,i+r);return t.add(r),cM.decode(n)}class cO{constructor(e,t){var r;switch(this._featureData=e,this.properties=this._featureData.properties||{},null==(r=this._featureData.geometry)?void 0:r.type){case U.POINT:case U.MULTIPOINT:this.type=1;break;case U.LINESTRING:case U.MULTILINESTRING:this.type=2;break;case U.POLYGON:case U.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=t,this.id=Number(this._featureData.id)}loadGeometry(){let e=[];for(let t of this._featureData.geometry.coordinates){let r=[];for(let e of t)r.push(new x(e.x,e.y));e.push(r)}return e}}class cD{constructor(e){this.features=[],this.featureTable=e,this.name=e.name,this.extent=e.extent,this.version=2,this.features=e.getFeatures(),this.length=this.features.length}feature(e){return new cO(this.features[e],this.extent)}}class cR{constructor(e){this.layers={};let t=function(e,t=!0){let r=new uz(0),i=[];for(;r.get()<e.length;){let o=uH(e,r,1)[0]>>>0,a=r.get()+o;if(a>e.length)throw Error(`Block overruns tile: ${a} > ${e.length}`);if(1!=uH(e,r,1)[0]>>>0){r.set(a);continue}let[s,l]=function(e,t){let r={featureTables:[]},i={};i.name=ck(e,t);let n=uH(e,t,1)[0]>>>0,o=uH(e,t,1)[0]>>>0;i.columns=Array(o);for(let r=0;r<o;r++)i.columns[r]=function(e,t){let r=uH(e,t,1)[0]>>>0,i=cI(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(r>=10?i.name=ck(e,t):r>=0&&r<=3?i.name="id":4===r&&(i.name="geometry"),30===r){let r=uH(e,t,1)[0]>>>0,n=i.complexType;n.children=Array(r);for(let i=0;i<r;i++)n.children[i]=function e(t,r){let i=uH(t,r,1)[0]>>>0;if(i<10||i>30)throw Error(`Unsupported field type code ${i}. Supported: 10-29(scalars), 30(STRUCT)`);let n=cI(i);if(i>=10&&(n.name=ck(t,r)),30===i){let i=uH(t,r,1)[0]>>>0;n.complexType.children=Array(i);for(let o=0;o<i;o++)n.complexType.children[o]=e(t,r)}return{name:n.name,nullable:n.nullable,scalarField:n.scalarType,complexField:n.complexType,type:"scalarType"===n.type?"scalarField":"complexField"}}(e,t)}return i}(e,t);return r.featureTables.push(i),[r,n]}(e,r),u=s.featureTables[0],c=null,h=null,d=[],p=0;for(let i of u.columns){let o=i.name;if("scalarType"===i.type&&"logicalType"===i.scalarType?.type&&0===i.scalarType.logicalType){let n=null;if(i.nullable){let t=u1(e,r),i=r.get(),o=cx(e,t.numValues,t.byteLength,r);r.set(i+t.byteLength),n=new u2(o,t.numValues)}let a=u1(e,r);p=n?n.size():a.decompressedCount,c=function(e,t,r,i,n,o,a=!1){let s=t.scalarType;if(!s||"logicalType"!==s.type||0!==s.logicalType)throw Error(`ID column must be a logical ID scalar type: ${i}`);let l=s.longID?6:4,u="number"==typeof o?void 0:o,c=ci(n,o,e,r,6===l?"int64":"int32");if(4===l)switch(c){case V.FLAT:return new uD(i,u4(e,r,n,0,u),o);case V.SEQUENCE:{let t=u9(e,r,n);return new uB(i,t[0],t[1],n.numRleValues)}case V.CONST:return new uF(i,u7(e,r,n),o,!1)}switch(c){case V.FLAT:if(a)return new uR(i,function(e,t,r){var i=function(e,t,r){let i=new Float64Array(r);for(let n=0;n<r;n++)i[n]=function(e,t){let r,i;return i=e[t.get()],t.increment(),r=127&i,i<128?r:(i=e[t.get()],t.increment(),r|=(127&i)<<7,i<128?r:(i=e[t.get()],t.increment(),r|=(127&i)<<14,i<128?r:(i=e[t.get()],t.increment(),r|=(127&i)<<21,i<128?r:function(e,t,r){let i,n;if(n=t[r.get()],r.increment(),i=(112&n)>>4,n<128||(n=t[r.get()],r.increment(),i|=(127&n)<<3,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<10,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<17,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<24,n<128)||(n=t[r.get()],r.increment(),i|=(1&n)<<31,n<128))return 0x100000000*i+(e>>>0);throw Error("Expected varint not more than 10 bytes")}(r|=(15&(i=e[t.get()]))<<28,e,t))))}(e,t);return i}(e,t,r.numValues);switch(r.logicalLevelTechnique1){case B.DELTA:return r.logicalLevelTechnique2===B.RLE&&(i=uY(i,r.runs,r.numRleValues)),function(e){e[0]=u$(e[0]);let t=e.length/4*4,r=1;if(t>=4)for(;r<t-4;r+=4){let t=e[r+1],i=e[r+2],n=e[r+3];e[r]=u$(e[r])+e[r-1],e[r+1]=u$(t)+e[r],e[r+2]=u$(i)+e[r+1],e[r+3]=u$(n)+e[r+2]}for(;r!==e.length;++r)e[r]=u$(e[r])+e[r-1]}(i),i;case B.RLE:return uY(i,r.runs,r.numRleValues);case B.NONE:return i;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}}(e,r,n),o);return new cn(i,ct(e,r,n,u),o);case V.SEQUENCE:{let t=ce(e,r,n);return new co(i,t[0],t[1],n.numRleValues)}case V.CONST:return new c_(i,cr(e,r,n),o,!1)}throw Error("Vector type not supported for id column.")}(e,i,r,o,a,n??p,t)}else{var n;if("complexType"===i.type&&"physicalType"===i.complexType?.type&&0===i.complexType.physicalType){let t=uH(e,r,1)[0];if(0===p){let t=r.get();p=u1(e,r).decompressedCount,r.set(t)}h=function(e,t,r,i){var n,o,a,s,l,u,c,h,d,p,f,m,g,y;let v,b,_,x,A,w,S,T,C,E,P,I=u1(e,r);if(ci(I,i,e,r)===V.CONST){let h,d,p,f,m=u7(e,r,I);for(let i=0;i<t-1;i++){let t=u1(e,r);switch(t.physicalStreamType){case j.LENGTH:switch(t.logicalStreamType.lengthType){case G.GEOMETRIES:h=u6(e,r,t);break;case G.PARTS:d=u6(e,r,t);break;case G.RINGS:p=u6(e,r,t);break;case G.TRIANGLES:f=u6(e,r,t)}break;case j.OFFSET:switch(t.logicalStreamType.offsetType){case N.VERTEX:v=u4(e,r,t);break;case N.INDEX:x=u4(e,r,t)}break;case j.DATA:z.VERTEX===t.logicalStreamType.dictionaryType?b=u5(e,r,t):(_={numBits:t.numBits,coordinateShift:t.coordinateShift},b=u4(e,r,t))}}return x?void 0!==h||void 0!==d?new cf(i,m,f,x,b,{geometryOffsets:h,partOffsets:d,ringOffsets:p}):new cf(i,m,f,x,b,void 0):void 0===_?(n={geometryOffsets:h,partOffsets:d,ringOffsets:p},o=v,a=b,new ch(i,m,W.VEC_2,n,o,a)):(s={geometryOffsets:h,partOffsets:d,ringOffsets:p},l=v,u=b,c=_,new ch(i,m,W.MORTON,s,l,u,c))}let M=u4(e,r,I);for(let i=0;i<t-1;i++){let t=u1(e,r);switch(t.physicalStreamType){case j.LENGTH:switch(t.logicalStreamType.lengthType){case G.GEOMETRIES:A=u4(e,r,t);break;case G.PARTS:w=u4(e,r,t);break;case G.RINGS:S=u4(e,r,t);break;case G.TRIANGLES:T=u6(e,r,t)}break;case j.OFFSET:switch(t.logicalStreamType.offsetType){case N.VERTEX:v=u4(e,r,t);break;case N.INDEX:x=u4(e,r,t)}break;case j.DATA:z.VERTEX===t.logicalStreamType.dictionaryType?b=u5(e,r,t):(_={numBits:t.numBits,coordinateShift:t.coordinateShift},b=u4(e,r,t))}}return A?(C=cg(M,A,2),w&&S?(E=cy(M,C,w,!1),P=function(e,t,r,i){let n=new Uint32Array(r[r.length-1]+1),o=0;n[0]=o;let a=1,s=1,l=0;for(let u=0;u<e.length;u++){let c=e[u],h=t[u+1]-t[u];
170if(0!==c&&3!==c)for(let e=0;e<h;e++){let e=r[a]-r[a-1];a++;for(let t=0;t<e;t++)o=n[s++]=o+i[l++]}else for(let e=0;e<h;e++)n[s++]=++o,a++}return n}(M,C,E,S)):w&&(E=function(e,t,r){let i=new Uint32Array(t[t.length-1]+1),n=0;i[0]=n;let o=1,a=0;for(let s=0;s<e.length;s++){let l=e[s],u=t[s+1]-t[s];if(4===l||1===l)for(let e=0;e<u;e++)n=i[o++]=n+r[a++];else for(let e=0;e<u;e++)i[o++]=++n}return i}(M,C,w))):w&&S?(E=cg(M,w,1),P=cy(M,E,S,!0)):w&&(E=cg(M,w,0)),x&&!E?new cm(M,T,x,b,void 0):x?new cm(M,T,x,b,{geometryOffsets:C,partOffsets:E,ringOffsets:P}):void 0===_?(h={geometryOffsets:C,partOffsets:E,ringOffsets:P},d=v,p=b,new cd(W.VEC_2,M,h,d,p)):(f={geometryOffsets:C,partOffsets:E,ringOffsets:P},m=v,g=b,y=_,new cd(W.MORTON,M,f,m,g,y))}(e,t,r,p)}else{let t=!function(e){if("scalarType"===e.type){let t=e.scalarType;if("physicalType"===t.type)switch(t.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if("logicalType"===t.type)return!1}else if("complexType"===e.type){let t=e.complexType;if("physicalType"===t.type)switch(t.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",e),!1}(i)?1:uH(e,r,1)[0];if(0===t)continue;let o=(n=p,"scalarType"===i.type?function(e,t,r,i,n,o){var a,s;let l=null;if(0===e)return null;if(o.nullable){let e=u1(t,r),i=e.numValues,n=r.get(),o=cx(t,i,e.byteLength,r);r.set(n+e.byteLength),l=new u2(o,e.numValues)}let u=l??i;switch(n.physicalType){case 4:case 3:return function(e,t,r,i,n){let o,a=u1(e,t),s=ci(a,n,e,t),l=3===i.physicalType;if(s===V.FLAT){let i=cP(n)?n:void 0,o=l?u5(e,t,a,0,i):u4(e,t,a,0,i);return new uD(r.name,o,n)}if(s===V.SEQUENCE){let i=u9(e,t,a);return new uB(r.name,i[0],i[1],a.numRleValues)}let u=l?1===(o=u8(e,t,a)).length?uq(o[0]):uq(o[1]):u7(e,t,a);return new uF(r.name,u,n,l)}(t,r,o,n,u);case 9:return function(e,t,r,i,n){var o,a,s,l,u,c,h,d,p,f;let m=null,g=null,y=null,v=null,b=null,_=n??null,x=null,A=null;for(let e=0;e<i;e++){let e=u1(t,r);switch(e.physicalStreamType){case j.PRESENT:{let i=new u2(cx(t,e.numValues,e.byteLength,r),e.numValues);_=n??i;break}case j.OFFSET:g=u4(t,r,e,0,_);break;case j.LENGTH:{let i=u6(t,r,e);G.DICTIONARY===e.logicalStreamType.lengthType?m=i:G.SYMBOL===e.logicalStreamType.lengthType?v=i:x=i;break}case j.DATA:{let i=t.subarray(r.get(),r.get()+e.byteLength);r.add(e.byteLength);let n=e.logicalStreamType.dictionaryType;z.FSST===n?b=i:z.SINGLE===n||z.SHARED===n?y=i:z.NONE===n&&(A=i)}}}return o=b,a=g,s=m,l=y,u=v,c=_,(o?new cE(e,a,s,l,u,o,c):null)??(h=y,d=g,p=m,f=_,h?f?new cC(e,d,p,h,f):new cC(e,d,p,h):null)??function(e,t,r,i,n){if(!t||!r)return null;if(i)return n?new cC(e,i,t,r,n):new cC(e,i,t,r);if(n&&n.size()!==t.length-1){let i=new Uint32Array(n.size()),o=0;for(let e=0;e<n.size();e++)i[e]=n.get(e)?o++:0;return new cC(e,i,t,r,n)}return n?new cT(e,t,r,n):new cT(e,t,r)}(e,x,A,g,_)}(o.name,t,r,o.nullable?e-1:e,l);case 0:let c,h,d,p,f,m;
170return h=(c=u1(t,r)).numValues,d=r.get(),p=cP(u)?u:void 0,f=cx(t,h,c.byteLength,r,p),r.set(d+c.byteLength),m=new u2(f,h),new cv(o.name,m,u);case 6:case 5:return function(e,t,r,i,n){let o,a=u1(e,t),s=ci(a,i,e,t,"int64"),l=5===n.physicalType;if(s===V.FLAT){let n=cP(i)?i:void 0,o=l?function(e,t,r,i){let n;var o=uW(e,t,r.numValues);switch(r.logicalLevelTechnique1){case B.DELTA:if(r.logicalLevelTechnique2===B.RLE){if(!i)return function(e,t,r){let i=new BigInt64Array(r),n=0,o=0n;for(let r=0;r<t;r++){let a=Number(e[r]),s=uZ(e[r+t]);for(let e=0;e<a;e++)o+=s,i[n++]=o}return i}(o,r.runs,r.numRleValues);n=uJ(o=uX(o,r.runs,r.numRleValues))}else n=uJ(o);break;case B.RLE:n=function(e,t,r){if(void 0===r){r=0;for(let i=0;i<t;i++)r+=Number(e[i])}let i=new BigInt64Array(r),n=0;for(let r=0;r<t;r++){let o=Number(e[r]),a=e[r+t];a=uZ(a),i.fill(a,n,n+o),n+=o}return i}(o,r.runs,r.numRleValues);break;case B.NONE:n=function(e){let t=new BigInt64Array(e.length);for(let r=0;r<e.length;r++)t[r]=uZ(e[r]);return t}(o);break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return i?u3(n,i,0n):n}(e,t,a,n):ct(e,t,a,n);return new cn(r.name,o,i)}if(s===V.SEQUENCE){let i=ce(e,t,a);return new co(r.name,i[0],i[1],a.numRleValues)}let u=l?1===(o=uW(e,t,a.numValues)).length?uZ(o[0]):uZ(o[1]):cr(e,t,a);return new c_(r.name,u,i,l)}(t,r,o,u,n);case 7:let g,y,v,b,_,x;return b=u1(t,r),_=cP(u)?u:void 0,a=b.numValues,y=(g=r.get())+a*Float32Array.BYTES_PER_ELEMENT,v=new Float32Array(new Uint8Array(t.subarray(g,y)).buffer),r.set(y),x=_?u3(v,_,0):v,new cb(o.name,x,u);case 8:let A,w,S,T,C,E;return T=u1(t,r),C=cP(u)?u:void 0,s=T.numValues,w=(A=r.get())+s*Float64Array.BYTES_PER_ELEMENT,S=new Float64Array(new Uint8Array(t.subarray(A,w)).buffer),r.set(w),E=C?u3(S,C,0):S,new uR(o.name,E,u);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}(t,e,r,n,i.scalarType,i):0===t?null:function(e,t,r,i){let n=null,o=null,a=null,s=null,l=!1;for(;!l;){let r=u1(e,t);switch(r.physicalStreamType){case j.LENGTH:G.DICTIONARY===r.logicalStreamType.lengthType?n=u6(e,t,r):a=u6(e,t,r);break;case j.DATA:z.SINGLE===r.logicalStreamType.dictionaryType||z.SHARED===r.logicalStreamType.dictionaryType?(o=e.subarray(t.get(),t.get()+r.byteLength),l=!0):s=e.subarray(t.get(),t.get()+r.byteLength),t.add(r.byteLength)}}let u=r.complexType.children,c=[],h=0;for(let l of u){let u=uH(e,t,1)[0];if(0===u)continue;let d=l.name?`${r.name}${l.name}`:r.name;if(2!==u||"scalarField"!==l.type||9!==l.scalarField.physicalType)throw Error("Currently only optional string fields are implemented for a struct.");let p=u1(e,t),f=cx(e,p.numValues,p.byteLength,t),m=u1(e,t),g=u4(e,t,m,0,m.decompressedCount!==i?new u2(f,p.numValues):void 0);c[h++]=s?new cE(d,g,n,o,a,s,new u2(f,p.numValues)):new cC(d,g,n,o,new u2(f,p.numValues))}return c}(e,r,i,n));if(o)if(Array.isArray(o))for(let e of o)d.push(e);else d.push(o)}}}let f=new uj(u.name,h,c,d,l);i.push(f),r.set(a)}return i}(new Uint8Array(e));this.layers=t.reduce((e,t)=>Object.assign(Object.assign({},e),{[t.name]:new cD(t)}),{})}}class cL{constructor(e,t){this.feature=e,this.type=e.type,this.properties=e.tags?e.tags:{},this.extent=t,"id"in e&&("string"==typeof e.id?this.id=parseInt(e.id,10):"number"!=typeof e.id||isNaN(e.id)||(this.id=e.id))}loadGeometry(){let e=[];for(let t of 1===this.feature.type?[this.feature.geometry]:this.feature.geometry){let r=[];for(let e of t)r.push(new x(e[0],e[1]));e.push(r)}return e}}let cB="_geojsonTileLayer";function cF(e,t){if(!e.feature)return;let r=e.feature;void 0!==r.id&&t.writeVarintField(1,r.id),t.writeMessage(2,cj,e),t.writeVarintField(3,r.type),t.writeMessage(4,cz,r)}function cj(e,t){for(let r in e.feature?.properties){let i=e.feature.properties[r],n=e.keycache[r];if(null==i)continue;void 0===n&&(e.keys.push(r),n=e.keys.length-1,e.keycache[r]=n),t.writeVarint(n),"string"!=typeof i&&"boolean"!=typeof i&&"number"!=typeof i&&(i=e.jsonPrefix+JSON.stringify(i));let o=typeof i+":"+i,a=e.valuecache[o];void 0===a&&(e.values.push(i),a=e.values.length-1,e.valuecache[o]=a),t.writeVarint(a)}}function cz(e,t){let r=e.loadGeometry(),i=e.type,n=0,o=0;for(let a of r){let r=1;1===i&&(r=a.length),t.writeVarint((r<<3)+1);let s=3===i?a.length-1:a.length;for(let e=0;e<s;e++){1===e&&1!==i&&t.writeVarint((s-1<<3)+2);let r=a[e].x-n,l=a[e].y-o;t.writeVarint(r<<1^r>>31),t.writeVarint(l<<1^l>>31),n+=r,o+=l}3===e.type&&t.writeVarint(15)}}function cN(e,t){let r=typeof e;"string"===r?t.writeStringField(1,e):"boolean"===r?t.writeBooleanField(7,e):"number"===r&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}class cG{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new nx(8192,16,0),this.grid3D=new nx(8192,16,0),this.featureIndexArray=new oF,this.promoteId=t}insert(e,t,r,i,n,o){let a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let s=o?this.grid3D:this.grid;for(let e of t){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)t[0]=Math.min(t[0],r.x),t[1]=Math.min(t[1],r.y),t[2]=Math.max(t[2],r.x),t[3]=Math.max(t[3],r.y);t[0]<8192&&t[1]<8192&&t[2]>=0&&t[3]>=0&&s.insert(a,t[0],t[1],t[2],t[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers="mlt"!==this.encoding?new sD(new lN(this.rawTileData)).layers:new cR(this.rawTileData).layers,this.sourceLayerCoder=new uI(this.vtLayers?Object.keys(this.vtLayers).sort():[cB])),this.vtLayers}query(e,t,r,i){let n;this.loadVTLayers();let o=e.params,a=8192/e.tileSize/e.scale,s=iG(o.filter,o.globalState),l=e.queryGeometry,u=e.queryPadding*a,c=uP.fromPoints(l),h=this.grid.query(c.minX-u,c.minY-u,c.maxX+u,c.maxY+u),d=uP.fromPoints(e.cameraQueryGeometry).expandBy(u);for(let t of this.grid3D.query(d.minX,d.minY,d.maxX,d.maxY,(t,r,i,n)=>(function(e,t,r,i,n){for(let o of e)if(t<=o.x&&r<=o.y&&i>=o.x&&n>=o.y)return!0;let o=[new x(t,r),new x(t,n),new x(i,n),new x(i,r)];if(e.length>2){for(let t of o)if(aM(e,t))return!0}for(let t=0;t<e.length-1;t++)if(function(e,t,r){let i=r[0],n=r[2];if(e.x<i.x&&t.x<i.x||e.x>n.x&&t.x>n.x||e.y<i.y&&t.y<i.y||e.y>n.y&&t.y>n.y)return!1;let o=eC(e,t,r[0]);return o!==eC(e,t,r[1])||o!==eC(e,t,r[2])||o!==eC(e,t,r[3])}(e[t],e[t+1],o))return!0;return!1})(e.cameraQueryGeometry,t-u,r-u,i+u,n+u)))h.push(t);h.sort(cU);let p={};for(let u of h){if(u===n)continue;n=u;let c=this.featureIndexArray.get(u),h=null;
170this.loadMatchingFeature(p,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,s,o.layers,o.availableImages,t,r,i,(t,r,i)=>(h||(h=a_(t)),r.queryIntersectsFeature({queryGeometry:l,feature:t,featureState:i,geometry:h,zoom:this.z,transform:e.transform,pixelsToTileUnits:a,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return p}loadMatchingFeature(e,t,r,i,n,o,a,s,l,u,c){let h=this.bucketLayerIDs[t];if(o&&!h.some(e=>o.has(e)))return;let d=this.sourceLayerCoder.decode(r),p=this.vtLayers[d].feature(i);if(n.needGeometry){let e=ax(p,!0);if(!n.filter(new nz(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!n.filter(new nz(this.tileID.overscaledZ),p))return;let f=this.getId(p,d);for(let t of h){if(o&&!o.has(t))continue;let r=s[t];if(!r)continue;let n={};f&&u&&(n=u.getState(r.sourceLayer||cB,f));let h=eb({},l[t]);h.paint=cV(h.paint,r.paint,p,n,a),h.layout=cV(h.layout,r.layout,p,n,a);let d=!c||c(p,r,n);if(!d)continue;let m=new uM(p,this.z,this.x,this.y,f);m.layer=h;let g=e[t];void 0===g&&(g=e[t]=[]),g.push({featureIndex:i,feature:m,intersectionZ:d})}}lookupSymbolFeatures(e,t,r,i,n,o,a,s){let l={};this.loadVTLayers();let u=iG(n.filterSpec,n.globalState);for(let n of e)this.loadMatchingFeature(l,r,i,n,u,o,a,s,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){var r;let i=e.id;return this.promoteId&&("boolean"==typeof(i=e.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[t]]
170)&&(i=Number(i)),void 0===i&&(null==(r=e.properties)?void 0:r.cluster)&&this.promoteId&&(i=Number(e.properties.cluster_id))),i}}function cV(e,t,r,i,n){return ex(e,(e,o)=>{let a=t instanceof nK?t.get(o):null;return(null==a?void 0:a.evaluate)?a.evaluate(r,i,n):a})}function cU(e,t){return t-e}function cH(e,t,r,i,n){let o=[];for(let a of e){let e;for(let s=0;s<a.length-1;s++){let l=a[s],u=a[s+1];l.x<t&&u.x<t||(l.x<t?l=new x(t,l.y+(t-l.x)/(u.x-l.x)*(u.y-l.y))._round():u.x<t&&(u=new x(t,l.y+(t-l.x)/(u.x-l.x)*(u.y-l.y))._round()),l.y<r&&u.y<r||(l.y<r?l=new x(l.x+(r-l.y)/(u.y-l.y)*(u.x-l.x),r)._round():u.y<r&&(u=new x(l.x+(r-l.y)/(u.y-l.y)*(u.x-l.x),r)._round()),l.x>=i&&u.x>=i||(l.x>=i?l=new x(i,l.y+(i-l.x)/(u.x-l.x)*(u.y-l.y))._round():u.x>=i&&(u=new x(i,l.y+(i-l.x)/(u.x-l.x)*(u.y-l.y))._round()),l.y>=n&&u.y>=n||(l.y>=n?l=new x(l.x+(n-l.y)/(u.y-l.y)*(u.x-l.x),n)._round():u.y>=n&&(u=new x(l.x+(n-l.y)/(u.y-l.y)*(u.x-l.x),n)._round()),e&&l.equals(e[e.length-1])||(e=[l],o.push(e)),e.push(u)))))}}return o}function cW(e,t,r,i,n){switch(t){case 1:let o=[];for(let t of e)for(let e of t){let t=0===n?e.x:e.y;t>=r&&t<=i&&o.push([e])}return o;case 2:return cq(e,r,i,n,!1);case 3:return cq(e,r,i,n,!0)}return[]}function cq(e,t,r,i,n){let o=[];for(let a of e){let e=function(e,t,r,i,n){let o=0===i?cZ:c$,a=[],s=[];for(let l=0;l<e.length-1;l++){let u=e[l],c=e[l+1],h=0===i?u.x:u.y,d=0===i?c.x:c.y,p=!1;h<t?d>t&&a.push(o(u,c,t)):h>r?d<r&&a.push(o(u,c,r)):a.push(u),d<t&&h>=t&&(a.push(o(u,c,t)),p=!0),d>r&&h<=r&&(a.push(o(u,c,r)),p=!0),!n&&p&&(s.push(a),a=[])}let l=e.length-1,u=0===i?e[l].x:e[l].y;return u>=t&&u<=r&&a.push(e[l]),n&&a.length>0&&!a[0].equals(a[a.length-1])&&a.push(new x(a[0].x,a[0].y)),a.length>0&&s.push(a),s}(a,t,r,i,n);e.length>0&&o.push(...e)}return o}function cZ(e,t,r){return new x(r,e.y+(r-e.x)/(t.x-e.x)*(t.y-e.y))}function c$(e,t,r){return new x(e.x+(r-e.y)/(t.y-e.y)*(t.x-e.x),r)}nw("FeatureIndex",cG,{omit:["rawTileData","sourceLayerCoder"]});
vendor: 2,534 bytes, line 170
170class cK extends x{constructor(e,t,r,i){super(e,t),this.angle=r,void 0!==i&&(this.segment=i)}clone(){return new cK(this.x,this.y,this.angle,this.segment)}}function cX(e,t,r,i,n){if(void 0===t.segment||0===r)return!0;let o=t,a=t.segment+1,s=0;for(;s>-r/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;let l=[],u=0;for(;s<r/2;){let t=e[a],r=e[a+1];if(!r)return!1;let o=e[a-1].angleTo(t)-t.angleTo(r);for(o=Math.abs((o+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:o}),u+=o;s-l[0].distance>i;)u-=l.shift().angleDelta;if(u>n)return!1;a++,s+=t.dist(r)}return!0}function cY(e){let t=0;for(let r=0;r<e.length-1;r++)t+=e[r].dist(e[r+1]);return t}function cQ(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function cJ(e,t,r,i){let n=[],o=e.image,a=o.pixelRatio,s=o.paddedRect.w-2,l=o.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},c=o.stretchX||[[0,s]],h=o.stretchY||[[0,l]],d=(e,t)=>e+t[1]-t[0],p=c.reduce(d,0),f=h.reduce(d,0),m=s-p,g=l-f,y=0,v=p,b=0,_=f,A=0,w=m,S=0,T=g;if(o.content&&i){let t=o.content,r=t[2]-t[0],i=t[3]-t[1];(o.textFitWidth||o.textFitHeight)&&(u=l6(e)),y=c0(c,0,t[0]),b=c0(h,0,t[1]),v=c0(c,t[0],t[2]),_=c0(h,t[1],t[3]),A=t[0]-y,S=t[1]-b,w=r-v,T=i-_}let C=u.x1,E=u.y1,P=u.x2-C,I=u.y2-E,M=(e,i,n,s)=>{var l,u,c,h;let d=(e.stretch-y)/v*P+C,m=(l=e.fixed-A,l-w*e.stretch/p),g=(i.stretch-b)/_*I+E,M=(u=i.fixed-S,u-T*i.stretch/f),k=(n.stretch-y)/v*P+C,O=(c=n.fixed-A,c-w*n.stretch/p),D=(s.stretch-b)/_*I+E,R=(h=s.fixed-S,h-T*s.stretch/f),L=new x(d,g),B=new x(k,g),F=new x(k,D),j=new x(d,D),z=new x(m/a,M/a),N=new x(O/a,R/a),G=t*Math.PI/180;if(G){let e=Math.sin(G),t=Math.cos(G),r=[t,-e,e,t];L._matMult(r),B._matMult(r),j._matMult(r),F._matMult(r)}let V=e.stretch+e.fixed,U=i.stretch+i.fixed;return{tl:L,tr:B,bl:j,br:F,tex:{x:o.paddedRect.x+1+V,y:o.paddedRect.y+1+U,w:n.stretch+n.fixed-V,h:s.stretch+s.fixed-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:N,minFontScaleX:w/a/P,minFontScaleY:T/a/I,isSDF:r}};if(i&&(o.stretchX||o.stretchY)){let e=c1(c,m,p),t=c1(h,g,f);for(let r=0;r<e.length-1;r++){let i=e[r],o=e[r+1];for(let e=0;e<t.length-1;e++)n.push(M(i,t[e],o,t[e+1]))}}else n.push(M({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));return n}function c0(e,t,r){let i=0;for(let n of e)i+=Math.max(t,Math.min(r,n[1]))-Math.max(t,Math.min(r,n[0]));return i}function c1(e,t,r){let i=[{fixed:-1,stretch:0}];for(let[t,r]of e){let e=i[i.length-1];i.push({fixed:t-e.stretch,stretch:e.stretch}
170),i.push({fixed:t-e.stretch,stretch:e.stretch+(r-t)})}return i.push({fixed:t+1,stretch:r}),i}nw("Anchor",cK);class c2{constructor(e,t,r,i,n,o,a,s,l,u){var c;if(this.boxStartIndex=e.length,l){let e=o.top,t=o.bottom,r=o.collisionPadding;r&&(e-=r[1],t+=r[3]);let i=t-e;i>0&&(i=Math.max(10,i),this.circleDiameter=i)}else{let l=(null==(c=o.image)?void 0:c.content)&&(o.image.textFitWidth||o.image.textFitHeight)?l6(o):{x1:o.left,y1:o.top,x2:o.right,y2:o.bottom};l.y1=l.y1*a-s[0],l.y2=l.y2*a+s[2],l.x1=l.x1*a-s[3],l.x2=l.x2*a+s[1];let h=o.collisionPadding;if(h&&(l.x1-=h[0]*a,l.y1-=h[1]*a,l.x2+=h[2]*a,l.y2+=h[3]*a),u){let e=new x(l.x1,l.y1),t=new x(l.x2,l.y1),r=new x(l.x1,l.y2),i=new x(l.x2,l.y2),n=u*Math.PI/180;e._rotate(n),t._rotate(n),r._rotate(n),i._rotate(n),l.x1=Math.min(e.x,t.x,r.x,i.x),l.x2=Math.max(e.x,t.x,r.x,i.x),l.y1=Math.min(e.y,t.y,r.y,i.y),l.y2=Math.max(e.y,t.y,r.y,i.y)}e.emplaceBack(t.x,t.y,l.x1,l.y1,l.x2,l.y2,r,i,n)}this.boxEndIndex=e.length}}class c3{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,o=t[n];if(r(i,o)>=0)break;t[e]=o,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;e<i;){let i=1+(e<<1),o=i+1;if(o<this.length&&0>r(t[o],t[i])&&(i=o),r(t[i],n)>=0)break;t[e]=t[i],e=i}t[e]=n}}function c5(e,t){return t.max-e.max}
170class c4{constructor(e,t,r,i){this.p=new x(e,t),this.h=r,this.d=function(e,t){let r=!1,i=1/0;for(let n of t)for(let t=0,o=n.length,a=o-1;t<o;a=t++){let o=n[t],s=n[a];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),i=Math.min(i,aP(e,o,s))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}}function c6(e,t){return 1/0!==t[1]?function(e,t,r){let i=0,n=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":n=r-7;break;case"bottom-right":case"bottom-left":case"bottom":n=7-r}switch(e){case"top-right":case"bottom-right":case"right":i=-t;break;case"top-left":case"bottom-left":case"left":i=t}return[i,n]}(e,t[0],t[1]):function(e,t){let r=0,i=0;t<0&&(t=0);let n=t/Math.SQRT2;switch(e){case"top-right":case"top-left":i=n-7;break;case"bottom-right":case"bottom-left":i=7-n;break;case"bottom":i=7-t;break;case"top":i=t-7}switch(e){case"top-right":case"bottom-right":r=-n;break;case"top-left":case"bottom-left":r=n;break;case"left":r=t;break;case"right":r=-t}return[r,i]}(e,t[0])}function c8(e,t,r){var i;let n=e.layout,o=null==(i=n.get("text-variable-anchor-offset"))?void 0:i.evaluate(t,{},r);if(o){let e=o.values,t=[];for(let r=0;r<e.length;r+=2){let i=t[r]=e[r],n=e[r+1].map(e=>24*e);i.startsWith("top")?n[1]-=7:i.startsWith("bottom")&&(n[1]+=7),t[r+1]=n}return new t1(t)}let a=n.get("text-variable-anchor");if(a){let i;i=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[24*n.get("text-radial-offset").evaluate(t,{},r),1/0]:n.get("text-offset").evaluate(t,{},r).map(e=>24*e);let o=[];for(let e of a)o.push(e,c6(e,i));return new t1(o)}return null}function c7(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function c9(e,t,r,i,n,o,a,s,l,u,c,h,d,p,f){let m=function(e,t,r,i,n,o,a){let s=r.layout.get("text-rotate").evaluate(n,{})*Math.PI/180,l=[];for(let r of e.positionedLines)for(let n of r.positionedGlyphs){if(!n.rect)continue;let u=n.rect||{},c=4,h=!0,d=1,p=0,f=(i||a)&&n.vertical,m=n.metrics.advance*n.scale/2;if(a&&e.verticalizable&&(p=r.lineOffset/2-(n.imageName?-(24-n.metrics.width*n.scale)/2:(n.scale-1)*24)),n.imageName){let e=o[n.imageName];h=e.sdf,c=1/(d=e.pixelRatio)}let g=i?[n.x+m,n.y]:[0,0],y=i?[0,0]:[n.x+m+t[0],n.y+t[1]-p],v=[0,0];f&&(v=y,y=[0,0]);let b=n.metrics.isDoubleResolution?2:1,_=(n.metrics.left-c)*n.scale-m+y[0],A=(-n.metrics.top-c)*n.scale+y[1],w=_+u.w/b*n.scale/d,S=A+u.h/b*n.scale/d,T=new x(_,A),C=new x(w,A),E=new x(_,S),P=new x(w,S);if(f){let e=new x(-m,m- -17),t=-Math.PI/2,r=12-m,i=new x(22-r,-(n.imageName?r:0)),o=new x(...v);T._rotateAround(t,e)._add(i)._add(o),C._rotateAround(t,e)._add(i)._add(o),E._rotateAround(t,e)._add(i)._add(o),P._rotateAround(t,e)._add(i)._add(o)}if(s){let e=Math.sin(s),t=Math.cos(s),r=[t,-e,e,t];T._matMult(r),C._matMult(r),E._matMult(r),P._matMult(r)}let I=new x(0,0),M=new x(0,0);l.push({tl:T,tr:C,bl:E,br:P,tex:u,writingMode:e.writingMode,glyphOffset:g,sectionIndex:n.sectionIndex,isSDF:h,pixelOffsetTL:I,pixelOffsetBR:M,minFontScaleX:0,minFontScaleY:0})}return l}(r,s,n,o,a,i,e.allowVerticalPlacement),g=e.textSizeData,y=null;for(let r of("source"===g.kind?(y=[128*n.layout.get("text-size").evaluate(a,{})])[0]>32640&&eT(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`):"composite"===g.kind&&((y=[128*p.compositeTextSizes[0].evaluate(a,{},f),128*p.compositeTextSizes[1].evaluate(a,{},f)])[0]>32640||y[1]>32640)&&eT(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`),e.addSymbols(e.text,m,y,s,o,a,u,t,l.lineStartIndex,l.lineLength,d,f),c))h[r]=e.text.placedSymbolArray.length-1;return 4*m.length}function he(e){for(let t in e)return e[t];return null}e.aM=void 0,(q=e.aM||(e.aM={}))[q.center=1]="center",q[q.left=2]="left",q[q.right=3]="right",q[q.top=4]="top",q[q.bottom=5]="bottom",q[q["top-left"]=6]="top-left",q[q["top-right"]=7]="top-right",q[q["bottom-left"]=8]="bottom-left",q[q["bottom-right"]=9]="bottom-right",e.$=ez,e.A=X,e.B=nG,e.C=n_,e.D=nX,e.E=eQ,e.F=nc,e.G=function([e,t,r]){return t+=90,{x:e*Math.cos(t*=Math.PI/180)*Math.sin(r*=Math.PI/180),y:e*Math.sin(t)*Math.sin(r),z:e*Math.cos(r)}
170},e.H=rb,e.I=l1,e.J=nz,e.K=ny,e.L=function(e){if(null==eP){let t=e.navigator?e.navigator.userAgent:null;eP=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return eP},e.M=eU,e.N=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new ud(()=>this.process()),this.subscription=eO(this.target,"message",e=>this.receive(e),!1),this.globalScope=eE(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,t){return new Promise((r,i)=>{let n=Math.round(1e18*Math.random()).toString(36).substring(0,10),o=t?eO(t.signal,"abort",()=>{null==o||o.unsubscribe(),delete this.resolveRejects[n];let t={id:n,type:"<cancel>",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(t)},up):null;this.resolveRejects[n]={resolve:e=>{null==o||o.unsubscribe(),r(e)},reject:e=>{null==o||o.unsubscribe(),i(e)}};let a=[],s=Object.assign(Object.assign({},e),{id:n,sourceMapId:this.mapId,origin:location.origin,data:nE(e.data,a)});this.target.postMessage(s,{transfer:a})})}receive(e){let t=e.data,r=t.id,i=["file://","resource://android","null"],n=[t.origin,location.origin],o=t.origin===location.origin,a=n.some(e=>i.includes(e));if((o||a)&&(!t.targetMapId||this.mapId===t.targetMapId)){if("<cancel>"===t.type){delete this.tasks[r];let e=this.abortControllers[r];return delete this.abortControllers[r],void(e&&e.abort())}if(eE(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){return _(this,void 0,void 0,function*(){if("<response>"===t.type){let r=this.resolveRejects[e];if(delete this.resolveRejects[e],!r)return;return void(t.error?r.reject(eh(nP(t.error))):r.resolve(nP(t.data)))}if(!this.messageHandlers[t.type])return void this.completeTask(e,Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let r=nP(t.data),i=new AbortController;this.abortControllers[e]=i;try{let n=yield this.messageHandlers[t.type](t.sourceMapId,r,i);this.completeTask(e,null,n)}catch(t){this.completeTask(e,eh(t))}})}completeTask(e,t,r){let i=[];delete this.abortControllers[e];let n={id:e,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?nE(t):null,data:nE(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.O=function(){var e=new X(16);return X!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.P=x,e.Q=function(e,t,r){var i,n,o,a,s,l,u,c,h,d,p,f,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(n=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],p=t[10],f=t[11],e[0]=i=t[0],e[1]=n,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=h,e[9]=d,e[10]=p,e[11]=f,e[12]=i*m+s*g+h*y+t[12],e[13]=n*m+l*g+d*y+t[13],e[14]=o*m+u*g+p*y+t[14],e[15]=a*m+c*g+f*y+t[15]),e},e.R=a$,e.S=function(e,t,r){var i=r[0],n=r[1],o=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.T=a2,e.U=function(e,t,r){var i=t[0],n=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],p=t[10],f=t[11],m=t[12],g=t[13],y=t[14],v=t[15],b=r[0],_=r[1],x=r[2],A=r[3];return e[0]=b*i+_*s+x*h+A*m,e[1]=b*n+_*l+x*d+A*g,e[2]=b*o+_*u+x*p+A*y,e[3]=b*a+_*c+x*f+A*v,e[4]=(b=r[4])*i+(_=r[5])*s+(x=r[6])*h+(A=r[7])*m,e[5]=b*n+_*l+x*d+A*g,e[6]=b*o+_*u+x*p+A*y,e[7]=b*a+_*c+x*f+A*v,e[8]=(b=r[8])*i+(_=r[9])*s+(x=r[10])*h+(A=r[11])*m,e[9]=b*n+_*l+x*d+A*g,e[10]=b*o+_*u+x*p+A*y,e[11]=b*a+_*c+x*f+A*v,e[12]=(b=r[12])*i+(_=r[13])*s+(x=r[14])*h+(A=r[15])*m,e[13]=b*n+_*l+x*d+A*g,e[14]=b*o+_*u+x*p+A*y,e[15]=b*a+_*c+x*f+A*v,e},e.V=function(e,t){let r={};for(let i of t)i in e&&(r[i]=e[i]);return r},e.W=uf,e.X=ev,e.Y=uv,e.Z=uy,e._=_,e.a=ej,e.a$=function(e){var t=new X(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.a0=$,e.a1=K,e.a2=ek,e.a3=uC,e.a4=ub,e.a5=u_,e.a6=8192,e.a7=uA,e.a8=uP,e.a9=25,e.aA=function(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)},e.aB=function(e){return e[0]=0,e[1]=0,e},e.aC=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},e.aD=ur,e.aE=eo,e.aF=function(e,t,r,i){let n=t.y-e.y,o=t.x-e.x,a=i.y-r.y,s=i.x-r.x,l=a*o-s*n;if(0===l)return null;let u=(s*(e.y-r.y)-a*(e.x-r.x))/l;return new x(e.x+u*o,e.y+u*n)},e.aG=cH,e.aH=aw,e.aI=function(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;
170for(let o of e)t=Math.min(t,o.x),r=Math.min(r,o.y),i=Math.max(i,o.x),n=Math.max(n,o.y);return[t,r,i,n]},e.aJ=24,e.aK=ec,e.aL=function(e,t,r,i,n=!1){if(!r[0]&&!r[1])return[0,0];let o=n?"map"===i?-e.bearingInRadians:0:"viewport"===i?e.bearingInRadians:0;if(o){let e=Math.sin(o),t=Math.cos(o);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[n?r[0]:ec(t,r[0],e.zoom),n?r[1]:ec(t,r[1],e.zoom)]},e.aN=l9,e.aO=c7,e.aP=l5,e.aQ=e=>"symbol"===e.type,e.aR=sU,e.aS=oe,e.aT=sg,e.aU=oj,e.aV=o0,e.aW=oY,e.aX=eR,e.aY=ux,e.aZ=ei,e.a_=er,e.aa=uS,e.ab=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{for(let i of(t.onloadstart=()=>{r(t)},e)){let e=window.document.createElement("source");eZ(i)||(t.crossOrigin="Anonymous"),e.src=i,t.appendChild(e)}})},e.ac=e7,e.ad=function(){return e_++},e.ae=oE,e.af=uo,e.ag=cB,e.ah=iG,e.ai=ax,e.aj=uM,e.ak=function(e){let t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,r,i,n)=>{let o=i||n;return t[r]=!o||o.toLowerCase(),""}),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.al=ey,e.am=85.051129,e.an=eD,e.ao=function(e){return Math.pow(2,e)},e.ap=Q,e.aq=function(e,t){return e/ug(t)},e.ar=function(e){return Math.log(e)/Math.LN2},e.as=function(e){var t=e[0],r=e[1];return t*t+r*r},e.at=function(e){if(!e.length)return new Set;let t=Math.max(...e.map(e=>e.canonical.z)),r=1/0,i=-1/0,n=1/0,o=-1/0,a=[];for(let s of e){let{x:e,y:l,z:u}=s.canonical,c=Math.pow(2,t-u),h=e*c,d=l*c;a.push({id:s,x:h,y:d}),h<r&&(r=h),h>i&&(i=h),d<n&&(n=d),d>o&&(o=d)}let s=new Set;for(let e of a)e.x!==r&&e.x!==i&&e.y!==n&&e.y!==o||s.add(e.id);return s},e.au=function(e,t){let r=Math.abs(2*e.wrap)-(e.wrap<0),i=Math.abs(2*t.wrap)-(t.wrap<0);return e.overscaledZ-t.overscaledZ||i-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x},e.av=class{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,r){let i=e.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);let n={value:t,timeout:void 0};if(void 0!==r&&(n.timeout=setTimeout(()=>{this.remove(e,n)},r)),this.data[i].push(n),this.order.push(i),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,i=void 0===t?0:this.data[r].indexOf(t),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let i of this.data[r])e(i.value)||t.push(i);for(let e of t)this.remove(e.value.tileID,e)}},e.aw=function(e,t){let r=0,i=0;if("constant"===e.kind)i=e.layoutSize;else if("source"!==e.kind){let{interpolationType:n,minZoom:o,maxZoom:a}=e,s=n?ey(ry.interpolationFactor(n,t,o,a),0,1):0;"camera"===e.kind?i=rb.number(e.minSize,e.maxSize,s):r=s}return{uSizeT:r,uSize:i}},e.ay=function(e,{uSize:t,uSizeT:r},{lowerSize:i,upperSize:n}){return"source"===e.kind?i/128:"composite"===e.kind?rb.number(i/128,n/128,r):t},e.az=el,e.b=eI,e.b$=as,e.b0=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},e.b1=function(e,t){var r=t[0],i=t[1],n=t[2],o=r*r+i*i+n*n;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e},e.b2=en,e.b3=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.b4=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},e.b5=ee,e.b6=function(e,t,r){let i=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return 0===i?null:(-(e[0]*r[0]+e[1]*r[1]+e[2]*r[2])-r[3])/i},e.b7=ee,e.b8=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},e.b9=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]},e.bA=es,e.bB=function(e,t,r){var i=r[0],n=r[1],o=r[2],a=r[3],s=t[0],l=t[1],u=t[2],c=n*u-o*l,h=o*s-i*u,d=i*l-n*s;return e[0]=s+a*(c+=c)+n*(d+=d)-o*(h+=h),e[1]=l+a*h+o*c-i*d,e[2]=u+a*d+i*h-n*c,e},e.bC=function(e,t,r){var i,n,o,a,s,l,u;let c=(i=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]])[0]*((u=i[8])*(o=i[4])-(a=i[5])*(l
170=i[7]))+i[1]*(-u*(n=i[3])+a*(s=i[6]))+i[2]*(l*n-o*s);if(0===c)return null;let h=en([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),d=en([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),p=en([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),f=ei([],h,-e[3]);return er(f,f,ei([],d,-t[3])),er(f,f,ei([],p,-r[3])),ei(f,f,1/c),f},e.bD=6371008.8,e.bE=function(){return new Float64Array(4)},e.bF=function(e,t,r,i){var n=[],o=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],o[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),o[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),o[2]=n[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},e.bG=function(e,t,r,i){var n=[],o=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],o[0]=n[0],o[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),o[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},e.bH=function(e,t,r,i){var n=[],o=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],o[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),o[1]=n[1],o[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},e.bI=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),o=t[0],a=t[1],s=t[2],l=t[3],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*n-u*i,e[1]=a*n-c*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=o*i+u*n,e[9]=a*i+c*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e},e.bJ=function(e,t){let r=ed(e,360),i=ed(t,360),n=i-r,o=i>r?n-360:n+360;return Math.abs(n)<Math.abs(o)?n:o},e.bK=function(e){return e[0]=0,e[1]=0,e[2]=0,e},e.bL=function(e,t,r,i){let n=Math.sqrt(e*e+t*t),o=Math.sqrt(r*r+i*i);e/=n,t/=n;let a=Math.acos(e*(r/=o)+t*(i/=o));return-t*r+e*i>0?a:-a},e.bM=function(e,t){let r=ed(e,2*Math.PI),i=ed(t,2*Math.PI);return Math.min(Math.abs(r-i),Math.abs(r-i+2*Math.PI),Math.abs(r-i-2*Math.PI))},e.bN=function(){let e={},t=eJ.$version;for(let r in eJ.$root){let i=eJ.$root[r];if(i.required){let n=null;null!=(n="version"===r?t:"array"===i.type?[]:{})&&(e[r]=n)}}return e},e.bO=eW,e.bP=nI,e.bQ=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let i=0;i<t.length;i++)if(!e(t[i],r[i]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==r){if("object"!=typeof r||Object.keys(t).length!==Object.keys(r).length)return!1;for(let i in t)if(!e(t[i],r[i]))return!1;return!0}return t===r},e.bR=eN,e.bS=function(e){e=e.slice();let t=Object.create(null);for(let r=0;r<e.length;r++)t[e[r].id]=e[r];for(let r=0;r<e.length;r++)"ref"in e[r]&&(e[r]=function(e,t){let r={};for(let t in e)"ref"!==t&&(r[t]=e[t]);return e0.forEach(e=>{e in t&&(r[e]=t[e])}),r}(e[r],t[e[r].ref]));return e},e.bT=function(e,t){if("custom"===e.type)return new uh(e,t);switch(e.type){case"background":return new uc(e,t);case"circle":return new aG(e,t);case"color-relief":return new a4(e,t);case"fill":return new sS(e,t);case"fill-extrusion":return new sz(e,t);case"heatmap":return new aQ(e,t);case"hillshade":return new a0(e,t);case"line":return new lT(e,t);case"raster":return new n6(e,t);case"symbol":return new ul(e,t)}},e.bU=e=>"raster"===e.type,e.bV=ew,e.bW=function(e,t){if(!e)return[{command:"setStyle",args:[t]}];let r=[];try{if(!e1(e.version,t.version))return[{command:"setStyle",args:[t]}];e1(e.center,t.center)||r.push({command:"setCenter",args:[t.center]}),e1(e.state,t.state)||r.push({command:"setGlobalState",args:[t.state]}),e1(e.centerAltitude,t.centerAltitude)||r.push({command:"setCenterAltitude",args:[t.centerAltitude]}),e1(e.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),e1(e.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),e1(e.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),e1(e.roll,t.roll)||r.push({command:"setRoll",args:[t.roll]}),e1(e.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),e1(e.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),e1(e.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),e1(e.light,t.light)||r.push({command:"setLight",args:[t.light]}),e1(e.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),e1(e.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),e1(e.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});let i={},n=[];!function(e,t,r,i){let n;for(n in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,n)&&(Object.prototype.hasOwnProperty.call(t,n)||e5(n,r,i));for(n in t){var o;Object.prototype.hasOwnProperty.call(t,n)&&(Object.prototype.hasOwnProperty.call(e,n)?e1(e[n],t[n])||("geojson"===e[n].type&&"geojson"===t[n].type&&function(e,t,r){let i;for(i in e[r])if(Object.prototype.hasOwnProperty.call(e[r],i)&&"data"!==i&&!e1(e[r][i],t[r][i]))return!1;for(i in t[r])if(Object.prototype.hasOwnProperty.call(t[r],i)&&"data"!==i&&!e1(e[r][i],t[r][i]))return!1;return!0}(e,t,n)?e2(r,{command:"setGeoJSONSourceData",args:[n,t[n].data]}):(o=t,e5(n,r,i),e3(n,o,r))):e3(n,t,r))}}(e.sources,t.sources,n,i);let o=[];
170e.layers&&e.layers.forEach(e=>{"source"in e&&i[e.source]?r.push({command:"removeLayer",args:[e.id]}):o.push(e)}),r=r.concat(n),function(e,t,r){let i,n,o,a,s;t=t||[];let l=(e=e||[]).map(e6),u=t.map(e6),c=e.reduce(e8,{}),h=t.reduce(e8,{}),d=l.slice(),p=Object.create(null);for(let e=0,t=0;e<l.length;e++)i=l[e],Object.prototype.hasOwnProperty.call(h,i)?t++:(e2(r,{command:"removeLayer",args:[i]}),d.splice(d.indexOf(i,t),1));for(let e=0,t=0;e<u.length;e++)i=u[u.length-1-e],d[d.length-1-e]!==i&&(Object.prototype.hasOwnProperty.call(c,i)?(e2(r,{command:"removeLayer",args:[i]}),d.splice(d.lastIndexOf(i,d.length-t),1)):t++,a=d[d.length-e],e2(r,{command:"addLayer",args:[h[i],a]}),d.splice(d.length-e,0,i),p[i]=!0);for(let e=0;e<u.length;e++)if(n=c[i=u[e]],o=h[i],!p[i]&&!e1(n,o))if(e1(n.source,o.source)&&e1(n["source-layer"],o["source-layer"])&&e1(n.type,o.type)){for(s in e4(n.layout,o.layout,r,i,null,"setLayoutProperty"),e4(n.paint,o.paint,r,i,null,"setPaintProperty"),e1(n.filter,o.filter)||e2(r,{command:"setFilter",args:[i,o.filter]}),e1(n.minzoom,o.minzoom)&&e1(n.maxzoom,o.maxzoom)||e2(r,{command:"setLayerZoomRange",args:[i,o.minzoom,o.maxzoom]}),n)Object.prototype.hasOwnProperty.call(n,s)&&"layout"!==s&&"paint"!==s&&"filter"!==s&&"metadata"!==s&&"minzoom"!==s&&"maxzoom"!==s&&(0===s.indexOf("paint.")?e4(n[s],o[s],r,i,s.slice(6),"setPaintProperty"):e1(n[s],o[s])||e2(r,{command:"setLayerProperty",args:[i,s,o[s]]}));for(s in o)Object.prototype.hasOwnProperty.call(o,s)&&!Object.prototype.hasOwnProperty.call(n,s)&&"layout"!==s&&"paint"!==s&&"filter"!==s&&"metadata"!==s&&"minzoom"!==s&&"maxzoom"!==s&&(0===s.indexOf("paint.")?e4(n[s],o[s],r,i,s.slice(6),"setPaintProperty"):e1(n[s],o[s])||e2(r,{command:"setLayerProperty",args:[i,s,o[s]]}))}else e2(r,{command:"removeLayer",args:[i]}),a=d[d.lastIndexOf(i)+1],e2(r,{command:"addLayer",args:[o,a]})}(o,t.layers,r)}catch(e){console.warn("Unable to compute style diff:",e),r=[{command:"setStyle",args:[t]}]}return r},e.bX=function(e){let t=[],r=e.id;return void 0===r&&t.push({message:`layers.${r}: missing required property "id"`}),void 0===e.render&&t.push({message:`layers.${r}: missing required method "render"`}),e.renderingMode&&"2d"!==e.renderingMode&&"3d"!==e.renderingMode&&t.push({message:`layers.${r}: property "renderingMode" must be either "2d" or "3d"`}),t},e.bY=ex,e.bZ=eA,e.b_=class extends an{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},e.ba=uT,e.bb=uE,e.bc=function(e,t,r,i,n){var o=1/Math.tan(t/2);if(e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=n&&1/0!==n){var a=1/(i-n);e[10]=(n+i)*a,e[14]=2*n*i*a}else e[10]=-1,e[14]=-2*i;return e},e.bd=function(e){var t=new X(16);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},e.be=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],h=t[6],d=t[7];return t!==e&&(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[0]=o*n+u*i,e[1]=a*n+c*i,e[2]=s*n+h*i,e[3]=l*n+d*i,e[4]=u*n-o*i,e[5]=c*n-a*i,e[6]=h*n-s*i,e[7]=d*n-l*i,e},e.bf=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*n+u*i,e[5]=a*n+c*i,e[6]=s*n+h*i,e[7]=l*n+d*i,e[8]=u*n-o*i,e[9]=c*n-a*i,e[10]=h*n-s*i,e[11]=d*n-l*i,e},e.bg=function(e,t){var r=t[0],i=t[1],n=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],p=t[11],f=t[12],m=t[13],g=t[14],y=t[15],v=r*s-i*a,b=r*l-n*a,_=r*u-o*a,x=i*l-n*s,A=i*u-o*s,w=n*u-o*l,S=c*m-h*f,T=c*g-d*f,C=c*y-p*f,E=h*g-d*m,P=h*y-p*m,I=d*y-p*g,M=v*I-b*P+_*E+x*C-A*T+w*S;return M?(e[0]=(s*I-l*P+u*E)*(M=1/M),e[1]=(n*P-i*I-o*E)*M,e[2]=(m*w-g*A+y*x)*M,e[3]=(d*A-h*w-p*x)*M,e[4]=(l*C-a*I-u*T)*M,e[5]=(r*I-n*C+o*T)*M,e[6]=(g*_-f*w-y*b)*M,e[7]=(c*w-d*_+p*b)*M,e[8]=(a*P-s*C+u*S)*M,e[9]=(i*C-r*P-o*S)*M,e[10]=(f*A-m*_+y*v)*M,e[11]=(h*_
170-c*A-p*v)*M,e[12]=(s*T-a*E-l*S)*M,e[13]=(r*E-i*T+n*S)*M,e[14]=(m*b-f*x-g*v)*M,e[15]=(c*x-h*b+d*v)*M,e):null},e.bh=function(){let e=new Float32Array(16);return Q(e),e},e.bi=function(){let e=new Float64Array(16);return Q(e),e},e.bj=function(){return new Float64Array(16)},e.bk=function(e,t,r){let i=new Float64Array(4);return es(i,e,t-90,r),i},e.bl=function(e,t,r,i){var n,o,a,s,l,u=t[0],c=t[1],h=t[2],d=t[3],p=r[0],f=r[1],m=r[2],g=r[3];return(o=u*p+c*f+h*m+d*g)<0&&(o=-o,p=-p,f=-f,m=-m,g=-g),1-o>1e-6?(a=Math.sin(n=Math.acos(o)),s=Math.sin((1-i)*n)/a,l=Math.sin(i*n)/a):(s=1-i,l=i),e[0]=s*u+l*p,e[1]=s*c+l*f,e[2]=s*h+l*m,e[3]=s*d+l*g,e},e.bm=function(e){var t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g;let y,v,b=new Float64Array(9);l=(t=e[0])*(o=t+t),u=(r=e[1])*o,h=(i=e[2])*o,d=i*(a=r+r),f=(n=e[3])*o,m=n*a,g=n*(s=i+i),b[0]=1-(c=r*a)-(p=i*s),b[3]=u-g,b[6]=h+m,b[1]=u+g,b[4]=1-l-p,b[7]=d-f,b[2]=h-m,b[5]=d+f,b[8]=1-l-c;let _=eR(-Math.asin(ey(b[2],-1,1)));return .001>Math.hypot(b[5],b[8])?(y=0,v=-eR(Math.atan2(b[3],b[4]))):(y=eR(0===b[5]&&0===b[8]?0:Math.atan2(b[5],b[8])),v=eR(0===b[1]&&0===b[0]?0:Math.atan2(b[1],b[0]))),{roll:y,pitch:_+90,bearing:v}},e.bn=function(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing},e.bo=tW,e.bp=ao,e.bq=-32768,e.br=32767,e.bs=sm,e.bt=ep,e.bu=ef,e.bv=t3,e.bw=function(e,t,r,i,n){return ep(i,n,ey((e-t)/(r-t),0,1))},e.bx=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e},e.by=ed,e.bz=function(){return new Float64Array(3)},e.c=eG,e.c$=iO,e.c0=class extends an{constructor(e,t){super(e,t),this.current=al}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}},e.c1=aa,e.c2=class extends an{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},e.c3=class extends an{constructor(e,t){super(e,t),this.current=[0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},e.c4=Y,e.c5=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.c6=function(e,t,r){var i=t[0],n=t[1],o=t[2];return e[0]=i*r[0]+n*r[3]+o*r[6],e[1]=i*r[1]+n*r[4]+o*r[7],e[2]=i*r[2]+n*r[5]+o*r[8],e},e.c7=function(e,t,r,i,n,o,a){var s=1/(t-r),l=1/(i-n),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(a+o)*u,e[15]=1,e},e.c8=class extends an{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(4*e.length);for(let r=0;r<e.length;r++)t[4*r]=e[r].r,t[4*r+1]=e[r].g,t[4*r+2]=e[r].b,t[4*r+3]=e[r].a;this.gl.uniform4fv(this.location,t)}}},e.c9=class extends an{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(e);this.gl.uniform1fv(this.location,t)}}},e.cA=function(e,t){return eL[t]&&"touches"in e},e.cB=function(e){return eL[e]||eB[e]},e.cC=function(e,t,r){var i=t[0],n=t[1];return e[0]=r[0]*i+r[4]*n+r[12],e[1]=r[1]*i+r[5]*n+r[13],e},e.cD=function(e,t){let{x:r,y:i}=uA.fromLngLat(t);return!(e<0||e>25||i<0||i>=1||r<0||r>=1)},e.cE=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.cF=class extends oi{},e.cG=eH,e.cH=function(e,t){eG.REGISTERED_PROTOCOLS[e]=t},e.cI=function(e){delete eG.REGISTERED_PROTOCOLS[e]},e.cJ=function(e,t){let r={};for(let i=0;i<e.length;i++){let n=t&&t[e[i].id]||function(e){let t="";for(let r of e0)t+=`/${function e(t){let r=typeof t;if("number"===r||"boolean"===r||"string"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){let r="[";for(let i of t)r+=`${e(i)},`;return`${r}]`}let i=Object.keys(t).sort(),n="{";for(let r=0;r<i.length;r++)n+=`${JSON.stringify(i[r])}:${e(t[i[r]])},`;return`${n}}`}(e[r])}`;return t}(e[i]);t&&(t[e[i].id]=n);let o=r[n];o||(o=r[n]=[]),o.push(e[i])}let i=[];for(let e in r)i.push(r[e]);return i},e.cK=nw,e.cL=uI,e.cM=cG,e.cN=l2,e.cO=function(t){var r,i;t.bucket.createArrays(),t.bucket.tilePixelRatio=8192/(512*t.bucket.overscaling),t.bucket.compareText={},t.bucket.iconsNeedLinear=!1;let n=t.bucket.layers[0],o=n.layout,a=n._unevaluatedLayout._values,s={layoutIconSize:a["icon-size"].possiblyEvaluate(new nz(t.bucket.zoom+1),t.canonical),layoutTextSize:a["text-size"].possiblyEvaluate(new nz(t.bucket.zoom+1),t.canonical),textMaxSize:a["text-size"].possiblyEvaluate(new nz(18))};
170if("composite"===t.bucket.textSizeData.kind){let{minZoom:e,maxZoom:r}=t.bucket.textSizeData;s.compositeTextSizes=[a["text-size"].possiblyEvaluate(new nz(e),t.canonical),a["text-size"].possiblyEvaluate(new nz(r),t.canonical)]}if("composite"===t.bucket.iconSizeData.kind){let{minZoom:e,maxZoom:r}=t.bucket.iconSizeData;s.compositeIconSizes=[a["icon-size"].possiblyEvaluate(new nz(e),t.canonical),a["icon-size"].possiblyEvaluate(new nz(r),t.canonical)]}let l=24*o.get("text-line-height"),u="viewport"!==o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement"),c=o.get("text-keep-upright"),h=o.get("text-size");for(let a of t.bucket.features){let d=o.get("text-font").evaluate(a,{},t.canonical).join(","),p=h.evaluate(a,{},t.canonical),f=s.layoutTextSize.evaluate(a,{},t.canonical),m=s.layoutIconSize.evaluate(a,{},t.canonical),g={horizontal:{},vertical:void 0},y=a.text,v,b=[0,0];if(y){let r=y.toString(),i=24*o.get("text-letter-spacing").evaluate(a,{},t.canonical),s=!function(e){for(let r of e){var t;if(t=r.codePointAt(0),nR.test(String.fromCodePoint(t)))return!1}return!0}(r)?0:i,h=o.get("text-anchor").evaluate(a,{},t.canonical),m=c8(n,a,t.canonical);if(!m){let e=o.get("text-radial-offset").evaluate(a,{},t.canonical);b=e?c6(h,[24*e,1/0]):o.get("text-offset").evaluate(a,{},t.canonical).map(e=>24*e)}let v=u?"center":o.get("text-justify").evaluate(a,{},t.canonical),_="point"===o.get("symbol-placement")?24*o.get("text-max-width").evaluate(a,{},t.canonical):1/0,x=()=>{t.bucket.allowVerticalPlacement&&nO(r)&&(g.vertical=l3(y,t.glyphMap,t.glyphPositions,t.imagePositions,d,_,l,h,"left",s,b,e.ax.vertical,!0,f,p))};if(!u&&m){let r=new Set;if("auto"===v)for(let e=0;e<m.values.length;e+=2)r.add(c7(m.values[e]));else r.add(v);let i=!1;for(let n of r)if(!g.horizontal[n])if(i)g.horizontal[n]=g.horizontal[0];else{let r=l3(y,t.glyphMap,t.glyphPositions,t.imagePositions,d,_,l,"center",n,s,b,e.ax.horizontal,!1,f,p);r&&(g.horizontal[n]=r,i=1===r.positionedLines.length)}x()}else{"auto"===v&&(v=c7(h));let i=l3(y,t.glyphMap,t.glyphPositions,t.imagePositions,d,_,l,h,v,s,b,e.ax.horizontal,!1,f,p);i&&(g.horizontal[v]=i),x(),nO(r)&&u&&c&&(g.vertical=l3(y,t.glyphMap,t.glyphPositions,t.imagePositions,d,_,l,h,v,s,b,e.ax.vertical,!1,f,p))}}let _=!1;if(null==(r=a.icon)?void 0:r.name){let e=t.imageMap[a.icon.name];e&&(v=function(e,t,r){let{horizontalAlign:i,verticalAlign:n}=l5(r),o=t[0]-e.displaySize[0]*i,a=t[1]-e.displaySize[1]*n;return{image:e,top:a,bottom:a+e.displaySize[1],left:o,right:o+e.displaySize[0]}}(t.imagePositions[a.icon.name],o.get("icon-offset").evaluate(a,{},t.canonical),o.get("icon-anchor").evaluate(a,{},t.canonical)),_=!!e.sdf,void 0===t.bucket.sdfIcons?t.bucket.sdfIcons=_:t.bucket.sdfIcons!==_&&eT("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(e.pixelRatio!==t.bucket.pixelRatio||0!==o.get("icon-rotate").constantOr(1))&&(t.bucket.iconsNeedLinear=!0))}let A=he(g.horizontal)||g.vertical;(i=t.bucket).iconsInText||(i.iconsInText=!!A&&A.iconsInText),(A||v)&&function(t,r,i,n,o,a,s,l,u,c,h,d){let p,f=a.textMaxSize.evaluate(r,{});void 0===f&&(f=s);let m=t.layers[0].layout,g=m.get("icon-offset").evaluate(r,{},h),y=he(i.horizontal),v=s/24,b=t.tilePixelRatio*v,_=t.tilePixelRatio*f/24,A=t.tilePixelRatio*l,w=t.tilePixelRatio*m.get("symbol-spacing"),S=m.get("text-padding")*t.tilePixelRatio,T=function(e,t,r,i=1){let n=e.get("icon-padding").evaluate(t,{},r),o=null==n?void 0:n.values;return[o[0]*i,o[1]*i,o[2]*i,o[3]*i]}(m,r,h,t.tilePixelRatio),C=m.get("text-max-angle")/180*Math.PI,E="viewport"!==m.get("text-rotation-alignment")&&"point"!==m.get("symbol-placement"),P="map"===m.get("icon-rotation-alignment")&&"point"!==m.get("symbol-placement"),I=m.get("symbol-placement"),M=w/2,k=m.get("icon-text-fit");n&&"none"!==k&&(t.allowVerticalPlacement&&i.vertical&&(p=l8(n,i.vertical,k,m.get("icon-text-fit-padding"),g,v)),y&&(n=l8(n,y,k,m.get("icon-text-fit-padding"),g,v)));let O=h?d.line.getGranularityForZoomLevel(h.z):1,D=(l,d)=>{d.x<0||d.x>=8192||d.y<0||d.y>=8192||function(t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v,b,_,x,A,w,S,T){let C=t.addToLineVertexArray(r,i),E,P,I,M,k=0,O=0,D=0,R=0,L=-1,B=-1,F={},j=ae("");if(t.allowVerticalPlacement&&n.vertical){let e=l.layout.get("text-rotate").evaluate(x,{},S)+90;
170I=new c2(u,r,c,h,d,n.vertical,p,f,m,e),s&&(M=new c2(u,r,c,h,d,s,y,v,m,e))}if(o){let i=l.layout.get("icon-rotate").evaluate(x,{}),n="none"!==l.layout.get("icon-text-fit"),a=cJ(o,i,w,n),p=s?cJ(s,i,w,n):void 0;P=new c2(u,r,c,h,d,o,y,v,!1,i),k=4*a.length;let f=t.iconSizeData,m=null;"source"===f.kind?(m=[128*l.layout.get("icon-size").evaluate(x,{})])[0]>32640&&eT(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`):"composite"===f.kind&&((m=[128*A.compositeIconSizes[0].evaluate(x,{},S),128*A.compositeIconSizes[1].evaluate(x,{},S)])[0]>32640||m[1]>32640)&&eT(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`),t.addSymbols(t.icon,a,m,_,b,x,e.ax.none,r,C.lineStartIndex,C.lineLength,-1,S),L=t.icon.placedSymbolArray.length-1,p&&(O=4*p.length,t.addSymbols(t.icon,p,m,_,b,x,e.ax.vertical,r,C.lineStartIndex,C.lineLength,-1,S),B=t.icon.placedSymbolArray.length-1)}let z=Object.keys(n.horizontal);for(let i of z){let o=n.horizontal[i];E||(j=ae(o.text),E=new c2(u,r,c,h,d,o,p,f,m,l.layout.get("text-rotate").evaluate(x,{},S)));let s=1===o.positionedLines.length;if(D+=c9(t,r,o,a,l,m,x,g,C,n.vertical?e.ax.horizontal:e.ax.horizontalOnly,s?z:[i],F,L,A,S),s)break}n.vertical&&(R+=c9(t,r,n.vertical,a,l,m,x,g,C,e.ax.vertical,["vertical"],F,B,A,S));let N=E?E.boxStartIndex:t.collisionBoxArray.length,G=E?E.boxEndIndex:t.collisionBoxArray.length,V=I?I.boxStartIndex:t.collisionBoxArray.length,U=I?I.boxEndIndex:t.collisionBoxArray.length,H=P?P.boxStartIndex:t.collisionBoxArray.length,W=P?P.boxEndIndex:t.collisionBoxArray.length,q=M?M.boxStartIndex:t.collisionBoxArray.length,Z=M?M.boxEndIndex:t.collisionBoxArray.length,$=-1,K=(e,t)=>(null==e?void 0:e.circleDiameter)?Math.max(e.circleDiameter,t):t;$=K(E,-1),$=K(I,$),$=K(P,$);let X=+(($=K(M,$))>-1);X&&($*=T/24),t.glyphOffsetArray.length>=uo.MAX_GLYPHS&&eT("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey);let Y=c8(l,x,S),[Q,J]=function(t,r){let i=t.length,n=null==r?void 0:r.values;if((null==n?void 0:n.length)>0)for(let r=0;r<n.length;r+=2){let i=n[r+1];t.emplaceBack(e.aM[n[r]],i[0],i[1])}return[i,t.length]}(t.textAnchorOffsets,Y);t.symbolInstances.emplaceBack(r.x,r.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,L,B,j,N,G,V,U,H,W,q,Z,c,D,R,k,O,X,0,p,$,Q,J)}(t,d,l,i,n,o,p,t.layers[0],t.collisionBoxArray,r.index,r.sourceLayerIndex,t.index,b,[S,S,S,S],E,u,A,T,P,g,r,a,c,h,s)};if("line"===I)for(let e of cH(r.geometry,0,0,8192,8192)){let r=sb(e,O);for(let e of function(e,t,r,i,n,o,a){let s=i?.6*24*o:0,l=cQ(i,n),u=l*o,c=0===e[0].x||8192===e[0].x||0===e[0].y||8192===e[0].y;return t-u<t/4&&(t=u+t/4),function e(t,r,i,n,o,a,s,l,u){let c=a/2,h=cY(t),d=0,p=r-i,f=[];for(let e=0;e<t.length-1;e++){let r=t[e],s=t[e+1],l=r.dist(s),m=s.angleTo(r);for(;p+i<d+l;){let g=((p+=i)-d)/l,y=rb.number(r.x,s.x,g),v=rb.number(r.y,s.y,g);if(y>=0&&y<u&&v>=0&&v<u&&p-c>=0&&p+c<=h){let r=new cK(y,v,m,e);r._round(),n&&!cX(t,r,a,n,o)||f.push(r)}}d+=l}return l||f.length||s||(f=e(t,d/2,i,n,o,a,s,!0,u)),f}(e,c?t/2*a%t:(l/2+48)*o*a%t,t,s,r,u,c,!1,8192)}(r,w,C,i.vertical||y,n,_,t.overscaling))y&&function(e,t,r,i){let n=e.compareText;if(t in n){let e=n[t];for(let t=e.length-1;t>=0;t--)if(i.dist(e[t])<r)return!0}else n[t]=[];return n[t].push(i),!1}(t,y.text,M,e)||D(r,e)}else if("line-center"===I){for(let e of r.geometry)if(e.length>1){let t=sb(e,O),r=function(e,t,r,i,n){let o=r?.6*24*n:0,a=cQ(r,i)*n,s=0,l=cY(e)/2;for(let r=0;r<e.length-1;r++){let i=e[r],n=e[r+1],u=i.dist(n);if(s+u>l){let c=(l-s)/u,h=new cK(rb.number(i.x,n.x,c),rb.number(i.y,n.y,c),n.angleTo(i),r);return h._round(),!o||cX(e,h,a,o,t)?h:void 0}s+=u}}(t,C,i.vertical||y,n,_);r&&D(t,r)}}else if("Polygon"===r.type)for(let e of rZ(r.geometry,0)){let t=function(e,t=1){let r=uP.fromPoints(e[0]),i=Math.min(r.width(),r.height()),n=i/2,o=new c3([],c5),{minX:a,minY:s,maxX:l,maxY:u}=r;if(0===i)return new x(a,s);for(let t=a;t<l;t+=i)for(let r=s;r<u;r+=i)o.push(new c4(t+n,r+n,n,e));let c=function(e){let t=0,r=0,i=0,n=e[0];for(let e=0,o=n.length,a=o-1;e<o;a=e++){let o=n[e],s=n[a],l=o.x*s.y-s.x*o.y;r+=(o.x+s.x)*l,i+=(o.y+s.y)*l,t+=3*l}return new c4(r/t,i/t,0,e)}(e),h=c;for(;o.length;){let r=o.pop();(r.d>h.d||!h.d)&&(h=r),r.max-h.d<=t||(n=r.h/2,o.push(new c4(r.p.x-n,r.p.y-n,n,e)),o.push(new c4(r.p.x+n,r.p.y-n,n,e)),o.push(new c4(r.p.x-n,r.p.y+n,n,e)),o.push(new c4(r.p.x+n,r.p.y+n,n,e)))}return c.d>0&&h.d-c.d<=t?c.p:h.p}(e,16);D(sb(e[0],O,!0),new cK(t.x,t.y,0))}else if("LineString"===r.type)for(let e of r.geometry){let t=sb(e,O);D(t,new cK(t[0].x,t[0].y,0))}else if("Point"===r.type)for(let e of r.geometry)for(let t of e)D([t],new cK(t.x,t.y,0))}(t.bucket,a,g,v,t.imageMap,s,f,m,b,_,t.canonical,t.subdivisionGranularity)}t.showCollisionBoxes&&t.bucket.generateCollisionDebugBuffers()},e.cP=sA,e.cQ=sB,e.cR=lA,e.cS=function(e,t=""){let r=new lN;return function(e,t,r=""){for(let i in e.layers)t.writeMessage(3,(e,t)=>
170(function(e,t,r=""){t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let r=0;r<e.length;r++)i.feature=e.feature(r),t.writeMessage(2,cF,i);for(let e of i.keys)t.writeStringField(3,e);for(let e of i.values)t.writeMessage(4,cN,e)})(e,t,r),e.layers[i])}(e,r,t),r.finish()},e.cT=function(e,t,r,i,n,o){let a=cW(e,t,r,n,0);return cW(a,t,i,o,1)},e.cU=class{constructor(e){this.maxEntries=e,this.map=new Map}get(e){let t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.map.set(e,t)),t}set(e,t){if(this.map.has(e))this.map.delete(e);else if(this.map.size>=this.maxEntries){let e=this.map.keys().next().value;this.map.delete(e)}this.map.set(e,t)}clear(){this.map.clear()}},e.cV=sD,e.cW=lN,e.cX=cR,e.cY=function(e,t,r,o,a){return _(this,void 0,void 0,function*(){let s,l,u;if(K())try{return yield ek(e,t,r,o,a)}catch(e){}return s=e.width,l=e.height,i&&n||(n=(i=new OffscreenCanvas(s,l)).getContext("2d",{willReadFrequently:!0})),i.width=s,i.height=l,n.drawImage(e,0,0,s,l),u=n.getImageData(t,r,o,a),n.clearRect(0,0,s,l),u.data})},e.cZ=a3,e.c_=class{constructor(e,t){this.layers={[cB]:this},this.name=cB,this.version=t?t.version:1,this.extent=t?t.extent:4096,this.length=e.length,this.features=e}feature(e){return new cL(this.features[e],this.extent)}},e.ca=class extends om{},e.cb=lM,e.cc=class extends oy{},e.cd=aY,e.ce=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},e.cf=aX,e.cg=function(e,t,r){var i=t[0],n=t[1],o=t[2],a=r[3]*i+r[7]*n+r[11]*o+r[15];return e[0]=(r[0]*i+r[4]*n+r[8]*o+r[12])/(a=a||1),e[1]=(r[1]*i+r[5]*n+r[9]*o+r[13])/a,e[2]=(r[2]*i+r[6]*n+r[10]*o+r[14])/a,e},e.ch=class extends on{},e.ci=class extends oS{},e.cj=function(e,t){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.ck=function(e,t){var r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],p=e[11],f=e[12],m=e[13],g=e[14],y=e[15],v=t[0],b=t[1],_=t[2],x=t[3],A=t[4],w=t[5],S=t[6],T=t[7],C=t[8],E=t[9],P=t[10],I=t[11],M=t[12],k=t[13],O=t[14],D=t[15];return Math.abs(r-v)<=1e-6*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=1e-6*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(n-_)<=1e-6*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(o-x)<=1e-6*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-A)<=1e-6*Math.max(1,Math.abs(a),Math.abs(A))&&Math.abs(s-w)<=1e-6*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(l-S)<=1e-6*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(u-T)<=1e-6*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(c-C)<=1e-6*Math.max(1,Math.abs(c),Math.abs(C))&&Math.abs(h-E)<=1e-6*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-P)<=1e-6*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(p-I)<=1e-6*Math.max(1,Math.abs(p),Math.abs(I))&&Math.abs(f-M)<=1e-6*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(m-k)<=1e-6*Math.max(1,Math.abs(m),Math.abs(k))&&Math.abs(g-O)<=1e-6*Math.max(1,Math.abs(g),Math.abs(O))&&Math.abs(y-D)<=1e-6*Math.max(1,Math.abs(y),Math.abs(D))},e.cl=function(e,t){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},e.cm=e=>"circle"===e.type,e.cn=e=>"heatmap"===e.type,e.co=e=>"line"===e.type,e.cp=e=>"fill"===e.type,e.cq=e=>"fill-extrusion"===e.type,e.cr=e=>"hillshade"===e.type,e.cs=e=>"color-relief"===e.type,e.ct=e=>"background"===e.type,e.cu=e=>"custom"===e.type,e.cv=em,e.cw=function(e,t,r){if(t<=0)return e;let i=1/t;return void 0===r||1e-10>Math.abs(r)?Math.round(e*i)/i:(r>0?Math.ceil(e*i-1e-9):Math.floor(e*i+1e-10))/i},e.cx=function(e,t,r){let i=eu(t.x-r.x,t.y-r.y),n=eu(e.x-r.x,e.y-r.y);return eR(Math.atan2(i[0]*n[1]-i[1]*n[0],i[0]*n[0]+i[1]*n[1]))},e.cy=eg,e.cz=function(e,t){var r;if(!eB[t])return!1;let i=null==e?void 0:e.target,n=(null==(r=null==i?void 0:i.ownerDocument)?void 0:r.defaultView)||window;return e instanceof n.MouseEvent||e instanceof n.WheelEvent},e.d=eh,e.d0=class{constructor(e,t){let r=(t=this.options=Object.assign({},lv,t)).debug;if(r&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw Error("promoteId and generateId cannot be used together.");let i=sX(e,t);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles")),i=li(i,t),t.updateable&&(this.source=i),this.initializeIndex(i,t)}initializeIndex(e,t){this.tileIndex=t.cluster?new ll(t.clusterOptions):new lg(t),e.length&&this.tileIndex.initialize(e)}getTile(e,t,r){return t*=1,r*=1,(e*=1)<0||e>24?null:this.tileIndex.getTile(e,t,r)}updateData(e,t){let r=this.options;if(!r.updateable)throw Error("to update tile geojson `updateable` option must be set to true");let{affected:i,source:n}
170=function(e,t,r){let i=t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map(t.add?.map(e=>[r.promoteId?e.properties[r.promoteId]:e.id,e])),update:new Map(t.update?.map(e=>[e.id,e]))}:{remove:new Set,add:new Map,update:new Map},n=[];if(i.removeAll&&(n=e,e=[]),i.remove.size||i.add.size){let t=[];for(let r of e)(i.remove.has(r.id)||i.add.has(r.id))&&t.push(r);if(t.length){n.push(...t);let r=new Set(t.map(e=>e.id));e=e.filter(e=>!r.has(e.id))}if(i.add.size){let t=sX({type:"FeatureCollection",features:Array.from(i.add.values())},r);t=li(t,r),n.push(...t),e.push(...t)}}if(i.update.size){let t=new Map,o=[];for(let r of e)i.update.has(r.id)?t.set(r.id,[...t.get(r.id)||[],r]):o.push(r);for(let[e,a]of i.update){let i=t.get(e);if(!i||0===i.length)continue;let s=function(e,t,r){let i=!!t.newGeometry,n=t.removeAllProperties||t.removeProperties?.length>0||t.addOrUpdateProperties?.length>0;if(i){let i=e[0];return li(sX({type:"FeatureCollection",features:[{type:"Feature",id:i.id,geometry:t.newGeometry,properties:n?la(i.tags,t):i.tags}]},r),r)}if(n){let r=[];for(let i of e){let e={...i};e.tags=la(e.tags,t),r.push(e)}return r}return e}(i,a,r);n.push(...i,...s),o.push(...s)}e=o}return{affected:n,source:e}}(this.source,e,r);t&&({affected:i,source:n}=this.filterUpdate(n,i,t)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(e,t,r){let i=new Set;for(let n of e)null!=n.id&&(r(s2(n))||(t.push(n),i.add(n.id)));return{affected:t,source:e=e.filter(e=>!i.has(e.id))}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(e=>s2(e))}}updateClusterOptions(e,t){let r=this.options.cluster;this.options.cluster=e,this.options.clusterOptions=t,r!=e?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(e){return this.tileIndex.getClusterExpansionZoom(e)}getClusterChildren(e){return this.tileIndex.getChildren(e)}getClusterLeaves(e,t,r){return this.tileIndex.getLeaves(e,t,r)}},e.d1=nj,e.e=eb,e.f=eZ,e.g=eV,e.h=e=>_(void 0,void 0,void 0,function*(){if(0===e.byteLength)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t)}catch(e){throw Error(`Could not load image because of ${eh(e).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.i=eE,e.j=e=>new Promise((t,r)=>{let i=new Image;i.onload=()=>{t(i),URL.revokeObjectURL(i.src),i.onload=null,window.requestAnimationFrame(()=>i.src=eM)},i.onerror=()=>r(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."));let n=new Blob([new Uint8Array(e)],{type:"image/png"});i.src=e.byteLength?URL.createObjectURL(n):eM}),e.k=(e,t)=>eq(eb(e,{type:"json"}),t),e.l=eY,e.m=eq,e.n=eX,e.o=(e,t)=>eq(eb(e,{type:"arrayBuffer"}),t),e.p=l0,e.q=function(e){return new lN(e).readFields(lY,[])},e.r=function(e){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))},e.s=eO,e.t=aZ,e.u=n1,e.v=eJ,e.w=eT,e.x=eJ,e.y=nH,e.z=ng}),r("worker",["./shared"],function(e){class t{constructor(e,t){this.keyCache={},e&&this.replace(e,t)}replace(e,t){this._layerConfigs={},this._layers={},this.update(e,[],t)}update(t,r,i){for(let r of t){this._layerConfigs[r.id]=r;let t=this._layers[r.id]=e.bT(r,i);t._featureFilter=e.ah(t.filter,i),this.keyCache[r.id]&&delete this.keyCache[r.id]}for(let e of r)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];for(let t of(this.familiesBySource={},e.cJ(Object.values(this._layerConfigs),this.keyCache))){let r=t.map(e=>this._layers[e.id]),i=r[0];if(i.isHidden())continue;let n=i.source||"",o=this.familiesBySource[n];o||(o=this.familiesBySource[n]={});let a=i.sourceLayer||e.ag,s=o[a];s||(s=o[a]=[]),s.push(r)}}}
170class r{constructor(t){let r={},i=[];for(let e in t){let n=t[e],o=r[e]={};for(let e in n){let t=n[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let r={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};i.push(r),o[e]={rect:r,metrics:t.metrics}}}let{w:n,h:o}=e.p(i),a=new e.t({width:n||1,height:o||1});for(let i in t){let n=t[i];for(let t in n){let o=n[+t];if(!o||0===o.bitmap.width||0===o.bitmap.height)continue;let s=r[i][t].rect;e.t.copy(o.bitmap,a,{x:0,y:0},{x:s.x+1,y:s.y+1},o.bitmap)}}this.image=a,this.positions=r}}e.cK("GlyphAtlas",r);class i{constructor(t){this.tileID=new e.a3(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,i,o,a,s){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.ae;let l=new e.cL(Object.keys(t.layers).sort()),u=new e.cM(this.tileID,this.promoteId);u.bucketLayerIDs=[];let c={},h={featureIndex:u,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:o,subdivisionGranularity:s},d=i.familiesBySource[this.source];for(let r in d){let i=t.layers[r];if(!i)continue;1===i.version&&e.w(`Vector tile source "${this.source}" layer "${r}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let a=l.encode(r),s=[];for(let e=0;e<i.length;e++){let t=i.feature(e),n=u.getId(t,r);s.push({feature:t,id:n,index:e,sourceLayerIndex:a})}for(let t of d[r]){let r=t[0];r.source!==this.source&&e.w(`layer.source = ${r.source} does not equal this.source = ${this.source}`),r.isHidden(this.zoom,!0)||(n(t,this.zoom,o),(c[r.id]=r.createBucket({index:u.bucketLayerIDs.length,layers:t,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:a,sourceID:this.source})).populate(s,h,this.tileID.canonical),u.bucketLayerIDs.push(t.map(e=>e.id)))}}let p=e.bY(h.glyphDependencies,e=>Object.keys(e).map(Number));for(let e of this.inFlightDependencies)null==e||e.abort();this.inFlightDependencies=[];let f=Promise.resolve({});if(Object.keys(p).length){let e=new AbortController;this.inFlightDependencies.push(e),f=a.sendAsync({type:"GG",data:{stacks:p,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let m=Object.keys(h.iconDependencies),g=Promise.resolve({});if(m.length){let e=new AbortController;this.inFlightDependencies.push(e),g=a.sendAsync({type:"GI",data:{icons:m,source:this.source,tileID:this.tileID,type:"icons"}},e)}let y=Object.keys(h.patternDependencies),v=Promise.resolve({});if(y.length){let e=new AbortController;this.inFlightDependencies.push(e),v=a.sendAsync({type:"GI",data:{icons:y,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let b=h.dashDependencies,_=Promise.resolve({});if(Object.keys(b).length){let e=new AbortController;this.inFlightDependencies.push(e),_=a.sendAsync({type:"GDA",data:{dashes:b}},e)}let[x,A,w,S]=yield Promise.all([f,g,v,_]),T=new r(x),C=new e.cN(A,w);for(let t in c){let r=c[t];r instanceof e.af?(n(r.layers,this.zoom,o),e.cO({bucket:r,glyphMap:x,glyphPositions:T.positions,imageMap:A,imagePositions:C.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:h.subdivisionGranularity})):r.hasDependencies&&(r instanceof e.cP||r instanceof e.cQ||r instanceof e.cR)&&(n(r.layers,this.zoom,o),r.addFeatures(h,this.tileID.canonical,C.patternPositions,S))}return this.status="done",{buckets:Object.values(c).filter(e=>!e.isEmpty()),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:T.image,imageAtlas:C,dashPositions:S,glyphMap:this.returnDependencies?x:null,iconMap:this.returnDependencies?A:null,glyphPositions:this.returnDependencies?T.positions:null}})}}function n(t,r,i){let n=new e.J(r);for(let e of t)e.recalculate(n,i)}class o{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(e,t){this.loading[e]=t}finishLoading(e){delete this.loading[e]}abort(e){let t=this.loading[e];(null==t?void 0:t.abort)&&(t.abort.abort(),delete this.loading[e])}setParsing(e,t){this.parsing[e]=t}consumeParsing(e){let t=this.parsing[e];if(t)return delete this.parsing[e],t}clearParsing(e){delete this.parsing[e]}markLoaded(e,t){this.loaded[e]=t}getLoaded(e){let t=this.loaded[e];if(t)return t}removeLoaded(e){delete this.loaded[e]}clearLoaded(){this.loaded={}}}class a{constructor(e){this.start=`${e}#start`,this.end=`${e}#end`,this.measure=e,performance.mark(this.start)}finish(){performance.mark(this.end);let e=performance.getEntriesByName(this.measure);return 0===e.length&&(performance.measure(this.measure,this.start,this.end),e=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),e}}class s{constructor(e,t,r,i,n){this.type=e,this.properties=r||{},this.extent=n,this.pointsArray=t,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(t=>new e.P(t.x,t.y)))}}class l{constructor(e,t,r){this.version=2,this._myFeatures=e,this.name=t,this.length=e.length,this.extent=r}feature(e){return this._myFeatures[e]}}class u{constructor(){this.layers={}}addLayer(e){this.layers[e.name]=e}}function c(t){let r=e.cS(t);return 0===r.byteOffset&&r.byteLength===r.buffer.byteLength||(r=new Uint8Array(r)),{vectorTile:t,rawData:r.buffer}}class h{constructor(t,r,i){this.actor=t,this.layerIndex=r,this.availableImages=i,this.tileState=new o,this.overzoomedTileResultCache=new e.cU(1e3)}loadVectorTile(t,r){try{return{vectorTile:"mlt"!==t.encoding?new e.cV(new e.cW(r)):new e.cX(r),rawData:r}}catch(o){let i=new Uint8Array(r),n=`Unable to parse the tile at ${t.request.url}, `;throw Error(n+=31===i[0]&&139===i[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${e.d(o).message}`)}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,overzoomParameters:n}=t;n&&(t.request=n.overzoomRequest);let o=this._startRequestTiming(t),a=new i(t);this.tileState.startLoading(r,a);let s=new AbortController;a.abort=s;try{let i=yield e.o(t.request,s);if(t.etag&&t.etag===i.etag)return this.tileState.finishLoading(r),this._getEtagUnmodifiedResult(i,o);let l=this.loadVectorTile(t,i.data);if(this.tileState.finishLoading(r),!l)return null;let{vectorTile:u,rawData:c}=l;n&&({vectorTile:u,rawData:c}=this._getOverzoomTile(t,u));let h=this._getExpiryData(i),d=this._finishRequestTiming(o);a.vectorTile=u,this.tileState.markLoaded(r,a);let p={rawData:c,cacheControl:h,resourceTiming:d};this.tileState.setParsing(r,p);try{return yield this._parseWorkerTile(a,t,p)}finally{this.tileState.clearParsing(r)}}catch(e){throw this.tileState.finishLoading(r),a.status="done",this.tileState.markLoaded(r,a),e}})}_getEtagUnmodifiedResult(t,r){let i=this._getExpiryData(t),n=this._finishRequestTiming(r);return e.e({etagUnmodified:!0},i,n)}_parseWorkerTile(t,r,i){return e._(this,void 0,void 0,function*(){let n=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,r.subdivisionGranularity);if(i){let{rawData:t,cacheControl:o,resourceTiming:a}=i;n=e.e({rawTileData:t.slice(0),encoding:r.encoding},n,o,a)}return n})}
170_getExpiryData({expires:e,cacheControl:t,etag:r}){let i={};return e&&(i.expires=e),t&&(i.cacheControl=t),r&&(i.etag=r),i}_startRequestTiming(e){var t;if(null==(t=e.request)?void 0:t.collectResourceTiming)return new a(e.request.url)}_finishRequestTiming(e){let t=null==e?void 0:e.finish();return t?{resourceTiming:JSON.parse(JSON.stringify(t))}:{}}_getOverzoomTile(t,r){var i;let{tileID:n,source:o,overzoomParameters:a}=t,{maxZoomTileID:h}=a,d=`${h.key}_${n.key}_${null==(i=t.request)?void 0:i.url}`,p=this.overzoomedTileResultCache.get(d);if(p)return p;let f=new u,m=this.layerIndex.familiesBySource[o];for(let t in m){let i=r.layers[t];if(!i)continue;let o=function(t,r,i){let{extent:n}=t,o=Math.pow(2,i.z-r.z),a=(i.x-r.x*o)*n,u=(i.y-r.y*o)*n,c=[];for(let r=0;r<t.length;r++){let i=t.feature(r),l=i.loadGeometry();for(let e of l)for(let t of e)t.x=t.x*o-a,t.y=t.y*o-u;0!==(l=e.cT(l,i.type,-128,-128,n+128,n+128)).length&&c.push(new s(i.type,l,i.properties,i.id,n))}return new l(c,t.name,n)}(i,h,n.canonical);o.length>0&&f.addLayer(o)}let g=c(f);return this.overzoomedTileResultCache.set(d,g),g}reloadTile(t){return e._(this,void 0,void 0,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.showCollisionBoxes=t.showCollisionBoxes,"parsing"===r.status){let i=this.tileState.consumeParsing(e);return yield this._parseWorkerTile(r,t,i)}if("done"===r.status&&r.vectorTile)return yield this._parseWorkerTile(r,t)})}abortTile(t){return e._(this,void 0,void 0,function*(){this.tileState.abort(t.uid)})}removeTile(t){return e._(this,void 0,void 0,function*(){this.tileState.removeLoaded(t.uid)})}}class d{constructor(){this.loaded={}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,encoding:i,rawImageData:n,redFactor:o,greenFactor:a,blueFactor:s,baseShift:l}=t,u=n.width+2,c=n.height+2,h=e.b(n)?new e.R({width:u,height:c},(yield e.cY(n,-1,-1,u,c))):n,d=new e.cZ(r,h,i,o,a,s,l);return this.loaded||(this.loaded={}),this.loaded[r]=d,d})}removeTile(e){let t=this.loaded,r=e.uid;(null==t?void 0:t[r])&&delete t[r]}}class p{constructor(e,t,r,i=f){this.actor=e,this.layerIndex=t,this.availableImages=r,this.tileState=new o,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:r,x:i,y:n}=t.tileID.canonical,o=this._geoJSONIndex.getTile(r,i,n);return o?c(new e.c_(o.features,{version:2,extent:e.a6})):null}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:e}=t,r=new i(t);r.abort=new AbortController;try{let i=this.loadVectorTile(t);if(!i)return null;let{vectorTile:n,rawData:o}=i;r.vectorTile=n,this.tileState.markLoaded(e,r);let a={rawData:o};this.tileState.setParsing(e,a);try{return yield this._parseWorkerTile(r,t,a)}finally{this.tileState.clearParsing(e)}}catch(t){throw r.status="done",this.tileState.markLoaded(e,r),t}})}_reloadLoadedTile(t){return e._(this,void 0,void 0,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.showCollisionBoxes=t.showCollisionBoxes,"parsing"===r.status){let i=this.tileState.consumeParsing(e);return yield this._parseWorkerTile(r,t,i)}if("done"===r.status&&r.vectorTile)return yield this._parseWorkerTile(r,t)})}_parseWorkerTile(t,r,i){return e._(this,void 0,void 0,function*(){let n=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,r.subdivisionGranularity);if(i){let{rawData:t}=i;n=e.e({rawTileData:t.slice(0),encoding:"mvt"},n)}return n})}abortTile(t){return e._(this,void 0,void 0,function*(){this.tileState.abort(t.uid)})}removeTile(t){return e._(this,void 0,void 0,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return e._(this,void 0,void 0,function*(){var r;null==(r=this._pendingRequest)||r.abort();let i=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let e={};return t.request&&(e.data=t.data),this._finishRequestTiming(i,t,e),e}catch(t){if(delete this._pendingRequest,!e.$(t))throw t;return{abandoned:!0}}})}_startRequestTiming(e){var t;if(null==(t=e.request)?void 0:t.collectResourceTiming)return new a(e.request.url)}_finishRequestTiming(e,t,r){let i=null==e?void 0:e.finish();i&&(r.resourceTiming={[t.source]:JSON.parse(JSON.stringify(i))})}reloadTile(e){return this.tileState.getLoaded(e.uid)?this._reloadLoadedTile(e):this.loadTile(e)}loadAndProcessGeoJSON(t,r){return e._(this,void 0,void 0,function*(){if(t.request&&(t.data=(yield e.k(t.request,r)).data),t.data)return t.data=this._filterGeoJSON(t.data,t.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(t.data,t));if(t.dataDiff)return null!=this._geoJSONIndex||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),void this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter));if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,m(t)),null==this._geoJSONIndex)throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(e,t){if("FeatureCollection"!==e.type)return e;let r=this._getFilterPredicate(t);return r?{type:"FeatureCollection",features:e.features.filter(e=>r(e))}:e}_getFilterPredicate(t){if("boolean"!=typeof t&&!(null==t?void 0:t.length))return;let r=e.c$(t,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return e=>r.value.evaluate({zoom:0},e)}removeSource(t){return e._(this,void 0,void 0,function*(){var e;
170null==(e=this._pendingRequest)||e.abort()})}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getClusterChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getClusterLeaves(e.clusterId,e.limit,e.offset)}}function f(t,r){let i=e.e(r.geojsonVtOptions||{},{updateable:!0,clusterOptions:m(r)});return new e.d0(t,i)}function m({geojsonVtOptions:t,clusterProperties:r}){if(!r||!t.clusterOptions)return t.clusterOptions;let i={},n={},o={accumulated:null,zoom:0},a={properties:null},s=Object.keys(r);for(let t of s){let[o,a]=r[t],s=e.c$(a),l=e.c$("string"==typeof o?[o,["accumulated"],["get",t]]:o);i[t]=s.value,n[t]=l.value}return t.clusterOptions.map=e=>{a.properties=e;let t={};for(let e of s)t[e]=i[e].evaluate(o,a);return t},t.clusterOptions.reduce=(e,t)=>{for(let r of(a.properties=t,s))o.accumulated=e[r],e[r]=n[r].evaluate(o,a)},t.clusterOptions}class g{constructor(t){this.self=t,this.actor=new e.N(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=e.cH,this.self.removeProtocol=e.cI,this.self.registerRTLTextPlugin=t=>{e.d1.setMethods(t)},this.self.makeRequest=e.m,this.actor.registerMessageHandler("LDT",(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler("RDT",(t,r)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(t,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler("LT",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler("RT",(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler("AT",(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler("RMT",(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler("RS",(t,r)=>e._(this,void 0,void 0,function*(){var e,i;if(!(null==(i=null==(e=this.workerSources[t])?void 0:e[r.type])?void 0:i[r.source]))return;let n=this.workerSources[t][r.type][r.source];delete this.workerSources[t][r.type][r.source],void 0!==n.removeSource&&n.removeSource(r)})),this.actor.registerMessageHandler("RM",t=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t],this.globalStates.delete(t)})),this.actor.registerMessageHandler("SR",(t,r)=>e._(this,void 0,void 0,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler("IS",(t,r)=>e._(this,void 0,void 0,function*(){this.self.importScripts(r)})),this.actor.registerMessageHandler("SI",(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler("UL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).update(r.layers,r.removedIds,this._getGlobalState(t))})),this.actor.registerMessageHandler("UGS",(t,r)=>e._(this,void 0,void 0,function*(){let e=this._getGlobalState(t);for(let t in r)e[t]=r[t]})),this.actor.registerMessageHandler("SL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).replace(r,this._getGlobalState(t))}))}_getGlobalState(e){let t=this.globalStates.get(e);return t||(t={},this.globalStates.set(e,t)),t}_setImages(t,r){return e._(this,void 0,void 0,function*(){for(let e in this.availableImages[t]=r,this.workerSources[t]){let i=this.workerSources[t][e];for(let e in i)i[e].availableImages=r}})}_syncRTLPluginState(t,r){return e._(this,void 0,void 0,function*(){return yield e.d1.syncState(r,this.self.importScripts)})}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new t),r}_getWorkerSource(e,t,r){var i,n;if((i=this.workerSources)[e]||(i[e]={}),(n=this.workerSources[e])[t]||(n[t]={}),!this.workerSources[e][t][r]){let i={sendAsync:(t,r)=>(t.targetMapId=e,this.actor.sendAsync(t,r))};switch(t){case"vector":this.workerSources[e][t][r]=new h(i,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][r]=new p(i,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][r]=new this.externalWorkerSourceTypes[t](i,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][r]}_getDEMWorkerSource(e,t){var r,i;return(r=this.demWorkerSources)[e]||(r[e]={}),(i=this.demWorkerSources[e])[t]||(i[t]=new d),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new g(self)),g}),r("index",["exports","./shared"],function(e,t){let r,i,n,o,a,s,l,u;var c,h,d,p,f,m,g="5.24.0";function y(){var e=new t.A(4);return t.A!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}let v={frame(e,r,i,n){let o=n||window,a=o.requestAnimationFrame(e=>{s(),r(e)}),{unsubscribe:s}=t.s(e.signal,"abort",()=>{s(),o.cancelAnimationFrame(a),i(new t.a(e.signal.reason))},!1)},frameAsync(e,t){return new Promise((r,i)=>{this.frame(e,r,i,t)})},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r},resolveURL:e=>(r||(r=document.createElement("a")),r.href=e,r.href),hardwareConcurrency:"u">typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return void 0!==n?n:!!matchMedia&&(null!=i||(i=matchMedia("(prefers-reduced-motion: reduce)")),i.matches)},set prefersReducedMotion(e){n=e}},b=new class{constructor(){this._frozenAt=null}getCurrentTime(){return null!==this._frozenAt?this._frozenAt:performance.now()}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return null!==this._frozenAt}};function _(){return b.getCurrentTime()}class x{static create(e,t,r){let i=window.document.createElement(e);return void 0!==t&&(i.className=t),r&&r.appendChild(i),i}static createNS(e,t){return window.document.createElementNS(e,t)}static disableDrag(){x.docStyle&&x.selectProp&&(x.userSelect=x.docStyle[x.selectProp],x.docStyle[x.selectProp]="none")}static enableDrag(){x.docStyle&&x.selectProp&&(x.docStyle[x.selectProp]=x.userSelect)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",x.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",x.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",x.suppressClickInternal,!0)},0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}
170static getPoint(e,r,i){let n=r.boundingClientRect;return new t.P((i.clientX-n.left)/r.x-e.clientLeft,(i.clientY-n.top)/r.y-e.clientTop)}static mousePos(e,t){let r=x.getScale(e);return x.getPoint(e,r,t)}static touchPos(e,t){let r=[],i=x.getScale(e);for(let n of t)r.push(x.getPoint(e,i,n));return r}static sanitize(e){let t=(new DOMParser).parseFromString(e,"text/html").body||document.createElement("body");for(let e of t.querySelectorAll("script"))e.remove();return x.clean(t),t.innerHTML}static isPossiblyDangerous(e,t){let r=t.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!r.includes("javascript:")&&!r.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){for(let t of e.children)x.removeAttributes(t),x.clean(t)}static removeAttributes(e){for(let{name:t,value:r}of e.attributes)x.isPossiblyDangerous(t,r)&&e.removeAttribute(t)}}x.docStyle="u">typeof window&&(null==(d=window.document)?void 0:d.documentElement.style),x.selectProp=!x.docStyle||"userSelect"in x.docStyle?"userSelect":"webkitUserSelect",function(e){let r,i,n,o;e.resetRequestQueue=()=>{r=[],i=0,n=0,o={}},e.addThrottleControl=e=>{let t=n++;return o[t]=e,t},e.removeThrottleControl=e=>{delete o[e],s()},e.getImage=(e,i,n=!0)=>new Promise((o,a)=>{e.headers||(e.headers={}),e.headers.accept="image/webp,*/*",t.e(e,{type:"image"}),r.push({abortController:i,requestParameters:e,supportImageRefresh:n,state:"queued",onError:e=>{a(e)},onSuccess:e=>{o(e)}}),s()});let a=e=>t._(this,void 0,void 0,function*(){var r;e.state="running";let{requestParameters:n,supportImageRefresh:o,onError:a,onSuccess:u,abortController:c}=e,h=!1===o&&!t.i(self)&&!t.g(n.url)&&(!n.headers||Object.keys(n.headers).reduce((e,t)=>e&&"accept"===t,!0));i++;let d=h?l(n,c):t.m(n,c);try{let i=yield d;delete e.abortController,e.state="completed",i.data instanceof HTMLImageElement||t.b(i.data)?u(i):i.data&&u({data:yield(r=i.data,"function"==typeof createImageBitmap?t.h(r):t.j(r)),cacheControl:i.cacheControl,expires:i.expires})}catch(r){delete e.abortController,a(t.d(r))}finally{i--,s()}}),s=()=>{let e=(()=>{for(let e of Object.keys(o))if(o[e]())return!0;return!1})()?t.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=i;t<e&&r.length>0;t++){let e=r.shift();e.abortController.signal.aborted?t--:a(e)}},l=(e,r)=>new Promise((i,n)=>{let o=new Image,a=e.url,s=e.credentials;s&&"include"===s?o.crossOrigin="use-credentials":(s&&"same-origin"===s||!t.f(a))&&(o.crossOrigin="anonymous"),r.signal.addEventListener("abort",()=>{o.src="",n(new t.a(r.signal.reason))}),o.fetchPriority="high",o.onload=()=>{o.onerror=o.onload=null,i({data:o})},o.onerror=()=>{o.onerror=o.onload=null,r.signal.aborted||n(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},o.src=a})}(p||(p={})),p.resetRequestQueue();class A{constructor(e){this._transformRequestFn=null!=e?e:null}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function w(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:i,url:n}of e){let e=`${i}${n}`;r.includes(e)||(r.push(e),t.push({id:i,url:n}))}}return t}function S(e,t,r){try{let i=new URL(e);return i.pathname+=`${t}${r}`,i.toString()}catch(t){throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class T extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}destroy(){for(let e of(this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null),Object.keys(this.images)))this.removeImage(e);this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let e=r.spriteData;r.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),r.spriteData=null}return r}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);
170this._validate(e,t)&&(this.images[e]=t)}_validate(e,r){let i=!0,n=r.data||r.spriteData;return this._validateStretch(r.stretchX,null==n?void 0:n.width)||(this.fire(new t.l(Error(`Image "${e}" has invalid "stretchX" value`))),i=!1),this._validateStretch(r.stretchY,null==n?void 0:n.height)||(this.fire(new t.l(Error(`Image "${e}" has invalid "stretchY" value`))),i=!1),this._validateContent(r.content,r)||(this.fire(new t.l(Error(`Image "${e}" has invalid "content" value`))),i=!1),i}_validateStretch(e,t){if(!e)return!0;let r=0;for(let i of e){if(i[0]<r||i[1]<i[0]||t<i[1])return!1;r=i[1]}return!0}_validateContent(e,t){if(!e)return!0;if(4!==e.length)return!1;let r=t.spriteData,i=(null==r?void 0:r.width)||t.data.width,n=(null==r?void 0:r.height)||t.data.height;return!(e[0]<0||i<e[0]||e[1]<0||n<e[1]||e[2]<0||i<e[2]||e[3]<0||n<e[3]||e[2]<e[0]||!(e[3]>=e[1]))}updateImage(e,t,r=!0){let i=this.getImage(e);if(r&&(i.data.width!==t.data.width||i.data.height!==t.data.height))throw Error(`size mismatch between old image (${i.data.width}x${i.data.height}) and new image (${t.data.width}x${t.data.height}).`);t.version=i.version+1,this.images[e]=t,this.updatedImages[e]=!0}removeImage(e){var t;let r=this.images[e];delete this.images[e],delete this.patterns[e],(null==(t=r.userImage)?void 0:t.onRemove)&&r.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((t,r)=>{let i=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(i=!1);this.isLoaded()||i?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){var r;let i={};for(let n of e){let e=this.getImage(n);e||(this.fire(new t.n("styleimagemissing",{id:n})),e=this.getImage(n)),e?i[n]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:!!(null==(r=e.userImage)?void 0:r.render)}:t.w(`Image "${n}" 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.`)}return i}getPixelSize(){let{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(e){let r=this.patterns[e],i=this.getImage(e);if(!i)return null;if(r&&r.position.version===i.version)return r.position;if(r)r.position.version=i.version;else{let r={w:i.data.width+2,h:i.data.height+2,x:0,y:0},n=new t.I(r,i);this.patterns[e]={bin:r,position:n}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.T(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let t in this.patterns)e.push(this.patterns[t].bin);let{w:r,h:i}=t.p(e),n=this.atlasImage;for(let e in n.resize({width:r||1,height:i||1}),this.patterns){let{bin:r}=this.patterns[e],i=r.x+1,o=r.y+1,a=this.getImage(e).data,s=a.width,l=a.height;t.R.copy(a,n,{x:0,y:0},{x:i,y:o},{width:s,height:l}),t.R.copy(a,n,{x:0,y:l-1},{x:i,y:o-1},{width:s,height:1}),t.R.copy(a,n,{x:0,y:0},{x:i,y:o+l},{width:s,height:1}),t.R.copy(a,n,{x:s-1,y:0},{x:i-1,y:o},{width:1,height:l}),t.R.copy(a,n,{x:0,y:0},{x:i+s,y:o},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;let e=this.getImage(r);e||t.w(`Image with ID: "${r}" was not found`),function(e){let{userImage:t}=e;return!(!(null==t?void 0:t.render)||!t.render()||(e.data.replace(new Uint8Array(t.data.buffer)),0))}(e)&&this.updateImage(r,e)}}cloneImages(){let e={};for(let t in this.images){let r=this.images[t];e[t]=Object.assign(Object.assign({},r),{data:r.data?r.data.clone():null})}return e}}let C=new Float64Array(256);for(let e=0;e<256;e++){let t=.5-Math.pow(e/255,1/2.2);C[e]=t*Math.abs(t)}function E(e,t,r,i,n,o,a,s,l){for(let u=t;u<t+i;u++)P(e,r*o+u,o,n,a,s,l);for(let u=r;u<r+n;u++)P(e,u*o+t,1,i,a,s,l)}function P(e,t,r,i,n,o,a){o[0]=0,a[0]=-1e20,a[1]=1e20,n[0]=e[t];for(let s=1,l=0,u=0;s<i;s++){n[s]=e[t+s*r];let i=s*s;do{let e=o[l];u=(n[s]-n[e]+i-e*e)/(s-e)/2}while(u<=a[l]&&--l>-1)o[++l]=s,a[l]=u,a[l+1]=1e20}for(let s=0,l=0;s<i;s++){for(;a[l+1]<s;)l++;let i=o[l],u=s-i;e[t+s*r]=n[i]+u*u}}C[255]=-1e20;let I=t.v.layout_symbol["text-font"].default.join(",");class M{constructor(e,t,r){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={},this.lang=r}setURL(e){this.url=e}getGlyphs(e){return t._(this,void 0,void 0,function*(){let t=[];for(let r in e)for(let i of e[r])t.push(this._getAndCacheGlyphsPromise(r,i));let r=yield Promise.all(t),i={};for(let{stack:e,id:t,glyph:n}of r)i[e]||(i[e]={}),i[e][t]=n&&{id:n.id,bitmap:n.bitmap.clone(),metrics:n.metrics};return i})}_getAndCacheGlyphsPromise(e,r){return t._(this,void 0,void 0,function*(){var t;null!=(t=this.entries)[e]||(t[e]={glyphs:{},requests:{},ranges:{}});let i=this.entries[e],n=i.glyphs[r];return void 0!==n?{stack:e,id:r,glyph:n}:!this.url||this._charUsesLocalIdeographFontFamily(r)?(n=i.glyphs[r]=this._drawGlyph(i,e,r),{stack:e,id:r,glyph:n}):yield this._downloadAndCacheRangePromise(e,r)})}_downloadAndCacheRangePromise(e,r){return t._(this,void 0,void 0,function*(){var i;let n=this.entries[e],o=Math.floor(r/256);if(n.ranges[o])return{stack:e,id:r,glyph:null};(i=n.requests)[o]||(i[o]=M.loadGlyphRange(e,o,this.url,this.requestManager));try{let t=yield n.requests[o];for(let e in t)n.glyphs[+e]=t[+e];return n.ranges[o]=!0,{stack:e,id:r,glyph:t[r]||null}}catch(a){let i=n.glyphs[r]=this._drawGlyph(n,e,r);return this._warnOnMissingGlyphRange(i,o,r,t.d(a)),{stack:e,id:r,glyph:i}}})}_warnOnMissingGlyphRange(e,r,i,n){let o=256*r,a=i.toString(16).padStart(4,"0").toUpperCase();t.w(`Unable to load glyph range ${r}, ${o}-${o+255}. Rendering codepoint U+${a} locally instead. ${n}`)}_charUsesLocalIdeographFontFamily(e){return!!this.localIdeographFontFamily&&t.r(e)}_drawGlyph(e,r,i){let n=r===I&&""!==this.localIdeographFontFamily&&this._charUsesLocalIdeographFontFamily(i),o=n?"ideographTinySDF":"tinySDF";e[o]||(e[o]=this._createTinySDF(n?this.localIdeographFontFamily:r));let a=e[o].draw(String.fromCodePoint(i)),s=/^\p{gc=Cf}+$/u.test(String.fromCodePoint(i));return{id:i,bitmap:new t.t({width:a.width||60,height:a.height||60},a.data),metrics:{width:s?0:a.glyphWidth/2||24,height:a.glyphHeight/2||24,left:a.glyphLeft/2+.5||0,top:a.glyphTop/2-27.5||-8,advance:s?0:a.glyphAdvance/2||24,isDoubleResolution:!0}}}_createTinySDF(e){let t=e?e.split(","):[];t.push("sans-serif");let r=t.map(e=>/[-\w]+/.test(e)?e:`'${CSS.escape(e)}'`).join(",");return new M.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:r,fontWeight:this._fontWeight(t[0]),fontStyle:this._fontStyle(t[0]),lang:this.lang})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let t;for(let[r,i]of Object.entries({thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950}))RegExp(`\\b${r}\\b`,"i").test(e)&&(t=`${i}`);return t}destroy(){for(let e in this.entries){let t=this.entries[e];t.tinySDF=null,t.ideographTinySDF=null,t.glyphs={},t.requests={},t.ranges={}}this.entries={}}}M.loadGlyphRange=function(e,r,i,n){return t._(this,void 0,void 0,function*(){let o=256*r,a=o+255,s=yield n.transformRequest(i.replace("{fontstack}",e).replace("{range}",`${o}-${a}`),"Glyphs"),l=yield t.o(s,new AbortController);if(!(null==l?void 0:l.data))throw Error(`Could not load glyph range. range: ${r}, ${o}-${a}`);let u={};for(let e of t.q(l.data))u[e.id]=e;return u})},M.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:i=.25,fontFamily:n="sans-serif",fontWeight:o="normal",fontStyle:a="normal",lang:s=null}={}){this.buffer=t,this.radius=r,this.cutoff=i,this.lang=s;let l=this.size=e+4*t,u=this._createCanvas(l),c=this.ctx=u.getContext("2d",{willReadFrequently:!0});c.font=`${a} ${o} ${e}px ${n}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(e){if("u">typeof OffscreenCanvas)return new OffscreenCanvas(e,e);let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:i,actualBoundingBoxLeft:n,actualBoundingBoxRight:o}=this.ctx.measureText(e),a=Math.ceil(r),s=Math.floor(n),l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o)-s)),u=Math.max(0,Math.min(this.size-this.buffer,a+Math.ceil(i))),c=l+2*this.buffer,h=u+2*this.buffer,d=Math.max(c*h,0),p=new Uint8ClampedArray(d),f={data:p,width:c,height:h,glyphWidth:l,glyphHeight:u,glyphTop:a,glyphLeft:s,glyphAdvance:t};if(0===l||0===u)return f;let{ctx:m,buffer:g,gridInner:y,gridOuter:v}=this;this.lang&&(m.lang=this.lang),m.clearRect(g,g,l,u),m.fillText(e,g-s,g+a);let b=m.getImageData(g,g,l,u);v.fill(1e20,0,d),y.fill(0,0,d);let _=3;for(let e=0;e<u;e++){let t=(e+g)*c+g;for(let e=0;e<l;e++,_+=4,t++){let e=b.data[_];if(0===e)continue;let r=C[e];v[t]=Math.max(0,r),y[t]=Math.max(0,-r)}}E(v,0,0,c,h,c,this.f,this.v,this.z),E(y,g,g,l,u,c,this.f,this.v,this.z);let x=255/this.radius,A=255*(1-this.cutoff);for(let e=0;e<d;e++){let t=Math.sqrt(v[e])-Math.sqrt(y[e]);p[e]=Math.round(A-x*t)}return f}};class k{constructor(){this.specification=t.x.light.position}possiblyEvaluate(e,r){return t.G(e.expression.evaluate(r))}interpolate(e,r,i){return{x:t.H.number(e.x,r.x,i),y:t.H.number(e.y,r.y,i),z:t.H.number(e.z,r.z,i)}}}class O extends t.E{constructor(e){super(),o||(o=new t.u({anchor:new t.D(t.x.light.anchor),position:new k,color:new t.D(t.x.light.color),intensity:new t.D(t.x.light.intensity)}
170)),this._transitionable=new t.y(o,void 0),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,r={}){if(!this._validate(t.z,e,r))for(let r in e){let i=e[r];r.endsWith(t.B)?this._transitionable.setTransition(r.slice(0,-t.B.length),i):this._transitionable.setValue(r,i)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,i){return!1!==(null==i?void 0:i.validate)&&t.C(this,e.call(t.F,{value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.x}))}}let D=new t.u({"sky-color":new t.D(t.x.sky["sky-color"]),"horizon-color":new t.D(t.x.sky["horizon-color"]),"fog-color":new t.D(t.x.sky["fog-color"]),"fog-ground-blend":new t.D(t.x.sky["fog-ground-blend"]),"horizon-fog-blend":new t.D(t.x.sky["horizon-fog-blend"]),"sky-horizon-blend":new t.D(t.x.sky["sky-horizon-blend"]),"atmosphere-blend":new t.D(t.x.sky["atmosphere-blend"])});class R extends t.E{constructor(e){super(),this._transitionable=new t.y(D,void 0),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new t.J(0))}setSky(e,r={}){if(!this._validate(t.K,e,r))for(let r in e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0}),e){let i=e[r];r.endsWith(t.B)?this._transitionable.setTransition(r.slice(0,-t.B.length),i):this._transitionable.setValue(r,i)}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,i={}){return!1!==(null==i?void 0:i.validate)&&t.C(this,e.call(t.F,t.e({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.x})))}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}}class L{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,t){var r;let i=e.join(",")+String(t);return(r=this.dashEntry)[i]||(r[i]=this.addDash(e,t)),this.dashEntry[i]}getDashRanges(e,t,r){let i=[],n=e.length%2==1?-e[e.length-1]*r:0,o=e[0]*r,a=!0;i.push({left:n,right:o,isDash:a,zeroLength:0===e[0]});let s=e[0];for(let t=1;t<e.length;t++){a=!a;let l=e[t];n=s*r,s+=l,o=s*r,i.push({left:n,right:o,isDash:a,zeroLength:0===l})}return i}addRoundDash(e,t,r){let i=t/2;for(let t=-r;t<=r;t++){let n=this.width*(this.nextRow+r+t),o=0,a=e[0];for(let s=0;s<this.width;s++){let l;s/a.right>1&&(a=e[++o]);let u=Math.min(Math.abs(s-a.left),Math.abs(s-a.right)),c=t/r*(i+1);if(a.isDash){let e=i-Math.abs(c);l=Math.sqrt(u*u+e*e)}else l=i-Math.sqrt(u*u+c*c);this.data[n+s]=Math.max(0,Math.min(255,l+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){let r=e[t],i=e[t+1];r.zeroLength?e.splice(t,1):i&&i.isDash===r.isDash&&(i.left=r.left,e.splice(t,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let i=this.width*this.nextRow,n=0,o=e[0];for(let t=0;t<this.width;t++){t/o.right>1&&(o=e[++n]);let r=Math.min(Math.abs(t-o.left),Math.abs(t-o.right));this.data[i+t]=Math.max(0,Math.min(255,(o.isDash?r:-r)+128))}}addDash(e,r){let i=7*!!r,n=2*i+1;if(this.nextRow+n>this.height)return t.w("LineAtlas out of space"),null;let o=0;for(let t of e)o+=t;if(0!==o){let t=this.width/o,n=this.getDashRanges(e,this.width,t);r?this.addRoundDash(n,t,i):this.addRegularDash(n)}let a={y:this.nextRow+i,height:2*i,width:o};return this.nextRow+=n,this.dirty=!0,a}bind(e){let t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}}let B="maplibre_preloaded_worker_pool";class F{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];
170this.workers.length<F.workerCount;)this.workers.push(new Worker(t.c.WORKER_URL));return this.active[e]=!0,this.workers.slice()}release(e){if(delete this.active[e],0===this.numActive()){for(let e of this.workers)e.terminate();this.workers=null}}isPreloaded(){return!!this.active[B]}numActive(){return Object.keys(this.active).length}}let j=Math.floor(v.hardwareConcurrency/2);function z(){return a||(a=new F),a}F.workerCount=t.L(globalThis)?Math.max(Math.min(j,3),1):1;class N{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r;let i=this.workerPool.acquire(r);for(let e=0;e<i.length;e++){let n=new t.N(i[e],r);n.name=`Worker ${e}`,this.actors.push(n)}if(!this.actors.length)throw Error("No actors found")}broadcast(e,t){let r=[];for(let i of this.actors)r.push(i.sendAsync({type:e,data:t}));return Promise.all(r)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){for(let e of this.actors)e.remove();this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,t){for(let r of this.actors)r.registerMessageHandler(e,t)}unregisterMessageHandler(e){for(let t of this.actors)t.unregisterMessageHandler(e)}}function G(){return s||(s=new N(z(),t.M)).registerMessageHandler("GR",(e,r,i)=>t.m(r,i)),s}function V(e,t){let r=e.tileID,i=t.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}function U(e,t){let r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i}function H(e,r,i,n){return t._(this,void 0,void 0,function*(){let o=e;if(e.url?o=(yield t.k((yield r.transformRequest(e.url,"Source")),i)).data:yield v.frameAsync(i,n),!o)return null;let a=t.V(t.e(o,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in o&&o.vector_layers&&(a.vectorLayerIds=o.vector_layers.map(e=>e.id)),a})}class W{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof t.W?new t.W(e.lng,e.lat):t.W.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.W?new t.W(e.lng,e.lat):t.W.convert(e),this}extend(e){let r,i,n=this._sw,o=this._ne;if(e instanceof t.W)r=e,i=e;else{if(!(e instanceof W))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(W.convert(e)):this.extend(t.W.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.W.convert(e)):this;if(r=e._sw,i=e._ne,!r||!i)return this}return n||o?(n.lng=Math.min(r.lng,n.lng),n.lat=Math.min(r.lat,n.lat),o.lng=Math.max(i.lng,o.lng),o.lat=Math.max(i.lat,o.lat)):(this._sw=new t.W(r.lng,r.lat),this._ne=new t.W(i.lng,i.lat)),this}getCenter(){return new t.W((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 t.W(this.getWest(),this.getNorth())}getSouthEast(){return new t.W(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(e){let{lng:r,lat:i}=t.W.convert(e),n=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=i&&i<=this._ne.lat&&n}intersects(e){if(!((e=W.convert(e)).getNorth()>=this.getSouth()&&e.getSouth()<=this.getNorth()))return!1;let r=Math.abs(this.getEast()-this.getWest()),i=Math.abs(e.getEast()-e.getWest());if(r>=360||i>=360)return!0;let n=t.X(this.getWest(),-180,180),o=t.X(this.getEast(),-180,180),a=t.X(e.getWest(),-180,180),s=t.X(e.getEast(),-180,180),l=n>o,u=a>s;return!(!l||!u)||(l?s>=n||a<=o:u?o>=a||n<=s:a<=o&&s>=n)}static convert(e){return e instanceof W?e:e?new W(e):e}static fromLngLat(e,r=0){let i=360*r/0x2637f09,n=i/Math.cos(Math.PI/180*e.lat);return new W(new t.W(e.lng-n,e.lat-i),new t.W(e.lng+n,e.lat+i))}adjustAntiMeridian(){let e=new t.W(this._sw.lng,this._sw.lat),r=new t.W(this._ne.lng,this._ne.lat);return new W(e,e.lng>r.lng?new t.W(r.lng+360,r.lat):r)}}class q{constructor(e,t,r){this.bounds=W.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}
170validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let r=Math.pow(2,e.z),i=Math.floor(t.Z(this.bounds.getWest())*r),n=Math.floor(t.Y(this.bounds.getNorth())*r),o=Math.ceil(t.Z(this.bounds.getEast())*r),a=Math.ceil(t.Y(this.bounds.getSouth())*r);return e.x>=i&&e.x<o&&e.y>=n&&e.y<a}}class Z extends t.E{constructor(e,r,i,n){if(super(),this.id=e,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.e(this,t.V(r,["url","scheme","tileSize","promoteId","encoding"])),this._options=t.e({type:"vector"},r),this._collectResourceTiming=r.collectResourceTiming,512!==this.tileSize)throw Error("vector tile sources must have a tileSize of 512");this.setEventedParent(n)}load(){return t._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let r=yield H(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,r&&(t.e(this,r),r.bounds&&(this.tileBounds=new q(r.bounds,this.minzoom,this.maxzoom)),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(e){this._tileJSONRequest=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:yield this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.t
170ype,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(e),etag:e.etag};r.request.collectResourceTiming=this._collectResourceTiming;let i="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise((t,r)=>{e.reloadPromise={resolve:t,reject:r}})}else e.actor=this.dispatcher.getActor(),i="LT";e.abortController=new AbortController;try{let t=yield e.actor.sendAsync({type:i,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t);let n={};return(null==t?void 0:t.etagUnmodified)&&(n.unmodified=!0),n}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return t._(this,void 0,void 0,function*(){if(e.tileID.canonical.z<=this.maxzoom||void 0===this.map._zoomLevelsToOverscale)return;let t=e.tileID.scaledTo(this.maxzoom).canonical,r=t.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:t,overzoomRequest:yield this.map._requestManager.transformRequest(r,"Tile")}})}_afterTileLoadWorkerResponse(e,t){if((null==t?void 0:t.resourceTiming)&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.etag=null==t?void 0:t.etag,e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.t
170ype,source:this.id}}))})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class $ extends t.E{constructor(e,r,i,n){super(),this.id=e,this.dispatcher=i,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=t.e({type:"raster"},r),t.e(this,t.V(r,["url","scheme","tileSize"]))}load(){return t._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let r=yield H(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,r&&(t.e(this,r),r.bounds&&(this.tileBounds=new q(r.bounds,this.minzoom,this.maxzoom)),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(e){this._tileJSONRequest=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return t.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let i=yield p.getImage((yield this.map._requestManager.transformRequest(r,"Tile")),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(null==i?void 0:i.data){this.map._refreshExpiredTiles&&(i.cacheControl||i.expires)&&e.setExpiryData({cacheControl:i.cacheControl,expires:i.expires});let r=this.map.painter.context,n=r.gl,o=i.data;e.texture=this.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.T(r,o,n.RGBA,{useMipmap:!0}),e.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE,n.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class K extends ${constructor(e,r,i,n){super(e,r,i,n),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i=yield this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield p.getImage(i,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(null==r?void 0:r.data){let i=r.data;this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let n=t.b(i)&&t.a0()?i:yield this.readImageNow(i),o={type:this.type,uid:e.uid,source:this.id,rawImageData:n,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&"expired"!==e.state&&"reloading"!==e.state)return;e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:o}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}readImageNow(e){return t._(this,void 0,void 0,function*(){if("u">typeof VideoFrame&&t.a1()){let r=e.width+2,i=e.height+2;try{return new t.R({width:r,height:i},(yield t.a2(e,-1,-1,r,i)))}catch(e){}}return v.getImageData(e,1)})}_getNeighboringTiles(e){let r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,o=0===r.x?e.wrap-1:e.wrap,a=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,l={};return l[new t.a3(e.overscaledZ,o,r.z,n,r.y).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(l[new t.a3(e.overscaledZ,o,r.z,n,r.y-1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1<i&&(l[new t.a3(e.overscaledZ,o,r.z,n,r.y+1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,a,r.y+1).key]={backfilled:!1}),l}unloadTile(e){return t._(this,void 0,void 0,function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.t
170ype,uid:e.uid,source:this.id}}))})}}function X(e,t){return t?e.properties[t]:e.id}function Y(e){var t,r;if(!e)return{};let i={};return i.removeAll=e.removeAll,i.remove=new Set(e.remove||[]),i.add=new Map(null==(t=e.add)?void 0:t.map(e=>[e.id,e])),i.update=new Map(null==(r=e.update)?void 0:r.map(e=>[e.id,e])),i}function Q(e){return"GeometryCollection"===e.type?e.geometries.flatMap(e=>Q(e)):function e(t){return t&&0!==t.length?"number"==typeof t[0]?[t]:t.flatMap(t=>e(t)):[]}(e.coordinates)}function J(e){let t,r=new W;switch(e.type){case"FeatureCollection":t=e.features.flatMap(e=>Q(e.geometry));break;case"Feature":t=Q(e.geometry);break;default:t=Q(e)}if(0===t.length)return r;for(let e of t){let[t,i]=e;r.extend([t,i])}return r}class ee extends t.E{constructor(e,r,i,n){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:r.data},this.actor=i.getActor(),this.setEventedParent(n),this._data="string"==typeof r.data?{url:r.data}:{geojson:r.data},this._options=t.e({},r),this._collectResourceTiming=r.collectResourceTiming,void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type),r.attribution&&(this.attribution=r.attribution),this.promoteId=r.promoteId,void 0!==r.clusterMaxZoom&&this.maxzoom<=r.clusterMaxZoom&&t.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${r.clusterMaxZoom}".`),this.workerOptions=t.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(void 0!==r.buffer?r.buffer:128),tolerance:this._pixelsToTileUnits(void 0!==r.tolerance?r.tolerance:.375),extent:t.a6,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1,promoteId:"string"==typeof r.promoteId?r.promoteId:void 0,cluster:r.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(r.clusterMaxZoom),minPoints:Math.max(2,r.clusterMinPoints||2),extent:t.a6,radius:this._pixelsToTileUnits(r.clusterRadius||50),log:!1,generateId:r.generateId||!1}},clusterProperties:r.clusterProperties,filter:r.filter},r.workerOptions)}_hasPendingWorkerUpdate(){return void 0!==this._pendingWorkerUpdate.data||void 0!==this._pendingWorkerUpdate.diff||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(e){return e*(t.a6/this.tileSize)}_getClusterMaxZoom(e){let r=e?Math.round(e):this.maxzoom-1;return Number.isInteger(e)||void 0===e||t.w(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${r}"`),r}load(){return t._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e,t){this._data="string"==typeof e?{url:e}:{geojson:e},this._pendingWorkerUpdate={data:e};let r=this._updateWorkerData();return t?r:this}updateData(e,t){this._pendingWorkerUpdate.diff=function(e,t){let r;if(!e)return t||{};if(!t)return e||{};let i=Y(e),n=Y(t);for(let e of(n.removeAll&&(i.add.clear(),i.update.clear(),i.remove.clear(),n.remove.clear()),n.remove))i.add.delete(e),i.update.delete(e);for(let[e,t]of n.update){let r=i.update.get(e);r&&(n.update.set(e,function(e,t){let r={id:e.id};if(t.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete t.removeProperties),t.removeProperties)for(let r of t.removeProperties){let t=e.addOrUpdateProperties.findIndex(e=>e.key===r);t>-1&&e.addOrUpdateProperties.splice(t,1)}return(e.removeAllProperties||t.removeAllProperties)&&(r.removeAllProperties=!0),(e.removeProperties||t.removeProperties)&&(r.removeProperties=[...e.removeProperties||[],...t.removeProperties||[]]),(e.addOrUpdateProperties||t.addOrUpdateProperties)&&(r.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...t.addOrUpdateProperties||[]]),(e.newGeometry||t.newGeometry)&&(r.newGeometry=t.newGeometry||e.newGeometry),r}(r,t)),i.update.delete(e))}let o={};if((i.removeAll||n.removeAll)&&(o.removeAll=!0),o.remove=new Set([...i.remove,...n.remove]),o.add=new Map([...i.add,...n.add]),o.update=new Map([...i.update,...n.update]),o.remove.size&&o.add.size)for(let e of o.add.keys())o.remove.delete(e);return r={},o.removeAll&&(r.removeAll=o.removeAll),o.remove&&(r.remove=Array.from(o.remove)),o.add&&(r.add=Array.from(o.add.values())
170),o.update&&(r.update=Array.from(o.update.values())),r}(this._pendingWorkerUpdate.diff,e);let r=this._updateWorkerData();return t?r:this}getData(){return t._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return t._(this,void 0,void 0,function*(){return J((yield this.getData()))})}setClusterOptions(e){return this.workerOptions.geojsonVtOptions.cluster=e.cluster,void 0!==e.clusterRadius&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),void 0!==e.clusterMaxZoom&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(e.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,t,r){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:t,offset:r}})}_updateWorkerData(){return t._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void t.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:e,diff:r,updateCluster:i}=this._pendingWorkerUpdate,n=this._getLoadGeoJSONParameters(e,r,i);void 0!==e?this._pendingWorkerUpdate.data=void 0:r?this._pendingWorkerUpdate.diff=void 0:i&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(n)})}_getLoadGeoJSONParameters(e,r,i){return t._(this,void 0,void 0,function*(){let n=t.e({type:this.type},this.workerOptions);return"string"==typeof e?(n.request=yield this.map._requestManager.transformRequest(v.resolveURL(e),"Source"),n.request.collectResourceTiming=this._collectResourceTiming,n):void 0!==e?(n.data=e,n):r?(n.dataDiff=r,n):i?(n.updateCluster=!0,n):void 0})}_dispatchWorkerUpdate(e){return t._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new t.n("dataloading",{dataType:"source"}));try{let r=yield e,i=yield this.actor.sendAsync({type:"LD",data:r});if(this._isUpdatingWorker=!1,this._removed||i.abandoned)return void this.fire(new t.n("dataabort",{dataType:"source"}));i.data&&(this._data={geojson:i.data});let n=this._applyDiffToSource(r.dataDiff),o=this._getShouldReloadTileOptions(n),a={dataType:"source"};this._applyResourceTiming(a,i),this.fire(new t.n("data",Object.assign(Object.assign({},a),{sourceDataType:"metadata"}))),this.fire(new t.n("data",Object.assign(Object.assign({},a),{sourceDataType:"content",shouldReloadTileOptions:o})))}catch(e){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new t.n("dataabort",{dataType:"source"}));this.fire(new t.l(t.d(e)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(e,r){var i;if(!this._collectResourceTiming)return;let n=null==(i=r.resourceTiming)?void 0:i[this.id];if(!n)return;let o=n.slice(0);(null==o?void 0:o.length)&&t.e(e,{resourceTiming:o})}_applyDiffToSource(e){if(!e)return;let t="string"==typeof this.promoteId?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let e=function(e,t){let r=new Map;if(null==e||null==e.type)return r;if("Feature"===e.type){let i=X(e,t);if(null==i)return;return r.set(i,e),r}if("FeatureCollection"===e.type){let i=new Set;for(let n of e.features){let e=X(n,t);if(null==e||i.has(e))return;i.add(e),r.set(e,n)}return r}}(this._data.geojson,t);if(!e)throw Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:e}}if(!this._data.updateable)return;let r=function(e,t,r){var i,n;let o=[];if(t.removeAll)e.clear();else if(t.remove)for(let r of t.remove){let t=e.get(r);t&&(o.push(t.geometry),e.delete(r))}if(t.add)for(let i of t.add){let t=X(i,r);if(null==t)continue;let n=e.get(t);n&&o.push(n.geometry),o.push(i.geometry),e.set(t,i)}if(t.update)for(let r of t.update){let t=e.get(r.id);if(!t)continue;let a=!!r.newGeometry,s=r.removeAllProperties||(null==(i=r.removeProperties)?void 0:i.length)>0||(null==(n=r.addOrUpdateProperties)?void 0:n.length)>0;if(!a&&!s)continue;o.push(t.geometry);let l=Object.assign({},t);if(e.set(r.id,l),a&&(o.push(r.newGeometry),l.geometry=r.newGeometry),s){if(l.properties=r.removeAllProperties?{}:Object.assign({},l.properties||{}),r.removeProperties)for(let e of r.removeProperties)delete l.properties[e];if(r.addOrUpdateProperties)for(let{key:e,value:t}of r.addOrUpdateProperties)l.properties[e]=t}}return o}(this._data.updateable,e,t);return e.removeAll||this._options.cluster?void 0:r}_getShouldReloadTileOptions(e){if(e)return{affectedBounds:e.filter(Boolean).map(e=>J(e))}}shouldReloadTile(e,{affectedBounds:r}){if("loading"===e.state)return!0;
170if("unloaded"===e.state)return!1;let{buffer:i,extent:n}=this.workerOptions.geojsonVtOptions,o=function({x:e,y:r,z:i},n=0){return new W([t.a4((e-n)/Math.pow(2,i)),t.a5((r+1+n)/Math.pow(2,i))],[t.a4((e+1+n)/Math.pow(2,i)),t.a5((r-n)/Math.pow(2,i))])}(e.tileID.canonical,i/n);for(let e of r)if(o.intersects(e))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.actor?"RT":"LT";e.actor=this.actor;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;let i=yield this.actor.sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(i,this.map.painter,"RT"===t)})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.t
170ype,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class et extends t.E{constructor(e,t,r,i){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=t}load(e){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let t=yield p.getImage((yield this.map._requestManager.transformRequest(this.url,"Image")),this._request);this._request=null,this._loaded=!0,(null==t?void 0:t.data)&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading())}catch(e){this._request=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}updateImage(e){return e.url&&(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>this.texture=null)),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){var r;let i,n,o;this.coordinates=e;let a=e.map(t.a7.fromLngLat);return this.tileID=(o=Math.pow(2,n=Math.max(0,Math.floor(-Math.log(Math.max((i=t.a8.fromPoints(a)).width(),i.height()))/Math.LN2))),new t.aa(n,Math.floor((i.minX+i.maxX)/2*o),Math.floor((i.minY+i.maxY)/2*o))),this.terrainTileRanges=this._getOverlappingTileRanges(a),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=a.map(e=>this.tileID.getTilePoint(e)._round()),this.flippedWindingOrder=((r=this.tileCoords)[1].x-r[0].x)*(r[2].y-r[0].y)-(r[1].y-r[0].y)*(r[2].x-r[0].x)<0,this.fire(new t.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,r=e.gl;this.texture||(this.texture=new t.T(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return t._(this,void 0,void 0,function*(){var t;(null==(t=this.tileID)?void 0:t.equals(e.tileID.canonical))?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:r,minY:i,maxX:n,maxY:o}=t.a8.fromPoints(e),a={};for(let e=0;e<=t.a9;e++){let t=Math.pow(2,e),s=Math.floor(r*t),l=Math.floor(i*t),u=Math.floor(n*t),c=Math.floor(o*t),h=(s%t+t)%t,d=u%t,p=Math.floor(s/t),f=Math.floor(u/t);a[e]={minWrap:p,maxWrap:f,minTileXWrapped:h,maxTileXWrapped:d,minTileY:l,maxTileY:c}}return a}}
170class er extends et{constructor(e,t,r,i){super(e,t,r,i),this._onPlayingHandler=()=>{var e;null==(e=this.map)||e.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=t}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let e=this.options;for(let t of(this.urls=[],e.urls))this.urls.push((yield this.map._requestManager.transformRequest(t,"Source")).url);try{let e=yield t.ab(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new t.l(t.d(e)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;e<r.start(0)||e>r.end(0)?this.fire(new t.l(new t.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.T(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ei extends et{constructor(e,r,i,n){super(e,r,i,n),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new t.l(new t.ac(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.l(new t.ac(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.l(new t.ac(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof HTMLCanvasElement||this.fire(new t.l(new t.ac(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.l(new t.ac(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){return t._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.l(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(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;let r=this.map.painter.context,i=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new t.T(r,this.canvas,i.RGBA,{premultiply:!0}),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let en={},eo=e=>{switch(e){case"geojson":return ee;case"image":return et;case"raster":return $;case"raster-dem":return K;case"vector":return Z;case"video":return er;case"canvas":return ei}return en[e]},ea="RTLPluginLoaded";class es extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=G()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(e=>{throw this.status="error",e})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return t._(this,arguments,void 0,function*(e,t=!1){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=v.resolveURL(e),!this.url)throw Error(`requested url ${e}
170 is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.n(ea))})}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let el=null;function eu(){return el||(el=new es),el}(c=f||(f={}))[c.Base=0]="Base",c[c.Parent=1]="Parent",(h=m||(m={}))[h.Departing=0]="Departing",h[h.Incoming=1]="Incoming";class ec{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=t.ad(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:t,fadingParentID:r,fadeEndTime:i}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=t,this.fadingParentID=r,this.fadeEndTime=i}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=_(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,r,i){if(!0!==(null==e?void 0:e.etagUnmodified))if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(let n in e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){let r={};if(!t)return r;for(let i of e){let e=i.layerIds.map(e=>t.getLayer(e)).filter(Boolean);if(0!==e.length)for(let t of(i.layers=e,i.stateDependentLayerIds&&(i.stateDependentLayers=i.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0])),e))r[t.id]=i}return r}(e.buckets,null==r?void 0:r.style),this.hasSymbolBuckets=!1,this.buckets){let e=this.buckets[n];if(e instanceof t.af){if(this.hasSymbolBuckets=!0,!i)break;e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.af&&r.hasRTLText){this.hasRTLText=!0,eu().lazyLoad();break}}for(let e in this.queryPadding=0,this.buckets){let t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(e).queryRadius(t))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}else this.collisionBoxArray=new t.ae;else this.state="loaded"}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let r=this.buckets[t];r.uploadPending()&&r.upload(e)}let r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new t.T(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new t.T(e,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,i,n,o,a,s,l,u,c){var h;return(null==(h=this.latestFeatureIndex)?void 0:h.rawTileData)?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:o,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:a,queryPadding:this.queryPadding*l,getElevation:c},e,t,r):{}}querySourceFeatures(e,r){let i=this.latestFeatureIndex;if(!(null==i?void 0:i.rawTileData))return;let n=i.loadVTLayers(),o=(null==r?void 0:r.sourceLayer)?r.sourceLayer:"",a=n[t.ag]||n[o];if(!a)return;let s=t.ah(null==r?void 0:r.filter,null==r?void 0:r.globalState),{z:l,x:u,y:c}=this.tileID.canonical,h={z:l,x:u,y:c};for(let r=0;r<a.length;r++){let n=a.feature(r);if(s.needGeometry){let e=t.ai(n,!0);
170if(!s.filter(new t.J(this.tileID.overscaledZ),e,this.tileID.canonical))continue}else if(!s.filter(new t.J(this.tileID.overscaledZ),n))continue;let d=i.getId(n,o),p=new t.aj(n,l,u,c,d);p.tile=h,e.push(p)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){let r=this.expirationTime;if(e.cacheControl){let r=t.ak(e.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){let e=Date.now(),t=!1;if(this.expirationTime>e)t=!1;else if(r)if(this.expirationTime<r)t=!0;else{let i=this.expirationTime-r;i?this.expirationTime=e+Math.max(i,3e4):t=!0}else t=!0;t?(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(),0x7fffffff)}setFeatureState(e,r){var i,n,o;if(!(null==(i=this.latestFeatureIndex)?void 0:i.rawTileData)||0===Object.keys(e).length)return;let a=this.latestFeatureIndex.loadVTLayers();for(let i in this.buckets){if(!r.style.hasLayer(i))continue;let s=this.buckets[i],l=s.layers[0].sourceLayer||t.ag,u=a[l],c=e[l];if(!u||!c||0===Object.keys(c).length)continue;s.update(c,u,(null==(n=this.imageAtlas)?void 0:n.patternPositions)||{},this.dashPositions||{});let h=null==(o=null==r?void 0:r.style)?void 0:o.getLayer(i);h&&(this.queryPadding=Math.max(this.queryPadding,h.queryRadius(s)))}}holdingForSymbolFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<_()}clearSymbolFadeHold(){this.symbolFadeHoldUntil=void 0}setSymbolHoldDuration(e){this.symbolFadeHoldUntil=_()+e}setDependencies(e,t){let r={};for(let e of t)r[e]=!0;this.dependencies[e]=r}hasDependency(e,t){for(let r of e){let e=this.dependencies[r];if(e){for(let r of t)if(e[r])return!0}}return!1}}class eh{constructor(){this.state={},this.stateChanges={},this.deletedStates={},this.revision=0}updateState(e,r,i){var n,o,a,s,l;let u=String(r);if((s=this.stateChanges)[e]||(s[e]={}),(l=this.stateChanges[e])[u]||(l[u]={}),t.e(this.stateChanges[e][u],i),null===this.deletedStates[e])for(let t in this.deletedStates[e]={},this.state[e])t!==u&&(this.deletedStates[e][t]=null);else if(null===(null==(n=this.deletedStates[e])?void 0:n[u]))for(let t in this.deletedStates[e][u]={},this.state[e][u])i[t]||(this.deletedStates[e][u][t]=null);else for(let t in i)null===(null==(a=null==(o=this.deletedStates[e])?void 0:o[u])?void 0:a[t])&&delete this.deletedStates[e][u][t]}removeFeatureState(e,t,r){var i,n,o;if(null===this.deletedStates[e])return;let a=String(t);if((n=this.deletedStates)[e]||(n[e]={}),r&&void 0!==t)null!==this.deletedStates[e][a]&&((o=this.deletedStates[e])[a]||(o[a]={}),this.deletedStates[e][a][r]=null);else if(void 0!==t)if(null==(i=this.stateChanges[e])?void 0:i[a])for(r in this.deletedStates[e][a]={},this.stateChanges[e][a])this.deletedStates[e][a][r]=null;else this.deletedStates[e][a]=null;else this.deletedStates[e]=null}getState(e,r){let i=String(r),n=t.e({},(this.state[e]||{})[i],(this.stateChanges[e]||{})[i]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){let t=this.deletedStates[e][r];if(null===t)return{};for(let e in t)delete n[e]}return n}initializeTileState(e,t){e.setFeatureState(this.state,t)}coalesceChanges(e,r){var i,n,o;let a={};for(let e in this.stateChanges){(i=this.state)[e]||(i[e]={});let r={};for(let i in this.stateChanges[e])(n=this.state[e])[i]||(n[i]={}),t.e(this.state[e][i],this.stateChanges[e][i]),r[i]=this.state[e][i];a[e]=r}for(let e in this.deletedStates){(o=this.state)[e]||(o[e]={});let r={};if(null===this.deletedStates[e])for(let t in this.state[e])r[t]={},this.state[e][t]={};else for(let t in this.deletedStates[e]){if(null===this.deletedStates[e][t])this.state[e][t]={};else for(let r of Object.keys(this.deletedStates[e][t]))delete this.state[e][t][r];r[t]=this.state[e][t]}a[e]||(a[e]={}),t.e(a[e],r)}this.stateChanges={},this.deletedStates={},0!==Object.keys(a).length&&(this.revision++,e.setFeatureState(a,r))}}function ed(e,r){let i=t.al(r.lat,-t.am,t.am);return new t.P(t.Z(r.lng)*e,t.Y(i)*e)}function ep(e,r){return new t.a7(r.x/e,r.y/e).toLngLat()}function ef(e){return e.cameraToCenterDistance*Math.min(.85*Math.tan(t.an(90-e.pitch)),Math.tan(t.an(89.25-e.pitch)))}function em(e,r){let i=e.canonical,n=r/t.ao(i.z),o=i.x+Math.pow(2,i.z)*e.wrap,a=t.a
170p(new Float64Array(16));return t.Q(a,a,[o*n,i.y*n,0]),t.S(a,a,[n/t.a6,n/t.a6,1]),a}function eg(e,r,i,n,o){let a=t.a7.fromLngLat(e,r),s=o*t.aq(1,e.lat),{x:l,y:u,z:c}=ey(i,n);return new t.a7(a.x+-(s*l),a.y+-(s*u),a.z+-(s*c))}function ey(e,r){let i=t.an(e),n=t.an(r),o=Math.cos(-i),a=Math.sin(i);return{x:a*Math.sin(n),y:-a*Math.cos(n),z:o}}function ev(e,t,r){let i=0,n=(r-t)/10;for(let o=0;o<10;o++)i+=n*Math.pow(Math.cos(t+(o+.5)/10*(r-t)),e);return i}function eb(e,r){return function(i,n,o,a,s){let l=2*((e-1)/t.ar(Math.cos(t.an(89.25-s))/Math.cos(t.an(89.25)))-1),u=Math.acos(o/a),c=2*ev(l-1,0,t.an(s/2)),h=Math.min(t.an(89.25),u+t.an(s/2)),d=ev(l-1,Math.min(h,u-t.an(s/2)),h),p=Math.atan(n/o),f=Math.hypot(n,o),m=i;return m+=t.ar(a/f/Math.max(.5,Math.cos(t.an(s/2)))),m+=l*t.ar(Math.cos(p))/2,m-=t.ar(Math.max(1,d/c/r))/2}}let e_=eb(9.314,3);function ex(e,r){return Math.max(0,(r.roundZoom?Math.round:Math.floor)(e.zoom+t.ar(e.tileSize/r.tileSize)))}function eA(e,r){let i=e.getCameraFrustum(),n=e.getClippingPlane(),o=e.screenPointToMercatorCoordinate(e.getCameraPoint()),a=t.a7.fromLngLat(e.center,e.elevation);o.z=a.z+Math.cos(e.pitchInRadians)*e.cameraToCenterDistance/e.worldSize;let s=e.getCoveringTilesDetailsProvider(),l=s.allowVariableZoom(e,r),u=ex(e,r),c=r.minzoom||0,h=void 0!==r.maxzoom?r.maxzoom:e.maxZoom,d=Math.min(Math.max(0,u),h),p=Math.pow(2,d),f=[p*o.x,p*o.y,0],m=[p*a.x,p*a.y,0],g=Math.hypot(a.x-o.x,a.y-o.y),y=Math.abs(a.z-o.z),v=Math.hypot(g,y),b=e=>({zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),_=[],x=[];if(e.renderWorldCopies&&s.allowWorldCopies())for(let e=1;e<=3;e++)_.push(b(-e)),_.push(b(e));for(_.push(b(0));_.length>0;){let p=_.pop(),g=p.x,b=p.y,A=p.fullyVisible,w={x:g,y:b,z:p.zoom},S=s.getTileBoundingVolume(w,p.wrap,e.elevation,r);if(!A){let e=function(e,t,r){let i=t.intersectsFrustum(e);if(!r||0===i)return i;let n=t.intersectsPlane(r);return 0===n?0:2===i&&2===n?2:1}(i,S,n);if(0===e)continue;A=2===e}let T=s.distanceToTile2d(o.x,o.y,w,S),C=u;l&&(C=(r.calculateTileZoom||e_)(e.zoom+t.ar(e.tileSize/r.tileSize),T,y,v,e.fov));let E=Math.min(C=Math.max(0,C=(r.roundZoom?Math.round:Math.floor)(C)),h);if(p.wrap=s.getWrap(a,w,p.wrap),p.zoom>=E){if(p.zoom<c)continue;let e=d-p.zoom,i=f[0]-.5-(g<<e),n=f[1]-.5-(b<<e),o=r.reparseOverscaled?Math.max(p.zoom,C):p.zoom;x.push({tileID:new t.a3(p.zoom===h?o:p.zoom,p.wrap,p.zoom,g,b),distanceSq:t.as([m[0]-.5-g,m[1]-.5-b]),tileDistanceToCamera:Math.sqrt(i*i+n*n)})}else for(let e=0;e<4;e++)_.push({zoom:p.zoom+1,x:(g<<1)+e%2,y:(b<<1)+(e>>1),wrap:p.wrap,fullyVisible:A})}return x.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}let ew=t.a8.fromPoints([new t.P(0,0),new t.P(t.a6,t.a6)]);function eS(e){return"raster"===e||"image"===e||"video"===e}function eT(e,t,r,i,n,o,a){if(r[0].overscaledZ>=o)return!1;let s=!1;for(let o of r){let r=e.getLoadedTile(o);if(!r)continue;let{fadingRole:l,fadingDirection:u,fadingParentID:c}=r;l===f.Base&&u===m.Departing&&c||(r.setCrossFadeLogic({fadingRole:f.Base,fadingDirection:m.Departing,fadingParentID:t.tileID,fadeEndTime:n+a}),t.setCrossFadeLogic({fadingRole:f.Parent,fadingDirection:m.Incoming,fadeEndTime:n+a})),i[o.key]=o,s=!0}return s}function eC(e,t){var r;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0;let i=t.tileID.canonical.x-e.tileID.canonical.x,n=t.tileID.canonical.y-e.tileID.canonical.y,o=Math.pow(2,e.tileID.canonical.z),a=t.tileID.key;0===i&&0===n||Math.abs(n)>1||(Math.abs(i)>1&&(1===Math.abs(i+o)?i+=o:1===Math.abs(i-o)&&(i-=o)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,i,n),(null==(r=e.neighboringTiles)?void 0:r[a])&&(e.neighboringTiles[a].backfilled=!0)))}class eE{constructor(){this._tiles={}}handleWrapJump(e){let t={};for(let r in this._tiles){let i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),t[i.tileID.key]=i}this._tiles=t}setFeatureState(e,t){for(let r in this._tiles)this._tiles[r].setFeatureState(e,t)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(e=>e.tileID).sort(t.au).map(e=>e.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,t){this._tiles[e]=t}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let t=this.getTileById(e.key);return(null==t?void 0:t.hasData())?t:null}isIdRenderable(e,t=!1){var r;return null==(r=this.getTileById(e))?void 0:r.isRenderable(t)}getRenderableIds(e=0,r){let i=[];for(let e of this.getAllIds())this.isIdRenderable(e,r)&&i.push(this.getTileById(e));return r?i.sort((r,i)=>{let n=r.tileID,o=i.tileID,a=new t.P(n.canonical.x,n.canonical.y)._rotate(-e),s=new t.P(o.canonical.x,o.canonical.y)._rotate(-e);return n.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x}).map(e=>e.tileID.key):i.map(e=>e.tileID).sort(t.au).map(e=>e.key)}}class eP extends t.E{constructor(e,r,i){super(),this.id=e,this.dispatcher=i,this.on("data",e=>{this._dataHandler(e)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((e,t,r,i)=>{let n=new(eo(t.type))(e,t,r,i);if(n.id!==e)throw Error(`Expected Source id to be ${e} instead of ${n.id}`);return n})(e,r,i,this),this._inViewTiles=new eE,this._outOfViewCache=new t.av(0,e=>this._unloadTile(e)),this._timers={}
170,this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new eh,this._didEmitContent=!1,this._updated=!1}onAdd(e){var t;this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,(null==(t=this._source)?void 0:t.onAdd)&&this._source.onAdd(e)}onRemove(e){var t;for(let e of this._inViewTiles.getAllTiles())e.unloadVectorData();this.clearTiles(),(null==(t=this._source)?void 0:t.onRemove)&&this._source.onRemove(e),this._inViewTiles=new eE}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,i){return t._(this,void 0,void 0,function*(){try{let t=yield this._source.loadTile(e);this._tileLoaded(e,r,i,t)}catch(r){e.state="errored",404!==r.status?this._source.fire(new t.l(t.d(r),{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.n("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){for(let t of(this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null),this._inViewTiles.getAllTiles()))t.upload(e),t.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(e){var t;return this._inViewTiles.getRenderableIds(null==(t=this.transform)?void 0:t.bearingInRadians,e)}hasRenderableParent(e){let t=e.overscaledZ-1;if(t>=this._source.minzoom){let r=this.getLoadedTile(e.scaledTo(t));if(r)return this._inViewTiles.isIdRenderable(r.tileID.key)}return!1}reload(e,t){if(this._paused)this._shouldReloadOnResume=!0;else for(let r of(this._outOfViewCache.reset(),this._inViewTiles.getAllIds())){let i=this._inViewTiles.getTileById(r);t&&!this._source.shouldReloadTile(i,t)||(e?this._reloadTile(r,"expired"):"errored"!==i.state&&this._reloadTile(r,"reloading"))}}_reloadTile(e,r){return t._(this,void 0,void 0,function*(){let t=this._inViewTiles.getTileById(e);t&&("loading"!==t.state&&(t.state=r),yield this._loadTile(t,e,r))})}_tileLoaded(e,r,i,n){e.timeAdded=_(),e.selfFading&&(e.fadeEndTime=e.timeAdded+this._rasterFadeDuration),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),(null==n?void 0:n.unmodified)||("raster-dem"===this.getSource().type&&e.dem&&function(e,t){var r,i,n;for(let o of t.getRenderableIds()){if(!(null==(r=e.neighboringTiles)?void 0:r[o]))continue;let a=t.getTileById(o);e.neighboringTiles[o].backfilled||eC(e,a),(null==(n=null==(i=a.neighboringTiles)?void 0:i[e.tileID.key])?void 0:n.backfilled)||eC(a,e)}}(e,this._inViewTiles),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.n("data",{dataType:"source",tile:e,coord:e.tileID})))}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._inViewTiles.getTileById(e)}_retainLoadedChildren(e,t){let r=this._getLoadedDescendents(t),i=new Set;for(let n of t){let t=r[n.key];if(!(null==t?void 0:t.length)){i.add(n);continue}let o=n.overscaledZ+eP.maxOverzooming,a=t.filter(e=>e.tileID.overscaledZ<=o);if(!a.length){i.add(n);continue}let s=Math.min(...a.map(e=>e.tileID.overscaledZ)),l=a.filter(e=>e.tileID.overscaledZ===s).map(e=>e.tileID);for(let t of l)e[t.key]=t;this._areDescendentsComplete(l,s,n.overscaledZ)||i.add(n)}return i}_getLoadedDescendents(e){var t;let r={};for(let i of this._inViewTiles.getAllTiles().filter(e=>e.hasData()))for(let n of e)i.tileID.isChildOf(n)&&(r[t=n.key]||(r[t]=[]),r[n.key].push(i));return r}_areDescendentsComplete(e,t,r){return 1===e.length&&e[0].isOverscaled()?e[0].overscaledZ===t:Math.pow(4,t-r)===e.length}getLoadedTile(e){return this._inViewTiles.getLoadedTile(e)}updateCacheSize(e){let r=Math.floor((Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1)*(null===this._maxTileC
170acheZoomLevels?t.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._outOfViewCache.setMaxSize(i)}handleWrapJump(e){let t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);this._prevLng=e,t&&(this._inViewTiles.handleWrapJump(t),this._resetTileReloadTimers())}update(e,r){let i;if(!this._sourceLoaded||this._paused)return;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new t.a3(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(i=eA(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:"vector"===this._source.type&&void 0!==this.map._zoomLevelsToOverscale?e.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(i=i.filter(e=>this._source.hasTile(e)))):i=[],this.usedForTerrain&&(i=this._addTerrainIdealTiles(i));let n=0===i.length&&!this._updated&&this._didEmitContent;this._updated=!0,n&&this.fire(new t.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let o=ex(e,this._source),a=this._updateRetainedTiles(i,o),s=eS(this._source.type);s&&this._rasterFadeDuration>0&&!r&&function(e,r,i,n,o,a,s){let l=_(),u=t.at(r);for(let t of r){let r=e.getTileById(t.key);r.fadingDirection!==m.Departing&&0!==r.fadeOpacity||r.resetFadeLogic(),function(e,t,r,i,n,o,a){if(!t.hasData())return!1;let{tileID:s,fadingRole:l,fadingDirection:u,fadingParentID:c}=t;if(l===f.Base&&u===m.Incoming&&c)return r[c.key]=c,!0;let h=Math.max(s.overscaledZ-n,o);for(let n=s.overscaledZ-1;n>=h;n--){let o=s.scaledTo(n),l=e.getLoadedTile(o);if(l)return t.setCrossFadeLogic({fadingRole:f.Base,fadingDirection:m.Incoming,fadingParentID:l.tileID,fadeEndTime:i+a}),l.setCrossFadeLogic({fadingRole:f.Parent,fadingDirection:m.Departing,fadeEndTime:i+a}),r[o.key]=o,!0}return!1}(e,r,i,l,n,o,s)||function(e,t,r,i,n,o){if(!t.hasData())return!1;let a=t.tileID.children(n),s=eT(e,t,a,r,i,n,o);if(s)return!0;for(let l of a)eT(e,t,l.children(n),r,i,n,o)&&(s=!0);return s}(e,r,i,l,a,s)||function(e,t,r,i){let n=e.tileID;return!!e.selfFading||!e.hasData()&&!!t.has(n)&&(e.setSelfFadeLogic(r+i),!0)}(r,u,l,s)||r.resetFadeLogic()}}(this._inViewTiles,i,a,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(a):this._cleanUpVectorTiles(a)}_cleanUpRasterTiles(e){for(let t of this._inViewTiles.getAllIds())e[t]||this._removeTile(t)}_cleanUpVectorTiles(e){for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);e[t]?r.clearSymbolFadeHold():r.hasSymbolBuckets?r.holdingForSymbolFade()?r.symbolFadeFinished()&&this._removeTile(t):r.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(t)}}_addTerrainIdealTiles(e){let t=[];for(let r of e)if(r.canonical.z>this._source.minzoom){let e=r.scaledTo(r.canonical.z-1);t.push(e);let i=r.scaledTo(Math.max(this._source.minzoom,Math.min(r.canonical.z,5)));t.push(i)}return e.concat(t)}releaseSymbolFadeTiles(){for(let e of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(e).holdingForSymbolFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){var r;let i=new Set;for(let t of e)this._addTile(t).hasData()||i.add(t);let n=e.reduce((e,t)=>(e[t.key]=t,e),{}),o=this._retainLoadedChildren(n,i),a={},s=Math.max(t-eP.maxUnderzooming,this._source.minzoom);for(let e of o){let t=this._inViewTiles.getTileById(e.key),i=null==t?void 0:t.wasRequested();for(let o=e.overscaledZ-1;o>=s;--o){let s=e.scaledTo(o);if(a[s.key])break;if(a[s.key]=!0,(t=this.getTile(s))||!i||(t=this._addTile(s)),t){let e=t.hasData();if((e||!(null==(r=this.map)?void 0:r.cancelPendingTileRequestsWhileZooming)||i)&&(n[s.key]=s),i=t.wasRequested(),e)break}}}return n}_addTile(e){let r=this._inViewTiles.getTileById(e.key);if(r)return r;(r=this._outOfViewCache.getAndRemove(e))&&(r.resetFadeLogic(),this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null));let i=r;return r||(r=new ec(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._inViewTiles.setTile(e.key,r),i||this._source.fire(new t.n("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,t){this._clearTileReloadTimer(e);let r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},r))}_clearTileReloadTimer(e){let t=this._timers[e];t&&(clearTimeout(t),delete this._timers[e])}_resetTileReloadTimers(){for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(e);this._setTileReloadTimer(e,t)}}refreshTiles(e){for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);(this._inViewTiles.isIdRenderable(t)||"errored"==r.state)&&e.some(e=>e.equals(r.tileID.canonical))&&this._reloadTile(t,"expired")}}_removeTile(e){let t=this._inViewTiles.getTileById(e);t&&(t.uses--,this._inViewTiles.deleteTileById(e),this._clearTileReloadTimer(e),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._outOfViewCache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){"source"===e.dataType&&("metadata"!==e.sourceDataType?"content"===e.sourceDataType&&this._sourceLoaded&&!this._paused&&(this.reload(e.sourceDataChanged,e.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){for(let e of(this._shouldReloadOnResume=!1,this._paused=!1,this._inViewTiles.getAllIds()))this._removeTile(e);this._outOfViewCache.reset()}tilesIn(e,r,i){let n=[],o=this.transform;if(!o)return n;let a=o.getCoveringTilesDetailsProvider().allowWorldCopies(),s=i?o.getCameraQueryGeometry(e):e,l=e=>o.screenPointToMercatorCoordinate(e,this.terrain),u=this.transformBbox(e,l,!a),c=this.transformBbox(s,l,!a),h=this.getIds(),d=t.a8.fromPoints(c);for(let e of h){let i=this._inViewTiles.getTileById(e);if(i.holdingForSymbolFade())continue;let s=a?[i.tileID]:[i.tileID.unwrapTo(-1),i.tileID.unwrapTo(0)],l=Math.pow(2,o.zoom-i.tileID.overscaledZ
170),h=r*i.queryPadding*t.a6/i.tileSize/l;for(let e of s){let r=d.map(r=>e.getTilePoint(new t.a7(r.x,r.y)));if(r.expandBy(h),r.intersects(ew)){let t=u.map(t=>e.getTilePoint(t)),r=c.map(t=>e.getTilePoint(t));n.push({tile:i,tileID:a?e:e.unwrapTo(0),queryGeometry:t,cameraQueryGeometry:r,scale:l})}}}return n}transformBbox(e,r,i){let n=e.map(r);if(i){let i=t.a8.fromPoints(e);i.shrinkBy(.001*Math.min(i.width(),i.height()));let o=i.map(r);t.a8.fromPoints(n).covers(o)||(n=n.map(e=>e.x>.5?new t.a7(e.x-1,e.y,e.z):e))}return n}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map(e=>this._inViewTiles.getTileById(e).tileID);return this.transform&&this.transform.populateCache(t),t}hasTransition(){return!!this._source.hasTransition()||eS(this._source.type)&&function(e,t){if(t<=0)return!1;let r=_();for(let t of e.getAllTiles())if(t.fadeEndTime>=r)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(e){this._rasterFadeDuration=e}setFeatureState(e,r,i){e||(e=t.ag),this._state.updateState(e,r,i)}removeFeatureState(e,r,i){e||(e=t.ag),this._state.removeFeatureState(e,r,i)}getFeatureState(e,r){return e||(e=t.ag),this._state.getState(e,r)}setDependencies(e,t,r){let i=this._inViewTiles.getTileById(e);i&&i.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(let r of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(r).hasDependency(e,t)&&this._reloadTile(r,"reloading");this._outOfViewCache.filter(r=>!r.hasDependency(e,t))}areTilesLoaded(){for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}}eP.maxUnderzooming=10,eP.maxOverzooming=3;class eI{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e<this.points.length;e++)this._distances[e]=this._distances[e-1]+this.points[e].dist(this.points[e-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(t||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(1===this.points.length)return this.points[0];e=t.al(e,0,1);let r=1,i=this._distances[r],n=e*this.paddedLength+this.padding;for(;i<n&&r<this._distances.length;)i=this._distances[++r];let o=r-1,a=this._distances[o],s=i-a,l=s>0?(n-a)/s:0;return this.points[o].mult(1-l).add(this.points[r].mult(l))}}function eM(e,t){let r=!0;return"always"===e||"never"!==e&&"never"!==t||(r=!1),r}class ek{constructor(e,t,r){let i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;e<this.xCellCount*this.yCellCount;e++)i.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,r,i,n){this._forEachCell(t,r,i,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)}insertCircle(e,t,r,i){this._forEachCell(t-i,r-i,t+i,r+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(i)}_insertBoxCell(e,t,r,i,n,o){this.boxCells[n].push(o)}_insertCircleCell(e,t,r,i,n,o){this.circleCells[n].push(o)}_query(e,t,r,i,n,o,a){if(r<0||e>this.width||i<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=i){if(n)return[{key:null,x1:e,y1:t,x2:r,y2:i}];for(let e=0;e<this.boxKeys.length;e++)s.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){let t=this.circles[3*e],r=this.circles[3*e+1],i=this.circles[3*e+2];s.push({key:this.circleKeys[e],x1:t-i,y1:r-i,x2:t+i,y2:r+i})}}else this._forEachCell(e,t,r,i,this._queryCell,s,{hitTest:n,overlapMode:o,seenUids:{box:{},circle:{}}},a);return s}query(e,t,r,i){return this._query(e,t,r,i,!1,null)}hitTest(e,t,r,i,n,o){return this._query(e,t,r,i,!0,n,o).length>0}hitTestCircle(e,t,r,i,n){let o=e-r,a=e+r,s=t-r,l=t+r;if(a<0||o>this.width||l<0||s>this.height)return!1;let u=[];
170return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:!0,overlapMode:i,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},n),u.length>0}_queryCell(e,t,r,i,n,o,a,s){let{seenUids:l,hitTest:u,overlapMode:c}=a,h=this.boxCells[n];if(null!==h){let n=this.bboxes;for(let a of h)if(!l.box[a]){l.box[a]=!0;let h=4*a,d=this.boxKeys[a];if(e<=n[h+2]+1e-6&&t<=n[h+3]+1e-6&&r>=n[h+0]-1e-6&&i>=n[h+1]-1e-6&&(!s||s(d))&&(!u||!eM(c,d.overlapMode))&&(o.push({key:d,x1:n[h],y1:n[h+1],x2:n[h+2],y2:n[h+3]}),u))return!0}}let d=this.circleCells[n];if(null!==d){let n=this.circles;for(let a of d)if(!l.circle[a]){l.circle[a]=!0;let h=3*a,d=this.circleKeys[a];if(this._circleAndRectCollide(n[h],n[h+1],n[h+2],e,t,r,i)&&(!s||s(d))&&(!u||!eM(c,d.overlapMode))){let e=n[h],t=n[h+1],r=n[h+2];if(o.push({key:d,x1:e-r,y1:t-r,x2:e+r,y2:t+r}),u)return!0}}}return!1}_queryCellCircle(e,t,r,i,n,o,a,s){let{circle:l,seenUids:u,overlapMode:c}=a,h=this.boxCells[n];if(null!==h){let e=this.bboxes;for(let t of h)if(!u.box[t]){u.box[t]=!0;let r=4*t,i=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(i))&&!eM(c,i.overlapMode))return o.push(!0),!0}}let d=this.circleCells[n];if(null!==d){let e=this.circles;for(let t of d)if(!u.circle[t]){u.circle[t]=!0;let r=3*t,i=this.circleKeys[t];if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(i))&&!eM(c,i.overlapMode))return o.push(!0),!0}}}_forEachCell(e,t,r,i,n,o,a,s){let l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(r),h=this._convertToYCellCoord(i);for(let d=l;d<=c;d++)for(let l=u;l<=h;l++)if(n.call(this,e,t,r,i,this.xCellCount*l+d,o,a,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,i,n,o){let a=i-e,s=n-t,l=r+o;return l*l>a*a+s*s}_circleAndRectCollide(e,t,r,i,n,o,a){let s=(o-i)/2,l=Math.abs(e-(i+s));if(l>s+r)return!1;let u=(a-n)/2,c=Math.abs(t-(n+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;let h=l-s,d=c-u;return h*h+d*d<=r*r}}let eO=t.O();function eD(e,r,i){var n,o,a,s,l;let u=t.O();if(!e){let{vecSouth:e,vecEast:t}=eR(r),i=y();i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],(l=(n=i[0])*(s=i[3])-(a=i[2])*(o=i[1]))&&(i[0]=s*(l=1/l),i[1]=-o*l,i[2]=-a*l,i[3]=n*l),u[0]=i[0],u[1]=i[1],u[4]=i[2],u[5]=i[3]}return t.S(u,u,[1/i,1/i,1]),u}function eR(e){let r=Math.cos(e.rollInRadians),i=Math.sin(e.rollInRadians),n=Math.cos(e.pitchInRadians),o=Math.cos(e.bearingInRadians),a=Math.sin(e.bearingInRadians),s=t.az();s[0]=-o*n*i-a*r,s[1]=-a*n*i+o*r;let l=t.aA(s);l<1e-9?t.aB(s):t.aC(s,s,1/l);let u=t.az();u[0]=o*n*r-a*i,u[1]=a*n*r+o*i;let c=t.aA(u);return c<1e-9?t.aB(u):t.aC(u,u,1/c),{vecEast:u,vecSouth:s}}function eL(e,r,i,n){let o;n?(o=[e,r,n(e,r),1],t.aE(o,o,i)):e$(o=[e,r,0,1],o,i);let a=o[3];return{point:new t.P(o[0]/a,o[1]/a),signedDistanceFromCamera:a,isOccluded:!1}}function eB(e,t,r,i,n,o,a,s){let l=o.glyphStartIndex+o.numGlyphs,u=o.lineStartIndex,c=o.lineStartIndex+o.lineLength,h=t.getoffsetX(o.glyphStartIndex),d=t.getoffsetX(l-1),p=eW(e*h,r,i,n,o.segment,u,c,s,a);if(!p)return null;let f=eW(e*d,r,i,n,o.segment,u,c,s,a);return f?s.projectionCache.anyProjectionOccluded?null:{first:p,last:f}:null}function eF(e,r,i,n){return e===t.ax.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n?{useVertical:!0}:(e===t.ax.vertical?r.y<i.y:r.x>i.x)?{needsFlipping:!0}:null}function ej(e){let r,{projectionContext:i,pitchedLabelPlaneMatrixInverse:n,symbol:o,fontSize:a,flip:s,keepUpright:l,glyphOffsetArray:u,dynamicLayoutVertexArray:c,aspectRatio:h,rotateToLine:d}=e,p=a/24,f=o.lineOffsetX*p,m=o.lineOffsetY*p;if(o.numGlyphs>1){let e=o.glyphStartIndex+o.numGlyphs,t=o.lineStartIndex,a=o.lineStartIndex+o.lineLength,c=eB(p,u,f,m,s,o,d,i);if(!c)return{notEnoughRoom:!0};let g=eV(c.first.point.x,c.first.point.y,i,n),y=eV(c.last.point.x,c.last.point.y,i,n);if(l&&!s){let e=eF(o.writingMode,g,y,h);if(e)return e}r=[c.first];for(let n=o.glyphStartIndex+1;n<e-1;n++){let e=eW(p*u.getoffsetX(n),f,m,s,o.segment,t,a,i,d);if(!e)return{notEnoughRoom:!0};r.push(e)}r.push(c.last)}else{if(l&&!s){let e=eG(i.tileAnchorPoint.x,i.tileAnchorPoint.y,i).point,r=o.lineStartIndex+o.segment+1,a=new t.P(i.lineVertexArray.getx(r),i.lineVertexArray.gety(r)),s=eG(a.x,a.y,i),l=s.signedDistanceFromCamera>0?s.point:ez(i.tileAnchorPoint,a,e,1,i),u=eV(e.x,e.y,i,n),c=eV(l.x,l.y,i,n),d=eF(o.writingMode,u,c,h);if(d)return d}let e=eW(p*u.getoffsetX(o.glyphStartIndex),f,m,s,o.segment,o.lineStartIndex,o.lineStartIndex+o.lineLength,i,d);if(!e||i.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};r=[e]}for(let e of r)t.aD(c,e.point,e.angle);return{}}function ez(e,t,r,i,n){let o=e.add(e.sub(t)._unit()),a=eG(o.x,o.y,n).point,s=r.sub(a);return r.add(s._mult(i/s.mag()))}function eN(e,r,i){let n=r.projectionCache;if(n.projections[e])return n.projections[e];let o=new t.P(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),a=eG(o.x,o.y,r);if(a.signedDistanceFromCamera>0)return n.projections[e]=a.point,n.anyProjectionOccluded||(n.anyProjectionOccluded=a.isOccluded),a.point;let s=e-i.direction;return ez(0===i.distanceFromAnchor?r.tileAnchorPoint:new t.P(r.lineVertexArray.getx(s),r.lineVertexArray.gety(s)),o,i.previousVertex,i.absOffsetX-i.distanceFromAnchor+1,r)}function eG(e,t,r){let i,n=e+r.translation[0],o=t+r.translation[1];
170return r.pitchWithMap?(i=eL(n,o,r.pitchedLabelPlaneMatrix,r.getElevation)).isOccluded=!1:((i=r.transform.projectTileCoordinates(n,o,r.unwrappedTileID,r.getElevation)).point.x=(.5*i.point.x+.5)*r.width,i.point.y=(-(.5*i.point.y)+.5)*r.height),i}function eV(e,r,i,n){if(i.pitchWithMap){let o=[e,r,0,1];return t.aE(o,o,n),i.transform.projectTileCoordinates(o[0]/o[3],o[1]/o[3],i.unwrappedTileID,i.getElevation).point}return{x:e/i.width*2-1,y:1-r/i.height*2}}function eU(e,t,r){return r.transform.projectTileCoordinates(e,t,r.unwrappedTileID,r.getElevation)}function eH(e,t,r){return e._unit()._perp()._mult(t*r)}function eW(e,r,i,n,o,a,s,l,u){let c,h=n?e-r:e+r,d=h>0?1:-1,p=0;n&&(d*=-1,p=Math.PI),d<0&&(p+=Math.PI);let f,m=d>0?a+o:a+o+1;l.projectionCache.cachedAnchorPoint?f=l.projectionCache.cachedAnchorPoint:(f=eG(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,l.projectionCache.cachedAnchorPoint=f);let g,y,v=f,b=f,_=0,x=0,A=Math.abs(h),w=[];for(;_+x<=A;){if((m+=d)<a||m>=s)return null;_+=x,b=v,y=g;let e={absOffsetX:A,direction:d,distanceFromAnchor:_,previousVertex:b};if(v=eN(m,l,e),0===i)w.push(b),c=v.sub(b);else{let r,n=v.sub(b);r=0===n.mag()?eH(eN(m+d,l,e).sub(v),i,d):eH(n,i,d),y||(y=b.add(r)),g=function(e,r,i,n,o,a,s,l,u){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let c=i.add(r);if(e+u.direction<n||e+u.direction>=o)return l.projectionCache.offsets[e]=c,c;let h=eN(e+u.direction,l,u),d=eH(h.sub(i),s,u.direction),p=i.add(d),f=h.add(d);return l.projectionCache.offsets[e]=t.aF(a,c,p,f)||c,l.projectionCache.offsets[e]}(m,r,v,a,s,y,i,l,e),w.push(y),c=g.sub(y)}x=c.mag()}let S=c._mult((A-_)/x)._add(y||b),T=p+Math.atan2(v.y-b.y,v.x-b.x);return w.push(S),{point:S,angle:u?T:0,path:w}}let eq=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function eZ(e,t){for(let r=0;r<e;r++){let e=t.length;t.resize(e+4),t.float32.set(eq,3*e)}}function e$(e,t,r){let i=t[0],n=t[1];return e[0]=r[0]*i+r[4]*n+r[12],e[1]=r[1]*i+r[5]*n+r[13],e[3]=r[3]*i+r[7]*n+r[15],e}class eK{constructor(e,t=new ek(e.width+200,e.height+200,25),r=new ek(e.width+200,e.height+200,25)){this.transform=e,this.grid=t,this.ignoredGrid=r,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,t,r,i,n,o,a,s,l,u,c,h){let d,p=this.projectAndGetPerspectiveRatio(e.anchorPointX+s[0],e.anchorPointY+s[1],n,u,h),f=r*p.perspectiveRatio;if(o||a)d=this._projectCollisionBox(e,f,i,n,o,a,s,p,u,c,h);else{let t=p.x+(c?c.x*f:0),r=p.y+(c?c.y*f:0);d={allPointsOccluded:!1,box:[t+e.x1*f,r+e.y1*f,t+e.x2*f,r+e.y2*f]}}let[m,g,y,v]=d.box,b=o?d.allPointsOccluded:p.isOccluded,_=b;return _||(_=p.perspectiveRatio<this.perspectiveRatioCutoff),_||(_=!this.isInsideGrid(m,g,y,v)),_||"always"!==t&&this.grid.hitTest(m,g,y,v,t,l)?{box:[m,g,y,v],placeable:!1,offscreen:!1,occluded:b}:{box:[m,g,y,v],placeable:!0,offscreen:this.isOffscreen(m,g,y,v),occluded:b}}placeCollisionCircles(e,r,i,n,o,a,s,l,u,c,h,d,p,f){let m=[],g=new t.P(r.anchorX,r.anchorY),y=this.getPerspectiveRatio(g.x,g.y,a,f),v=(u?o*this.transform.getPitchedTextCorrection(r.anchorX,r.anchorY,a)/y:o*y)/t.aJ,b={getElevation:f,pitchedLabelPlaneMatrix:s,lineVertexArray:i,pitchWithMap:u,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:g,unwrappedTileID:a,width:this.transform.width,height:this.transform.height,translation:p},_=eB(v,n,r.lineOffsetX*v,r.lineOffsetY*v,!1,r,!1,b),x=!1,A=!1,w=!0;if(_){let r=.5*h*y+d,i=new t.P(-100,-100),n=new t.P(this.screenRightBoundary,this.screenBottomBoundary),o=new eI,a=_.first,s=_.last,p=[];for(let e=a.path.length-1;e>=1;e--)p.push(a.path[e]);for(let e=1;e<s.path.length;e++)p.push(s.path[e]);let f=2.5*r;if(u){let e=this.projectPathToScreenSpace(p,b);p=e.some(e=>e.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let g=[];if(p.length>0){let e=p[0].clone(),r=p[0].clone();for(let t=1;t<p.length;t++)e.x=Math.min(e.x,p[t].x),e.y=Math.min(e.y,p[t].y),r.x=Math.max(r.x,p[t].x),r.y=Math.max(r.y,p[t].y);g=e.x>=i.x&&r.x<=n.x&&e.y>=i.y&&r.y<=n.y?[p]:r.x<i.x||e.x>n.x||r.y<i.y||e.y>n.y?[]:t.aG([p],i.x,i.y,n.x,n.y)}for(let t of g){o.reset(t,.25*r);let i=0;i=o.length<=.5*r?1:Math.ceil(o.paddedLength/f)+1;for(let t=0;t<i;t++){let n=t/Math.max(i-1,1),a=o.lerp(n),s=a.x+100,u=a.y+100;m.push(s,u,r,0);let h=s-r,d=u-r,p=s+r,f=u+r;if(w&&(w=this.isOffscreen(h,d,p,f)),A||(A=this.isInsideGrid(h,d,p,f)),"always"!==e&&this.grid.hitTestCircle(s,u,r,e,c)&&(x=!0,!l))return{circles:[],offscreen:!1,collisionDetected:x}}}}return{circles:!l&&x||!A||y<this.perspectiveRatioCutoff?[]:m,offscreen:w,collisionDetected:x}}projectPathToScreenSpace(e,t){var r;let i;return function(e){let t=0,r=0,i=0,n=0;for(let o=0;o<e.length;o++)e[o].isOccluded?(i=o+1,n=0):++n>r&&(r=n,t=i);return e.slice(t,t+r)}
170((i=1/((r=t.pitchedLabelPlaneMatrix)[0]*r[5]-r[1]*r[4]),eO[0]=r[5]*i,eO[1]=-r[1]*i,eO[2]=0,eO[3]=0,eO[4]=-r[4]*i,eO[5]=r[0]*i,eO[6]=0,eO[7]=0,eO[8]=0,eO[9]=0,eO[10]=1/r[10],eO[11]=0,eO[12]=0,eO[13]=0,eO[14]=0,eO[15]=1/r[15],e.map(e=>{let r=eL(e.x,e.y,eO,t.getElevation),i=t.transform.projectTileCoordinates(r.point.x,r.point.y,t.unwrappedTileID,t.getElevation);return i.point.x=(.5*i.point.x+.5)*t.width,i.point.y=(-(.5*i.point.y)+.5)*t.height,i})))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let r=[],i=new t.a8;for(let n of e){let e=new t.P(n.x+100,n.y+100);i.extend(e),r.push(e)}let{minX:n,minY:o,maxX:a,maxY:s}=i,l=this.grid.query(n,o,a,s).concat(this.ignoredGrid.query(n,o,a,s)),u={},c={};for(let e of l){let i=e.key;if(void 0===u[i.bucketInstanceId]&&(u[i.bucketInstanceId]={}),u[i.bucketInstanceId][i.featureIndex])continue;let n=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.aH(r,n)&&(u[i.bucketInstanceId][i.featureIndex]=!0,void 0===c[i.bucketInstanceId]&&(c[i.bucketInstanceId]=[]),c[i.bucketInstanceId].push(i.featureIndex))}return c}insertCollisionBox(e,t,r,i,n,o){(r?this.ignoredGrid:this.grid).insert({bucketInstanceId:i,featureIndex:n,collisionGroupID:o,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,r,i,n,o){let a=r?this.ignoredGrid:this.grid,s={bucketInstanceId:i,featureIndex:n,collisionGroupID:o,overlapMode:t};for(let t=0;t<e.length;t+=4)a.insertCircle(s,e[t],e[t+1],e[t+2])}projectAndGetPerspectiveRatio(e,r,i,n,o){if(o){let i;n?(i=[e,r,n(e,r),1],t.aE(i,i,o)):e$(i=[e,r,0,1],i,o);let a=i[3];return{x:(i[0]/a+1)/2*this.transform.width+100,y:(-i[1]/a+1)/2*this.transform.height+100,perspectiveRatio:.5+this.transform.cameraToCenterDistance/a*.5,isOccluded:!1,signedDistanceFromCamera:a}}{let t=this.transform.projectTileCoordinates(e,r,i,n);return{x:(t.point.x+1)/2*this.transform.width+100,y:(1-t.point.y)/2*this.transform.height+100,perspectiveRatio:.5+this.transform.cameraToCenterDistance/t.signedDistanceFromCamera*.5,isOccluded:t.isOccluded,signedDistanceFromCamera:t.signedDistanceFromCamera}}}getPerspectiveRatio(e,t,r,i){let n=this.transform.projectTileCoordinates(e,t,r,i);return .5+this.transform.cameraToCenterDistance/n.signedDistanceFromCamera*.5}isOffscreen(e,t,r,i){return r<100||e>=this.screenRightBoundary||i<100||t>this.screenBottomBoundary}isInsideGrid(e,t,r,i){return r>=0&&e<this.gridRightBoundary&&i>=0&&t<this.gridBottomBoundary}getViewportMatrix(){let e=t.ap([]);return t.Q(e,e,[-100,-100,0]),e}_projectCollisionBox(e,r,i,n,o,a,s,l,u,c,h){let d=1,p=0,f=0,m=1,g=e.anchorPointX+s[0],y=e.anchorPointY+s[1];if(a&&!o){let e=this.projectAndGetPerspectiveRatio(g+1,y,n,u,h),t=e.x-l.x,r=Math.atan((e.y-l.y)/t)+(t<0?Math.PI:0),i=Math.sin(r),o=Math.cos(r);d=o,p=i,f=-i,m=o}else if(!a&&o){let e=eR(this.transform);d=e.vecEast[0],p=e.vecEast[1],f=e.vecSouth[0],m=e.vecSouth[1]}let v=l.x,b=l.y,_=r;o&&(v=g,b=y,_=Math.pow(2,-(this.transform.zoom-i.overscaledZ))*this.transform.getPitchedTextCorrection(g,y,n),c||(_*=t.al(.5+l.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),c&&(v+=d*c.x*_+f*c.y*_,b+=p*c.x*_+m*c.y*_);let x=e.x1*_,A=e.x2*_,w=(x+A)/2,S=e.y1*_,T=e.y2*_,C=(S+T)/2,E=[];for(let{offsetX:e,offsetY:r}of[{offsetX:x,offsetY:S},{offsetX:w,offsetY:S},{offsetX:A,offsetY:S},{offsetX:A,offsetY:C},{offsetX:A,offsetY:T},{offsetX:w,offsetY:T},{offsetX:x,offsetY:T},{offsetX:x,offsetY:C}])E.push(new t.P(v+d*e+f*r,b+p*e+m*r));let P=!1;if(o){let e=E.map(e=>this.projectAndGetPerspectiveRatio(e.x,e.y,n,u,h));P=e.some(e=>!e.isOccluded),E=e.map(e=>new t.P(e.x,e.y))}else P=!0;return{box:t.aI(E),allPointsOccluded:!P}}}
170class eX{constructor(e,t,r,i){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):i&&r?1:0,this.placed=r}isHidden(){return 0===this.opacity&&!this.placed}}class eY{constructor(e,t,r,i,n){this.text=new eX(e?e.text:null,t,r,n),this.icon=new eX(e?e.icon:null,t,i,n)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class eQ{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}}class eJ{constructor(e,t,r,i,n){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n}}class e0{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function e1(e,r,i,n,o){let{horizontalAlign:a,verticalAlign:s}=t.aP(e);return new t.P(-(a-.5)*r+n[0]*o,-(s-.5)*i+n[1]*o)}class e2{constructor(e,t,r,i,n){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new eK(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=r,this.retainedQueryData={},this.collisionGroups=new e0(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;return t?(r,i)=>t.getElevation(e,r,i):null}getBucketParts(e,r,i,n){let o=i.getBucket(r),a=i.latestFeatureIndex;if(!o||!a||r.id!==o.layerIds[0])return;let s=i.collisionBoxArray,l=o.layers[0].layout,u=o.layers[0].paint,c=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),h=i.tileSize/t.a6,d=i.tileID.toUnwrapped(),p="map"===l.get("text-rotation-alignment"),f=t.aK(i,1,this.transform.zoom),m=t.aL(this.collisionIndex.transform,i,u.get("text-translate"),u.get("text-translate-anchor")),g=t.aL(this.collisionIndex.transform,i,u.get("icon-translate"),u.get("icon-translate-anchor")),y=eD(p,this.transform,f);this.retainedQueryData[o.bucketInstanceId]=new eJ(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,i.tileID);let v={bucket:o,layout:l,translationText:m,translationIcon:g,unwrappedTileID:d,pitchedLabelPlaneMatrix:y,scale:c,textPixelRatio:h,holdingForFade:i.holdingForSymbolFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.aw(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(n)for(let t of o.sortKeyRanges){let{sortKey:r,symbolInstanceStart:i,symbolInstanceEnd:n}=t;e.push({sortKey:r,symbolInstanceStart:i,symbolInstanceEnd:n,parameters:v})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:v})}attemptAnchorPlacement(e,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v,b,_){var x,A,w;let S=t.aM[e.textAnchor],T=[e.textOffset0,e.textOffset1],C=e1(S,i,n,T,o),E=this.collisionIndex.placeCollisionBox(r,d,l,u,c,s,a,g,h.predicate,b,C,_);if((!v||this.collisionIndex.placeCollisionBox(v,d,l,u,c,s,a,y,h.predicate,b,C,_).placeable)&&E.placeable){let e;if((null==(x=this.prevPlacement)?void 0:x.variableOffsets[p.crossTileID])&&(null==(w=null==(A=this.prevPlacement)?void 0:A.placements[p.crossTileID])?void 0:w.text)&&(e=this.prevPlacement.variableOffsets[p.crossTileID].anchor),0===p.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[p.crossTileID]={textOffset:T,width:i,height:n,anchor:S,textBoxScale:o,prevAnchor:e},this.markUsedJustification(f,S,p,m),f.allowVerticalPlacement&&(this.markUsedOrientation(f,m,p),this.placedOrientations[p.crossTileID]=m),{shift:C,placedGlyphBoxes:E}}}placeLayerBucketPart(e,r,i){let{bucket:n,layout:o,translationText:a,translationIcon:s,unwrappedTileID:l,pitchedLabelPlaneMatrix:u,textPixelRatio:c,holdingForFade:h,collisionBoxArray:d,partiallyEvaluatedTextSize:p,collisionGroup:f}=e.parameters,m=o.get("text-optional"),g=o.get("icon-optional"),y=t.aN(o,"text-overlap","text-allow-overlap"),v="always"===y,b=t.aN(o,"icon-overlap","icon-allow-overlap"),_="always"===b,x="map"===o.get("text-rotation-alignment"),A="map"===o.get("text-pitch-alignment"),w="none"!==o.get("icon-text-fit"),S="viewport-y"===o.get("symbol-z-order"),T=v&&(_||!n.hasIconData()||g),C=_&&(v||!n.hasTextData()||m);!n.collisionArrays&&d&&n.deserializeCollisionBoxes(d);let E=this.retainedQueryData[n.bucketInstanceId].tileID,P=this._getTerrainElevationFunc(E),I=this.transform.getFastPathSimpleProjectionMatrix(E),M=(e,d,_)=>{var S,M;if(r[e.crossTileID])return;if(h)return void(this.placements[e.crossTileID]=new eQ(!1,!1,!1));
170let k=!1,O=!1,D=!0,R=null,L={box:null,placeable:!1,offscreen:null,occluded:!1},B={placeable:!1},F=null,j=null,z=null,N=0,G=0,V=0;d.textFeatureIndex?N=d.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),d.verticalTextFeatureIndex&&(G=d.verticalTextFeatureIndex);let U=d.textBox;if(U){let r=r=>{let i=t.ax.horizontal;if(n.allowVerticalPlacement&&!r&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,i=t,this.markUsedOrientation(n,i,e))}return i},o=(r,i)=>{if(n.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&d.verticalTextBox){for(let e of n.writingModes)if(e===t.ax.vertical?B=L=i():L=r(),null==L?void 0:L.placeable)break}else L=r()},u=e.textAnchorOffsetStartIndex,h=e.textAnchorOffsetEndIndex;if(h===u){let i=(t,r)=>{let i=this.collisionIndex.placeCollisionBox(t,y,c,E,l,A,x,a,f.predicate,P,void 0,I);return(null==i?void 0:i.placeable)&&(this.markUsedOrientation(n,r,e),this.placedOrientations[e.crossTileID]=r),i};o(()=>i(U,t.ax.horizontal),()=>{let r=d.verticalTextBox;return n.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?i(r,t.ax.vertical):{box:null,offscreen:null}}),r(null==L?void 0:L.placeable)}else{let p=t.aM[null==(M=null==(S=this.prevPlacement)?void 0:S.variableOffsets[e.crossTileID])?void 0:M.anchor],m=(t,r,o)=>{let d=t.x2-t.x1,m=t.y2-t.y1,g=e.textBoxScale,v=w&&"never"===b?r:null,_=null,S="never"===y?1:2,T="never";p&&S++;for(let r=0;r<S;r++){for(let r=u;r<h;r++){let i=n.textAnchorOffsets.get(r);if(p&&i.textAnchor!==p)continue;let u=this.attemptAnchorPlacement(i,t,d,m,g,x,A,c,E,l,f,T,e,n,o,a,s,v,P);if(u&&(null==(_=u.placedGlyphBoxes)?void 0:_.placeable))return k=!0,R=u.shift,_}p?p=null:T=y}return i&&!_&&(_={box:this.collisionIndex.placeCollisionBox(U,"always",c,E,l,A,x,a,f.predicate,P,void 0,I).box,offscreen:!1,placeable:!1,occluded:!1}),_};o(()=>m(U,d.iconBox,t.ax.horizontal),()=>{let r=d.verticalTextBox;return n.allowVerticalPlacement&&!(null==L?void 0:L.placeable)&&e.numVerticalGlyphVertices>0&&r?m(r,d.verticalIconBox,t.ax.vertical):{box:null,occluded:!0,offscreen:null}}),L&&(k=L.placeable,D=L.offscreen);let g=r(null==L?void 0:L.placeable);if(!k&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(n,t.anchor,e,g))}}}if(k=null==(F=L)?void 0:F.placeable,D=null==F?void 0:F.offscreen,e.useRuntimeCollisionCircles&&e.centerJustifiedTextSymbolIndex>=0){let r=n.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),s=t.ay(n.textSizeData,p,r),c=o.get("text-padding");(j=this.collisionIndex.placeCollisionCircles(y,r,n.lineVertexArray,n.glyphOffsetArray,s,l,u,i,A,f.predicate,e.collisionCircleDiameter,c,a,P)).circles.length&&j.collisionDetected&&!i&&t.w("Collisions detected, but collision boxes are not shown"),k=v||j.circles.length>0&&!j.collisionDetected,D&&(D=j.offscreen)}if(d.iconFeatureIndex&&(V=d.iconFeatureIndex),d.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,b,c,E,l,A,x,s,f.predicate,P,w&&R?R:void 0,I);O=B&&B.placeable&&d.verticalIconBox?(z=e(d.verticalIconBox)).placeable:(z=e(d.iconBox)).placeable,D&&(D=z.offscreen)}let H=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,W=g||0===e.numIconVertices;H||W?W?H||O&&(O=k):k=O&&k:O=k=O&&k;let q=O&&z.placeable;if(k&&F.placeable&&this.collisionIndex.insertCollisionBox(F.box,y,o.get("text-ignore-placement"),n.bucketInstanceId,B&&B.placeable&&G?G:N,f.ID),q&&this.collisionIndex.insertCollisionBox(z.box,b,o.get("icon-ignore-placement"),n.bucketInstanceId,V,f.ID),j&&k&&this.collisionIndex.insertCollisionCircles(j.circles,y,o.get("text-ignore-placement"),n.bucketInstanceId,N,f.ID),i&&this.storeCollisionData(n.bucketInstanceId,_,d,F,z,j),0===e.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");if(0===n.bucketInstanceId)throw Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new eQ((k||T)&&!(null==F?void 0:F.occluded),(O||C)&&!(null==z?void 0:z.occluded),D||n.justReloaded),r[e.crossTileID]=!0};if(S){if(0!==e.symbolInstanceStart)throw Error("bucket.bucketInstanceId should be 0");
170let t=n.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let e=t.length-1;e>=0;--e){let r=t[e];M(n.symbolInstances.get(r),n.collisionArrays[r],r)}}else for(let t=e.symbolInstanceStart;t<e.symbolInstanceEnd;t++)M(n.symbolInstances.get(t),n.collisionArrays[t],t);n.justReloaded=!1}storeCollisionData(e,t,r,i,n,o){if(r.textBox||r.iconBox){let o,a;this.collisionBoxArrays.has(e)?o=this.collisionBoxArrays.get(e):(o=new Map,this.collisionBoxArrays.set(e,o)),o.has(t)?a=o.get(t):(a={text:null,icon:null},o.set(t,a)),r.textBox&&(a.text=i.box),r.iconBox&&(a.icon=n.box)}if(o){let t=this.collisionCircleArrays[e];void 0===t&&(t=this.collisionCircleArrays[e]=[]);for(let e=0;e<o.circles.length;e+=4)t.push(o.circles[e+0]-100),t.push(o.circles[e+1]-100),t.push(o.circles[e+2]),t.push(+!!o.collisionDetected)}}markUsedJustification(e,r,i,n){let o;for(let a of(o=n===t.ax.vertical?i.verticalPlacedTextSymbolIndex:({left:i.leftJustifiedTextSymbolIndex,center:i.centerJustifiedTextSymbolIndex,right:i.rightJustifiedTextSymbolIndex})[t.aO(r)],[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex,i.verticalPlacedTextSymbolIndex]))a>=0&&(e.text.placedSymbolArray.get(a).crossTileID=o>=0&&a!==o?0:i.crossTileID)}markUsedOrientation(e,r,i){let n=r===t.ax.horizontal||r===t.ax.horizontalOnly?r:0,o=r===t.ax.vertical?r:0;for(let t of[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex])e.text.placedSymbolArray.get(t).placedOrientation=n;i.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=o)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let i=t?t.symbolFadeChange(e):1,n=t?t.opacities:{},o=t?t.variableOffsets:{},a=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],o=n[e];o?(this.opacities[e]=new eY(o,i,t.text,t.icon),r||(r=t.text!==o.text.placed),r||(r=t.icon!==o.icon.placed)):(this.opacities[e]=new eY(null,i,t.text,t.icon,t.skipFade),r||(r=t.text||t.icon))}for(let e in n){let t=n[e];if(!this.opacities[e]){let n=new eY(t,i,!1,!1);n.isHidden()||(this.opacities[e]=n,r||(r=t.text.placed),r||(r=t.icon.placed))}}for(let e in o)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=o[e]);for(let e in a)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=a[e]);if(t&&void 0===t.lastPlacementChangeTime)throw Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let i of t){let t=i.getBucket(e);t&&i.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,i.tileID,r,i.collisionBoxArray)}}updateBucketOpacities(e,r,i,n){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let o=e.layers[0],a=o.layout,s=new eY(null,0,!1,!1,!0),l=a.get("text-allow-overlap"),u=a.get("icon-allow-overlap"),c=o._unevaluatedLayout.hasValue("text-variable-anchor")||o._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===a.get("text-rotation-alignment"),d="map"===a.get("text-pitch-alignment"),p="none"!==a.get("icon-text-fit"),f=new eY(null,0,l&&(u||!e.hasIconData()||a.get("icon-optional")),u&&(l||!e.hasTextData()||a.get("text-optional")),!0);!e.collisionArrays&&n&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(n);let m=(e,t,r)=>{for(let i=0;i<t/4;i++)e.opacityVertexArray.emplaceBack(r);e.hasVisibleVertices||(e.hasVisibleVertices=r!==e4)},g=this.collisionBoxArrays.get(e.bucketInstanceId);for(let r=0;r<e.symbolInstances.length;r++){let n=e.symbolInstances.get(r),{numHorizontalGlyphVertices:o,numVerticalGlyphVertices:a,crossTileID:l}=n,u=this.opacities[l];i[l]?u=s:u||(u=f,this.opacities[l]=u),i[l]=!0;let y=n.numIconVertices>0,v=this.placedOrientations[n.crossTileID],b=v===t.ax.vertical,_=v===t.ax.horizontal||v===t.ax.horizontalOnly;if(o>0||a>0){let t=e5(u.text);m(e.text,o,b?e4:t),m(e.text,a,_?e4:t);let r=u.text.isHidden();for(let t of[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex])t>=0&&(e.text.placedSymbolArray.get(t).hidden=r||b?1:0);n.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).hidden=r||_?1:0);let i=this.variableOffsets[n.crossTileID];
170i&&this.markUsedJustification(e,i.anchor,n,v);let s=this.placedOrientations[n.crossTileID];s&&(this.markUsedJustification(e,"left",n,s),this.markUsedOrientation(e,s,n))}if(y){let t=e5(u.icon),r=!(p&&n.verticalPlacedIconSymbolIndex&&b);n.placedIconSymbolIndex>=0&&(m(e.icon,n.numIconVertices,r?t:e4),e.icon.placedSymbolArray.get(n.placedIconSymbolIndex).hidden=u.icon.isHidden()),n.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,n.numVerticalIconVertices,r?e4:t),e.icon.placedSymbolArray.get(n.verticalPlacedIconSymbolIndex).hidden=u.icon.isHidden())}let x=(null==g?void 0:g.has(r))?g.get(r):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let i=e.collisionArrays[r];if(i){let r=new t.P(0,0);if(i.textBox||i.verticalTextBox){let t=!0;if(c){let e=this.variableOffsets[l];e?(r=e1(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),h&&r._rotate(d?-this.transform.bearingInRadians:this.transform.bearingInRadians)):t=!1}if(i.textBox||i.verticalTextBox){let n;i.textBox&&(n=b),i.verticalTextBox&&(n=_),e3(e.textCollisionBox.collisionVertexArray,u.text.placed,!t||n,x.text,r.x,r.y)}}if(i.iconBox||i.verticalIconBox){let t,n=!!(!_&&i.verticalIconBox);i.iconBox&&(t=n),i.verticalIconBox&&(t=!n),e3(e.iconCollisionBox.collisionVertexArray,u.icon.placed,t,x.icon,p?r.x:0,p?r.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){let r=this.zoomAtLastRecencyCheck===t?1-this.zoomAdjustment(t):1;return this.zoomAtLastRecencyCheck=t,this.commitTime+this.fadeDuration*r>e}setStale(){this.stale=!0}}function e3(e,t,r,i,n,o){i&&0!==i.length||(i=[0,0,0,0]);let a=i[0]-100,s=i[1]-100,l=i[2]-100,u=i[3]-100;e.emplaceBack(+!!t,+!!r,n||0,o||0,a,s),e.emplaceBack(+!!t,+!!r,n||0,o||0,l,s),e.emplaceBack(+!!t,+!!r,n||0,o||0,l,u),e.emplaceBack(+!!t,+!!r,n||0,o||0,a,u)}function e5(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 0xffffffff;let t=+!!e.placed,r=Math.floor(127*e.opacity);return 0x2000000*r+0x1000000*t+131072*r+65536*t+512*r+256*t+2*r+t}let e4=0;class e6{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,i,n){let o=this._bucketParts;for(;this._currentTileIndex<e.length;)if(t.getBucketParts(o,i,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,n())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort((e,t)=>
170e.sortKey-t.sortKey));this._currentPartIndex<o.length;)if(t.placeLayerBucketPart(o[this._currentPartIndex],this._seenCrossTileIDs,r),this._currentPartIndex++,n())return!0;return!1}}class e8{constructor(e,t,r,i,n,o,a,s){this.placement=new e2(e,t,o,a,s),this._currentPlacementIndex=r.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=n,this._done=!1}isDone(){return this._done}continuePlacement(e,r,i){let n=_(),o=()=>!this._forceFullPlacement&&_()-n>2;for(;this._currentPlacementIndex>=0;){let n=r[e[this._currentPlacementIndex]],a=this.placement.collisionIndex.transform.zoom;if(t.aQ(n)&&n.layout&&(!n.minzoom||n.minzoom<=a)&&(!n.maxzoom||n.maxzoom>a)){if(this._inProgressLayer||(this._inProgressLayer=new e6(n)),this._inProgressLayer.continuePlacement(i[n.source],this.placement,this._showCollisionBoxes,n,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let e7=512/t.a6/2;class e9{constructor(e,r,i){this.tileID=e,this.bucketInstanceId=i,this._symbolsByKey={};let n=new Map;for(let e=0;e<r.length;e++){let t=r.get(e),i=t.key,o=n.get(i);o?o.push(t):n.set(i,[t])}for(let[e,r]of n){let i={positions:r.map(e=>({x:Math.floor(e.anchorX*e7),y:Math.floor(e.anchorY*e7)})),crossTileIDs:r.map(e=>e.crossTileID)};if(i.positions.length>128){let e=new t.aR(i.positions.length,16,Uint16Array);for(let{x:t,y:r}of i.positions)e.add(t,r);e.finish(),delete i.positions,i.index=e}this._symbolsByKey[e]=i}}getScaledCoordinates(e,r){let{x:i,y:n,z:o}=this.tileID.canonical,{x:a,y:s,z:l}=r.canonical,u=e7/Math.pow(2,l-o),c=(s*t.a6+e.anchorY)*u,h=n*t.a6*e7;return{x:Math.floor((a*t.a6+e.anchorX)*u-i*t.a6*e7),y:Math.floor(c-h)}}findMatches(e,t,r){let i=this.tileID.canonical.z<t.canonical.z?1:Math.pow(2,this.tileID.canonical.z-t.canonical.z);for(let n=0;n<e.length;n++){let o=e.get(n);if(o.crossTileID)continue;let a=this._symbolsByKey[o.key];if(!a)continue;let s=this.getScaledCoordinates(o,t);if(a.index)for(let e of a.index.range(s.x-i,s.y-i,s.x+i,s.y+i).sort()){let t=a.crossTileIDs[e];if(!r[t]){r[t]=!0,o.crossTileID=t;break}}else if(a.positions)for(let e=0;e<a.positions.length;e++){let t=a.positions[e],n=a.crossTileIDs[e];if(Math.abs(t.x-s.x)<=i&&Math.abs(t.y-s.y)<=i&&!r[n]){r[n]=!0,o.crossTileID=n;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}}class te{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class tt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let r=this.indexes[e],i={};for(let e in r){let n=r[e];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),i[n.tileID.key]=n}this.indexes[e]=i}this.lng=e}addBucket(e,t,r){var i,n,o;if(null==(i=this.indexes[e.overscaledZ])?void 0:i[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;e<t.symbolInstances.length;e++)t.symbolInstances.get(e).crossTileID=0;(n=this.usedCrossTileIDs)[o=e.overscaledZ]||(n[o]={});let a=this.usedCrossTileIDs[e.overscaledZ];for(let r in this.indexes){let i=this.indexes[r];if(Number(r)>e.overscaledZ)for(let r in i){let n=i[r];n.tileID.isChildOf(e)&&n.findMatches(t.symbolInstances,e,a)}else{let n=i[e.scaledTo(Number(r)).key];n&&n.findMatches(t.symbolInstances,e,a)}}for(let e=0;e<t.symbolInstances.length;e++){let i=t.symbolInstances.get(e);i.crossTileID||(i.crossTileID=r.generate(),a[i.crossTileID]=!0)}return void 0===this.indexes[e.overscaledZ]&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new e9(e,t.symbolInstances,t.bucketInstanceId),!0}removeBucketCrossTileIDs(e,t){for(let r of t.getCrossTileIDsLists())for(let t of r)delete this.usedCrossTileIDs[e][t]}removeStaleBuckets(e){let t=!1;for(let r in this.indexes){let i=this.indexes[r];for(let n in i)e[i[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,i[n]),delete i[n],t=!0)}return t}}class tr{constructor(){this.layerIndexes={},this.crossTileIDs=new te,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,t,r){let i=this.layerIndexes[e.id];void 0===i&&(i=this.layerIndexes[e.id]=new tt);let n=!1,o={};for(let a of(i.handleWrapJump(r),t)){let t=a.getBucket(e);e.id===(null==t?void 0:t.layerIds[0])&&(t.bucketInstanceId||(this.maxBucketInstanceId+=1,t.bucketInstanceId=this.maxBucketInstanceId),i.addBucket(a.tileID,t,this.crossTileIDs)&&(n=!0),o[t.bucketInstanceId]=!0)}return i.removeStaleBuckets(o)&&(n=!0),n}pruneUnusedLayers(e){let t={};for(let r of e)t[r]=!0;for(let e in this.layerIndexes)t[e]||delete this.layerIndexes[e]}}var ti="void main() {fragColor=vec4(1.0);}";let tn={prelude:to(`#ifdef GL_ES
171precision mediump float;
172#else
173#if !defined(lowp)
174#define lowp
175#endif
176#if !defined(mediump)
177#define mediump
178#endif
179#if !defined(highp)
180#define highp
181#endif
182#endif
183out highp vec4 fragColor;`,`#ifdef GL_ES
184precision highp float;
185#else
186#if !defined(lowp)
187#define lowp
188#endif
189#if !defined(mediump)
190#define mediump
191#endif
192#if !defined(highp)
193#define highp
194#endif
195#endif
196vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
197);}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);
197return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+      c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+    c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+    c
198);}
199#ifdef TERRAIN3D
200uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
201#endif
202const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
203#ifdef TERRAIN3D
204highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
205#else
206return 1.0;
207#endif
208}float calculate_visibility(vec4 pos) {
209#ifdef TERRAIN3D
210vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
211#else
212return 1.0;
213#endif
214}float ele(vec2 pos) {
215#ifdef TERRAIN3D
216vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
217#else
218return 0.0;
219#endif
220}float get_elevation(vec2 pos) {
221#ifdef TERRAIN3D
222#ifdef GLOBE
223if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
224#endif
225vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
226#else
227return 0.0;
228#endif
229}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:to("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:to("",`#define GLOBE_RADIUS 6371008.8
230uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
231);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); 
232if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
233);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:to(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
234#ifdef OVERDRAW_INSPECTOR
235fragColor=vec4(1.0);
236#endif
237}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:to(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;
237uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
238#ifdef OVERDRAW_INSPECTOR
239fragColor=vec4(1.0);
240#endif
241}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:to(`in vec3 v_data;in float v_visibility;
242#pragma mapbox: define highp vec4 color
243#pragma mapbox: define mediump float radius
244#pragma mapbox: define lowp float blur
245#pragma mapbox: define lowp float opacity
246#pragma mapbox: define highp vec4 stroke_color
247#pragma mapbox: define mediump float stroke_width
248#pragma mapbox: define lowp float stroke_opacity
249void main() {
250#pragma mapbox: initialize highp vec4 color
251#pragma mapbox: initialize mediump float radius
252#pragma mapbox: initialize lowp float blur
253#pragma mapbox: initialize lowp float opacity
254#pragma mapbox: initialize highp vec4 stroke_color
255#pragma mapbox: initialize mediump float stroke_width
256#pragma mapbox: initialize lowp float stroke_opacity
257vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
258#ifdef OVERDRAW_INSPECTOR
259fragColor=vec4(1.0);
260#endif
261}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;
262#pragma mapbox: define highp vec4 color
263#pragma mapbox: define mediump float radius
264#pragma mapbox: define lowp float blur
265#pragma mapbox: define lowp float opacity
266#pragma mapbox: define highp vec4 stroke_color
267#pragma mapbox: define mediump float stroke_width
268#pragma mapbox: define lowp float stroke_opacity
269void main(void) {
270#pragma mapbox: initialize highp vec4 color
271#pragma mapbox: initialize mediump float radius
272#pragma mapbox: initialize lowp float blur
273#pragma mapbox: initialize lowp float opacity
274#pragma mapbox: initialize highp vec4 stroke_color
275#pragma mapbox: initialize mediump float stroke_width
276#pragma mapbox: initialize lowp float stroke_opacity
277vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
278#ifdef GLOBE
279vec3 center_vector=projectToSphere(circle_center);
280#endif
281float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
282#ifdef GLOBE
283vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
284#else
285vec4 projected_center=projectTileWithElevation(circle_center,ele);
286#endif
287corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
288#ifdef GLOBE
289vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
290#else
291gl_Position=projectTileWithElevation(corner_position,ele);
292#endif
293} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:to(ti,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:to(`uniform highp float u_intensity;in vec2 v_extrude;
294#pragma mapbox: define highp float weight
295#define GAUSS_COEF 0.3989422804014327
296void main() {
297#pragma mapbox: initialize highp float weight
298float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
299#ifdef OVERDRAW_INSPECTOR
300fragColor=vec4(1.0);
301#endif
302}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;
303#pragma mapbox: define highp float weight
304#pragma mapbox: define mediump float radius
305const highp float ZERO=1.0/255.0/16.0;
306#define GAUSS_COEF 0.3989422804014327
307void main(void) {
308#pragma mapbox: initialize highp float weight
309#pragma mapbox: initialize mediump float radius
310vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.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 circle_center=floor(pos_raw/8.0);
311#ifdef GLOBE
312vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
313#else
314gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
315#endif
316}`),heatmapTexture:to(`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));fragColor=color*u_opacity;
317#ifdef OVERDRAW_INSPECTOR
318fragColor=vec4(0.0);
319#endif
320}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:to("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:to("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;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);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:to(`#ifdef GL_ES
321precision highp float;
322#endif
323uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else
324{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));
325#ifdef OVERDRAW_INSPECTOR
326fragColor=vec4(1.0);
327#endif
328}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:to("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:to(ti,`in vec2 a_pos;void main() {
329#ifdef GLOBE
330gl_Position=projectTileFor3D(a_pos,0.0);
331#else
332gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
333#endif
334}`),fill:to(`#pragma mapbox: define highp vec4 color
335#pragma mapbox: define lowp float opacity
336void main() {
337#pragma mapbox: initialize highp vec4 color
338#pragma mapbox: initialize lowp float opacity
339fragColor=color*opacity;
340#ifdef OVERDRAW_INSPECTOR
341fragColor=vec4(1.0);
342#endif
343}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
344#pragma mapbox: define highp vec4 color
345#pragma mapbox: define lowp float opacity
346void main() {
347#pragma mapbox: initialize highp vec4 color
348#pragma mapbox: initialize lowp float opacity
349gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:to(`in vec2 v_pos;
350#ifdef GLOBE
351in float v_depth;
352#endif
353#pragma mapbox: define highp vec4 outline_color
354#pragma mapbox: define lowp float opacity
355void main() {
356#pragma mapbox: initialize highp vec4 outline_color
357#pragma mapbox: initialize lowp float opacity
358float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
359#ifdef GLOBE
360if (v_depth > 1.0) {discard;}
361#endif
362#ifdef OVERDRAW_INSPECTOR
363fragColor=vec4(1.0);
364#endif
365}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
366#ifdef GLOBE
367out float v_depth;
368#endif
369#pragma mapbox: define highp vec4 outline_color
370#pragma mapbox: define lowp float opacity
371void main() {
372#pragma mapbox: initialize highp vec4 outline_color
373#pragma mapbox: initialize lowp float opacity
374gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
375#ifdef GLOBE
376v_depth=gl_Position.z/gl_Position.w;
377#endif
378}`),fillOutlinePattern:to(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
379#ifdef GLOBE
380in float v_depth;
381#endif
382#pragma mapbox: define lowp float opacity
383#pragma mapbox: define lowp vec4 pattern_from
384#pragma mapbox: define lowp vec4 pattern_to
385void main() {
386#pragma mapbox: initialize lowp float opacity
387#pragma mapbox: initialize mediump vec4 pattern_from
388#pragma mapbox: initialize mediump vec4 pattern_to
389vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
390#ifdef GLOBE
391if (v_depth > 1.0) {discard;}
392#endif
393#ifdef OVERDRAW_INSPECTOR
394fragColor=vec4(1.0);
395#endif
396}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
397#ifdef GLOBE
398out float v_depth;
399#endif
400#pragma mapbox: define lowp float opacity
401#pragma mapbox: define lowp vec4 pattern_from
402#pragma mapbox: define lowp vec4 pattern_to
403#pragma mapbox: define lowp float pixel_ratio_from
404#pragma mapbox: define lowp float pixel_ratio_to
405void main() {
406#pragma mapbox: initialize lowp float opacity
407#pragma mapbox: initialize mediump vec4 pattern_from
408#pragma mapbox: initialize mediump vec4 pattern_to
409#pragma mapbox: initialize lowp float pixel_ratio_from
410#pragma mapbox: initialize lowp float pixel_ratio_to
411vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
412#ifdef GLOBE
413v_depth=gl_Position.z/gl_Position.w;
414#endif
415}`),fillPattern:to(`#ifdef GL_ES
416precision highp float;
417#endif
418uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
419#pragma mapbox: define lowp float opacity
420#pragma mapbox: define lowp vec4 pattern_from
421#pragma mapbox: define lowp vec4 pattern_to
422void main() {
423#pragma mapbox: initialize lowp float opacity
424#pragma mapbox: initialize mediump vec4 pattern_from
425#pragma mapbox: initialize mediump vec4 pattern_to
426vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
427#ifdef OVERDRAW_INSPECTOR
428fragColor=vec4(1.0);
429#endif
430}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
431#pragma mapbox: define lowp float opacity
432#pragma mapbox: define lowp vec4 pattern_from
433#pragma mapbox: define lowp vec4 pattern_to
434#pragma mapbox: define lowp float pixel_ratio_from
435#pragma mapbox: define lowp float pixel_ratio_to
436void main() {
437#pragma mapbox: initialize lowp float opacity
438#pragma mapbox: initialize mediump vec4 pattern_from
439#pragma mapbox: initialize mediump vec4 pattern_to
440#pragma mapbox: initialize lowp float pixel_ratio_from
441#pragma mapbox: initialize lowp float pixel_ratio_to
442vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_siz
442e_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:to(`in vec4 v_color;void main() {fragColor=v_color;
443#ifdef OVERDRAW_INSPECTOR
444fragColor=vec4(1.0);
445#endif
446}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
447#ifdef TERRAIN3D
448in vec2 a_centroid;
449#endif
450out vec4 v_color;
451#pragma mapbox: define highp float base
452#pragma mapbox: define highp float height
453#pragma mapbox: define highp vec4 color
454void main() {
455#pragma mapbox: initialize highp float base
456#pragma mapbox: initialize highp float height
457#pragma mapbox: initialize highp vec4 color
458vec3 normal=a_normal_ed.xyz;
459#ifdef TERRAIN3D
460float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
461#else
462float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
463#endif
464base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
465#ifdef GLOBE
466vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
467#else
468gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
469#endif
470float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
471#ifdef GLOBE
472mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
473#endif
474directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:to(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
475#pragma mapbox: define lowp float base
476#pragma mapbox: define lowp float height
477#pragma mapbox: define lowp vec4 pattern_from
478#pragma mapbox: define lowp vec4 pattern_to
479#pragma mapbox: define lowp float pixel_ratio_from
480#pragma mapbox: define lowp float pixel_ratio_to
481void main() {
482#pragma mapbox: initialize lowp float base
483#pragma mapbox: initialize lowp float height
484#pragma mapbox: initialize mediump vec4 pattern_from
485#pragma mapbox: initialize mediump vec4 pattern_to
486#pragma mapbox: initialize lowp float pixel_ratio_from
487#pragma mapbox: initialize lowp float pixel_ratio_to
488vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
489#ifdef OVERDRAW_INSPECTOR
490fragColor=vec4(1.0);
491#endif
492}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
493#ifdef TERRAIN3D
494in vec2 a_centroid;
495#endif
496#ifdef GLOBE
497out vec3 v_sphere_pos;
498#endif
499out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
500#pragma mapbox: define lowp float base
501#pragma mapbox: define lowp float height
502#pragma mapbox: define lowp vec4 pattern_from
503#pragma mapbox: define lowp vec4 pattern_to
504#pragma mapbox: define lowp float pixel_ratio_from
505#pragma mapbox: define lowp float pixel_ratio_to
506void main() {
507#pragma mapbox: initialize lowp float base
508#pragma mapbox: initialize lowp float height
509#pragma mapbox: initialize mediump vec4 pattern_from
510#pragma mapbox: initialize mediump vec4 pattern_to
511#pragma mapbox: initialize lowp float pixel_ratio_from
512#pragma mapbox: initialize lowp float pixel_ratio_to
513vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
514#ifdef TERRAIN3D
515float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
516#else
517float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
518#endif
519base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
520#ifdef GLOBE
521vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
522#else
523gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
524#endif
525vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
526? a_pos
527: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:to(`#ifdef GL_ES
528precision highp float;
529#endif
530uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/p
530ow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);
531#ifdef OVERDRAW_INSPECTOR
532fragColor=vec4(1.0);
533#endif
534}`,"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;}"),hillshade:to(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];
535#define PI 3.141592653589793
536#define STANDARD 0
537#define COMBINED 1
538#define IGOR 2
539#define MULTIDIRECTIONAL 3
540#define BASIC 4
541float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else
542{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else
543{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}
544#ifdef OVERDRAW_INSPECTOR
545fragColor=vec4(1.0);
546#endif
547}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:to(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
548#ifdef GLOBE
549in float v_depth;
550#endif
551#pragma mapbox: define highp vec4 color
552#pragma mapbox: define lowp float blur
553#pragma mapbox: define lowp float opacity
554void main() {
555#pragma mapbox: initialize highp vec4 color
556#pragma mapbox: initialize lowp float blur
557#pragma mapbox: initialize lowp float opacity
558float 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);fragColor=color*(alpha*opacity);
559#ifdef GLOBE
560if (v_depth > 1.0) {discard;}
561#endif
562#ifdef OVERDRAW_INSPECTOR
563fragColor=vec4(1.0);
564#endif
565}`,`
566#define scale 0.015873016
567in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;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 float v_linesofar;
568#ifdef GLOBE
569out float v_depth;
570#endif
571#pragma mapbox: define highp vec4 color
572#pragma mapbox: define lowp float blur
573#pragma mapbox: define lowp float opacity
574#pragma mapbox: define mediump float gapwidth
575#pragma mapbox: define lowp float offset
576#pragma mapbox: define mediump float width
577void main() {
578#pragma mapbox: initialize highp vec4 color
579#pragma mapbox: initialize lowp float blur
580#pragma mapbox: initialize lowp float opacity
581#pragma mapbox: initialize mediump float gapwidth
582#pragma mapbox: initialize lowp float offset
583#pragma mapbox: initialize mediump float width
584float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
584float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
585#ifdef GLOBE
586v_depth=gl_Position.z/gl_Position.w;
587#endif
588#ifdef TERRAIN3D
589v_gamma_scale=1.0;
590#else
591float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
592#endif
593v_width2=vec2(outset,inset);}`),lineGradient:to(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
594#ifdef GLOBE
595in float v_depth;
596#endif
597#pragma mapbox: define lowp float blur
598#pragma mapbox: define lowp float opacity
599void main() {
600#pragma mapbox: initialize lowp float blur
601#pragma mapbox: initialize lowp float opacity
602float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
603#ifdef GLOBE
604if (v_depth > 1.0) {discard;}
605#endif
606#ifdef OVERDRAW_INSPECTOR
607fragColor=vec4(1.0);
608#endif
609}`,`
610#define scale 0.015873016
611in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
612#ifdef GLOBE
613out float v_depth;
614#endif
615#pragma mapbox: define lowp float blur
616#pragma mapbox: define lowp float opacity
617#pragma mapbox: define mediump float gapwidth
618#pragma mapbox: define lowp float offset
619#pragma mapbox: define mediump float width
620void main() {
621#pragma mapbox: initialize lowp float blur
622#pragma mapbox: initialize lowp float opacity
623#pragma mapbox: initialize mediump float gapwidth
624#pragma mapbox: initialize lowp float offset
625#pragma mapbox: initialize mediump float width
626float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
627#ifdef GLOBE
628v_depth=gl_Position.z/gl_Position.w;
629#endif
630#ifdef TERRAIN3D
631v_gamma_scale=1.0;
632#else
633float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
634#endif
635v_width2=vec2(outset,inset);}`),linePattern:to(`#ifdef GL_ES
636precision highp float;
637#endif
638uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;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;
639#ifdef GLOBE
640in float v_depth;
641#endif
642#pragma mapbox: define lowp vec4 pattern_from
643#pragma mapbox: define lowp vec4 pattern_to
644#pragma mapbox: define lowp float pixel_ratio_from
645#pragma mapbox: define lowp float pixel_ratio_to
646#pragma mapbox: define lowp float blur
647#pragma mapbox: define lowp float opacity
648void main() {
649#pragma mapbox: initialize mediump vec4 pattern_from
650#pragma mapbox: initialize mediump vec4 pattern_to
651#pragma mapbox: initialize lowp float pixel_ratio_from
652#pragma mapbox: initialize lowp float pixel_ratio_to
653#pragma mapbox: initialize lowp float blur
654#pragma mapbox: initialize lowp float opacity
655vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
656#ifdef GLOBE
657if (v_depth > 1.0) {discard;}
658#endif
659#ifdef OVERDRAW_INSPECTOR
660fragColor=vec4(1.0);
661#endif
662}`,`
663#define scale 0.015873016
664#define LINE_DISTANCE_SCALE 2.0
665in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;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;
666#ifdef GLOBE
667out float v_depth;
668#endif
669#pragma mapbox: define lowp float blur
670#pragma mapbox: define lowp float opacity
671#pragma mapbox: define lowp float offset
672#pragma mapbox: define mediump float gapwidth
673#pragma mapbox: define mediump float width
674#pragma mapbox: define lowp float floorwidth
675#pragma mapbox: define lowp vec4 pattern_from
676#pragma mapbox: define lowp vec4 pattern_to
677#pragma mapbox: define lowp float pixel_ratio_from
678#pragma mapbox: define lowp float pixel_ratio_to
679void main() {
680#pragma mapbox: initialize lowp float blur
681#pragma mapbox: initialize lowp float opacity
682#pragma mapbox: initialize lowp float offset
683#pragma mapbox: initialize mediump float gapwidth
684#pragma mapbox: initialize mediump float width
685#pragma mapbox: initialize lowp float floorwidth
686#pragma mapbox: initialize mediump vec4 pattern_from
687#pragma mapbox: initialize mediump vec4 pattern_to
688#pragma mapbox: initialize lowp float pixel_ratio_from
689#pragma mapbox: initialize lowp float pixel_ratio_to
690float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
690float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
691#ifdef GLOBE
692v_depth=gl_Position.z/gl_Position.w;
693#endif
694#ifdef TERRAIN3D
695v_gamma_scale=1.0;
696#else
697float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
698#endif
699v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:to(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
700#ifdef GLOBE
701in float v_depth;
702#endif
703#pragma mapbox: define highp vec4 color
704#pragma mapbox: define lowp float blur
705#pragma mapbox: define lowp float opacity
706#pragma mapbox: define mediump float width
707#pragma mapbox: define lowp float floorwidth
708#pragma mapbox: define mediump vec4 dasharray_from
709#pragma mapbox: define mediump vec4 dasharray_to
710void main() {
711#pragma mapbox: initialize highp vec4 color
712#pragma mapbox: initialize lowp float blur
713#pragma mapbox: initialize lowp float opacity
714#pragma mapbox: initialize mediump float width
715#pragma mapbox: initialize lowp float floorwidth
716#pragma mapbox: initialize mediump vec4 dasharray_from
717#pragma mapbox: initialize mediump vec4 dasharray_to
718float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);
718float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
719#ifdef GLOBE
720if (v_depth > 1.0) {discard;}
721#endif
722#ifdef OVERDRAW_INSPECTOR
723fragColor=vec4(1.0);
724#endif
725}`,`
726#define scale 0.015873016
727#define LINE_DISTANCE_SCALE 2.0
728in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
729#ifdef GLOBE
730out float v_depth;
731#endif
732#pragma mapbox: define highp vec4 color
733#pragma mapbox: define lowp float blur
734#pragma mapbox: define lowp float opacity
735#pragma mapbox: define mediump float gapwidth
736#pragma mapbox: define lowp float offset
737#pragma mapbox: define mediump float width
738#pragma mapbox: define lowp float floorwidth
739#pragma mapbox: define mediump vec4 dasharray_from
740#pragma mapbox: define mediump vec4 dasharray_to
741void main() {
742#pragma mapbox: initialize highp vec4 color
743#pragma mapbox: initialize lowp float blur
744#pragma mapbox: initialize lowp float opacity
745#pragma mapbox: initialize mediump float gapwidth
746#pragma mapbox: initialize lowp float offset
747#pragma mapbox: initialize mediump float width
748#pragma mapbox: initialize lowp float floorwidth
749#pragma mapbox: initialize mediump vec4 dasharray_from
750#pragma mapbox: initialize mediump vec4 dasharray_to
751float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
752#ifdef GLOBE
753v_depth=gl_Position.z/gl_Position.w;
754#endif
755#ifdef TERRAIN3D
756v_gamma_scale=1.0;
757#else
758float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
759#endif
760float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:to(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;
761#ifdef GLOBE
762in float v_depth;
763#endif
764#pragma mapbox: define lowp float blur
765#pragma mapbox: define lowp float opacity
766#pragma mapbox: define mediump float width
767#pragma mapbox: define lowp float floorwidth
768#pragma mapbox: define mediump vec4 dasharray_from
769#pragma mapbox: define mediump vec4 dasharray_to
770void main() {
771#pragma mapbox: initialize lowp float blur
772#pragma mapbox: initialize lowp float opacity
773#pragma mapbox: initialize mediump float width
774#pragma mapbox: initialize lowp float floorwidth
775#pragma mapbox: initialize mediump vec4 dasharray_from
776#pragma mapbox: initialize mediump vec4 dasharray_to
777float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);
777float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);
778#ifdef GLOBE
779if (v_depth > 1.0) {discard;}
780#endif
781#ifdef OVERDRAW_INSPECTOR
782fragColor=vec4(1.0);
783#endif
784}`,`
785#define scale 0.015873016
786#define LINE_DISTANCE_SCALE 2.0
787in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;
788#ifdef GLOBE
789out float v_depth;
790#endif
791#pragma mapbox: define lowp float blur
792#pragma mapbox: define lowp float opacity
793#pragma mapbox: define mediump float gapwidth
794#pragma mapbox: define lowp float offset
795#pragma mapbox: define mediump float width
796#pragma mapbox: define lowp float floorwidth
797#pragma mapbox: define mediump vec4 dasharray_from
798#pragma mapbox: define mediump vec4 dasharray_to
799void main() {
800#pragma mapbox: initialize lowp float blur
801#pragma mapbox: initialize lowp float opacity
802#pragma mapbox: initialize mediump float gapwidth
803#pragma mapbox: initialize lowp float offset
804#pragma mapbox: initialize mediump float width
805#pragma mapbox: initialize lowp float floorwidth
806#pragma mapbox: initialize mediump vec4 dasharray_from
807#pragma mapbox: initialize mediump vec4 dasharray_to
808float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
809#ifdef GLOBE
810v_depth=gl_Position.z/gl_Position.w;
811#endif
812#ifdef TERRAIN3D
813v_gamma_scale=1.0;
814#else
815float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
816#endif
817float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:to(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
818#ifdef OVERDRAW_INSPECTOR
819fragColor=vec4(1.0);
820#endif
821}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
822#ifdef GLOBE
823if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
824#endif
825v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:to(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity;
826#ifdef OVERDRAW_INSPECTOR
827fragColor=vec4(1.0);
828#endif
829}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_total_opacity;
830#pragma mapbox: define lowp float opacity
831void main() {
832#pragma mapbox: initialize lowp float opacity
833vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
834camera_to_anchor_distance/u_camera_to_center_distance :
835u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
836#ifdef GLOBE
837if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
838#endif
839vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:to(`#define SDF_PX 8.0
840uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;
841#pragma mapbox: define highp vec4 fill_color
842#pragma mapbox: define highp vec4 halo_color
843#pragma mapbox: define lowp float halo_width
844#pragma mapbox: define lowp float halo_blur
845void main() {
846#pragma mapbox: initialize highp vec4 fill_color
847#pragma mapbox: initialize highp vec4 halo_color
848#pragma mapbox: initialize lowp float halo_width
849#pragma mapbox: initialize lowp float halo_blur
850float 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;}
851#ifdef OVERDRAW_INSPECTOR
852fragColor=vec4(1.0);
853#endif
854}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;
855#pragma mapbox: define highp vec4 fill_color
856#pragma mapbox: define highp vec4 halo_color
857#pragma mapbox: define lowp float opacity
858#pragma mapbox: define lowp float halo_width
859#pragma mapbox: define lowp float halo_blur
860void main() {
861#pragma mapbox: initialize highp vec4 fill_color
862#pragma mapbox: initialize highp vec4 halo_color
863#pragma mapbox: initialize lowp float opacity
864#pragma mapbox: initialize lowp float halo_width
865#pragma mapbox: initialize lowp float halo_blur
866vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
867camera_to_anchor_distance/u_camera_to_center_distance :
868u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
869#ifdef GLOBE
870if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
871#endif
872vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:to(`#define SDF_PX 8.0
873#define SDF 1.0
874#define ICON 0.0
875uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;
876#pragma mapbox: define highp vec4 fill_color
877#pragma mapbox: define highp vec4 halo_color
878#pragma mapbox: define lowp float halo_width
879#pragma mapbox: define lowp float halo_blur
880void main() {
881#pragma mapbox: initialize highp vec4 fill_color
882#pragma mapbox: initialize highp vec4 halo_color
883#pragma mapbox: initialize lowp float halo_width
884#pragma mapbox: initialize lowp float halo_blur
885float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;
885fragColor=texture(u_texture_icon,tex_icon)*total_opacity;
886#ifdef OVERDRAW_INSPECTOR
887fragColor=vec4(1.0);
888#endif
889return;}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;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;}
890#ifdef OVERDRAW_INSPECTOR
891fragColor=vec4(1.0);
892#endif
893}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;
894#pragma mapbox: define highp vec4 fill_color
895#pragma mapbox: define highp vec4 halo_color
896#pragma mapbox: define lowp float opacity
897#pragma mapbox: define lowp float halo_width
898#pragma mapbox: define lowp float halo_blur
899void main() {
900#pragma mapbox: initialize highp vec4 fill_color
901#pragma mapbox: initialize highp vec4 halo_color
902#pragma mapbox: initialize lowp float opacity
903#pragma mapbox: initialize lowp float halo_width
904#pragma mapbox: initialize lowp float halo_blur
905vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
906camera_to_anchor_distance/u_camera_to_center_distance :
907u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
908#ifdef GLOBE
909if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
910#endif
911vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:to("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);
911float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:to("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:to("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:to("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:to(`#ifdef GL_ES
912precision highp float;
913#endif
914in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758
915);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:to("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};
915function to(e,t){let r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i=t.match(/in ([\w]+) ([\w]+)/g),n=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=o?o.concat(n):n,s={};return{fragmentSource:e=e.replace(r,(e,t,r,i,n)=>(s[n]=!0,"define"===t?`
916#ifndef HAS_UNIFORM_u_${n}
917in ${r} ${i} ${n};
918#else
919uniform ${r} ${i} u_${n};
920#endif
921`:`
922#ifdef HAS_UNIFORM_u_${n}
923    ${r} ${i} ${n} = u_${n};
924#endif
925`)),vertexSource:t=t.replace(r,(e,t,r,i,n)=>{let o="float"===i?"vec2":"vec4",a=n.match(/color/)?"color":o;return s[n]?"define"===t?`
926#ifndef HAS_UNIFORM_u_${n}
927uniform lowp float u_${n}_t;
928in ${r} ${o} a_${n};
929out ${r} ${i} ${n};
930#else
931uniform ${r} ${i} u_${n};
932#endif
933`:"vec4"===a?`
934#ifndef HAS_UNIFORM_u_${n}
935    ${n} = a_${n};
936#else
937    ${r} ${i} ${n} = u_${n};
938#endif
939`:`
940#ifndef HAS_UNIFORM_u_${n}
941    ${n} = unpack_mix_${a}(a_${n}, u_${n}_t);
942#else
943    ${r} ${i} ${n} = u_${n};
944#endif
945`:"define"===t?`
946#ifndef HAS_UNIFORM_u_${n}
947uniform lowp float u_${n}_t;
948in ${r} ${o} a_${n};
949#else
950uniform ${r} ${i} u_${n};
951#endif
952`:"vec4"===a?`
953#ifndef HAS_UNIFORM_u_${n}
954    ${r} ${i} ${n} = a_${n};
955#else
956    ${r} ${i} ${n} = u_${n};
957#endif
958`:`
959#ifndef HAS_UNIFORM_u_${n}
960    ${r} ${i} ${n} = unpack_mix_${a}(a_${n}, u_${n}_t);
961#else
962    ${r} ${i} ${n} = u_${n};
963#endif
964`}),staticAttributes:i,staticUniforms:a}}class ta{constructor(e,t,r){this.vertexBuffer=e,this.indexBuffer=t,this.segments=r}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var ts=t.aS([{name:"a_pos",type:"Int16",components:2}]);let tl="#define PROJECTION_MERCATOR",tu="mercator";class tc{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return tu}get shaderDefine(){return tl}get shaderPreludeCode(){return tn.projectionMercator}get vertexShaderPreludeCode(){return tn.projectionMercator.vertexSource}get subdivisionGranularity(){return t.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,r,i,n,o){if(this._cachedMesh)return this._cachedMesh;let a=new t.aU;a.emplaceBack(0,0),a.emplaceBack(t.a6,0),a.emplaceBack(0,t.a6),a.emplaceBack(t.a6,t.a6);let s=e.createVertexBuffer(a,ts.members),l=t.aV.simpleSegment(0,0,4,2),u=new t.aW;u.emplaceBack(1,0,2),u.emplaceBack(1,2,3);let c=e.createIndexBuffer(u);return this._cachedMesh=new ta(s,c,l),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class th{constructor(e=0,t=0,r=0,i=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(i)||i<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=i}interpolate(e,r,i){return null!=r.top&&null!=e.top&&(this.top=t.H.number(e.top,r.top,i)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.H.number(e.bottom,r.bottom,i)),null!=r.left&&null!=e.left&&(this.left=t.H.number(e.left,r.left,i)),null!=r.right&&null!=e.right&&(this.right=t.H.number(e.right,r.right,i)),this}getCenter(e,r){let i=t.al((this.left+e-this.right)/2,0,e),n=t.al((this.top+r-this.bottom)/2,0,r);return new t.P(i,n)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new th(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function td(e,t){if(!e.renderWorldCopies||e.lngRange)return;let r=t.lng-e.center.lng;t.lng+=r>180?-360:360*(r<-180)}function tp(e){return Math.max(0,Math.floor(e))}class tf{constructor(e,r){var i;this.applyConstrain=(e,t)=>null!==this._constrainOverride?this._constrainOverride(e,t):this._callbacks.defaultConstrain(e,t),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=void 0===(null==r?void 0:r.renderWorldCopies)||!!(null==r?void 0:r.renderWorldCopies),this._minZoom=(null==r?void 0:r.minZoom)||0,this._maxZoom=(null==r?void 0:r.maxZoom)||22,this._minPitch=null==(null==r?void 0:r.minPitch)?0:null==r?void 0:r.minPitch,this._maxPitch=null==(null==r?void 0:r.maxPitch)?60:null==r?void 0:r.maxPitch,this._constrainOverride=null!=(i=null==r?void 0:r.constrainOverride)?i:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new t.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=tp(this._zoom),this._scale=t.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new th,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}
964apply(e,r,i){this._constrainOverride=e.constrainOverride,this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=tp(this._zoom),this._scale=t.ao(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new th(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!i&&e.autoCalculateNearFarZ,r&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){void 0===e&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){var r,i,n,o,a,s,l,u,c;let h=t.X(e,-180,180)*Math.PI/180;this._bearingInRadians!==h&&(this._unmodified=!1,this._bearingInRadians=h,this._calcMatrices(),this._rotationMatrix=y(),r=this._rotationMatrix,n=-this._bearingInRadians,o=(i=this._rotationMatrix)[0],a=i[1],s=i[2],l=i[3],u=Math.sin(n),c=Math.cos(n),r[0]=o*c+s*u,r[1]=a*c+l*u,r[2]=-(o*u)+s*c,r[3]=-(a*u)+l*c)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let r=t.al(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==r&&(this._unmodified=!1,this._pitchInRadians=r,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return t.aX(this._fovInRadians)}setFov(e){e=t.al(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=t.an(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let r=this.applyConstrain(this._center,e).zoom;this._zoom!==r&&(this._unmodified=!1,this._zoom=r,this._tileZoom=Math.max(0,Math.floor(r)),this._scale=t.ao(r),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this.constrainInternal(),this._calcMatrices()}resize(e,t,r=!0){this._width=e,this._height=t,r&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var e,t;return 2!==(null==(e=this._latRange)?void 0:e.length)||2!==(null==(t=this._lngRange)?void 0:t.length)?null:new W([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-t.am,t.am])}getCameraQueryGeometry(e,r){if(1===r.length)return[r[0],e];{let{minX:i,minY:n,maxX:o,maxY:a}=t.a8.fromPoints(r).extend(e);return[new t.P(i,n),new t.P(o,n),new t.P(o,a),new t.P(i,a),new t.P(i,n)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.applyConstrain(this.center,this.zoom);this.setCenter(t),this.setZoom(r),this._unmodified=e,this._constraining=!1}
964_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=t.ap(new Float64Array(16));t.S(e,e,[this._width/2,-this._height/2,1]),t.Q(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=t.ap(new Float64Array(16)),t.S(e,e,[1,-1,1]),t.Q(e,e,[-1,-1,0]),t.S(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,i,n){let o=void 0!==i?i:this.bearing,a=n=void 0!==n?n:this.pitch,{distanceToCenter:s,clampedElevation:l}=this._distanceToCenterFromAltElevationPitch(r,this.elevation,a),{x:u,y:c}=ey(a,o),h=t.a7.fromLngLat(e,r),d,p,f=t.aY(1,h.y),m=0;do{if((m+=1)>10)break;p=s/f,f=1/(d=new t.a7(h.x+u*p,h.y+c*p)).meterInMercatorCoordinateUnits()}while(Math.abs(s-p*f)>1e-12)return{center:d.toLngLat(),elevation:l,zoom:t.ar(this.height/2/Math.tan(this.fovInRadians/2)/p/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;let r=1/this.worldSize,i=t.aq(1,this.center.lat)*this.worldSize,n=t.a7.fromLngLat(this.center,this.elevation),o=n.x/r,a=n.y/r,s=n.z/r,l=this.pitch,{x:u,y:c,z:h}=ey(l,this.bearing),d=this.cameraToCenterDistance,{distanceToCenter:p,clampedElevation:f}=this._distanceToCenterFromAltElevationPitch((s+d*h)/i,e,l),m=p*i,g=new t.a7((o+-(d*u)+u*m)*r,(a+-(d*c)+c*m)*r,0).toLngLat(),y=t.aq(1,g.lat),v=t.ar(this.height/2/Math.tan(this.fovInRadians/2)/p/y/this.tileSize);this._elevation=f,this._center=g,this.setZoom(v)}_distanceToCenterFromAltElevationPitch(e,r,i){let n=-Math.cos(t.an(i)),o=e-r,a,s=r;return n*o>=0||.1>Math.abs(n)?s=e+(a=1e4)*n:a=-o/n,{distanceToCenter:a,clampedElevation:s}}getCameraPoint(){let e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let e=t.aq(1,this.center.lat)*this.worldSize;return eg(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let r=e.canonical.z>=0?1<<e.canonical.z:Math.pow(2,e.canonical.z);return[e.canonical.x/r,e.canonical.y/r,1/r/t.a6,1/r/t.a6]}}class tm{constructor(e,r){this.min=e,this.max=r,this.center=t.aZ([],t.a_([],this.min,this.max),.5)}quadrant(e){let r=[e%2==0,e<2],i=t.a$(this.min),n=t.a$(this.max);for(let e=0;e<r.length;e++)i[e]=r[e]?this.min[e]:this.center[e],n[e]=r[e]?this.center[e]:this.max[e];return n[2]=this.max[2],new tm(i,n)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersectsFrustum(e){let t=!0;for(let r of e.planes){let e=this.intersectsPlane(r);if(0===e)return 0;1===e&&(t=!1)}return t?2:e.aabb.min[0]>this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]<this.min[0]||e.aabb.max[1]<this.min[1]||e.aabb.max[2]<this.min[2]?0:1}intersectsPlane(e){let t=e[3],r=e[3];for(let i=0;i<3;i++)e[i]>0?(t+=e[i]*this.min[i],r+=e[i]*this.max[i]):(r+=e[i]*this.min[i],t+=e[i]*this.max[i]);return t>=0?2:r<0?0:1}}class tg{distanceToTile2d(e,t,r,i){return Math.hypot(i.distanceX([e,t]),i.distanceY([e,t]))}getWrap(e,t,r){return r}getTileBoundingVolume(e,r,i,n){var o,a;let s=0,l=0;if(null==n?void 0:n.terrain){let u=new t.a3(e.z,r,e.z,e.x,e.y),c=n.terrain.getMinMaxElevation(u);s=null!=(o=c.minElevation)?o:Math.min(0,i),l=null!=(a=c.maxElevation)?a:Math.max(0,i)}let u=1<<e.z;return new tm([r+e.x/u,e.y/u,s],[r+(e.x+1)/u,(e.y+1)/u,l])}allowVariableZoom(e,r){let i=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,n=t.al(78.5-i/2,0,60);return!!r.terrain||e.pitch>n}allowWorldCopies(){return!0}prepareNextFrame(){}}class ty{constructor(e,t,r){this.points=e,this.planes=t,this.aabb=r}static fromInvProjectionMatrix(e,r=1,i=0,n,o){let a=o?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],s=Math.pow(2,i),l=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(i=>{let n,o;return o=1/(n=t.aE([],i,e))[3]/r*s,t.b4(n,n,[o,o,1/n[3],o])});n&&function(e,r,i,n){let o,a,s,l=4*!!n,u=4*!n,c=0,h=[],d=[];for(let r=0;r<4;r++){let i=t.b0([],e[r+u],e[r+l]),n=t.b5(i);t.aZ(i,i,1/n),h.push(n),d.push(i)}for(let r=0;r<4;r++){let n=t.b6(e[r+l],d[r],i);c=null!==n&&n>=0?Math.max(c,n):Math.max(c,h[r])}let p=(o=t.b0([],e[r[0]],e[r[1]]),a=t.b0([],e[r[2]],e[r[1]]),s=[0,0,0,0],t.b1(s,t.b2([],o,a)),s[3]=-t.b3(s,e[r[0]]),s),f=function(e,r){let i=t.b7(e),n=t.b8([],e,1/i),o=t.b0([],r,t.aZ([],n,t.b3(r,n))),a=t.b7(o);if(a>0){let e=Math.sqrt(1-n[3]*n[3]),i=t.aZ([],n,-n[3]),s=t.a_([],i,t.aZ([],o,e/a));return t.b9(r,s)}return null}(i,p);null!==f&&(c=Math.min(c,f/t.b3(d[0],p)));for(let t=0;t<4;t++){let r=Math.min(c,h[t]);e[t+u]=[e[t+l][0]+d[t][0]*r,e[t+l][1]+d[t][1]*r,e[t+l][2]+d[t][2]*r,1]}}(l,a[0],n,o);let u=a.map(e=>{let r=t.b0([],l[e[0]],l[e[1]]),i=t.b0([],l[e[2]],l[e[1]]),n=t.b1([],t.b2([],r,i)),o=-t.b3(n,l[e[1]]);return n.concat(o)}),c=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let e of l)for(let t=0;t<3;t++)c[t]=Math.min(c[t],e[t]),h[t]=Math.max(h[t],e[t]);return new ty(l,u,new tm(c,h))}}
964class tv{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,r=!0){this._helper.resize(e,t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,t){}constructor(e){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(e,r)=>{let i,n;r=t.al(+r,this.minZoom,this.maxZoom);let o={center:new t.W(e.lng,e.lat),zoom:r},a=this._helper._lngRange;this._helper._renderWorldCopies||null!==a||(a=[-(180-1e-10),180-1e-10]);let s=this.tileSize*t.ao(o.zoom),l=0,u=s,c=0,h=s,d=0,p=0,{x:f,y:m}=this.size;if(this._helper._latRange){let e=this._helper._latRange;l=t.Y(e[1])*s,(u=t.Y(e[0])*s)-l<m&&(d=m/(u-l))}a&&(c=t.X(t.Z(a[0])*s,0,s),(h=t.X(t.Z(a[1])*s,0,s))<c&&(h+=s),h-c<f&&(p=f/(h-c)));let{x:g,y:y}=ed(s,e),v=Math.max(p||0,d||0);if(v)return o.center=ep(s,new t.P(p?(h+c)/2:g,d?(u+l)/2:y)).wrap(),o.zoom+=t.ar(v),o;if(this._helper._latRange){let e=m/2;y-e<l&&(n=l+e),y+e>u&&(n=u-e)}if(a){let e=(c+h)/2,r=g;
964this._helper._renderWorldCopies&&(r=t.X(g,e-s/2,e+s/2));let n=f/2;r-n<c&&(i=c+n),r+n>h&&(i=h-n)}return(void 0!==i||void 0!==n)&&(o.center=ep(s,new t.P(null!=i?i:g,null!=n?n:y)).wrap()),o},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tf({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new tg}clone(){let e=new tv;return e.apply(this,!1),e}apply(e,t,r){this._helper.apply(e,t,r)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){let r=[new t.ba(0,e)];if(this._helper._renderWorldCopies){let i=this.screenPointToMercatorCoordinate(new t.P(0,0)),n=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,0)),o=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,this._helper._height)),a=this.screenPointToMercatorCoordinate(new t.P(0,this._helper._height)),s=Math.floor(Math.min(i.x,n.x,o.x,a.x)),l=Math.floor(Math.max(i.x,n.x,o.x,a.x));for(let i=s-1;i<=l+1;i++)0!==i&&r.push(new t.ba(i,e))}return r}getCameraFrustum(){return ty.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){let t=this.screenPointToLocation(this.centerPoint,e),r=e?e.getElevationForLngLatZoom(t,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(r)}setLocationAtPoint(e,r){let i=t.aq(this.elevation,this.center.lat),n=this.screenPointToMercatorCoordinateAtZ(r,i),o=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,i),a=t.a7.fromLngLat(e),s=new t.a7(a.x-(n.x-o.x),a.y-(n.y-o.y));this.setCenter(null==s?void 0:s.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,r){return r?this.coordinatePoint(t.a7.fromLngLat(e),r.getElevationForLngLat(e,this),this._pixelMatrix3D):this.coordinatePoint(t.a7.fromLngLat(e))}screenPointToLocation(e,t){var r;return null==(r=this.screenPointToMercatorCoordinate(e,t))?void 0:r.toLngLat()}screenPointToMercatorCoordinate(e,t){if(t){let r=t.pointCoordinate(e);if(null!=r)return r}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,r){let i=r||0,n=[e.x,e.y,0,1],o=[e.x,e.y,1,1];t.aE(n,n,this._pixelMatrixInverse),t.aE(o,o,this._pixelMatrixInverse);let a=n[3],s=o[3],l=n[1]/a,u=o[1]/s,c=n[2]/a,h=o[2]/s,d=c===h?0:(i-c)/(h-c);return new t.a7(t.H.number(n[0]/a,o[0]/s,d)/this.worldSize,t.H.number(l,u,d)/this.worldSize,i)}coordinatePoint(e,r=0,i=this._pixelMatrix){let n=[e.x*this.worldSize,e.y*this.worldSize,r,1];return t.aE(n,n,i),new t.P(n[0]/n[3],n[1]/n[3])}getBounds(){let e=Math.max(0,this._helper._height/2-ef(this));return(new W).extend(this.screenPointToLocation(new t.P(0,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new t.P(0,this._helper._height)))}isPointOnMapSurface(e,t){return t?null!=t.pointCoordinate(e):e.y>this.height/2-ef(this)}calculatePosMatrix(e,r=!1,i){var n;let o=null!=(n=e.key)?n:t.bb(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),a=r?this._alignedPosMatrixCache:this._posMatrixCache;if(a.has(o)){let e=a.get(o);return i?e.f32:e.f64}let s=em(e,this.worldSize);t.U(s,r?this._alignedProjMatrix:this._viewProjMatrix,s);let l={f64:s,f32:new Float32Array(s)};return a.set(o,l),i?l.f32:l.f64}calculateFogMatrix(e){let r=e.key,i=this._fogMatrixCacheF32;if(i.has(r))return i.get(r);let n=em(e,this.worldSize);return t.U(n,this._fogMatrix,n),i.set(r,new Float32Array(n)),i.get(r)}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}_calculateNearFarZIfNeeded(e,r,i){if(!this._helper.autoCalculateNearFarZ)return;let n=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),o=e-n*this._helper._pixelPerMeter/Math.cos(r),a=n<0?o:e,s=Math.PI/2+this.pitchInRadians,l=t.an(this.fov)*(Math.abs(Math.cos(t.an(this.roll)))*this.height+Math.abs(Math.sin(t.an(this.roll)))*this.width)/this.height*(.5+i.y/this.height),u=Math.sin(l)*a/Math.sin(t.al(Math.PI-s-l,.01,Math.PI-.01)),c=ef(this),h=Math.atan(c/this._helper.cameraToCenterDistance),d=t.an(.75),p=
964h>d?2*h*(.5+i.y/(2*c)):d,f=Math.min(u,Math.sin(p)*a/Math.sin(t.al(Math.PI-s-p,.01,Math.PI-.01)));this._helper._farZ=1.01*(Math.cos(Math.PI/2-r)*f+a),this._helper._nearZ=this._helper._height/50}_calcMatrices(){var e,r;let i;if(!this._helper._height)return;let n=this.centerOffset,o=ed(this.worldSize,this.center),a=o.x,s=o.y;this._helper._pixelPerMeter=t.aq(1,this.center.lat)*this.worldSize;let l=t.an(Math.min(this.pitch,89.25)),u=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(l));this._calculateNearFarZIfNeeded(u,l,n),i=new Float64Array(16),t.bc(i,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(e=this._invProjMatrix)[0]=1/(r=i)[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1/r[5],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=1/r[14],e[12]=0,e[13]=0,e[14]=-1,e[15]=r[10]/r[14],i[8]=-(2*n.x)/this._helper._width,i[9]=2*n.y/this._helper._height,this._projectionMatrix=t.bd(i),t.S(i,i,[1,-1,1]),t.Q(i,i,[0,0,-this._helper.cameraToCenterDistance]),t.be(i,i,-this.rollInRadians),t.bf(i,i,this.pitchInRadians),t.be(i,i,-this.bearingInRadians),t.Q(i,i,[-a,-s,0]),this._mercatorMatrix=t.S([],i,[this.worldSize,this.worldSize,this.worldSize]),t.S(i,i,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=t.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,i),t.Q(i,i,[0,0,-this.elevation]),this._viewProjMatrix=i,this._invViewProjMatrix=t.bg([],i);let c=[0,0,-1,1];t.aE(c,c,this._invViewProjMatrix),this._cameraPosition=[c[0]/c[3],c[1]/c[3],c[2]/c[3]],this._fogMatrix=new Float64Array(16),t.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,u,this._helper._farZ),this._fogMatrix[8]=-(2*n.x)/this.width,this._fogMatrix[9]=2*n.y/this.height,t.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),t.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),t.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),t.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),t.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),t.Q(this._fogMatrix,this._fogMatrix,[-a,-s,0]),t.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),t.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=t.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,i);let h=this._helper._width%2/2,d=this._helper._height%2/2,p=Math.cos(this.bearingInRadians),f=Math.sin(-this.bearingInRadians),m=a-Math.round(a)+p*h+f*d,g=s-Math.round(s)+p*d+f*h,y=new Float64Array(i);if(t.Q(y,y,[m>.5?m-1:m,g>.5?g-1:g,0]),this._alignedProjMatrix=y,!(i=t.bg(new Float64Array(16),this._pixelMatrix)))throw Error("failed to invert matrix");this._pixelMatrixInverse=i,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let e=this.screenPointToMercatorCoordinate(new t.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.aE(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let e=t.aq(1,this.center.lat)*this.worldSize;return eg(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,r){let i=t.a7.fromLngLat(e),n=[i.x*this.worldSize,i.y*this.worldSize,r,1];return t.aE(n,n,this._viewProjMatrix),n[2]/n[3]}getProjectionData(e){let r,{overscaledTileID:i,aligned:n,applyTerrainMatrix:o}=e,a=this._helper.getMercatorTileCoordinates(i),s=i?this.calculatePosMatrix(i,n,!0):null;return{mainMatrix:r=(null==i?void 0:i.terrainRttPosMatrix32f)&&o?i.terrainRttPosMatrix32f:s||t.bh(),tileMercatorCoords:a,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:r}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,t,r){return 1}transformLightDirection(e){return t.a$(e)}getRayDirectionFromPixel(e){throw Error("Not implemented.")}projectTileCoordinates(e,r,i,n){let o,a=this.calculatePosMatrix(i);n?(o=[e,r,n(e,r),1],t.aE(o,o,a)):e$(o=[e,r,0,1],o,a);let s=o[3];return{point:new t.P(o[0]/s,o[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}populateCache(e){for(let t of e)this.calculatePosMatrix(t)}getMatrixForModel(e,r){let i=t.a7.fromLngLat(e,r),n=i.meterInMercatorCoordinateUnits(),o=t.bi();return t.Q(o,o,[i.x,i.y,i.z]),t.be(o,o,Math.PI),t.bf(o,o,Math.PI/2),t.S(o,o,[-n,n,n]),o}getProjectionDataForCustomLayer(e=!0){let r=new t.a3(0,0,0,0,0),i=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:e}),n=em(r,this.worldSize);t.U(n,this._viewProjMatrix,n),i.tileMercatorCoords=[0,0,1,1];let o=[t.a6,t.a6,this.worldSize/this._helper.pixelsPerMeter],a=t.bj();return t.S(a,n,o),i.fallbackMatrix=a,i.mainMatrix=a,i}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function tb(){t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function t_(e){if(e.useSlerp)if(e.k<1){let r=t.bk(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),i=t.bk(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),n=new Float64Array(4);t.bl(n,r,i,e.k);let o=t.bm(n);e.tr.setRoll(o.roll),e.tr.setPitch(o.pitch),e.tr.setBearing(o.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(t.H.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(t.H.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(t.H.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function tx(e,r,i,n,o){let a=o.padding,s=ed(o.worldSize,i.getNorthWest()),l=ed(o.worldSize,i.getNorthEast()),u=ed(o.worldSize,i.getSouthEast()),c=ed(o.worldSize,i.getSouthWest
964()),h=t.an(-n),d=s.rotate(h),p=l.rotate(h),f=u.rotate(h),m=c.rotate(h),g=new t.P(Math.max(d.x,p.x,m.x,f.x),Math.max(d.y,p.y,m.y,f.y)),y=new t.P(Math.min(d.x,p.x,m.x,f.x),Math.min(d.y,p.y,m.y,f.y)),v=g.sub(y),b=(o.width-(a.left+a.right+r.left+r.right))/v.x,_=(o.height-(a.top+a.bottom+r.top+r.bottom))/v.y;if(_<0||b<0)return void tb();let x=Math.min(t.ar(o.scale*Math.min(b,_)),e.maxZoom),A=t.P.convert(e.offset),w=new t.P((r.left-r.right)/2,(r.top-r.bottom)/2).rotate(t.an(n)),S=A.add(w).mult(o.scale/t.ao(x));return{center:ep(o.worldSize,s.add(u).div(2).sub(S)),zoom:x,bearing:n}}class tA{get useGlobeControls(){return!1}handlePanInertia(e,t){let r=e.mag(),i=Math.abs(ef(t));return{easingOffset:e.mult(Math.min(.75*i/r,1)),easingCenter:t.center}}handleMapControlsRollPitchBearingZoom(e,t){e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta),e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta)}handleMapControlsPan(e,t,r){.01>e.around.distSqr(t.centerPoint)||t.setLocationAtPoint(r,e.around)}cameraForBoxAndBearing(e,t,r,i,n){return tx(e,t,r,i,n)}handleJumpToCenterZoom(e,r){e.zoom!==(void 0!==r.zoom?+r.zoom:e.zoom)&&e.setZoom(+r.zoom),void 0!==r.center&&e.setCenter(t.W.convert(r.center))}handleEaseTo(e,r){let i=e.zoom,n=e.padding,o={roll:e.roll,pitch:e.pitch,bearing:e.bearing},a={roll:void 0===r.roll?e.roll:r.roll,pitch:void 0===r.pitch?e.pitch:r.pitch,bearing:void 0===r.bearing?e.bearing:r.bearing},s=void 0!==r.zoom,l=!e.isPaddingEqual(r.padding),u=!1,c=s?+r.zoom:e.zoom,h=e.centerPoint.add(r.offsetAsPoint),d=e.screenPointToLocation(h),{center:p,zoom:f}=e.applyConstrain(t.W.convert(r.center||d),null!=c?c:i);td(e,p);let m=ed(e.worldSize,d),g=ed(e.worldSize,p).sub(m),y=t.ao(f-i);return{easeFunc:s=>{if(u&&e.setZoom(t.H.number(i,f,s)),t.bn(o,a)||t_({startEulerAngles:o,endEulerAngles:a,tr:e,k:s,useSlerp:o.roll!=a.roll}),l&&(e.interpolatePadding(n,r.padding,s),h=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{let r=t.ao(e.zoom-i),n=Math.pow(f>i?Math.min(2,y):Math.max(.5,y),1-s),o=ep(e.worldSize,m.add(g.mult(s*n)).mult(r));e.setLocationAtPoint(e.renderWorldCopies?o.wrap():o,h)}},isZooming:u=f!==i,elevationCenter:p}}handleFlyTo(e,r){let i,n=void 0!==r.zoom,o=e.zoom,a=e.applyConstrain(t.W.convert(r.center||r.locationAtOffset),n?+r.zoom:o),s=a.center,l=a.zoom;td(e,s);let u=ed(e.worldSize,r.locationAtOffset),c=ed(e.worldSize,s).sub(u),h=c.mag(),d=t.ao(l-o);if(void 0!==r.minZoom){let n=Math.min(+r.minZoom,o,l),a=e.applyConstrain(s,n).zoom;i=t.ao(a-o)}return{easeFunc:(r,i,n,a)=>{e.setZoom(1===r?l:o+t.ar(i));let h=1===r?s:ep(e.worldSize,u.add(c.mult(n)).mult(i));e.setLocationAtPoint(e.renderWorldCopies?h.wrap():h,a)},scaleOfZoom:d,targetCenter:s,scaleOfMinZoom:i,pixelPathLength:h}}}class tw{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}}tw.Replace=[1,0],tw.disabled=new tw(tw.Replace,t.bo.transparent,[!1,!1,!1,!1]),tw.unblended=new tw(tw.Replace,t.bo.transparent,[!0,!0,!0,!0]),tw.alphaBlended=new tw([1,771],t.bo.transparent,[!0,!0,!0,!0]);class tS{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}}tS.disabled=new tS(!1,1029,2305),tS.backCCW=new tS(!0,1029,2305),tS.frontCCW=new tS(!0,1028,2305);class tT{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}}tT.ReadOnly=!1,tT.ReadWrite=!0,tT.disabled=new tT(519,tT.ReadOnly,[0,1]);class tC{constructor(e,t,r,i,n,o){this.test=e,this.ref=t,this.mask=r,this.fail=i,this.depthFail=n,this.pass=o}}function tE(e){return"u">typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext}tC.disabled=new tC({func:519,mask:0},0,0,7680,7680,7680);class tP{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;let r=e.context,i=r.gl;this._texFormat=i.RGBA,this._texType=i.UNSIGNED_BYTE;let n=new t.aU;n.emplaceBack(-1,-1),n.emplaceBack(2,-1),n.emplaceBack(-1,2);let o=new t.aW;o.emplaceBack(0,1,2),this._fullscreenTriangle=new ta(r.createVertexBuffer(n,ts.members),r.createIndexBuffer(o),t.aV.simpleSegment(0,0,n.length,o.length)),this._resultBuffer=new Uint8Array(4),r.activeTexture.set(i.TEXTURE1);let a=i.createTexture();i.bindTexture(i.TEXTURE_2D,a),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.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texImage2D(i.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=r.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(a),tE(i)&&(this._pbo=i.createBuffer(),i.bindBuffer(i.PIXEL_PACK_BUFFER,this._pbo),i.bufferData(i.PIXEL_PACK_BUFFER,4,i.STREAM_READ),i.bindBuffer(i.PIXEL_PACK_BUFFER,null))}destroy(){let e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,t){let r=this._updateCount;return this._readbackQueue?r>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():r>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,t),this._updateCount++,this._measuredError}_bindFramebuffer(){let e=this._cachedRenderContext.context,t=e.gl;e.activeTexture.set(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,r){let i=this._cachedRenderContext.context,n=i.gl;if(this._bindFramebuffer(),i.viewport.set([0,0,this._texWidth,this._texHeight]),i.clear({color:t.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(i,n.TRIANGLES,tT.disabled,tC.disabled,tw.unblended,tS.disabled,{u_input:e,u_output_expected:r},null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&tE(n)){n.bindBuffer(n.PIXEL_PACK_BUFFER,this._pbo),n.readBuffer(n.COLOR_ATTACHMENT0),n.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),n.bindBuffer(n.PIXEL_PACK_BUFFER,null);let e=n.fenceSync(n.SYNC_GPU_COMMANDS_COMPLETE,0);n.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:e}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&tE(e)){let r=e.clientWaitSync(this._readbackQueue.sync,0,0);if(r===e.WAIT_FAILED)return t.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(r===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=tP._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let t;return t=0+(e[0]/256+e[1]/65536+e[2]/0x1000000),e[3]<127&&(t=-t),t/128}}let tI=t.a6/128;function tM(e,r){let i=void 0!==e.granularity?Math.max(e.granularity,1):1,n=i+2*!!e.generateBorders,o=i+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),a=n+1,s=o+1,l=e.generateBorders?-1:0,u=e.generateBorders||e.extendToNorthPole?-1:0,c=i+ +!!e.generateBorders,h=i+(e.generateBorders||e.extendToSouthPole?1:0),d=n*o*6,p=a*s>65536;if(p&&"16bit"===r)throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let f=p||"32bit"===r,m=new Int16Array(a*s*2),g=0;for(let r=u;r<=h;r++)for(let n=l;n<=c;n++){let o=n/i*t.a6;-1===n&&(o=-tI),n===i+1&&(o=t.a6+tI);let a=r/i*t.a6;-1===r&&(a=e.extendToNorthPole?t.bq:-tI),r===i+1&&(a=e.extendToSouthPole?t.br:t.a6+tI),m[g++]=o,m[g++]=a}let y=f?new Uint32Array(d):new Uint16Array(d),v=0;for(let e=0;e<o;e++)for(let t=0;t<n;t++){let r=t+1+e*a,i=t+(e+1)*a,n=t+1+(e+1)*a;y[v++]=t+e*a,y[v++]=i,y[v++]=r,y[v++]=r,y[v++]=i,y[v++]=n}return{vertices:m.buffer.slice(0),indices:y.buffer.slice(0),uses32bitIndices:f}}let tk=new t.aT({fill:new t.bs(128,2),line:new t.bs(512,0),tile:new t.bs(128,32),stencil:new t.bs(128,1),circle:3});class tO{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return tn.projectionGlobe}get vertexShaderPreludeCode(){return tn.projectionMercator.vertexSource}get subdivisionGranularity(){return tk}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(e){this._errorMeasurement||(this._errorMeasurement=new tP(e));let r=t.Y(this._errorQueryLatitudeDegrees),i=2*Math.atan(Math.exp(Math.PI-r*Math.PI*2))-.5*Math.PI,n=this._errorMeasurement.updateErrorLoop(r,i),o=_();n!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=n,this._errorMeasurementLastChangeTime=o);let a=Math.min(Math.max((o-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=t.bt(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,t.bu(a))}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,t,r,i,n){let o=("stencil"===n?tk.stencil:tk.tile).getGranularityForZoomLevel(t.z);return this._getMesh(e,{granularity:o,generateBorders:r,extendToNorthPole:0===t.y&&i,extendToSouthPole:t.y===(1<<t.z)-1&&i})}_getMesh(e,r){let i,n,o,a=this._getMeshKey(r);if(a in this._tileMeshCache)return this._tileMeshCache[a];let s=(i=tM(r,"16bit"),n=t.aU.deserialize({arrayBuffer:i.vertices,length:i.vertices.byteLength/2/2}),o=t.aW.deserialize({arrayBuffer:i.indices,length:i.indices.byteLength/2/3}),new ta(e.createVertexBuffer(n,ts.members),e.createIndexBuffer(o),t.aV.simpleSegment(0,0,n.length,o.length)));return this._tileMeshCache[a]=s,s}recalculate(e){}hasTransition(){var e;let t=_(),r=!1;return(r=(t-this._errorMeasurementLastChangeTime)/1e3<.7)||(r=null==(e=this._errorMeasurement)?void 0:e.awaitingQuery),r}setErrorQueryLatitudeDegrees(e){this._errorQueryLatitudeDegrees=e}}let tD=new t.u({type:new t.D(t.x.projection.type)});class tR extends t.E{constructor(e){super(),this._transitionable=new t.
964y(tD,void 0),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new t.J(0)),this._mercatorProjection=new tc,this._verticalPerspectiveProjection=new tO}get transitionState(){let e=this.properties.get("type");if("string"==typeof e&&"mercator"===e)return 0;if("string"==typeof e&&"vertical-perspective"===e)return 1;if(e instanceof t.bv){if("vertical-perspective"===e.from&&"mercator"===e.to)return 1-e.transition;if("mercator"===e.from&&"vertical-perspective"===e.to)return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,t,r,i,n){return this.currentProjection.getMeshFromTileID(e,t,r,i,n)}setProjection(e){this._transitionable.setValue("type",(null==e?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function tL(e){return 2*Math.PI*tj(e.worldSize,e.center.lat)}function tB(e,r,i,n,o){let a=1/(1<<o),s=r/t.a6*a+n*a,l=t.by((e/t.a6*a+i*a)*Math.PI*2+Math.PI,2*Math.PI),u=2*Math.atan(Math.exp(Math.PI-s*Math.PI*2))-.5*Math.PI,c=Math.cos(u),h=new Float64Array(3);return h[0]=Math.sin(l)*c,h[1]=Math.sin(u),h[2]=Math.cos(l)*c,h}function tF(e){var t,r;let i,n;return t=e.lng*Math.PI/180,i=Math.cos(r=e.lat*Math.PI/180),(n=new Float64Array(3))[0]=Math.sin(t)*i,n[1]=Math.sin(r),n[2]=Math.cos(t)*i,n}function tj(e,t){return e/(2*Math.PI)/Math.cos(t*Math.PI/180)}function tz(e){let r=Math.asin(e[1])/Math.PI*180,i=Math.sqrt(e[0]*e[0]+e[2]*e[2]);if(i>1e-6){let n=e[0]/i,o=Math.acos(e[2]/i),a=(n>0?o:-o)/Math.PI*180;return new t.W(t.X(a,-180,180),r)}return new t.W(0,r)}function tN(e){return Math.cos(e*Math.PI/180)}function tG(e,r){let i=tN(e),n=tN(r);return t.ar(n/i)}function tV(e,r){let i=e.rotate(r.bearingInRadians),n=r.zoom+tG(r.center.lat,0),o=t.bt(1/tN(r.center.lat),1/tN(Math.min(Math.abs(r.center.lat),60)),t.bw(n,7,3,0,1)),a=360/tL({worldSize:r.worldSize,center:{lat:r.center.lat}});return new t.W(r.center.lng-i.x*a*o,t.al(r.center.lat+i.y*a,-t.am,t.am))}function tU(e){let t=.5*e,r=Math.sin(t),i=Math.cos(t);return Math.log(r+i)-Math.log(i-r)}function tH(e,r,i,n){let o=e.lat+i*n;if(Math.abs(i)>1){let a=(Math.sign(e.lat+i)!==Math.sign(e.lat)?-Math.abs(e.lat):Math.abs(e.lat))*Math.PI/180,s=Math.abs(e.lat+i)*Math.PI/180,l=tU(a+n*(s-a)),u=tU(a),c=tU(s);return new t.W(e.lng+(l-u)/(c-u)*r,o)}return new t.W(e.lng+r*n,o)}class tW{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,t,r,i){let n=`${e.z}_${e.x}_${e.y}_${(null==i?void 0:i.terrain)?"t":""}`,o=this._cache.get(n);if(o)return o;let a=this._cachePrevious.get(n);if(a)return this._cache.set(n,a),a;let s=this._boundingVolumeFactory(e,t,r,i);return this._cache.set(n,s),this._hadAnyChanges=!0,s}}
964class tq{constructor(e,t,r,i){this.min=r,this.max=i,this.points=e,this.planes=t}static fromAabb(e,t){let r=[];for(let i=0;i<8;i++)r.push([1&~i?e[0]:t[0],1==(i>>1&1)?t[1]:e[1],1==(i>>2&1)?t[2]:e[2]]);return new tq(r,[[-1,0,0,t[0]],[1,0,0,-e[0]],[0,-1,0,t[1]],[0,1,0,-e[1]],[0,0,-1,t[2]],[0,0,1,-e[2]]],e,t)}static fromCenterSizeAngles(e,r,i){let n=t.bA([],i[0],i[1],i[2]),o=t.bB([],[r[0],0,0],n),a=t.bB([],[0,r[1],0],n),s=t.bB([],[0,0,r[2]],n),l=[...e],u=[...e];for(let t=0;t<8;t++)for(let r=0;r<3;r++){let i=e[r]+o[r]*(1&~t?-1:1)+a[r]*(1==(t>>1&1)?1:-1)+s[r]*(1==(t>>2&1)?1:-1);l[r]=Math.min(l[r],i),u[r]=Math.max(u[r],i)}let c=[];for(let r=0;r<8;r++){let i=[...e];t.a_(i,i,t.aZ([],o,1&~r?-1:1)),t.a_(i,i,t.aZ([],a,1==(r>>1&1)?1:-1)),t.a_(i,i,t.aZ([],s,1==(r>>2&1)?1:-1)),c.push(i)}return new tq(c,[[...o,-t.b3(o,c[0])],[...a,-t.b3(a,c[0])],[...s,-t.b3(s,c[0])],[-o[0],-o[1],-o[2],-t.b3(o,c[7])],[-a[0],-a[1],-a[2],-t.b3(a,c[7])],[-s[0],-s[1],-s[2],-t.b3(s,c[7])]],l,u)}intersectsFrustum(e){let t=!0,r=this.points.length,i=this.planes.length,n=e.planes.length,o=e.points.length;for(let i=0;i<n;i++){let n=e.planes[i],o=0;for(let e=0;e<r;e++){let t=this.points[e];n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=0&&o++}if(0===o)return 0;o<r&&(t=!1)}if(t)return 2;for(let t=0;t<i;t++){let r=this.planes[t],i=0;for(let t=0;t<o;t++){let n=e.points[t];r[0]*n[0]+r[1]*n[1]+r[2]*n[2]+r[3]>=0&&i++}if(0===i)return 0}return 1}intersectsPlane(e){let t=this.points.length,r=0;for(let i=0;i<t;i++){let t=this.points[i];e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]>=0&&r++}return r===t?2:+(0!==r)}}function tZ(e,t,r){let i=e-t;return i<0?-i:Math.max(0,i-r)}function t$(e,t,r,i,n){let o=e-r;return Math.max(o<0?Math.min(-o,1+o-n):o>n?Math.min(Math.max(o-n,0),1-o):0,tZ(t,i,n))}class tK{constructor(){this._boundingVolumeCache=new tW(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,t,r,i){let n=1<<r.z,o=1/n,a=r.x/n,s=r.y/n;return Math.min(Math.min(Math.min(2,t$(e,t,a,s,o)),t$(e,t,a+.5,-s-o,o)),t$(e,t,a+.5,2-s-o,o))}getWrap(e,t,r){let i=1<<t.z,n=1/i,o=t.x/i,a=tZ(e.x,o,n),s=tZ(e.x,o-1,n),l=tZ(e.x,o+1,n),u=Math.min(a,s,l);return u===l?1:u===s?-1:0}allowVariableZoom(e,t){return ex(e,t)>4}allowWorldCopies(){return!1}getTileBoundingVolume(e,t,r,i){return this._boundingVolumeCache.getTileBoundingVolume(e,t,r,i)}_computeTileBoundingVolume(e,r,i,n){var o,a;let s=0,l=0;if(null==n?void 0:n.terrain){let u=new t.a3(e.z,r,e.z,e.x,e.y),c=n.terrain.getMinMaxElevation(u);s=null!=(o=c.minElevation)?o:Math.min(0,i),l=null!=(a=c.maxElevation)?a:Math.max(0,i)}if(s/=t.bD,l/=t.bD,s+=1,l+=1,e.z<=0)return tq.fromAabb([-l,-l,-l],[l,l,l]);if(1===e.z)return tq.fromAabb([0===e.x?-l:0,0===e.y?0:-l,-l],[0===e.x?0:l,0===e.y?l:0,l]);{let r=[tB(0,0,e.x,e.y,e.z),tB(t.a6,0,e.x,e.y,e.z),tB(t.a6,t.a6,e.x,e.y,e.z),tB(0,t.a6,e.x,e.y,e.z)],i=[];for(let e of r)i.push(t.aZ([],e,l));if(l!==s)for(let e of r)i.push(t.aZ([],e,s));0===e.y&&i.push([0,1,0]),e.y===(1<<e.z)-1&&i.push([0,-1,0]);let n=[1,1,1],o=[-1,-1,-1];for(let e of i)for(let t=0;t<3;t++)n[t]=Math.min(n[t],e[t]),o[t]=Math.max(o[t],e[t]);let a=tB(t.a6/2,t.a6/2,e.x,e.y,e.z),u=t.b2([],[0,1,0],a);t.b1(u,u);let c=t.b2([],a,u);t.b1(c,c);let h=t.b2([],r[2],r[1]);t.b1(h,h);let d=t.b2([],r[0],r[3]);t.b1(d,d),i.push(t.aZ([],a,l)),e.y>=(1<<e.z)/2&&i.push(t.aZ([],tB(t.a6/2,0,e.x,e.y,e.z),l)),e.y<(1<<e.z)/2&&i.push(t.aZ([],tB(t.a6/2,t.a6,e.x,e.y,e.z),l));let p=tX(a,i),f=tX(c,i),m=[-a[0],-a[1],-a[2],p.max],g=[a[0],a[1],a[2],-p.min],y=[-c[0],-c[1],-c[2],f.max],v=[c[0],c[1],c[2],-f.min],b=[...h,0],_=[...d,0],x=[];return 0===e.y?x.push(t.bC(_,b,m),t.bC(_,b,g)):x.push(t.bC(y,b,m),t.bC(y,b,g),t.bC(y,_,m),t.bC(y,_,g)),e.y===(1<<e.z)-1?x.push(t.bC(_,b,m),t.bC(_,b,g)):x.push(t.bC(v,b,m),t.bC(v,b,g),t.bC(v,_,m),t.bC(v,_,g)),new tq(x,[m,g,y,v,b,_],n,o)}}}function tX(e,r){let i=1/0,n=-1/0;for(let o of r){let r=t.b3(e,o);i=Math.min(i,r),n=Math.max(n,r)}return{min:i,max:n}}class tY{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t){this._helper.resize(e,t)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(e){this._cachedClippingPlane=t.bE(),this._projectionMatrix=t.bi(),this._globeViewProjMatrix32f=t.bh(),this._globeViewProjMatrixNoCorrection=t.bi(),this._globeViewProjMatrixNoCorrectionInverted=t.bi(),this._globeProjMatrixInverted=t.bi(),this._cameraPosition=t.bz(),this._globeLatitudeErrorCorrectionRadians=0,this.defaultConstrain=(e,r)=>{let i=t.al(e.lat,-t.am,t.am),n=t.al(+r,this.minZoom+tG(0,i),this.maxZoom);return{center:new t.W(e.lng,i),zoom:n}},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tf({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new tK}clone(){let e=new tY;return e.apply(this,!1),e}apply(e,t,r){this._globeLatitudeErrorCorrectionRadians=r||0,this._helper.apply(e,t)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let e=t.bz();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){let{overscaledTileID:t,applyGlobeMatrix:r}=e,i=this._helper.getMercatorTileCoordinates(t);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:i,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!r,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){let r=this.pitchInRadians,i=this.cameraToCenterDistance/e,n=Math.sin(r)*i,o=Math.cos(r)*i+1,a=1/Math.sqrt(n*n+o*o)*1,s=-n,l=o,u=Math.sqrt(s*s+l*l),c=[0,s/=u,l/=u];t.bF(c,c,[0,0,0],-this.bearingInRadians),t.bG(c,c,[0,0,0],-1*this.center.lat*Math.PI/180),t.bH(c,c,[0,0,0],this.center.lng*Math.PI/180);let h=1/t.b5(c);return t.aZ(c,c,h),[...c,-a*h]}isLocationOccluded(e){return!this.isSurfacePointVisible(tF(e))}transformLightDirection(e){let r=this._helper._center.lng*Math.PI/180,i=this._helper._center.lat*Math.PI/180,n=Math.cos(i),o=[Math.sin(r)*n,Math.sin(i),Math.cos(r)*n],a=[o[2],0,-o[0]],s=[0,0,0];t.b2(s,a,o),t.b1(a,a),t.b1(s,s);let l=[0,0,0];return t.b1(l,[a[0]*e[0]+s[0]*e[1]+o[0]*e[2],a[1]*e[0]+s[1]*e[1]+o[1]*e[2],a[2]*e[0]+s[2]*e[1]+o[2]*e[2]]),l}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,r,i){var n,o;let a,s=(a=1/(1<<(o=i.canonical).z),new t.a7(e/t.a6*a+o.x*a,r/t.a6*a+o.y*a)),l=(n=s.y,[t.by(s.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-n*Math.PI*2))-.5*Math.PI]);return this.getCircleRadiusCorrection()/Math.cos(l[1])}projectTileCoordinates(e,r,i,n){let o=i.canonical,a=tB(e,r,o.x,o.y,o.z),s=1+(n?n(e,r):0)/t.bD,l=[a[0]*s,a[1]*s,a[2]*s,1];t.aE(l,l,this._globeViewProjMatrixNoCorrection);let u=this._cachedClippingPlane,c=u[0]*a[0]+u[1]*a[1]+u[2]*a[2]+u[3]<0;return{point:new t.P(l[0]/l[3],l[1]/l[3]),signedDistanceFromCamera:l[3],isOccluded:c}}
964_calcMatrices(){if(!this._helper._width||!this._helper._height)return;let e=tj(this.worldSize,this.center.lat),r=t.bj(),i=t.bj();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),t.bc(r,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let n=this.centerOffset;r[8]=-(2*n.x)/this._helper._width,r[9]=2*n.y/this._helper._height,this._projectionMatrix=t.bd(r),this._globeProjMatrixInverted=t.bj(),t.bg(this._globeProjMatrixInverted,r),t.Q(r,r,[0,0,-this.cameraToCenterDistance]),t.be(r,r,this.rollInRadians),t.bf(r,r,-this.pitchInRadians),t.be(r,r,this.bearingInRadians),t.Q(r,r,[0,0,-e]);let o=t.bz();o[0]=e,o[1]=e,o[2]=e,t.bf(i,r,this.center.lat*Math.PI/180),t.bI(i,i,-this.center.lng*Math.PI/180),t.S(i,i,o),this._globeViewProjMatrixNoCorrection=i,t.bf(r,r,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),t.bI(r,r,-this.center.lng*Math.PI/180),t.S(r,r,o),this._globeViewProjMatrix32f=new Float32Array(r),this._globeViewProjMatrixNoCorrectionInverted=t.bj(),t.bg(this._globeViewProjMatrixNoCorrectionInverted,i);let a=t.bz();this._cameraPosition=t.bz(),this._cameraPosition[2]=this.cameraToCenterDistance/e,t.bF(this._cameraPosition,this._cameraPosition,a,-this.rollInRadians),t.bG(this._cameraPosition,this._cameraPosition,a,this.pitchInRadians),t.bF(this._cameraPosition,this._cameraPosition,a,-this.bearingInRadians),t.a_(this._cameraPosition,this._cameraPosition,[0,0,1]),t.bG(this._cameraPosition,this._cameraPosition,a,-this.center.lat*Math.PI/180),t.bH(this._cameraPosition,this._cameraPosition,a,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);let s=t.bd(this._globeViewProjMatrixNoCorrectionInverted);t.S(s,s,[1,1,-1]),this._cachedFrustum=ty.fromInvProjectionMatrix(s,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(e){t.w("calculateFogMatrix is not supported on globe projection.");let r=t.bj();return t.ap(r),r}getVisibleUnwrappedCoordinates(e){return[new t.ba(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&t.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){if(!this._globeViewProjMatrixNoCorrection)return 1;let i=tF(e);t.aZ(i,i,1+r/t.bD);let n=t.bE();return t.aE(n,[i[0],i[1],i[2],1],this._globeViewProjMatrixNoCorrection),n[2]/n[3]}populateCache(e){}getBounds(){let e=.5*this.width,r=.5*this.height,i=[new t.P(0,0),new t.P(e,0),new t.P(this.width,0),new t.P(this.width,r),new t.P(this.width,this.height),new t.P(e,this.height),new t.P(0,this.height),new t.P(0,r)],n=[];for(let e of i)n.push(this.unprojectScreenPoint(e));let o=0,a=0,s=0,l=0,u=this.center;for(let e of n){let r=t.bJ(u.lng,e.lng),i=t.bJ(u.lat,e.lat);r<a&&(a=r),r>o&&(o=r),i<l&&(l=i),i>s&&(s=i)}let c=[u.lng+a,u.lat+l,u.lng+o,u.lat+s];return this.isSurfacePointOnScreen([0,1,0])&&(c[3]=90,c[0]=-180,c[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(c[1]=-90,c[0]=-180,c[2]=180),new W(c)}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}setLocationAtPoint(e,r){let i,n,o=tF(this.unprojectScreenPoint(r)),a=tF(e),s=t.bz();t.bK(s);let l=t.bz();t.bH(l,o,s,-this.center.lng*Math.PI/180),t.bG(l,l,s,this.center.lat*Math.PI/180);let u=a[0]*a[0]+a[2]*a[2],c=l[0]*l[0];if(u<c)return;let h=Math.sqrt(u-c),d=t.bL(a[0],a[2],l[0],h),p=t.bL(a[0],a[2],l[0],-h),f=t.bz();t.bH(f,a,s,-d);let m=t.bL(f[1],f[2],l[1],l[2]),g=t.bz();t.bH(g,a,s,-p);let y=t.bL(g[1],g[2],l[1],l[2]),v=.5*Math.PI,b=m>=-v&&m<=v,_=y>=-v&&y<=v;if(b&&_){let e=this.center.lng*Math.PI/180,r=this.center.lat*Math.PI/180;t.bM(d,e)+t.bM(m,r)<t.bM(p,e)+t.bM(y,r)?(i=d,n=m):(i=p,n=y)}else if(b)i=d,n=m;else{if(!_)return;i=p,n=y}let x=i/Math.PI*180,A=n/Math.PI*180,w=this.center.lat;this.setCenter(new t.W(x,t.al(A,-90,90))),this.setZoom(this.zoom+tG(w,this.center.lat))}locationToScreenPoint(e,r){let i=tF(e);if(r){let n=r.getElevationForLngLatZoom(e,this._helper._tileZoom);t.aZ(i,i,1+n/t.bD)}return this._projectSurfacePointToScreen(i)}_projectSurfacePointToScreen(e){let r=t.bE();return t.aE(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],new t.P((.5*r[0]+.5)*this.width,(-(.5*r[1])+.5)*this.height)}screenPointToMercatorCoordinate(e,r){if(r){let t=r.pointCoordinate(e);if(t)return t}return t.a7.fromLngLat(this.unprojectScreenPoint(e))}screenPointToLocation(e,t){var r;return null==(r=this.screenPointToMercatorCoordinate(e,t))?void 0:r.toLngLat()}
964isPointOnMapSurface(e,t){let r=this._cameraPosition,i=this.getRayDirectionFromPixel(e);return!!this.rayPlanetIntersection(r,i)}getRayDirectionFromPixel(e){let r=t.bE();r[0]=e.x/this.width*2-1,r[1]=-1*(e.y/this.height*2-1),r[2]=1,r[3]=1,t.aE(r,r,this._globeViewProjMatrixNoCorrectionInverted),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3];let i=t.bz();i[0]=r[0]-this._cameraPosition[0],i[1]=r[1]-this._cameraPosition[1],i[2]=r[2]-this._cameraPosition[2];let n=t.bz();return t.b1(n,i),n}isSurfacePointVisible(e){let t=this._cachedClippingPlane;return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]>=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;let r=t.bE();return t.aE(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}rayPlanetIntersection(e,r){let i=t.b3(e,r),n=t.bz(),o=t.bz();t.aZ(o,r,i),t.b0(n,e,o);let a=1-t.b3(n,n);if(a<0)return null;let s=t.b3(e,e)-1,l=-i+(i<0?1:-1)*Math.sqrt(a),u=s/l;return{tMin:Math.min(u,l),tMax:Math.max(u,l)}}unprojectScreenPoint(e){var r,i;let n,o,a,s=this._cameraPosition,l=this.getRayDirectionFromPixel(e),u=this.rayPlanetIntersection(s,l);if(u){let e=t.bz();t.a_(e,s,[l[0]*u.tMin,l[1]*u.tMin,l[2]*u.tMin]);let r=t.bz();return t.b1(r,e),tz(r)}let c=this._cachedClippingPlane,h=c[0]*l[0]+c[1]*l[1]+c[2]*l[2],d=-t.b9(c,s)/h,p=t.bz();if(d>0)t.a_(p,s,[l[0]*d,l[1]*d,l[2]*d]);else{let e=t.bz();t.a_(e,s,[2*l[0],2*l[1],2*l[2]]);let r=t.b9(this._cachedClippingPlane,e);t.b0(p,e,[this._cachedClippingPlane[0]*r,this._cachedClippingPlane[1]*r,this._cachedClippingPlane[2]*r])}let f=((n=t.bz())[0]=-(c[0]*c[3]),n[1]=-(c[1]*c[3]),n[2]=-(c[2]*c[3]),{center:n,radius:Math.sqrt(1-c[3]*c[3])});return tz((r=f.center,i=f.radius,o=t.bz(),t.b0(o,p,r),a=t.bz(),t.bx(a,r,o,i/t.b7(o)),a))}getMatrixForModel(e,r){let i=t.W.convert(e),n=1/t.bD,o=t.bi();return t.bI(o,o,i.lng/180*Math.PI),t.bf(o,o,-i.lat/180*Math.PI),t.Q(o,o,[0,0,1+r/t.bD]),t.bf(o,o,.5*Math.PI),t.S(o,o,[n,n,n]),o}getProjectionDataForCustomLayer(e=!0){let r=this.getProjectionData({overscaledTileID:new t.a3(0,0,0,0,0),applyGlobeMatrix:e});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(e){}}class tQ{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,r=!0){this._helper.resize(e,t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,t){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=t,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(e){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(e,t)=>this.currentTransform.defaultConstrain(e,t),this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tf({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._globeness=1,this._mercatorTransform=new tv,this._verticalPerspectiveTransform=new tY}clone(){let e=new tQ;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this,!1),e}apply(e,t){this._helper.apply(e,t),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){let t=this._mercatorTransform.getProjectionData(e),r=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?r.mainMatrix:t.mainMatrix,clippingPlane:r.clippingPlane,tileMercatorCoords:r.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return t.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return t.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,r,i){let n=this._mercatorTransform.getPitchedTextCorrection(e,r,i),o=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,r,i);return t.bt(n,o,this._globeness)}projectTileCoordinates(e,t,r,i){return this.currentTransform.projectTileCoordinates(e,t,r,i)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,t){return this.currentTransform.lngLatToCameraDepth(e,t)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}
964calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}setLocationAtPoint(e,t){this.isGlobeRendering?(this._verticalPerspectiveTransform.setLocationAtPoint(e,t),this.apply(this._verticalPerspectiveTransform,!1)):(this._mercatorTransform.setLocationAtPoint(e,t),this.apply(this._mercatorTransform,!1))}locationToScreenPoint(e,t){return this.currentTransform.locationToScreenPoint(e,t)}screenPointToMercatorCoordinate(e,t){return this.currentTransform.screenPointToMercatorCoordinate(e,t)}screenPointToLocation(e,t){return this.currentTransform.screenPointToLocation(e,t)}isPointOnMapSurface(e,t){return this.currentTransform.isPointOnMapSurface(e,t)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,t){return this.currentTransform.getMatrixForModel(e,t)}getProjectionDataForCustomLayer(e=!0){let t=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return t;let r=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return r.fallbackMatrix=t.mainMatrix,r}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class tJ{get useGlobeControls(){return!0}handlePanInertia(e,r){let i=tV(e,r);return Math.abs(i.lng-r.center.lng)>180&&(i.lng=r.center.lng+179.5*Math.sign(i.lng-r.center.lng)),{easingCenter:i,easingOffset:new t.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,r){let i=e.around,n=r.screenPointToLocation(i);e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta);let o=r.zoom;e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta);let a=r.zoom-o;if(0===a)return;let s=t.bJ(r.center.lng,n.lng),l=s/(Math.abs(s/180)+1),u=t.bJ(r.center.lat,n.lat),c=r.getRayDirectionFromPixel(i),h=r.cameraPosition,d=-1*t.b3(h,c),p=t.bz();t.a_(p,h,[c[0]*d,c[1]*d,c[2]*d]);let f=Math.exp(-(.5*Math.max(t.b5(p)-1-.3,0))),m=tj(r.worldSize,r.center.lat)/Math.min(r.width,r.height),g=t.bw(m,.9,.5,1,.25),y=(1-t.ao(-a))*Math.min(f,g),v=r.center.lat,b=r.zoom,_=new t.W(r.center.lng+l*y,t.al(r.center.lat+u*y,-t.am,t.am));r.setLocationAtPoint(n,i);let x=r.center,A=Math.pow(Math.max(t.bw(Math.abs(s),45,85,0,1),t.bw(m,.75,.35,0,1)),.25),w=t.bJ(x.lng,_.lng),S=t.bJ(x.lat,_.lat);r.setCenter(new t.W(x.lng+w*A,x.lat+S*A).wrap()),r.setZoom(b+tG(v,r.center.lat))}handleMapControlsPan(e,t,r){if(!e.panDelta)return;let i=t.center.lat,n=t.zoom;t.setCenter(tV(e.panDelta,t).wrap()),t.setZoom(n+tG(i,t.center.lat))}cameraForBoxAndBearing(e,r,i,n,o){let a=tx(e,r,i,n,o),s=r.left/o.width*2-1,l=(o.width-r.right)/o.width*2-1,u=-(r.top/o.height*2)+1,c=-((o.height-r.bottom)/o.height*2)+1,h=0>t.bJ(i.getWest(),i.getEast()),d=h?i.getEast():i.getWest(),p=h?i.getWest():i.getEast(),f=Math.max(i.getNorth(),i.getSouth()),m=Math.min(i.getNorth(),i.getSouth()),g=d+.5*t.bJ(d,p),y=f+.5*t.bJ(f,m),v=o.clone();v.setCenter(a.center),v.setBearing(a.bearing),v.setPitch(0),v.setRoll(0),v.setZoom(a.zoom);let b=v.modelViewProjectionMatrix,_=[tF(i.getNorthWest()),tF(i.getNorthEast()),tF(i.getSouthWest
964()),tF(i.getSouthEast()),tF(new t.W(p,y)),tF(new t.W(d,y)),tF(new t.W(g,f)),tF(new t.W(g,m))],x=tF(a.center),A=1/0;for(let e of _)s<0&&(A=tJ.getLesserNonNegativeNonNull(A,tJ.solveVectorScale(e,x,b,"x",s))),l>0&&(A=tJ.getLesserNonNegativeNonNull(A,tJ.solveVectorScale(e,x,b,"x",l))),u>0&&(A=tJ.getLesserNonNegativeNonNull(A,tJ.solveVectorScale(e,x,b,"y",u))),c<0&&(A=tJ.getLesserNonNegativeNonNull(A,tJ.solveVectorScale(e,x,b,"y",c)));if(Number.isFinite(A)&&0!==A)return a.zoom=Math.min(v.zoom+t.ar(A),e.maxZoom),a;tb()}handleJumpToCenterZoom(e,r){let i=e.center.lat,n=e.applyConstrain(r.center?t.W.convert(r.center):e.center,e.zoom).center;e.setCenter(n.wrap());let o=void 0!==r.zoom?+r.zoom:e.zoom+tG(i,n.lat);e.zoom!==o&&e.setZoom(o)}handleEaseTo(e,r){let i=e.zoom,n=e.center,o=e.padding,a={roll:e.roll,pitch:e.pitch,bearing:e.bearing},s={roll:void 0===r.roll?e.roll:r.roll,pitch:void 0===r.pitch?e.pitch:r.pitch,bearing:void 0===r.bearing?e.bearing:r.bearing},l=void 0!==r.zoom,u=!e.isPaddingEqual(r.padding),c=!1,h=r.center?t.W.convert(r.center):n,d=e.applyConstrain(h,i).center;td(e,d);let p=e.clone();p.setCenter(d),p.setZoom(l?+r.zoom:i+tG(n.lat,h.lat)),p.setBearing(r.bearing);let f=new t.P(t.al(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),t.al(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));p.setLocationAtPoint(d,f);let m=(r.offset&&r.offsetAsPoint.mag())>0?p.center:d,g=l?+r.zoom:i+tG(n.lat,m.lat),y=i+tG(n.lat,0),v=g+tG(m.lat,0),b=t.bJ(n.lng,m.lng),_=t.bJ(n.lat,m.lat),x=t.ao(v-y);return{easeFunc:i=>{if(t.bn(a,s)||t_({startEulerAngles:a,endEulerAngles:s,tr:e,k:i,useSlerp:a.roll!=s.roll}),u&&e.interpolatePadding(o,r.padding,i),r.around)t.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(r.around,r.aroundPoint);else{let t=Math.pow(v>y?Math.min(2,x):Math.max(.5,x),1-i),r=tH(n,b,_,i*t);e.setCenter(r.wrap())}if(c){let r=t.H.number(y,v,i)+tG(0,e.center.lat);e.setZoom(r)}},isZooming:c=g!==i,elevationCenter:m}}handleFlyTo(e,r){let i,n,o,a=void 0!==r.zoom,s=e.center,l=e.zoom,u=e.padding,c=!e.isPaddingEqual(r.padding),h=e.applyConstrain(t.W.convert(r.center||r.locationAtOffset),l).center,d=a?+r.zoom:e.zoom+tG(e.center.lat,h.lat),p=e.clone();p.setCenter(h),p.setZoom(d),p.setBearing(r.bearing);let f=new t.P(t.al(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),t.al(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));p.setLocationAtPoint(h,f);let m=p.center;td(e,m);let g=(n=tF(s),o=tF(m),Math.acos(t.b3(n,o))/(2*Math.PI)*tL(e)),y=l+tG(s.lat,0),v=d+tG(m.lat,0),b=t.ao(v-y);if("number"==typeof r.minZoom){let n=Math.min(+r.minZoom+tG(m.lat,0),y,v)+tG(0,m.lat),o=e.applyConstrain(m,n).zoom+tG(m.lat,0);i=t.ao(o-y)}let _=t.bJ(s.lng,m.lng),x=t.bJ(s.lat,m.lat);return{easeFunc:(i,n,o,a)=>{let l=tH(s,_,x,o);c&&e.interpolatePadding(u,r.padding,i);let h=1===i?m:l;e.setCenter(h.wrap());let p=y+t.ar(n);e.setZoom(1===i?d:p+tG(0,h.lat))},scaleOfZoom:b,targetCenter:m,scaleOfMinZoom:i,pixelPathLength:g}}static solveVectorScale(e,t,r,i,n){let o="x"===i?[r[0],r[4],r[8],r[12]]:[r[1],r[5],r[9],r[13]],a=[r[3],r[7],r[11],r[15]],s=e[0]*o[0]+e[1]*o[1]+e[2]*o[2],l=e[0]*a[0]+e[1]*a[1]+e[2]*a[2],u=t[0]*o[0]+t[1]*o[1]+t[2]*o[2],c=t[0]*a[0]+t[1]*a[1]+t[2]*a[2];return u+n*l===s+n*c||a[3]*(s-u)+o[3]*(c-l)+s*c==u*l?null:(u+o[3]-n*c-n*a[3])/(u-s-n*c+n*l)}static getLesserNonNegativeNonNull(e,t){return null!==t&&t>=0&&t<e?t:e}}class t0{constructor(e){this._globe=e,this._mercatorCameraHelper=new tA,this._verticalPerspectiveCameraHelper=new tJ}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,t){return this.currentHelper.handlePanInertia(e,t)}handleMapControlsRollPitchBearingZoom(e,t){this.currentHelper.handleMapControlsRollPitchBearingZoom(e,t)}handleMapControlsPan(e,t,r){this.currentHelper.handleMapControlsPan(e,t,r)}cameraForBoxAndBearing(e,t,r,i,n){return this.currentHelper.cameraForBoxAndBearing(e,t,r,i,n)}handleJumpToCenterZoom(e,t){this.currentHelper.handleJumpToCenterZoom(e,t)}handleEaseTo(e,t){return this.currentHelper.handleEaseTo(e,t)}handleFlyTo(e,t){return this.currentHelper.handleFlyTo(e,t)}}let t1=(e,r)=>t.C(e,null==r?void 0:r.filter(e=>"source.canvas"!==e.identifier)),t2=t.bN();class t3 extends t.E{constructor(e,r={}){var i,n;super(),this._rtlPluginLoaded=()=>{for(let e in this.tileManagers){let t=this.tileManagers[e].getSource().type;"vector"!==t&&"geojson"!==t||this.tileManagers[e].reload()}},this.map=e,this.dispatcher=new N(z(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(e,t)=>this.getGlyphs(e,t)),this.dispatcher.registerMessageHandler("GI",(e,t)=>this.getImages(e,t)),this.dispatcher.registerMessageHandler("GDA",(e,t)=>this.getDashes(e,t)),this.imageManager=new T,this.imageManager.setEventedParent(this);let o=(null==(i=e._container)?void 0:i.lang)||"u">typeof document&&(null==(n=document.documentElement)?void 0:n.lang)||void 0;this.glyphManager=new M(e._requestManager,r.localIdeographFontFamily,o),this.lineAtlas=new L(256,512),this.crossTileSymbolIndex=new tr,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",t.bO()),eu().on(ea,this._rtlPluginLoaded),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.tileManagers[e.sourceId];if(!t)return;let r=t.getSource();if(null==r?void 0:r.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];
964t.source===r.id&&this._validateLayer(t)}})}_setInitialValues(){var e;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new t.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new((null==(e=this.crossTileSymbolIndex)?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,r){var i,n,o;this._checkLoaded();let a=null===r?null!=(o=null==(n=null==(i=this.stylesheet.state)?void 0:i[e])?void 0:n.default)?o:null:r;if(t.bQ(a,this._globalState[e]))return this;this._globalState[e]=a,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let r=[];for(let i in e)t.bQ(this._globalState[i],e[i].default)||(r.push(i),this._globalState[i]=e[i].default);this._applyGlobalStateChanges(r)}_applyGlobalStateChanges(e){if(0===e.length)return;let t=new Set,r={};for(let i of e)for(let e in r[i]=this._globalState[i],this._layers){let r=this._layers[e],n=r.getLayoutAffectingGlobalStateRefs(),o=r.getPaintAffectingGlobalStateRefs(),a=r.getVisibilityAffectingGlobalStateRefs();if(n.has(i)&&t.add(r.source),o.has(i))for(let{name:e,value:t}of o.get(i))this._updatePaintProperty(r,e,t);(null==a?void 0:a.has(i))&&(r.recalculateVisibility(),this._updateLayer(r))}for(let e in this.dispatcher.broadcast("UGS",r),this.tileManagers)t.has(e)&&(this._reloadSource(e),this._changed=!0)}loadURL(e){return t._(this,arguments,void 0,function*(e,r={},i){this.fire(new t.n("dataloading",{dataType:"style"})),r.validate="boolean"!=typeof r.validate||r.validate,this._loadStyleRequest=new AbortController;let n=this._loadStyleRequest;try{let o=yield this.map._requestManager.transformRequest(e,"Style");t.bR(n.signal);let a=yield t.k(o,n);this._loadStyleRequest===n&&(this._loadStyleRequest=null),this._load(a.data,r,i)}catch(e){this._loadStyleRequest===n&&(this._loadStyleRequest=null),e&&!n.signal.aborted&&this.fire(new t.l(t.d(e)))}})}loadJSON(e,r={},i){this.fire(new t.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,v.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,r.validate=!1!==r.validate,this._load(e,r,i)}).catch(()=>{})}loadEmpty(){this.fire(new t.n("dataloading",{dataType:"style"})),this._load(t2,{validate:!1})}_load(e,r,i){var n,o;let a=r.transformStyle?r.transformStyle(i,e):e;if(!r.validate||!t1(this,t.F(a))){for(let e in a=Object.assign({},a),this._loaded=!0,this.stylesheet=a,a.sources)this.addSource(e,a.sources[e],{validate:!1});a.sprite?this._loadSprite(a.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(a.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this._setProjectionInternal((null==(n=this.stylesheet.projection)?void 0:n.type)||"mercator"),this.sky=new R(this.stylesheet.sky),this.map.setTerrain(null!=(o=this.stylesheet.terrain)?o:null),this.fire(new t.n("data",{dataType:"style"})),this.fire(new t.n("style.load"))}}_createLayers(){var e,r,i;let n=t.bS(this.stylesheet.layers);for(let o of(this.setGlobalState(null!=(e=this.stylesheet.state)?e:null),this.dispatcher.broadcast("SL",n),this._order=n.map(e=>e.id),this._layers={},this._serializedLayers=null,n)){let e=t.bT(o,this._globalState);if(e.setEventedParent(this,{layer:{id:o.id}}),this._layers[o.id]=e,t.bU(e)&&this.tileManagers[e.source]){let t=null!=(i=null==(r=o.paint)?void 0:r["raster-fade-duration"])?i:e.paint.get("raster-fade-duration");this.tileManagers[e.source].setRasterFadeDuration(t)}}}_loadSprite(e,r=!1,i){let n;this.imageManager.setLoaded(!1);let o=new AbortController;this._spriteRequest=o,(function(e,r,i,n){return t._(this,void 0,void 0,function*(){let o=w(e),a=i>1?"@2x":"",s={},l={};for(let{id:e,url:i}of o){let o=yield r.transformRequest(S(i,a,".json"),"SpriteJSON");s[e]=t.k(o,n);let u=yield r.transformRequest(S(i,a,".png"),"SpriteImage");l[e]=p.getImage(u,n)}return yield Promise.all([...Object.values(s),...Object.values(l)]),function(e,r){return t._(this,void 0,void 0,function*(){let t={};for(let i in e){t[i]={};let n=v.getImageCanvasContext((yield r[i]).data),o=(yield e[i]).data;for(let e in o){let{width:r,height:a,x:s,y:l,sdf:u,pixelRatio:c,stretchX:h,stretchY:d,content:p,textFitWidth:f,textFitHeight:m}=o[e];t[i][e]={data:null,pixelRatio:c,sdf:u,stretchX:h,stretchY:d,content:p,textFitWidth:f,textFitHeight:m,spriteData:{width:r,height:a,x:s,y:l,context:n}}}}return t})}(s,l)})})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(e=>{if(this._spriteRequest=null,e)for(let t in e){for(let r of(this._spritesImagesIds[t]=[],this._spritesImagesIds[t]?this._spritesImagesIds[t].filter(t=>!(t in e)):[]))this.imageManager.removeImage(r),this._changedImages[r]=!0;for(let i in e[t]){let n="default"===t?i:`${t}:${i}`;this._spritesImagesIds[t].push(n),n in this.imageManager.images?this.imageManager.updateImage(n,e[t][i],!1):this.imageManager.addImage(n,e[t][i]),r&&(this._changedImages[n]=!0)}}}).catch(e=>{this._spriteRequest=null,n=e,o.signal.aborted||this.fire(new t.l(n))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"})),i&&i(n)})}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}_validateLayer(e){let r=this.tileManagers[e.source];if(!r)return;let i=e.sourceLayer;if(!i)return;let n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&!n.vectorLayerIds.includes(i))&&this.fire(new t.l(Error(`Source layer "${i}" does not exist on source "${n.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.tileManagers)if(!this.tileManagers[e].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(e,r=!1){let i=this._serializedAllLayers();if(!e||0===e.length)return Object.values(r?t.bV(i):i);let n=[];for(let o of e)if(i[o]){let e=r?t.bV(i[o]):i[o];n.push(e)}return n}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;for(let t of(e=this._serializedLayers={},Object.keys(this._layers))){let r=this._layers[t];"custom"!==r.type&&(e[t]=r.serialize())}return e}hasTransitions(){var e,t,r;
964if((null==(e=this.light)?void 0:e.hasTransition())||(null==(t=this.sky)?void 0:t.hasTransition())||(null==(r=this.projection)?void 0:r.hasTransition()))return!0;for(let e in this.tileManagers)if(this.tileManagers[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let r=this._changed;if(r){let t=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);for(let e in(t.length||r.length)&&this._updateWorkerLayers(t,r),this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw Error(`Invalid action ${t}`);this._clearSource(e)}}for(let t in this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs(),this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let i={};for(let e in this.tileManagers){let t=this.tileManagers[e];i[e]=t.used,t.used=!1}for(let t of this._order){let r=this._layers[t];r.recalculate(e,this._availableImages),!r.isHidden(e.zoom)&&r.source&&(this.tileManagers[r.source].used=!0)}for(let e in i){let r=this.tileManagers[e];!!i[e]!=!!r.used&&r.fire(new t.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new t.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.tileManagers)this.tileManagers[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var i;this._checkLoaded();let n=this.serialize();if(e=r.transformStyle?r.transformStyle(n,e):e,(null==(i=r.validate)||i)&&t1(this,t.F(e)))return!1;(e=t.bV(e)).layers=t.bS(e.layers);let o=t.bW(n,e),a=this._getOperationsToPerform(o);if(a.unimplemented.length>0)throw Error(`Unimplemented: ${a.unimplemented.join(", ")}.`);if(0===a.operations.length)return!1;for(let e of a.operations)e();return this.stylesheet=e,this._serializedLayers=null,this.fire(new t.n("style.load",{style:this})),!0}_getOperationsToPerform(e){let t=[],r=[];for(let i of e)switch(i.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":t.push(()=>this.addLayer.apply(this,i.args));break;case"removeLayer":t.push(()=>this.removeLayer.apply(this,i.args));break;case"setPaintProperty":t.push(()=>this.setPaintProperty.apply(this,i.args));break;case"setLayoutProperty":t.push(()=>this.setLayoutProperty.apply(this,i.args));break;case"setFilter":t.push(()=>this.setFilter.apply(this,i.args));break;case"addSource":t.push(()=>this.addSource.apply(this,i.args));break;case"removeSource":t.push(()=>this.removeSource.apply(this,i.args));break;case"setLayerZoomRange":t.push(()=>this.setLayerZoomRange.apply(this,i.args));break;case"setLight":t.push(()=>this.setLight.apply(this,i.args));break;case"setGeoJSONSourceData":t.push(()=>this.setGeoJSONSourceData.apply(this,i.args));break;case"setGlyphs":t.push(()=>this.setGlyphs.apply(this,i.args));break;case"setSprite":t.push(()=>this.setSprite.apply(this,i.args));break;case"setTerrain":t.push(()=>this.map.setTerrain.apply(this,i.args));break;case"setSky":t.push(()=>this.setSky.apply(this,i.args));break;case"setProjection":this.setProjection.apply(this,i.args);break;case"setGlobalState":t.push(()=>this.setGlobalState.apply(this,i.args));break;case"setTransition":t.push(()=>{});break;default:r.push(i.command)}return{operations:t,unimplemented:r}}addImage(e,r){if(this.getImage(e))return this.fire(new t.l(Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.l(Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,i={}){var n;if(this._checkLoaded(),void 0!==this.tileManagers[e])throw Error(`Source "${e}" already exists.`);if(!r.type)throw Error(`The type property must be defined, but only the following properties were given: ${Ob
964ject.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(r.type)&&this._validate(t.F.source,`sources.${e}`,r,null,i))return;(null==(n=this.map)?void 0:n._collectResourceTiming)&&(r.collectResourceTiming=!0);let o=this.tileManagers[e]=new eP(e,r,this.dispatcher);o.style=this,o.setEventedParent(this,()=>({isSourceLoaded:o.loaded(),source:o.serialize(),sourceId:e})),o.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new t.l(Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let r=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],r.fire(new t.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);let r=this.tileManagers[e].getSource();if("geojson"!==r.type)throw Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){var t;return null==(t=this.tileManagers[e])?void 0:t.getSource()}addLayer(e,r,i={}){let n;this._checkLoaded();let o=e.id;if(this.getLayer(o))return void this.fire(new t.l(Error(`Layer "${o}" already exists on this map.`)));if("custom"===e.type){if(t1(this,t.bX(e)))return;n=t.bT(e,this._globalState)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(o,e.source),e=t.bV(e),e=t.e(e,{source:o})),this._validate(t.F.layer,`layers.${o}`,e,{arrayIndex:-1},i))return;n=t.bT(e,this._globalState),this._validateLayer(n),n.setEventedParent(this,{layer:{id:o}})}let a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new t.l(Error(`Cannot add layer "${o}" before non-existing layer "${r}".`)));else{if(this._order.splice(a,0,o),this._layerOrderChanged=!0,this._layers[o]=n,this._removedLayers[o]&&n.source&&"custom"!==n.type){let e=this._removedLayers[o];delete this._removedLayers[o],e.type!==n.type?this._updatedSources[n.source]="clear":(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause())}this._updateLayer(n),n.onAdd&&n.onAdd(this.map)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.l(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;let i=this._order.indexOf(e);this._order.splice(i,1);let n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.l(Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let r=this._layers[e];if(!r)return void this.fire(new t.l(Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);let i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,i){this._checkLoaded();let n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.l(Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(n){if(!t.bQ(n.filter,r))return null==r?(n.setFilter(void 0),void this._updateLayer(n)):void(this._validate(t.F.filter,`layers.${n.id}.filter`,r,null,i)||(n.setFilter(t.bV(r)),this._updateLayer(n)))}else this.fire(new t.l(Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.bV(this.getLayer(e).filter)}setLayoutProperty(e,r,i,n={}){this._checkLoaded();let o=this.getLayer(e);o?t.bQ(o.getLayoutProperty(r),i)||(o.setLayoutProperty(r,i,n),this._updateLayer(o)):this.fire(new t.l(Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){let i=this.getLayer(e);if(i)return i.getLayoutProperty(r);this.fire(new t.l(Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,i,n={}){this._checkLoaded();let o=this.getLayer(e);o?t.bQ(o.getPaintProperty(r),i)||this._updatePaintProperty(o,r,i,n):this.fire(new t.l(Error(`Cannot style non-existing layer "${e}".`)))}_updatePaintProperty(e,r,i,n={}){e.setPaintProperty(r,i,n)&&this._updateLayer(e),t.bU(e)&&"raster-fade-duration"===r&&this.tileManagers[e.source].setRasterFadeDuration(i),this._changed=!0,this._updatedPaintProps[e.id]=!0,this._serializedLayers=null}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,r){this._checkLoaded();let i=e.source,n=e.sourceLayer,o=this.tileManagers[i];if(void 0===o)return void this.fire(new t.l(Error(`The source '${i}' does not exist in the map's style.`)));let a=o.getSource().type;"geojson"===a&&n?this.fire(new t.l(Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||n?(void 0===e.id&&this.fire(new t.l(Error("The feature id parameter must be provided."))),o.setFeatureState(n,e.id,r)):this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();let i=e.source,n=this.tileManagers[i];if(void 0===n)return void this.fire(new t.l(Error(`The source '${i}' does not exist in the map's style.`)));
964let o=n.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.l(Error("A feature id is required to remove its specific state property."))):n.removeFeatureState(a,e.id,r):this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let r=e.source,i=e.sourceLayer,n=this.tileManagers[r];if(void 0!==n)return"vector"!==n.getSource().type||i?(void 0===e.id&&this.fire(new t.l(Error("The feature id parameter must be provided."))),n.getFeatureState(i,e.id)):void this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.l(Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){var e;return t.e({duration:300,delay:0},null==(e=this.stylesheet)?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=t.bY(this.tileManagers,e=>e.serialize()),r=this._serializeByIds(this._order,!0),i=this.map.getTerrain()||void 0,n=this.stylesheet;return t.bZ({version:n.version,name:n.name,metadata:n.metadata,light:n.light,sky:n.sky,center:n.center,zoom:n.zoom,bearing:n.bearing,pitch:n.pitch,sprite:n.sprite,glyphs:n.glyphs,transition:n.transition,projection:n.projection,sources:e,layers:r,terrain:i},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.tileManagers[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,r={},i=[];for(let n=this._order.length-1;n>=0;n--){let o=this._order[n];if(t(o))for(let t of(r[o]=n,e)){let e=t[o];if(e)for(let t of e)i.push(t)}}i.sort((e,t)=>t.intersectionZ-e.intersectionZ);let n=[];for(let o=this._order.length-1;o>=0;o--){let a=this._order[o];if(t(a))for(let e=i.length-1;e>=0;e--){let t=i[e].feature;if(r[t.layer.id]<o)break;n.push(t),i.pop()}else for(let t of e){let e=t[a];if(e)for(let t of e)n.push(t.feature)}}return n}queryRenderedFeatures(e,r,i){(null==r?void 0:r.filter)&&this._validate(t.F.filter,"queryRenderedFeatures.filter",r.filter,null,r);let n={};if(null==r?void 0:r.layers){if(!(Array.isArray(r.layers)||r.layers instanceof Set))return this.fire(new t.l(Error("parameters.layers must be an Array or a Set of strings"))),[];for(let e of r.layers){let r=this._layers[e];if(!r)return this.fire(new t.l(Error(`The layer '${e}' does not exist in the map's style and cannot be queried for features.`))),[];n[r.source]=!0}}let o=[];r.availableImages=this._availableImages;let a=this._serializedAllLayers(),s=r.layers instanceof Set?r.layers:Array.isArray(r.layers)?new Set(r.layers):null,l=Object.assign(Object.assign({},r),{layers:s,globalState:this._globalState});for(let s in this.tileManagers)r.layers&&!n[s]||o.push(function(e,r,i,n,o,a,s){let l=function(e,t,r){if(e)for(let i of e){let e=t[i];if((null==e?void 0:e.source)===r&&"fill-extrusion"===e.type)return!0}else for(let e in t){let i=t[e];if(i.source===r&&"fill-extrusion"===i.type)return!0}return!1}(null!=(d=null==o?void 0:o.layers)?d:null,r,e.id),u=a.maxPitchScaleFactor(),c=e.tilesIn(n,u,l);c.sort(V);let h=[];for(let n of c)h.push({wrappedTileID:n.tileID.wrapped().key,queryResults:n.tile.queryRenderedFeatures(r,i,e.getState(),n.queryGeometry,n.cameraQueryGeometry,n.scale,o,a,u,function(e,r){let i=t.O();return t.Q(i,i,[1,1,0]),t.S(i,i,[.5*e.width,.5*e.height,1]),e.calculatePosMatrix?t.U(i,i,e.calculatePosMatrix(r.toUnwrapped())):i}(a,n.tileID),s?(e,t)=>s(n.tileID,e,t):void 0)});var d,p=function(e){let t={},r={};for(let{queryResults:i,wrappedTileID:n}of e){r[n]||(r[n]={});let e=r[n];for(let r in i){let n=i[r];e[r]||(e[r]={});let o=e[r];for(let e of(t[r]||(t[r]=[]),n))o[e.featureIndex]||(o[e.featureIndex]=!0,t[r].push(e))}}return t}(h);for(let t in p)for(let r of p[t])U(r,e);return p}(this.tileManagers[s],this._layers,a,e,l,i,this.map.terrain?(e,t,r)=>this.map.terrain.getElevation(e,t,r):void 0));return this.placement&&o.push(function(e,t,r,i,n,o,a){let s={},l=o.queryRenderedSymbols(i),u=[];for(let e of Object.keys(l).map(Number))u.push(a[e]);for(let r of(u.sort(V),u)){let i=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],t,r.bucketIndex,r.sourceLayerIndex,{filterSpec:n.filter,globalState:n.globalState},n.layers,n.availableImages,e);for(let e in i){s[e]||(s[e]=[]);let t=i[e];for(let i of(t.sort((e,t)=>
964{let i=r.featureSortOrder;if(i){let r=i.indexOf(e.featureIndex);return i.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex}),t))s[e].push(i)}}for(let t in s)for(let i of s[t])U(i,r[e[t].source]);return s}(this._layers,a,this.tileManagers,e,l,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(o)}querySourceFeatures(e,r){(null==r?void 0:r.filter)&&this._validate(t.F.filter,"querySourceFeatures.filter",r.filter,null,r);let i=this.tileManagers[e];return i?function(e,t){let r=e.getRenderableIds().map(t=>e.getTileByID(t)),i=[],n={};for(let e of r){let r=e.tileID.canonical.key;n[r]||(n[r]=!0,e.querySourceFeatures(i,t))}return i}(i,r?Object.assign(Object.assign({},r),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();let i=this.light.getLight(),n=!1;for(let r in e)if(!t.bQ(e[r],i[r])){n=!0;break}if(!n)return;let o={now:_(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(o)}getProjection(){var e;return null==(e=this.stylesheet)?void 0:e.projection}setProjection(e){this._checkLoaded();let t=null!=e?e:{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===t.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(t.type)}getSky(){var e;return null==(e=this.stylesheet)?void 0:e.sky}setSky(e,r={}){this._checkLoaded();let i=this.getSky(),n=!1;if(!e&&!i)return;if(e&&!i)n=!0;else if(!e&&i)n=!0;else for(let r in e)if(!t.bQ(e[r],i[r])){n=!0;break}if(!n)return;let o={now:_(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,r),this.sky.updateTransitions(o)}_setProjectionInternal(e){let r=function(e,r){let i={constrainOverride:r};if(Array.isArray(e)){let t=new tR({type:e});return{projection:t,transform:new tQ(i),cameraHelper:new t0(t)}}switch(e){case"mercator":return{projection:new tc,transform:new tv(i),cameraHelper:new tA};case"globe":{let e=new tR({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:e,transform:new tQ(i),cameraHelper:new t0(e)}}case"vertical-perspective":return{projection:new tO,transform:new tY(i),cameraHelper:new tJ};default:return t.w(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new tc,transform:new tv(i),cameraHelper:new tA}}}(e,this.map.transformConstrain);for(let e in this.projection=r.projection,this.map.migrateProjection(r.transform,r.cameraHelper),this.tileManagers)this.tileManagers[e].reload()}_validate(e,r,i,n,o={}){return!1!==(null==o?void 0:o.validate)&&t1(this,e.call(t.F,t.e({key:r,style:this.serialize(),value:i,styleSpec:t.x},n)))}_remove(e=!0){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),eu().off(ea,this._rtlPluginLoaded),this._layers)this._layers[e].setEventedParent(null);for(let e in this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.tileManagers[e].clearTiles()}_reloadSource(e){this.tileManagers[e].resume(),this.tileManagers[e].reload()}_updateSources(e){for(let t in this.tileManagers)this.tileManagers[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}_updatePlacement(e,t,r,i,n=!1){let o=!1,a=!1,s={};for(let t of this._order){let r=this._layers[t];if("symbol"!==r.type)continue;if(!s[r.source]){let e=this.tileManagers[r.source];s[r.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}let i=this.crossTileSymbolIndex.addLayer(r,s[r.source],e.center.lng);o||(o=i)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),n||(n=this._layerOrderChanged||0===r),(n||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(_(),e.zoom))&&(this.pauseablePlacement=new e8(e,this.map.terrain,this._order,n,t,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(_()),a=!0),o&&this.pauseablePlacement.placement.setStale()),a||o)for(let e of this._order){let t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,s[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(_())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let t=this.tileManagers[r.source];return t&&t.setDependencies(r.tileID.key,r.type,r.icons),e})}getGlyphs(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.glyphManager.getGlyphs(r.stacks),t=this.tileManagers[r.source];return t&&t.setDependencies(r.tileID.key,r.type,[""]),e})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}
964){this._checkLoaded(),e&&this._validate(t.F.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getDashes(e,r){return t._(this,void 0,void 0,function*(){let e={};for(let[t,i]of Object.entries(r.dashes))e[t]=this.lineAtlas.getDash(i.dasharray,i.round);return e})}addSprite(e,r,i={},n){this._checkLoaded();let o=[{id:e,url:r}],a=[...w(this.stylesheet.sprite),...o];this._validate(t.F.sprite,"sprite",a,null,i)||(this.stylesheet.sprite=a,this._loadSprite(o,!0,n))}removeSprite(e){this._checkLoaded();let r=w(this.stylesheet.sprite);if(r.find(t=>t.id===e)){if(this._spritesImagesIds[e])for(let t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;r.splice(r.findIndex(t=>t.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}else this.fire(new t.l(Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(e,r={},i){this._checkLoaded(),e&&this._validate(t.F.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,i):(this._unloadSprite(),i&&i(null)))}destroy(){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}for(let e in this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy(),this._layers){let t=this._layers[e];t.setEventedParent(null),t.onRemove&&t.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var t5=t.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class t4{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,i,n,o,a,s,l){this.context=e;let u=this.boundPaintVertexBuffers.length!==i.length;for(let e=0;!u&&e<i.length;e++)this.boundPaintVertexBuffers[e]!==i[e]&&(u=!0);!this.vao||this.boundProgram!==t||this.boundLayoutVertexBuffer!==r||u||this.boundIndexBuffer!==n||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s||this.boundDynamicVertexBuffer3!==l?this.freshBind(t,r,i,n,o,a,s,l):(e.bindVertexArray.set(this.vao),a&&a.bind(),(null==n?void 0:n.dynamicDraw)&&n.bind(),s&&s.bind(),l&&l.bind())}freshBind(e,t,r,i,n,o,a,s){let l=e.numAttributes,u=this.context,c=u.gl;for(let l of(this.vao&&this.destroy(),this.vao=u.createVertexArray(),u.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=i,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a,this.boundDynamicVertexBuffer3=s,t.enableAttributes(c,e),r))l.enableAttributes(c,e);for(let i of(o&&o.enableAttributes(c,e),a&&a.enableAttributes(c,e),s&&s.enableAttributes(c,e),t.bind(),t.setVertexAttribPointers(c,e,n),r))i.bind(),i.setVertexAttribPointers(c,e,n);o&&(o.bind(),o.setVertexAttribPointers(c,e,n)),i&&i.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,e,n)),s&&(s.bind(),s.setVertexAttribPointers(c,e,n)),u.currentNumAttributes=l}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let t6=(e,r,i,n,o)=>({u_texture:0,u_ele_delta:e,u_fog_matrix:r,u_fog_color:i?i.properties.get("fog-color"):t.bo.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:o?0:i?i.calculateFogBlendOpacity(n):0,u_horizon_color:i?i.properties.get("horizon-color"):t.bo.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!o}),t8={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function t7(e){let t=[];for(let r of e){if(null===r)continue;let e=r.split(" ");t.push(e.pop())}return t}class t9{constructor(e,r,i,n,o,a,s,l,u=[]){let c=e.gl;this.program=c.createProgram();let h=t7(r.staticAttributes),d=i?i.getBinderAttributes():[],p=h.concat(d),f=tn.prelude.staticUniforms?t7(tn.prelude.staticUniforms):[],m=s.staticUniforms?t7(s.staticUniforms):[],g=r.staticUniforms?t7(r.staticUniforms):[],y=i?i.getBinderUniforms():[],v=f.concat(m).concat(g).concat(y),b=[];for(let e of v)b.includes(e)||b.push(e);let _=i?i.defines():[];
964tE(c)&&_.unshift("#version 300 es"),o&&_.push("#define OVERDRAW_INSPECTOR;"),a&&_.push("#define TERRAIN3D;"),l&&_.push(l),u&&_.push(...u);let x=_.concat(tn.prelude.fragmentSource,s.fragmentSource,r.fragmentSource).join(`
965`),A=_.concat(tn.prelude.vertexSource,s.vertexSource,r.vertexSource).join(`
966`);tE(c)||(x=x.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D("),A=A.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D("));let w=c.createShader(c.FRAGMENT_SHADER);if(c.isContextLost())return void(this.failedToCreate=!0);if(c.shaderSource(w,x),c.compileShader(w),!c.getShaderParameter(w,c.COMPILE_STATUS))throw Error(`Could not compile fragment shader: ${c.getShaderInfoLog(w)}`);c.attachShader(this.program,w);let S=c.createShader(c.VERTEX_SHADER);if(c.isContextLost())return void(this.failedToCreate=!0);if(c.shaderSource(S,A),c.compileShader(S),!c.getShaderParameter(S,c.COMPILE_STATUS))throw Error(`Could not compile vertex shader: ${c.getShaderInfoLog(S)}`);c.attachShader(this.program,S),this.attributes={};let T={};this.numAttributes=p.length;for(let e=0;e<this.numAttributes;e++)p[e]&&(c.bindAttribLocation(this.program,e,p[e]),this.attributes[p[e]]=e);if(c.linkProgram(this.program),!c.getProgramParameter(this.program,c.LINK_STATUS))throw Error(`Program failed to link: ${c.getProgramInfoLog(this.program)}`);for(let e of(c.deleteShader(S),c.deleteShader(w),b))if(e&&!T[e]){let t=c.getUniformLocation(this.program,e);t&&(T[e]=t)}this.fixedUniforms=n(e,T),this.terrainUniforms={u_depth:new t.b_(e,T.u_depth),u_terrain:new t.b_(e,T.u_terrain),u_terrain_dim:new t.bp(e,T.u_terrain_dim),u_terrain_matrix:new t.c0(e,T.u_terrain_matrix),u_terrain_unpack:new t.c1(e,T.u_terrain_unpack),u_terrain_exaggeration:new t.bp(e,T.u_terrain_exaggeration)},this.projectionUniforms={u_projection_matrix:new t.c0(e,T.u_projection_matrix),u_projection_tile_mercator_coords:new t.c1(e,T.u_projection_tile_mercator_coords),u_projection_clipping_plane:new t.c1(e,T.u_projection_clipping_plane),u_projection_transition:new t.bp(e,T.u_projection_transition),u_projection_fallback_matrix:new t.c0(e,T.u_projection_fallback_matrix)},this.binderUniforms=i?i.getUniforms(e,T):[]}draw(e,t,r,i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v){var b;let _=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(i),e.setColorMode(n),e.setCullFace(o),s)for(let t in e.activeTexture.set(_.TEXTURE2),_.bindTexture(_.TEXTURE_2D,s.depthTexture),e.activeTexture.set(_.TEXTURE3),_.bindTexture(_.TEXTURE_2D,s.texture),this.terrainUniforms)this.terrainUniforms[t].set(s[t]);if(l)for(let e in l)this.projectionUniforms[t8[e]].set(l[e]);if(a)for(let e in this.fixedUniforms)this.fixedUniforms[e].set(a[e]);m&&m.setUniforms(e,this.binderUniforms,p,{zoom:f});let x=0;switch(t){case _.LINES:x=2;break;case _.TRIANGLES:x=3;break;case _.LINE_STRIP:x=1}for(let r of d.get())r.vaos||(r.vaos={}),(b=r.vaos)[u]||(b[u]=new t4),r.vaos[u].bind(e,this,c,m?m.getPaintVertexBuffers():[],h,r.vertexOffset,g,y,v),_.drawElements(t,r.primitiveLength*x,_.UNSIGNED_SHORT,r.primitiveOffset*x*2)}}function re(e,r,i){let n=1/t.aK(i,1,r.transform.tileZoom),o=Math.pow(2,i.tileID.overscaledZ),a=i.tileSize*Math.pow(2,r.transform.tileZoom)/o,s=a*(i.tileID.canonical.x+i.tileID.wrap*o),l=a*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[n,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}let rt=(e,r,i,n)=>{let o=e.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],l=t.c4();"viewport"===o.properties.get("anchor")&&t.c5(l,e.transform.bearingInRadians),t.c6(s,s,l);let u=e.transform.transformLightDirection(s),c=o.properties.get("color");return{u_lightpos:s,u_lightpos_globe:u,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+r,u_opacity:i,u_fill_translate:n}},rr=(e,r,i,n,o,a,s)=>t.e(rt(e,r,i,n),re(a,e,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8}),ri=(e,r,i,n)=>t.e(re(r,e,i),{u_fill_translate:n}),rn=(e,t)=>({u_world:e,u_fill_translate:t}),ro=(e,r,i,n,o)=>t.e(ri(e,r,i,o),{u_world:n}),ra=(e,r,i,n,o)=>{let a=e.transform,s,l,u=0;
966if("map"===i.paint.get("circle-pitch-alignment")){let e=t.aK(r,1,a.zoom);s=!0,l=[e,e],u=e/(t.a6*Math.pow(2,r.tileID.overscaledZ))*2*Math.PI*o}else s=!1,l=a.pixelsToGLUnits;return{u_camera_to_center_distance:a.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_pitch_with_map:+s,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:l,u_globe_extrude_scale:u,u_translate:n}},rs=e=>({u_pixel_extrude_scale:[1/e.width,1/e.height]}),rl=e=>({u_viewport_size:[e.width,e.height]}),ru=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),rc=(e,r,i,n)=>{let o=t.aK(e,1,r)/(t.a6*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*n;return{u_extrude_scale:t.aK(e,1,r),u_intensity:i,u_globe_extrude_scale:o}},rh=(e,r,i,n)=>{let o=t.O();t.c7(o,0,e.width,e.height,0,0,1);let a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:i,u_color_ramp:n,u_opacity:r.paint.get("heatmap-opacity")}},rd=(e,r,i)=>{var n;let o,a,s,l=i.paint.get("hillshade-accent-color");switch(i.paint.get("hillshade-method")){case"basic":s=4;break;case"combined":s=1;break;case"igor":s=2;break;case"multidirectional":s=3;break;default:s=0}let u=i.getIlluminationProperties();for(let t=0;t<u.directionRadians.length;t++)"viewport"===i.paint.get("hillshade-illumination-anchor")&&(u.directionRadians[t]+=e.transform.bearingInRadians);return{u_image:0,u_latrange:(o=Math.pow(2,(n=r.tileID).canonical.z),a=n.canonical.y,[new t.a7(0,a/o).toLngLat().lat,new t.a7(0,(a+1)/o).toLngLat().lat]),u_exaggeration:i.paint.get("hillshade-exaggeration"),u_altitudes:u.altitudeRadians,u_azimuths:u.directionRadians,u_accent:l,u_method:s,u_highlights:u.highlightColor,u_shadows:u.shadowColor}},rp=(e,r)=>{let i=r.stride,n=t.O();return t.c7(n,0,t.a6,-t.a6,0,0,1),t.Q(n,n,[0,-t.a6,0]),{u_matrix:n,u_image:1,u_dimension:[i,i],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}},rf=(e,t,r=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:r,u_opacity:e.paint.get("color-relief-opacity")}),rm=(e,r,i,n)=>{let o=e.transform;return{u_translation:rx(e,r,i),u_ratio:n/t.aK(r,1,o.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},rg=(e,r,i,n,o)=>t.e(rm(e,r,i,n),{u_image:0,u_image_height:o}),ry=(e,r,i,n,o)=>{let a=e.transform,s=r_(r,a);return{u_translation:rx(e,r,i),u_texsize:r.imageAtlasTexture.size,u_ratio:n/t.aK(r,1,a.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[s,o.fromScale,o.toScale],u_fade:o.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},rv=(e,r,i,n,o)=>{let a=r_(r,e.transform);return t.e(rm(e,r,i,n),{u_tileratio:a,u_crossfade_from:o.fromScale,u_crossfade_to:o.toScale,u_image:0,u_mix:o.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},rb=(e,r,i,n,o,a)=>{let s=r_(r,e.transform);return t.e(rm(e,r,i,n),{u_image:0,u_image_height:a,u_tileratio:s,u_crossfade_from:o.fromScale,u_crossfade_to:o.toScale,u_image_dash:1,u_mix:o.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};function r_(e,r){return 1/t.aK(e,1,r.tileZoom)}function rx(e,r,i){return t.aL(e.transform,r,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}let rA=(e,t,r,i,n)=>{var o,a,s;let l,u;return{u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"))>0?1-1/(1.001-a):-a,u_contrast_factor:(o=i.paint.get("raster-contrast"))>0?1/(1-o):1+o,u_spin_weights:(l=Math.sin(s=i.paint.get("raster-hue-rotate")*(Math.PI/180)),[(2*(u=Math.cos(s))+1)/3,(-Math.sqrt(3)*l-u+1)/3,(Math.sqrt(3)*l-u+1)/3]),u_coords_top:[n[0].x,n[0].y,n[1].x,n[1].y],u_coords_bottom:[n[3].x,n[3].y,n[2].x,n[2].y]}},rw=(e,t,r,i,n,o,a,s,l,u,c,h,d)=>{let p=a.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:p.cameraToCenterDistance,u_pitch:p.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:p.width/p.height,u_fade_change:a.options.fadeDuration?a.symbolFadeChange:1,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+c,u_pitch_with_map:+i,u_is_along_line:n,u_is_variable_anchor:o,u_texsize:h,u_texture:0,u_translation:u,u_pitched_scale:d}},rS=(e,r,i,n,o,a,s,l,u,c,h,d,p,f)=>{let m=s.transform;return t.e(rw(e,r,i,n,o,a,s,l,u,c,h,d,f),{u_gamma_scale:n?Math.cos(m.pitch
vendor: 7,563 bytes, line 966
966*Math.PI/180)*m.cameraToCenterDistance:1,u_device_pixel_ratio:s.pixelRatio,u_is_halo:+!!p,u_is_plain:1})},rT=(e,r,i,n,o,a,s,l,u,c,h,d,p)=>t.e(rS(e,r,i,n,o,a,s,l,u,c,!0,h,!0,p),{u_texsize_icon:d,u_texture_icon:1}),rC=(e,t)=>({u_opacity:e,u_color:t}),rE=(e,r,i,n,o)=>t.e(function(e,r,i,n){let o=i.imageManager.getPattern(e.from.toString()),a=i.imageManager.getPattern(e.to.toString()),{width:s,height:l}=i.imageManager.getPixelSize(),u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,i.transform.tileZoom)/u,h=c*(n.tileID.canonical.x+n.tileID.wrap*u),d=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:o.tl,u_pattern_br_a:o.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:r.t,u_pattern_size_a:o.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:r.fromScale,u_scale_b:r.toScale,u_tile_units_to_pixels:1/t.aK(n,1,i.transform.tileZoom),u_pixel_coord_upper:[h>>16,d>>16],u_pixel_coord_lower:[65535&h,65535&d]}}(i,o,r,n),{u_opacity:e}),rP=(e,t)=>{},rI={fillExtrusion:(e,r)=>({u_lightpos:new t.c2(e,r.u_lightpos),u_lightpos_globe:new t.c2(e,r.u_lightpos_globe),u_lightintensity:new t.bp(e,r.u_lightintensity),u_lightcolor:new t.c2(e,r.u_lightcolor),u_vertical_gradient:new t.bp(e,r.u_vertical_gradient),u_opacity:new t.bp(e,r.u_opacity),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillExtrusionPattern:(e,r)=>({u_lightpos:new t.c2(e,r.u_lightpos),u_lightpos_globe:new t.c2(e,r.u_lightpos_globe),u_lightintensity:new t.bp(e,r.u_lightintensity),u_lightcolor:new t.c2(e,r.u_lightcolor),u_vertical_gradient:new t.bp(e,r.u_vertical_gradient),u_height_factor:new t.bp(e,r.u_height_factor),u_opacity:new t.bp(e,r.u_opacity),u_fill_translate:new t.c3(e,r.u_fill_translate),u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade)}),fill:(e,r)=>({u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillPattern:(e,r)=>({u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillOutline:(e,r)=>({u_world:new t.c3(e,r.u_world),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillOutlinePattern:(e,r)=>({u_world:new t.c3(e,r.u_world),u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade),u_fill_translate:new t.c3(e,r.u_fill_translate)}),circle:(e,r)=>({u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_scale_with_map:new t.b_(e,r.u_scale_with_map),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_extrude_scale:new t.c3(e,r.u_extrude_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_globe_extrude_scale:new t.bp(e,r.u_globe_extrude_scale),u_translate:new t.c3(e,r.u_translate)}),collisionBox:(e,r)=>({u_pixel_extrude_scale:new t.c3(e,r.u_pixel_extrude_scale)}),collisionCircle:(e,r)=>({u_viewport_size:new t.c3(e,r.u_viewport_size)}),debug:(e,r)=>({u_color:new t.b$(e,r.u_color),u_overlay:new t.b_(e,r.u_overlay),u_overlay_scale:new t.bp(e,r.u_overlay_scale)}),depth:rP,clippingMask:rP,heatmap:(e,r)=>({u_extrude_scale:new t.bp(e,r.u_extrude_scale),u_intensity:new t.bp(e,r.u_intensity),u_globe_extrude_scale:new t.bp(e,r.u_globe_extrude_scale)}),heatmapTexture:(e,r)=>({u_matrix:new t.c0(e,r.u_matrix),u_world:new t.c3(e,r.u_world),u_image:new t.b_(e,r.u_image),u_color_ramp:new t.b_(e,r.u_color_ramp),u_opacity:new t.bp(e,r.u_opacity)}),hillshade:(e,r)=>({u_image:new t.b_(e,r.u_image),u_latrange:new t.c3(e,r.u_latrange),u_exaggeration:new t.bp(e,r.u_exaggeration),u_altitudes:new t.c9(e,r.u_altitudes),u_azimuths:new t.c9(e,r.u_azimuths),u_accent:new t.b$(e,r.u_accent),u_method:new t.b_(e,r.u_method),u_shadows:new t.c8(e,r.u_shadows),u_highlights:new t.c8(e,r.u_highlights)}),hillshadePrepare:(e,r)=>({u_matrix:new t.c0(e,r.u_matrix),u_image:new t.b_(e,r.u_image),u_dimension:new t.c3(e,r.u_dimension),u_zoom:new t.bp(e,r.u_zoom),u_unpack:new t.c1(e,r.u_unpack)}),colorRelief:(e,r)=>({u_image:new t.b_(e,r.u_image),u_unpack:new t.c1(e,r.u_unpack),u_dimension:new t.c3(e,r.u_dimension),u_elevation_stops:new t.b_(e,r.u_elevation_stops),u_color_stops:new t.b_(e,r.u_color_stops),u_color_ramp_size:new t.b_(e,r.u_color_ramp_size),u_opacity:new t.bp(e,r.u_opacity)}),line:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels)}),lineGradient:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_image_height:new t.bp(e,r.u_image_height)}),linePattern:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_texsize:new t.c3(e,r.u_texsize),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_image:new t.b_(e,r.u_image),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade)}),lineSDF:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_mix:new t.bp(e,r.u_mix),u_tileratio:new t.bp(e,r.u_tileratio),u_crossfade_from:new t.bp(e,r.u_crossfade_from),u_crossfade_to:new t.bp(e,r.u_crossfade_to),u_lineatlas_width:new t.bp(e,r.u_lineatlas_width),u_lineatlas_height:new t.bp(e,r.u_lineatlas_height)}),lineGradientSDF:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_image_height:new t.bp(e,r.u_image_height),u_tileratio:new t.bp(e,r.u_tileratio),u_crossfade_from:new t.bp(e,r.u_crossfade_from),u_crossfade_to:new t.bp(e,r.u_crossfade_to),u_image_dash:new t.b_(e,r.u_image_dash),u_mix:new t.bp(e,r.u_mix),u_lineatlas_width:new t.bp(e,r.u_lineatlas_width),u_lineatlas_height:new t.bp(e,r.u_lineatlas_height)}),raster:(e,r)=>({u_tl_parent:new t.c3(e,r.u_tl_parent),u_scale_parent:new t.bp(e,r.u_scale_parent),u_buffer_scale:new t.bp(e,r.u_buffer_scale),u_fade_t:new t.bp(e,r.u_fade_t),u_opacity:new t.bp(e,r.u_opacity),u_image0:new t.b_(e,r.u_image0),u_image1:new t.b_(e,r.u_image1),u_brightness_low:new t.bp(e,r.u_brightness_low),u_brightness_high:new t.bp(e,r.u_brightness_high),u_saturation_factor:new t.bp(e,r.u_saturation_factor),u_contrast_factor:new t.bp(e,r.u_contrast_factor),u_spin_weights:new t.c2(e,r.u_spin_weights),u_coords_top:new t.c1(e,r.u_coords_top),u_coords_bottom:new t.c1(e,r.u_coords_bottom)}),symbolIcon:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix
966),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texture:new t.b_(e,r.u_texture),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),symbolSDF:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texture:new t.b_(e,r.u_texture),u_gamma_scale:new t.bp(e,r.u_gamma_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_is_halo:new t.b_(e,r.u_is_halo),u_is_plain:new t.b_(e,r.u_is_plain),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),symbolTextAndIcon:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texsize_icon:new t.c3(e,r.u_texsize_icon),u_texture:new t.b_(e,r.u_texture),u_texture_icon:new t.b_(e,r.u_texture_icon),u_gamma_scale:new t.bp(e,r.u_gamma_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_is_halo:new t.b_(e,r.u_is_halo),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),background:(e,r)=>({u_opacity:new t.bp(e,r.u_opacity),u_color:new t.b$(e,r.u_color)}),backgroundPattern:(e,r)=>({u_opacity:new t.bp(e,r.u_opacity),u_image:new t.b_(e,r.u_image),u_pattern_tl_a:new t.c3(e,r.u_pattern_tl_a),u_pattern_br_a:new t.c3(e,r.u_pattern_br_a),u_pattern_tl_b:new t.c3(e,r.u_pattern_tl_b),u_pattern_br_b:new t.c3(e,r.u_pattern_br_b),u_texsize:new t.c3(e,r.u_texsize),u_mix:new t.bp(e,r.u_mix),u_pattern_size_a:new t.c3(e,r.u_pattern_size_a),u_pattern_size_b:new t.c3(e,r.u_pattern_size_b),u_scale_a:new t.bp(e,r.u_scale_a),u_scale_b:new t.bp(e,r.u_scale_b),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.bp(e,r.u_tile_units_to_pixels)}),terrain:(e,r)=>({u_texture:new t.b_(e,r.u_texture),u_ele_delta:new t.bp(e,r.u_ele_delta),u_fog_matrix:new t.c0(e,r.u_fog_matrix),u_fog_color:new t.b$(e,r.u_fog_color),u_fog_ground_blend:new t.bp(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.bp(e,r.u_fog_ground_blend_opacity),u_horizon_color:new t.b$(e,r.u_horizon_color),u_horizon_fog_blend:new t.bp(e,r.u_horizon_fog_blend),u_is_globe_mode:new t.bp(e,r.u_is_globe_mode)}),terrainDepth:(e,r)=>({u_ele_delta:new t.bp(e,r.u_ele_delta)}),terrainCoords:(e,r)=>({u_texture:new t.b_(e,r.u_texture),u_terrain_coords_id:new t.bp(e,r.u_terrain_coords_id),u_ele_delta:new t.bp(e,r.u_ele_delta)}),projectionErrorMeasurement:(e,r)=>({u_input:new t.bp(e,r.u_input),u_output_expected:new t.bp(e,r.u_output_expected)}),atmosphere:(e,r)=>({u_sun_pos:new t.c2(e,r.u_sun_pos),u_atmosphere_blend:new t.bp(e,r.u_atmosphere_blend),u_globe_position:new t.c2(e,r.u_globe_position),u_globe_radius:new t.bp(e,r.u_globe_radius),u_inv_proj_matrix:new t.c0(e,r.u_inv_proj_matrix)}),sky:(e,r)=>({u_sky_color:new t.b$(e,r.u_sky_color),u_horizon_color:new t.b$(e,r.u_horizon_color),u_horizon:new t.c3(e,r.u_horizon),u_horizon_normal:new t.c3(e,r.u_horizon_normal),u_sky_horizon_blend:new t.bp(e,r.u_sky_horizon_blend),u_sky_blend:new t.bp(e,r.u_sky_blend)})};class rM{constructor(e,t,r){this.context=e;let i=e.gl;this.buffer=i.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let rk={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};
966class rO{constructor(e,t,r,i){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=i,this.context=e;let n=e.gl;this.buffer=n.createBuffer(),e.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r of this.attributes){let i=t.attributes[r.name];void 0!==i&&e.enableVertexAttribArray(i)}}setVertexAttribPointers(e,t,r){for(let i of this.attributes){let n=t.attributes[i.name];void 0!==n&&e.vertexAttribPointer(n,i.components,e[rk[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class rD{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class rR extends rD{getDefault(){return t.bo.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class rL extends rD{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class rB extends rD{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class rF extends rD{getDefault(){return[!0,!0,!0,!0]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class rj extends rD{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class rz extends rD{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class rN extends rD{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class rG extends rD{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class rV extends rD{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}}class rU extends rD{getDefault(){return[0,1]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class rH extends rD{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}}class rW extends rD{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class rq extends rD{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}}class rZ extends rD{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class r$ extends rD{getDefault(){return t.bo.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class rK extends rD{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class rX extends rD{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}}class rY extends rD{getDefault(){return this.gl.BACK}
966set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class rQ extends rD{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class rJ extends rD{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class r0 extends rD{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class r1 extends rD{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class r2 extends rD{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class r3 extends rD{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class r5 extends rD{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class r4 extends rD{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class r6 extends rD{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class r8 extends rD{getDefault(){return null}set(e){var t;if(e===this.current&&!this.dirty)return;let r=this.gl;tE(r)?r.bindVertexArray(e):null==(t=r.getExtension("OES_vertex_array_object"))||t.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class r7 extends rD{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class r9 extends rD{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class ie extends rD{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class it extends rD{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}}class ir extends it{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class ii extends it{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class io extends it{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}let ia="Framebuffer is not complete";class is{constructor(e,t,r,i,n){this.context=e,this.width=t,this.height=r;let o=e.gl,a=this.framebuffer=o.createFramebuffer();if(this.colorAttachment=new ir(e,a),i)this.depthAttachment=n?new io(e,a):new ii(e,a);else if(n)throw Error("Stencil cannot be set without depth");if(o.checkFramebufferStatus(o.FRAMEBUFFER)!==o.FRAMEBUFFER_COMPLETE)throw Error(ia)}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}}class il{constructor(e){var t,r;if(this.gl=e,this.clearColor=new rR(this),this.clearDepth=new rL(this),this.clearStencil=new rB(this),this.colorMask=new rF(this),this.depthMask=new rj(this),this.stencilMask=new rz(this),this.stencilFunc=new rN(this),this.stencilOp=new rG(this),this.stencilTest=new rV(this),this.depthRange=new rU(this),this.depthTest=new rH(this),this.depthFunc=new rW(this),this.blend=new rq(this),this.blendFunc=new rZ(this),this.blendColor=new r$(this),this.blendEquation=new rK(this),this.cullFace=new rX(this),this.cullFaceSide=new rY(this),this.frontFace=new rQ(this),this.program=new rJ(this),this.activeTexture=new r0(this),this.viewport=new r1(this),this.bindFramebuffer=new r2(this),this.bindRenderbuffer=new r3(this),this.bindTexture=new r5(this),this.bindVertexBuffer=new r4(this),this.bindElementBuffer=new r6(this),this.bindVertexArray=new r8(this),this.pixelStoreUnpack=new r7(this),this.pixelStoreUnpackPremultiplyAlpha=new r9(this),this.pixelStoreUnpackFlipY=new ie(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),tE(e)){this.HALF_FLOAT=e.HALF_FLOAT;let i=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!=(t=e.RGBA16F)?t:null==i?void 0:i.RGBA16F_EXT,this.RGB16F=null!=(r=e.RGB16F)?r:null==i?void 0:i.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");let t=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=null==t?void 0:t.HALF_FLOAT_OES}}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.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,t){return new rM(this,e,t)}createVertexBuffer(e,t,r){return new rO(this,e,t,r)}createRenderbuffer(e,t,r){let i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,e,t,r),this.bindRenderbuffer.set(null),n}
966createFramebuffer(e,t,r,i){return new is(this,e,t,r,i)}clear({color:e,depth:t,stencil:r}){let i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==t&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),void 0!==r&&(n|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(r),this.stencilMask.set(255)),i.clear(n)}setCullFace(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){t.bQ(e.blendFunction,tw.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return tE(this.gl)?this.gl.createVertexArray():null==(e=this.gl.getExtension("OES_vertex_array_object"))?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var t;tE(this.gl)?this.gl.deleteVertexArray(e):null==(t=this.gl.getExtension("OES_vertex_array_object"))||t.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}function iu(e,r,i,n,o){var a,s;let u=e.context,c=e.transform,h=u.gl,d=e.useProgram("collisionBox"),p=[],f=0,m=0;for(let t of n){let n=r.getTile(t).getBucket(i);if(!n)continue;let s=o?n.textCollisionBox:n.iconCollisionBox,l=n.collisionCircleArray;l.length>0&&(p.push({circleArray:l,circleOffset:m,coord:t}),f+=l.length/4,m=f),s&&d.draw(u,h.LINES,tT.disabled,tC.disabled,e.colorModeForRenderPass(),tS.disabled,rs(e.transform),null==(a=e.style.map.terrain)?void 0:a.getTerrainData(t),c.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),i.id,s.layoutVertexBuffer,s.indexBuffer,s.segments,null,e.transform.zoom,null,null,s.collisionVertexBuffer)}if(!o||!p.length)return;let g=e.useProgram("collisionCircle"),y=new t.ca;y.resize(4*f),y._trim();let v=0;for(let e of p)for(let t=0;t<e.circleArray.length/4;t++){let r=4*t,i=e.circleArray[r+0],n=e.circleArray[r+1],o=e.circleArray[r+2],a=e.circleArray[r+3];y.emplace(v++,i,n,o,a,0),y.emplace(v++,i,n,o,a,1),y.emplace(v++,i,n,o,a,2),y.emplace(v++,i,n,o,a,3)}(!l||l.length<2*f)&&(l=function(e){let r=2*e,i=new t.cc;i.resize(r),i._trim();for(let e=0;e<r;e++){let t=6*e;i.uint16[t+0]=4*e+0,i.uint16[t+1]=4*e+1,i.uint16[t+2]=4*e+2,i.uint16[t+3]=4*e+2,i.uint16[t+4]=4*e+3,i.uint16[t+5]=4*e+0}return i}(f));let b=u.createIndexBuffer(l,!0),_=u.createVertexBuffer(y,t.cb.members,!0);for(let r of p){let n=rl(e.transform);g.draw(u,h.TRIANGLES,tT.disabled,tC.disabled,e.colorModeForRenderPass(),tS.disabled,n,null==(s=e.style.map.terrain)?void 0:s.getTerrainData(r.coord),null,i.id,_,b,t.aV.simpleSegment(0,2*r.circleOffset,r.circleArray.length,r.circleArray.length/2),null,e.transform.zoom,null,null,null)}_.destroy(),b.destroy()}let ic=t.ap(new Float32Array(16));function ih(e,r,i,n,o,a,s,l,u,c,h,d,p){var f,m;let g=e.context,y=g.gl,v=e.transform,b="map"===l,_="map"===u,x="viewport"!==l&&"point"!==i.layout.get("symbol-placement"),A=b&&!_&&!x,w=!i.layout.get("symbol-sort-key").isConstant(),S=!1,T=e.getDepthModeForSublayer(0,tT.ReadOnly),C=i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"),E=[],P=v.getCircleRadiusCorrection();for(let l of n){let n=r.getTile(l),u=n.getBucket(i);if(!u)continue;let h=o?u.text:u.icon;if(!(null==h?void 0:h.segments.get().length)||!h.hasVisibleVertices)continue;let d=h.programConfigurations.get(i.id),m=o||u.sdfIcons,g=o?u.textSizeData:u.iconSizeData,T=_||0!==v.pitch,I=e.useProgram(u.iconsInText&&o?"symbolTextAndIcon":m?"symbolSDF":"symbolIcon",d),M=t.aw(g,v.zoom),k=null==(f=e.style.map.terrain)?void 0:f.getTerrainData(l),O,D,R,L,B=[0,0],F=null;if(o)D=n.glyphAtlasTexture,R=y.LINEAR,O=n.glyphAtlasTexture.size,u.iconsInText&&(B=n.imageAtlasTexture.size,F=n.imageAtlasTexture,L=T||e.options.rotating||e.options.zooming||"composite"===g.kind||"camera"===g.kind?y.LINEAR:y.NEAREST);else{let t=1!==i.layout.get("icon-size").constantOr(0)||u.iconsNeedLinear;
966D=n.imageAtlasTexture,R=m||e.options.rotating||e.options.zooming||t||T?y.LINEAR:y.NEAREST,O=n.imageAtlasTexture.size}let j=t.aK(n,1,e.transform.zoom),z=eD(b,e.transform,j),N=function(e,r,i,n){if(e){let e=t.O();if(!r){let{vecSouth:t,vecEast:r}=eR(i);e[0]=r[0],e[1]=r[1],e[4]=t[0],e[5]=t[1]}return t.S(e,e,[n,n,1]),e}return i.pixelsToClipSpaceMatrix}(_,b,e.transform,j),G=t.aL(v,n,a,s),V=v.getProjectionData({overscaledTileID:l,applyGlobeMatrix:!p,applyTerrainMatrix:!0}),U=C&&u.hasTextData(),H="none"!==i.layout.get("icon-text-fit")&&U&&u.hasIconData();if(x){let r=t.O();!function(e,t){let r=1/(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),i=1/(t[8]*t[8]+t[9]*t[9]+t[10]*t[10]),n=t[0]*r,o=t[4]*r,a=t[8]*i,s=t[1]*r,l=t[5]*r,u=t[9]*i,c=t[2]*r,h=t[6]*r,d=t[10]*i;e[0]=n,e[1]=o,e[2]=a,e[4]=s,e[5]=l,e[6]=u,e[8]=c,e[9]=h,e[10]=d;let p=t[12],f=t[13],m=t[14];e[12]=-n*p-s*f-c*m,e[13]=-o*p-l*f-h*m,e[14]=-a*p-u*f-d*m,e[3]=0,e[7]=0,e[11]=0,e[15]=1}(r,z);let n=e.style.map.terrain?(t,r)=>e.style.map.terrain.getElevation(l,t,r):null;!function(e,r,i,n,o,a,s,l,u,c,h,d,p){let f=i?e.textSizeData:e.iconSizeData,m=t.aw(f,r.transform.zoom),g=[256/r.width*2+1,256/r.height*2+1],y=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;y.clear();let v=e.lineVertexArray,b=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,_=r.transform.width/r.transform.height,x=!1;for(let i=0;i<b.length;i++){var A;let w=b.get(i);if(w.hidden||w.writingMode===t.ax.vertical&&!x){eZ(w.numGlyphs,y);continue}x=!1;let S=new t.P(w.anchorX,w.anchorY),T={getElevation:p,pitchedLabelPlaneMatrix:n,lineVertexArray:v,pitchWithMap:a,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:r.transform,tileAnchorPoint:S,unwrappedTileID:u,width:c,height:h,translation:d},C=eU(w.anchorX,w.anchorY,T);if(!((A=C.point).x>=-g[0]&&A.x<=g[0]&&A.y>=-g[1])||!(A.y<=g[1])){eZ(w.numGlyphs,y);continue}let E=.5+r.transform.cameraToCenterDistance/C.signedDistanceFromCamera*.5,P=t.ay(f,m,w),I=a?P*r.transform.getPitchedTextCorrection(w.anchorX,w.anchorY,u)/E:P*E,M=ej({projectionContext:T,pitchedLabelPlaneMatrixInverse:o,symbol:w,fontSize:I,flip:!1,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:_,rotateToLine:l});x=M.useVertical,(M.notEnoughRoom||x||M.needsFlipping&&ej({projectionContext:T,pitchedLabelPlaneMatrixInverse:o,symbol:w,fontSize:I,flip:!0,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:_,rotateToLine:l}).notEnoughRoom)&&eZ(w.numGlyphs,y)}i?e.text.dynamicLayoutVertexBuffer.updateData(y):e.icon.dynamicLayoutVertexBuffer.updateData(y)}(u,e,o,z,r,_,c,"map"===i.layout.get("text-rotation-alignment"),l.toUnwrapped(),v.width,v.height,G,n)}let W=o&&C||H,q=x||W?ic:_?z:e.transform.clipSpaceToPixelsMatrix,Z=m&&0!==i.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),$={program:I,buffers:h,uniformValues:m?u.iconsInText?rT(g.kind,M,A,_,x,W,e,q,N,G,O,B,P):rS(g.kind,M,A,_,x,W,e,q,N,G,o,O,Z,P):rw(g.kind,M,A,_,x,W,e,q,N,G,o,O,P),projectionData:V,atlasTexture:D,atlasTextureIcon:F,atlasInterpolation:R,atlasInterpolationIcon:L,isSDF:m,hasHalo:Z};if(w&&u.canOverlap)for(let e of(S=!0,h.segments.get()))E.push({segments:new t.aV([e]),sortKey:e.sortKey,state:$,terrainData:k});else E.push({segments:h.segments,sortKey:0,state:$,terrainData:k})}S&&E.sort((e,t)=>
966e.sortKey-t.sortKey);let I=null!=(m=i.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(null))?m:1/0,M=i.layout.get("text-letter-spacing").constantOr(0)*t.aJ<0||I>1;for(let t of E){let r=t.state;g.activeTexture.set(y.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,y.CLAMP_TO_EDGE),r.atlasTextureIcon&&(g.activeTexture.set(y.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,y.CLAMP_TO_EDGE));let n=r.isSDF&&r.hasHalo;if(n){let n=r.uniformValues;n.u_is_halo=1,M&&(n.u_is_plain=0,id(r.buffers,t.segments,i,e,r.program,T,h,d,n,r.projectionData,t.terrainData),n.u_is_halo=0,n.u_is_plain=1)}id(r.buffers,t.segments,i,e,r.program,T,h,d,r.uniformValues,r.projectionData,t.terrainData),n&&!M&&(r.uniformValues.u_is_halo=0)}}function id(e,t,r,i,n,o,a,s,l,u,c){let h=i.context;n.draw(h,h.gl.TRIANGLES,o,a,s,tS.backCCW,l,c,u,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,i.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function ip(e,t,r){var i,n;let o=e.gl,a=o.createTexture();o.bindTexture(o.TEXTURE_2D,a),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR);let s=null!=(i=e.HALF_FLOAT)?i:o.UNSIGNED_BYTE,l=null!=(n=e.RGBA16F)?n:o.RGBA;o.texImage2D(o.TEXTURE_2D,0,l,t,r,0,o.RGBA,s,null);let u=e.createFramebuffer(t,r,!1,!1);return u.colorAttachment.set(a),u}function im(e,r){return r.colorRampTexture||(r.colorRampTexture=new t.T(e,r.colorRamp,e.gl.RGBA)),r.colorRampTexture}function ig(e,r,i,n,o,a,s,l){let u=256;if(o.stepInterpolant){let n=r.getSource().maxzoom,o=s.canonical.z===n?Math.ceil(1<<e.transform.maxZoom-s.canonical.z):1;u=t.al(t.ce(a.maxLineLength/t.a6*1024*o),256,i.maxTextureSize)}return l.gradient=t.cf({expression:o.gradientExpression(),evaluationKey:"lineProgress",resolution:u,image:l.gradient||void 0,clips:a.lineClipsArray}),l.texture?l.texture.update(l.gradient):l.texture=new t.T(i,l.gradient,n.RGBA),l.version=o.gradientVersion,l.texture}function iy(e,t,r,i,n){if(!r||!(null==i?void 0:i.imageAtlas))return;let o=i.imageAtlas.patternPositions,a=o[r.to.toString()],s=o[r.from.toString()];if(!a&&s&&(a=s),!s&&a&&(s=a),!a||!s){let e=n.getPaintProperty(t);a=o[e],s=o[e]}a&&s&&e.setConstantPatternPositions(a,s)}function iv(e,r,i,n,o,a,s,l){var u;let c,h,d,p,f,m=e.context.gl,g="fill-pattern",y=i.paint.get(g),v=null==y?void 0:y.constantOr(1),b=i.getCrossfadeParameters(),_=e.transform,x=i.paint.get("fill-translate"),A=i.paint.get("fill-translate-anchor");s?(h=v&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",c=m.LINES):(h=v?"fillPattern":"fill",c=m.TRIANGLES);let w=y.constantOr(null);for(let y of n){let n=r.getTile(y);if(v&&!n.patternsLoaded())continue;let S=n.getBucket(i);if(!S)continue;let T=S.programConfigurations.get(i.id),C=e.useProgram(h,T),E=null==(u=e.style.map.terrain)?void 0:u.getTerrainData(y);v&&(e.context.activeTexture.set(m.TEXTURE0),n.imageAtlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE),T.updatePaintBuffers(b)),iy(T,g,w,n,i);let P=_.getProjectionData({overscaledTileID:y,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),I=t.aL(_,n,x,A);if(s){p=S.indexBuffer2,f=S.segments2;let t=[m.drawingBufferWidth,m.drawingBufferHeight];d="fillOutlinePattern"===h&&v?ro(e,b,n,t,I):rn(t,I)}else p=S.indexBuffer,f=S.segments,d=v?ri(e,b,n,I):{u_fill_translate:I};let M=e.stencilModeForClipping(y);C.draw(e.context,c,o,M,a,tS.backCCW,d,E,P,i.id,S.layoutVertexBuffer,p,f,i.paint,e.transform.zoom,T)}}function ib(e,r,i,n,o,a,s,l){var u;let c=e.context,h=c.gl,d="fill-extrusion-pattern",p=i.paint.get(d),f=p.constantOr(1),m=i.getCrossfadeParameters(),g=i.paint.get("fill-extrusion-opacity"),y=p.constantOr(null),v=e.transform;for(let p of n){let n=r.getTile(p),b=n.getBucket(i);if(!b)continue;let _=null==(u=e.style.map.terrain)?void 0:u.getTerrainData(p),x=b.programConfigurations.get(i.id),A=e.useProgram(f?"fillExtrusionPattern":"fillExtrusion",x);f&&(e.context.activeTexture.set(h.TEXTURE0),n.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),x.updatePaintBuffers(m));let w=v.getProjectionData({overscaledTileID:p,applyGlobeMatrix:!l,applyTerrainMatrix:!0});iy(x,d,y,n,i);let S=t.aL(v,n,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),T=i.paint.get("fill-extrusion-vertical-gradient"),C=f?rr(e,T,g,S,p,m,n):rt(e,T,g,S);A.draw(c,c.gl.TRIANGLES,o,a,s,tS.backCCW,C,_,w,i.id,b.layoutVertexBuffer,b.indexBuffer,b.segments,i.paint,e.transform.zoom,x,e.style.map.terrain&&b.centroidVertexBuffer)}}function i_(e,t,r,i,n,o,a,s,l){var u;
966let c=e.style.projection,h=e.context,d=e.transform,p=h.gl,f=[`#define NUM_ILLUMINATION_SOURCES ${r.paint.get("hillshade-highlight-color").values.length}`],m=e.useProgram("hillshade",null,!1,f),g=!e.options.moving;for(let f of i){let i=t.getTile(f),y=i.fbo;if(!y)continue;let v=c.getMeshFromTileID(h,f.canonical,s,!0,"raster"),b=null==(u=e.style.map.terrain)?void 0:u.getTerrainData(f);h.activeTexture.set(p.TEXTURE0),p.bindTexture(p.TEXTURE_2D,y.colorAttachment.get());let _=d.getProjectionData({overscaledTileID:f,aligned:g,applyGlobeMatrix:!l,applyTerrainMatrix:!0});m.draw(h,p.TRIANGLES,o,n[f.overscaledZ],a,tS.backCCW,rd(e,i,r),b,_,r.id,v.vertexBuffer,v.indexBuffer,v.segments)}}let ix=0;function iA(e,r,i,n,o,a,s,l,u){var c;let h=e.style.projection,d=e.context,p=e.transform,f=d.gl,m=e.useProgram("colorRelief"),g=!e.options.moving,y="nearest"===i.paint.get("resampling")?f.NEAREST:f.LINEAR,v=!0,b=0;for(let _ of n){let n=r.getTile(_),x=n.dem;if(v){ix||(ix=f.getParameter(f.MAX_TEXTURE_SIZE));let e=ix,{elevationTexture:t,colorTexture:r}=i.getColorRampTextures(d,e,x.getUnpackVector());d.activeTexture.set(f.TEXTURE1),t.bind(f.NEAREST,f.CLAMP_TO_EDGE),d.activeTexture.set(f.TEXTURE4),r.bind(f.LINEAR,f.CLAMP_TO_EDGE),v=!1,b=t.size[0]}if(!(null==x?void 0:x.data))continue;let A=x.stride,w=x.getPixels();if(d.activeTexture.set(f.TEXTURE0),d.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture||(n.demTexture=e.getTileTexture(A)),n.demTexture){let e=n.demTexture;e.update(w,{premultiply:!1}),e.bind(y,f.CLAMP_TO_EDGE)}else n.demTexture=new t.T(d,w,f.RGBA,{premultiply:!1}),n.demTexture.bind(y,f.CLAMP_TO_EDGE);let S=h.getMeshFromTileID(d,_.canonical,l,!0,"raster"),T=null==(c=e.style.map.terrain)?void 0:c.getTerrainData(_),C=p.getProjectionData({overscaledTileID:_,aligned:g,applyGlobeMatrix:!u,applyTerrainMatrix:!0});m.draw(d,f.TRIANGLES,a,o[_.overscaledZ],s,tS.backCCW,rf(i,n.dem,b),T,C,i.id,S.vertexBuffer,S.indexBuffer,S.segments)}}let iw=[new t.P(0,0),new t.P(t.a6,0),new t.P(t.a6,t.a6),new t.P(0,t.a6)];function iS(e,r,i,n,o,a,s,l,u=!1,c=!1){var h;let d=n[n.length-1].overscaledZ,p=e.context,f=p.gl,g=e.useProgram("raster"),y=e.transform,v=e.style.projection,b=e.colorModeForRenderPass(),x=!e.options.moving,A=i.paint.get("raster-opacity"),w="nearest"===i.paint.get("resampling")||"nearest"===i.paint.get("raster-resampling")?f.NEAREST:f.LINEAR,S=i.paint.get("raster-fade-duration"),T=!!e.style.map.terrain;for(let C of n){let n=e.getDepthModeForSublayer(C.overscaledZ-d,1===A?tT.ReadWrite:tT.ReadOnly,f.LESS),E=r.getTile(C);p.activeTexture.set(f.TEXTURE0),E.texture.bind(w,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),p.activeTexture.set(f.TEXTURE1);let{parentTile:P,parentScaleBy:I,parentTopLeft:M,fadeValues:k}=function(e,r,i,n){let o={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(0===i||n)return o;if(e.fadingParentID){let n,a,s,l,u,c,h=r.getLoadedTile(e.fadingParentID);if(!h)return o;let d=Math.pow(2,h.tileID.overscaledZ-e.tileID.overscaledZ),p=[e.tileID.canonical.x*d%1,e.tileID.canonical.y*d%1],f=(a=((n=_())-h.timeAdded)/i,s=e.fadingDirection===m.Incoming,l=t.al((n-e.timeAdded)/i,0,1),u=t.al(1-a,0,1),{tileOpacity:c=s?l:u,parentTileOpacity:s?u:l,fadeMix:{opacity:1,mix:1-c}});return{parentTile:h,parentScaleBy:d,parentTopLeft:p,fadeValues:f}}if(e.selfFading){let r,n;return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:(r=(_()-e.timeAdded)/i,{tileOpacity:n=t.al(r,0,1),fadeMix:{opacity:n,mix:0}})}}return o}(E,r,S,T);E.fadeOpacity=k.tileOpacity,P?(P.fadeOpacity=k.parentTileOpacity,P.texture.bind(w,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST)):E.texture.bind(w,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),E.texture.useMipmap&&p.extTextureFilterAnisotropic&&e.transform.pitch>e.options.anisotropicFilterPitch&&f.texParameterf(f.TEXTURE_2D,p.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,p.extTextureFilterAnisotropicMax);let O=null==(h=e.style.map.terrain)?void 0:h.getTerrainData(C),D=y.getProjectionData({overscaledTileID:C,aligned:x,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),R=rA(M,I,k.fadeMix,i,l),L=v.getMeshFromTileID(p,C.canonical,a,s,"raster");g.draw(p,f.TRIANGLES,n,o?o[C.overscaledZ]:tC.disabled,b,u?tS.frontCCW:tS.backCCW,R,O,D,i.id,L.vertexBuffer,L.indexBuffer,L.segments)}}let iT=new t.bo(1,0,0,1),iC=new t.bo(0,1,0,1),iE=new t.bo(0,0,1,1),iP=new t.bo(1,0,1,1),iI=new t.bo(0,1,1,1);function iM(e,t,r,i){iO(e,0,t+r/2,e.transform.width,r,i)}function ik(e,t,r,i){iO(e,t-r/2,0,r,e.transform.height,i)}function iO(e,t,r,i,n,o){let a=e.context,s=a.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,i*e.pixelRatio,n*e.pixelRatio),a.clear({color:o}),s.disable(s.SCISSOR_TEST)}function iD(e,t,r,i){let{isRenderingGlobe:n}=i,o=e.context,a=o.gl,s=e.transform,l=e.colorModeForRenderPass(),u=e.getDepthModeFor3D(),c=e.useProgram("terrain");for(let i of(o.bindFramebuffer.set(null),o.viewport.set([0,0,e.width,e.height]),r)){let r=t.getTerrainMesh(i.tileID),h=e.renderToTexture.getTexture(i),d=t.getTerrainData(i.tileID);o.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,h.texture);
966let p=t6(t.getMeshFrameDelta(s.zoom),s.calculateFogMatrix(i.tileID.toUnwrapped()),e.style.sky,s.pitch,n),f=s.getProjectionData({overscaledTileID:i.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});c.draw(o,a.TRIANGLES,u,tC.disabled,l,tS.backCCW,p,d,f,"terrain",r.vertexBuffer,r.indexBuffer,r.segments)}}function iR(e,r){if(!r.mesh){let i=new t.aU;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);let n=new t.aW;n.emplaceBack(0,1,2),n.emplaceBack(0,2,3),r.mesh=new ta(e.createVertexBuffer(i,ts.members),e.createIndexBuffer(n),t.aV.simpleSegment(0,0,i.length,n.length))}return r.mesh}let iL={symbol:function(e,r,i,n,o,a){if("translucent"!==e.renderPass)return;let{isRenderingToTexture:s}=a,l=tC.disabled,u=e.colorModeForRenderPass();(i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(e,r,i,n,o,a,s,l,u){var c;let h=r.transform,d=r.style.map.terrain,p="map"===o,f="map"===a;for(let o of e){let e=n.getTile(o),a=e.getBucket(i);if(!(null==(c=null==a?void 0:a.text)?void 0:c.segments.get().length))continue;let m=t.aw(a.textSizeData,h.zoom),g=t.aK(e,1,r.transform.zoom),y=eD(p,r.transform,g),v="none"!==i.layout.get("icon-text-fit")&&a.hasIconData();if(m){let r=Math.pow(2,h.zoom-e.tileID.overscaledZ),i=d?(e,t)=>d.getElevation(o,e,t):null;!function(e,r,i,n,o,a,s,l,u,c,h,d){let p=e.text.placedSymbolArray,f=e.text.dynamicLayoutVertexArray,m=e.icon.dynamicLayoutVertexArray,g={};f.clear();for(let m=0;m<p.length;m++){let y=p.get(m),v=y.hidden||!y.crossTileID||e.allowVerticalPlacement&&!y.placedOrientation?null:n[y.crossTileID];if(v){let n=new t.P(y.anchorX,y.anchorY),p={getElevation:d,width:o.width,height:o.height,pitchedLabelPlaneMatrix:a,pitchWithMap:i,transform:o,tileAnchorPoint:n,translation:c,unwrappedTileID:h},m=i?eU(n.x,n.y,p):eG(n.x,n.y,p),b=.5+o.cameraToCenterDistance/m.signedDistanceFromCamera*.5,_=t.ay(e.textSizeData,l,y)*b/t.aJ;i&&(_*=e.tilePixelRatio/s);let{width:x,height:A,anchor:w,textOffset:S,textBoxScale:T}=v,C=function(e,r,i,n,o,a){let{horizontalAlign:s,verticalAlign:l}=t.aP(e);return new t.P((-(s-.5)*r/o+n[0])*a,(-(l-.5)*i/o+n[1])*a)}(w,x,A,S,T,_),E=o.getPitchedTextCorrection(n.x+c[0],n.y+c[1],h),P=function(e,r,i,n,o,a){let s=r.tileAnchorPoint.add(new t.P(r.translation[0],r.translation[1]));if(r.pitchWithMap){let e=n.mult(a);i||(e=e.rotate(-o));let t=s.add(e);return eL(t.x,t.y,r.pitchedLabelPlaneMatrix,r.getElevation).point}if(i){let t=eG(r.tileAnchorPoint.x+1,r.tileAnchorPoint.y,r).point.sub(e),i=Math.atan(t.y/t.x)+(t.x<0?Math.PI:0);return e.add(n.rotate(i))}return e.add(n)}(m.point,p,r,C,-o.bearingInRadians,E),I=e.allowVerticalPlacement&&y.placedOrientation===t.ax.vertical?Math.PI/2:0;for(let e=0;e<y.numGlyphs;e++)t.aD(f,P,I);u&&y.associatedIconIndex>=0&&(g[y.associatedIconIndex]={shiftedAnchor:P,angle:I})}else eZ(y.numGlyphs,f)}if(u){m.clear();let r=e.icon.placedSymbolArray;for(let e=0;e<r.length;e++){let i=r.get(e);if(i.hidden)eZ(i.numGlyphs,m);else{let r=g[e];if(r)for(let e=0;e<i.numGlyphs;e++)t.aD(m,r.shiftedAnchor,r.angle);else eZ(i.numGlyphs,m)}}e.icon.dynamicLayoutVertexBuffer.updateData(m)}e.text.dynamicLayoutVertexBuffer.updateData(f)}(a,p,f,u,h,y,r,m,v,t.aL(h,e,s,l),o.toUnwrapped(),i)}}}(n,e,i,r,i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),o),0!==i.paint.get("icon-opacity").constantOr(1)&&ih(e,r,i,n,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),l,u,s),0!==i.paint.get("text-opacity").constantOr(1)&&ih(e,r,i,n,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),l,u,s),r.map.showCollisionBoxes&&(iu(e,r,i,n,!0),iu(e,r,i,n,!1))},circle:function(e,r,i,n,o){var a;if("translucent"!==e.renderPass)return;let{isRenderingToTexture:s}=o,l=i.paint.get("circle-opacity"),u=i.paint.get("circle-stroke-width"),c=i.paint.get("circle-stroke-opacity"),h=!i.layout.get("
966circle-sort-key").isConstant();if(0===l.constantOr(1)&&(0===u.constantOr(1)||0===c.constantOr(1)))return;let d=e.context,p=d.gl,f=e.transform,m=e.getDepthModeForSublayer(0,tT.ReadOnly),g=tC.disabled,y=e.colorModeForRenderPass(),v=[],b=f.getCircleRadiusCorrection();for(let o of n){let n=r.getTile(o),l=n.getBucket(i);if(!l)continue;let u=i.paint.get("circle-translate"),c=i.paint.get("circle-translate-anchor"),d=t.aL(f,n,u,c),p=l.programConfigurations.get(i.id),m=e.useProgram("circle",p),g=l.layoutVertexBuffer,y=l.indexBuffer,_=null==(a=e.style.map.terrain)?void 0:a.getTerrainData(o),x={programConfiguration:p,program:m,layoutVertexBuffer:g,indexBuffer:y,uniformValues:ra(e,n,i,d,b),terrainData:_,projectionData:f.getProjectionData({overscaledTileID:o,applyGlobeMatrix:!s,applyTerrainMatrix:!0})};if(h)for(let e of l.segments.get())v.push({segments:new t.aV([e]),sortKey:e.sortKey,state:x});else v.push({segments:l.segments,sortKey:0,state:x})}for(let t of(h&&v.sort((e,t)=>e.sortKey-t.sortKey),v)){let{programConfiguration:r,program:n,layoutVertexBuffer:o,indexBuffer:a,uniformValues:s,terrainData:l,projectionData:u}=t.state;n.draw(d,p.TRIANGLES,m,g,y,tS.backCCW,s,l,u,i.id,o,a,t.segments,i.paint,e.transform.zoom,r)}},heatmap:function(e,r,i,n,o){if(0===i.paint.get("heatmap-opacity"))return;let a=e.context,{isRenderingToTexture:s,isRenderingGlobe:l}=o;if(e.style.map.terrain){for(let o of n){let n=r.getTile(o);r.hasRenderableParent(o)||("offscreen"===e.renderPass?function(e,r,i,n,o){let a=e.context,s=a.gl,l=tC.disabled,u=new tw([s.ONE,s.ONE],t.bo.transparent,[!0,!0,!0,!0]),c=r.getBucket(i);if(!c)return;let h=n.key,d=i.heatmapFbos.get(h);d||(d=ip(a,r.tileSize,r.tileSize),i.heatmapFbos.set(h,d)),a.bindFramebuffer.set(d.framebuffer),a.viewport.set([0,0,r.tileSize,r.tileSize]),a.clear({color:t.bo.transparent});let p=c.programConfigurations.get(i.id),f=e.useProgram("heatmap",p,!o),m=e.transform.getProjectionData({overscaledTileID:r.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),g=e.style.map.terrain.getTerrainData(n);f.draw(a,s.TRIANGLES,tT.disabled,l,u,tS.disabled,rc(r,e.transform.zoom,i.paint.get("heatmap-intensity"),1),g,m,i.id,c.layoutVertexBuffer,c.indexBuffer,c.segments,i.paint,e.transform.zoom,p)}(e,n,i,o,l):"translucent"===e.renderPass&&function(e,t,r,i,n){let o=e.context,a=o.gl,s=e.transform;o.setColorMode(e.colorModeForRenderPass());let l=im(o,t),u=r.key,c=t.heatmapFbos.get(u);if(!c)return;o.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,c.colorAttachment.get()),o.activeTexture.set(a.TEXTURE1),l.bind(a.LINEAR,a.CLAMP_TO_EDGE);let h=s.getProjectionData({overscaledTileID:r,applyTerrainMatrix:n,applyGlobeMatrix:!i});e.useProgram("heatmapTexture").draw(o,a.TRIANGLES,tT.disabled,tC.disabled,e.colorModeForRenderPass(),tS.disabled,rh(e,t,0,1),null,h,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,s.zoom),c.destroy(),t.heatmapFbos.delete(u)}(e,i,o,s,l))}a.viewport.set([0,0,e.width,e.height])}else{let o,a,s;"offscreen"===e.renderPass?function(e,r,i,n){let o,a,s=e.context,l=s.gl,u=e.transform,c=tC.disabled,h=new tw([l.ONE,l.ONE],t.bo.transparent,[!0,!0,!0,!0]);for(let d of(o=s.gl,s.activeTexture.set(o.TEXTURE1),s.viewport.set([0,0,e.width/4,e.height/4]),(a=i.heatmapFbos.get(t.cd))?(o.bindTexture(o.TEXTURE_2D,a.colorAttachment.get()),s.bindFramebuffer.set(a.framebuffer)):(a=ip(s,e.width/4,e.height/4),i.heatmapFbos.set(t.cd,a)),s.clear({color:t.bo.transparent}),n)){if(r.hasRenderableParent(d))continue;let t=r.getTile(d),n=t.getBucket(i);if(!n)continue;let o=n.programConfigurations.get(i.id),a=e.useProgram("heatmap",o),p=u.getProjectionData({overscaledTileID:d,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),f=u.getCircleRadiusCorrection();a.draw(s,l.TRIANGLES,tT.disabled,c,h,tS.backCCW,rc(t,u.zoom,i.paint.get("heatmap-intensity"),f),null,p,i.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,i.paint,u.zoom,o)}s.viewport.set([0,0,e.width,e.height])}(e,r,i,n):"translucent"===e.renderPass&&(a=(o=e.context).gl,o.setColorMode(e.colorModeForRenderPass()),(s=i.heatmapFbos.get(t.cd))&&(o.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,s.colorAttachment.get()),o.activeTexture.set(a.TEXTURE1),im(o,i).bind(a.LINEAR,a.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(o,a.TRIANGLES,tT.disabled,tC.disabled,e.colorModeForRenderPass(),tS.disabled,rh(e,i,0,1),null,null,i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom)))}},line:function(e,t,r,i,n){var o;let a;if("translucent"!==e.renderPass)return;let{isRenderingToTexture:s}=n,l=r.paint.get("line-opacity"),u=r.paint.get("line-width");if(0===l.constantOr(1)||0===u.constantOr(1))return;let c=e.getDepthModeForSublayer(0,tT.ReadOnly),h=e.colorModeForRenderPass(),d=r.paint.get("line-dasharray"),p=d.constantOr(1),f=r.paint.get("line-pattern"),m=f.constantOr(1),g=r.paint.get("line-gradient"),y=r.getCrossfadeParameters();a=m?"linePattern":p&&g?"lineGradientSDF":p?"lineSDF":g?"lineGradient":"line";let v=e.context,b=v.gl,_=e.transform,x=!0;for(let n of i){let i,l=t.getTile(n);if(m&&!l.patternsLoaded())continue;let u=l.getBucket(r);
966if(!u)continue;let A=u.programConfigurations.get(r.id),w=e.context.program.get(),S=e.useProgram(a,A),T=x||S.program!==w,C=null==(o=e.style.map.terrain)?void 0:o.getTerrainData(n),E=f.constantOr(null),P=null==d?void 0:d.constantOr(null);if(E&&l.imageAtlas){let e=l.imageAtlas,t=e.patternPositions[E.to.toString()],r=e.patternPositions[E.from.toString()];t&&r&&A.setConstantPatternPositions(t,r)}else if(P){let t="round"===r.layout.get("line-cap").constantOr(null),i=e.lineAtlas.getDash(P.to,t),n=e.lineAtlas.getDash(P.from,t);A.setConstantDashPositions(i,n)}let I=_.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!s,applyTerrainMatrix:!0}),M=_.getPixelScale();m?(i=ry(e,l,r,M,y),v.activeTexture.set(b.TEXTURE0),l.imageAtlasTexture.bind(b.LINEAR,b.CLAMP_TO_EDGE),A.updatePaintBuffers(y)):p&&g?(i=rb(e,l,r,M,y,u.lineClipsArray.length),function(e,t,r,i,n,o,a,s,l){let u=o.gradients[n.id],c=u.texture;n.gradientVersion!==u.version&&(c=ig(e,t,r,i,n,o,a,u)),r.activeTexture.set(i.TEXTURE0),c.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE),r.activeTexture.set(i.TEXTURE1),e.lineAtlas.bind(r),s.updatePaintBuffers(l)}(e,t,v,b,r,u,n,A,y)):p?(i=rv(e,l,r,M,y),(T||e.lineAtlas.dirty)&&(v.activeTexture.set(b.TEXTURE0),e.lineAtlas.bind(v)),A.updatePaintBuffers(y)):g?(i=rg(e,l,r,M,u.lineClipsArray.length),function(e,t,r,i,n,o,a){let s=o.gradients[n.id],l=s.texture;n.gradientVersion!==s.version&&(l=ig(e,t,r,i,n,o,a,s)),r.activeTexture.set(i.TEXTURE0),l.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE)}(e,t,v,b,r,u,n)):i=rm(e,l,r,M);let k=e.stencilModeForClipping(n);S.draw(v,b.TRIANGLES,c,k,h,tS.disabled,i,C,I,r.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,r.paint,e.transform.zoom,A,u.layoutVertexBuffer2),x=!1}},fill:function(e,r,i,n,o){let a=i.paint.get("fill-color"),s=i.paint.get("fill-opacity");if(0===s.constantOr(1))return;let{isRenderingToTexture:l}=o,u=e.colorModeForRenderPass(),c=i.paint.get("fill-pattern"),h=e.opaquePassEnabledForLayer()&&!c.constantOr(1)&&1===a.constantOr(t.bo.transparent).a&&1===s.constantOr(0)?"opaque":"translucent";if(e.renderPass===h){let t=e.getDepthModeForSublayer(1,"opaque"===e.renderPass?tT.ReadWrite:tT.ReadOnly);iv(e,r,i,n,t,u,!1,l)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){let t=e.getDepthModeForSublayer(2*!!i.getPaintProperty("fill-outline-color"),tT.ReadOnly);iv(e,r,i,n,t,u,!0,l)}},fillExtrusion:function(e,t,r,i,n){let o=r.paint.get("fill-extrusion-opacity");if(0===o)return;let{isRenderingToTexture:a}=n;if("translucent"===e.renderPass){let n=new tT(e.context.gl.LEQUAL,tT.ReadWrite,e.depthRangeFor3D);if(1!==o||r.paint.get("fill-extrusion-pattern").constantOr(1))ib(e,t,r,i,n,tC.disabled,tw.disabled,a),ib(e,t,r,i,n,e.stencilModeFor3D(),e.colorModeForRenderPass(),a);else{let o=e.colorModeForRenderPass();ib(e,t,r,i,n,tC.disabled,o,a)}}},hillshade:function(e,r,i,n,o){if("offscreen"!==e.renderPass&&"translucent"!==e.renderPass)return;let{isRenderingToTexture:a}=o,s=e.context,l=e.style.projection.useSubdivision,u=e.getDepthModeForSublayer(0,tT.ReadOnly),c=e.colorModeForRenderPass();if("offscreen"===e.renderPass)!function(e,r,i,n,o,a,s){let l=e.context,u=l.gl,c="nearest"===n.paint.get("resampling")?u.NEAREST:u.LINEAR;for(let h of i){let i=r.getTile(h),d=i.dem;if(!(null==d?void 0:d.data)||!i.needsHillshadePrepare)continue;
966let p=d.dim,f=d.stride,m=d.getPixels();if(l.activeTexture.set(u.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture||(i.demTexture=e.getTileTexture(f)),i.demTexture){let e=i.demTexture;e.update(m,{premultiply:!1}),e.bind(u.NEAREST,u.CLAMP_TO_EDGE)}else i.demTexture=new t.T(l,m,u.RGBA,{premultiply:!1}),i.demTexture.bind(u.NEAREST,u.CLAMP_TO_EDGE);l.activeTexture.set(u.TEXTURE0);let g=i.fbo;if(!g){let e=new t.T(l,{width:p,height:p,data:null},u.RGBA);e.bind(c,u.CLAMP_TO_EDGE),(g=i.fbo=l.createFramebuffer(p,p,!0,!1)).colorAttachment.set(e.texture)}l.bindFramebuffer.set(g.framebuffer),l.viewport.set([0,0,p,p]),e.useProgram("hillshadePrepare").draw(l,u.TRIANGLES,o,a,s,tS.disabled,rp(i.tileID,d),null,null,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),i.needsHillshadePrepare=!1}}(e,r,n,i,u,tC.disabled,c),s.viewport.set([0,0,e.width,e.height]);else if("translucent"===e.renderPass)if(l){let[t,o,s]=e.stencilConfigForOverlapTwoPass(n);i_(e,r,i,s,t,u,c,!1,a),i_(e,r,i,s,o,u,c,!0,a)}else{let[t,o]=e.getStencilConfigForOverlapAndUpdateStencilID(n);i_(e,r,i,o,t,u,c,!1,a)}},colorRelief:function(e,t,r,i,n){if("translucent"!==e.renderPass||!i.length)return;let{isRenderingToTexture:o}=n,a=e.style.projection.useSubdivision,s=e.getDepthModeForSublayer(0,tT.ReadOnly),l=e.colorModeForRenderPass();if(a){let[n,a,u]=e.stencilConfigForOverlapTwoPass(i);iA(e,t,r,u,n,s,l,!1,o),iA(e,t,r,u,a,s,l,!0,o)}else{let[n,a]=e.getStencilConfigForOverlapAndUpdateStencilID(i);iA(e,t,r,a,n,s,l,!1,o)}},raster:function(e,t,r,i,n){if("translucent"!==e.renderPass||0===r.paint.get("raster-opacity")||!i.length)return;let{isRenderingToTexture:o}=n,a=t.getSource(),s=e.style.projection.useSubdivision;if(a instanceof et)iS(e,t,r,i,null,!1,!1,a.tileCoords,a.flippedWindingOrder,o);else if(s){let[n,a,s]=e.stencilConfigForOverlapTwoPass(i);iS(e,t,r,s,n,!1,!0,iw,!1,o),iS(e,t,r,s,a,!0,!0,iw,!1,o)}else{let[n,a]=e.getStencilConfigForOverlapAndUpdateStencilID(i);iS(e,t,r,a,n,!1,!0,iw,!1,o)}},background:function(e,t,r,i,n){var o;let a=r.paint.get("background-color"),s=r.paint.get("background-opacity");if(0===s)return;let{isRenderingToTexture:l}=n,u=e.context,c=u.gl,h=e.style.projection,d=e.transform,p=d.tileSize,f=r.paint.get("background-pattern");if(e.isPatternMissing(f))return;let m=!f&&1===a.a&&1===s&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==m)return;let g=tC.disabled,y=e.getDepthModeForSublayer(0,"opaque"===m?tT.ReadWrite:tT.ReadOnly),v=e.colorModeForRenderPass(),b=e.useProgram(f?"backgroundPattern":"background"),_=i||eA(d,{tileSize:p,terrain:e.style.map.terrain});f&&(u.activeTexture.set(c.TEXTURE0),e.imageManager.bind(e.context));let x=r.getCrossfadeParameters();for(let t of _){let i=d.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),n=f?rE(s,e,f,{tileID:t,tileSize:p},x):rC(s,a),m=null==(o=e.style.map.terrain)?void 0:o.getTerrainData(t),_=h.getMeshFromTileID(u,t.canonical,!1,!0,"raster");b.draw(u,c.TRIANGLES,y,g,v,tS.backCCW,n,m,i,r.id,_.vertexBuffer,_.indexBuffer,_.segments)}},sky:function(e,t){var r,i;let n,o,a,s,l=e.context,u=l.gl,c=(r=e.style.map.transform,i=e.pixelRatio,n=Math.cos(r.rollInRadians),o=Math.sin(r.rollInRadians),a=ef(r),s=r.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition,{u_sky_color:t.properties.get("sky-color"),u_horizon_color:t.properties.get("horizon-color"),u_horizon:[(r.width/2-a*o)*i,(r.height/2+a*n)*i],u_horizon_normal:[-o,n],u_sky_horizon_blend:t.properties.get("sky-horizon-blend")*r.height/2*i,u_sky_blend:s}),h=new tT(u.LEQUAL,tT.ReadWrite,[0,1]),d=tC.disabled,p=e.colorModeForRenderPass(),f=e.useProgram("sky"),m=iR(l,t);f.draw(l,u.TRIANGLES,h,d,p,tS.disabled,c,null,void 0,"sky",m.vertexBuffer,m.indexBuffer,m.segments)},atmosphere:function(e,r,i){var n;let o,a,s,l=e.context,u=l.gl,c=e.useProgram("atmosphere"),h=new tT(u.LEQUAL,tT.ReadOnly,[0,1]),d=e.transform,p=(n=e.transform,a=[-(o=i.properties.get("position")).x,-o.y,-o.z],s=t.ap(new Float64Array(16)),"map"===i.properties.get("anchor")&&(t.be(s,s,n.rollInRadians),t.bf(s,s,-n.pitchInRadians),t.be(s,s,n.bearingInRadians),t.bf(s,s,n.center.lat*Math.PI/180),t.bI(s,s,-n.center.lng*Math.PI/180)
966),t.cg(a,a,s),a),f=d.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),m=r.properties.get("atmosphere-blend")*f.projectionTransition;if(0===m)return;let g=tj(d.worldSize,d.center.lat),y=d.inverseProjectionMatrix,v=new Float64Array(4);v[3]=1,t.aE(v,v,d.modelViewProjectionMatrix),v[0]/=v[3],v[1]/=v[3],v[2]/=v[3],v[3]=1,t.aE(v,v,y),v[0]/=v[3],v[1]/=v[3],v[2]/=v[3],v[3]=1;let b={u_sun_pos:p,u_atmosphere_blend:m,u_globe_position:[v[0],v[1],v[2]],u_globe_radius:g,u_inv_proj_matrix:y},_=iR(l,r);c.draw(l,u.TRIANGLES,h,tC.disabled,tw.alphaBlended,tS.disabled,b,null,null,"atmosphere",_.vertexBuffer,_.indexBuffer,_.segments)},custom:function(e,t,r,i){let{isRenderingGlobe:n}=i,o=e.context,a=r.implementation,s=e.style.projection,l=e.transform,u=l.getProjectionDataForCustomLayer(n),c={farZ:l.farZ,nearZ:l.nearZ,fov:l.fov*Math.PI/180,modelViewProjectionMatrix:l.modelViewProjectionMatrix,projectionMatrix:l.projectionMatrix,shaderData:{variantName:s.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
967uniform mat4 u_projection_matrix;
968${s.shaderPreludeCode.vertexSource}`,define:s.shaderDefine},defaultProjectionData:u},h=a.renderingMode?a.renderingMode:"2d";if("offscreen"===e.renderPass){let t=a.prerender;t&&(e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),t.call(a,o.gl,c),o.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),o.setStencilMode(tC.disabled);let t="3d"===h?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,tT.ReadOnly);o.setDepthMode(t),a.render(o.gl,c),o.setDirty(),e.setBaseState(),o.bindFramebuffer.set(null)}},debug:function(e,r,i){for(let n of i)!function(e,r,i){var n,o;let a,s,l,u=e.context,c=u.gl,h=e.useProgram("debug"),d=tT.disabled,p=tC.disabled,f=e.colorModeForRenderPass(),m="$debug",g=null==(n=e.style.map.terrain)?void 0:n.getTerrainData(i);u.activeTexture.set(c.TEXTURE0);let y=r.getTileByID(i.key).latestRawTileData,v=Math.floor(((null==y?void 0:y.byteLength)||0)/1024),b=512/Math.min(r.getTile(i).tileSize,512)*(i.overscaledZ/e.transform.zoom)*.5,_=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(_+=` => ${i.overscaledZ}`),o=`${_} ${v}kB`,e.initDebugOverlayCanvas(),a=e.debugOverlayCanvas,s=e.context.gl,(l=e.debugOverlayCanvas.getContext("2d")).clearRect(0,0,a.width,a.height),l.shadowColor="white",l.shadowBlur=2,l.lineWidth=1.5,l.strokeStyle="white",l.textBaseline="top",l.font="bold 36px Open Sans, sans-serif",l.fillText(o,5,5),l.strokeText(o,5,5),e.debugOverlayTexture.update(a),e.debugOverlayTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE);let x=e.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});h.draw(u,c.TRIANGLES,d,p,tw.alphaBlended,tS.disabled,ru(t.bo.transparent,b),null,x,m,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),h.draw(u,c.LINE_STRIP,d,p,f,tS.disabled,ru(t.bo.red),g,x,m,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}(e,r,n)},debugPadding:function(e){var t,r;let i=e.transform.padding;iM(e,e.transform.height-(i.top||0),3,iT),iM(e,i.bottom||0,3,iC),ik(e,i.left||0,3,iE),ik(e,e.transform.width-(i.right||0),3,iP);let n=e.transform.centerPoint;t=n.x,r=e.transform.height-n.y,iO(e,t-1,r-10,2,20,iI),iO(e,t-10,r-1,20,2,iI)},terrainDepth:function(e,r){let i=e.context,n=i.gl,o=e.transform,a=tw.unblended,s=new tT(n.LEQUAL,tT.ReadWrite,[0,1]),l=r.tileManager.getRenderableTiles(),u=e.useProgram("terrainDepth");for(let c of(i.bindFramebuffer.set(r.getFramebuffer("depth").framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:t.bo.transparent,depth:1}),l)){let e=r.getTerrainMesh(c.tileID),t=r.getTerrainData(c.tileID),l=o.getProjectionData({overscaledTileID:c.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),h={u_ele_delta:r.getMeshFrameDelta(o.zoom)};u.draw(i,n.TRIANGLES,s,tC.disabled,a,tS.backCCW,h,t,l,"terrain",e.vertexBuffer,e.indexBuffer,e.segments)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])},terrainCoords:function(e,r){let i=e.context,n=i.gl,o=e.transform,a=tw.unblended,s=new tT(n.LEQUAL,tT.ReadWrite,[0,1]),l=r.getCoordsTexture(),u=r.tileManager.getRenderableTiles(),c=e.useProgram("terrainCoords");for(let h of(i.bindFramebuffer.set(r.getFramebuffer("coords").framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:t.bo.transparent,depth:1}),r.coordsIndex=[],u)){let e=r.getTerrainMesh(h.tileID),t=r.getTerrainData(h.tileID);i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,l.texture);let u={u_terrain_coords_id:(255-r.coordsIndex.length)/255,u_texture:0,u_ele_delta:r.getMeshFrameDelta(o.zoom)},d=o.getProjectionData({overscaledTileID:h.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});c.draw(i,n.TRIANGLES,s,tC.disabled,a,tS.backCCW,u,t,d,"terrain",e.vertexBuffer,e.indexBuffer,e.segments),r.coordsIndex.push(h.tileID.key)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])}};class iB{constructor(e,r){this.drawFunctions=iL,this.context=new il(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:t.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=eP.maxOverzooming+eP.maxUnderzooming+1,this.depthEpsilon=1/65536,this.crossTileSymbolIndex=new tr}resize(e,t,r){if(this.width=Math.floor(e*r),this.height=Math.floor(t*r),this.pixelRatio=r,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,r=new t.aU;r.emplaceBack(0,0),r.emplaceBack(t.a6,0),r.emplaceBack(0,t.a6),r.emplaceBack(t.a6,t.a6),this.tileExtentBuffer=e.createVertexBuffer(r,ts.members),this.tileExtentSegments=t.aV.simpleSegment(0,0,4,2);let i=new t.aU;i.emplaceBack(0,0),i.emplaceBack(t.a6,0),i.emplaceBack(0,t.a6),i.emplaceBack(t.a6,t.a6),this.debugBuffer=e.createVertexBuffer(i,ts.members),this.debugSegments=t.aV.simpleSegment(0,0,4,5);let n=new t.ch;n.emplaceBack(0,0,0,0),n.emplaceBack(t.a6,0,t.a6,0),n.emplaceBack(0,t.a6,0,t.a6),n.emplaceBack(t.a6,t.a6,t.a6,t.a6),this.rasterBoundsBuffer=e.createVertexBuffer(n,t5.members),this.rasterBoundsSegments=t.aV.simpleSegment(0,0,4,2);let o=new t.aU;o.emplaceBack(0,0),o.emplaceBack(t.a6,0),o.emplaceBack(0,t.a6),o.emplaceBack(t.a6,t.a6),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(o,ts.members),this.rasterBoundsSegmentsPosOnly=t.aV.simpleSegment(0,0,4,5);let a=new t.aU;
968a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,ts.members),this.viewportSegments=t.aV.simpleSegment(0,0,4,2);let s=new t.ci;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(s);let l=new t.aW;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(l);let u=this.context.gl;this.stencilClearMode=new tC({func:u.ALWAYS,mask:0},0,255,u.ZERO,u.ZERO,u.ZERO),this.tileExtentMesh=new ta(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let i=t.O();t.c7(i,0,this.width,this.height,0,0,1),t.S(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,tT.disabled,this.stencilClearMode,tw.disabled,tS.disabled,null,null,{mainMatrix:i,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i},"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t,r){if(this.currentStencilSource===e.source||!e.isTileClipped()||!(null==t?void 0:t.length))return;this.currentStencilSource=e.source,this.nextStencilID+t.length>256&&this.clearStencil();let i=this.context;i.setColorMode(tw.disabled),i.setDepthMode(tT.disabled);let n={};for(let e of t)n[e.key]=this.nextStencilID++;this._renderTileMasks(n,t,r,!0),this._renderTileMasks(n,t,r,!1),this._tileClippingMaskIDs=n}_renderTileMasks(e,t,r,i){var n;let o=this.context,a=o.gl,s=this.style.projection,l=this.transform,u=this.useProgram("clippingMask");for(let c of t){let t=e[c.key],h=null==(n=this.style.map.terrain)?void 0:n.getTerrainData(c),d=s.getMeshFromTileID(this.context,c.canonical,i,!0,"stencil"),p=l.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!r,applyTerrainMatrix:!0});u.draw(o,a.TRIANGLES,tT.disabled,new tC({func:a.ALWAYS,mask:0},t,255,a.KEEP,a.KEEP,a.REPLACE),tw.disabled,r?tS.disabled:tS.backCCW,null,h,p,"$clipping",d.vertexBuffer,d.indexBuffer,d.segments)}}_renderTilesDepthBuffer(){var e;let t=this.context,r=t.gl,i=this.style.projection,n=this.transform,o=this.useProgram("depth"),a=this.getDepthModeFor3D();for(let s of eA(n,{tileSize:n.tileSize})){let l=null==(e=this.style.map.terrain)?void 0:e.getTerrainData(s),u=i.getMeshFromTileID(this.context,s.canonical,!0,!0,"raster"),c=n.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!0,applyTerrainMatrix:!0});o.draw(t,r.TRIANGLES,a,tC.disabled,tw.disabled,tS.backCCW,null,l,c,"$clipping",u.vertexBuffer,u.indexBuffer,u.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new tC({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new tC({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let t=this.context.gl,r=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),i=r[r.length-1].overscaledZ,n=r[0].overscaledZ-i+1;if(n>1){this.currentStencilSource=void 0,this.nextStencilID+n>256&&this.clearStencil();let e={};for(let r=0;r<n;r++)e[r+i]=new tC({func:t.GEQUAL,mask:255},r+this.nextStencilID,255,t.KEEP,t.KEEP,t.REPLACE);return this.nextStencilID+=n,[e,r]}return[{[i]:tC.disabled},r]}stencilConfigForOverlapTwoPass(e){let t=this.context.gl,r=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),i=r[r.length-1].overscaledZ,n=r[0].overscaledZ-i+1;if(this.clearStencil(),n>1){let e={},o={};for(let r=0;r<n;r++)e[r+i]=new tC({func:t.GREATER,mask:255},n+1+r,255,t.KEEP,t.KEEP,t.REPLACE),o[r+i]=new tC({func:t.GREATER,mask:255},1+r,255,t.KEEP,t.KEEP,t.REPLACE);return this.nextStencilID=2*n+1,[e,o,r]}return this.nextStencilID=3,[{[i]:new tC({func:t.GREATER,mask:255},2,255,t.KEEP,t.KEEP,t.REPLACE)},{[i]:new tC({func:t.GREATER,mask:255},1,255,t.KEEP,t.KEEP,t.REPLACE)},r]}colorModeForRenderPass(){let e=this.context.gl;if(this._showOverdrawInspector){let r=1/8;return new tw([e.CONSTANT_COLOR,e.ONE],new t.bo(r,r,r,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?tw.unblended:tw.alphaBlended}getDepthModeForSublayer(e,t,r){if(!this.opaquePassEnabledForLayer())return tT.disabled;let i=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new tT(r||this.context.gl.LEQUAL,t,[i,i])}getDepthModeFor3D(){return new tT(this.context.gl.LEQUAL,tT.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,r){var i,n,o;this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(_()),this.imageManager.beginFrame();let a=this.style._order,s=this.style.tileManagers,l={},u={},c={},h={isRenderingToTexture:!1,isRenderingGlobe:(null==(i=e.projection)?void 0:i.transitionState)>0};for(let e in s){let t=s[e];t.used&&t.prepare(this.context),l[e]=t.getVisibleCoordinates(!1),u[e]=l[e].slice().reverse(),c[e]=t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let e=0;e<a.length;e++)if(this.style._layers[a[e]].is3D()){this.opaquePassCutoff=e;break}for(let e of(this.maybeDrawDepth(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen",a)){let t=this.style._layers[e];if(!t.hasOffscreenPass()||t.isHidden(this.transform.zoom))continue;let r=u[t.source];("custom"===t.type||r.length)&&this.renderLayer(this,s[t.source],t,r,h)}if(null==(n=this.style.projection)||n.updateGPUdependent({context:this.context,useProgram:e=>this.useProgram(e)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.bo.black:t.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=a.length-1;this.currentLayer>=0;this.currentLayer--){let e=this.style._layers[a[this.currentLayer]],t=s[e.source],r=l[e.source];this._renderTileClippingMasks(e,r,!1),this.renderLayer(this,t,e,r,h)}this.renderPass="translucent";let d=!1;for(this.currentLayer=0;this.currentLayer<a.length;this.currentLayer++){let e=this.style._layers[a[this.currentLayer]],t=s[e.source];if(null==(o=this.renderToTexture)?void 0:o.renderLayer(e,h))continue;this.opaquePassEnabledForLayer()||d||(d=!0,h.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());let r=("symbol"===e.type?c:u)[e.source];this._renderTileClippingMasks(e,l[e.source],!!this.renderToTexture),this.renderLayer(this,t,e,r,h)}if(h.isRenderingGlobe&&this.drawFunctions.atmosphere(this,this.style.sky,this.style.light),this.options.showTileBoundaries){let e=function(e,t){let r=null,i=Object.values(e._layers).flatMap(r=>r.source&&!r.isHidden(t)?[e.tileManagers[r.source]]:[]),n=i.filter(e=>"vector"===e.getSource().type),o=i.filter(e=>"vector"!==e.getSource().type),a=e=>{(!r||r.getSource().maxzoom<e.getSource().maxzoom)&&(r=e)};for(let e of n)a(e);if(!r)for(let e of o)a(e);return r}(this.style,this.transform.zoom);e&&this.drawFunctions.debug(this,e,e.getVisibleCoordinates())}this.options.showPadding&&this.drawFunctions.debugPadding(this),this.context.setDefault()}maybeDrawDepth(e){var r,i;if(!(null==(i=null==(r=this.style)?void 0:r.map)?void 0:i.terrain))return;let n=this.terrainFacilitator.matrix,o=this.transform.modelViewProjectionMatrix,a=this.terrainFacilitator.depthDirty;a||(a=e?!t.cj(n,o):!t.ck(n,o)),a||(a=this.style.map.terrain.tileManager.anyTilesAfterTime(this.terrainFacilitator.renderTime)),a&&(t.cl(n,o),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.depthDirty=!1,this.terrainFacilitator.coordsDirty=!0,this.drawFunctions.terrainDepth(this,this.style.map.terrain))}maybeDrawCoords(){var e,t;(null==(t=null==(e=this.style)?void 0:e.map)?void 0:t.terrain)&&this.terrainFacilitator.coordsDirty&&(this.terrainFacilitator.coordsDirty=!1,this.drawFunctions.terrainCoords(this,this.style.map.terrain))}renderLayer(e,r,i,n,o){if(i.isHidden(this.transform.zoom)||"background"!==i.type&&"custom"!==i.t
968ype&&!(n||[]).length)return;this.id=i.id;let a=this.drawFunctions;t.aQ(i)?a.symbol(e,r,i,n,this.style.placement.variableOffsets,o):t.cm(i)?a.circle(e,r,i,n,o):t.cn(i)?a.heatmap(e,r,i,n,o):t.co(i)?a.line(e,r,i,n,o):t.cp(i)?a.fill(e,r,i,n,o):t.cq(i)?a.fillExtrusion(e,r,i,n,o):t.cr(i)?a.hillshade(e,r,i,n,o):t.cs(i)?a.colorRelief(e,r,i,n,o):t.bU(i)?a.raster(e,r,i,n,o):t.ct(i)?a.background(e,r,i,n,o):t.cu(i)&&a.custom(e,r,i,o)}saveTileTexture(e){let t=this._tileTextures[e.size[0]];t?t.length<iB.MAX_TEXTURE_POOL_SIZE_PER_BUCKET?t.push(e):e.destroy():this._tileTextures[e.size[0]]=[e]}getTileTexture(e){let t=this._tileTextures[e];return t&&t.length>0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r}useProgram(e,t,r=!1,i=[]){var n;this.cache||(this.cache={});let o=!!this.style.map.terrain,a=this.style.projection,s=r?tn.projectionMercator:a.shaderPreludeCode,l=r?tl:a.shaderDefine,u=e+(t?t.cacheKey:"")+`/${r?tu:a.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(o?"/terrain":"")+(i?`/${i.join("/")}`:"");return(n=this.cache)[u]||(n[u]=new t9(this.context,tn[e],t,rI[e],this._showOverdrawInspector,o,s,l,i)),this.cache[u]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var e,t;if(this._tileTextures){for(let e in this._tileTextures){let t=this._tileTextures[e];if(t)for(let e of t)e.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&(null==(e=this.tileExtentMesh.vertexBuffer)||e.destroy()),this.tileExtentMesh&&(null==(t=this.tileExtentMesh.indexBuffer)||t.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let e in this.cache){let t=this.cache[e];(null==t?void 0:t.program)&&this.context.gl.deleteProgram(t.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}function iF(e,t){let r,i=!1,n=null,o=()=>{n=null,i&&(e(...r),n=setTimeout(o,t),i=!1)};return(...e)=>(i=!0,r=e,n||o(),n)}iB.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class ij{constructor(e){this._getCurrentHash=()=>{let e=window.location.hash.replace("#","");if(this._hashName){let t;for(let r of e.split("&").map(e=>e.split("=")))r[0]===this._hashName&&(t=r);return(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(!this._isValidHash(e))return!1;let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getCurrentHash();if(0===e.length)return;let t=e.join("/"),r=t;r.split("&").length>0&&(r=r.split("&")[0]),this._hashName&&(r=`${this._hashName}=${t}`);let i=window.location.hash.replace(r,"");i.startsWith("#&")?i=i.slice(0,1)+i.slice(2):"#"===i&&(i="");let n=window.location.href.replace(/(#.+)?$/,i);n=n.replace("&&","&"),window.history.replaceState(window.history.state,null,n)},this._updateHash=iF(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.pow(10,Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10)),n=Math.round(t.lng*i)/i,o=Math.round(t.lat*i)/i,a=this._map.getBearing(),s=this._map.getPitch(),l="";if(l+=e?`/${n}/${o}/${r}`:`${r}/${o}/${n}`,(a||s)&&(l+="/"+Math.round(10*a)/10),s&&(l+=`/${Math.round(s)}`),this._hashName){let e=this._hashName,t=!1,r=window.location.hash.slice(1).split("&").map(r=>{let i=r.split("=")[0];return i===e?(t=!0,`${i}=${l}`):r}).filter(e=>e);return t||r.push(`${e}=${l}`),`#${r.join("&")}`}return`#${l}`}
968_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new t.W(+e[2],+e[1])}catch(e){return!1}let r=+e[0],i=+(e[3]||0),n=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&i>=-180&&i<=180&&n>=this._map.getMinPitch()&&n<=this._map.getMaxPitch()}}let iz={linearity:.3,easing:t.cv(0,0,.3,1)},iN=t.e({deceleration:2500,maxSpeed:1400},iz),iG=t.e({deceleration:20,maxSpeed:1400},iz),iV=t.e({deceleration:1e3,maxSpeed:360},iz),iU=t.e({deceleration:1e3,maxSpeed:90},iz),iH=t.e({deceleration:1e3,maxSpeed:360},iz);class iW{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:_(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=_();for(;e.length>0&&t-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let r={zoom:0,bearing:0,pitch:0,roll:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,r.roll+=e.rollDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);let i=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,n={};if(r.pan.mag()){let o=iZ(r.pan.mag(),i,t.e({},iN,e||{})),a=r.pan.mult(o.amount/r.pan.mag()),s=this._map.cameraHelper.handlePanInertia(a,this._map.transform);n.center=s.easingCenter,n.offset=s.easingOffset,iq(n,o)}if(r.zoom){let e=iZ(r.zoom,i,iG);n.zoom=t.cw(this._map.transform.zoom+e.amount,this._map.getZoomSnap(),e.amount),iq(n,e)}if(r.bearing){let e=iZ(r.bearing,i,iV);
968n.bearing=this._map.transform.bearing+t.al(e.amount,-179,179),iq(n,e)}if(r.pitch){let e=iZ(r.pitch,i,iU);n.pitch=this._map.transform.pitch+e.amount,iq(n,e)}if(r.roll){let e=iZ(r.roll,i,iH);n.roll=this._map.transform.roll+t.al(e.amount,-179,179),iq(n,e)}if(n.zoom||n.bearing){let e=void 0===r.pinchAround?r.around:r.pinchAround;n.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),t.e(n,{noMoveStart:!0})}}function iq(e,t){(!e.duration||e.duration<t.duration)&&(e.duration=t.duration,e.easing=t.easing)}function iZ(e,r,i){let{maxSpeed:n,linearity:o,deceleration:a}=i,s=t.al(e*o/(r/1e3),-n,n),l=Math.abs(s)/(a*o);return{easing:i.easing,duration:1e3*l,amount:l/2*s}}class i$ extends t.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,i,n={}){i=i instanceof MouseEvent?i:new MouseEvent(e,i);let o=x.mousePos(r.getCanvas(),i),a=r.unproject(o);super(e,t.e({point:o,lngLat:a,originalEvent:i},n)),this._defaultPrevented=!1,this.target=r}}class iK extends t.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,i){let n="touchend"===e?i.changedTouches:i.touches,o=x.touchPos(r.getCanvasContainer(),n),a=o.map(e=>r.unproject(e)),s=o.reduce((e,t,r,i)=>e.add(t.div(i.length)),new t.P(0,0));super(e,{points:o,point:s,lngLats:a,lngLat:r.unproject(s),originalEvent:i}),this._defaultPrevented=!1}}class iX extends t.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class iY{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new iX(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new i$(e.type,this._map,e))}mouseup(e){this._map.fire(new i$(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new i$(e.type,this._map,e))}dblclick(e){return this._firePreventable(new i$(e.type,this._map,e))}mouseover(e){this._map.fire(new i$(e.type,this._map,e))}mouseout(e){this._map.fire(new i$(e.type,this._map,e))}touchstart(e){return this._firePreventable(new iK(e.type,this._map,e))}touchmove(e){this._map.fire(new iK(e.type,this._map,e))}touchend(e){this._map.fire(new iK(e.type,this._map,e))}touchcancel(e){this._map.fire(new iK(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iQ{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new i$(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new i$("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new i$(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iJ{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this._map.terrain)}}class i0{constructor(e,t){this._map=e,this._tr=new iJ(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1,t.boxZoom&&"object"==typeof t.boxZoom&&(this._boxZoomEnd=t.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(x.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active||this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)<this._clickTolerance)return;let r=this._startPos;this._lastPos=t,this._box||(this._box=x.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));let i=Math.min(r.x,t.x),n=Math.max(r.x,t.x),o=Math.min(r.y,t.y),a=Math.max(r.y,t.y);this._box.style.transform=`translate(${i}px,${o}px)`,this._box.style.width=n-i+"px",this._box.style.height=a-o+"px"}mouseupWindow(e,r){if(!this._active||0!==e.button)return;let i=this._startPos;if(this.reset(),x.suppressClick(),i.x!==r.x||i.y!==r.y)return this._map.fire(new t.n("boxzoomend",{originalEvent:e})),this._boxZoomEnd?void this._boxZoomEnd(this._map,i,r,e):{cameraAnimation:e=>e.fitScreenCoordinates(i,r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}
968keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),x.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new t.n(e,{originalEvent:r}))}}function i1(e,t){if(e.length!==t.length)throw Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let r={};for(let i=0;i<e.length;i++)r[e[i].identifier]=t[i];return r}class i2{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,r,i){(this.centroid||i.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),i.length===this.numTouches&&(this.centroid=function(e){let r=new t.P(0,0);for(let t of e)r._add(t);return r.div(e.length)}(r),this.touches=i1(i,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let i=i1(r,t);for(let e in this.touches){let t=i[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class i3{constructor(e){this.singleTap=new i2(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let i=this.singleTap.touchend(e,t,r);if(i){let t=e.timeStamp-this.lastTime<500,r=!this.lastTap||30>this.lastTap.dist(i);if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}}}class i5{constructor(e){this._tr=new iJ(e),this._zoomIn=new i3({numTouches:1,numTaps:2}),this._zoomOut=new i3({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,r,i){let n=this._zoomIn.touchend(e,r,i),o=this._zoomOut.touchend(e,r,i),a=this._tr;return n?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:r=>r.easeTo({duration:300,zoom:t.cw(a.zoom+1,r.getZoomSnap()),around:a.unproject(n)},{originalEvent:e})}):o?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:r=>r.easeTo({duration:300,zoom:t.cw(a.zoom-1,r.getZoomSnap()),around:a.unproject(o)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class i4{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let i=Array.isArray(t)?t[0]:t;return!this._moved&&i.dist(r)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=i,this._move(r,i))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&x.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let i6={0:1,2:2};class i8{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){this._eventButton=e.button}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){let t;return t=i6[this._eventButton],void 0!==e.buttons&&(e.buttons&t)===t}isValidEndEvent(e){return e.button===this._eventButton}}class i7{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return 1===e.targetTouches.length}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}}class i9{constructor(e=new i8({checkCorrectEvent:()=>!0}),t=new i7){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,r){return e instanceof MouseEvent?t(e):"u">typeof TouchEvent&&e instanceof TouchEvent?r(e):void 0}startMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.startMove(e)},e=>{this.oneFingerTouchMoveStateManager.startMove(e)})}endMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.endMove(e)},e=>{this.oneFingerTouchMoveStateManager.endMove(e)})}isValidStartEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidStartEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidStartEvent(e))}isValidMoveEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidMoveEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(e))}isValidEndEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidEndEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidEndEvent(e))}}let ne=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}};
968class nt{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(!this._shouldBePrevented(r.length))return e.preventDefault(),this._calculateTransform(e,t,r);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,i){i.length>0&&(this._active=!0);let n=i1(i,r),o=new t.P(0,0),a=new t.P(0,0),s=0;for(let e in n){let t=n[e],r=this._touches[e];r&&(o._add(t),a._add(t.sub(r)),s++,n[e]=t)}if(this._touches=n,this._shouldBePrevented(s)||!a.mag())return;let l=a.div(s);return this._sum._add(l),this._sum.mag()<this._clickTolerance?void 0:{around:o.div(s),panDelta:l}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nr{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,t,r){this._firstTwoTouches||r.length<2||(this._firstTwoTouches=[r[0].identifier,r[1].identifier],this._start([t[0],t[1]]))}touchmove(e,t,r){if(!this._firstTwoTouches)return;e.preventDefault();let[i,n]=this._firstTwoTouches,o=ni(r,t,i),a=ni(r,t,n);if(!o||!a)return;let s=this._aroundCenter?null:o.add(a).div(2);return this._move([o,a],s,e)}touchend(e,t,r){if(!this._firstTwoTouches)return;let[i,n]=this._firstTwoTouches,o=ni(r,t,i),a=ni(r,t,n);o&&a||(this._active&&x.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function ni(e,t,r){for(let i=0;i<e.length;i++)if(e[i].identifier===r)return t[i]}function nn(e,t){return Math.log(e/t)/Math.LN2}class no extends nr{constructor(){super(),this._zoomRate=1,this._zoomThreshold=.1}setZoomRate(e){this._zoomRate=null!=e?e:1}setZoomThreshold(e){this._zoomThreshold=null!=e?e:.1}reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,t){let r=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(nn(this._distance,this._startDistance))<this._zoomThreshold))return this._active=!0,{zoomDelta:nn(this._distance,r)*this._zoomRate,pinchAround:t}}}function na(e,t){return 180*e.angleWith(t)/Math.PI}class ns extends nr{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,t,r){let i=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:na(this._vector,i),pinchAround:t}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());let t=25/(Math.PI*this._minDiameter)*360;return Math.abs(na(e,this._startVector))<t}}function nl(e){return Math.abs(e.y)>Math.abs(e.x)}class nu extends nr{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,r){super.touchstart(e,t,r),this._currentTouchCount=r.length}_start(e){this._lastPoints=e,nl(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,r){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let i=e[0].sub(this._lastPoints[0]),n=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(i,n,r.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:-((i.y+n.y)/2*.5)}):void 0}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;let i=e.mag()>=2,n=t.mag()>=2;if(!i&&!n)return;if(!i||!n)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;let o=e.y>0==t.y>0;return nl(e)&&nl(t)&&o}}class nc{constructor(e){this._tr=new iJ(e),this._panStep=100,this._bearingStep=15,this._pitchStep=10,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,i=0,n=0,o=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?i=-1:(e.preventDefault(),o=-1);break;case 39:e.shiftKey?i=1:(e.preventDefault(),o=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(i=0,n=0),{cameraAnimation:s=>{let l=this._tr;s.easeTo({duration:300,easeId:"keyboardHandler",easing:nh,zoom:r?t.cw(l.zoom+r*(e.shiftKey?2:1),s.getZoomSnap()):l.zoom,bearing:l.bearing+i*this._bearingStep,pitch:l.pitch+n*this._pitchStep,offset:[-o*this._panStep,-a*this._panStep],center:l.center},{originalEvent:e})}}}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 nh(e){return e*(2-e)}let nd=1/450;class np{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)}
968,this._map=e,this._tr=new iJ(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=nd}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=_(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==t&&t%4.000244140625==0?this._type="wheel":0!==t&&4>Math.abs(t)?this._type="trackpad":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=200>Math.abs(i*t)?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let r=x.mousePos(this._map.getCanvas(),e),i=this._tr;this._aroundPoint=this._aroundCenter?i.transform.locationToScreenPoint(t.W.convert(i.center)):r,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let e=this._tr.transform;if("number"==typeof this._lastExpectedZoom){let t=e.zoom-this._lastExpectedZoom;"number"==typeof this._startZoom&&(this._startZoom+=t),"number"==typeof this._targetZoom&&(this._targetZoom+=t)}if(0!==this._delta){let r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);let n="number"!=typeof this._targetZoom?e.scale:t.ao(this._targetZoom),o=e.applyConstrain(e.getCameraLngLat(),t.ar(n*i)).zoom,a=this._map.getZoomSnap();if("wheel"===this._type&&a>0){let r=t.cw(e.zoom,a);this._targetZoom=t.cw(o,a,o-r)}else this._targetZoom=o;"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r="number"!=typeof this._targetZoom?e.zoom:this._targetZoom,i=this._startZoom,n=this._easing,o,a=!1;if("wheel"===this._type&&i&&n){let e=Math.min((_()-this._lastWheelEventTime+5)/200,1),s=n(e);o=t.H.number(i,r,s),e<1?this._needsRerender=!0:a=!0}else o=r,a=!0;return this._active=!0,a&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=o,{noInertia:!0,needsRenderFrame:!a,zoomDelta:o-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=t.cy;if(this._prevEase){let e=this._prevEase,i=(_()-e.start)/e.duration,n=e.easing(i+.01)-e.easing(i),o=.27/Math.sqrt(n*n+1e-4)*.01,a=Math.sqrt(.0729-o*o);r=t.cv(o,a,.25,1)}return this._prevEase={start:_(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class nf{constructor(e,t){this._clickZoom=e,this._tapZoom=t}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 nm{constructor(e){this._tr=new iJ(e),this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:i=>{i.easeTo({duration:300,zoom:t.cw(this._tr.zoom+(e.shiftKey?-1:1),i.getZoomSnap()),around:this._tr.unproject(r)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ng{constructor(){this._tap=new i3({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(e){this._zoomRate=null!=e?e:1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,r){if(!this._swipePoint)if(this._tapTime){let i=t[0],n=e.timeStamp-this._tapTime<500,o=30>this._tapPoint.dist(i);n&&o?r.length>0&&(this._swipePoint=i,this._swipeTouch=r[0].identifier):this.reset()}else this._tap.touchstart(e,t,r)}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let i=t[0],n=i.y-this._swipePoint.y;return this._swipePoint=i,e.preventDefault(),this._active=!0,{zoomDelta:n/128*this._zoomRate}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){if(this._tapTime)this._swipePoint&&0===r.length&&this.reset();else{let i=this._tap.touchend(e,t,r);i&&(this._tapTime=e.timeStamp,this._tapPoint=i)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ny{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}
968class nv{constructor(e,t,r,i){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=r,this._mouseRoll=i}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class nb{constructor(e,t,r,i){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-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()}setZoomRate(e){this._touchZoom.setZoomRate(e),this._tapDragZoom.setZoomRate(e)}setZoomThreshold(e){this._touchZoom.setZoomThreshold(e)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class n_{constructor(e,t){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=x.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),i=document.createElement("div");i.className="maplibregl-desktop-message",i.textContent=t,this._container.appendChild(i);let n=document.createElement("div");n.className="maplibregl-mobile-message",n.textContent=r,this._container.appendChild(n),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new t.n("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let nx=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate;class nA extends t.n{}function nw(e){var t;return(null==(t=e.panDelta)?void 0:t.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}class nS{get _ownerDocument(){var e;return(null==(e=this._el)?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,t;return(null==(t=null==(e=this._el)?void 0:e.ownerDocument)?void 0:t.defaultView)||window}constructor(e,r){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,r)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let i="renderFrame"===e.type?void 0:e,n={needsRenderFrame:!1},o={},a={};for(let{handlerName:s,handler:l,allowed:u}of this._handlers){let c;if(l.isEnabled()){if(this._blockedByActive(a,u,s))l.reset();else if(l[r||e.type]){if(t.cz(e,r||e.type)){let t=x.mousePos(this._map.getCanvas(),e);c=l[r||e.type](e,t)}else if(t.cA(e,r||e.type)){let t=this._getMapTouches(e.touches),i=x.touchPos(this._map.getCanvas(),t);c=l[r||e.type](e,i,t)}else t.cB(r||e.type)||(c=l[r||e.type](e));this.mergeHandlerResult(n,o,c,s,i),(null==c?void 0:c.needsRenderFrame)&&this._triggerRe
968nderFrame()}(c||l.isActive())&&(a[s]=l)}}let s={};for(let e in this._previousActiveHandlers)a[e]||(s[e]=i);this._previousActiveHandlers=a,(Object.keys(s).length||nw(n))&&(this._changes.push([n,o,s]),this._triggerRenderFrame()),(Object.keys(a).length||nw(n))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:l}=n;l&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],l(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new iW(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);let i=this._el;for(let[e,t,r]of(this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]],this._listeners))e.addEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}destroy(){for(let[e,t,r]of this._listeners)e.removeEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let r=this._map,i=r.getCanvasContainer();this._add("mapEvent",new iY(r,e));let n=r.boxZoom=new i0(r,e);this._add("boxZoom",n),e.interactive&&e.boxZoom&&n.enable();let o=r.cooperativeGestures=new n_(r,e.cooperativeGestures);this._add("cooperativeGestures",o),e.cooperativeGestures&&o.enable();let a=new i5(r),s=new nm(r);r.doubleClickZoom=new nf(s,a),this._add("tapZoom",a),this._add("clickZoom",s),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();let l=new ng;this._add("tapDragZoom",l);let u=r.touchPitch=new nu(r);this._add("touchPitch",u),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);let c=()=>r.project(r.getCenter()),h=function({enable:e,clickTolerance:r,aroundCenter:i=!0,minPixelCenterThreshold:n=100,rotateDegreesPerPixelMoved:o=.8},a){return new i4({clickTolerance:r,move:(e,r)=>{let s=a();if(i&&Math.abs(s.y-e.y)>n)return{bearingDelta:t.cx(new t.P(e.x,r.y),r,s)};let l=(r.x-e.x)*o;return i&&r.y<s.y&&(l=-l),{bearingDelta:l}},moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&e.ctrlKey||2===e.button&&!e.ctrlKey}),enable:e,assignEvents:ne})}(e,c),d=function({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5}){return new i4({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&e.ctrlKey||2===e.button}),enable:e,assignEvents:ne})}(e),p=function({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:r=.3},i){return new i4({clickTolerance:t,move:(e,t)=>{let n=i(),o=(t.x-e.x)*r;return t.y<n.y&&(o=-o),{rollDelta:o}},moveStateManager:new i8({checkCorrectEvent:e=>2===e.button&&e.ctrlKey}),enable:e,assignEvents:ne})}(e,c);r.dragRotate=new nv(e,h,d,p),this._add("mouseRotate",h,["mousePitch"]),this._add("mousePitch",d,["mouseRotate","mouseRoll"]),this._add("mouseRoll",p,["mousePitch"]),e.interactive&&e.dragRotate&&r.dragRotate.enable();let f=function({enable:e,clickTolerance:t}){return new i4({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&!e.ctrlKey}),enable:e,assignEvents:ne})}(e),m=new nt(e,r);r.dragPan=new ny(i,f,m),this._add("mousePan",f),this._add("touchPan",m,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);let g=new ns,y=new no;r.touchZoomRotate=new nb(i,y,g,l),this._add("touchRotate",g,["touchPan","touchZoom"]),this._add("touchZoom",y,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new iQ(r));let v=r.scrollZoom=new np(r,()=>this._triggerRenderFrame());this._add("scrollZoom",v,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);let b=r.keyboard=new nc(r);this._add("keyboard",b),e.interactive&&e.keyboard&&r.keyboard.enable()}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!nx(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let i in e)if(i!==r&&!(null==t?void 0:t.includes(i)))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e)this._el.contains(r.target)&&t.push(r);return t}mergeHandlerResult(e,r,i,n,o){if(!i)return;t.e(e,i);let a={handlerName:n,originalEvent:i.originalEvent||o};void 0!==i.zoomDelta&&(r.zoom=a),void 0!==i.panDelta&&(r.drag=a),void 0!==i.rollDelta&&(r.roll=a),void 0!==i.pitchDelta&&(r.pitch=a),void 0!==i.bearingDelta&&(r.rotate=a)}_applyChanges(){let e={},r={},i={};for(let[n,o,a]of this._changes)n.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(n.panDelta)),n.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+n.zoomDelta),n.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+n.bearingDelta),n.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+n.pitchDelta),n.rollDelta&&(e.rollDelta=(e.rollDelta||0)+n.rollDelta),void 0!==n.around&&(e.around=n.around),void 0!==n.pinchAround&&(e.pinchAround=n.pinchAround),n.noInertia&&(e.noInertia=n.noInertia),t.e(r,o),t.e(i,a);this._updateMapTransform(e,r,i),this._changes=[]}_updateMapTransform(e,t,r){let i=this._map,n=i._getTransformForUpdate(),o=i.terrain;if(!(nw(e)||o&&this._terrainMovement))return void this._fireEvents(t,r,!0);i._stop(!0);let{panDelta:a,zoomDelta:s,bearingDelta:l,pitchDelta:u,rollDelta:c,around:h,pinchAround:d}=e;void 0!==d&&(h=d),h||(h=i.transform.centerPoint),o&&!n.isPointOnM
968apSurface(h)&&(h=n.centerPoint);let p={panDelta:a,zoomDelta:s,rollDelta:c,pitchDelta:u,bearingDelta:l,around:h};this._map.cameraHelper.useGlobeControls&&!n.isPointOnMapSurface(h)&&(h=n.centerPoint);let f=.01>h.distSqr(n.centerPoint)?n.center:n.screenPointToLocation(a?h.sub(a):h);this._handleMapControls({terrain:o,tr:n,deltasForHelper:p,preZoomAroundLoc:f,combinedEventsInProgress:t,panDelta:a}),i._applyUpdatedTransform(n),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_handleMapControls({terrain:e,tr:t,deltasForHelper:r,preZoomAroundLoc:i,combinedEventsInProgress:n,panDelta:o}){let a=this._map.cameraHelper;(a.handleMapControlsRollPitchBearingZoom(r,t),e)?a.useGlobeControls?(!this._terrainMovement&&(n.drag||n.zoom)&&(this._terrainMovement=!0,this._map._elevationFreeze=!0),a.handleMapControlsPan(r,t,i)):!this._terrainMovement&&(n.drag||n.zoom)?(this._terrainMovement=!0,this._map._elevationFreeze=!0,a.handleMapControlsPan(r,t,i)):n.drag&&this._terrainMovement&&o?t.setCenter(t.screenPointToLocation(t.centerPoint.sub(o))):a.handleMapControlsPan(r,t,i):a.handleMapControlsPan(r,t,i)}_fireEvents(e,r,i){let n,o=nx(this._eventsInProgress),a=nx(e),s={};for(let t in e){let{originalEvent:r}=e[t];this._eventsInProgress[t]||(s[`${t}start`]=r),this._eventsInProgress[t]=e[t]}for(let e in!o&&a&&this._fireEvent("movestart",a.originalEvent),s)this._fireEvent(e,s[e]);for(let t in a&&this._fireEvent("move",a.originalEvent),e){let{originalEvent:r}=e[t];this._fireEvent(t,r)}let l={};for(let e in this._eventsInProgress){let{handlerName:t,originalEvent:i}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],n=r[t]||i,l[`${e}end`]=n)}for(let e in l)this._fireEvent(e,l[e]);let u=nx(this._eventsInProgress),c=(o||a)&&!u;if(c&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let e=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&e.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(e)}if(i&&c){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap<e&&e<this._bearingSnap;e&&(e.essential||!v.prefersReducedMotion)?(r(e.bearing||this._map.getBearing())&&(e.bearing=0),e.freezeElevation=!0,this._map.easeTo(e,{originalEvent:n})):(this._map.fire(new t.n("moveend",{originalEvent:n})),r(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(e,r){this._map.fire(new t.n(e,r?{originalEvent:r}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new nA("renderFrame",{timeStamp:e})),this._applyChanges()})}
968_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class nT extends t.E{constructor(e,t,r){super(),this._renderFrameCallback=()=>{let e=Math.min((_()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=r.bearingSnap,this._zoomSnap=r.zoomSnap,this.cameraHelper=t,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,t){e.apply(this.transform,!0),this.transform=e,this.cameraHelper=t}getCenter(){return new t.W(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,i){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},r),i)}panTo(e,r,i){return this.easeTo(t.e({center:e},r),i)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,r,i){return this.easeTo(t.e({zoom:e},r),i)}zoomIn(e,r){return this.zoomTo(t.cw(this.getZoom()+1,this._zoomSnap),e,r),this}zoomOut(e,r){return this.zoomTo(t.cw(this.getZoom()-1,this._zoomSnap),e,r),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,r){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new t.n("movestart",r)).fire(new t.n("move",r)).fire(new t.n("moveend",r))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,r,i){return this.easeTo(t.e({bearing:e},r),i)}resetNorth(e,r){return this.rotateTo(0,t.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(t.e({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,t):this}getPitch(){return this.transform.pitch}setPitch(e,t){return this.jumpTo({pitch:e},t),this}getRoll(){return this.transform.roll}setRoll(e,t){return this.jumpTo({roll:e},t),this}cameraForBounds(e,t){e=W.convert(e).adjustAntiMeridian();let r=(null==t?void 0:t.bearing)||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),r,t)}_cameraForBoxAndBearing(e,r,i,n){let o={top:0,bottom:0,right:0,left:0};if("number"==typeof(n=t.e({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){let e=n.padding;n.padding={top:e,bottom:e,right:e,left:e}}let a=t.e(o,n.padding);n.padding=a;let s=this.transform,l=new W(e,r),u=this.cameraHelper.cameraForBoxAndBearing(n,a,l,i,s);return u&&this._zoomSnap&&(u.zoom=t.cw(u.zoom,this._zoomSnap,-1)),u}fitBounds(e,t,r){return this._fitInternal(this.cameraForBounds(e,t),t,r)}fitScreenCoordinates(e,r,i,n,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(t.P.convert(e)),this.transform.screenPointToLocation(t.P.convert(r)),i,n),n,o)}_fitInternal(e,r,i){return e?(delete(r=t.e(e,r)).padding,r.linear?this.easeTo(r,i):this.flyTo(r,i)):this}jumpTo(e,r){this.stop(),"zoom"in e&&this._zoomSnap&&(e.zoom=t.cw(e.zoom,this._zoomSnap));let i=this._getTransformForUpdate(),n=!1,o=!1,a=!1,s=i.zoom;this.terrain&&i.setElevation(this.terrain.getElevationForLngLatZoom(e.center?t.W.convert(e.center):i.center,e.zoom||i.tileZoom)),this.cameraHelper.handleJumpToCenterZoom(i,e);let l=i.zoom!==s;return"elevation"in e&&i.elevation!==+e.elevation&&i.setElevation(+e.elevation),"bearing"in e&&i.bearing!==+e.bearing&&(n=!0,i.setBearing(+e.bearing)),"pitch"in e&&i.pitch!==+e.pitch&&(o=!0,i.setPitch(+e.pitch)),"roll"in e&&i.roll!==+e.roll&&(a=!0,i.setRoll(+e.roll)),null==e.padding||i.isPaddingEqual(e.padding)||i.setPadding(e.padding),this._applyUpdatedTransform(i),this.fire(new t.n("movestart",r)).fire(new t.n("move",r)),l&&this.fire(new t.n("zoomstart",r)).fire(new t.n("zoom",r)).fire(new t.n("zoomend",r)),n&&this.fire(new t.n("rotatestart",r)).fire(new t.n("rotate",r)).fire(new t.n("rotateend",r)),o&&this.fire(new t.n("pitchstart",r)).fire(new t.n("pitch",r)).fire(new t.n("pitchend",r)),a&&this.fire(new t.n("rollstart",r)).fire(new t.n("roll",r)).fire(new t.n("rollend",r)),this.fire(new t.n("moveend",r))}calculateCameraOptionsFromTo(e,r,i,n=0){let o=t.a7.fromLngLat(e,r),a=t.a7.fromLngLat(i,n),s=a.x-o.x,l=a.y-o.y,u=a.z-o.z,c=Math.hypot(s,l,u);if(0===c)throw Error("Can't calculate camera options with same From and To");let h=Math.hypot(s,l),d=t.ar(this.transform.cameraToCenterDistance/c/this.transform.tileSize),p=180*Math.atan2(s,-l)/Math.PI,f=180*Math.acos(h/c)/Math.PI;return f=u<0?90-f:90+f,{center:a.toLngLat(),elevation:n,zoom:d,pitch:f,bearing:p}}calculateCameraOptionsFromCameraLngLatAltRotation(e,t,r,i,n){let o=this.transform.calculateCenterFromCameraLngLatAlt(e,t,r,i
968);return{center:o.center,elevation:o.elevation,zoom:o.zoom,bearing:r,pitch:i,roll:n}}easeTo(e,r){let i,n;this._stop(!1,e.easeId),"zoom"in(e=t.e({offset:[0,0],duration:500,easing:t.cy},e))&&this._zoomSnap&&(e.zoom=t.cw(e.zoom,this._zoomSnap)),(!1===e.animate||!e.essential&&v.prefersReducedMotion)&&(e.duration=0);let o=this._getTransformForUpdate(),a=this.getBearing(),s=o.pitch,l=o.roll,u="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:s,h="roll"in e?this._normalizeBearing(e.roll,l):l,d="padding"in e?e.padding:o.padding,p=t.P.convert(e.offset);e.around&&(i=t.W.convert(e.around),n=o.locationToScreenPoint(i));let f={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},m=this.cameraHelper.handleEaseTo(o,{bearing:u,pitch:c,roll:h,padding:d,around:i,aroundPoint:n,offsetAsPoint:p,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating||(this._rotating=a!==u),this._pitching||(this._pitching=c!==s),this._rolling||(this._rolling=h!==l),this._padding=!o.isPaddingEqual(d),this._zooming||(this._zooming=m.isZooming),this._easeId=e.easeId,this._prepareEase(r,e.noMoveStart,f),this.terrain&&this._prepareElevation(m.elevationCenter),this._ease(t=>{m.easeFunc(t),this.terrain&&!e.freezeElevation&&this._updateElevation(t),this._applyUpdatedTransform(o),this._fireMoveEvents(r)},t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,t)},e),this}_prepareEase(e,r,i={}){this._moving=!0,r||i.moving||this.fire(new t.n("movestart",e)),this._zooming&&!i.zooming&&this.fire(new t.n("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new t.n("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new t.n("pitchstart",e)),this._rolling&&!i.rolling&&this.fire(new t.n("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){void 0!==this._elevationStart&&void 0!==this._elevationCenter||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(r-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.setElevation(t.H.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),r=e.getCameraAltitude(),i=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(r<i){let r=this.calculateCameraOptionsFromTo(t,i,e.center,e.elevation);return{pitch:r.pitch,zoom:r.zoom}}return{}}_applyUpdatedTransform(e){let t=[];if(t.push(e=>this._elevateCameraIfInsideTerrain(e)),this.transformCameraUpdate&&t.push(e=>this.transformCameraUpdate(e)),!t.length)return;let r=e.clone();for(let e of t){let t=r.clone(),{center:i,zoom:n,roll:o,pitch:a,bearing:s,elevation:l}=e(t);i&&t.setCenter(i),void 0!==l&&t.setElevation(l),void 0!==n&&t.setZoom(n),void 0!==o&&t.setRoll(o),void 0!==a&&t.setPitch(a),void 0!==s&&t.setBearing(s),r.apply(t,!1)}this.transform.apply(r,!1)}_fireMoveEvents(e){this.fire(new t.n("move",e)),this._zooming&&this.fire(new t.n("zoom",e)),this._rotating&&this.fire(new t.n("rotate",e)),this._pitching&&this.fire(new t.n("pitch",e)),this._rolling&&this.fire(new t.n("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let i=this._zooming,n=this._rotating,o=this._pitching,a=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,i&&this.fire(new t.n("zoomend",e)),n&&this.fire(new t.n("rotateend",e)),o&&this.fire(new t.n("pitchend",e)),a&&this.fire(new t.n("rollend",e)),this.fire(new t.n("moveend",e))}flyTo(e,r){if(!e.essential&&v.prefersReducedMotion){let i=t.V(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(i,r)}this.stop(),"zoom"in(e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.cy},e))&&this._zoomSnap&&(e.zoom=t.cw(e.zoom,this._zoomSnap));let i=this._getTransformForUpdate(),n=i.bearing,o=i.pitch,a=i.roll,s=i.padding,l="bearing"in e?this._normalizeBearing(e.bearing,n):n,u="pitch"in e?+e.pitch:o,c="roll"in e?this._normalizeBearing(e.roll,a):a,h="padding"in e?e.padding:i.padding,d=t.P.convert(e.offset),p=i.centerPoint.add(d),f=i.screenPointToLocation(p),m=this.cameraHelper.handleFlyTo(i,{bearing:l,pitch:u,roll:c,padding:h,locationAtOffset:f,offsetAsPoint:d,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),g=e.curve,y=Math.max(i.width,i.height),b=y/m.scaleOfZoom,_=m.pixelPathLength;"number"==typeof m.scaleOfMinZoom&&(g=Math.sqrt(y/m.scaleOfMinZoom/_*2));let x=g*g;function A(e){let t=(b*b-y*y+(e?-1:1)*x*x*_*_)/(2*(e?b:y)*x*_);return Math.log(Math.sqrt(t*t+1)-t)}function w(e){return(Math.exp(e)-Math.exp(-e))/2}function S(e){return(Math.exp(e)+Math.exp(-e))/2}let T=A(!1),C=function(e){return S(T)/S(T+g*e)},E=function(e){var t;return y*((S(T)*(w(t=T+g*e)/S(t))-w(T))/x)/_},P=(A(!0)-T)/g;if(2e-6>Math.abs(_)||!isFinite(P)){if(1e-6>Math.abs(y-b))return this.easeTo(e,r);let t=b<y?-1:1;P=Math.abs(Math.log(b/y))/g,E=()=>0,C=e=>Math.exp(t*g*e)}return e.duration="duration"in e?+e.duration:1e3*P/("screenSpeed"in e?e.screenSpeed/g:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=n!==l,this._pitching=u!==o,this._rolling=c!==a,this._padding=!i.isPaddingEqual(h),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(m.targetCenter),this._ease(f=>{let g=f*P,y=1/C(g),v=E(g);this._rotating&&i.setBearing(t.H.number(n,l,f)),this._pitching&&i.setPitch(t.H.number(o,u,f)),this._rolling&&i.setRoll(t.H.number(a,c,f)),this._padding&&(i.interpolatePadding(s,h,f),p=i.centerPoint.add(d)),m.easeFu
968nc(f,y,v,p),this.terrain&&!e.freezeElevation&&this._updateElevation(f),this._applyUpdatedTransform(i),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var r;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||null==(r=this.handlers)||r.stop(!1),this}_ease(e,t,r){!1===r.animate||0===r.duration?(e(1),t()):(this._easeStart=_(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){let i=Math.abs((e=t.X(e,-180,180))-r);return Math.abs(e-360-r)<i&&(e-=360),Math.abs(e+360-r)<i&&(e+=360),e}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLat(t.W.convert(e),this.transform):null}}let nC={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class nE{constructor(e=nC){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=e=>{e&&("metadata"===e.sourceDataType||"visibility"===e.sourceDataType||"style"===e.dataType||"terrain"===e.type)&&this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=x.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=x.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];
968if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"!=typeof e?"":e)):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.tileManagers;for(let r in t){let i=t[r];if(i.used||i.usedForTerrain){let t=i.getSource();t.attribution&&!e.includes(t.attribution)&&e.push(t.attribution)}}(e=e.filter(e=>String(e).trim())).sort((e,t)=>e.length-t.length);let r=(e=e.filter((t,r)=>{for(let i=r+1;i<e.length;i++)if(e[i].includes(t))return!1;return!0})).join(" | ");r!==this._attribHTML&&(this._attribHTML=r,e.length?(this._innerContainer.innerHTML=x.sanitize(r),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class nP{constructor(e={}){this._updateCompact=()=>{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var t;this._map=e,this._compact=null==(t=this.options)?void 0:t.compact,this._container=x.create("div","maplibregl-ctrl");let r=x.create("a","maplibregl-ctrl-logo");return r.target="_blank",r.rel="noopener nofollow",r.href="https://maplibre.org/",r.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),r.setAttribute("rel","noopener nofollow"),this._container.appendChild(r),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class nI{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning;for(let r of t?this._queue.concat(t):this._queue)if(r.id===e)return void(r.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;for(let r of(this._queue=[],t))if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var nM=t.aS([{name:"a_pos3d",type:"Int16",components:3}]);class nk extends t.E{constructor(e){super(),this._lastTilesetChange=_(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(e,r){this.tileManager.update(e,r),this._renderableTilesKeys=[];let i={};for(let n of eA(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.tileManager._source.calculateTileZoom}))i[n.key]=!0,this._renderableTilesKeys.push(n.key),this._tiles[n.key]||(n.terrainRttPosMatrix32f=new Float64Array(16),t.c7(n.terrainRttPosMatrix32f,0,t.a6,t.a6,0,0,1),this._tiles[n.key]=new ec(n,this.tileSize),this._lastTilesetChange=_());for(let e in this._tiles)i[e]||delete this._tiles[e]}freeRtt(e){for(let t in this._tiles){let r=this._tiles[t];(!e||r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&(r.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let r={};for(let i of this._renderableTilesKeys){let n=this._tiles[i].tileID,o=e.clone(),a=t.bj();if(n.canonical.equals(e.canonical))t.c7(a,0,t.a6,t.a6,0,0,1);else if(n.canonical.isChildOf(e.canonical)){let r=n.canonical.z-e.canonical.z,i=n.canonical.x-(n.canonical.x>>r<<r),o=n.canonical.y-(n.canonical.y>>r<<r),s=t.a6>>r;t.c7(a,0,s,s,0,0,1),t.Q(a,a,[-i*s,-o*s,0])}else{if(!e.canonical.isChildOf(n.canonical))continue;{let r=e.canonical.z-n.canonical.z,i=e.canonical.x-(e.canonical.x>>r<<r),o=e.canonical.y-(e.canonical.y>>r<<r),s=t.a6>>r;t.c7(a,0,t.a6,t.a6,0,0,1),t.Q(a,a,[i*s,o*s,0]),t.S(a,a,[1/2**r,1/2**r,0])}}o.terrainRttPosMatrix32f=new Float32Array(a),r[i]=o}return r}_getTerrainCoordsForTileRanges(e,r){let i={};for(let n of this._renderableTilesKeys){let o=this._tiles[n].tileID;if(!this._isWithinTileRanges(o,r))continue;let a=e.clone(),s=t.bj();if(o.canonical.z===e.canonical.z){let r=e.canonical.x-o.canonical.x+e.wrap*(1<<e.canonical.z),i=e.canonical.y-o.canonical.y;t.c7(s,0,t.a6,t.a6,0,0,1),t.Q(s,s,[r*t.a6,i*t.a6,0])}else if(o.canonical.z>e.canonical.z){let r=o.canonical.z-e.canonical.z,i=o.canonical.x-(o.canonical.x>>r<<r)+e.wrap*(1<<o.canonical.z),n=o.canonical.y-(o.canonical.y>>r<<r),a=e.canonical.x-(o.canonical.x>>r),l=e.canonical.y-(o.canonical.y>>r),u=t.a6>>r;t.c7(s,0,u,u,0,0,1),t.Q(s,s,[-i*u+a*t.a6,-n*u+l*t.a6,0])}else{let r=e.canonical.z-o.canonical.z,i=e.canonical.x-(e.canonical.x>>r<<r)+e.wrap*(1<<e.canonical.z),n=e.canonical.y-(e.canonical.y>>r<<r),a=(e.canonical.x>>r)-o.canonical.x,l=(e.canonical.y>>r)-o.canonical.y,u=t.a6<<r;t.c7(s,0,u,u,0,0,1),t.Q(s,s,[i*t.a6+a*u,n*t.a6+l*u,0])}a.terrainRttPosMatrix32f=new Float32Array(s),i[n]=a}return i}getSourceTile(e,t){var r,i;let n=this.tileManager._source,o=e.overscaledZ-this.deltaZoom;if(o>n.maxzoom&&(o=n.maxzoom),o<n.minzoom)return;(r=this._sourceTileCache)[i=e.key]||(r[i]=e.scaledTo(o).key);let a=this.findTileInCaches(this._sourceTileCache[e.key]);if(!(null==a?void 0:a.dem)&&t)for(;o>=n.minzoom&&!(null==a?void 0:a.dem);)a=this.findTileInCaches(e.scaledTo(o--).key);return a}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e))}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){let r=t[e.canonical.z];return!!r&&(e.wrap>r.minWrap||e.wrap<r.maxWrap||e.canonical.x>=r.minTileXWrapped&&e.canonical.x<=r.maxTileXWrapped&&e.canonical.y>=r.minTileY&&e.canonical.y<=r.maxTileY)}}class nO{constructor(e,t,r){this._meshCache={},this.painter=e,this.tileManager=new nk(t),this.options=r,this.exaggeration="number"==typeof r.exaggeration?r.exaggeration:1,this.qual
968ityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){for(let e in this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null),this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,r,i,n=t.a6){var o;let a=e.normalizeCoordinates(r,i,n);if(!a)return 0;let s=this.getTerrainData(a.tileID),l=null==(o=s.tile)?void 0:o.dem;if(!l)return 0;let u=t.cC([],[a.x/n*t.a6,a.y/n*t.a6],s.u_terrain_matrix),c=[u[0]*l.dim,u[1]*l.dim],h=Math.floor(c[0]),d=Math.floor(c[1]),p=c[0]-h,f=c[1]-d;return l.get(h,d)*(1-p)*(1-f)+l.get(h+1,d)*p*(1-f)+l.get(h,d+1)*(1-p)*f+l.get(h+1,d+1)*p*f}getElevationForLngLatZoom(e,r){if(!t.cD(r,e.wrap()))return 0;let{tileID:i,mercatorX:n,mercatorY:o}=this._getOverscaledTileIDFromLngLatZoom(e,r);return this.getElevation(i,n%t.a6,o%t.a6,t.a6)}getElevationForLngLat(e,t){let r=eA(t,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),i=0;for(let e of r)e.canonical.z>i&&(i=Math.min(e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,i)}getElevation(e,r,i,n=t.a6){return this.getDEMElevation(e,r,i,n)*this.exaggeration}getTerrainData(e){var r,i;if(!this._emptyDemTexture){let e=this.painter.context,r=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new t.T(e,r,e.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new t.T(e,new t.R({width:1,height:1}),e.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.ap([])}let n=this.tileManager.getSourceTile(e,!0);if((null==n?void 0:n.dem)&&(!n.demTexture||n.needsTerrainPrepare)){let e=this.painter.context;n.demTexture=this.painter.getTileTexture(n.dem.stride),n.demTexture?n.demTexture.update(n.dem.getPixels(),{premultiply:!1}):n.demTexture=new t.T(e,n.dem.getPixels(),e.gl.RGBA,{premultiply:!1}),n.demTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),n.needsTerrainPrepare=!1}let o=n&&n.toString()+n.tileID.key+e.key;if(o&&!this._demMatrixCache[o]){let r=this.tileManager.getSource().maxzoom,i=e.canonical.z-n.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=r?i=e.canonical.z-r:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let a=e.canonical.x-(e.canonical.x>>i<<i),s=e.canonical.y-(e.canonical.y>>i<<i),l=t.cE(new Float64Array(16),[1/(t.a6<<i),1/(t.a6<<i),0]);t.Q(l,l,[a*t.a6,s*t.a6,0]),this._demMatrixCache[o]={matrix:l,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:(null==(r=null==n?void 0:n.dem)?void 0:r.dim)||1,u_terrain_matrix:o?this._demMatrixCache[o].matrix:this._emptyDemMatrix,u_terrain_unpack:(null==(i=null==n?void 0:n.dem)?void 0:i.getUnpackVector())||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:((null==n?void 0:n.demTexture)||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:n}}getFramebuffer(e){let r=this.painter,i=r.width/devicePixelRatio,n=r.height/devicePixelRatio;return this._fbo&&(this._fbo.width!==i||this._fbo.height!==n)&&(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new t.T(r.context,{width:i,height:n,data:null},r.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(r.context.gl.NEAREST,r.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new t.T(r.context,{width:i,height:n,data:null},r.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(r.context.gl.NEAREST,r.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=r.context.createFramebuffer(i,n,!0,!1),this._fbo.depthAttachment.set(r.context.createRenderbuffer(r.context.gl.DEPTH_COMPONENT16,i,n))),this._fbo.colorAttachment.set("coords"===e?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let e=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let r=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let e=0,t=0;e<this._coordsTextureSize;e++)for(let i=0;i<this._coordsTextureSize;i++,t+=4)r[t+0]=255&i,r[t+1]=255&e,r[t+2]=i>>8<<4|e>>8,r[t+3]=0;let i=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),n=new t.T(e,i,e.gl.RGBA,{premultiply:!1});return n.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=n,n}pointCoordinate(e){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let r=new Uint8Array(4),i=this.painter.context,n=i.gl,o=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),a=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),s=Math.round(this.painter.height/devicePixelRatio);i.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),n.readPixels(o,s-a-1,1,1,n.RGBA,n.UNSIGNED_BYTE,r),i.bindFramebuffer.set(null);let l=r[0]+(r[2]>>4<<8),u=r[1]+((15&r[2])<<8),c=this.coordsIndex[255-r[3]],h=c&&this.tileManager.getTileByID(c);if(!h)return null;let d=this._coordsTextureSize,p=(1<<h.tileID.canonical.z)*d;return new t.a7((h.tileID.canonical.x*d+l)/p+h.tileID.wrap,(h.tileID.canonical.y*d+u)/p,this.getElevation(h.tileID,l,u,d))}depthAtPoint(e){let t=new Uint8Array(4),r=this.painter.context,i=r.gl;return r.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),i.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,i.RGBA,i.UNSIGNED_BYTE,t),r.bindFramebuffer.set(null),(t[0]/0x1000000+t[1]/65536+t[2]/256+t[3])/256}getTerrainMesh(e){var r;let i=(null==(r=this.painter.style.projection)?void 0:r.transitionState)>0,n=i&&0===e.canonical.y,o=i&&e.canonical.y===(1<<e.canonical.z)-1,a=`m_${n?"n":""}_${o?"s":""}`;if(this._meshCache[a])return this._meshCache[a];let s=this.painter.context,l=new t.cF,u=new t.aW,c=this.meshSize,h=t.a6/c,d=c*c;for(let e=0;e<=c;e++)for(let t=0;t<=c;t++)l.emplaceBack(t*h,e*h,0);for(let e=0;e<d;e+=c+1)for(let t=0;t<c;t++)u.emplaceBack(t+e,c+t+e+1,c+t+e+2),u.emplaceBack(t+e,c+t+e+2,t+e+1);
968let p=l.length,f=p+(c+1),m=(c+1)*c,g=n?t.bq:0,y=+!n,v=o?t.br:t.a6,b=+!o;for(let e=0;e<=c;e++)l.emplaceBack(e*h,g,y);for(let e=0;e<=c;e++)l.emplaceBack(e*h,v,b);for(let e=0;e<c;e++)u.emplaceBack(m+e,f+e,f+e+1),u.emplaceBack(m+e,f+e+1,m+e+1),u.emplaceBack(0+e,p+e+1,p+e),u.emplaceBack(0+e,0+e+1,p+e+1);let _=l.length,x=_+2*(c+1);for(let e of[0,1])for(let r=0;r<=c;r++)for(let i of[0,1])l.emplaceBack(e*t.a6,r*h,i);for(let e=0;e<2*c;e+=2)u.emplaceBack(_+e,_+e+1,_+e+3),u.emplaceBack(_+e,_+e+3,_+e+2),u.emplaceBack(x+e,x+e+3,x+e+1),u.emplaceBack(x+e,x+e+2,x+e+3);let A=new ta(s.createVertexBuffer(l,nM.members),s.createIndexBuffer(u),t.aV.simpleSegment(0,0,l.length,u.length));return this._meshCache[a]=A,A}getMeshFrameDelta(e){return 2*Math.PI*t.bD/Math.pow(2,Math.max(e,0))/5}getMinTileElevationForLngLatZoom(e,r){var i;if(!t.cD(r,e.wrap()))return 0;let{tileID:n}=this._getOverscaledTileIDFromLngLatZoom(e,r);return null!=(i=this.getMinMaxElevation(n).minElevation)?i:0}getMinMaxElevation(e){let t=this.getTerrainData(e).tile,r={minElevation:null,maxElevation:null};return(null==t?void 0:t.dem)&&(r.minElevation=t.dem.min*this.exaggeration,r.maxElevation=t.dem.max*this.exaggeration),r}_getOverscaledTileIDFromLngLatZoom(e,r){let i=t.a7.fromLngLat(e.wrap()),n=(1<<r)*t.a6,o=i.x*n,a=i.y*n,s=Math.floor(o/t.a6),l=Math.floor(a/t.a6);return{tileID:new t.a3(r,0,r,s,l),mercatorX:o,mercatorY:a}}}class nD{constructor(e,t,r){this._context=e,this._size=t,this._tileSize=r,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){let r=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),i=new t.T(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return i.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),r.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),r.colorAttachment.set(i.texture),{id:e,fbo:r,texture:i,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(t=>e.id!==t),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length<this._size)&&!1===this._objects.some(e=>!e.inUse)}}let nR={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class nL{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new nD(e.context,30,t.tileManager.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){var r,i,n;for(let r in this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(r=>!e._layers[r].isHidden(t)),this._coordsAscending={},e.tileManagers){this._coordsAscending[r]={};let t=e.tileManagers[r].getVisibleCoordinates(),i=e.tileManagers[r].getSource(),o=i instanceof et?i.terrainTileRanges:null;for(let e of t){let t=this.terrain.tileManager.getTerrainCoords(e,o);for(let e in t)(n=this._coordsAscending[r])[e]||(n[e]=[]),this._coordsAscending[r][e].push(t[e])}}for(let t of(this._rttFingerprints={},e._order)){let n=e._layers[t],o=n.source;if(nR[n.type]&&!this._rttFingerprints[o]){this._rttFingerprints[o]={};let t=null!=(i=null==(r=e.tileManagers[o])?void 0:r.getState().revision)?i:0;for(let e in this._coordsAscending[o])this._rttFingerprints[o][e]=`${this._coordsAscending[o][e].map(e=>e.key).sort().join()}#${t}`}}for(let e of this._renderableTiles)for(let t in this._rttFingerprints){let r=this._rttFingerprints[t][e.t
968ileID.key];r&&r!==e.rttFingerprint[t]&&(e.rtt=[])}}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;let i=Object.assign(Object.assign({},r),{isRenderingToTexture:!0}),n=e.type,o=this.painter,a=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(nR[n]&&(this._prevType&&nR[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(e.id),!a))return!0;if(nR[this._prevType]||nR[n]&&a){this._prevType=n;let e=this._stacks.length-1,r=this._stacks[e]||[];for(let n of this._renderableTiles){if(this.pool.isFull()&&(iD(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(n),n.rtt[e]){let t=this.pool.getObjectForId(n.rtt[e].id);if(t.stamp===n.rtt[e].stamp){this.pool.useObject(t);continue}}let a=this.pool.getOrCreateFreeObject();for(let s of(this.pool.useObject(a),this.pool.stampObject(a),n.rtt[e]={id:a.id,stamp:a.stamp},o.context.bindFramebuffer.set(a.fbo.framebuffer),o.context.clear({color:t.bo.transparent,stencil:0}),o.currentStencilSource=void 0,r)){let e=o.style._layers[s],t=e.source?this._coordsAscending[e.source][n.tileID.key]:[n.tileID];o.context.viewport.set([0,0,a.fbo.width,a.fbo.height]),o._renderTileClippingMasks(e,t,!0),o.renderLayer(o,o.style.tileManagers[e.source],e,t,i),e.source&&(n.rttFingerprint[e.source]=this._rttFingerprints[e.source][n.tileID.key])}}return iD(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],this.pool.freeAllObjects(),nR[n]}return!1}}let nB={"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":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},nF={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:nC,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:t.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},nj=class extends nT{get _ownerWindow(){var e,t;return(null==(t=null==(e=this._container)?void 0:e.ownerDocument)?void 0:t.defaultView)||window}constructor(e){var r,i,n;let o=Object.assign(Object.assign(Object.assign({},nF),e),{canvasContextAttributes:Object.assign(Object.assign({},nF.canvasContextAttributes),e.canvasContextAttributes)});if(null!=o.minZoom&&null!=o.maxZoom&&o.minZoom>o.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=o.minPitch&&null!=o.maxPitch&&o.minPitch>o.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=o.minPitch&&o.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=o.maxPitch&&o.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");let a=new tv,s=new tA;void 0!==o.minZoom&&a.setMinZoom(o.minZoom),void 0!==o.maxZoom&&a.setMaxZoom(o.maxZoom),void 0!==o.minPitch&&a.setMinPitch(o.minPitch),void 0!==o.maxPitch&&a.setMaxPitch(o.maxPitch),void 0!==o.renderWorldCopies&&a.setRenderWorldCopies(o.renderWorldCopies),null!==o.transformConstrain&&a.setConstrainOverride(o.transformConstrain),super(a,s,{bearingSnap:o.bearingSnap,zoomSnap:o.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new nI,this._controls=[],this._mapId=t.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=e=>{if(e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let e of Object.values(this.style._layers))if("custom"===e.type&&console.warn(`Custom layer with i
968d '${e.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),e._listeners)for(let[t]of Object.entries(e._listeners))console.warn(`Custom layer with id '${e.id}' had event listeners for event '${t}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new t.n("webglcontextlost",{originalEvent:e}))}else this.fire(new t.n("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new t.n("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=o.interactive,this._maxTileCacheSize=o.maxTileCacheSize,this._maxTileCacheZoomLevels=o.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},o.canvasContextAttributes),this._trackResize=!0===o.trackResize,this._bearingSnap=o.bearingSnap,this._zoomSnap=o.zoomSnap,this._centerClampedToGround=o.centerClampedToGround,this._refreshExpiredTiles=!0===o.refreshExpiredTiles,this._fadeDuration=o.fadeDuration,this._crossSourceCollisions=!0===o.crossSourceCollisions,this._collectResourceTiming=!0===o.collectResourceTiming,this._locale=Object.assign(Object.assign({},nB),o.locale),this._clickTolerance=o.clickTolerance,this._overridePixelRatio=o.pixelRatio,this._maxCanvasSize=o.maxCanvasSize,this._zoomLevelsToOverscale=o.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=o.transformCameraUpdate,this.transformConstrain=o.transformConstrain,this.cancelPendingTileRequestsWhileZooming=!0===o.cancelPendingTileRequestsWhileZooming,this.setAnisotropicFilterPitch(o.anisotropicFilterPitch),void 0!==o.reduceMotion&&(v.prefersReducedMotion=o.reduceMotion),this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new A(o.transformRequest),this._container=this._resolveContainer(o.container),o.maxBounds&&this.setMaxBounds(o.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),"u">typeof window&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new nS(this,o),this._hash=o.hash?new ij("string"==typeof o.hash&&o.hash||void 0).addTo(this):void 0,(null==(r=this._hash)?void 0:r._onHashChange())||(this.jumpTo({center:o.center,elevation:o.elevation,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch,roll:o.roll}),o.bounds&&(this.resize(),this.fitBounds(o.bounds,t.e({},o.fitBoundsOptions,{duration:0}))));let l="string"==typeof o.style||"globe"!==(null==(n=null==(i=o.style)?void 0:i.projection)?void 0:n.type);this.resize(null,l),this._localIdeographFontFamily=o.localIdeographFontFamily,this._validateStyle=o.validateStyle,o.style&&this.setStyle(o.style,{localIdeographFontFamily:o.localIdeographFontFamily}),o.attributionControl&&this.addControl(new nE("boolean"==typeof o.attributionControl?void 0:o.attributionControl)),o.maplibreLogo&&this.addControl(new nP,o.logoPosition),this.on("style.load",()=>{if(l||this._resizeTransform(),this.transform.unmodified){let e=t.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(e)}}),this.on("data",e=>{this._update("style"===e.dataType),this.fire(new t.n(`${e.dataType}data`,e))}),this.on("dataloading",e=>{this.fire(new t.n(`${e.dataType}dataloading`,e))}),this.on("dataabort",e=>{this.fire(new t.n("sourcedataabort",e))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!(null==e?void 0:e.onAdd))return this.fire(new t.l(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let i=e.onAdd(this);this._controls.push(e);let n=this._controlPositions[r];
968return r.includes("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this}removeControl(e){if(!(null==e?void 0:e.onRemove))return this.fire(new t.l(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this}hasControl(e){return this._controls.includes(e)}coveringTiles(e){return eA(this.transform,e)}calculateCameraOptionsFromTo(e,t,r,i){return null==i&&this.terrain&&(i=this.terrain.getElevationForLngLat(r,this.transform)),super.calculateCameraOptionsFromTo(e,t,r,i)}resize(e,r=!0){if(null!==this._lostContextStyle.style)return this;this._resizeInternal(r);let i=!this._moving;return i&&(this.stop(),this.fire(new t.n("movestart",e)).fire(new t.n("move",e))),this.fire(new t.n("resize",e)),i&&this.fire(new t.n("moveend",e)),this}_resizeInternal(e=!0){let[t,r]=this._containerDimensions(),i=this._getClampedPixelRatio(t,r);if(this._resizeCanvas(t,r,i),this.painter.resize(t,r,i),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let i=this._getClampedPixelRatio(t,r);this._resizeCanvas(t,r,i),this.painter.resize(t,r,i)}this._resizeTransform(e)}_resizeTransform(e=!0){var t;let[r,i]=this._containerDimensions();this.transform.resize(r,i,e),null==(t=this._requestedCameraState)||t.resize(r,i,e)}_getClampedPixelRatio(e,t){let{0:r,1:i}=this._maxCanvasSize,n=this.getPixelRatio(),o=e*n,a=t*n;return Math.min(o>r?r/o:1,a>i?i/a:1)*n}getPixelRatio(){var e;return null!=(e=this._overridePixelRatio)?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(W.convert(e)),this._update()}setMinZoom(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom){let r=this.transform.zoom,i=this._getTransformForUpdate();return i.setMinZoom(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.zoom&&this.fire(new t.n("zoomstart")).fire(new t.n("zoom")).fire(new t.n("zoomend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=null==e?22:e)>=this.transform.minZoom){let r=this.transform.zoom,i=this._getTransformForUpdate();return i.setMaxZoom(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.zoom&&this.fire(new t.n("zoomstart")).fire(new t.n("zoom")).fire(new t.n("zoomend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=null==e?0:e)<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch){let r=this.transform.pitch,i=this._getTransformForUpdate();return i.setMinPitch(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.pitch&&this.fire(new t.n("pitchstart")).fire(new t.n("pitch")).fire(new t.n("pitchend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(e){if((e=null==e?60:e)>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this.transform.minPitch){let r=this.transform.pitch,i=this._getTransformForUpdate();return i.setMaxPitch(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.pitch&&this.fire(new t.n("pitchstart")).fire(new t.n("pitch")).fire(new t.n("pitchend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if((e=null==e?20:e)>180)throw Error("anisotropicFilterPitch must be less than or equal to 180");if(e<0)throw Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=e,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this.transform.setConstrainOverride(e),this._update()}project(e){return this.transform.locationToScreenPoint(t.W.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null==(e=this.handlers)?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null==(e=this.handlers)?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null==(e=this.handlers)?void 0:e.isRotating())}
968_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let i=!1,n=n=>{let o=t.filter(e=>this.getLayer(e)),a=0!==o.length?this.queryRenderedFeatures(n.point,{layers:o}):[];a.length?i||(i=!0,r.call(this,new i$(e,this,n.originalEvent,{features:a}))):i=!1};return{layers:t,listener:r,delegates:{mousemove:n,mouseout:()=>{i=!1}}}}if("mouseleave"===e||"mouseout"===e){let i=!1,n=n=>{let o=t.filter(e=>this.getLayer(e));(0!==o.length?this.queryRenderedFeatures(n.point,{layers:o}):[]).length?i=!0:i&&(i=!1,r.call(this,new i$(e,this,n.originalEvent)))},o=t=>{i&&(i=!1,r.call(this,new i$(e,this,t.originalEvent)))};return{layers:t,listener:r,delegates:{mousemove:n,mouseout:o}}}{let i=e=>{let i=t.filter(e=>this.getLayer(e)),n=0!==i.length?this.queryRenderedFeatures(e.point,{layers:i}):[];n.length&&(e.features=n,r.call(this,e),delete e.features)};return{layers:t,listener:r,delegates:{[e]:i}}}}_saveDelegatedListener(e,t){var r;this._delegatedListeners||(this._delegatedListeners={}),(r=this._delegatedListeners)[e]||(r[e]=[]),this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,r){var i;if(!(null==(i=this._delegatedListeners)?void 0:i[e]))return;let n=this._delegatedListeners[e];for(let e=0;e<n.length;e++){let i=n[e];if(i.listener===r&&i.layers.length===t.length&&i.layers.every(e=>t.includes(e))){for(let e in i.delegates)this.off(e,i.delegates[e]);return void n.splice(e,1)}}}on(e,t,r){if(void 0===r)return super.on(e,t);let i="string"==typeof t?[t]:t,n=this._createDelegatedListener(e,i,r);for(let t in this._saveDelegatedListener(e,n),n.delegates)this.on(t,n.delegates[t]);return{unsubscribe:()=>{this._removeDelegatedListener(e,i,r)}}}once(e,t,r){if(void 0===r)return super.once(e,t);let i="string"==typeof t?[t]:t,n=this._createDelegatedListener(e,i,r);for(let t in n.delegates){let o=n.delegates[t];n.delegates[t]=(...t)=>{this._removeDelegatedListener(e,i,r),o(...t)}}for(let t in this._saveDelegatedListener(e,n),n.delegates)this.once(t,n.delegates[t]);return this}off(e,t,r){return void 0===r?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,r),this)}queryRenderedFeatures(e,r){let i;if(!this.style)return[];let n=e instanceof t.P||Array.isArray(e),o=n?e:[[0,0],[this.transform.width,this.transform.height]];if(r||(r=(n?{}:e)||{}),o instanceof t.P||"number"==typeof o[0])i=[t.P.convert(o)];else{let e=t.P.convert(o[0]),r=t.P.convert(o[1]);i=[e,new t.P(r.x,e.y),r,new t.P(e.x,r.y),e]}return this.style.queryRenderedFeatures(i,r,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,r){return!1!==(r=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._val
968idateStyle},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(null==t)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var r,i,n;if(null==(r=this._diffStyleRequest)||r.abort(),this._diffStyleRequest=null,t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(e,t));let o=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new t3(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,o):this.style.loadJSON(e,t,o)):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),null==(n=null==(i=this.style)?void 0:i.projection)||n.destroy(),delete this.style),this}_lazyInitEmptyStyle(){this.style||(this.style=new t3(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){return t._(this,void 0,void 0,function*(){var i;if(null==(i=this._diffStyleRequest)||i.abort(),"string"==typeof e){this._diffStyleRequest=new AbortController;let i=this._diffStyleRequest;try{let n=yield this._requestManager.transformRequest(e,"Style");if(i.signal.aborted)return void(this._diffStyleRequest=null);let o=yield t.k(n,i);this._diffStyleRequest=null,this._updateDiff(o.data,r)}catch(e){this._diffStyleRequest=null,t.$(e)||this.fire(new t.l(t.d(e)))}}else"object"==typeof e&&(this._diffStyleRequest=null,this._updateDiff(e,r))})}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(i){t.w(`Unable to perform style diff: ${t.d(i).message}.  Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){var r;let i=null==(r=this.style)?void 0:r.tileManagers[e];if(void 0!==i)return i.loaded();this.fire(new t.l(Error(`There is no tile manager with ID '${e}'`)))}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let r=this.style.tileManagers[e.source];if(!r)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);for(let i in null===this.terrain&&r.reload(),this.style._layers){let r=this.style._layers[i];"hillshade"===r.type&&r.source===e.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),"color-relief"===r.type&&r.source===e.source&&t.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new nO(this.painter,r,e),this.painter.renderToTexture=new nL(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=t=>{var r;"style"===t.dataType?this.terrain.tileManager.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),"image"===(null==(r=t.source)?void 0:r.type)?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(t.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGroun
968d&&this.transform.setElevation(0);return this.fire(new t.n("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!=(t=null==(e=this.terrain)?void 0:e.options)?t:null}areTilesLoaded(){var e;for(let t of Object.values(null==(e=this.style)?void 0:e.tileManagers))if(!t.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}setSourceTileLodParams(e,t,r){if(r){let i=this.getSource(r);if(!i)throw Error(`There is no source with ID "${r}", cannot set LOD parameters`);i.calculateTileZoom=eb(Math.max(1,e),Math.max(1,t))}else for(let r in this.style.tileManagers)this.style.tileManagers[r].getSource().calculateTileZoom=eb(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,r){let i=this.style.tileManagers[e];if(!i)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);void 0===r?i.reload(!0):i.refreshTiles(r.map(e=>new t.aa(e.z,e.x,e.y)))}addImage(e,r,i={}){let{pixelRatio:n=1,sdf:o=!1,stretchX:a,stretchY:s,content:l,textFitWidth:u,textFitHeight:c}=i;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||t.b(r))){if(void 0===r.width||void 0===r.height)return this.fire(new t.l(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`")));{let{width:i,height:h,data:d}=r;return this.style.addImage(e,{data:new t.R({width:i,height:h},new Uint8Array(d)),pixelRatio:n,stretchX:a,stretchY:s,content:l,textFitWidth:u,textFitHeight:c,sdf:o,version:0,userImage:r}),r.onAdd&&r.onAdd(this,e),this}}{let{width:i,height:h,data:d}=v.getImageData(r);this.style.addImage(e,{data:new t.R({width:i,height:h},d),pixelRatio:n,stretchX:a,stretchY:s,content:l,textFitWidth:u,textFitHeight:c,sdf:o,version:0})}}updateImage(e,r){let i=this.style.getImage(e);if(!i)return this.fire(new t.l(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:n,height:o,data:a}=r instanceof HTMLImageElement||t.b(r)?v.getImageData(r):r;if(void 0===n||void 0===o)return this.fire(new t.l(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(n!==i.data.width||o!==i.data.height)return this.fire(new t.l(Error("The width and height of the updated image must be that same as the previous version of the image")));let s=!(r instanceof HTMLImageElement||t.b(r));return i.data.replace(a,s),this.style.updateImage(e,i),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.l(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return t._(this,void 0,void 0,function*(){return p.getImage((yield this._requestManager.transformRequest(e,"Image")),new AbortController)})}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,i={}){return this.style.setPaintProperty(e,t,r,i),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,i={}){return this.style.setLayoutProperty(e,t,r,i),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,e=>{e||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,e=>{e||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupResizeObserver(){var e;let t=!1,r=iF(e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())},50),i=null!=(e=this._ownerWindow.ResizeObserver)?e:ResizeObserver;this._resizeObserver=new i(e=>{t?r(e):t=!0}),this._resizeObserver.observe(this._container)}
968_resolveContainer(e){if("string"==typeof e){let t=document.getElementById(e);if(!t)throw Error(`Container '${e}' not found.`);return t}if(e instanceof HTMLElement||e&&"object"==typeof e&&1===e.nodeType)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=x.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=x.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let r=this._containerDimensions(),i=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],i);let n=this._controlContainer=x.create("div","maplibregl-control-container",e),o=this._controlPositions={};for(let e of["top-left","top-right","bottom-left","bottom-right"])o[e]=x.create("div",`maplibregl-ctrl-${e} `,n);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,t,r){this._canvas.width=Math.floor(r*e),this._canvas.height=Math.floor(r*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",r=>{t={requestedAttributes:e},r&&(t.statusMessage=r.statusMessage,t.type=r.type)},{once:!0});let r=null;if(!(r=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,e):this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e))){let e="Failed to initialize WebGL";throw t?(t.message=e,Error(JSON.stringify(t))):Error(e)}this.painter=new iB(r,this.transform)}migrateProjection(e,r){super.migrateProjection(e,r),this.painter.transform=e,this.fire(new t.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var t;return(null==(t=this.style)?void 0:t._loaded)&&(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint()),this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var r,i,n,o,a,s;let l=this._idleTriggered?this._fadeDuration:0,u=(null==(r=this.style.projection)?void 0:r.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let c=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this.transform.zoom,r=_();this.style.zoomHistory.update(e,r);let i=new t.J(e,{now:r,fadeDuration:l,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),n=i.crossFadingFactor();1===n&&n===this._crossFadingFactor||(c=!0,this._crossFadingFactor=n),this.style.update(i)}let h=(null==(i=this.style.projection)?void 0:i.transitionState)>0!==u;null==(n=this.style.projection)||n.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState(null==(o=this.style.projection)?void 0:o.transitionState,null==(a=this.style.projection)?void 0:a.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||h)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=null==(s=this.style)?void 0:s._updatePlacement(this.transform,this.showCollisionBoxes,l,this._crossSourceCollisions,h),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:l,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new t.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.n("load"))),this.style&&(this.style.hasTransitions()||c)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.n("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e,r;for(let e of(this._hash&&this._hash.remove(),this._controls))e.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),null==(e=this._diffStyleRequest)||e.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"u">typeof window&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),null==(r=this._resizeObserver)||r.disconnect();let i=this.painter.context.gl.getExtension("WEBGL_lose_context");(null==i?void 0:i.loseContext)&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new t.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,v.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(e){if(!t.$(e)&&e.message!==ia)throw e}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return g}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},nz={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};
968class nN{constructor(e,r,i=!1){this.mousedown=e=>{this.startMove(e,x.mousePos(this.element,e)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=e=>{this.move(e,x.mousePos(this.element,e))},this.mouseup=e=>{this._rotatePitchHandler.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=x.touchPos(this.element,e.targetTouches)[0],this.startMove(e,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=x.touchPos(this.element,e.targetTouches)[0],this.move(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=r;let n=new i9;this._rotatePitchHandler=new i4({clickTolerance:3,move:(e,n)=>{let o=r.getBoundingClientRect(),a=new t.P((o.bottom-o.top)/2,(o.right-o.left)/2);return{bearingDelta:t.cx(new t.P(e.x,n.y),n,a),pitchDelta:i?-.5*(n.y-e.y):void 0}},moveStateManager:n,enable:!0,assignEvents:()=>{}}),this.map=e,r.addEventListener("mousedown",this.mousedown),r.addEventListener("touchstart",this.touchstart,{passive:!1}),r.addEventListener("touchcancel",this.reset)}startMove(e,t){this._rotatePitchHandler.dragStart(e,t),x.disableDrag()}move(e,t){let r=this.map,{bearingDelta:i,pitchDelta:n}=this._rotatePitchHandler.dragMove(e,t)||{};i&&r.setBearing(r.getBearing()+i),n&&r.setPitch(r.getPitch()+n)}off(){let e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){x.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}function nG(e,r,i,n=!1){if(n||!i.getCoveringTilesDetailsProvider().allowWorldCopies())return null==e?void 0:e.wrap();let o=new t.W(e.lng,e.lat);if(e=new t.W(e.lng,e.lat),r){let n=new t.W(e.lng-360,e.lat),o=new t.W(e.lng+360,e.lat),a=i.locationToScreenPoint(e).distSqr(r);i.locationToScreenPoint(n).distSqr(r)<a?e=n:i.locationToScreenPoint(o).distSqr(r)<a&&(e=o)}for(;Math.abs(e.lng-i.center.lng)>180;){let t=i.locationToScreenPoint(e);if(t.x>=0&&t.y>=0&&t.x<=i.width&&t.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e.lng!==o.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(e))?e:o}let nV={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%)"};function nU(e,t,r){let i=e.classList;for(let e in nV)i.remove(`maplibregl-${r}-anchor-${e}`);i.add(`maplibregl-${r}-anchor-${t}`)}class nH extends t.E{constructor(e){if(super(),this._onClick=e=>{this.fire(new t.n("click",{originalEvent:e}))},this._onKeyPress=e=>{"Space"!==e.code&&"Enter"!==e.code||this.togglePopup()},this._onMapClick=e=>{let t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()},this._update=e=>{if(!this._map)return;let t=this._map.loaded()&&!this._map.isMoving();"terrain"!==(null==e?void 0:e.type)&&("render"!==(null==e?void 0:e.type)||t)||this._map.once("render",this._update),this._lngLat=nG(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let r="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?r=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(r=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),this._element.style.transform=`${nV[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${r}`,v.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity("moveend"===(null==e?void 0:e.type))}).catch(()=>{})},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.n("dragstart"))),this.fire(new t.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.n("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=(null==e?void 0:e.anchor)||"center",this._color=(null==e?void 0:e.color)||"#3FB1CE",this._scale=(null==e?void 0:e.scale)||1,this._draggable=(null==e?void 0:e.draggable)||!1,this._clickTolerance=(null==e?void 0:e.clickTolerance)||0,this._subpixelPositioning=(null==e?void 0:e.subpixelPositioning)||!1,this._isDragging=!1,this._state="inactive",this._rotation=(null==e?void 0:e.rotation)||0,this._rotationAlignment=(null==e?void 0:e.rotationAlignment)||"auto",this._pitchAlignment=(null==e?void 0:e.pitchAlignment)&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(null==e?void 0:e.opacity,null==e?void 0:e.opacityWhenCovered),null==e?void 0:e.element)this._element=e.element,this._offset=t.P.convert((null==e?void 0:e.offset)||[0,0]);else{this._defaultMarker=!0,this._element=x.create("div");let r=x.createNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height","41px"),r.setAttributeNS(null,"width","27px"),r.setAttributeNS(null,"viewBox","0 0 27 41");let i=x.createNS("http://www.w3.org/2000/svg","g");
968i.setAttributeNS(null,"stroke","none"),i.setAttributeNS(null,"stroke-width","1"),i.setAttributeNS(null,"fill","none"),i.setAttributeNS(null,"fill-rule","evenodd");let n=x.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"fill-rule","nonzero");let o=x.createNS("http://www.w3.org/2000/svg","g");for(let e of(o.setAttributeNS(null,"transform","translate(3.0, 29.0)"),o.setAttributeNS(null,"fill","#000000"),[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}])){let t=x.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),o.appendChild(t)}let a=x.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"fill",this._color);let s=x.createNS("http://www.w3.org/2000/svg","path");s.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),a.appendChild(s);let l=x.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"opacity","0.25"),l.setAttributeNS(null,"fill","#000000");let u=x.createNS("http://www.w3.org/2000/svg","path");u.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),l.appendChild(u);let c=x.createNS("http://www.w3.org/2000/svg","g");c.setAttributeNS(null,"transform","translate(6.0, 7.0)"),c.setAttributeNS(null,"fill","#FFFFFF");let h=x.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"transform","translate(8.0, 8.0)");let d=x.createNS("http://www.w3.org/2000/svg","circle");d.setAttributeNS(null,"fill","#000000"),d.setAttributeNS(null,"opacity","0.25"),d.setAttributeNS(null,"cx","5.5"),d.setAttributeNS(null,"cy","5.5"),d.setAttributeNS(null,"r","5.4999962");let p=x.createNS("http://www.w3.org/2000/svg","circle");p.setAttributeNS(null,"fill","#FFFFFF"),p.setAttributeNS(null,"cx","5.5"),p.setAttributeNS(null,"cy","5.5"),p.setAttributeNS(null,"r","5.4999962"),h.appendChild(d),h.appendChild(p),n.appendChild(o),n.appendChild(a),n.appendChild(l),n.appendChild(c),n.appendChild(h),r.appendChild(n),r.setAttributeNS(null,"height",41*this._scale+"px"),r.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(r),this._offset=t.P.convert((null==e?void 0:e.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),nU(this._element,this._anchor,"marker"),null==e?void 0:e.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.W.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let t=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[
9680,-38.1],"bottom-left":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered||e&&(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map))),this}_updateOpacity(e=!1){var r,i;let n=null==(r=this._map)?void 0:r.terrain,o=this._map.transform.isLocationOccluded(this._lngLat);if(!n||o){let e=o?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==e&&(this._element.style.opacity=e,this._element.classList.toggle("maplibregl-marker-covered",o)))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let a=this._map,s=a.terrain.depthAtPoint(this._pos),l=a.terrain.getElevationForLngLat(this._lngLat,a.transform);if(a.transform.lngLatToCameraDepth(this._lngLat,l)-s<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let u=-this._offset.y/a.transform.pixelsPerMeter,c=Math.sin(a.getPitch()*Math.PI/180)*u,h=a.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),d=a.transform.lngLatToCameraDepth(this._lngLat,l+c)-h>.006;(null==(i=this._popup)?void 0:i.isOpen())&&d&&this._popup.remove(),this._element.style.opacity=d?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",d)}getOffset(){return this._offset}setOffset(e){return this._offset=t.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(void 0===this._opacity||void 0===e&&void 0===t)&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=String(e)),void 0!==t&&(this._opacityWhenCovered=String(t)),this._map&&this._updateOpacity(!0),this}}let nW={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},nq=0,nZ=!1,n$={maxWidth:100,unit:"metric"};function nK(e,t,r){let i=(null==r?void 0:r.maxWidth)||100,n=e._container.clientHeight/2,o=e._container.clientWidth/2,a=e.unproject([o-i/2,n]),s=e.unproject([o+i/2,n]),l=Math.min(i,Math.round(e.project(s).x-e.project(a).x),e._container.clientWidth),u=a.distanceTo(s);if("imperial"===(null==r?void 0:r.unit)){let r=3.2808*u;r>5280?nX(t,l,r/5280,e._getUIString("ScaleControl.Miles")):nX(t,l,r,e._getUIString("ScaleControl.Feet"))}else"nautical"===(null==r?void 0:r.unit)?nX(t,l,u/1852,e._getUIString("ScaleControl.NauticalMiles")):u>=1e3?nX(t,l,u/1e3,e._getUIString("ScaleControl.Kilometers")):nX(t,l,u,e._getUIString("ScaleControl.Meters"))}function nX(e,t,r,i){var n;let o,a,s,l=(o=Math.pow(10,`${Math.floor(r)}`.length-1),a=r/o,o*(a=a>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:(s=Math.pow(10,Math.ceil(-Math.log(n=a)/Math.LN10)),Math.round(n*s)/s)));e.style.width=l/r*t+"px",e.innerHTML=`${l}&nbsp;${i}`}let nY={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0};
968e.AJAXError=t.cG,e.EXTENT=t.a6,e.Event=t.n,e.Evented=t.E,e.LngLat=t.W,e.MercatorCoordinate=t.a7,e.Point=t.P,e.addProtocol=t.cH,e.config=t.c,e.removeProtocol=t.cI,e.AttributionControl=nE,e.BoxZoomHandler=i0,e.CanvasSource=ei,e.CooperativeGesturesHandler=n_,e.DoubleClickZoomHandler=nf,e.DragPanHandler=ny,e.DragRotateHandler=nv,e.EdgeInsets=th,e.FullscreenControl=class extends t.E{constructor(e={}){var r;super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;null==(e=null==t?void 0:t.shadowRoot)?void 0:e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=null!=(r=e.pseudo)&&r,(null==e?void 0:e.container)&&(e.container instanceof HTMLElement?this._container=e.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=x.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);x.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=ee,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.n("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.n("geolocate",e)),this._finish()}},this._updateCamera=e=>{let r=new t.W(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,n=this._map.getBearing(),o=t.e({bearing:n},this.options.fitBoundsOptions),a=W.fromLngLat(r,i);this._map.fitBounds(a,o,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let r=new t.W(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=e=>{if(this._map){if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&nZ)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.n("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=e=>{if(!this._map)return;let r=(null==e?void 0:e[0])instanceof ResizeObserverEntry;e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||r||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.n("trackuserlocationend")),this.fire(new t.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>{e.preventDefault()}),this._geolocateButton=x.create("button","maplibregl-ctrl-geolocate",this._container),x.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
968se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new nH({element:this._dotElement}),this._circleElement=x.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new nH({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=t.e({},nW,e)}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(e=!1){if(void 0!==u&&!e)return u;if(void 0===window.navigator.permissions)return u=!!window.navigator.geolocation;try{let e=yield window.navigator.permissions.query({name:"geolocation"});u="denied"!==e.state}catch(e){u=!!window.navigator.geolocation}return u})})().then(e=>this._finishSetupUI(e)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.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("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,nq=0,nZ=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitude<t.getWest()||r.longitude>t.getEast()||r.latitude<t.getSouth()||r.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&e))return;let t=this._map.project(e),r=this._map.unproject([t.x+100,t.y]),i=e.distanceTo(r)/100,n=2*this._accuracy/i;this._circleElement.style.width=`${n.toFixed(2)}px`,this._circleElement.style.height=`${n.toFixed(2)}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":nq--,nZ=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.n("trackuserlocationstart")),this.fire(new t.n("userlocationfocus"));break;default:throw Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++nq>1?(e={maximumAge:6e5,timeout:0},nZ=!0):(e=this.options.positionOptions,nZ=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","fal
968se"),this.options.showUserLocation&&this._updateMarker(null)}},e.GlobeControl=class{constructor(){this._toggleProjection=()=>{var e;let t=null==(e=this._map.getProjection())?void 0:e.type;this._map.setProjection("mercator"!==t&&t?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),"globe"===(null==(e=this._map.getProjection())?void 0:e.type)?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=x.create("button","maplibregl-ctrl-globe",this._container),x.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},e.Hash=ij,e.ImageSource=et,e.KeyboardHandler=nc,e.LngLatBounds=W,e.LogoControl=nP,e.Map=nj,e.MapLibreMap=nj,e.MapMouseEvent=i$,e.MapTouchEvent=iK,e.MapWheelEvent=iX,e.Marker=nH,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),r=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,t)=>{let r=this._map._getUIString(`NavigationControl.${t}`);e.title=r,e.setAttribute("aria-label",r)},this.options=t.e({},nz,e),this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),x.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),x.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=x.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nN(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=x.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},e.Popup=class extends t.E{constructor(e){super(),this._updateOpacity=()=>{void 0!==this.options.locationOccludedOpacity&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.n("close"))),this),this._update=e=>{let r;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=x.create("div","maplibregl-popup",this._map.getContainer()),this._tip=x.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=nG(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),e&&"point"in e&&e.point&&(r=e.point),this._trackPointer&&!r)return;let i=this._flatPos=this._pos=this._trackPointer&&r?r:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&r?r:this._map.transform.locationToScreenPoint(this._lngLat));let n=this.options.anchor,o=function e(r){if(r){if("number"==typeof r){let e=Math.round(Math.abs(r)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,r),"top-left":new t.P(e,e),"top-right":new t.P(-e,e),bottom:new t.P(0,-r),"bottom-left":new t.P(e,-e),"bottom-right":new t.P(-e,-e),left:new t.P(r,0),right:new t.P(-r,0)}}if(r instanceof t.P||Array.isArray(r)){let e=t.P.convert(r);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:t.P.convert(r.center||[0,0]),top:t.P.convert(r.top||[0,0]),"top-left":t.P.convert(r["top-left"]||[0,0]),"top-right":t.P.convert(r["top-right"]||[0,0]),bottom:t.P.convert(r.bottom||[0,0]),"bottom-left":t.P.convert(r["bottom-left"]||[0,0]),"bottom-right":t.P.convert(r["bottom-right"]||[0,0]),left:t.P.convert(r.left||[0,0]),right:t.P.convert(r.right||[0,0])}}return e(new t.P(0,0))}(this.options.offset);if(!n){var a,s,l,u,c;let e,t=this._container.offsetWidth,r=this._container.offsetHeight,h=(a=this.options.padding)?{top:null!=(s=a.top)?s:0,right:null!=(l=a.right)?l:0,bottom:null!=(u=a.bottom)?u:0,left:null!=(c=a.left)?c:0}:{top:0,right:0,bottom:0,left:0};e=i.y+o.bottom.y<r+h.top?["top"]:i.y>this._map.transform.height-r-h.bottom?["bottom"]:[],i.x<t/2+h.left?e.push("left"):i.x>this._map.transform.width-t/2-h.right&&e.push("right"),n=0===e.length?"bottom":e.join("-")}let h=i.add(o[n]);this.options.subpixelPositioning||(h=h.round()),this._container.style.transform=`${nV[n]} translate(${h.x}px,${h.y}px)`,nU(this._container,n,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(nY),e)}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.W.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t,r=document.createDocumentFragment(),i=document.createElement("body");for(i.innerHTML=e;t=i.firstChild;)r.appendChild(t);return this.setDOMContent(r)}getMaxWidth(){var e;return null==(e=this._container)?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=x.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}setPadding(e){this.options.padding=e,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=x.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;
968let e=this._container.querySelector("a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])");e&&e.focus()}},e.RasterDEMTileSource=K,e.RasterTileSource=$,e.ScaleControl=class{constructor(e){this._onMove=()=>{nK(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,nK(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},n$),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=np,e.Style=t3,e.TerrainControl=class{constructor(e){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=e}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=x.create("button","maplibregl-ctrl-terrain",this._container),x.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=nu,e.TwoFingersTouchRotateHandler=ns,e.TwoFingersTouchZoomHandler=no,e.TwoFingersTouchZoomRotateHandler=nb,e.VectorTileSource=Z,e.VideoSource=er,e.addSourceType=(e,r)=>t._(void 0,void 0,void 0,function*(){if(eo(e))throw Error(`A source type called "${e}" already exists.`);en[e]=r}),e.clearPrewarmedResources=function(){let e=a;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(B),a=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()"))},e.createTileMesh=tM,e.getGlobalDispatcher=G,e.getMaxParallelImageRequests=function(){return t.c.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return eu().getRTLTextPluginStatus()},e.getVersion=function(){return g},e.getWorkerCount=function(){return F.workerCount},e.getWorkerUrl=function(){return t.c.WORKER_URL},e.importScriptInWorkers=function(e){return G().broadcast("IS",e)},e.isTimeFrozen=function(){return b.isFrozen()},e.now=_,e.prewarm=function(){z().acquire(B)},e.restoreNow=function(){b.restoreNow()},e.setMaxParallelImageRequests=function(e){t.c.MAX_PARALLEL_IMAGE_REQUESTS=e},e.setNow=function(e){b.setNow(e)},e.setRTLTextPlugin=function(e,t){return eu().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){F.workerCount=e},e.setWorkerUrl=function(e){t.c.WORKER_URL=e}}),e}()},27139(e){e.exports={nanoid:(e=21)=>{let t="",r=0|e;for(;r-- >0;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let i="",n=0|r;for(;n-- >0;)i+=e[Math.random()*e.length|0];return i}}},69932(e,t,r){"use strict";function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(null,arguments)}r.d(t,{A:()=>i})},12975(e,t,r){"use strict";function i(e,t){if(null==e)return{};var r={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;
968r[i]=e[i]}return r}r.d(t,{A:()=>i})},70506(e,t,r){"use strict";let i;r.d(t,{UE:()=>e_,ll:()=>ef,rD:()=>eA,UU:()=>ey,jD:()=>eb,ER:()=>ex,cY:()=>em,BN:()=>eg,Ej:()=>ev});let n=["top","right","bottom","left"],o=Math.min,a=Math.max,s=Math.round,l=Math.floor,u=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"};function h(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function f(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}function g(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function y(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let v=["left","right"],b=["right","left"],_=["top","bottom"],x=["bottom","top"];function A(e){let t=d(e);return c[t]+e.slice(t.length)}function w(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function S(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function T(e,t,r){let i,{reference:n,floating:o}=e,a=g(t),s=f(g(t)),l=m(s),u=d(t),c="y"===a,h=n.x+n.width/2-o.width/2,y=n.y+n.height/2-o.height/2,v=n[l]/2-o[l]/2;switch(u){case"top":i={x:h,y:n.y-o.height};break;case"bottom":i={x:h,y:n.y+n.height};break;case"right":i={x:n.x+n.width,y:y};break;case"left":i={x:n.x-o.width,y:y};break;default:i={x:n.x,y:n.y}}switch(p(t)){case"start":i[s]-=v*(r&&c?-1:1);break;case"end":i[s]+=v*(r&&c?-1:1)}return i}async function C(e,t){var r;void 0===t&&(t={});let{x:i,y:n,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=h(t,e),m=w(f),g=s[p?"floating"===d?"reference":"floating":d],y=S(await o.getClippingRect({element:null==(r=await (null==o.isElement?void 0:o.isElement(g)))||r?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v="floating"===d?{x:i,y:n,width:a.floating.width,height:a.floating.height}:a.reference,b=await (null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),_=await (null==o.isElement?void 0:o.isElement(b))&&await (null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},x=S(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-x.top+m.top)/_.y,bottom:(x.bottom-y.bottom+m.bottom)/_.y,left:(y.left-x.left+m.left)/_.x,right:(x.right-y.right+m.right)/_.x}}let E=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:a}=r,s=a.detectOverflow?a:{...a,detectOverflow:C},l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:h}=T(u,i,l),d=i,p=0,f={};for(let r=0;r<o.length;r++){let m=o[r];if(!m)continue;let{name:g,fn:y}=m,{x:v,y:b,data:_,reset:x}=await y({x:c,y:h,initialPlacement:i,placement:d,strategy:n,middlewareData:f,re
968cts:u,platform:s,elements:{reference:e,floating:t}});c=null!=v?v:c,h=null!=b?b:h,f[g]={...f[g],..._},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(u=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:n}):x.rects),{x:c,y:h}=T(u,d,l)),r=-1)}return{x:c,y:h,placement:d,strategy:n,middlewareData:f}};function P(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function I(e){return n.some(t=>e[t]>=0)}let M=new Set(["left","top"]);async function k(e,t){let{placement:r,platform:i,elements:n}=e,o=await (null==i.isRTL?void 0:i.isRTL(n.floating)),a=d(r),s=p(r),l="y"===g(r),u=M.has(a)?-1:1,c=o&&l?-1:1,f=h(t,e),{mainAxis:m,crossAxis:y,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof v&&(y="end"===s?-1*v:v),l?{x:y*c,y:m*u}:{x:m*u,y:y*c}}function O(){return"u">typeof window}function D(e){return B(e)?(e.nodeName||"").toLowerCase():"#document"}function R(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(B(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function B(e){return!!O()&&(e instanceof Node||e instanceof R(e).Node)}function F(e){return!!O()&&(e instanceof Element||e instanceof R(e).Element)}function j(e){return!!O()&&(e instanceof HTMLElement||e instanceof R(e).HTMLElement)}function z(e){return!(!O()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof R(e).ShadowRoot)}function N(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&"inline"!==n&&"contents"!==n}function G(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let V=/transform|translate|scale|rotate|perspective|filter/,U=/paint|layout|strict|content/,H=e=>!!e&&"none"!==e;function W(e){let t=F(e)?$(e):e;return H(t.transform)||H(t.translate)||H(t.scale)||H(t.rotate)||H(t.perspective)||!q()&&(H(t.backdropFilter)||H(t.filter))||V.test(t.willChange||"")||U.test(t.contain||"")}function q(){return null==i&&(i="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),i}function Z(e){return/^(html|body|#document)$/.test(D(e))}function $(e){return R(e).getComputedStyle(e)}function K(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if("html"===D(e))return e;let t=e.assignedSlot||e.parentNode||z(e)&&e.host||L(e);return z(t)?t.host:t}function Y(e,t,r){var i;void 0===t&&(t=[]),void 0===r&&(r=!0);let n=function e(t){let r=X(t);return Z(r)?t.ownerDocument?t.ownerDocument.body:t.body:j(r)&&N(r)?r:e(r)}(e),o=n===(null==(i=e.ownerDocument)?void 0:i.body),a=R(n);if(!o)return t.concat(n,Y(n,[],r));{let e=Q(a);return t.concat(a,a.visualViewport||[],N(n)?n:[],e&&r?Y(e):[])}}function Q(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function J(e){let t=$(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=j(e),o=n?e.offsetWidth:r,a=n?e.offsetHeight:i,l=s(r)!==o||s(i)!==a;return l&&(r=o,i=a),{width:r,height:i,$:l}}function ee(e){return F(e)?e:e.contextElement}function et(e){let t=ee(e);if(!j(t))return u(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=J(t),a=(o?s(r.width):r.width)/i,l=(o?s(r.height):r.height)/n;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let er=u(0);function ei(e){let t=R(e);return q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:er}function en(e,t,r,i){var n;void 0===t&&(t=!1),void 0===r&&(r=!1);let o=e.getBoundingClientRect(),a=ee(e),s=u(1);t&&(i?F(i)&&(s=et(i)):s=et(e));let l=(void 0===(n=r)&&(n=!1),i&&(!n||i===R(a))&&n)?ei(a):u(0),c=(o.left+l.x)/s.x,h=(o.top+l.y)/s.y,d=o.width/s.x,p=o.height/s.y;if(a){let e=R(a),t=i&&F(i)?R(i):i,r=e,n=Q(r);for(;n&&i&&t!==r;){let e=et(n),t=n.getBoundingClientRect(),i=$(n),o=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,a=t.to
968p+(n.clientTop+parseFloat(i.paddingTop))*e.y;c*=e.x,h*=e.y,d*=e.x,p*=e.y,c+=o,h+=a,n=Q(r=R(n))}}return S({width:d,height:p,x:c,y:h})}function eo(e,t){let r=K(e).scrollLeft;return t?t.left+r:en(L(e)).left+r}function ea(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-eo(e,r),y:r.top+t.scrollTop}}function es(e,t,r){var i;let n;if("viewport"===t)n=function(e,t){let r=R(e),i=L(e),n=r.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,l=0;if(n){o=n.width,a=n.height;let e=q();(!e||e&&"fixed"===t)&&(s=n.offsetLeft,l=n.offsetTop)}let u=eo(i);if(u<=0){let e=i.ownerDocument,t=e.body,r=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(i.clientWidth-t.clientWidth-n);a<=25&&(o-=a)}else u<=25&&(o+=u);return{width:o,height:a,x:s,y:l}}(e,r);else if("document"===t){let t,r,o,s,l,u,c;i=L(e),t=L(i),r=K(i),o=i.ownerDocument.body,s=a(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=a(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),u=-r.scrollLeft+eo(i),c=-r.scrollTop,"rtl"===$(o).direction&&(u+=a(t.clientWidth,o.clientWidth)-s),n={width:s,height:l,x:u,y:c}}else if(F(t)){let e,i,o,a,s;i=(e=en(t,!0,"fixed"===r)).top+t.clientTop,o=e.left+t.clientLeft,a=j(t)?et(t):u(1),s=t.clientWidth*a.x,n={width:s,height:t.clientHeight*a.y,x:o*a.x,y:i*a.y}}else{let r=ei(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return S(n)}function el(e){return"static"===$(e).position}function eu(e,t){if(!j(e)||"fixed"===$(e).position)return null;if(t)return t(e);let r=e.offsetParent;return L(e)===r&&(r=r.ownerDocument.body),r}function ec(e,t){var r;let i=R(e);if(G(e))return i;if(!j(e)){let t=X(e);for(;t&&!Z(t);){if(F(t)&&!el(t))return t;t=X(t)}return i}let n=eu(e,t);for(;n&&(r=n,/^(table|td|th)$/.test(D(r)))&&el(n);)n=eu(n,t);return n&&Z(n)&&el(n)&&!W(n)?i:n||function(e){let t=X(e);for(;j(t)&&!Z(t);){if(W(t))return t;if(G(t))break;t=X(t)}return null}(e)||i}let eh=async function(e){let t=this.getOffsetParent||ec,r=this.getDimensions,i=await r(e.floating);return{reference:function(e,t,r){let i=j(t),n=L(t),o="fixed"===r,a=en(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=u(0);if(i||!i&&!o)if(("body"!==D(t)||N(n))&&(s=K(t)),i){let e=en(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=eo(n));o&&!i&&n&&(l.x=eo(n));let c=!n||i||o?u(0):ea(n,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},ed={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o="fixed"===n,a=L(i),s=!!t&&G(t.floating);if(i===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},c=u(1),h=u(0),d=j(i);if((d||!d&&!o)&&(("body"!==D(i)||N(a))&&(l=K(i)),d)){let e=en(i);c=et(i),h.x=e.x+i.clientLeft,h.y=e.y+i.clientTop}let p=!a||d||o?u(0):ea(a,l);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+h.x+p.x,y:r.y*c.y-l.scrollTop*c.y+h.y+p.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[..."clippingAncestors"===r?G(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let i=Y(e,[],!1).filter(e=>F(e)&&"body"!==D(e)),n=null,o="fixed"===$(e).position,a=o?X(e):e;for(;F(a)&&!Z(a);){let t=$(a),r=W(a);r||"fixed"!==t.position||(n=null),(o?r||n:!(!r&&"static"===t.position&&n&&("absolute"===n.position||"fixed"===n.position)||N(a)&&!r&&function e(t,r){let i=X(t);return!(i===r||!F(i)||Z(i))&&("fixed"===$(i).position||e(i,r))}(e,a)))?n=t:i=i.filter(e=>e!==a),a=X(a)}return t.set(e,i),i}(t,this._c):[].concat(r),i],l=es(t,s[0],n),u=l.top,c=l.right,h=l.bottom,d=l.left;for(let e=1;e<s.length;e++){let r=es(t,s[e],n);u=a(r.top,u),c=o(r.right,c),h=o(r.bottom,h),d=a(r.left,d)}return{width:c-d,height:h-u,x:d,y:u}},getOffsetParent:ec,getElementRects:eh,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=J(e);return{width:t,height:r}},getScale:et,isElement:F,isRTL:function(e){return"rtl"===$(e).direction}};function ep(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}
968function ef(e,t,r,i){let n;void 0===i&&(i={});let{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:h="function"==typeof IntersectionObserver,animationFrame:d=!1}=i,p=ee(e),f=s||u?[...p?Y(p):[],...t?Y(t):[]]:[];f.forEach(e=>{s&&e.addEventListener("scroll",r,{passive:!0}),u&&e.addEventListener("resize",r)});let m=p&&h?function(e,t){let r,i=null,n=L(e);function s(){var e;clearTimeout(r),null==(e=i)||e.disconnect(),i=null}return!function u(c,h){void 0===c&&(c=!1),void 0===h&&(h=1),s();let d=e.getBoundingClientRect(),{left:p,top:f,width:m,height:g}=d;if(c||t(),!m||!g)return;let y={rootMargin:-l(f)+"px "+-l(n.clientWidth-(p+m))+"px "+-l(n.clientHeight-(f+g))+"px "+-l(p)+"px",threshold:a(0,o(1,h))||1},v=!0;function b(t){let i=t[0].intersectionRatio;if(i!==h){if(!v)return u();i?u(!1,i):r=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==i||ep(d,e.getBoundingClientRect())||u(),v=!1}try{i=new IntersectionObserver(b,{...y,root:n.ownerDocument})}catch(e){i=new IntersectionObserver(b,y)}i.observe(e)}(!0),s}(p,r):null,g=-1,y=null;c&&(y=new ResizeObserver(e=>{let[i]=e;i&&i.target===p&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),r()}),p&&!d&&y.observe(p),t&&y.observe(t));let v=d?en(e):null;return d&&function t(){let i=en(e);v&&!ep(v,i)&&r(),v=i,n=requestAnimationFrame(t)}(),r(),()=>{var e;f.forEach(e=>{s&&e.removeEventListener("scroll",r),u&&e.removeEventListener("resize",r)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(n)}}let em=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,i;let{x:n,y:o,placement:a,middlewareData:s}=t,l=await k(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:o+l.y,data:{...l,placement:a}}}}},eg=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:s}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:c={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...p}=h(e,t),m={x:r,y:i},y=await s.detectOverflow(t,p),v=g(d(n)),b=f(v),_=m[b],x=m[v];if(l){let e="y"===b?"top":"left",t="y"===b?"bottom":"right",r=_+y[e],i=_-y[t];_=a(r,o(_,i))}if(u){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",r=x+y[e],i=x-y[t];x=a(r,o(x,i))}let A=c.fn({...t,[b]:_,[v]:x});return{...A,data:{x:A.x-r,y:A.y-i,enabled:{[b]:l,[v]:u}}}}}},ey=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,i,n,o,a,s;let l,u,c,{placement:w,middlewareData:S,rects:T,initialPlacement:C,platform:E,elements:P}=t,{mainAxis:I=!0,crossAxis:M=!0,fallbackPlacements:k,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:R=!0,...L}=h(e,t);if(null!=(r=S.arrow)&&r.alignmentOffset)return{};let B=d(w),F=g(C),j=d(C)===C,z=await (null==E.isRTL?void 0:E.isRTL(P.floating)),N=k||(j||!R?[A(C)]:(l=A(C),[y(C),l,y(l)])),G="none"!==D;!k&&G&&N.push(...(u=p(C),c=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?b:v;return t?v:b;case"left":case"right":return t?_:x;default:return[]}}(d(C),"start"===D,z),u&&(c=c.map(e=>e+"-"+u),R&&(c=c.concat(c.map(y)))),c));let V=[C,...N],U=await E.detectOverflow(t,L),H=[],W=(null==(i=S.flip)?void 0:i.overflows)||[];if(I&&H.push(U[B]),M){let e,t,r,i,n=(void 0===(s=z)&&(s=!1),e=p(w),r=m(t=f(g(w))),i="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",T.reference[r]>T.floating[r]&&(i=A(i)),[i,A(i)]);H.push(U[n[0]],U[n[1]])}if(W=[...W,{placement:w,overflows:H}],!H.every(e=>e<=0)){let e=((null==(n=S.flip)?void 0:n.index)||0)+1,t=V[e];if(t&&("alignment"!==M||F===g(t)||W.every(e=>g(e.placement)!==F||e.overflows[0]>0)))return{data:{index:e,overflows:W},reset:{placement:t}};let r=null==(o=W.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(O){case"bestFit":{let e=null==(a=W.filter(e=>{if(G){let t=g(e.placement);return t===F||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=C}if(w!==r)return{reset:{placement:r}}}return{}}}},ev=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,i;let n,s,{placement:l,rects:u,platform:c,elements:f}=t,{apply:m=()=>{},...y}
968=h(e,t),v=await c.detectOverflow(t,y),b=d(l),_=p(l),x="y"===g(l),{width:A,height:w}=u.floating;"top"===b||"bottom"===b?(n=b,s=_===(await (null==c.isRTL?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(s=b,n="end"===_?"top":"bottom");let S=w-v.top-v.bottom,T=A-v.left-v.right,C=o(w-v[n],S),E=o(A-v[s],T),P=!t.middlewareData.shift,I=C,M=E;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(M=T),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(I=S),P&&!_){let e=a(v.left,0),t=a(v.right,0),r=a(v.top,0),i=a(v.bottom,0);x?M=A-2*(0!==e||0!==t?e+t:a(v.left,v.right)):I=w-2*(0!==r||0!==i?r+i:a(v.top,v.bottom))}await m({...t,availableWidth:M,availableHeight:I});let k=await c.getDimensions(f.floating);return A!==k.width||w!==k.height?{reset:{rects:!0}}:{}}}},eb=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:i}=t,{strategy:n="referenceHidden",...o}=h(e,t);switch(n){case"referenceHidden":{let e=P(await i.detectOverflow(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:I(e)}}}case"escaped":{let e=P(await i.detectOverflow(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:I(e)}}}default:return{}}}}},e_=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:i,placement:n,rects:s,platform:l,elements:u,middlewareData:c}=t,{element:d,padding:y=0}=h(e,t)||{};if(null==d)return{};let v=w(y),b={x:r,y:i},_=f(g(n)),x=m(_),A=await l.getDimensions(d),S="y"===_,T=S?"clientHeight":"clientWidth",C=s.reference[x]+s.reference[_]-b[_]-s.floating[x],E=b[_]-s.reference[_],P=await (null==l.getOffsetParent?void 0:l.getOffsetParent(d)),I=P?P[T]:0;I&&await (null==l.isElement?void 0:l.isElement(P))||(I=u.floating[T]||s.floating[x]);let M=I/2-A[x]/2-1,k=o(v[S?"top":"left"],M),O=o(v[S?"bottom":"right"],M),D=I-A[x]-O,R=I/2-A[x]/2+(C/2-E/2),L=a(k,o(R,D)),B=!c.arrow&&null!=p(n)&&R!==L&&s.reference[x]/2-(R<k?k:O)-A[x]
968/2<0,F=B?R<k?R-k:R-D:0;return{[_]:b[_]+F,data:{[_]:L,centerOffset:R-L-F,...B&&{alignmentOffset:F}},reset:B}}}),ex=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:i,placement:n,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=h(e,t),c={x:r,y:i},p=g(n),m=f(p),y=c[m],v=c[p],b=h(s,t),_="number"==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){let e="y"===m?"height":"width",t=o.reference[m]-o.floating[e]+_.mainAxis,r=o.reference[m]+o.reference[e]-_.mainAxis;y<t?y=t:y>r&&(y=r)}if(u){var x,A;let e="y"===m?"width":"height",t=M.has(d(n)),r=o.reference[p]-o.floating[e]+(t&&(null==(x=a.offset)?void 0:x[p])||0)+(t?0:_.crossAxis),i=o.reference[p]+o.reference[e]+(t?0:(null==(A=a.offset)?void 0:A[p])||0)-(t?_.crossAxis:0);v<r?v=r:v>i&&(v=i)}return{[m]:y,[p]:v}}}},eA=(e,t,r)=>{let i=new Map,n={platform:ed,...r},o={...n.platform,_c:i};return E(e,t,{...n,platform:o})}},91054(e,t,r){"use strict";function i(e,[t,r]){return Math.min(r,Math.max(t,e))}r.d(t,{q:()=>i}),(0,Object.defineProperty)(i,"name",{value:"clamp",configurable:!0})},2690(e,t,r){"use strict";r.d(t,{mK:()=>a});var i=Object.defineProperty,n=(e,t)=>i(e,"name",{value:t,configurable:!0}),o=!!("u">typeof window&&window.document&&window.document.createElement);function a(e,t,{checkForDefaultPrevented:r=!0}={}){return n(function(i){if(e?.(i),!1===r||!i||!i.defaultPrevented)return t?.(i)},"handleEvent")}function s(e){if(!o)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}function l(e){return"IFRAME"===e.tagName}n(a,"composeEventHandlers"),n(function(e){if(!o)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window},"getOwnerWindow"),n(s,"getOwnerDocument"),n(function e(t,r=!1){let{activeElement:i}=s(t);if(!i?.nodeName)return null;if(l(i)&&i.contentDocument)return e(i.contentDocument.body,r);if(r){let e=i.getAttribute("aria-activedescendant");if(e){let t=s(i).getElementById(e);if(t)return t}}return i},"getActiveElement"),n(l,"isFrame")},62848(e,t,r){"use strict";r.d(t,{UC:()=>es,Y9:()=>eo,q7:()=>en,bL:()=>ei,l9:()=>ea});var i=r(67308),n=r(27192),o=r(93765),a=r(95768),s=r(2690),l=r(34986),u=r(79795),c=r(47307),h=r(3840),d=r(72191),p=r(38e3),f=Object.defineProperty,m=(e,t)=>f(e,"name",{value:t,configurable:!0}),g="Collapsible",[y,v]=(0,n.A)(g),[b,_]=y(g),x=i.forwardRef(m(function(e,t){let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:s,...c}=e,[h,f]=(0,l.i)({prop:n,defaultProp:o??!1,onChange:s,caller:g});return(0,p.jsx)(b,{scope:r,disabled:a,contentId:(0,d.B)(),open:h,onOpenToggle:i.useCallback(()=>f(e=>!e),[f]),children:(0,p.jsx)(u.sG.div,{"data-state":C(h),"data-disabled":a?"":void 0,...c,ref:t})})},"Collapsible")),A=i.forwardRef(m(function(e,t){let{__scopeCollapsible:r,...i}=e,n=_("CollapsibleTrigger",r);return(0,p.jsx)(u.sG.button,{type:"button","aria-controls":n.open?n.contentId:void 0,"aria-expanded":n.open||!1,"data-state":C(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...i,ref:t,onClick:(0,s.mK)(e.onClick,n.onOpenToggle)})},"CollapsibleTrigger")),w="CollapsibleContent",S=i.forwardRef(m(function(e,t){let{forceMount:r,...i}=e,n=_(w,e.__scopeCollapsible);return(0,p.jsx)(h.C,{present:r||n.open,children:({present:e})=>(0,p.jsx)(T,{...i,ref:t,present:e})})},"CollapsibleContent")),T=i.forwardRef(m(function(e,t){let{__scopeCollapsible:r,present:n,children:o,...s}=e,l=_(w,r),[h,d]=i.useState(n),f=i.useRef(null),m=(0,a.s)(t,f),g=i.useRef(0),y=g.current,v=i.useRef(0),b=v.current,x=l.open||h,A=i.useRef(x),S=i.useRef(void 0);return i.useEffect(()=>{let e=requestAnimationFrame(()=>A.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,c.N)(()=>{let e=f.current;if(e){S.current=S.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,v.current=t.width,A.current||(e.style.transitionDuration=S.current.transitionDuration,e.style.animationName=S.current.animationName),d(n)}},[l.open,n]),(0,p.jsx)(u.sG.div,{"data-state":C(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!x,...s,ref:m,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:x&&o})},"CollapsibleContentImpl"));function C(e){return e?"open":"closed"}m(C,"getState");var E=r(49457),P=Object.defineProperty,I=(e,t)=>P(e,"name",{value:t,configurable:!0}),M="Accordion",k=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[O,D,R]=(0,o.N)(M),[L,B]=(0,n.A)(M,[R,v]),F=v(),j=i.forwardRef(
968I(function(e,t){let{type:r,...i}=e;return(0,p.jsx)(O.Provider,{scope:e.__scopeAccordion,children:"multiple"===r?(0,p.jsx)(H,{...i,ref:t}):(0,p.jsx)(U,{...i,ref:t})})},"Accordion")),[z,N]=L(M),[G,V]=L(M,{collapsible:!1}),U=i.forwardRef(I(function(e,t){let{value:r,defaultValue:n,onValueChange:o=I(()=>{},"onValueChange"),collapsible:a=!1,...s}=e,[u,c]=(0,l.i)({prop:r,defaultProp:n??"",onChange:o,caller:M});return(0,p.jsx)(z,{scope:e.__scopeAccordion,value:i.useMemo(()=>u?[u]:[],[u]),onItemOpen:c,onItemClose:i.useCallback(()=>a&&c(""),[a,c]),children:(0,p.jsx)(G,{scope:e.__scopeAccordion,collapsible:a,children:(0,p.jsx)(Z,{...s,ref:t})})})},"AccordionImplSingle")),H=i.forwardRef(I(function(e,t){let{value:r,defaultValue:n,onValueChange:o=I(()=>{},"onValueChange"),...a}=e,[s,u]=(0,l.i)({prop:r,defaultProp:n??[],onChange:o,caller:M}),c=i.useCallback(e=>u((t=[])=>[...t,e]),[u]),h=i.useCallback(e=>u((t=[])=>t.filter(t=>t!==e)),[u]);return(0,p.jsx)(z,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:h,children:(0,p.jsx)(G,{scope:e.__scopeAccordion,collapsible:!0,children:(0,p.jsx)(Z,{...a,ref:t})})})},"AccordionImplMultiple")),[W,q]=L(M),Z=i.forwardRef(I(function(e,t){let{__scopeAccordion:r,disabled:n,dir:o,orientation:l="vertical",...c}=e,h=i.useRef(null),d=(0,a.s)(h,t),f=D(r),m="ltr"===(0,E.jH)(o),g=(0,s.mK)(e.onKeyDown,e=>{if(!k.includes(e.key))return;let t=e.target,r=f().filter(e=>!e.ref.current?.disabled),i=r.findIndex(e=>e.ref.current===t),n=r.length;if(-1===i)return;e.preventDefault();let o=i,a=n-1,s=I(()=>{(o=i+1)>a&&(o=0)},"moveNext"),u=I(()=>{(o=i-1)<0&&(o=a)},"movePrev");switch(e.key){case"Home":o=0;break;case"End":o=a;break;case"ArrowRight":"horizontal"===l&&(m?s():u());break;case"ArrowDown":"vertical"===l&&s();break;case"ArrowLeft":"horizontal"===l&&(m?u():s());break;case"ArrowUp":"vertical"===l&&u()}let c=o%n;r[c].ref.current?.focus()});return(0,p.jsx)(W,{scope:r,disabled:n,direction:o,orientation:l,children:(0,p.jsx)(O.Slot,{scope:r,children:(0,p.jsx)(u.sG.div,{...c,"data-orientation":l,ref:d,onKeyDown:n?void 0:g})})})},"AccordionImpl")),$="AccordionItem",[K,X]=L($),Y=i.forwardRef(I(function(e,t){let{__scopeAccordion:r,value:i,...n}=e,o=q($,r),a=N($,r),s=F(r),l=(0,d.B)(),u=i&&a.value.includes(i)||!1,c=o.disabled||e.disabled;return(0,p.jsx)(K,{scope:r,open:u,disabled:c,triggerId:l,children:(0,p.jsx)(x,{"data-orientation":o.orientation,"data-state":er(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:e=>{e?a.onItemOpen(i):a.onItemClose(i)}})})},"AccordionItem")),Q=i.forwardRef(I(function(e,t){let{__scopeAccordion:r,...i}=e,n=q(M,r),o=X("AccordionHeader",r);return(0,p.jsx)(u.sG.h3,{"data-orientation":n.orientation,"data-state":er(o.open),"data-disabled":o.disabled?"":void 0,...i,ref:t})},"AccordionHeader")),J="AccordionTrigger",ee=i.forwardRef(I(function(e,t){let{__scopeAccordion:r,...i}=e,n=q(M,r),o=X(J,r),a=V(J,r),s=F(r);return(0,p.jsx)(O.ItemSlot,{scope:r,children:(0,p.jsx)(A,{"aria-disabled":o.open&&!a.collapsible||void 0,"data-orientation":n.orientation,id:o.triggerId,...s,...i,ref:t})})},"AccordionTrigger")),et=i.forwardRef(I(function(e,t){let{__scopeAccordion:r,...i}=e,n=q(M,r),o=X("AccordionContent",r),a=F(r);return(0,p.jsx)(S,{role:"region","aria-labelledby":o.triggerId,"data-orientation":n.orientation,...a,...i,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})},"AccordionContent"));function er(e){return e?"open":"closed"}I(er,"getState");var ei=j,en=Y,eo=Q,ea=ee,es=et},93765(e,t,r){"use strict";r.d(t,{N:()=>c});var i=r(67308),n=r(27192),o=r(95768),a=r(31292),s=r(38e3),l=Object.defineProperty,u=(e,t)=>l(e,"name",{value:t,configurable:!0});function c(e){let t=e+"CollectionProvider",[r,l]=(0,n.A)(t),[c,h]=r(t,{collectionRef:{current:null},itemMap:new Map}),d=u(e=>{let{scope:t,children:r}=e,n=i.useRef(null),o=i.useRef(new Map).current;return(0,s.jsx)(c,{scope:t,itemMap:o,collectionRef:n,children:r})},"CollectionProvider");d.displayName=t;let p=e+"CollectionSlot",f=(0,a.TL)(p),m=i.forwardRef((e,t)=>
968{let{scope:r,children:i}=e,n=h(p,r),a=(0,o.s)(t,n.collectionRef);return(0,s.jsx)(f,{ref:a,children:i})});m.displayName=p;let g=e+"CollectionItemSlot",y="data-radix-collection-item",v=(0,a.TL)(g),b=i.forwardRef((e,t)=>{let{scope:r,children:n,...a}=e,l=i.useRef(null),u=(0,o.s)(t,l),c=h(g,r);return i.useEffect(()=>(c.itemMap.set(l,{ref:l,...a}),()=>void c.itemMap.delete(l))),(0,s.jsx)(v,{...{[y]:""},ref:u,children:n})});function _(t){let r=h(e+"CollectionConsumer",t);return i.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${y}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])}return b.displayName=g,u(_,"useCollection"),[{Provider:d,Slot:m,ItemSlot:b},_,l]}u(c,"createCollection");var h=new WeakMap,d=class e extends Map{static{u(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],h.set(this,!0)}set(e,t){return h.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let i,n=this.has(t),o=this.#e.length,a=m(e),s=a>=0?a:o+a,l=s<0||s>=o?-1:s;if(l===this.size||n&&l===this.size-1||-1===l)return this.set(t,r),this;let u=this.size+ +!n;a<0&&s++;let c=[...this.#e],h=!1;for(let e=s;e<u;e++)if(s===e){let o=c[e];c[e]===t&&(o=c[e+1]),n&&this.delete(t),i=this.get(o),this.set(t,r)}else{h||c[e-1]!==t||(h=!0);let r=c[h?e:e-1],n=i;i=this.get(r),this.delete(r),this.set(r,n)}return this}with(t,r,i){let n=new e(this);return n.insert(t,r,i),n}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=p(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=p(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return p(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return i;r++}}findIndex(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return r;r++}return -1}filter(t,r){let i=[],n=0;for(let e of this)Reflect.apply(t,r,[e,n,this])&&i.push(e),n++;return new e(i)}map(t,r){let i=[],n=0;for(let e of this)i.push([e[0],Reflect.apply(t,r,[e,n,this])]),n++;return new e(i)}reduce(...e){let[t,r]=e,i=0,n=r??this.at(0);for(let r of this)n=0===i&&1===e.length?r:Reflect.apply(t,this,[n,r,i,this]),i++;return n}reduceRight(...e){let[t,r]=e,i=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let n=this.at(r);i=r===this.size-1&&1===e.length?n:Reflect.apply(t,this,[i,n,r,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let i=new e,n=this.size-1;if(void 0===t)return i;t<0&&(t+=this.size),void 0!==r&&r>0&&(n=r-1);for(let e=t;e<=n;e++){let t=this.keyAt(e),r=this.get(t);i.set(t,r)}return i}every(e,t){let r=0;for(let i of this){if(!Reflect.apply(e,t,[i,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return!0;r++}return!1}};function p(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=f(e,t);return -1===r?void 0:e[r]}function f(e,t){let r=e.length,i=m(t),n=i>=0?i:r+i;return n<0||n>=r?-1:n}function m(e){return e!=e||0===e?0:Math.trunc(e)}function g(e,t){if(e===t)return!0;
968if("object"!=typeof e||"object"!=typeof t||null==e||null==t)return!1;let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let i of r)if(!Object.prototype.hasOwnProperty.call(t,i)||e[i]!==t[i])return!1;return!0}function y(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function v(e,t){return e[1].element&&t[1].element?y(e[1].element,t[1].element)?-1:1:0}function b(e){return new MutationObserver(t=>{for(let r of t)if("childList"===r.type)return void e()})}u(p,"at"),u(f,"toSafeIndex"),u(m,"toSafeInteger"),u(function(e){let t=e+"CollectionProvider",[r,l]=(0,n.A)(t),[c,h]=r(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new d,setItemMap:u(()=>void 0,"setItemMap")}),p=u(({state:e,...t})=>e?(0,s.jsx)(m,{...t,state:e}):(0,s.jsx)(f,{...t}),"CollectionProvider");p.displayName=t;let f=u(e=>{let t=T();return(0,s.jsx)(m,{...e,state:t})},"CollectionInit");f.displayName=t+"Init";let m=u(e=>{let{scope:t,children:r,state:n}=e,a=i.useRef(null),[l,u]=i.useState(null),h=(0,o.s)(a,u),[d,p]=n;return i.useEffect(()=>{if(!l)return;let e=b(()=>{});return e.observe(l,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[l]),(0,s.jsx)(c,{scope:t,itemMap:d,setItemMap:p,collectionRef:h,collectionRefObject:a,collectionElement:l,children:r})},"CollectionProviderImpl");m.displayName=t+"Impl";let y=e+"CollectionSlot",_=(0,a.TL)(y),x=i.forwardRef((e,t)=>{let{scope:r,children:i}=e,n=h(y,r),a=(0,o.s)(t,n.collectionRef);return(0,s.jsx)(_,{ref:a,children:i})});x.displayName=y;let A=e+"CollectionItemSlot",w=(0,a.TL)(A),S=i.forwardRef((e,t)=>{let{scope:r,children:n,...a}=e,l=i.useRef(null),[u,c]=i.useState(null),p=(0,o.s)(t,l,c),{setItemMap:f}=h(A,r),m=i.useRef(a);g(m.current,a)||(m.current=a);let y=m.current;return i.useEffect(()=>(f(e=>u?e.has(u)?e.set(u,{...y,element:u}).toSorted(v):(e.set(u,{...y,element:u}),e.toSorted(v)):e),()=>{f(e=>u&&e.has(u)?(e.delete(u),new d(e)):e)}),[u,y,f]),(0,s.jsx)(w,{"data-radix-collection-item":"",ref:p,children:n})});function T(){return i.useState(new d)}function C(t){let{itemMap:r}=h(e+"CollectionConsumer",t);return r}return S.displayName=A,u(T,"useInitCollection"),u(C,"useCollection"),[{Provider:p,Slot:x,ItemSlot:S}
968,{createCollectionScope:l,useCollection:C,useInitCollection:T}]},"createCollection"),u(g,"shallowEqual"),u(y,"isElementPreceding"),u(v,"sortByDocumentPosition"),u(b,"getChildListObserver")},95768(e,t,r){"use strict";r.d(t,{s:()=>l});var i=r(67308),n=Object.defineProperty,o=(e,t)=>n(e,"name",{value:t,configurable:!0});function a(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(...e){return t=>{let r=!1,i=e.map(e=>{let i=a(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():a(e[t],null)}}}}function l(...e){return i.useCallback(s(...e),e)}o(a,"setRef"),o(s,"composeRefs"),o(l,"useComposedRefs")},27192(e,t,r){"use strict";r.d(t,{A:()=>s});var i=r(67308),n=r(38e3),o=Object.defineProperty,a=(e,t)=>o(e,"name",{value:t,configurable:!0});function s(e,t=[]){let r=[];function o(t,o){let s=i.createContext(o);s.displayName=t+"Context";let l=r.length;r=[...r,o];let u=a(t=>{let{scope:r,children:o,...a}=t,u=r?.[e]?.[l]||s,c=i.useMemo(()=>a,Object.values(a));return(0,n.jsx)(u.Provider,{value:c,children:o})},"Provider");function c(r,n,a={}){let{optional:u=!1}=a,h=n?.[e]?.[l]||s,d=i.useContext(h);if(d)return d;if(void 0!==o)return o;if(!u)throw Error(`\`${r}\` must be used within \`${t}\``)}return u.displayName=t+"Provider",a(c,"useContext"),[u,c]}a(o,"createContext");let u=a(()=>{let t=r.map(e=>i.createContext(e));return a(function(r){let n=r?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])},"useScope")},"createScope");return u.scopeName=e,[o,l(u,...t)]}function l(...e){let t=e[0];if(1===e.length)return t;let r=a(()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return a(function(e){let n=r.reduce((t,{useScope:r,scopeName:i})=>{let n=r(e)[`__scope${i}`];return{...t,...n}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])},"useComposedScopes")},"createScope");return r.scopeName=t.scopeName,r}a(function(e,t){let r=i.createContext(t);r.displayName=e+"Context";let o=a(e=>{let{children:t,...o}=e,a=i.useMemo(()=>o,Object.values(o));return(0,n.jsx)(r.Provider,{value:a,children:t})},"Provider");function s(n,o={}){let{optional:a=!1}=o,l=i.useContext(r);if(l)return l;if(void 0!==t)return t;if(!a)throw Error(`\`${n}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",a(s,"useContext"),[o,s]},"createContext"),a(s,"createContextScope"),a(l,"composeContextScopes")},72603(e,t,r){"use strict";r.d(t,{UC:()=>j,VY:()=>U,ZL:()=>O,bL:()=>E,bm:()=>H,hE:()=>V,hJ:()=>R,l9:()=>P});var i=r(67308),n=r(2690),o=r(95768),a=r(27192),s=r(72191),l=r(34986),u=r(69058),c=r(41102),h=r(74563),d=r(3840),p=r(79795),f=r(47089),m=r(47307),g=r(61917),y=r(47661),v=r(31292),b=r(38e3),_=Object.defineProperty,x=(e,t)=>_(e,"name",{value:t,configurable:!0}),A="Dialog",[w,S]=(0,a.A)(A),[T,C]=w(A),E=x(e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,c=i.useRef(null),h=i.useRef(null),[d,p]=(0,l.i)({prop:n,defaultProp:o??!1,onChange:a,caller:A}),[f,m]=i.useState(0),[g,y]=i.useState(0);return(0,b.jsx)(T,{scope:t,triggerRef:c,contentRef:h,contentId:(0,s.B)(),titleId:(0,s.B)(),descriptionId:(0,s.B)(),titlePresent:f>0,descriptionPresent:g>0,setTitleCount:m,setDescriptionCount:y,open:d,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(e=>!e),[p]),modal:u,children:r})},"Dialog"),P=i.forwardRef(x(function(e,t){let{__scopeDialog:r,...i}=e,a=C("DialogTrigger",r),s=(0,o.s)(t,a.triggerRef);return(0,b.jsx)(p.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":W(a.open),...i,ref:s,onClick:(0,n.mK)(e.onClick,a.onOpenToggle)})},"DialogTrigger")),I="DialogPortal",[M,k]=w(I,{forceMount:void 0}),O=x(e=>{let{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=C(I,t);return(0,b.jsx)(M,{scope:t,forceMount:r,children:i.Children.map(n,e=>(0,b.jsx)(d.C,{present:r||a.open,children:(0,b.jsx)(h.Z,{asChild:!0,container:o,children:e})}))})},"DialogPortal"),D="DialogOverlay",R=i.forwardRef(x(function(e,t){let r=k(D,e.__scopeDialog),{forceMount:i=r.forceMount,...n}=e,o=C(D,e.__scopeDialog);
968return o.modal?(0,b.jsx)(d.C,{present:i||o.open,children:(0,b.jsx)(B,{...n,ref:t})}):null},"DialogOverlay")),L=(0,v.TL)("DialogOverlay.RemoveScroll"),B=i.forwardRef(x(function(e,t){let{__scopeDialog:r,...i}=e,n=C(D,r),a=(0,u.e0)(),s=(0,o.s)(t,a);return(0,b.jsx)(g.A,{as:L,allowPinchZoom:!0,shards:[n.contentRef],children:(0,b.jsx)(p.sG.div,{"data-state":W(n.open),...i,ref:s,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),F="DialogContent",j=i.forwardRef(x(function(e,t){let r=k(F,e.__scopeDialog),{forceMount:i=r.forceMount,...n}=e,o=C(F,e.__scopeDialog);return(0,b.jsx)(d.C,{present:i||o.open,children:o.modal?(0,b.jsx)(z,{...n,ref:t}):(0,b.jsx)(N,{...n,ref:t})})},"DialogContent")),z=i.forwardRef(x(function(e,t){let r=C(F,e.__scopeDialog),a=i.useRef(null),s=(0,o.s)(t,r.contentRef,a);return i.useEffect(()=>{let e=a.current;if(e)return(0,y.Eq)(e)},[]),(0,b.jsx)(G,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:(0,n.mK)(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:(0,n.mK)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,n.mK)(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),N=i.forwardRef(x(function(e,t){let r=C(F,e.__scopeDialog),n=i.useRef(!1),o=i.useRef(!1);return(0,b.jsx)(G,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let i=t.target;r.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})},"DialogContentNonModal")),G=i.forwardRef(x(function(e,t){let{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:n,onCloseAutoFocus:o,...a}=e,s=C(F,r);return(0,f.Oh)(),(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(c.n,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:n,onUnmountAutoFocus:o,children:(0,b.jsx)(u.qW,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":W(s.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},"DialogContentImpl")),V=i.forwardRef(x(function(e,t){let{__scopeDialog:r,...i}=e,n=C("DialogTitle",r),{setTitleCount:o}=n;return(0,m.N)(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,b.jsx)(p.sG.h2,{id:n.titleId,...i,ref:t})},"DialogTitle")),U=i.forwardRef(x(function(e,t){let{__scopeDialog:r,...i}=e,n=C("DialogDescription",r),{setDescriptionCount:o}=n;return(0,m.N)(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,b.jsx)(p.sG.p,{id:n.descriptionId,...i,ref:t})},"DialogDescription")),H=i.forwardRef(x(function(e,t){let{__scopeDialog:r,...i}=e,o=C("DialogClose",r);return(0,b.jsx)(p.sG.button,{type:"button",...i,ref:t,onClick:(0,n.mK)(e.onClick,()=>o.onOpenChange(!1))})},"DialogClose"));function W(e){return e?"open":"closed"}x(W,"getState")},49457(e,t,r){"use strict";r.d(t,{jH:()=>a});var i=r(67308);r(38e3);var n=Object.defineProperty,o=i.createContext(void 0);function a(e){let t=i.useContext(o);return e||t||"ltr"}n(a,"name",{value:"useDirection",configurable:!0})},69058(e,t,r){"use strict";r.d(t,{e0:()=>m,qW:()=>f});var i,n=r(67308),o=r(2690),a=r(79795),s=r(95768),l=r(20255),u=r(38e3),c=Object.defineProperty,h=(e,t)=>c(e,"name",{value:t,configurable:!0}),d="dismissableLayer.update",p=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),f=n.forwardRef(h(function(e,t){let{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:_,onDismiss:x,...A}=e,w=n.useContext(p),[S,T]=n.useState(null),C=S?.ownerDocument??globalThis?.document,[,E]=n.useState({}),P=(0,s.s)(t,T),I=Array.from(w.layers),[M]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),k=M?I.indexOf(M):-1,O=S?I.indexOf(S):-1,D=w.layersWithOutsidePointerEventsDisabled.size>0,R=O>=k,L=n.useRef(!1),B=y(e=>{m?.(e),_?.(e),e.defaultPrevented||x?.()},{ownerDocument:C,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:L,dismissableSurfaces:w.dismissableSurfaces,shouldHandlePointerDownOutside:n.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...w.branches].some(t=>t.contains(e));return R&&!t},[w.branches,R])}),F=v(e=>{if(c&&L.current)return;let t=e.target;![...w.branches].some(e=>e.contains(t))&&(g?.(e),_?.(e),e.defaultPrevented||x?.())},C),j=!!S&&O===I.length-1,z=(0,l.c)(e=>{"Escape"===e.key&&(f?.(e),!e.defaultPrevented&&x&&(e.preventDefault(),x()))});return n.useEffect(()=>{if(j)return C.addEventListener("keydown",z,{capture:!0}),()=>C.removeEventListener("keydown",z,{capture:!0})},[C,j,z]),n.useEffect(()=>{if(S)return r&&(0===w.layersWithOutsidePointerEventsDisabled.size&&(i=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(S)),w.layers.add(S),b(),()=>{r&&(w.layersWithOutsidePointerEventsDisabled.delete(S),0===w.layersWithOutsidePointerEventsDisabled.size&&(C.body.style.pointerEvents=i))}},[S,C,r,w]),n.useEffect(()=>()=>{S&&(w.layers.delete(S),w.layersWithOutsidePointerEventsDisabled.delete(S),b())},[S,w]),n.useEffect(()=>{let e=h(()=>E({}),"handleUpdate");return document.addEventListener(d,e),()=>document.removeEventListener(d,e)},[]),(0,u.jsx)(a.sG.div,{...A,ref:P,style:{pointerEvents:D?R?"auto":"none":void 0,...e.style},onFocusCapture:(0,o.mK)(e.onFocusCapture,F.onFocusCapture),onBlurCapture:(0,o.mK)(e.onBlurCapture,F.onBlurCapture),onPointerDownCapture:(0,o.mK)(e.onPointerDownCapture,B.onPointerDownCapture)})},"DismissableLayer"));function m(){let e=n.useContext(p),[t,r]=n.useState(null);return n.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}h(m,"useDismissableLayerSurface");var g=h(()=>!0,"IS_TRUE");function y(e,t){let{ownerDocument:r=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:a,shouldHandlePointerDownOutside:s=g}=t,u=(0,l.c)(e),c=n.useRef(!1),d=n.useRef(!1),p=n.useRef(new Map),f=n.useRef(()=>{});return n.useEffect(()=>{function e(){d.current=!1,o.current=!1,p.current.clear()}function t(){return Array.from(p.current.values()).some(Boolean)}function n(e){if(!d.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||p.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{d.current&&f.current()},0)}function l(e){d.current&&p.current.set(e.type,!1)}h(e,"resetOutsideInteraction"),h(t,"isOutsideInteractionIntercepted"),h(n,"handleInteractionCapture"),h(l,"handleInteractionBubble");let m=h(n=>{if(n.target&&!c.current){let a=function(){r.removeEventListener("click",f.current);let i=t();e(),i||_("dismissableLayer.pointerDownOutside",u,l,{discrete:!0})};if(h(a,"handleAndDispatchPointerDownOutsideEvent"),!s(n.target)){r.removeEventListener("click",f.current),e(
968),c.current=!1;return}let l={originalEvent:n};d.current=!0,o.current=i&&0===n.button,p.current.clear(),i&&0===n.button?(r.removeEventListener("click",f.current),f.current=a,r.addEventListener("click",f.current,{once:!0})):a()}else r.removeEventListener("click",f.current),e();c.current=!1},"handlePointerDown"),g=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of g)r.addEventListener(e,n,!0),r.addEventListener(e,l);let y=window.setTimeout(()=>{r.addEventListener("pointerdown",m)},0);return()=>{for(let e of(window.clearTimeout(y),r.removeEventListener("pointerdown",m),r.removeEventListener("click",f.current),g))r.removeEventListener(e,n,!0),r.removeEventListener(e,l)}},[r,u,i,o,a,s]),{onPointerDownCapture:h(()=>c.current=!0,"onPointerDownCapture")}}function v(e,t=globalThis?.document){let r=(0,l.c)(e),i=n.useRef(!1);return n.useEffect(()=>{let e=h(e=>{e.target&&!i.current&&_("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:h(()=>i.current=!0,"onFocusCapture"),onBlurCapture:h(()=>i.current=!1,"onBlurCapture")}}function b(){let e=new CustomEvent(d);document.dispatchEvent(e)}function _(e,t,r,{discrete:i}){let n=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),i?(0,a.hO)(n,o):n.dispatchEvent(o)}h(y,"usePointerDownOutside"),h(v,"useFocusOutside"),h(b,"dispatchUpdate"),h(_,"handleAndDispatchCustomEvent")},47089(e,t,r){"use strict";r.d(t,{Oh:()=>l});var i=r(67308),n=Object.defineProperty,o=(e,t)=>n(e,"name",{value:t,configurable:!0}),a=0,s=null;function l(){i.useEffect(()=>{s||(s={start:u(),end:u()});let{start:e,end:t}=s;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),a++,()=>{1===a&&(s?.start.remove(),s?.end.remove(),s=null),a=Math.max(0,a-1)}},[])}function u(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}o(function(e){return l(),e.children},"FocusGuards"),o(l,"useFocusGuards"),o(u,"createFocusGuard")},41102(e,t,r){"use strict";r.d(t,{n:()=>p});var i=r(67308),n=r(95768),o=r(79795),a=r(20255),s=r(38e3),l=Object.defineProperty,u=(e,t)=>l(e,"name",{value:t,configurable:!0}),c="focusScope.autoFocusOnMount",h="focusScope.autoFocusOnUnmount",d={bubbles:!1,cancelable:!0},p=i.forwardRef(u(function(e,t){let{loop:r=!1,trapped:l=!1,onMountAutoFocus:p,onUnmountAutoFocus:y,...v}=e,[b,A]=i.useState(null),w=(0,a.c)(p),T=(0,a.c)(y),C=i.useRef(null),E=(0,n.s)(t,A),P=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(l){let e=function(e){if(P.paused||!b)return;let t=e.target;b.contains(t)?C.current=t:_(C.current,{select:!0})},t=function(e){if(P.paused||!b)return;let t=e.relatedTarget;null!==t&&(b.contains(t)||_(C.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&_(b)};u(e,"handleFocusIn"),u(t,"handleFocusOut"),u(r,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);let i=new MutationObserver(r);return b&&i.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),i.disconnect()}}},[l,b,P.paused]),i.useEffect(()=>{if(b){x.add(P);let e=document.activeElement;if(!b.contains(e)){let t=new CustomEvent(c,d);b.addEventListener(c,w),b.dispatchEvent(t),t.defaultPrevented||(f(S(g(b)),{select:!0}),document.activeElement===e&&_(b))}return()=>{b.removeEventListener(c,w),setTimeout(()=>{let t=new CustomEvent(h,d);b.addEventListener(h,T),b.dispatchEvent(t),t.defaultPrevented||_(e??document.body,{select:!0}),b.removeEventListener(h,T),x.remove(P)},0)}}},[b,w,T,P]);let I=i.useCallback(e=>{if(!r&&!l||P.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,o]=m(t);n&&o?e.shiftKey||i!==o?e.shiftKey&&i===n&&(e.preventDefault(),r&&_(o,{select:!0})):(e.preventDefault(),r&&_(n,{select:!0})):i===t&&e.preventDefault()}},[r,l,P.paused]);return(0,s.jsx)(o.sG.div,{tabIndex:-1,...v,ref:E,onKeyDown:I})},"FocusScope"));function f(e,{select:t=!1}={}){let r=document.activeElement;for(let i of e)if(_(i,{select:t}),document.activeElement!==r)return}function m(e){let t=g(e);return[y(t,e),y(t.reverse(),e)]}function g(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:u(e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;r.nextNode();)t.push(r.currentNode);return t}function y(e,t){let r="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let i of e)if(!(r?!i.checkVisibility({checkVisibilityCSS:!0}):v(i,{upTo:t})))return i}function v(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function b(e){return e instanceof HTMLInputElement&&"select"in e}function _(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&b(e)&&t&&e.select()}}u(f,"focusFirst"),u(m,"getTabbableEdges"),u(g,"getTabbableCandidates"),u(y,"findVisible"),u(v,"isHidden"),u(b,"isSelectableInput"),u(_,"focus");var x=A();function A(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),(e=w(e,t)).unshift(t)},remove(t){e=w(e,t),e[0]?.resume()}}}function w(e,t){let r=[...e],i=r.indexOf(t);return -1!==i&&r.splice(i,1),r}function S(e){return e.filter(e=>"A"!==e.tagName)}u(A,"createFocusScopesStack"),u(w,"arrayRemove"),u(S,"removeLinks")},72191(e,t,r){"use strict";r.d(t,{B:()=>u});var i,n=r(67308),o=r(47307),a=Object.defineProperty,s=(i||(i=r.t(n,2)))[" useId ".trim().toString()]||(()=>void 0),l=0;function u(e){let[t,r]=n.useState(s());return(0,o.N)(()=>{e||r(e=>e??String(l++))},[e]),e||(t?`radix-${t}`:"")}
968a(u,"name",{value:"useId",configurable:!0})},58093(e,t,r){"use strict";r.d(t,{B8:()=>eh,LM:()=>eg,N_:()=>ef,UC:()=>em,bL:()=>ec,l9:()=>ep,q7:()=>ed});var i=r(67308);r(39190);var n=r(27192),o=r(2690),a=r(79795),s=r(34986),l=r(95768),u=r(49457),c=r(3840),h=r(72191),d=r(93765),p=r(69058),f=r(34879),m=r(47307),g=r(20255),y=r(42613),v=r(38e3),b=Object.defineProperty,_=(e,t)=>b(e,"name",{value:t,configurable:!0}),x="NavigationMenu",[A,w,S]=(0,d.N)(x),[T,C,E]=(0,d.N)(x),[P,I]=(0,n.A)(x,[S,E]),[M,k]=P(x),[O,D]=P(x),R=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:c,delayDuration:h=200,skipDelayDuration:d=300,orientation:p="horizontal",dir:f,...m}=e,[g,y]=i.useState(null),b=(0,l.s)(t,y),A=(0,u.jH)(f),w=i.useRef(0),S=i.useRef(0),T=i.useRef(0),[C,E]=i.useState(!0),[P,I]=(0,s.i)({prop:n,onChange:_(e=>{let t=d>0;""!==e?(window.clearTimeout(T.current),t&&E(!1)):(window.clearTimeout(T.current),T.current=window.setTimeout(()=>E(!0),d)),o?.(e)},"onChange"),defaultProp:c??"",caller:x}),M=i.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>I(""),150)},[I]),k=i.useCallback(e=>{window.clearTimeout(S.current),I(e)},[I]),O=i.useCallback(e=>{P===e?window.clearTimeout(S.current):w.current=window.setTimeout(()=>{window.clearTimeout(S.current),I(e)},h)},[P,I,h]);return i.useEffect(()=>()=>{window.clearTimeout(w.current),window.clearTimeout(S.current),window.clearTimeout(T.current)},[]),(0,v.jsx)(L,{scope:r,isRootMenu:!0,value:P,dir:A,orientation:p,rootNavigationMenu:g,onTriggerEnter:e=>{window.clearTimeout(w.current),C?O(e):k(e)},onTriggerLeave:()=>{window.clearTimeout(w.current),M()},onContentEnter:()=>window.clearTimeout(S.current),onContentLeave:M,onItemSelect:e=>{I(t=>t===e?"":e)},onItemDismiss:()=>I(""),children:(0,v.jsx)(a.sG.nav,{"aria-label":"Main","data-orientation":p,dir:A,...m,ref:b})})},"NavigationMenu")),L=_(e=>{let{scope:t,isRootMenu:r,rootNavigationMenu:n,dir:o,orientation:a,children:s,value:l,onItemSelect:u,onItemDismiss:c,onTriggerEnter:d,onTriggerLeave:p,onContentEnter:m,onContentLeave:y}=e,[b,_]=i.useState(null),[x,w]=i.useState(new Map),[S,T]=i.useState(null);return(0,v.jsx)(M,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:l,previousValue:(0,f.Z)(l),baseId:(0,h.B)(),dir:o,orientation:a,viewport:b,onViewportChange:_,indicatorTrack:S,onIndicatorTrackChange:T,onTriggerEnter:(0,g.c)(d),onTriggerLeave:(0,g.c)(p),onContentEnter:(0,g.c)(m),onContentLeave:(0,g.c)(y),onItemSelect:(0,g.c)(u),onItemDismiss:(0,g.c)(c),onViewportContentChange:i.useCallback((e,t)=>{w(r=>(r.set(e,t),new Map(r)))},[]),onViewportContentRemove:i.useCallback(e=>{w(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,v.jsx)(A.Provider,{scope:t,children:(0,v.jsx)(O,{scope:t,items:x,children:s})})})},"NavigationMenuProvider"),B=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,...i}=e,n=k("NavigationMenuList",r),o=(0,v.jsx)(a.sG.ul,{"data-orientation":n.orientation,...i,ref:t});return(0,v.jsx)(a.sG.div,{style:{position:"relative"},ref:n.onIndicatorTrackChange,children:(0,v.jsx)(A.Slot,{scope:r,children:n.isRootMenu?(0,v.jsx)(J,{asChild:!0,children:o}):o})})},"NavigationMenuList")),[F,j]=P("NavigationMenuItem"),z=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,value:n,...o}=e,s=(0,h.B)(),l=i.useRef(null),u=i.useRef(null),c=i.useRef(null),d=i.useRef(()=>{}),p=i.useRef(!1),f=i.useCallback((e="start")=>{if(l.current){d.current();let t=er(l.current);t.length&&ei("start"===e?t:t.reverse())}},[]),m=i.useCallback(()=>{if(l.current){let e=er(l.current);e.length&&(d.current=en(e))}},[]);return(0,v.jsx)(F,{scope:r,value:n||s||"LEGACY_REACT_AUTO_VALUE",triggerRef:u,contentRef:l,focusProxyRef:c,wasEscapeCloseRef:p,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:m,onContentFocusOutside:m,children:(0,v.jsx)(a.sG.li,{...o,ref:t})})},"NavigationMenuItem")),N="NavigationMenuTrigger",G=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,disabled:n,...s}=e,u=k(N,e.__scopeNavigationMenu),c=j(N,e.__scopeNavigationMenu),h=i.useRef(null),d=(0,l.s)(h,c.triggerRef,t),p=es(u.baseId,c.value),f=el(u.baseId,c.value),m=i.useRef(!1),g=i.useRef(!1),b=c.value===u.value;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(A.ItemSlot,{scope:r,value:c.value,children:(0,v.jsx)(et,{asChild:!0,children:(0,v.jsx)(a.sG.button,{id:p,disabled:n,"data-disabled":n?"":void 0,"data-state":ea(b),"aria-expanded":b,"aria-controls":b?f:void 0,...s,ref:d,onPointerEnter:(0,o.mK)(e.onPointerEnter,()=>{g.current=!1,c.wasEscapeCloseRef.current=!1}),onPointerMove:(0,o.mK)(e.onPointerMove,eu(()=>{n||g.current||c.wasEscapeCloseRef.current||m.current||(u.onTriggerEnter(c.value),m.current=!0)})),onPointerLeave:(0,o.mK)(e.onPointerLeave,eu(()=>{n||(u.onTriggerLeave(),m.current=!1)})),onClick:(0,o.mK)(e.onClick,()=>{u.onItemSelect(c.value),g.current=b}),onKeyDown:(0,o.mK)(e.onKeyDown,e=>{let t={horizontal:"ArrowDown",vertical:"rtl"===u.dir?"ArrowLeft":"ArrowRight"}[u.orientation];b&&e.key===t&&(c.onEntryKeyDown(),e.preventDefault())})})})}),b&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(y.bL,{"aria-hidden":!0,tabIndex:0,ref:c.focusProxyRef,onFocus:e=>{let t=c.contentRef.current,r=e.relatedTarget,i=r===h.current,n=t?.contains(r);(i||!n)&&c.onFocusProxyEnter(i?"start":"end")}}),u.viewport&&(0,v.jsx)("span",{"aria-owns":f})]})]})},"NavigationMenuTrigger")),V="navigationMenu.linkSelect",U=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,active:i,onSelect:n,...s}=e;return(0,v.jsx)(et,{asChild:!0,children:(0,v.jsx)(a.sG.a,{"data-active":i?"":void 0,"aria-current":i?"page":void 0,...s,ref:t,onClick:(0,o.mK)(e.onClick,e=>{let t=e.target,r=new CustomEvent(V,{bubbles:!0,cancelable:!0});if(t.addEventListener(V,e=>n?.(e),{once:!0}),(0,a.hO)(t,r),!r.defaultPrevented&&!e.metaKey){let e=new CustomEvent(Z,{bubbles:!0,cancelable:!0});(0,a.hO)(t,e)}},{checkForDefaultPrevented:!1})})})},"NavigationMenuLink")),H="NavigationMenuContent",W=i.forwardRef(_(function(e,t){let{forceMount:r,...i}=e,n=k(H,e.__scopeNavigationMenu),a=j(H,e.__scopeNavigationMenu),s=(0,l.s)(a.contentRef,t),u=a.value===n.value,h={value:a.value,triggerRef:a.triggerRef,focu
968sProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...i};return n.viewport?(0,v.jsx)(q,{forceMount:r,...h,ref:s}):(0,v.jsx)(c.C,{present:r||u,children:(0,v.jsx)($,{"data-state":ea(u),...h,ref:s,onPointerEnter:(0,o.mK)(e.onPointerEnter,n.onContentEnter),onPointerLeave:(0,o.mK)(e.onPointerLeave,eu(n.onContentLeave)),style:{pointerEvents:!u&&n.isRootMenu?"none":void 0,...h.style}})})},"NavigationMenuContent")),q=i.forwardRef(_(function(e,t){let{onViewportContentChange:r,onViewportContentRemove:i}=k(H,e.__scopeNavigationMenu);return(0,m.N)(()=>{r(e.value,{ref:t,...e})},[e,t,r]),(0,m.N)(()=>()=>i(e.value),[e.value,i]),null},"ViewportContentMounter")),Z="navigationMenu.rootContentDismiss",$=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,value:n,triggerRef:a,focusProxyRef:s,wasEscapeCloseRef:u,onRootContentClose:c,onContentFocusOutside:h,...d}=e,f=k(H,r),m=i.useRef(null),g=(0,l.s)(m,t),y=es(f.baseId,n),b=el(f.baseId,n),x=w(r),A=i.useRef(null),{onItemDismiss:S}=f;i.useEffect(()=>{let e=m.current;if(f.isRootMenu&&e){let t=_(()=>{S(),c(),e.contains(document.activeElement)&&a.current?.focus()},"handleClose");return e.addEventListener(Z,t),()=>e.removeEventListener(Z,t)}},[f.isRootMenu,e.value,a,S,c]);let T=i.useMemo(()=>{let e=x().map(e=>e.value);"rtl"===f.dir&&e.reverse();let t=e.indexOf(f.value),r=e.indexOf(f.previousValue),i=n===f.value,o=r===e.indexOf(n);if(!i&&!o)return A.current;let a=(()=>{if(t!==r){if(i&&-1!==r)return t>r?"from-end":"from-start";if(o&&-1!==t)return t>r?"to-start":"to-end"}return null})();return A.current=a,a},[f.previousValue,f.value,f.dir,x,n]);return(0,v.jsx)(J,{asChild:!0,children:(0,v.jsx)(p.qW,{id:b,"aria-labelledby":y,"data-motion":T,"data-orientation":f.orientation,...d,ref:g,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(Z,{bubbles:!0,cancelable:!0});m.current?.dispatchEvent(e)},onFocusOutside:(0,o.mK)(e.onFocusOutside,e=>{h();let t=e.target;f.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:(0,o.mK)(e.onPointerDownOutside,e=>{let t=e.target,r=x().some(e=>e.ref.current?.contains(t)),i=f.isRootMenu&&f.viewport?.contains(t);(r||i||!f.isRootMenu)&&e.preventDefault()}),onKeyDown:(0,o.mK)(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){let t=er(e.currentTarget),r=document.activeElement,i=t.findIndex(e=>e===r);ei(e.shiftKey?t.slice(0,i).reverse():t.slice(i+1,t.length))?e.preventDefault():s.current?.focus()}}),onEscapeKeyDown:(0,o.mK)(e.onEscapeKeyDown,e=>{u.current=!0})})})},"NavigationMenuContentImpl")),K="NavigationMenuViewport",X=i.forwardRef(_(function(e,t){let{forceMount:r,...i}=e,n=!!k(K,e.__scopeNavigationMenu).value;return(0,v.jsx)(c.C,{present:r||n,children:(0,v.jsx)(Y,{...i,ref:t})})},"NavigationMenuViewport")),Y=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,children:n,...s}=e,u=k(K,r),h=(0,l.s)(t,u.onViewportChange),d=D(H,e.__scopeNavigationMenu),[p,f]=i.useState(null),[m,g]=i.useState(null),y=p?p?.width+"px":void 0,b=p?p?.height+"px":void 0,x=!!u.value,A=x?u.value:u.previousValue,w=_(()=>{m&&f({width:m.offsetWidth,height:m.offsetHeight})},"handleSizeChange");return eo(m,w),(0,v.jsx)(a.sG.div,{"data-state":ea(x),"data-orientation":u.orientation,...s,ref:h,style:{pointerEvents:!x&&u.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":y,"--radix-navigation-menu-viewport-height":b,...s.style},onPointerEnter:(0,o.mK)(e.onPointerEnter,u.onContentEnter),onPointerLeave:(0,o.mK)(e.onPointerLeave,eu(u.onContentLeave)),children:Array.from(d.items).map(([e,{ref:t,forceMount:r,...i}])=>{let n=A===e;return(0,v.jsx)(c.C,{present:r||n,children:(0,v.jsx)(Q,{...i,contentRef:t,isActive:n,onActiveContentChange:g})},e)})})},"NavigationMenuViewportImpl")),Q=_(({contentRef:e,isActive:t,onActiveContentChange:r,...n})=>{let o=i.useCallback(e=>{t&&e&&r(e)},[t,r]),a=(0,l.s)(e,o);return(0,v.jsx)($,{...n,ref:a})},"NavigationMenuViewportItem"),J=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,...i}=e,n=k("FocusGroup",r);return(0,v.jsx)(T.Provider,{scope:r,children:(0,v.jsx)(T.Slot,{scope:r,children:(0,v.jsx)(a.sG.div,{dir:n.dir,...i,ref:t})})})},"FocusGroup")),ee=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],et=i.forwardRef(_(function(e,t){let{__scopeNavigationMenu:r,...i}=e,n=C(r),s=k("FocusGroupItem",r);return(0,v.jsx)(T.ItemSlot,{scope:r,children:(0,v.jsx)(a.sG.button,{...i,ref:t,onKeyDown:(0,o.mK)(e.onKeyDown,e=>
968{if(["Home","End",...ee].includes(e.key)){let t=n().map(e=>e.ref.current);if(["rtl"===s.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),ee.includes(e.key)){let r=t.indexOf(e.currentTarget);t=t.slice(r+1)}setTimeout(()=>ei(t)),e.preventDefault()}})})})},"FocusGroupItem"));function er(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:_(e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;r.nextNode();)t.push(r.currentNode);return t}function ei(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function en(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute("tabindex",t)})}}function eo(e,t){let r=(0,g.c)(t);(0,m.N)(()=>{let t=0;if(e){let i=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(t),i.unobserve(e)}}},[e,r])}function ea(e){return e?"open":"closed"}function es(e,t){return`${e}-trigger-${t}`}function el(e,t){return`${e}-content-${t}`}function eu(e){return t=>"mouse"===t.pointerType?e(t):void 0}_(er,"getTabbableCandidates"),_(ei,"focusFirst"),_(en,"removeFromTabOrder"),_(eo,"useResizeObserver"),_(ea,"getOpenState"),_(es,"makeTriggerId"),_(el,"makeContentId"),_(eu,"whenMouse");var ec=R,eh=B,ed=z,ep=G,ef=U,em=W,eg=X},20221(e,t,r){"use strict";r.d(t,{UC:()=>W,ZL:()=>H,bL:()=>V,i3:()=>q,l9:()=>U});var i=r(67308),n=r(2690),o=r(95768),a=r(27192),s=r(69058),l=r(47089),u=r(41102),c=r(72191),h=r(17225),d=r(74563),p=r(3840),f=r(79795),m=r(31292),g=r(34986),y=r(47661),v=r(61917),b=r(38e3),_=Object.defineProperty,x=(e,t)=>_(e,"name",{value:t,configurable:!0}),A="Popover",[w,S]=(0,a.A)(A,[h.Bk]),T=(0,h.Bk)(),[C,E]=w(A),P=x(e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,l=T(t),u=i.useRef(null),[d,p]=i.useState(!1),[f,m]=(0,g.i)({prop:n,defaultProp:o??!1,onChange:a,caller:A});return(0,b.jsx)(h.bL,{...l,children:(0,b.jsx)(C,{scope:t,contentId:(0,c.B)(),triggerRef:u,open:f,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>p(!0),[]),onCustomAnchorRemove:i.useCallback(()=>p(!1),[]),modal:s,children:r})})},"Popover"),I=i.forwardRef(x(function(e,t){let{__scopePopover:r,...i}=e,a=E("PopoverTrigger",r),s=T(r),l=(0,o.s)(t,a.triggerRef),u=(0,b.jsx)(f.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":G(a.open),...i,ref:l,onClick:(0,n.mK)(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?u:(0,b.jsx)(h.Mz,{asChild:!0,...s,children:u})},"PopoverTrigger")),M="PopoverPortal",[k,O]=w(M,{forceMount:void 0}),D=x(e=>{let{__scopePopover:t,forceMount:r,children:i,container:n}=e,o=E(M,t);return(0,b.jsx)(k,{scope:t,forceMount:r,children:(0,b.jsx)(p.C,{present:r||o.open,children:(0,b.jsx)(d.Z,{asChild:!0,container:n,children:i})})})},"PopoverPortal"),R="PopoverContent",L=i.forwardRef(x(function(e,t){let r=O(R,e.__scopePopover),{forceMount:i=r.forceMount,...n}=e,o=E(R,e.__scopePopover);return(0,b.jsx)(p.C,{present:i||o.open,children:o.modal?(0,b.jsx)(F,{...n,ref:t}):(0,b.jsx)(j,{...n,ref:t})})},"PopoverContent")),B=(0,m.TL)("PopoverContent.RemoveScroll"),F=i.forwardRef(x(function(e,t){let r=E(R,e.__scopePopover),a=i.useRef(null),s=(0,o.s)(t,a),l=i.useRef(!1);return i.useEffect(()=>{let e=a.current;if(e)return(0,y.Eq)(e)},[]),(0,b.jsx)(v.A,{as:B,allowPinchZoom:!0,children:(0,b.jsx)(z,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,n.mK)(e.onCloseAutoFocus,e=>{e.preventDefault(),l.current||r.triggerRef.current?.focus()}),onPointerDownOutside:(0,n.mK)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;l.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,n.mK)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),j=i.forwardRef(x(function(e,t){let r=E(R,e.__scopePopover),n=i.useRef(!1),o=i.useRef(!1);return(0,b.jsx)(z,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let i=t.target;r.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})},"PopoverContentNonModal")),z=i.forwardRef(x(function(e,t){let{__scopePopover:r,trapFocus:i,onOpenAutoFocus:n,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,...m}=e,g=E(R,r),y=T(r);return(0,l.Oh)(),(0,b.jsx)(u.n,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:n,onUnmountAutoFocus:o,children:(0,b.jsx)(s.qW,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:p,onDismiss:()=>g.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,b.jsx)(h.UC,{"data-state":G(g.open),role:"dialog",id:g.contentId,...y,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl")),N=i.forwardRef(x(function(e,t){let{__scopePopover:r,...i}=e,n=T(r);return(0,b.jsx)(h.i3,{...n,...i,ref:t})},"PopoverArrow"));function G(e){return e?"open":"closed"}x(G,"getState");var V=P,U=I,H=D,W=L,q=N}
968,17225(e,t,r){"use strict";r.d(t,{Mz:()=>z,i3:()=>G,UC:()=>N,bL:()=>j,Bk:()=>S});var i=r(67308),n=r(70506),o=r(39190),a="u">typeof document?i.useLayoutEffect:function(){};function s(e,t){let r,i,n;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(i=r;0!=i--;)if(!s(e[i],t[i]))return!1;return!0}if((r=(n=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(i=r;0!=i--;)if(!({}).hasOwnProperty.call(t,n[i]))return!1;for(i=r;0!=i--;){let r=n[i];if(("_owner"!==r||!e.$$typeof)&&!s(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function l(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u(e,t){let r=l(e);return Math.round(t*r)/r}function c(e){let t=i.useRef(e);return a(()=>{t.current=e}),t}var h=r(79795),d=r(38e3),p=Object.defineProperty,f=i.forwardRef(p(function(e,t){let{children:r,width:i=10,height:n=5,...o}=e;return(0,d.jsx)(h.sG.svg,{...o,ref:t,width:i,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,d.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"name",{value:"Arrow",configurable:!0})),m=r(95768),g=r(27192),y=r(20255),v=r(47307),b=r(8519),_=Object.defineProperty,x=(e,t)=>_(e,"name",{value:t,configurable:!0}),A="Popper",[w,S]=(0,g.A)(A),[T,C]=w(A),E=x(e=>{let{__scopePopper:t,children:r}=e,[n,o]=i.useState(null),[a,s]=i.useState(void 0);return(0,d.jsx)(T,{scope:t,anchor:n,onAnchorChange:o,placementState:a,setPlacementState:s,children:r})},"Popper"),P=i.forwardRef(x(function(e,t){let{__scopePopper:r,virtualRef:n,...o}=e,a=C("PopperAnchor",r),s=i.useRef(null),l=a.onAnchorChange,u=i.useCallback(e=>{s.current=e,e&&l(e)},[l]),c=(0,m.s)(t,u),p=i.useRef(null);i.useEffect(()=>{if(!n)return;let e=p.current;p.current=n.current,e!==p.current&&l(p.current)});let f=a.placementState&&F(a.placementState),g=f?.[0],y=f?.[1];return n?null:(0,d.jsx)(h.sG.div,{"data-radix-popper-side":g,"data-radix-popper-align":y,...o,ref:c})},"PopperAnchor")),I="PopperContent",[M,k]=w(I),O=i.forwardRef(x(function(e,t){var r,p,f,g,_,A,w;let S,T,E,P,k,O,{__scopePopper:D,side:R="bottom",sideOffset:j=0,align:z="center",alignOffset:N=0,arrowPadding:G=0,avoidCollisions:V=!0,collisionBoundary:U=[],collisionPadding:H=0,sticky:W="partial",hideWhenDetached:q=!1,updatePositionStrategy:Z="optimized",onPlaced:$,...K}=e,X=C(I,D),[Y,Q]=i.useState(null),J=(0,m.s)(t,Q),[ee,et]=i.useState(null),er=(0,b.X)(ee),ei=er?.width??0,en=er?.height??0,eo="number"==typeof H?H:{top:0,right:0,bottom:0,left:0,...H},ea=Array.isArray(U)?U:[U],es=ea.length>0,el={padding:eo,boundary:ea.filter(L),altBoundary:es},{refs:eu,floatingStyles:ec,placement:eh,isPositioned:ed,middlewareData:ep}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:h=[],platform:d,elements:{reference:p,floating:f}={},transform:m=!0,whileElementsMounted:g,open:y}=e,[v,b]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[_,x]=i.useState(h);s(_,h)||x(h);let[A,w]=i.useState(null),[S,T]=i.useState(null),C=i.useCallback(e=>{e!==M.current&&(M.current=e,w(e))},[]),E=i.useCallback(e=>{e!==k.current&&(k.current=e,T(e))},[]),P=p||A,I=f||S,M=i.useRef(null),k=i.useRef(null),O=i.useRef(v),D=null!=g,R=c(g),L=c(d),B=c(y),F=i.useCallback(()=>{if(!M.current||!k.current)return;let e={placement:t,strategy:r,middleware:_};L.current&&(e.platform=L.current),(0,n.rD)(M.current,k.current,e).then(e=>{let t={...e,isPositioned:!1!==B.current};j.current&&!s(O.current,t)&&(O.current=t,o.flushSync(()=>{b(t)}))})},[_,t,r,L,B]);a(()=>{!1===y&&O.current.isPositioned&&(O.current.isPositioned=!1,b(e=>({...e,isPositioned:!1})))},[y]);let j=i.useRef(!1);a(()=>(j.current=!0,()=>{j.current=!1}),[]),a(()=>
968{if(P&&(M.current=P),I&&(k.current=I),P&&I){if(R.current)return R.current(P,I,F);F()}},[P,I,F,R,D]);let z=i.useMemo(()=>({reference:M,floating:k,setReference:C,setFloating:E}),[C,E]),N=i.useMemo(()=>({reference:P,floating:I}),[P,I]),G=i.useMemo(()=>{let e={position:r,left:0,top:0};if(!N.floating)return e;let t=u(N.floating,v.x),i=u(N.floating,v.y);return m?{...e,transform:"translate("+t+"px, "+i+"px)",...l(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:i}},[r,m,N.floating,v.x,v.y]);return i.useMemo(()=>({...v,update:F,refs:z,elements:N,floatingStyles:G}),[v,F,z,N,G])}({strategy:"fixed",placement:R+("center"!==z?"-"+z:""),whileElementsMounted:x((...e)=>(0,n.ll)(...e,{animationFrame:"always"===Z}),"whileElementsMounted"),elements:{reference:X.anchor},middleware:[(r={mainAxis:j+en,alignmentAxis:N},{name:(S=(0,n.cY)(r)).name,fn:S.fn,options:[r,void 0]}),V&&(p={mainAxis:!0,crossAxis:!1,limiter:"partial"===W?{fn:(0,n.ER)(void 0).fn,options:[void 0,void 0]}:void 0,...el},{name:(T=(0,n.BN)(p)).name,fn:T.fn,options:[p,void 0]}),V&&(f={...el},{name:(E=(0,n.UU)(f)).name,fn:E.fn,options:[f,void 0]}),(g={...el,apply:x(({elements:e,rects:t,availableWidth:r,availableHeight:i})=>{let{width:n,height:o}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${i}px`),a.setProperty("--radix-popper-anchor-width",`${n}px`),a.setProperty("--radix-popper-anchor-height",`${o}px`)},"apply")},{name:(P=(0,n.Ej)(g)).name,fn:P.fn,options:[g,void 0]}),ee&&{name:(k={name:"arrow",options:A=_={element:ee,padding:G},fn(e){let{element:t,padding:r}="function"==typeof A?A(e):A;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?(0,n.UE)({element:t.current,padding:r}).fn(e):{}:t?(0,n.UE)({element:t,padding:r}).fn(e):{}}}).name,fn:k.fn,options:[_,void 0]},B({arrowWidth:ei,arrowHeight:en}),q&&(w={strategy:"referenceHidden",...el,boundary:es?el.boundary:void 0},{name:(O=(0,n.jD)(w)).name,fn:O.fn,options:[w,void 0]})]}),ef=X.setPlacementState;(0,v.N)(()=>(ef(eh),()=>{ef(void 0)}),[eh,ef]);let[em,eg]=F(eh),ey=(0,y.c)($);(0,v.N)(()=>{ed&&ey?.()},[ed,ey]);let ev=ep.arrow?.x,eb=ep.arrow?.y,e_=ep.arrow?.centerOffset!==0,[ex,eA]=i.useState();return(0,v.N)(()=>{Y&&eA(window.getComputedStyle(Y).zIndex)},[Y]),(0,d.jsx)("div",{ref:eu.setFloating,"data-radix-popper-content-wrapper":"",style:{...ec,transform:ed?ec.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ex,"--radix-popper-transform-origin":[ep.transformOrigin?.x,ep.transformOrigin?.y].join(" "),...ep.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,d.jsx)(M,{scope:D,placedSide:em,placedAlign:eg,onArrowChange:et,arrowX:ev,arrowY:eb,shouldHideArrow:e_,children:(0,d.jsx)(h.sG.div,{"data-side":em,"data-align":eg,...K,ref:J,style:{...K.style,animation:ed?K.style?.animation:"none"}})})})},"PopperContent")),D={top:"bottom",right:"left",bottom:"top",left:"right"},R=i.forwardRef(x(function(e,t){let{__scopePopper:r,...i}=e,n=k("PopperArrow",r),o=D[n.placedSide];return(0,d.jsx)("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:(0,d.jsx)(f,{...i,ref:t,style:{...i.style,display:"block"}})})},"PopperArrow"));function L(e){return null!==e}x(L,"isNotNull");var B=x(e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:i,middlewareData:n}=t,o=n.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,s=o?0:e.arrowHeight,[l,u]=F(r),c={start:"0%",center:"50%",end:"100%"}[u],h=(n.arrow?.x??0)+a/2,d=(n.arrow?.y??0)+s/2,p="",f="";return"bottom"===l?(p=o?c:`${h}px`,f=`${-s}px`):"top"===l?(p=o?c:`${h}px`,f=`${i.floating.height+s}px`):"right"===l?(p=`${-s}px`,f=o?c:`${d}px`):"left"===l&&(p=`${i.floating.width+s}px`,f=o?c:`${d}px`),{data:{x:p,y:f}}}}),"transformOrigin");function F(e){let[t,r="center"]=e.split("-");return[t,r]}x(F,"getSideAndAlignFromPlacement");var j=E,z=P,N=O,G=R},74563(e,t,r){"use strict";r.d(t,{Z:()=>u});var i=r(67308),n=r(39190),o=r(79795),a=r(47307),s=r(38e3),l=Object.defineProperty,u=i.forwardRef(l(function(e,t){let{c
968ontainer:r,...l}=e,[u,c]=i.useState(!1);(0,a.N)(()=>c(!0),[]);let h=r||u&&globalThis?.document?.body;return h?n.createPortal((0,s.jsx)(o.sG.div,{...l,ref:t}),h):null},"name",{value:"Portal",configurable:!0}))},3840(e,t,r){"use strict";r.d(t,{C:()=>l});var i=r(67308),n=r(47307),o=Object.defineProperty,a=(e,t)=>o(e,"name",{value:t,configurable:!0});function s(e,t){return i.useReducer((e,r)=>t[e][r]??e,e)}a(s,"useStateMachine");var l=a(e=>{let{present:t,children:r}=e,n=u(t),o="function"==typeof r?r({present:n.isPresent}):i.Children.only(r),a=h(n.ref,p(o));return"function"==typeof r||n.isPresent?i.cloneElement(o,{ref:a}):null},"Presence");function u(e){let[t,r]=i.useState(),o=i.useRef(null),l=i.useRef(e),u=i.useRef("none"),c=i.useRef(void 0),[h,p]=s(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{"mounted"===h?(u.current=c.current??d(o.current),c.current=void 0):u.current="none"},[h]),(0,n.N)(()=>
968{let t=o.current,r=l.current;if(r!==e){let i=u.current,n=d(t);e?(c.current=n,p("MOUNT")):"none"===n||t?.display==="none"?p("UNMOUNT"):r&&i!==n?p("ANIMATION_OUT"):p("UNMOUNT"),l.current=e}},[e,p]),(0,n.N)(()=>{if(t){let e,r=t.ownerDocument.defaultView??window,i=a(i=>{let n=d(o.current).includes(CSS.escape(i.animationName));if(i.target===t&&n&&(p("ANIMATION_END"),!l.current)){let i=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=i)})}},"handleAnimationEnd"),n=a(e=>{e.target===t&&(u.current=d(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:i.useCallback(e=>{if(e){let t=getComputedStyle(e);o.current=t,c.current=d(t)}else o.current=null;r(e)},[])}}function c(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function h(...e){let t=i.useRef(e);return t.current=e,i.useCallback(e=>{let r=t.current,i=!1,n=r.map(t=>{let r=c(t,e);return i||"function"!=typeof r||(i=!0),r});if(i)return()=>{for(let e=0;e<n.length;e++){let t=n[e];"function"==typeof t?t():c(r[e],null)}}},[])}function d(e){return e?.animationName||"none"}function p(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(r=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}a(u,"usePresence"),a(c,"setRef"),a(h,"useStableComposedRefs"),a(d,"getAnimationName"),a(p,"getElementRef")},79795(e,t,r){"use strict";r.d(t,{hO:()=>u,sG:()=>l});var i=r(67308),n=r(39190),o=r(31292),a=r(38e3),s=Object.defineProperty,l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,o.TL)(`Primitive.${t}`),n=i.forwardRef((e,i)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(n?r:t,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function u(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}s(u,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0})},74665(e,t,r){"use strict";r.d(t,{C1:()=>N,bL:()=>L,q7:()=>j});var i=r(67308),n=r(2690),o=r(95768),a=r(27192),s=r(79795),l=r(21963),u=r(34986),c=r(49457),h=r(8519),d=r(3840),p=r(38e3),f=Object.defineProperty,m=(e,t)=>f(e,"name",{value:t,configurable:!0}),g="Radio",[y,v]=(0,a.A)(g),[b,_]=y(g);function x(e){let{__scopeRadio:t,checked:r=!1,children:n,disabled:o,form:a,name:s,onCheck:l,required:u,value:c="on",internal_do_not_use_render:h}=e,[d,f]=i.useState(null),[g,y]=i.useState(null),v=i.useRef(!1),[_,x]=i.useReducer(e=>e+1,0),A=!d||!!a||!!d.closest("form"),w={checked:r,disabled:o,required:u,name:s,form:a,value:c,control:d,setControl:f,hasConsumerStoppedPropagationRef:v,userInteractionCount:_,onUserInteraction:x,isFormControl:A,bubbleInput:g,setBubbleInput:y,onCheck:m(()=>l?.(),"onCheck")};return(0,p.jsx)(b,{scope:t,...w,children:T(h)?h(w):n})}m(x,"RadioProvider");var A=i.forwardRef(m(function({__scopeRadio:e,onClick:t,...r},i){let{checked:a,disabled:l,value:u,setControl:c,onCheck:h,hasConsumerStoppedPropagationRef:d,onUserInteraction:f,isFormControl:m,bubbleInput:g}=_("RadioTrigger",e),y=(0,o.s)(i,c);return(0,p.jsx)(s.sG.button,{type:"button",role:"radio","aria-checked":a,"data-state":C(a),"data-disabled":l?"":void 0,disabled:l,value:u,...r,ref:y,onClick:(0,n.mK)(t,e=>{a||(f(),h()),g&&m&&(d.current=e.isPropagationStopped(),d.current||e.stopPropagation())})})},"RadioTrigger")),w=i.forwardRef(m(function(e,t){let{__scopeRadio:r,forceMount:i,...n}=e,o=_("RadioIndicator",r);return(0,p.jsx)(d.C,{present:i||o.checked,children:(0,p.jsx)(s.sG.span,{"data-state":C(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})})},"RadioIndicator")),S=i.forwardRef(m(function({__scopeRadio:e,onClick:t,...r},a){let{control:l,checked:u,required:c,disabled:d,name:f,value:m,form:g,bubbleInput:y,setBubbleInput:v,hasConsumerStoppedPropagationRef:b,userInteractionCount:x}=_("RadioBubbleInput",e),A=(0,o.s)(a,v),w=(0,h.X)(l),S=i.useRef(!1),T=i.useRef(u),C=i.useRef(x);i.useEffect(()=>{if(!y)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=x!==C.current;C.current=x;let r=T.current!==u;T.current=u;let i=!(t&&b.current);if(r&&e){S.current=!t;let r=new Event("click",{bubbles:i});e.call(y,u),y.dispatchEvent(r),S.current=!1}},[y,u,b,x]);let E=i.useRef(u);return(0,p.jsx)(s.sG.input,{type:"radio","aria-hidden":!0,defaultChecked:E.current,required:c,disabled:d,name:f,value:m,form:g,...r,tabIndex:-1,ref:A,onClick:(0,n.mK)(t,e=>{S.current&&e.stopPropagation()}),style:{...r.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"RadioBubbleInput"));function T(e){return"function"==typeof e}function C(e){return e?"checked":"unchecked"}m(T,"isFunction"),m(C,"getState");var E=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],P="RadioGroup",[I,M]=(0,a.A)(P,[l.RG,v]),k=(0,l.RG)(),O
968=v(),[D,R]=I(P),L=i.forwardRef(m(function(e,t){let{__scopeRadioGroup:r,name:n,form:a,defaultValue:h,value:d,required:f=!1,disabled:g=!1,orientation:y,dir:v,loop:b=!0,onValueChange:_,...x}=e,A=k(r),w=(0,c.jH)(v),[S,T]=(0,u.i)({prop:d,defaultProp:h??null,onChange:_,caller:P}),[C,E]=i.useState(null),I=(0,o.s)(t,E),M=i.useRef(S);return i.useEffect(()=>{let e=a?C?.ownerDocument.getElementById(a):C?.closest("form");if(e instanceof HTMLFormElement){let t=m(()=>T(M.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[C,a,T]),(0,p.jsx)(D,{scope:r,name:n,form:a,required:f,disabled:g,value:S,onValueChange:T,children:(0,p.jsx)(l.bL,{asChild:!0,...A,orientation:y,dir:w,loop:b,children:(0,p.jsx)(s.sG.div,{role:"radiogroup","aria-required":f,"aria-orientation":y,"data-disabled":g?"":void 0,dir:w,...x,ref:I})})})},"RadioGroup"));function B(e){let{__scopeRadioGroup:t,value:r,disabled:i,children:n,internal_do_not_use_render:o}=e,a=R("RadioGroupItemProvider",t),s=O(t),l=a.disabled||i;return(0,p.jsx)(x,{...s,checked:a.value===r,disabled:l,required:a.required,name:a.name,form:a.form,value:r,onCheck:()=>a.onValueChange(r),internal_do_not_use_render:o,children:n})}m(B,"RadioGroupItemProvider");var F=i.forwardRef(m(function(e,t){let{__scopeRadioGroup:r,...a}=e,s=k(r),u=O(r),{checked:c,disabled:h}=_("RadioGroupItemTrigger",u.__scopeRadio),d=i.useRef(null),f=(0,o.s)(t,d),g=i.useRef(!1);return i.useEffect(()=>{let e=m(e=>{E.includes(e.key)&&(g.current=!0)},"handleKeyDown"),t=m(()=>g.current=!1,"handleKeyUp");return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),(0,p.jsx)(l.q7,{asChild:!0,...s,focusable:!h,active:c,children:(0,p.jsx)(A,{...u,...a,ref:f,onKeyDown:(0,n.mK)(a.onKeyDown,e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:(0,n.mK)(a.onFocus,()=>{g.current&&d.current?.click()})})})},"RadioGroupItemTrigger")),j=i.forwardRef(m(function(e,t){let{__scopeRadioGroup:r,value:i,disabled:n,...o}=e;return(0,p.jsx)(B,{__scopeRadioGroup:r,value:i,disabled:n,internal_do_not_use_render:({isFormControl:e})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(F,{...o,ref:t,__scopeRadioGroup:r}),e&&(0,p.jsx)(z,{__scopeRadioGroup:r})]})})},"RadioGroupItem")),z=i.forwardRef(m(function(e,t){let{__scopeRadioGroup:r,...i}=e,n=O(r);return(0,p.jsx)(S,{...n,...i,ref:t})},"RadioGroupItemBubbleInput")),N=i.forwardRef(m(function(e,t){let{__scopeRadioGroup:r,...i}=e,n=O(r);return(0,p.jsx)(w,{...n,...i,ref:t})},"RadioGroupIndicator"))},21963(e,t,r){"use strict";r.d(t,{q7:()=>W,bL:()=>H,RG:()=>D});var i=r(67308),n=r.t(i,2),o=r(2690),a=r(93765),s=r(95768),l=r(27192),u=r(72191),c=r(79795),h=r(20255),d=r(34986),p=r(49457),f=r(47307),m=Object.defineProperty,g=(e,t)=>m(e,"name",{value:t,configurable:!0}),y=!1;function v(){let[e,t]=i.useState(y);return i.useEffect(()=>{y||(y=!0,t(!0))},[]),e}g(v,"useIsHydrated");var b=n[" useSyncExternalStore ".trim().toString()];function _(){return()=>{}}function x(){return b(_,()=>!0,()=>!1)}g(_,"subscribe"),g(x,"useIsHydratedModern");var A="function"==typeof b?x:v,w=r(38e3),S=Object.defineProperty,T=(e,t)=>S(e,"name",{value:t,configurable:!0}),C="rovingFocusGroup.onEntryFocus",E={bubbles:!1,cancelable:!0},P="RovingFocusGroup",[I,M,k]=(0,a.N)(P),[O,D]=(0,l.A)(P,[k]),[R,L]=O(P),B=i.forwardRef(T(function(e,t){return(0,w.jsx)(I.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,w.jsx)(I.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,w.jsx)(F,{...e,ref:t})})})},"RovingFocusGroup")),F=i.forwardRef(T(function(e,t){let{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:m,onEntryFocus:g,preventScrollOnEntryFocus:y=!1,...v}=e,b=i.useRef(null),_=(0,s.s)(t,b),x=(0,p.jH)(l),[A,S]=(0,d.i)({prop:u,defaultProp:f??null,onChange:m,caller:P}),[T,I]=i.useState(!1),k=(0,h.c)(g),O=M(r),D=i.useRef(!1),[L,B]=i.useState(0);return i.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(C,k),()=>e.removeEventListener(C,k)},[k]),(0,w.jsx)(R,{scope:r,orientation:n,dir:x,loop:a,currentTabStopId:A,onItemFocus:i.useCallback(e=>S(e),[S]),onItemShiftTab:i.useCallback(()=>I(!0),[]),onFocusableItemAdd:i.useCallback(()=>B(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>B(e=>e-1),[]),children:(0,w.jsx)(c.sG.div,{tabIndex:T||0===L?-1:0,"data-orientation":n,...v,ref:_,style:{outline:"none",...e.style},onMouseDown:(0,o.mK)(e.onMouseDown,()=>{D.current=!0}),onFocus:(0,o.mK)(e.onFocus,e=>{let t=!D.current;if(e.target===e.currentTarget&&t&&!T){let t=new CustomEvent(C,E);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=O().filter(e=>
968e.focusable);V([e.find(e=>e.active),e.find(e=>e.id===A),...e].filter(Boolean).map(e=>e.ref.current),y)}}D.current=!1}),onBlur:(0,o.mK)(e.onBlur,()=>I(!1))})})},"RovingFocusGroupImpl")),j=i.forwardRef(T(function(e,t){let{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:s,children:l,...h}=e,d=(0,u.B)(),p=s||d,m=L("RovingFocusGroupItem",r),g=m.currentTabStopId===p,y=M(r),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:_}=m,x=A();return(0,f.N)(()=>{if(x&&n)return v(),()=>b()},[x,n,v,b]),i.useEffect(()=>{if(!x&&n)return v(),()=>b()},[x,n,v,b]),(0,w.jsx)(I.ItemSlot,{scope:r,id:p,focusable:n,active:a,children:(0,w.jsx)(c.sG.span,{tabIndex:g?0:-1,"data-orientation":m.orientation,...h,ref:t,onMouseDown:(0,o.mK)(e.onMouseDown,e=>{n?m.onItemFocus(p):e.preventDefault()}),onFocus:(0,o.mK)(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:(0,o.mK)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=G(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let i=r.indexOf(e.currentTarget);r=m.loop?U(r,i+1):r.slice(i+1)}setTimeout(()=>V(r))}}),children:"function"==typeof l?l({isCurrentTabStop:g,hasTabStop:null!=_}):l})})},"RovingFocusGroupItem")),z={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function N(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function G(e,t,r){let i=N(e.key,r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return z[i]}function V(e,t=!1){let r=document.activeElement;for(let i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}function U(e,t){return e.map((r,i)=>e[(t+i)%e.length])}T(N,"getDirectionAwareKey"),T(G,"getFocusIntent"),T(V,"focusFirst"),T(U,"wrapArray");var H=B,W=j},89641(e,t,r){"use strict";r.d(t,{LM:()=>X,Ze:()=>Y,bL:()=>K,zi:()=>Q});var i=r(67308),n=r(79795),o=r(3840),a=r(27192),s=r(95768),l=r(20255),u=r(49457),c=r(47307),h=r(91054),d=r(2690),p=r(38e3),f=Object.defineProperty,m=(e,t)=>f(e,"name",{value:t,configurable:!0});function g(e,t){return i.useReducer((e,r)=>t[e][r]??e,e)}m(g,"useStateMachine");var y="ScrollArea",[v,b]=(0,a.A)(y),[_,x]=v(y),A=i.forwardRef(m(function(e,t){let{__scopeScrollArea:r,type:o="hover",dir:a,scrollHideDelay:l=600,...c}=e,[h,d]=i.useState(null),[f,m]=i.useState(null),[g,y]=i.useState(null),[v,b]=i.useState(null),[x,A]=i.useState(null),[w,S]=i.useState(0),[T,C]=i.useState(0),[E,P]=i.useState(!1),[I,M]=i.useState(!1),k=(0,s.s)(t,d),O=(0,u.jH)(a);return(0,p.jsx)(_,{scope:r,type:o,dir:O,scrollHideDelay:l,scrollArea:h,viewport:f,onViewportChange:m,content:g,onContentChange:y,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:E,onScrollbarXEnabledChange:P,scrollbarY:x,onScrollbarYChange:A,scrollbarYEnabled:I,onScrollbarYEnabledChange:M,onCornerWidthChange:S,onCornerHeightChange:C,children:(0,p.jsx)(n.sG.div,{dir:O,...c,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})},"ScrollArea")),w=i.forwardRef(m(function(e,t){let{__scopeScrollArea:r,children:o,nonce:a,...l}=e,u=x("ScrollAreaViewport",r),c=i.useRef(null),h=(0,s.s)(t,c,u.onViewportChange);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(S,{nonce:a}),(0,p.jsx)(n.sG.div,{"data-radix-scroll-area-viewport":"",...l,ref:h,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,p.jsx)("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})},"ScrollAreaViewport")),S=i.memo(m(function({nonce:e}){return(0,p.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e})},"ScrollAreaViewportStyle"),(e,t)=>e.nonce===t.nonce),T="ScrollAreaScrollbar",C=i.forwardRef(m(function(e,t){let{forceMount:r,...n}=e,o=x(T,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=o,l="horizontal"===e.orientation;return i.useEffect(()=>(l?a(!0):s(!0),()=>{l?a(!1):s(!1)}),[l,a,s]),"hover"===o.type?(0,p.jsx)(E,{...n,ref:t,forceMount:r}):"scroll"===o.type?(0,p.jsx)(P,{...n,ref:t,forceMount:r}):"auto"===o.type?(0,p.jsx)(I,{...n,ref:t,forceMount:r}):"always"===o.type?(0,p.jsx)(M,{...n,ref:t,"data-state":"visible"}):null},"ScrollAreaScrollbar")),E=i.forwardRef(m(function(e,t){let{forceMount:r,...n}=e,a=x(T,e.__scopeScrollArea),[s,l]=i.useState(!1);return i.useEffect(()=>{let e=a.scrollArea,t=0;if(e){let r=m(()=>{window.clearTimeout(t),l(!0)},"handlePointerEnter"),i=m(()=>{t=window.setTimeout(()=>l(!1),a.scrollHideDelay)},"handlePointerLeave");return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",i),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",i)}}},[a.scrollArea,a.scrollHideDelay]),(0,p.jsx)(o.C,{present:r||s,children:(0,p.jsx)(I,{"data-state":s?"visible":"hidden",...n,ref:t})})},"ScrollAreaScrollbarHover")),P=i.forwardRef(m(function(e,t){let{forceMount:r,...n}=e,a=x(T,e.__scopeScrollArea),s="horizontal"===e.orientation,l=Z(()=>c("SCROLL_END"),100),[u,c]=g("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if("idle"===u){let e=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(e)}},[u,a.scrollHideDelay,c]),i.useEffect(()=>{let e=a.viewport,t=s?"scrollLeft":"scrollTop";if(e){let r=e[t],i=m(()=>{let i=e[t];r!==i&&(c("SCROLL"),l()),r=i},"handleScroll");return e.addEventListener("scroll",i),()=>e.removeEventListener("scroll",i)}}
968,[a.viewport,s,c,l]),(0,p.jsx)(o.C,{present:r||"hidden"!==u,children:(0,p.jsx)(M,{"data-state":"hidden"===u?"hidden":"visible",...n,ref:t,onPointerEnter:(0,d.mK)(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:(0,d.mK)(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),I=i.forwardRef(m(function(e,t){let r=x(T,e.__scopeScrollArea),{forceMount:n,...a}=e,[s,l]=i.useState(!1),u="horizontal"===e.orientation,c=Z(()=>{if(r.viewport){let e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;l(u?e:t)}},10);return $(r.viewport,c),$(r.content,c),(0,p.jsx)(o.C,{present:n||s,children:(0,p.jsx)(M,{"data-state":s?"visible":"hidden",...a,ref:t})})},"ScrollAreaScrollbarAuto")),M=i.forwardRef(m(function(e,t){let{orientation:r="vertical",...n}=e,o=x(T,e.__scopeScrollArea),a=i.useRef(null),s=i.useRef(0),[l,u]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=N(l.viewport,l.content),h={...n,sizes:l,onSizesChange:u,hasThumb:!!(c>0&&c<1),onThumbChange:m(e=>a.current=e,"onThumbChange"),onThumbPointerUp:m(()=>s.current=0,"onThumbPointerUp"),onThumbPointerDown:m(e=>s.current=e,"onThumbPointerDown")};function d(e,t){return V(e,s.current,l,t)}return(m(d,"getScrollPosition"),"horizontal"===r)?(0,p.jsx)(k,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let e=U(o.viewport.scrollLeft,l,o.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=d(e,o.dir))}}):"vertical"===r?(0,p.jsx)(O,{...h,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let e=U(o.viewport.scrollTop,l);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=d(e))}}):null},"ScrollAreaScrollbarVisible")),k=i.forwardRef(m(function(e,t){let{sizes:r,onSizesChange:n,...o}=e,a=x(T,e.__scopeScrollArea),[l,u]=i.useState(),c=i.useRef(null),h=(0,s.s)(t,c,a.onScrollbarXChange);return i.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),(0,p.jsx)(L,{"data-orientation":"horizontal",...o,ref:h,sizes:r,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":G(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(a.viewport){let i=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(i),W(i,r)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&l&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(l.paddingLeft),paddingEnd:z(l.paddingRight)}})}})}
968,"ScrollAreaScrollbarX")),O=i.forwardRef(m(function(e,t){let{sizes:r,onSizesChange:n,...o}=e,a=x(T,e.__scopeScrollArea),[l,u]=i.useState(),c=i.useRef(null),h=(0,s.s)(t,c,a.onScrollbarYChange);return i.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),(0,p.jsx)(L,{"data-orientation":"vertical",...o,ref:h,sizes:r,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":G(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(a.viewport){let i=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(i),W(i,r)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&l&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(l.paddingTop),paddingEnd:z(l.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[D,R]=v(T),L=i.forwardRef(m(function(e,t){let{__scopeScrollArea:r,sizes:o,hasThumb:a,onThumbChange:u,onThumbPointerUp:c,onThumbPointerDown:h,onThumbPositionChange:f,onDragScroll:g,onWheelScroll:y,onResize:v,...b}=e,_=x(T,r),[A,w]=i.useState(null),S=(0,s.s)(t,w),C=i.useRef(null),E=i.useRef(""),P=_.viewport,I=o.content-o.viewport,M=(0,l.c)(y),k=(0,l.c)(f),O=Z(v,10);function R(e){C.current&&g({x:e.clientX-C.current.left,y:e.clientY-C.current.top})}return m(R,"handleDragScroll"),i.useEffect(()=>{let e=m(e=>{let t=e.target;A?.contains(t)&&M(e,I)},"handleWheel");return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[P,A,I,M]),i.useEffect(k,[o,k]),$(A,O),$(_.content,O),(0,p.jsx)(D,{scope:r,scrollbar:A,hasThumb:a,onThumbChange:(0,l.c)(u),onThumbPointerUp:(0,l.c)(c),onThumbPositionChange:k,onThumbPointerDown:(0,l.c)(h),children:(0,p.jsx)(n.sG.div,{...b,ref:S,style:{position:"absolute",...b.style},onPointerDown:(0,d.mK)(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),C.current=A.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",_.viewport&&(_.viewport.style.scrollBehavior="auto"),R(e))}),onPointerMove:(0,d.mK)(e.onPointerMove,R),onPointerUp:(0,d.mK)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=E.current,_.viewport&&(_.viewport.style.scrollBehavior=""),C.current=null})})})},"ScrollAreaScrollbarImpl")),B="ScrollAreaThumb",F=i.forwardRef(m(function(e,t){let{forceMount:r,...i}=e,n=R(B,e.__scopeScrollArea);return(0,p.jsx)(o.C,{present:r||n.hasThumb,children:(0,p.jsx)(j,{ref:t,...i})})},"ScrollAreaThumb")),j=i.forwardRef(m(function(e,t){let{__scopeScrollArea:r,style:o,...a}=e,l=x(B,r),u=R(B,r),{onThumbPositionChange:c}=u,h=(0,s.s)(t,u.onThumbChange),f=i.useRef(void 0),g=Z(()=>{f.current&&(f.current(),f.current=void 0)},100);return i.useEffect(()=>{let e=l.viewport;if(e){let t=m(()=>{g(),f.current||(f.current=q(e,c),c())},"handleScroll");return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[l.viewport,g,c]),(0,p.jsx)(n.sG.div,{"data-state":u.hasThumb?"visible":"hidden",...a,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:(0,d.mK)(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top;u.onThumbPointerDown({x:r,y:i})}),onPointerUp:(0,d.mK)(e.onPointerUp,u.onThumbPointerUp)})},"ScrollAreaThumbImpl"));function z(e){return e?parseInt(e,10):0}function N(e,t){let r=e/t;return isNaN(r)?0:r}function G(e){let t=N(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-r)*t,18)}function V(e,t,r,i="ltr"){let n=G(r),o=t||n/2,a=r.scrollbar.paddingStart+o,s=r.scrollbar.size-r.scrollbar.paddingEnd-(n-o),l=r.content-r.viewport;return H([a,s],"ltr"===i?[0,l]:[-1*l,0])(e)}function U(e,t,r="ltr"){let i=G(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-n,a=t.content-t.viewport,s=(0,h.q)(e,"ltr"===r?[0,a]:[-1*a,0]);return H([0,a],[0,o-i])(s)}function H(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(r-e[0])}}function W(e,t){return e>0&&e<t}m(z,"toInt"),m(N,"getThumbRatio"),m(G,"getThumbSize"),m(V,"getScrollPositionFromPointer"),m(U,"getThumbOffsetFromScroll"),m(H,"linearScale"),m(W,"isScrollingWithinScrollbarBounds");var q=m((e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},i=0;return(m(function n(){let o={left:e.scrollLeft,top:e.scrollTop},a=r.left!==o.left,s=r.top!==o.top;
968(a||s)&&t(),r=o,i=window.requestAnimationFrame(n)},"loop"))(),()=>window.cancelAnimationFrame(i)},"addUnlinkedScrollListener");function Z(e,t){let r=(0,l.c)(e),n=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(n.current),[]),i.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function $(e,t){let r=(0,l.c)(t);(0,c.N)(()=>{let t=0;if(e){let i=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(t),i.unobserve(e)}}},[e,r])}m(Z,"useDebounceCallback"),m($,"useResizeObserver");var K=A,X=w,Y=C,Q=F},30344(e,t,r){"use strict";r.d(t,{In:()=>Z,LM:()=>eu,PP:()=>ex,UC:()=>Q,VF:()=>eb,WT:()=>q,YJ:()=>ed,ZL:()=>X,bL:()=>H,l9:()=>W,p4:()=>ev,q7:()=>eg,wn:()=>ew});var i=r(67308),n=r(39190),o=r(91054),a=r(2690),s=r(93765),l=r(95768),u=r(27192),c=r(49457),h=r(69058),d=r(47089),p=r(41102),f=r(72191),m=r(17225),g=r(74563),y=r(3840),v=r(79795),b=r(31292),_=r(20255),x=r(34986),A=r(47307),w=r(34879),S=r(42613),T=r(47661),C=r(61917),E=r(38e3),P=Object.defineProperty,I=(e,t)=>P(e,"name",{value:t,configurable:!0}),M=[" ","Enter","ArrowUp","ArrowDown"],k=[" ","Enter"],O="Select",[D,R,L]=(0,s.N)(O),[B,F]=(0,u.A)(O,[L,m.Bk]),j=(0,m.Bk)(),[z,N]=B(O),[G,V]=B(O);function U(e){let{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:s,defaultValue:l,onValueChange:u,dir:h,name:d,autoComplete:p,disabled:g,required:y,form:v,internal_do_not_use_render:b}=e,_=j(t),[A,w]=i.useState(null),[S,T]=i.useState(null),[C,P]=i.useState(!1),M=(0,c.jH)(h),[k,R]=(0,x.i)({prop:n,defaultProp:o??!1,onChange:a,caller:O}),[L,B]=(0,x.i)({prop:s,defaultProp:l,onChange:u,caller:O}),F=i.useRef(null),N=i.useRef(L);i.useEffect(()=>{let e=v?A?.ownerDocument.getElementById(v):A?.form;if(e instanceof HTMLFormElement){let t=I(()=>B(N.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[v,A,B]);let V=!A||!!v||!!A.closest("form"),[U,H]=i.useState(new Set),W=(0,f.B)(),q=Array.from(U).map(e=>e.props.value).join(";"),Z=i.useCallback(e=>{H(t=>new Set(t).add(e))},[]),$=i.useCallback(e=>{H(t=>{let r=new Set(t);return r.delete(e),r})},[]),K={required:y,trigger:A,onTriggerChange:w,valueNode:S,onValueNodeChange:T,valueNodeHasChildren:C,onValueNodeHasChildrenChange:P,contentId:W,value:L,onValueChange:B,open:k,onOpenChange:R,dir:M,triggerPointerDownPosRef:F,disabled:g,name:d,autoComplete:p,form:v,nativeOptions:U,nativeSelectKey:q,isFormControl:V};return(0,E.jsx)(m.bL,{..._,children:(0,E.jsx)(z,{scope:t,...K,children:(0,E.jsx)(D.Provider,{scope:t,children:(0,E.jsx)(G,{scope:t,onNativeOptionAdd:Z,onNativeOptionRemove:$,children:eC(b)?b(K):r})})})})}I(U,"SelectProvider");var H=I(e=>{let{__scopeSelect:t,children:r,...i}=e;return(0,E.jsx)(U,{__scopeSelect:t,...i,internal_do_not_use_render:({isFormControl:e})=>(0,E.jsxs)(E.Fragment,{children:[r,e?(0,E.jsx)(eT,{__scopeSelect:t}):null]})})},"Select"),W=i.forwardRef(I(function(e,t){let{__scopeSelect:r,disabled:n=!1,...o}=e,s=j(r),u=N("SelectTrigger",r),c=u.disabled||n,h=(0,l.s)(t,u.onTriggerChange),d=R(r),p=i.useRef("touch"),[f,g,y]=eP(e=>{let t=d().filter(e=>!e.disabled),r=t.find(e=>e.value===u.value),i=eI(t,e,r);void 0!==i&&u.onValueChange(i.value)}),b=I(e=>{c||(u.onOpenChange(!0),y()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},"handleOpen");return(0,E.jsx)(m.Mz,{asChild:!0,...s,children:(0,E.jsx)(v.sG.button,{type:"button",role:"combobox","aria-controls":u.open?u.contentId:void 0,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":eE(u.value)?"":void 0,...o,ref:h,onClick:(0,a.mK)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&b(e)}),onPointerDown:(0,a.mK)(o.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(b(e),e.preventDefault())}),onKeyDown:(0,a.mK)(o.onKeyDown,e=>{let t=""!==f.current;
968e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||g(e.key),(!t||" "!==e.key)&&M.includes(e.key)&&(b(),e.preventDefault())})})})},"SelectTrigger")),q=i.forwardRef(I(function(e,t){let{__scopeSelect:r,className:n,style:o,children:a,placeholder:s="",...u}=e,c=N("SelectValue",r),{onValueNodeHasChildrenChange:h}=c,d=void 0!==a,p=(0,l.s)(t,c.onValueNodeChange);(0,A.N)(()=>{h(d)},[h,d]);let f=eE(c.value);return(0,E.jsx)(v.sG.span,{...u,asChild:!f&&u.asChild,ref:p,style:{pointerEvents:"none"},children:(0,E.jsx)(i.Fragment,{children:f?s:a},f?"placeholder":"value")})},"SelectValue")),Z=i.forwardRef(I(function(e,t){let{__scopeSelect:r,children:i,...n}=e;return(0,E.jsx)(v.sG.span,{"aria-hidden":!0,...n,ref:t,children:i||"▼"})},"SelectIcon")),[$,K]=B("SelectPortal",{forceMount:void 0}),X=I(e=>{let{__scopeSelect:t,forceMount:r,...i}=e;return(0,E.jsx)($,{scope:e.__scopeSelect,forceMount:r,children:(0,E.jsx)(g.Z,{asChild:!0,...i})})},"SelectPortal"),Y="SelectContent",Q=i.forwardRef(I(function(e,t){let r=K(Y,e.__scopeSelect),{forceMount:n=r.forceMount,...o}=e,a=N(Y,e.__scopeSelect),[s,l]=i.useState();return(0,A.N)(()=>{l(new DocumentFragment)},[]),(0,E.jsx)(y.C,{present:n||a.open,children:({present:e})=>e?(0,E.jsx)(ei,{...o,ref:t}):(0,E.jsx)(J,{...o,fragment:s})})},"SelectContent")),J=i.forwardRef(I(function(e,t){let{__scopeSelect:r,children:i,fragment:o}=e;return o?n.createPortal((0,E.jsx)(ee,{scope:r,children:(0,E.jsx)(D.Slot,{scope:r,children:(0,E.jsx)("div",{ref:t,children:i})})}),o):null},"SelectContentFragment")),[ee,et]=B(Y),er=(0,b.TL)("SelectContent.RemoveScroll"),ei=i.forwardRef(I(function(e,t){let{__scopeSelect:r}=e,{position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:u,side:c,sideOffset:f,align:m,alignOffset:g,arrowPadding:y,collisionBoundary:v,collisionPadding:b,sticky:_,hideWhenDetached:x,avoidCollisions:A,...w}=e,S=N(Y,r),[P,M]=i.useState(null),[k,O]=i.useState(null),D=(0,l.s)(t,M),[L,B]=i.useState(null),[F,j]=i.useState(null),z=R(r),[G,V]=i.useState(!1),U=i.useRef(!1);i.useEffect(()=>{if(P)return(0,T.Eq)(P)},[P]),(0,d.Oh)();let H=i.useCallback(e=>{let[t,...r]=z().map(e=>e.ref.current),[i]=r.slice(-1),n=document.activeElement;for(let r of e)if(r===n||(r?.scrollIntoView({block:"nearest"}),r===t&&k&&(k.scrollTop=0),r===i&&k&&(k.scrollTop=k.scrollHeight),r?.focus(),document.activeElement!==n))return},[z,k]),W=i.useCallback(()=>H([L,P]),[H,L,P]);i.useEffect(()=>{G&&W()},[G,W]);let{onOpenChange:q,triggerPointerDownPosRef:Z}=S;i.useEffect(()=>{if(P){let e={x:0,y:0},t=I(t=>{e={x:Math.abs(Math.round(t.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(Z.current?.y??0))}},"handlePointerMove"),r=I(r=>{e.x<=10&&e.y<=10?r.preventDefault():r.composedPath().includes(P)||q(!1),document.removeEventListener("pointermove",t),Z.current=null},"handlePointerUp");return null!==Z.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[P,q,Z]),i.useEffect(()=>{let e=I(()=>q(!1),"close");return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[q]);let[$,K]=eP(e=>{let t=z().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),i=eI(t,e,r);i&&setTimeout(()=>i.ref.current?.focus())}),X=i.useCallback((e,t,r)=>{let i=!U.current&&!r;(void 0!==S.value&&S.value===t||i)&&(B(e),i&&(U.current=!0))},[S.value]),Q=i.useCallback(()=>P?.focus(),[P]),J=i.useCallback((e,t,r)=>{let i=!U.current&&!r;(void 0!==S.value&&S.value===t||i)&&j(e)},[S.value]),et="popper"===n?eo:en;return(0,E.jsx)(ee,{scope:r,content:P,viewport:k,onViewportChange:O,itemRefCallback:X,selectedItem:L,onItemLeave:Q,itemTextRefCallback:J,focusSelectedItem:W,selectedItemText:F,position:n,isPositioned:G,searchRef:$,children:(0,E.jsx)(C.A,{as:er,allowPinchZoom:!0,children:(0,E.jsx)(p.n,{asChild:!0,trapped:S.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.mK)(o,e=>{S.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,E.jsx)(h.qW,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:(0,E.jsx)(et,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:e=>e.preventDefault(),...w,...et===eo?{side:c,sideOffset:f,align:m,alignOffset:g,arrowPadding:y,collisionBoundary:v,collisionPadding:b,sticky:_,hideWhenDetached:x,avoidCollisions:A}:{},onPlaced:()=>V(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,a.mK)(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;
968if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||K(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=z().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,i=t.indexOf(r);t=t.slice(i+1)}setTimeout(()=>H(t)),e.preventDefault()}})})})})})})},"SelectContentImpl")),en=i.forwardRef(I(function(e,t){let{__scopeSelect:r,onPlaced:n,...a}=e,s=N(Y,r),u=et(Y,r),[c,h]=i.useState(null),[d,p]=i.useState(null),f=(0,l.s)(t,p),m=R(r),g=i.useRef(!1),y=i.useRef(!0),{viewport:b,selectedItem:_,selectedItemText:x,focusSelectedItem:w}=u,S=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&d&&b&&_&&x){let e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),r=s.valueNode.getBoundingClientRect(),i=x.getBoundingClientRect();if("rtl"!==s.dir){let n=i.left-t.left,a=r.left-n,s=e.left-a,l=e.width+s,u=Math.max(l,t.width),h=window.innerWidth-10,d=(0,o.q)(a,[10,Math.max(10,h-u)]);c.style.minWidth=l+"px",c.style.left=d+"px"}else{let n=t.right-i.right,a=window.innerWidth-r.right-n,s=window.innerWidth-e.right-a,l=e.width+s,u=Math.max(l,t.width),h=window.innerWidth-10,d=(0,o.q)(a,[10,Math.max(10,h-u)]);c.style.minWidth=l+"px",c.style.right=d+"px"}let a=m(),l=window.innerHeight-20,u=b.scrollHeight,h=window.getComputedStyle(d),p=parseInt(h.borderTopWidth,10),f=parseInt(h.paddingTop,10),y=parseInt(h.borderBottomWidth,10),v=p+f+u+parseInt(h.paddingBottom,10)+y,A=Math.min(5*_.offsetHeight,v),w=window.getComputedStyle(b),S=parseInt(w.paddingTop,10),T=parseInt(w.paddingBottom,10),C=e.top+e.height/2-10,E=_.offsetHeight/2,P=p+f+(_.offsetTop+E);if(P<=C){let e=a.length>0&&_===a[a.length-1].ref.current;c.style.bottom="0px";let t=Math.max(l-C,E+(e?T:0)+(d.clientHeight-b.offsetTop-b.offsetHeight)+y);c.style.height=P+t+"px"}else{let e=a.length>0&&_===a[0].ref.current;c.style.top="0px";let t=Math.max(C,p+b.offsetTop+(e?S:0)+E);c.style.height=t+(v-P)+"px",b.scrollTop=P-C+b.offsetTop}c.style.margin="10px 0",c.style.minHeight=A+"px",c.style.maxHeight=l+"px",n?.(),requestAnimationFrame(()=>g.current=!0)}},[m,s.trigger,s.valueNode,c,d,b,_,x,s.dir,n]);(0,A.N)(()=>S(),[S]);let[T,C]=i.useState();(0,A.N)(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]);let P=i.useCallback(e=>{e&&!0===y.current&&(S(),w?.(),y.current=!1)},[S,w]);return(0,E.jsx)(ea,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:P,children:(0,E.jsx)("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:(0,E.jsx)(v.sG.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})},"SelectItemAlignedPosition")),eo=i.forwardRef(I(function(e,t){let{__scopeSelect:r,align:i="start",collisionPadding:n=10,...o}=e,a=j(r);return(0,E.jsx)(m.UC,{...a,...o,ref:t,align:i,collisionPadding:n,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[ea,es]=B(Y,{}),el="SelectViewport",eu=i.forwardRef(I(function(e,t){let{__scopeSelect:r,nonce:n,...o}=e,s=et(el,r),u=es(el,r),c=(0,l.s)(t,s.onViewportChange),h=i.useRef(0);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,E.jsx)(D.Slot,{scope:r,children:(0,E.jsx)(v.sG.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,a.mK)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:i}=u;if(i?.current&&r){let e=Math.abs(h.current-t.scrollTop);if(e>0){let i=window.innerHeight-20,n=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(n<i){let o=n+e,a=Math.min(i,o),s=o-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=s>0?s:0,r.style.justifyContent="flex-end")}}}h.current=t.scrollTop})})})]})}
968,"SelectViewport")),[ec,eh]=B("SelectGroup"),ed=i.forwardRef(I(function(e,t){let{__scopeSelect:r,...i}=e,n=(0,f.B)();return(0,E.jsx)(ec,{scope:r,id:n,children:(0,E.jsx)(v.sG.div,{role:"group","aria-labelledby":n,...i,ref:t})})},"SelectGroup")),ep="SelectItem",[ef,em]=B(ep),eg=i.forwardRef(I(function(e,t){let{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...u}=e,c=N(ep,r),h=et(ep,r),d=c.value===n,[p,m]=i.useState(s??""),[g,y]=i.useState(!1),b=(0,_.c)(e=>h.itemRefCallback?.(e,n,o)),x=(0,l.s)(t,b),A=(0,f.B)(),w=i.useRef("touch"),S=I(()=>{o||(c.onValueChange(n),c.onOpenChange(!1))},"handleSelect");return(0,E.jsx)(ef,{scope:r,value:n,disabled:o,textId:A,isSelected:d,onItemTextChange:i.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,E.jsx)(D.ItemSlot,{scope:r,value:n,disabled:o,textValue:p,children:(0,E.jsx)(v.sG.div,{role:"option","aria-labelledby":A,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:x,onFocus:(0,a.mK)(u.onFocus,()=>y(!0)),onBlur:(0,a.mK)(u.onBlur,()=>y(!1)),onClick:(0,a.mK)(u.onClick,()=>{"mouse"!==w.current&&S()}),onPointerUp:(0,a.mK)(u.onPointerUp,()=>{"mouse"===w.current&&S()}),onPointerDown:(0,a.mK)(u.onPointerDown,e=>{w.current=e.pointerType}),onPointerMove:(0,a.mK)(u.onPointerMove,e=>{w.current=e.pointerType,o?h.onItemLeave?.():"mouse"===w.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,a.mK)(u.onPointerLeave,e=>{e.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:(0,a.mK)(u.onKeyDown,e=>{o||e.target!==e.currentTarget||(h.searchRef?.current===""||" "!==e.key)&&(k.includes(e.key)&&S()," "===e.key&&e.preventDefault())})})})})},"SelectItem")),ey="SelectItemText",ev=i.forwardRef(I(function(e,t){let{__scopeSelect:r,className:o,style:a,...s}=e,u=N(ey,r),c=et(ey,r),h=em(ey,r),d=V(ey,r),[p,f]=i.useState(null),m=(0,_.c)(e=>c.itemTextRefCallback?.(e,h.value,h.disabled)),g=(0,l.s)(t,f,h.onItemTextChange,m),y=p?.textContent,b=i.useMemo(()=>(0,E.jsx)("option",{value:h.value,disabled:h.disabled,children:y},h.value),[h.disabled,h.value,y]),{onNativeOptionAdd:x,onNativeOptionRemove:w}=d;return(0,A.N)(()=>(x(b),()=>w(b)),[x,w,b]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(v.sG.span,{id:h.textId,...s,ref:g}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren&&!eE(u.value)?n.createPortal(s.children,u.valueNode):null]})},"SelectItemText")),eb=i.forwardRef(I(function(e,t){let{__scopeSelect:r,...i}=e;return em("SelectItemIndicator",r).isSelected?(0,E.jsx)(v.sG.span,{"aria-hidden":!0,...i,ref:t}):null},"SelectItemIndicator")),e_="SelectScrollUpButton",ex=i.forwardRef(I(function(e,t){let r=et(e_,e.__scopeSelect),n=es(e_,e.__scopeSelect),[o,a]=i.useState(!1),s=(0,l.s)(t,n.onScrollButtonChange);return(0,A.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){a(t.scrollTop>0)};I(e,"handleScroll");let t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,E.jsx)(eS,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null},"SelectScrollUpButton")),eA="SelectScrollDownButton",ew=i.forwardRef(I(function(e,t){let r=et(eA,e.__scopeSelect),n=es(eA,e.__scopeSelect),[o,a]=i.useState(!1),s=(0,l.s)(t,n.onScrollButtonChange);return(0,A.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)};I(e,"handleScroll");let t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,E.jsx)(eS,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null},"SelectScrollDownButton")),eS=i.forwardRef(I(function(e,t){let{__scopeSelect:r,onAutoScroll:n,...o}=e,s=et("SelectScrollButton",r),l=i.useRef(null),u=R(r),c=i.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return i.useEffect(()=>()=>c(),[c]),(0,A.N)(()=>{let e=u().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,E.jsx)(v.sG.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:(0,a.mK)(o.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(n,50))}),onPointerMove:(0,a.mK)(o.onPointerMove,()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(n,50))}),onPointerLeave:(0,a.mK)(o.onPointerLeave,()=>{c()})})}
968,"SelectScrollButtonImpl")),eT=i.forwardRef(I(function({__scopeSelect:e,...t},r){let n=N("SelectBubbleInput",e),{value:o,onValueChange:a,required:s,disabled:u,name:c,autoComplete:h,form:d}=n,{nativeOptions:p,nativeSelectKey:f}=n,m=i.useRef(null),g=(0,l.s)(r,m),y=o??"",b=(0,w.Z)(y),_=Array.from(p).some(e=>(e.props.value??"")==="");return i.useEffect(()=>{let e=m.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(b!==y&&t){let r=new Event("change",{bubbles:!0});t.call(e,y),e.dispatchEvent(r)}},[b,y]),(0,E.jsxs)(v.sG.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:c,autoComplete:h,disabled:u,form:d,onChange:e=>a(e.target.value),...t,style:{...S.Qg,...t.style},ref:g,defaultValue:y,children:[eE(o)&&!_?(0,E.jsx)("option",{value:""}):null,Array.from(p)]},f)},"SelectBubbleInput"));function eC(e){return"function"==typeof e}function eE(e){return""===e||void 0===e}function eP(e){let t=(0,_.c)(e),r=i.useRef(""),n=i.useRef(0),o=i.useCallback(e=>{let i=r.current+e;t(i),(I(function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))},"updateSearch"))(i)},[t]),a=i.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function eI(e,t,r){let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,n=r?e.indexOf(r):-1,o=eM(e,Math.max(n,0));1===i.length&&(o=o.filter(e=>e!==r));let a=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==r?a:void 0}function eM(e,t){return e.map((r,i)=>e[(t+i)%e.length])}I(eC,"isFunction"),I(eE,"shouldShowPlaceholder"),I(eP,"useTypeaheadSearch"),I(eI,"findNextItem"),I(eM,"wrapArray")},10537(e,t,r){"use strict";let i,n;r.d(t,{DX:()=>d});var o=r(67308),a=r.t(o,2);function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}var l=r(38e3),u=Symbol.for("react.lazy"),c=a[" use ".trim().toString()];function h(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===u&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var d=((n=o.forwardRef((e,t)=>{let{children:r,...i}=e;if(h(r)&&"function"==typeof c&&(r=c(r._payload)),o.isValidElement(r)){var n;let e,a=(n=r,(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref),l=function(e,t){let r={...t};for(let i in t){let n=e[i],o=t[i];/^on[A-Z]/.test(i)?n&&o?r[i]=(...e)=>{let t=o(...e);return n(...e),t}:n&&(r[i]=n):"style"===i?r[i]={...n,...o}:"className"===i&&(r[i]=[n,o].filter(Boolean).join(" "))}return{...e,...r}}(i,r.props);return r.type!==o.Fragment&&(l.ref=t?function(...e){return t=>{let r=!1,i=e.map(e=>{let i=s(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():s(e[t],null)}}}}(t,a):a),o.cloneElement(r,l)}return o.Children.count(r)>1?o.Children.only(null):null})).displayName="Slot.SlotClone",(i=o.forwardRef((e,t)=>{let{children:r,...i}=e;h(r)&&"function"==typeof c&&(r=c(r._payload));let a=o.Children.toArray(r),s=a.find(f);if(s){let e=s.props.children,r=a.map(t=>t!==s?t:o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null);return(0,l.jsx)(n,{...i,ref:t,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,l.jsx)(n,{...i,ref:t,children:r})})).displayName="Slot.Slot",i),p=Symbol("radix.slottable");function f(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===p}},31292(e,t,r){"use strict";r.d(t,{Dc:()=>c,TL:()=>l});var i,n=r(67308),o=r(95768),a=Object.defineProperty,s=(e,t)=>a(e,"name",{value:t,configurable:!0});function l(e){let t=n.forwardRef((t,r)=>{let{children:i,...a}=t,s=null,l=!1,u=[];g(i)&&"function"==typeof _&&(i=_(i._payload)),n.Children.forEach(i,e=>{if(f(e)){l=!0;let t="child"in e.props?e.props.child:e.props.children;g(t)&&"function"==typeof _&&(t=_(t._payload)),s=h(e,t),u.push(s?.props?.children)}else u.push(e)}),s?s=n.cloneElement(s,void 0,u):!l&&1===n.Children.count(i)&&n.isValidElement(i)&&(s=i);let c=s?p(s):void 0,m=(0,o.s)(r,c);if(!s){if(i||0===i)throw Error(l?b(e):v(e));return i}let y=d(a,s.props??{});return s.type!==n.Fragment&&(y.ref=r?m:c),n.cloneElement(s,y)});return t.displayName=`${e}.Slot`,t}s(l,"createSlot");var u=Symbol.for("radix.slottable");function c(e){let t=s(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=u,t}s(c,"createSlottable");var h=s((e,t)=>{if("child"in e.props){let t=e.props.child;return n.isValidElement(t)?n.cloneElement(t,void 0,e.props.children(t.props.children)):null}return n.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function d(e,t){let r={...t};for(let i in t){let n=e[i],o=t[i];/^on[A-Z]/.test(i)?n&&o?r[i]=(...e)=>
968{let t=o(...e);return n(...e),t}:n&&(r[i]=n):"style"===i?r[i]={...n,...o}:"className"===i&&(r[i]=[n,o].filter(Boolean).join(" "))}return{...e,...r}}function p(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(r=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}function f(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}s(d,"mergeProps"),s(p,"getElementRef"),s(f,"isSlottable");var m=Symbol.for("react.lazy");function g(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===m&&"_payload"in e&&y(e._payload)}function y(e){return"object"==typeof e&&null!==e&&"then"in e}s(g,"isLazyComponent"),s(y,"isPromiseLike");var v=s(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),b=s(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),_=(i||(i=r.t(n,2)))[" use ".trim().toString()]},7424(e,t,r){"use strict";r.d(t,{bL:()=>_,zi:()=>x});var i=r(67308),n=r(2690),o=r(95768),a=r(27192),s=r(34986),l=r(8519),u=r(79795),c=r(38e3),h=Object.defineProperty,d=(e,t)=>h(e,"name",{value:t,configurable:!0}),p="Switch",[f,m]=(0,a.A)(p),[g,y]=f(p);function v(e){let{__scopeSwitch:t,checked:r,children:n,defaultChecked:o,disabled:a,form:l,name:u,onCheckedChange:h,required:d,value:f="on",internal_do_not_use_render:m}=e,[y,v]=(0,s.i)({prop:r,defaultProp:o??!1,onChange:h,caller:p}),[b,_]=i.useState(null),[x,A]=i.useState(null),S=i.useRef(!1),[T,C]=i.useReducer(e=>e+1,0),E=!b||!!l||!!b.closest("form"),P={checked:y,setChecked:v,disabled:a,control:b,setControl:_,name:u,form:l,value:f,hasConsumerStoppedPropagationRef:S,userInteractionCount:T,onUserInteraction:C,required:d,defaultChecked:o,isFormControl:E,bubbleInput:x,setBubbleInput:A};return(0,c.jsx)(g,{scope:t,...P,children:w(m)?m(P):n})}d(v,"SwitchProvider");var b=i.forwardRef(d(function({__scopeSwitch:e,onClick:t,...r},a){let{control:s,form:l,value:h,disabled:p,checked:f,required:m,setControl:g,setChecked:v,hasConsumerStoppedPropagationRef:b,onUserInteraction:_,isFormControl:x,bubbleInput:A}=y("SwitchTrigger",e),w=(0,o.s)(a,g),T=i.useRef(f);return i.useEffect(()=>{let e=l?s?.ownerDocument.getElementById(l):s?.form;if(e instanceof HTMLFormElement){let t=d(()=>v(T.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[s,l,v]),(0,c.jsx)(u.sG.button,{type:"button",role:"switch","aria-checked":f,"aria-required":m,"data-state":S(f),"data-disabled":p?"":void 0,disabled:p,value:h,...r,ref:w,onClick:(0,n.mK)(t,e=>{_(),v(e=>!e),A&&x&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})})},"SwitchTrigger")),_=i.forwardRef(d(function(e,t){let{__scopeSwitch:r,name:i,checked:n,defaultChecked:o,required:a,disabled:s,value:l,onCheckedChange:u,form:h,...d}=e;return(0,c.jsx)(v,{__scopeSwitch:r,checked:n,defaultChecked:o,disabled:s,required:a,onCheckedChange:u,name:i,form:h,value:l,internal_do_not_use_render:({isFormControl:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(b,{...d,ref:t,__scopeSwitch:r}),e&&(0,c.jsx)(A,{__scopeSwitch:r})]})})},"Switch")),x=i.forwardRef(d(function(e,t){let{__scopeSwitch:r,...i}=e,n=y("SwitchThumb",r);return(0,c.jsx)(u.sG.span,{"data-state":S(n.checked),"data-disabled":n.disabled?"":void 0,...i,ref:t})},"SwitchThumb")),A=i.forwardRef(d(function({__scopeSwitch:e,onClick:t,...r},a){let{control:s,hasConsumerStoppedPropagationRef:h,userInteractionCount:d,checked:p,defaultChecked:f,required:m,disabled:g,name:v,value:b,form:_,bubbleInput:x,setBubbleInput:A}=y("SwitchBubbleInput",e),w=(0,o.s)(a,A),S=(0,l.X)(s),T=i.useRef(!1),C=i.useRef(p),E=i.useRef(d);i.useEffect(()=>{if(!x)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=d!==E.current;E.current=d;let r=C.current!==p;C.current=p;let i=!(t&&h.current);if(r&&e){T.current=!t;let r=new Event("click",{bubbles:i});e.call(x,p),x.dispatchEvent(r),T.current=!1}},[x,p,h,d]);let P=i.useRef(p);return(0,c.jsx)(u.sG.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??P.current,required:m,disabled:g,name:v,value:b,form:_,...r,tabIndex:-1,ref:w,onClick:(0,n.mK)(t,e=>{T.current&&e.stopPropagation()}),style:{...r.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})}
968,"SwitchBubbleInput"));function w(e){return"function"==typeof e}function S(e){return e?"checked":"unchecked"}d(w,"isFunction"),d(S,"getState")},16332(e,t,r){"use strict";r.d(t,{B8:()=>P,UC:()=>M,bL:()=>E,l9:()=>I});var i=r(67308),n=r(2690),o=r(27192),a=r(21963),s=r(3840),l=r(79795),u=r(49457),c=r(34986),h=r(72191),d=r(38e3),p=Object.defineProperty,f=(e,t)=>p(e,"name",{value:t,configurable:!0}),m="Tabs",[g,y]=(0,o.A)(m,[a.RG]),v=(0,a.RG)(),[b,_]=g(m),x=i.forwardRef(f(function(e,t){let{__scopeTabs:r,value:i,onValueChange:n,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:p="automatic",...f}=e,g=(0,u.jH)(s),[y,v]=(0,c.i)({prop:i,onChange:n,defaultProp:o??"",caller:m});return(0,d.jsx)(b,{scope:r,baseId:(0,h.B)(),value:y,onValueChange:v,orientation:a,dir:g,activationMode:p,children:(0,d.jsx)(l.sG.div,{dir:g,"data-orientation":a,...f,ref:t})})},"Tabs")),A=i.forwardRef(f(function(e,t){let{__scopeTabs:r,loop:i=!0,...n}=e,o=_("TabsList",r),s=v(r);return(0,d.jsx)(a.bL,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:(0,d.jsx)(l.sG.div,{role:"tablist","aria-orientation":o.orientation,...n,ref:t})})},"TabsList")),w=i.forwardRef(f(function(e,t){let{__scopeTabs:r,value:i,disabled:o=!1,...s}=e,u=_("TabsTrigger",r),c=v(r),h=T(u.baseId,i),p=C(u.baseId,i),f=i===u.value;return(0,d.jsx)(a.q7,{asChild:!0,...c,focusable:!o,active:f,children:(0,d.jsx)(l.sG.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":p,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h,...s,ref:t,onMouseDown:(0,n.mK)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():u.onValueChange(i)}),onKeyDown:(0,n.mK)(e.onKeyDown,e=>{!o&&e.target===e.currentTarget&&[" ","Enter"].includes(e.key)&&u.onValueChange(i)}),onFocus:(0,n.mK)(e.onFocus,()=>{let e="manual"!==u.activationMode;f||o||!e||u.onValueChange(i)})})})},"TabsTrigger")),S=i.forwardRef(f(function(e,t){let{__scopeTabs:r,value:n,forceMount:o,children:a,...u}=e,c=_("TabsContent",r),h=T(c.baseId,n),p=C(c.baseId,n),f=n===c.value,m=i.useRef(f);return i.useEffect(()=>{let e=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,d.jsx)(s.C,{present:o||f,children:({present:r})=>(0,d.jsx)(l.sG.div,{"data-state":f?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":h,hidden:!r,id:p,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:r&&a})})},"TabsContent"));function T(e,t){return`${e}-trigger-${t}`}function C(e,t){return`${e}-content-${t}`}f(T,"makeTriggerId"),f(C,"makeContentId");var E=x,P=A,I=w,M=S},71445(e,t,r){"use strict";r.d(t,{Kq:()=>K,UC:()=>J,ZL:()=>Q,bL:()=>X,i3:()=>ee,l9:()=>Y});var i=r(67308),n=r(2690),o=r(95768),a=r(27192),s=r(69058),l=r(72191),u=r(17225),c=r(74563),h=r(3840),d=r(79795),p=r(31292),f=r(34986),m=r(47307),g=r(42613),y=r(38e3),v=Object.defineProperty,b=(e,t)=>v(e,"name",{value:t,configurable:!0}),[_,x]=(0,a.A)("Tooltip",[u.Bk]),A=(0,u.Bk)(),w="tooltip.open",[S,T]=_("TooltipProvider"),C=b(e=>{let{__scopeTooltip:t,delayDuration:r=700,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,s=i.useRef(!0),l=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,y.jsx)(S,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:i.useCallback(()=>{n<=0||(window.clearTimeout(u.current),s.current=!1)},[n]),onClose:i.useCallback(()=>{n<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,n))},[n]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(e=>{l.current=e},[]),disableHoverableContent:o,children:a})},"TooltipProvider"),E="Tooltip",[P,I]=_(E),M=b(e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:c}=e,h=T(E,e.__scopeTooltip),d=A(t),[p,m]=i.useState(null),[g,v]=i.useState(void 0),_=(0,l.B)(),x=i.useRef(0),S=s??h.disableHoverableContent,C=c??h.delayDuration,I=i.useRef(!1),[M,k]=(0,f.i)({prop:n,defaultProp:o??!1,onChange:b(e=>{e?(h.onOpen(),document.dispatchEvent(new CustomEvent(w))):h.onClose(),a?.(e)}
968,"onChange"),caller:E}),O=i.useMemo(()=>M?I.current?"delayed-open":"instant-open":"closed",[M]),D=i.useCallback(()=>{window.clearTimeout(x.current),x.current=0,I.current=!1,k(!0)},[k]),R=i.useCallback(()=>{window.clearTimeout(x.current),x.current=0,k(!1)},[k]),L=i.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{I.current=!0,k(!0),x.current=0},C)},[C,k]);return i.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),(0,y.jsx)(u.bL,{...d,children:(0,y.jsx)(P,{scope:t,contentId:g??_,setContentId:v,open:M,stateAttribute:O,trigger:p,onTriggerChange:m,onTriggerEnter:i.useCallback(()=>{h.isOpenDelayedRef.current?L():D()},[h.isOpenDelayedRef,L,D]),onTriggerLeave:i.useCallback(()=>{S?R():(window.clearTimeout(x.current),x.current=0)},[R,S]),onOpen:D,onClose:R,disableHoverableContent:S,children:r})})},"Tooltip"),k="TooltipTrigger",O=i.forwardRef(b(function(e,t){let{__scopeTooltip:r,...a}=e,s=I(k,r),l=T(k,r),c=A(r),h=i.useRef(null),p=(0,o.s)(t,h,s.onTriggerChange),f=i.useRef(!1),m=i.useRef(!1),g=i.useCallback(()=>f.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),(0,y.jsx)(u.Mz,{asChild:!0,...c,children:(0,y.jsx)(d.sG.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:p,onPointerMove:(0,n.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(m.current||l.isPointerInTransitRef.current||(s.onTriggerEnter(),m.current=!0))}),onPointerLeave:(0,n.mK)(e.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:(0,n.mK)(e.onPointerDown,()=>{s.open&&s.onClose(),f.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:(0,n.mK)(e.onFocus,()=>{f.current||s.onOpen()}),onBlur:(0,n.mK)(e.onBlur,s.onClose),onClick:(0,n.mK)(e.onClick,s.onClose)})})},"TooltipTrigger")),D="TooltipPortal",[R,L]=_(D,{forceMount:void 0}),B=b(e=>{let{__scopeTooltip:t,forceMount:r,children:i,container:n}=e,o=I(D,t);return(0,y.jsx)(R,{scope:t,forceMount:r,children:(0,y.jsx)(h.C,{present:r||o.open,children:(0,y.jsx)(c.Z,{asChild:!0,container:n,children:i})})})},"TooltipPortal"),F="TooltipContent",j=i.forwardRef(b(function(e,t){let r=L(F,e.__scopeTooltip),{forceMount:i=r.forceMount,side:n="top",...o}=e,a=I(F,e.__scopeTooltip);return(0,y.jsx)(h.C,{present:i||a.open,children:a.disableHoverableContent?(0,y.jsx)(G,{side:n,...o,ref:t}):(0,y.jsx)(z,{side:n,...o,ref:t})})},"TooltipContent")),z=i.forwardRef(b(function(e,t){let r=I(F,e.__scopeTooltip),n=T(F,e.__scopeTooltip),a=i.useRef(null),s=(0,o.s)(t,a),[l,u]=i.useState(null),{trigger:c,onClose:h}=r,d=a.current,{onPointerInTransitChange:p}=n,f=i.useCallback(()=>{u(null),p(!1)},[p]),m=i.useCallback((e,t)=>{let r=e.currentTarget,i={x:e.clientX,y:e.clientY},n=U(i,r.getBoundingClientRect());u(Z([...H(i,n),...W(t.getBoundingClientRect())])),p(!0)},[p]);return i.useEffect(()=>()=>f(),[f]),i.useEffect(()=>{if(c&&d){let e=b(e=>m(e,d),"handleTriggerLeave"),t=b(e=>m(e,c),"handleContentLeave");return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[c,d,m,f]),i.useEffect(()=>{if(l){let e=b(e=>{let t=e.target,r={x:e.clientX,y:e.clientY},i=c?.contains(t)||d?.contains(t),n=!q(r,l);i?f():n&&(f(),h())},"handleTrackPointerGrace");return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,d,l,h,f]),(0,y.jsx)(G,{...e,ref:s})},"TooltipContentHoverable")),N=(0,p.Dc)("TooltipContent"),G=i.forwardRef(b(function(e,t){let{__scopeTooltip:r,children:n,"aria-label":o,id:a,onEscapeKeyDown:l,onPointerDownOutside:c,...h}=e,d=I(F,r),p=A(r),{onClose:f}=d;i.useEffect(()=>(document.addEventListener(w,f),()=>document.removeEventListener(w,f)),[f]),i.useEffect(()=>{if(d.trigger){let e=b(e=>{e.target instanceof Node&&e.target.contains(d.trigger)&&f()},"handleScroll");return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,f]);let{setContentId:v}=d;return(0,m.N)(()=>(v(a),()=>{v(void 0)}),[a,v]),(0,y.jsx)(s.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,y.jsxs)(u.UC,{"data-state":d.stateAttribute,role:o?void 0:"tooltip",id:o?void 0:d.contentId,...p,...h,ref:t,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,y.jsx)(N,{children:n}),o?(0,y.jsx)(g.bL,{id:d.contentId,role:"tooltip",children:o}):null]})})},"TooltipContentImpl")),V=i.forwardRef(b(function(e,t){let{__scopeTooltip:r,...i}=e,n=A(r);return(0,y.jsx)(u.i3,{...n,...i,ref:t})},"TooltipArrow"));function U(e,t){let r=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,i,n,o)){case o:return"left";case n:return"right";case r:return"top";case i:return"bottom";default:throw Error("unreachable")}}function H(e,t,r=5){let i=[];switch(t){case"top":i.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":i.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":i.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":i.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return i}function W(e){let{top:t,right:r,bottom:i,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:i},{x:n,y:i}]}function q(e,t){let{x:r,y:i}=e,n=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){let a=t[e],s=t[o],l=a.x,u=a.y,c=s.x,h=s.y;u>i!=h>i&&r<(c-l)*(i-u)/(h-u)+l&&(n=!n)}return n}function Z(e){let t=e.slice();return t.sort((e,t)=>
968e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),$(t)}function $(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let i=e[r];for(;t.length>=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(i.y-r.y)>=(e.y-r.y)*(i.x-r.x))t.pop();else break}t.push(i)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let i=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(i.y-t.y)>=(e.y-t.y)*(i.x-t.x))r.pop();else break}r.push(i)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}b(U,"getExitSideFromRect"),b(H,"getPaddedExitPoints"),b(W,"getPointsFromRect"),b(q,"isPointInPolygon"),b(Z,"getHull"),b($,"getHullPresorted");var K=C,X=M,Y=O,Q=B,J=j,ee=V},20255(e,t,r){"use strict";r.d(t,{c:()=>n});var i=r(67308);function n(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}(0,Object.defineProperty)(n,"name",{value:"useCallbackRef",configurable:!0})},34986(e,t,r){"use strict";r.d(t,{i:()=>p});var i=r(67308),n=r.t(i,2),o=r(47307),a=Object.defineProperty,s=n[" useEffectEvent ".trim().toString()],l=n[" useInsertionEffect ".trim().toString()];function u(e){if("function"==typeof s)return s(e);let t=i.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof l?l(()=>{t.current=e}):(0,o.N)(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}a(u,"name",{value:"useEffectEvent",configurable:!0});var c=Object.defineProperty,h=(e,t)=>c(e,"name",{value:t,configurable:!0}),d=n[" useInsertionEffect ".trim().toString()]||o.N;function p({prop:e,defaultProp:t,onChange:r=h(()=>{},"onChange"),caller:n}){let[o,a,s]=f({defaultProp:t,onChange:r}),l=void 0!==e;return[l?e:o,i.useCallback(t=>{if(l){let r=m(t)?t(e):t;r!==e&&s.current?.(r)}else a(t)},[l,e,a,s])]}function f({defaultProp:e,onChange:t}){let[r,n]=i.useState(e),o=i.useRef(r),a=i.useRef(t);return d(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function m(e){return"function"==typeof e}h(p,"useControllableState"),h(f,"useUncontrolledState"),h(m,"isFunction");var g=Symbol("RADIX:SYNC_STATE");h(function(e,t,r,n){let{prop:o,defaultProp:a,onChange:s,caller:l}=t,c=void 0!==o,h=u(s),d=[{...r,state:a}];n&&d.push(n);let[p,f]=i.useReducer((t,r)=>{if(r.type===g)return{...t,state:r.state};let i=e(t,r);return c&&!Object.is(i.state,t.state)&&h(i.state),i},...d),m=p.state,y=i.useRef(m);i.useEffect(()=>{y.current!==m&&(y.current=m,c||h(m))},[m,y,c]);let v=i.useMemo(()=>void 0!==o?{...p,state:o}:p,[p,o]);return i.useEffect(()=>{c&&!Object.is(o,p.state)&&f({type:g,state:o})},[o,p.state,c]),[v,f]},"useControllableStateReducer")},47307(e,t,r){"use strict";r.d(t,{N:()=>n});var i=r(67308),n=globalThis?.document?i.useLayoutEffect:()=>{}},34879(e,t,r){"use strict";r.d(t,{Z:()=>n});var i=r(67308);function n(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(0,Object.defineProperty)(n,"name",{value:"usePrevious",configurable:!0})},8519(e,t,r){"use strict";r.d(t,{X:()=>o});var i=r(67308),n=r(47307);function o(e){let[t,r]=i.useState(void 0);return(0,n.N)(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let i,n;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,n=t.blockSize}else i=e.offsetWidth,n=e.offsetHeight;r({width:i,height:n})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}(0,Object.defineProperty)(o,"name",{value:"useSize",configurable:!0})},42613(e,t,r){"use strict";r.d(t,{Qg:()=>s,bL:()=>u,s6:()=>l});var i=r(67308),n=r(79795),o=r(38e3),a=Object.defineProperty,s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),l=i.forwardRef(a(function(e,t){return(0,o.jsx)(n.sG.span,{...e,ref:t,style:{...s,...e.style}})},"name",{value:"VisuallyHidden",configurable:!0})),u=l},93498(e,t,r){"use strict";r.d(t,{m:()=>a});var i=r(81692),n=r(71786);class o extends i.Q{constructor(){super(),this.setup=e=>{if(!n.S$&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}
968onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"u"<typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}}let a=new o},47267(e,t,r){"use strict";function i(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,i,a,s,l;let u,c=null==(t=e.fetchOptions)||null==(r=t.meta)?void 0:r.refetchPage,h=null==(i=e.fetchOptions)||null==(a=i.meta)?void 0:a.fetchMore,d=null==h?void 0:h.pageParam,p=(null==h?void 0:h.direction)==="forward",f=(null==h?void 0:h.direction)==="backward",m=(null==(s=e.state.data)?void 0:s.pages)||[],g=(null==(l=e.state.data)?void 0:l.pageParams)||[],y=g,v=!1,b=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),_=(e,t,r,i)=>(y=i?[t,...y]:[...y,t],i?[r,...e]:[...e,r]),x=(t,r,i,n)=>{if(v)return Promise.reject("Cancelled");if(void 0===i&&!r&&t.length)return Promise.resolve(t);let o={queryKey:e.queryKey,pageParam:i,meta:e.options.meta};return Object.defineProperty(o,"signal",{enumerable:!0,get:()=>{var t,r;return null!=(t=e.signal)&&t.aborted?v=!0:null==(r=e.signal)||r.addEventListener("abort",()=>{v=!0}),e.signal}}),Promise.resolve(b(o)).then(e=>_(t,i,e,n))};if(m.length)if(p){let t=void 0!==d,r=t?d:n(e.options,m);u=x(m,t,r)}else if(f){let t=void 0!==d,r=t?d:o(e.options,m);u=x(m,t,r,!0)}else{y=[];let t=void 0===e.options.getNextPageParam;u=!c||!m[0]||c(m[0],0,m)?x([],t,g[0]):Promise.resolve(_([],g[0],m[0]));for(let r=1;r<m.length;r++)u=u.then(i=>{if(!c||!m[r]||c(m[r],r,m)){let o=t?g[r]:n(e.options,i);return x(i,t,o)}return Promise.resolve(_(i,g[r],m[r]))})}else u=x([]);return u.then(e=>({pages:e,pageParams:y}))}}}}function n(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function o(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function a(e,t){if(e.getNextPageParam&&Array.isArray(t)){let r=n(e,t);return null!=r&&!1!==r}}function s(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){let r=o(e,t);return null!=r&&!1!==r}}r.d(t,{PL:()=>i,RQ:()=>s,rB:()=>a})},34871(e,t,r){"use strict";r.d(t,{U:()=>i});let i=console},49046(e,t,r){"use strict";r.d(t,{$:()=>l,s:()=>s});var i=r(34871),n=r(99921),o=r(44094),a=r(38078);class s extends o.k{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||i.U,this.observers=[],this.state=e.state||l(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){var e,t,r,i,n,o,s,l,u,c,h,d,p,f,m,g,y,v,b,_;let x=()=>{var e;return this.retryer=(0,a.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},A="loading"===this.state.status;try{if(!A){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(u=(c=this.mutationCache.config).onMutate)?void 0:u.call(c,this.state.variables,this));let e=await (null==(h=(d=this.options).onMutate)?void 0:h.call(d,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}let a=await x();return await (null==(e=(t=this.mutationCache.config).onSuccess)?void 0:e.call(t,a,this.state.variables,this.state.context,this)),await (null==(r=(i=this.options).onSuccess)?void 0:r.call(i,a,this.state.variables,this.state.context)),await (null==(n=(o=this.mutationCache.config).onSettled)?void 0:n.call(o,a,null,this.state.variables,this.state.context,this)),await (null==(s=(l=this.options).onSettled)?void 0:s.call(l,a,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:a}),a}catch(e){try{throw await (null==(p=(f=this.mutationCache.config).onError)?void 0:p.call(f,e,this.state.variables,this.state.context,this)),await (null==(m=(g=this.options).onError)?void 0:m.call(g,e,this.state.variables,this.state.context)),await (null==(y=(v=this.mutationCache.config).onSettled)?void 0:y.call(v,void 0,e,this.state.variables,this.state.context,this)),await (null==(b=(_=this.options).onSettled)?void 0:b.call(_,void 0,e,this.state.variables,this.state.context)),e}finally{this.dispatch({type:"error",error:e})}}}dispatch(e){let t=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!(0,a.v_)(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
968sed:!1,status:"error"};case"setState":return{...t,...e.state}}};this.state=t(this.state),n.j.batch(()=>{this.observers.forEach(t=>{t.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function l(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}},99921(e,t,r){"use strict";let i,n,o,a,s,l;r.d(t,{j:()=>c});var u=r(71786);let c=(i=[],n=0,o=e=>{e()},a=e=>{e()},s=e=>{n?i.push(e):(0,u.G6)(()=>{o(e)})},l=()=>{let e=i;i=[],e.length&&(0,u.G6)(()=>{a(()=>{e.forEach(e=>{o(e)})})})},{batch:e=>{let t;n++;try{t=e()}finally{--n||l()}return t},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{o=e},setBatchNotifyFunction:e=>{a=e}})},82503(e,t,r){"use strict";r.d(t,{t:()=>s});var i=r(81692),n=r(71786);let o=["online","offline"];class a extends i.Q{constructor(){super(),this.setup=e=>{if(!n.S$&&window.addEventListener){let t=()=>e();return o.forEach(e=>{window.addEventListener(e,t,!1)}),()=>{o.forEach(e=>{window.removeEventListener(e,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return"boolean"==typeof this.online?this.online:"u"<typeof navigator||void 0===navigator.onLine||navigator.onLine}}let s=new a},35429(e,t,r){"use strict";r.d(t,{E:()=>g});var i=r(71786),n=r(34871),o=r(99921),a=r(38078),s=r(44094);class l extends s.k{constructor(e){var t;let r,i,o;super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||n.U,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||(o=(i=void 0!==(r="function"==typeof(t=this.options).initialData?t.initialData():t.initialData))?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0,{data:r,dataUpdateCount:0,dataUpdatedAt:i?null!=o?o:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"loading",fetchStatus:"idle"}),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){let r=(0,i.pl)(this.state.data,e,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;let r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(i.lQ).catch(i.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,i.j3)(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>
968t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var r,n,o,s;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(o=this.retryer)||o.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let l=(0,i.jY)(),u={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(l)return this.abortSignalConsumed=!0,l.signal}})};c(u);let h=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(u)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:h};c(d),null==(r=this.options.behavior)||r.onFetch(d),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(n=d.fetchOptions)?void 0:n.meta))&&this.dispatch({type:"fetch",meta:null==(s=d.fetchOptions)?void 0:s.meta});let p=e=>{if((0,a.wm)(e)&&e.silent||this.dispatch({type:"error",error:e}),!(0,a.wm)(e)){var t,r,i,n;null==(t=(r=this.cache.config).onError)||t.call(r,e,this),null==(i=(n=this.cache.config).onSettled)||i.call(n,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=(0,a.II)({fn:d.fetchFn,abort:null==l?void 0:l.abort.bind(l),onSuccess:e=>{var t,r,i,n;void 0===e?p(Error(this.queryHash+" data is undefined")):(this.setData(e),null==(t=(r=this.cache.config).onSuccess)||t.call(r,e,this),null==(i=(n=this.cache.config).onSettled)||i.call(n,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1)},onError:p,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){let t=t=>{var r,i;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(r=e.meta)?r:null,fetchStatus:(0,a.v_)(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(i=e.dataUpdatedAt)?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let n=e.error;if((0,a.wm)(n)&&n.revert&&this.revertState)return{...this.revertState,fetchStatus:"idle"};return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),o.j.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}var u=r(81692);class c extends u.Q{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,r){var n;let o=t.queryKey,a=null!=(n=t.queryHash)?n:(0,i.F$)(o,t),s=this.get(a);return s||(s=new l({cache:this,logger:e.getLogger(),queryKey:o,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(s)),s}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){o.j.batch(()=>
968{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[r]=(0,i.b_)(e,t);return void 0===r.exact&&(r.exact=!0),this.queries.find(e=>(0,i.MK)(r,e))}findAll(e,t){let[r]=(0,i.b_)(e,t);return Object.keys(r).length>0?this.queries.filter(e=>(0,i.MK)(r,e)):this.queries}notify(e){o.j.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}onFocus(){o.j.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){o.j.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}var h=r(49046);class d extends u.Q{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,r){let i=new h.s({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){o.j.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(t=>(0,i.nJ)(e,t))}findAll(e){return this.mutations.filter(t=>(0,i.nJ)(e,t))}notify(e){o.j.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>
968e.state.isPaused);return o.j.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(i.lQ)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}var p=r(93498),f=r(82503),m=r(47267);class g{constructor(e={}){this.queryCache=e.queryCache||new c,this.mutationCache=e.mutationCache||new d,this.logger=e.logger||n.U,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=p.m.subscribe(()=>{p.m.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=f.t.subscribe(()=>{f.t.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){let[r]=(0,i.b_)(e,t);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data}ensureQueryData(e,t,r){let n=(0,i.vh)(e,t,r),o=this.getQueryData(n.queryKey);return o?Promise.resolve(o):this.fetchQuery(n)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.queryCache.find(e),o=null==n?void 0:n.state.data,a=(0,i.Zw)(t,o);if(void 0===a)return;let s=(0,i.vh)(e),l=this.defaultQueryOptions(s);return this.queryCache.build(this,l).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return o.j.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state}removeQueries(e,t){let[r]=(0,i.b_)(e,t),n=this.queryCache;o.j.batch(()=>{n.findAll(r).forEach(e=>{n.remove(e)})})}resetQueries(e,t,r){let[n,a]=(0,i.b_)(e,t,r),s=this.queryCache,l={type:"active",...n};return o.j.batch(()=>(s.findAll(n).forEach(e=>{e.reset()}),this.refetchQueries(l,a)))}cancelQueries(e,t,r){let[n,a={}]=(0,i.b_)(e,t,r);return void 0===a.revert&&(a.revert=!0),Promise.all(o.j.batch(()=>this.queryCache.findAll(n).map(e=>e.cancel(a)))).then(i.lQ).catch(i.lQ)}invalidateQueries(e,t,r){let[n,a]=(0,i.b_)(e,t,r);return o.j.batch(()=>{var e,t;if(this.queryCache.findAll(n).forEach(e=>{e.invalidate()}),"none"===n.refetchType)return Promise.resolve();let r={...n,type:null!=(e=null!=(t=n.refetchType)?t:n.type)?e:"active"};return this.refetchQueries(r,a)})}refetchQueries(e,t,r){let[n,a]=(0,i.b_)(e,t,r),s=Promise.all(o.j.batch(()=>this.queryCache.findAll(n).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...a,cancelRefetch:null==(t=null==a?void 0:a.cancelRefetch)||t,meta:{refetchPage:n.refetchPage}})}))).then(i.lQ);return null!=a&&a.throwOnError||(s=s.catch(i.lQ)),s}fetchQuery(e,t,r){let n=(0,i.vh)(e,t,r),o=this.defaultQueryOptions(n);void 0===o.retry&&(o.retry=!1);let a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,r){return this.fetchQuery(e,t,r).then(i.lQ).catch(i.lQ)}fetchInfiniteQuery(e,t,r){let n=(0,i.vh)(e,t,r);return n.behavior=(0,m.PL)(),this.fetchQuery(n)}prefetchInfiniteQuery(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(i.lQ).catch(i.lQ)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let r=this.queryDefaults.find(t=>(0,i.Od)(e)===(0,i.Od)(t.queryKey));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;let t=this.queryDefaults.find(t=>(0,i.Cp)(e,t.queryKey));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){let r=this.mutationDefaults.find(t=>(0,i.Od)(e)===(0,i.Od)(t.mutationKey));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;let t=this.mutationDefaults.find(t=>(0,i.Cp)(e,t.mutationKey));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=(0,i.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}},99327(e,t,r){"use strict";r.d(t,{$:()=>l});var i=r(71786),n=r(99921),o=r(93498),a=r(81692),s=r(38078);class l extends a.Q{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),u(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return c(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return c(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){let r=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),(0,i.f8)(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();let o=this.hasListeners();o&&h(this.currentQuery,n,this.options,r)&&this.executeFetch(),this.updateResult(t),o&&(this.currentQuery!==n||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();let a=this.computeRefetchInterval();o&&(this.currentQuery!==n||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){let t=this.client.getQueryCache().build(this.client,e),r=this.createResult(t,e);return e.keepPreviousData||(void 0!==e.placeholderData?!r.isPlaceholderData:(0,i.f8)(this.getCurrentResult(),r))||(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(e){let t={};return Object.keys(e).forEach(r=>{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),e[r])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){let t=this.client.defaultQueryOptions(e),r=this.client.getQueryCache().build(this.client,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(i.lQ)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),i.S$||this.currentResult.isStale||!(0,i.gn)(this.options.staleTime))return;let e=(0,i.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e+1)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!i.S$&&!1!==this.options.enabled&&(0,i.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>
968{(this.options.refetchIntervalInBackground||o.m.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){let r,n=this.currentQuery,o=this.options,a=this.currentResult,l=this.currentResultState,c=this.currentResultOptions,p=e!==n,f=p?e.state:this.currentQueryInitialState,m=p?this.currentResult:this.previousQueryResult,{state:g}=e,{dataUpdatedAt:y,error:v,errorUpdatedAt:b,fetchStatus:_,status:x}=g,A=!1,w=!1;if(t._optimisticResults){let r=this.hasListeners(),i=!r&&u(e,t),a=r&&h(e,n,t,o);(i||a)&&(_=(0,s.v_)(e.options.networkMode)?"fetching":"paused",y||(x="loading")),"isRestoring"===t._optimisticResults&&(_="idle")}if(t.keepPreviousData&&!g.dataUpdatedAt&&null!=m&&m.isSuccess&&"error"!==x)r=m.data,y=m.dataUpdatedAt,x=m.status,A=!0;else if(t.select&&void 0!==g.data)if(a&&g.data===(null==l?void 0:l.data)&&t.select===this.selectFn)r=this.selectResult;else try{this.selectFn=t.select,r=t.select(g.data),r=(0,i.pl)(null==a?void 0:a.data,r,t),this.selectResult=r,this.selectError=null}catch(e){this.selectError=e}else r=g.data;if(void 0!==t.placeholderData&&void 0===r&&"loading"===x){let e;if(null!=a&&a.isPlaceholderData&&t.placeholderData===(null==c?void 0:c.placeholderData))e=a.data;else if(e="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.selectError=null}catch(e){this.selectError=e}void 0!==e&&(x="success",r=(0,i.pl)(null==a?void 0:a.data,e,t),w=!0)}this.selectError&&(v=this.selectError,r=this.selectResult,b=Date.now(),x="error");let S="fetching"===_,T="loading"===x,C="error"===x;return{status:x,fetchStatus:_,isLoading:T,isSuccess:"success"===x,isError:C,isInitialLoading:T&&S,data:r,dataUpdatedAt:y,error:v,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:S,isRefetching:S&&!T,isLoadingError:C&&0===g.dataUpdatedAt,isPaused:"paused"===_,isPlaceholderData:w,isPreviousData:A,isRefetchError:C&&0!==g.dataUpdatedAt,isStale:d(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){let t=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,(0,i.f8)(r,t))return;this.currentResult=r;let n={cache:!0},o=()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.trackedProps.size)return!0;let i=new Set(null!=r?r:this.trackedProps);return this.options.useErrorBoundary&&i.add("error"),Object.keys(this.currentResult).some(e=>this.currentResult[e]!==t[e]&&i.has(e))};(null==e?void 0:e.listeners)!==!1&&o()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||(0,s.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){n.j.batch(()=>{var t,r,i,n,o,a,s,l;e.onSuccess?(null==(t=(r=this.options).onSuccess)||t.call(r,this.currentResult.data),null==(i=(n=this.options).onSettled)||i.call(n,this.currentResult.data,null)):e.onError&&(null==(o=(a=this.options).onError)||o.call(a,this.currentResult.error),null==(s=(l=this.options).onSettled)||s.call(l,void 0,this.currentResult.error)),e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function u(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&("error"!==e.state.status||!1!==t.retryOn
968Mount)||e.state.dataUpdatedAt>0&&c(e,t,t.refetchOnMount)}function c(e,t,r){if(!1!==t.enabled){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&d(e,t)}return!1}function h(e,t,r,i){return!1!==r.enabled&&(e!==t||!1===i.enabled)&&(!r.suspense||"error"!==e.state.status)&&d(e,r)}function d(e,t){return e.isStaleByTime(t.staleTime)}},44094(e,t,r){"use strict";r.d(t,{k:()=>n});var i=r(71786);class n{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,i.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:i.S$?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}},38078(e,t,r){"use strict";r.d(t,{II:()=>c,v_:()=>s,wm:()=>u});var i=r(93498),n=r(82503),o=r(71786);function a(e){return Math.min(1e3*2**e,3e4)}function s(e){return(null!=e?e:"online")!=="online"||n.t.isOnline()}class l{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function u(e){return e instanceof l}function c(e){let t,r,u,c=!1,h=0,d=!1,p=new Promise((e,t)=>{r=e,u=t}),f=()=>!i.m.isFocused()||"always"!==e.networkMode&&!n.t.isOnline(),m=i=>{d||(d=!0,null==e.onSuccess||e.onSuccess(i),null==t||t(),r(i))},g=r=>{d||(d=!0,null==e.onError||e.onError(r),null==t||t(),u(r))},y=()=>new Promise(r=>{t=e=>{let t=d||!f();return t&&r(e),t},null==e.onPause||e.onPause()}).then(()=>{t=void 0,d||null==e.onContinue||e.onContinue()}),v=()=>{let t;if(!d){try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch(t=>{var r,i;if(d)return;let n=null!=(r=e.retry)?r:3,s=null!=(i=e.retryDelay)?i:a,l="function"==typeof s?s(h,t):s,u=!0===n||"number"==typeof n&&h<n||"function"==typeof n&&n(h,t);c||!u?g(t):(h++,null==e.onFail||e.onFail(h,t),(0,o.yy)(l).then(()=>{if(f())return y()}).then(()=>{c?g(t):v()}))})}};return s(e.networkMode)?v():y().then(v),{promise:p,cancel:t=>{d||(g(new l(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?p:Promise.resolve(),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1}}}},81692(e,t,r){"use strict";r.d(t,{Q:()=>i});class i{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){let t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},71786(e,t,r){"use strict";r.d(t,{Cp:()=>v,F$:()=>g,G6:()=>C,GR:()=>h,KK:()=>p,MK:()=>f,Od:()=>y,S$:()=>i,Zw:()=>o,_D:()=>l,b_:()=>d,f8:()=>_,gn:()=>a,iv:()=>s,j3:()=>u,jY:()=>E,lQ:()=>n,nJ:()=>m,pl:()=>P,vh:()=>c,yy:()=>T});let i="u"<typeof window||"Deno"in window;function n(){}function o(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&1/0!==e}function s(e,t){return e.filter(e=>!t.includes(e))}function l(e,t,r){let i=e.slice(0);return i[t]=r,i}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t,r){return S(e)?"function"==typeof t?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function h(e,t,r){return S(e)?"function"==typeof t?{...r,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}function d(e,t,r){return S(e)?[{...t,queryKey:e},r]:[e||{},t]}function p(e,t,r){return S(e)?[{...t,mutationKey:e},r]:[e||{},t]}function f(e,t){let{type:r="all",exact:i,fetchStatus:n,predicate:o,queryKey:a,stale:s}=e;if(S(a)){if(i){if(t.queryHash!==g(a,t.options))return!1}else if(!b(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&(void 0===n||n===t.state.fetchStatus)&&(!o||!!o(t))}function m(e,t){let{exact:r,fetching:i,predicate:n,mutationKey:o}=e;if(S(o)){if(!t.options.mutationKey)return!1;if(r){if(y(t.options.mutationKey)!==y(o))return!1}else if(!b(t.options.mutationKey,o))return!1}return("boolean"!=typeof i||"loading"===t.state.status===i)&&(!n||!!n(t))}function g(e,t){return((null==t?void 0:t.queryKeyHashFn)||y)(e)}function y(e){return JSON.stringify(e,(e,t)=>A(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function v(e,t){return b(e,t)}function b(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!b(e[r],t[r]))}function _(e,t){if(e&&!t||t&&!e)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function x(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function A(e){if(!w(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!w(r)&&!!r.hasOwnProperty("isPrototypeOf")}function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return Array.isArray(e)}function T(e){return new Promise(t=>{setTimeout(t,e)})}function C(e){T(0).then(e)}
968function E(){if("function"==typeof AbortController)return new AbortController}function P(e,t,r){return null!=r.isDataEqual&&r.isDataEqual(e,t)?e:"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r,i=0){if(t===r)return t;if(i>500)return r;let n=x(t)&&x(r);if(n||A(t)&&A(r)){let o=n?t.length:Object.keys(t).length,a=n?r:Object.keys(r),s=a.length,l=n?[]:{},u=0;for(let o=0;o<s;o++){let s=n?o:a[o];l[s]=e(t[s],r[s],i+1),l[s]===t[s]&&u++}return o===s&&u===o?t:l}return r}(e,t):t}},33070(e,t,r){"use strict";r.d(t,{E:()=>i});let i=function(){return null}},86475(e,t,r){"use strict";r.d(t,{C:()=>o});var i=r(67308),n=r(46779);let o=({children:e,options:t,state:r})=>(!function(e,t={}){let r=(0,n.jE)({context:t.context}),o=i.useRef(t);o.current=t,i.useMemo(()=>{e&&function(e,t,r){if("object"!=typeof t||null===t)return;let i=e.getMutationCache(),n=e.getQueryCache(),o=t.mutations||[],a=t.queries||[];o.forEach(t=>{var n;i.build(e,{...null==r||null==(n=r.defaultOptions)?void 0:n.mutations,mutationKey:t.mutationKey},t.state)}),a.forEach(({queryKey:t,state:i,queryHash:o})=>{var a;let s=n.get(o);if(s){if(s.state.dataUpdatedAt<i.dataUpdatedAt){let{fetchStatus:e,...t}=i;s.setState(t)}return}n.build(e,{...null==r||null==(a=r.defaultOptions)?void 0:a.queries,queryKey:t,queryHash:o},{...i,fetchStatus:"idle"})})}(r,e,o.current)},[r,e])}(r,t),e)},46779(e,t,r){"use strict";r.d(t,{Ht:()=>l,jE:()=>s});var i=r(67308);let n=i.createContext(void 0),o=i.createContext(!1);function a(e,t){return e||(t&&"u">typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=n),window.ReactQueryClientContext):n)}let s=({context:e}={})=>{let t=i.useContext(a(e,i.useContext(o)));if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},l=({client:e,children:t,context:r,contextSharing:n=!1})=>{i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let s=a(r,n);return i.createElement(o.Provider,{value:!r&&n},i.createElement(s.Provider,{value:e},t))}},24740(e,t,r){"use strict";let i;r.d(t,{h:()=>a});var n=r(67308);let o=n.createContext((i=!1,{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i})),a=()=>n.useContext(o)},83348(e,t,r){"use strict";r.d(t,{$1:()=>s,LJ:()=>o,wZ:()=>a});var i=r(67308),n=r(18602);let o=(e,t)=>{(e.suspense||e.useErrorBoundary)&&!t.isReset()&&(e.retryOnMount=!1)},a=e=>{i.useEffect(()=>{e.clearReset()},[e])},s=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:i})=>e.isError&&!t.isReset()&&!e.isFetching&&(0,n.G)(r,[e.error,i])},53182(e,t,r){"use strict";r.d(t,{w:()=>o});var i=r(67308);let n=i.createContext(!1),o=()=>i.useContext(n);n.Provider},23045(e,t,r){"use strict";function i(e){return e}r.d(t,{j:()=>i})},82191(e,t,r){"use strict";r.d(t,{EU:()=>o,iL:()=>a,nE:()=>n,tu:()=>i});let i=e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.cacheTime&&(e.cacheTime=Math.max(e.cacheTime,1e3)))},n=(e,t)=>e.isLoading&&e.isFetching&&!t,o=(e,t,r)=>(null==e?void 0:e.suspense)&&n(t,r),a=(e,t,r)=>t.fetchOptimistic(e).then(({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)}).catch(t=>{r.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)})},62617(e,t,r){"use strict";r.d(t,{t:()=>h});var i=r(67308),n=r(99921),o=r(36523),a=r(24740),s=r(46779),l=r(53182),u=r(83348),c=r(82191);function h(e,t){let r=(0,s.jE)({context:e.context}),h=(0,l.w)(),d=(0,a.h)(),p=r.defaultQueryOptions(e);p._optimisticResults=h?"isRestoring":"optimistic",p.onError&&(p.onError=n.j.batchCalls(p.onError)),p.onSuccess&&(p.onSuccess=n.j.batchCalls(p.onSuccess)),p.onSettled&&(p.onSettled=n.j.batchCalls(p.onSettled)),(0,c.tu)(p),(0,u.LJ)(p,d),(0,u.wZ)(d);let[f]=i.useState(()=>new t(r,p)),m=f.getOptimisticResult(p);if((0,o.r)(i.useCallback(e=>{let t=h?()=>void 0:f.subscribe(n.j.batchCalls(e));return f.updateResult(),t},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),i.useEffect(()=>{f.setOptions(p,{listeners:!1})},[p,f]),(0,c.EU)(p,m,h))throw(0,c.iL)(p,f,d);if((0,u.$1)({result:m,errorResetBoundary:d,useErrorBoundary:p.useErrorBoundary,query:f.getCurrentQuery()}))throw m.error;return p.notifyOnChangeProps?m:f.trackResult(m)}},22854(e,t,r){"use strict";r.d(t,{q:()=>l});var i=r(71786),n=r(99327),o=r(47267);class a extends n.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,o.PL)()},t)}getOptimisticResult(e){return e.behavior=(0,o.PL)(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...t}={}
968){return this.fetch({...t,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,t){var r,i,n,a,s,l;let{state:u}=e,c=super.createResult(e,t),{isFetching:h,isRefetching:d}=c,p=h&&(null==(r=u.fetchMeta)||null==(i=r.fetchMore)?void 0:i.direction)==="forward",f=h&&(null==(n=u.fetchMeta)||null==(a=n.fetchMore)?void 0:a.direction)==="backward";return{...c,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,o.rB)(t,null==(s=u.data)?void 0:s.pages),hasPreviousPage:(0,o.RQ)(t,null==(l=u.data)?void 0:l.pages),isFetchingNextPage:p,isFetchingPreviousPage:f,isRefetching:d&&!p&&!f}}}var s=r(62617);function l(e,t,r){let n=(0,i.vh)(e,t,r);return(0,s.t)(n,a)}},80782(e,t,r){"use strict";r.d(t,{n:()=>d});var i=r(67308),n=r(71786),o=r(49046),a=r(99921),s=r(81692);class l extends s.Q{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let r=this.options;this.options=this.client.defaultMutationOptions(e),(0,n.f8)(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:(0,o.$)(),t="loading"===e.status,r={...e,isLoading:t,isPending:t,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(e){a.j.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var t,r,i,n,o,a,s,l;e.onSuccess?(null==(t=(r=this.mutateOptions).onSuccess)||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(i=(n=this.mutateOptions).onSettled)||i.call(n,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(o=(a=this.mutateOptions).onError)||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(s=(l=this.mutateOptions).onSettled)||s.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)})})}}var u=r(36523),c=r(46779),h=r(18602);function d(e,t,r){let o=(0,n.GR)(e,t,r),s=(0,c.jE)({context:o.context}),[d]=i.useState(()=>new l(s,o));i.useEffect(()=>{d.setOptions(o)},[d,o]);let f=(0,u.r)(i.useCallback(e=>d.subscribe(a.j.batchCalls(e)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),m=i.useCallback((e,t)=>{d.mutate(e,t).catch(p)},[d]);if(f.error&&(0,h.G)(d.options.useErrorBoundary,[f.error]))throw f.error;return{...f,mutate:m,mutateAsync:f.mutate}}function p(){}},54426(e,t,r){"use strict";r.d(t,{E:()=>m});var i=r(67308),n=r(71786),o=r(99921),a=r(99327),s=r(81692);class l extends s.Q{constructor(e,t){super(),this.client=e,this.queries=[],this.result=[],this.observers=[],this.observersMap={},t&&this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.observers.forEach(e=>{e.subscribe(t=>{this.onUpdate(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.observers.forEach(e=>{e.destroy()})}setQueries(e,t){this.queries=e,o.j.batch(()=>{let e=this.observers,r=this.findMatchingObservers(this.queries);
968r.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions,t));let i=r.map(e=>e.observer),o=Object.fromEntries(i.map(e=>[e.options.queryHash,e])),a=i.map(e=>e.getCurrentResult()),s=i.some((t,r)=>t!==e[r]);e.length===i.length&&!s||(this.observers=i,this.observersMap=o,this.result=a,this.hasListeners()&&((0,n.iv)(e,i).forEach(e=>{e.destroy()}),(0,n.iv)(i,e).forEach(e=>{e.subscribe(t=>{this.onUpdate(e,t)})}),this.notify()))})}getCurrentResult(){return this.result}getQueries(){return this.observers.map(e=>e.getCurrentQuery())}getObservers(){return this.observers}getOptimisticResult(e){return this.findMatchingObservers(e).map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions))}findMatchingObservers(e){let t=this.observers,r=new Map(t.map(e=>[e.options.queryHash,e])),i=e.map(e=>this.client.defaultQueryOptions(e)),n=i.flatMap(e=>{let t=r.get(e.queryHash);return null!=t?[{defaultedQueryOptions:e,observer:t}]:[]}),o=new Set(n.map(e=>e.defaultedQueryOptions.queryHash)),s=i.filter(e=>!o.has(e.queryHash)),l=new Set(n.map(e=>e.observer)),u=t.filter(e=>!l.has(e)),c=e=>{let t=this.client.defaultQueryOptions(e),r=this.observersMap[t.queryHash];return null!=r?r:new a.$(this.client,t)},h=s.map((e,t)=>{if(e.keepPreviousData){let r=u[t];if(void 0!==r)return{defaultedQueryOptions:e,observer:r}}return{defaultedQueryOptions:e,observer:c(e)}});return n.concat(h).sort((e,t)=>i.indexOf(e.defaultedQueryOptions)-i.indexOf(t.defaultedQueryOptions))}onUpdate(e,t){let r=this.observers.indexOf(e);-1!==r&&(this.result=(0,n._D)(this.result,r,t),this.notify())}notify(){o.j.batch(()=>{this.listeners.forEach(({listener:e})=>{e(this.result)})})}}var u=r(36523),c=r(46779),h=r(53182),d=r(24740),p=r(83348),f=r(82191);function m({queries:e,context:t}){let r=(0,c.jE)({context:t}),n=(0,h.w)(),a=(0,d.h)(),s=i.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=n?"isRestoring":"optimistic",t}),[e,r,n]);s.forEach(e=>{(0,f.tu)(e),(0,p.LJ)(e,a)}),(0,p.wZ)(a);let[g]=i.useState(()=>new l(r,s)),y=g.getOptimisticResult(s);(0,u.r)(i.useCallback(e=>n?()=>void 0:g.subscribe(o.j.batchCalls(e)),[g,n]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),i.useEffect(()=>{g.setQueries(s,{listeners:!1})},[s,g]);let v=y.some((e,t)=>(0,f.EU)(s[t],e,n))?y.flatMap((e,t)=>{let r=s[t],i=g.getObservers()[t];if(r&&i)if((0,f.EU)(r,e,n))return(0,f.iL)(r,i,a);else(0,f.nE)(e,n)&&(0,f.iL)(r,i,a);return[]}):[];if(v.length>0)throw Promise.all(v);let b=g.getQueries(),_=y.find((e,t)=>{var r,i;return(0,p.$1)({result:e,errorResetBoundary:a,useErrorBoundary:null!=(r=null==(i=s[t])?void 0:i.useErrorBoundary)&&r,query:b[t]})});if(null!=_&&_.error)throw _.error;return y}},30204(e,t,r){"use strict";r.d(t,{I:()=>a});var i=r(99327),n=r(71786),o=r(62617);function a(e,t,r){let a=(0,n.vh)(e,t,r);return(0,o.t)(a,i.$)}},36523(e,t,r){"use strict";r.d(t,{r:()=>i});let i=r(33163).useSyncExternalStore},18602(e,t,r){"use strict";function i(e,t){return"function"==typeof e?e(...t):!!e}r.d(t,{G:()=>i})},70851(e,t,r){"use strict";function i(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=function e(t){var r,i,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(i=e(t[r]))&&(n&&(n+=" "),n+=i)}else for(i in t)t[i]&&(n&&(n+=" "),n+=i);return n}(e))&&(i&&(i+=" "),i+=t);return i}r.d(t,{$:()=>i})},90227(e,t,r){"use strict";var i,n;function o(e){return e.type===i.Tag||e.type===i.Script||e.type===i.Style}r.r(t),r.d(t,{CDATA:()=>p,Comment:()=>u,Directive:()=>l,Doctype:()=>f,ElementType:()=>i,Root:()=>a,Script:()=>c,Style:()=>h,Tag:()=>d,Text:()=>s,isTag:()=>o}),(n=i||(i={})).Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype";let a=i.Root,s=i.Text,l=i.Directive,u=i.Comment,c=i.Script,h=i.Style,d=i.Tag,p=i.CDATA,f=i.Doctype},35403(e,t,r){"use strict";r.r(t),r.d(t,{CDATA:()=>n.KB,Comment:()=>n.Mw,DataNode:()=>n.dw,Document:()=>n.yo,DomHandler:()=>a,Element:()=>n.Hg,Node:()=>n.bP,NodeWithChildren:()=>n.s0,ProcessingInstruction:()=>n.Cd,Text:()=>n.EY,cloneNode:()=>n.Uk,default:()=>s,hasChildren:()=>n.Go,isCDATA:()=>n.yf,isComment:()=>n.Cn,isDirective:()=>n.qT,isDocument:()=>n.wz,isTag:()=>n.dz,isText:()=>n.KH});var i=r(90227),n=r(67147);let o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class a{dom=[];root=new n.yo(this.dom);callback;options;elementCB;done=!1;tagStack=[this.root];lastNode=null;parser=null;constructor(e,t,r){"function"==typeof t&&(r=t,t=o),"object"==typeof e&&(t=e,e=void 0),this.callback=e??null,this.options=t??o,this.elementCB=r??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new n.yo(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){let r=this.options.xmlMode?i.ElementType.Tag:void 0,o=new n.Hg(e,t,void 0,r);this.addNode(o),this.tagStack.push(o)}ontext(e){let{lastNode:t}=this;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&this.parser&&(t.endIndex=this.parser.endIndex);else{let t=new n.EY(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment){this.lastNode.data+=e;return}let t=new n.Mw(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){let e=new n.EY(""),t=new n.KB([e]);this.addNode(t),e.parent=t,this.lastNode=e}
968oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){let r=new n.Cd(e,t);this.addNode(r)}handleCallback(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e}addNode(e){let t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&this.parser&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&this.parser&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null}}let s=a},67147(e,t,r){"use strict";r.d(t,{Cd:()=>l,Cn:()=>g,EY:()=>a,Go:()=>b,Hg:()=>d,KB:()=>c,KH:()=>m,Mw:()=>s,Uk:()=>_,bP:()=>n,dw:()=>o,dz:()=>p,qT:()=>y,s0:()=>u,wz:()=>v,yf:()=>f,yo:()=>h});var i=r(90227);class n{parent=null;prev=null;next=null;startIndex=null;endIndex=null;get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return _(this,e)}}class o extends n{data;constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}}class a extends o{type=i.ElementType.Text;get nodeType(){return 3}}class s extends o{type=i.ElementType.Comment;get nodeType(){return 8}}class l extends o{type=i.ElementType.Directive;name;constructor(e,t){super(t),this.name=e}get nodeType(){return 1}"x-name";"x-publicId";"x-systemId"}class u extends n{children;constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}}class c extends u{type=i.ElementType.CDATA;get nodeType(){return 4}}class h extends u{type=i.ElementType.Root;get nodeType(){return 9}}class d extends u{name;attribs;type;constructor(e,t,r=[],n="script"===e?i.ElementType.Script:"style"===e?i.ElementType.Style:i.ElementType.Tag){super(r),this.name=e,this.attribs=t,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this["x-attribsNamespace"]?.[e],prefix:this["x-attribsPrefix"]?.[e]}))}namespace;"x-attribsNamespace";"x-attribsPrefix"}function p(e){return(0,i.isTag)(e)}function f(e){return e.type===i.ElementType.CDATA}function m(e){return e.type===i.ElementType.Text}function g(e){return e.type===i.ElementType.Comment}function y(e){return e.type===i.ElementType.Directive}function v(e){return e.type===i.ElementType.Root}function b(e){return Object.hasOwn(e,"children")}function _(e,t=!1){let r;if(m(e))r=new a(e.data);else if(g(e))r=new s(e.data);else if(p(e)){let i=t?x(e.children):[],n=new d(e.name,{...e.attribs},i);for(let e of i)e.parent=n;null!=e.namespace&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=n}else if(f(e)){let i=t?x(e.children):[],n=new c(i);for(let e of i)e.parent=n;r=n}else if(v(e)){let i=t?x(e.children):[],n=new h(i);for(let e of i)e.parent=n;e["x-mode"]&&(n["x-mode"]=e["x-mode"]),r=n}else if(y(e)){let t=new l(e.name,e.data);null!=e["x-name"]&&(t["x-name"]=e["x-name"],t["x-publicId"]=e["x-publicId"],t["x-systemId"]=e["x-systemId"]),r=t}else throw Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function x(e){let t=e.map(e=>_(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}},40977(e,t,r){"use strict";r.d(t,{A:()=>n});let i={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function n(e={}){let t,r,o,a,s=null,l=0,u=!1,c=!1,h=!1,d=!1;function p(){if(!o){if(g()){h=!0;return}u||r.emit("autoplay:play"),function(){let{ownerWindow:e}=r.internalEngine();e.clearTimeout(l),l=e.setTimeout(x,a[r.selectedScrollSnap()]),s=new Date().getTime(),r.emit("autoplay:timerset")}(),u=!0}}function f(){o||(u&&r.emit("autoplay:stop"),function(){let{ownerWindow:e}=r.internalEngine();e.clearTimeout(l),l=0,s=null,r.emit("autoplay:timerstopped")}(),u=!1)}function m(){if(g())return h=u,f();h&&p()}function g(){let{ownerDocument:e}=r.internalEngine();return"hidden"===e.visibilityState}function y(){c||f()}function v(){c||p()}function b(){c=!0,f()}function _(){c=!1,p()}function x(){let{index:e}=r.internalEngine(),i=e.clone().add(1).get(),n=r.scrollSnapList().length-1,o=t.stopOnLastSnap&&i===n;if(r.canScrollNext()?r.scrollNext(d):r.scrollTo(0,d),r.emit("autoplay:select"),o)return f();p()}return{name:"autoplay",options:e,init:function(s,l){var u,c,h,g;let x,A;r=s;let{mergeOptions:w,optionsAtMedia:S}=l,T=w(i,n.globalOptions);if(t=S(w(T,e)),r.scrollSnapList().length<=1)return;d=t.jump,o=!1,u=r,c=t.delay,x=u.scrollSnapList(),a="number"==typeof c?x.map(()=>c):c(x,u);let{eventStore:C,ownerDocument:E}=r.internalEngine(),P=!!r.internalEngine().options.watchDrag,I=(h=r,g=t.rootNode,A=h.rootNode(),g&&g(A)||A);C.add(E,"visibilitychange",m),P&&r.on("pointerDown",y),P&&!t.stopOn
968Interaction&&r.on("pointerUp",v),t.stopOnMouseEnter&&C.add(I,"mouseenter",b),t.stopOnMouseEnter&&!t.stopOnInteraction&&C.add(I,"mouseleave",_),t.stopOnFocusIn&&r.on("slideFocusStart",f),t.stopOnFocusIn&&!t.stopOnInteraction&&C.add(r.containerNode(),"focusout",p),t.playOnInit&&p()},destroy:function(){r.off("pointerDown",y).off("pointerUp",v).off("slideFocusStart",f),f(),o=!0,u=!1},play:function(e){void 0!==e&&(d=e),p()},stop:function(){u&&f()},reset:function(){u&&p()},isPlaying:function(){return u},timeUntilNext:function(){return s?a[r.selectedScrollSnap()]-(new Date().getTime()-s):null}}}n.globalOptions=void 0},31081(e,t,r){"use strict";r.d(t,{A:()=>T});var i=r(67308);function n(e){return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}function o(e,t){let r=Object.keys(e),i=Object.keys(t);return r.length===i.length&&JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every(r=>{let i=e[r],a=t[r];return"function"==typeof i?`${i}`==`${a}`:n(i)&&n(a)?o(i,a):i===a})}function a(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function s(e){return"number"==typeof e}function l(e){return"string"==typeof e}function u(e){return"boolean"==typeof e}function c(e){return"[object Object]"===Object.prototype.toString.call(e)}function h(e){return Math.abs(e)}function d(e){return Math.sign(e)}function p(e){return y(e).map(Number)}function f(e){return e[m(e)]}function m(e){return Math.max(0,e.length-1)}function g(e,t=0){return Array.from(Array(e),(e,r)=>t+r)}function y(e){return Object.keys(e)}function v(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function b(){let e=[],t={add:function(r,i,n,o={passive:!0}){let a;return"addEventListener"in r?(r.addEventListener(i,n,o),a=()=>r.removeEventListener(i,n,o)):(r.addListener(n),a=()=>r.removeListener(n)),e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function _(e=0,t=0){let r=h(e-t);function i(r){return r<e||r>t}return{length:r,max:t,min:e,constrain:function(r){return i(r)?r<e?e:t:r},reachedAny:i,reachedMax:function(e){return e>t},reachedMin:function(t){return t<e},removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function x(e){let t=e;function r(e){return s(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function A(e,t){let r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},i=t.style,n=null,o=!1;return{clear:function(){!o&&(i.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(o)return;let a=Math.round(100*e.direction(t))/100;a!==n&&(i.transform=r(a),n=a)},toggleActive:function(e){o=!e}}}let w={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function S(e,t,r){let i,n,o,a,T,C,E,P,I=e.ownerDocument,M=I.defaultView,k=function(e){function t(e,t){return function e(t,r){return[t,r].reduce((t,r)=>(y(r).forEach(i=>{let n=t[i],o=r[i],a=c(n)&&c(o);t[i]=a?e(n,o):o}),t),{})}(e,t||{})}return{mergeOptions:t,optionsAtMedia:function(r){let i=r.breakpoints||{},n=y(i).filter(t=>e.matchMedia(t).matches).map(e=>i[e]).reduce((e,r)=>t(e,r),{});return t(r,n)},optionsMediaQueries:function(t){return t.map(e=>y(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}}}(M),O=(P=[],{init:function(e,t){return(P=t.filter(({options:e})=>!1!==k.optionsAtMedia(e).active)).forEach(t=>t.init(e,k)),t.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){P=P.filter(e=>e.destroy())}}),D=b(),R=(n={},o={init:function(e){i=e},emit:function(e){return(n[e]||[]).forEach(t=>t(i,e)),o},off:function(e,t){return n[e]=(n[e]||[]).filter(e=>e!==t),o},on:function(e,t){return n[e]=(n[e]||[]).concat([t]),o},clear:function(){n={}}}),{mergeOptions:L,optionsAtMedia:B,optionsMediaQueries:F}=k,{on:j,off:z,emit:N}=R,G=!1,V=L(w,S.globalOptions),U=L(V),H=[];function W(t,r){G||(U=B(V=L(V,t)),H=r||H,function(){let{container:t,slides:r}=U;C=(l(t)?e.querySelector(t):t)||e.children[0];let i=l(r)?C.querySelectorAll(r):r;E=[].slice.call(i||C.children)}(),a=function t(r){let i=function(e,t,r,i,n,o,a){var c,w,S,T;let C,E,P,I,M,k,O,D,R,L,B,F,j,z,N,G,V,U,H,{align:W,axis:q,direction:Z,startIndex:$,loop:K,duration:X,dragFree:Y,dragThreshold:Q,inViewThreshold:J,slidesToScroll:ee,skipSnaps:et,containScroll:er,watchResize:ei,watchSlides:en,watchDrag:eo,watchFocus:ea}=o,es={measure:function(e){let{offsetTop:t,offsetLeft:r,offsetWidth:i,offsetHeight:n}=e;return{top:t,right:r+i,bottom:t+n,left:r,width:i,height:n}}},el=es.measure(t),eu=r.map(es.measure),ec=(O="rtl"===Z,R=(D="y"===q)||!O?1:-1,L=D?"top":O?"right":"left",B=D?"bottom":O?"left":"right",{scroll:D?"y":"x",cross:D?"x":"y",startEdge:L,endEdge:B,measureSize:function(e){let{height:t,width:r}=e;return D?t:r},direction:function(e){return e*R}}),eh=ec.measureSize(el),ed={measure:function(e){return e/100*eh}},ep=(k={start:function(){return 0},center:function(e){return(eh-e)/2},end:function(e){return eh-e}},{measure:function(e,t){return l(W)?k[W](e):W(eh,e,t)}}),ef=!K&&!!er,{slideSizes:em,slideSizesWithGaps:eg,startGap:ey,endGap:ev}=function(e,t,r,i,n,o){let{measureSize:a,startEdge:s,endEdge:l}=e,u=r[0]&&n,c=function(){if(!u)return 0;let e=r[0];return h(t[s]-e[s])}
968(),d=u?parseFloat(o.getComputedStyle(f(i)).getPropertyValue(`margin-${l}`)):0,p=r.map(a),g=r.map((e,t,r)=>{let i=t===m(r);return t?i?p[t]+d:r[t+1][s]-e[s]:p[t]+c}).map(h);return{slideSizes:p,slideSizesWithGaps:g,startGap:c,endGap:d}}(ec,el,eu,r,K||!!er,n),eb=function(e,t,r,i,n,o,a,l){let{startEdge:u,endEdge:c,direction:d}=e,g=s(r);return{groupSlides:function(e){return g?p(e).filter(e=>e%r==0).map(t=>e.slice(t,t+r)):e.length?p(e).reduce((r,s,p)=>{let g=f(r)||0,y=s===m(e),v=n[u]-o[g][u],b=n[u]-o[s][c],_=i||0!==g?0:d(a),x=h(b-(!i&&y?d(l):0)-(v+_));return p&&x>t+2&&r.push(s),y&&r.push(e.length),r},[]).map((t,r,i)=>{let n=Math.max(i[r-1]||0);return e.slice(n,t)}):[]}}}(ec,eh,ee,K,el,eu,ey,ev),{snaps:e_,snapsAligned:ex}=function(e,t,r,i,n){let{startEdge:o,endEdge:a}=e,{groupSlides:s}=n,l=s(i).map(e=>f(e)[a]-e[0][o]).map(h).map(t.measure),u=i.map(e=>r[o]-e[o]).map(e=>-h(e)),c=s(u).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:u,snapsAligned:c}}(ec,ep,el,eu,eb),eA=-f(e_)+f(eg),{snapsContained:ew,scrollContainLimit:eS}=(c=eh,w=eA,S=ex,T=er,P=_(-w+c,0),M=(C=(I=S.map((e,t)=>{let{min:r,max:i}=P,n=P.constrain(e),o=t===m(S);return t?o||1>=h(r-n)?r:1>=h(i-n)?i:n:i}).map(e=>parseFloat(e.toFixed(3))))[0],E=f(I),_(I.lastIndexOf(C),I.indexOf(E)+1)),{snapsContained:function(){if(w<=c+2)return[P.max];if("keepSnaps"===T)return I;let{min:e,max:t}=M;return I.slice(e,t)}(),scrollContainLimit:M}),eT=ef?ew:ex,{limit:eC}=(F=eT[0],{limit:_(K?F-eA:f(eT),F)}),eE=function e(t,r,i){let{constrain:n}=_(0,t),o=t+1,a=s(r);function s(e){return i?h((o+e)%o):n(e)}function l(){return e(t,a,i)}let u={get:function(){return a}
968,set:function(e){return a=s(e),u},add:function(e){return l().set(a+e)},clone:l};return u}(m(eT),$,K),eP=eE.clone(),eI=p(r),eM=function(e,t,r,i){let n=b(),o=1e3/60,a=null,s=0,l=0;function u(e){if(!l)return;a||(a=e,r(),r());let n=e-a;for(a=e,s+=n;s>=o;)r(),s-=o;i(s/o),l&&(l=t.requestAnimationFrame(u))}function c(){t.cancelAnimationFrame(l),a=null,s=0,l=0}return{init:function(){n.add(e,"visibilitychange",()=>{e.hidden&&(a=null,s=0)})},destroy:function(){c(),n.clear()},start:function(){l||(l=t.requestAnimationFrame(u))},stop:c,update:r,render:i}}(i,n,()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:i}})=>{i||r.constrain(e.pointerDown()),t.seek()})(eH),e=>(({scrollBody:e,translate:t,location:r,offsetLocation:i,previousLocation:n,scrollLooper:o,slideLooper:a,dragHandler:s,animation:l,eventHandler:u,scrollBounds:c,options:{loop:h}},d)=>{let p=e.settled(),f=!c.shouldConstrain(),m=h?p:p&&f,g=m&&!s.pointerDown();g&&l.stop();let y=r.get()*d+n.get()*(1-d);i.set(y),h&&(o.loop(e.direction()),a.loop()),t.to(i.get()),g&&u.emit("settle"),m||u.emit("scroll")})(eH,e)),ek=eT[eE.get()],eO=x(ek),eD=x(ek),eR=x(ek),eL=x(ek),eB=function(e,t,r,i,n){let o=0,a=0,s=n,l=.68,u=e.get(),c=0;function p(e){return s=e,m}function f(e){return l=e,m}let m={direction:function(){return a},duration:function(){return s},velocity:function(){return o},seek:function(){let t=i.get()-e.get(),n=0;return s?(r.set(e),o+=t/s,o*=l,u+=o,e.add(o),n=u-c):(o=0,r.set(i),e.set(i),n=t),a=d(n),c=u,m},settled:function(){return .001>h(i.get()-t.get())},useBaseFriction:function(){return f(.68)},useBaseDuration:function(){return p(n)},useFriction:f,useDuration:p};return m}(eO,eR,eD,eL,X),eF=function(e,t,r,i,n){let{reachedAny:o,removeOffset:a,constrain:s}=i;function l(e){return e.concat().sort((e,t)=>h(e)-h(t))[0]}function u(t,i){let n=[t,t+r,t-r];if(!e)return t;if(!i)return l(n);let o=n.filter(e=>d(e)===i);return o.length?l(o):f(n)-r}return{byDistance:function(r,i){let l=n.get()+r,{index:c,distance:d}=function(r){let i=e?a(r):s(r),{index:n}=t.map((e,t)=>({diff:u(e-i,0),index:t})).sort((e,t)=>h(e.diff)-h(t.diff))[0];return{index:n,distance:i}}(l),p=!e&&o(l);if(!i||p)return{index:c,distance:r};let f=r+u(t[c]-d,0);return{index:c,distance:f}},byIndex:function(e,r){let i=u(t[e]-n.get(),r);return{index:e,distance:i}},shortcut:u}}(K,eT,eA,eC,eL),ej=function(e,t,r,i,n,o,a){function s(n){let s=n.distance,l=n.index!==t.get();
968o.add(s),s&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(r.set(t.get()),t.set(n.index),a.emit("select"))}return{distance:function(e,t){s(n.byDistance(e,t))},index:function(e,r){let i=t.clone().set(e);s(n.byIndex(i.get(),r))}}}(eM,eE,eP,eB,eF,eL,a),ez=function(e){let{max:t,length:r}=e;return{get:function(e){return r?-((e-t)/r):0}}}(eC),eN=b(),eG=(z={},N=null,G=null,V=!1,{init:function(){j=new IntersectionObserver(e=>{V||(e.forEach(e=>{z[r.indexOf(e.target)]=e}),N=null,G=null,a.emit("slidesInView"))},{root:t.parentElement,threshold:J}),r.forEach(e=>j.observe(e))},destroy:function(){j&&j.disconnect(),V=!0},get:function(e=!0){if(e&&N)return N;if(!e&&G)return G;let t=y(z).reduce((t,r)=>{let i=parseInt(r),{isIntersecting:n}=z[i];return(e&&n||!e&&!n)&&t.push(i),t},[]);return e&&(N=t),e||(G=t),t}}),{slideRegistry:eV}=function(e,t,r,i,n,o){let a,{groupSlides:s}=n,{min:l,max:u}=i;return{slideRegistry:(a=s(o),1===r.length?[o]:e&&"keepSnaps"!==t?a.slice(l,u).map((e,t,r)=>{let i=t===m(r);return t?i?g(m(o)-f(r)[0]+1,f(r)[0]):e:g(f(r[0])+1)}):a)}}(ef,er,eT,eS,eb,eI),eU=function(e,t,r,i,n,o,a,l){let c={passive:!0,capture:!0},h=0;function d(e){"Tab"===e.code&&(h=new Date().getTime())}return{init:function(p){l&&(o.add(document,"keydown",d,!1),t.forEach((t,d)=>{o.add(t,"focus",t=>{(u(l)||l(p,t))&&function(t){if(new Date().getTime()-h>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;let o=r.findIndex(e=>e.includes(t));s(o)&&(n.useDuration(0),i.index(o,0),a.emit("slideFocus"))}(d)},c)}))}}}(e,r,eV,ej,eB,eN,a,ea),eH={ownerDocument:i,ownerWindow:n,eventHandler:a,containerRect:el,slideRects:eu,animation:eM,axis:ec,dragHandler:function(e,t,r,i,n,o,a,s,l,c,p,f,m,g,y,x,A,w){let{cross:S,direction:T}=e,C=["INPUT","SELECT","TEXTAREA"],E={passive:!1},P=b(),I=b(),M=_(50,225).constrain(g.measure(20)),k={mouse:300,touch:400},O={mouse:500,touch:600},D=y?43:25,R=!1,L=0,B=0,F=!1,j=!1,z=!1,N=!1;function G(e){if(!v(e,i)&&e.touches.length>=2)return V(e);let t=o.readPoint(e),r=o.readPoint(e,S),a=h(t-L),l=h(r-B);if(!j&&!N&&(!e.cancelable||!(j=a>l)))return V(e);let u=o.pointerMove(e);a>x&&(z=!0),c.useFriction(.3).useDuration(.75),s.start(),n.add(T(u)),e.preventDefault()}function V(e){var t;let r,i,n=p.byDistance(0,!1).index!==f.get(),a=o.pointerUp(e)*(y?O:k)[N?"mouse":"touch"],s=(t=T(a),r=f.add(-1*d(t)),i=p.byDistance(t,!y).distance,y||h(t)<M?i:A&&n?.5*i:p.byIndex(r.get(),0).distance),u=function(e,t){var r,i;if(0===e||0===t||h(e)<=h(t))return 0;let n=(r=h(e),i=h(t),h(r-i));return h(n/e)}(a,s);j=!1,F=!1,I.clear(),c.useDuration(D-10*u).useFriction(.68+u/50),l.distance(s,!y),N=!1,m.emit("pointerUp")}function U(e){z&&(e.stopPropagation(),e.preventDefault(),z=!1)}return{init:function(e){w&&P.add(t,"dragstart",e=>e.preventDefault(),E).add(t,"touchmove",()=>void 0,E).add(t,"touchend",()=>void 0).add(t,"touchstart",s).add(t,"mousedown",s).add(t,"touchcancel",V).add(t,"contextmenu",V).add(t,"click",U,!0);function s(s){(u(w)||w(e,s))&&function(e){let s,l=v(e,i);if(N=l,z=y&&l&&!e.buttons&&R,R=h(n.get()-a.get())>=2,(!l||0===e.button)&&(s=e.target.nodeName||"",!C.includes(s))){let i;F=!0,o.pointerDown(e),c.useFriction(0).useDuration(0),n.set(a),i=N?r:t,I.add(i,"touchmove",G,E).add(i,"touchend",V).add(i,"mousemove",G,E).add(i,"mouseup",V),L=o.readPoint(e),B=o.readPoint(e,S),m.emit("pointerDown")}}(s)}},destroy:function(){P.clear(),I.clear()},pointerDown:function(){return F}}}(ec,e,i,n,eL,function(e,t){let r,i;function n(e){return e.timeStamp}function o(r,i){let n=i||e.scroll,o=`client${"x"===n?"X":"Y"}`;return(v(r,t)?r:r.touches[0])[o]}return{pointerDown:function(e){return r=e,i=e,o(e)},pointerMove:function(e){let t=o(e)-o(i),a=n(e)-n(r)>170;return i=e,a&&(r=e),t},pointerUp:function(e){if(!r||!i)return 0;let t=o(i)-o(r),a=n(e)-n(r),s=n(e)-n(i)>170,l=t/a;return a&&!s&&h(l)>.1?l:0},readPoint:o}}(ec,n),eO,eM,ej,eB,eF,eE,a,ed,Y,Q,et,eo),eventStore:eN,percentOfView:ed,index:eE,indexPrevious:eP,limit:eC,location:eO,offsetLocation:eR,previousLocation:eD,options:o,resizeHandler:function(e,t,r,i,n,o,a){let s,l,c=[e].concat(i),d=[],p=!1;function f(e){return n.measureSize(a.measure(e))}return{init:function(n){o&&(l=f(e),d=i.map(f),s=new ResizeObserver(r=>{(u(o)||o(n,r))&&function(r){for(let o of r){if(p)return;let r=o.target===e,a=i.indexOf(o.target),s=r?l:d[a];if(h(f(r?e:i[a])-s)>=.5){n.reInit(),t.emit("resize");break}}}(r)}),r.requestAnimationFrame(()=>
968{c.forEach(e=>s.observe(e))}))},destroy:function(){p=!0,s&&s.disconnect()}}}(t,a,n,r,ec,ei,es),scrollBody:eB,scrollBounds:function(e,t,r,i,n){let o=n.measure(10),a=n.measure(50),s=_(.1,.99),l=!1;function u(){return!l&&!!e.reachedAny(r.get())&&!!e.reachedAny(t.get())}return{shouldConstrain:u,constrain:function(n){if(!u())return;let l=e.reachedMin(t.get())?"min":"max",c=h(e[l]-t.get()),d=r.get()-t.get(),p=s.constrain(c/a);r.subtract(d*p),!n&&h(d)<o&&(r.set(e.constrain(r.get())),i.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}(eC,eR,eL,eB,ed),scrollLooper:function(e,t,r,i){let{reachedMin:n,reachedMax:o}=_(t.min+.1,t.max+.1);return{loop:function(t){if(!(1===t?o(r.get()):-1===t&&n(r.get())))return;let a=-1*t*e;i.forEach(e=>e.add(a))}}}(eA,eC,eR,[eO,eR,eD,eL]),scrollProgress:ez,scrollSnapList:eT.map(ez.get),scrollSnaps:eT,scrollTarget:eF,scrollTo:ej,slideLooper:function(e,t,r,i,n,o,a,s,l){let u=p(n),c=f(d(p(n).reverse(),a[0]),r,!1).concat(f(d(u,t-a[0]-1),-r,!0));function h(e,t){return e.reduce((e,t)=>e-n[t],t)}function d(e,t){return e.reduce((e,r)=>h(e,t)>0?e.concat([r]):e,[])}function f(n,a,u){let c=o.map((e,r)=>({start:e-i[r]+.5+a,end:e+t-.5+a}));return n.map(t=>{let i=u?0:-r,n=u?r:0,o=c[t][u?"end":"start"];return{index:t,loopPoint:o,slideLocation:x(-1),translate:A(e,l[t]),target:()=>s.get()>o?i:n}})}return{canLoop:function(){return c.every(({index:e})=>.1>=h(u.filter(t=>t!==e),t))},clear:function(){c.forEach(e=>e.translate.clear())},loop:function(){c.forEach(e=>{let{target:t,translate:r,slideLocation:i}=e,n=t();n!==i.get()&&(r.to(n),i.set(n))})},loopPoints:c}}(ec,eh,eA,em,eg,e_,eT,eR,r),slideFocus:eU,slidesHandler:(H=!1,{init:function(e){en&&(U=new MutationObserver(t=>{!H&&(u(en)||en(e,t))&&function(t){for(let r of t)if("childList"===r.type){e.reInit(),a.emit("slidesChanged");break}}(t)})).observe(t,{childList:!0})},destroy:function(){U&&U.disconnect(),H=!0}}),slidesInView:eG,slideIndexes:eI,slideRegistry:eV,slidesToScroll:eb,target:eL,translate:A(ec,t)};return eH}(e,C,E,I,M,r,R);return r.loop&&!i.slideLooper.canLoop()?t(Object.assign({},r,{loop:!1})):i}(U),F([V,...H.map(({options:e})=>e)]).forEach(e=>D.add(e,"change",q)),U.active&&(a.translate.to(a.location.get()),a.animation.init(),a.slidesInView.init(),a.slideFocus.init(X),a.eventHandler.init(X),a.resizeHandler.init(X),a.slidesHandler.init(X),a.options.loop&&a.slideLooper.loop(),C.offsetParent&&E.length&&a.dragHandler.init(X),T=O.init(X,H)))}function q(e,t){let r=K();Z(),W(L({startIndex:r},e),t),R.emit("reInit")}function Z(){a.dragHandler.destroy(),a.eventStore.clear(),a.translate.clear(),a.slideLooper.clear(),a.resizeHandler.destroy(),a.slidesHandler.destroy(),a.slidesInView.destroy(),a.animation.destroy(),O.destroy(),D.clear()}function $(e,t,r){U.active&&!G&&(a.scrollBody.useBaseFriction().useDuration(!0===t?0:U.duration),a.scrollTo.index(e,r||0))}function K(){return a.index.get()}let X={canScrollNext:function(){return a.index.add(1).get()!==K()},canScrollPrev:function(){return a.index.add(-1).get()!==K()},containerNode:function(){return C},internalEngine:function(){return a},destroy:function(){G||(G=!0,D.clear(),Z(),R.emit("destroy"),R.clear())},off:z,on:j,emit:N,plugins:function(){return T},previousScrollSnap:function(){return a.indexPrevious.get()},reInit:q,rootNode:function(){return e},scrollNext:function(e){$(a.index.add(1).get(),e,-1)},scrollPrev:function(e){$(a.index.add(-1).get(),e,1)},scrollProgress:function(){return a.scrollProgress.get(a.offsetLocation.get())},scrollSnapList:function(){return a.scrollSnapList},scrollTo:$,selectedScrollSnap:K,slideNodes:function(){return E},slidesInView:function(){return a.slidesInView.get()},slidesNotInView:function(){return a.slidesInView.get(!1)}};return W(t,r),setTimeout(()=>R.emit("init"),0),X}function T(e={},t=[]){let r=(0,i.useRef)(e),n=(0,i.useRef)(t),[s,l]=(0,i.useState)(),[u,c]=(0,i.useState)(),h=(0,i.useCallback)(()=>{s&&s.reInit(r.current,n.current)},[s]);return(0,i.useEffect)(()=>{o(r.current,e)||(r.current=e,h())},[e,h]),(0,i.useEffect)(()=>{!function(e,t){if(e.length!==t.length)return!1;let r=a(e),i=a(t);return r.every((e,t)=>o(e,i[t]))}(n.current,t)&&(n.current=t,h())},[t,h]),(0,i.useEffect)(()=>
968{if("u">typeof window&&window.document&&window.document.createElement&&u){S.globalOptions=T.globalOptions;let e=S(u,r.current,n.current);return l(e),()=>e.destroy()}l(void 0)},[u,l]),[c,s]}S.globalOptions=void 0,T.globalOptions=void 0},39555(e,t,r){"use strict";let i;r.d(t,{P:()=>n5});var n,o,a,s,l,u=r(65959),c=r(67308),h=r(85409),d=(void 0===h||h.env,"production"),p=function(e){return{isEnabled:function(t){return e.some(function(e){return!!t[e]})}}},f={measureLayout:p(["layout","layoutId","drag"]),animation:p(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:p(["exit"]),drag:p(["drag","dragControls"]),focus:p(["whileFocus"]),hover:p(["whileHover","onHoverStart","onHoverEnd"]),tap:p(["whileTap","onTap","onTapStart","onTapCancel"]),pan:p(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:p(["whileInView","onViewportEnter","onViewportLeave"])},m=function(){},g=function(){},y=(0,c.createContext)({strict:!1}),v=Object.keys(f),b=v.length,_=(0,c.createContext)({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),x=(0,c.createContext)({}),A=(0,c.createContext)(null),w="u">typeof document,S=w?c.useLayoutEffect:c.useEffect,T={current:null},C=!1;function E(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function P(e){return Array.isArray(e)}function I(e){return"string"==typeof e||P(e)}function M(e,t,r,i,n){var o;return void 0===i&&(i={}),void 0===n&&(n={}),"function"==typeof t&&(t=t(null!=r?r:e.custom,i,n)),"string"==typeof t&&(t=null==(o=e.variants)?void 0:o[t]),"function"==typeof t&&(t=t(null!=r?r:e.custom,i,n)),t}function k(e,t,r){var i,n,o=e.getProps();return M(o,t,null!=r?r:o.custom,(i={},e.forEachValue(function(e,t){return i[t]=e.get()}),i),(n={},e.forEachValue(function(e,t){return n[t]=e.getVelocity()}),n))}function O(e){var t;return"function"==typeof(null==(t=e.animate)?void 0:t.start)||I(e.initial)||I(e.animate)||I(e.whileHover)||I(e.whileDrag)||I(e.whileTap)||I(e.whileFocus)||I(e.exit)}function D(e){return!!(O(e)||e.variants)}function R(e){return Array.isArray(e)?e.join(" "):e}function L(e){var t=(0,c.useRef)(null);return null===t.current&&(t.current=e()),t.current}var B={hasAnimatedSinceResize:!0,hasEverUpdated:!1},F=1,j=(0,c.createContext)({}),z=(0,c.createContext)({}),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,u.C6)(t,e),t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var e=this.props,t=e.visualElement,r=e.props;t&&t.setProps(r)},t.prototype.render=function(){return this.props.children},t}(c.Component),G=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function V(e){if("string"!=typeof e||e.includes("-"));else if(G.indexOf(e)>-1||/[A-Z]/.test(e))return!0;return!1}var U={},H=["","X","Y","Z"],W=["transformPerspective","x","y","z"];function q(e,t){return W.indexOf(e)-W.indexOf(t)}["translate","scale","rotate","skew"].forEach(function(e){return H.forEach(function(t){return W.push(e+t)})});var Z=new Set(W);function $(e){return Z.has(e)}var K=new Set(["originX","originY","originZ"]);function X(e,t){var r=t.layout,i=t.layoutId;return $(e)||K.has(e)||(r||void 0!==i)&&(!!U[e]||"opacity"===e)}var Y=function(e){return!!(null!==e&&"object"==typeof e&&e.getVelocity)},Q={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function J(e){return e.startsWith("--")}let ee=(e,t)=>r=>Math.max(Math.min(r,t),e),et=e=>e%1?Number(e.toFixed(5)):e,er=/(-)?([\d]*\.?[\d])+/g,ei=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,en=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function eo(e){return"string"==typeof e}let ea=e=>({test:t=>eo(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),es=ea("deg"),el=ea("%"),eu=ea("px"),ec=ea("vh"),eh=ea("vw"),ed=Object.assign(Object.assign({},el),{parse:e=>el.parse(e)/100,transform:e=>el.transform(100*e)}),ep={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ef=Object.assign(Object.assign({},ep),{transform:ee(0,1)}),em=Object.assign(Object.assign({},ep),{default:1});var eg=(0,u.Cl)((0,u.Cl)({},ep),{transform:Math.round}),ey={borderWidth:eu,borderTopWidth:eu,borderRightWidth:eu,borderBottomWidth:eu,borderLeftWidth:eu,borderRadius:eu,radius:eu,borderTopLeftRadius:eu,borderTopRightRadius:eu,borderBottomRightRadius:eu,borderBottomLeftRadius:eu,width:eu,maxWidth:eu,height:eu,maxHeight:eu,size:eu,top:eu,right:eu,bottom:eu,left:eu,padding:eu,paddingTop:eu,paddingRight:eu,paddingBottom:eu,paddingLeft:eu,margin:eu,marginTop:eu,marginRight:eu,marginBottom:eu,marginLeft:eu,rotate:es,rotateX:es,rotateY:es,rotateZ:e
968s,scale:em,scaleX:em,scaleY:em,scaleZ:em,skew:es,skewX:es,skewY:es,distance:eu,translateX:eu,translateY:eu,translateZ:eu,x:eu,y:eu,z:eu,perspective:eu,transformPerspective:eu,opacity:ef,originX:ed,originY:ed,originZ:eu,zIndex:eg,fillOpacity:ef,strokeOpacity:ef,numOctaves:eg};function ev(e,t,r,i){var n,o,a,s,l=e.style,u=e.vars,c=e.transform,h=e.transformKeys,d=e.transformOrigin;h.length=0;var p=!1,f=!1,m=!0;for(var g in t){var y=t[g];if(J(g)){u[g]=y;continue}var v=ey[g],b=v&&"number"==typeof y?v.transform(y):y;if($(g)){if(p=!0,c[g]=b,h.push(g),!m)continue;y!==(null!=(s=v.default)?s:0)&&(m=!1)}else K.has(g)?(d[g]=b,f=!0):l[g]=b}p?l.transform=function(e,t,r,i){var n=e.transform,o=e.transformKeys,a=t.enableHardwareAcceleration,s=t.allowTransformNone,l="";o.sort(q);for(var u=!1,c=o.length,h=0;h<c;h++){var d=o[h];l+="".concat(Q[d]||d,"(").concat(n[d],") "),"z"===d&&(u=!0)}return!u&&(void 0===a||a)?l+="translateZ(0)":l=l.trim(),i?l=i(n,r?"":l):(void 0===s||s)&&r&&(l="none"),l}(e,r,m,i):i?l.transform=i({},""):!t.transform&&l.transform&&(l.transform="none"),f&&(n=d.originX,o=d.originY,a=d.originZ,l.transformOrigin="".concat(void 0===n?"50%":n," ").concat(void 0===o?"50%":o," ").concat(void 0===a?0:a))}var eb=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function e_(e,t,r){for(var i in t)Y(t[i])||X(i,r)||(e[i]=t[i])}var ex=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function eA(e){return ex.has(e)}var ew=function(e){return!eA(e)};try{(n=require("@emotion/is-prop-valid").default)&&(ew=function(e){return e.startsWith("on")?!eA(e):n(e)})}catch(e){}function eS(e,t,r){return"string"==typeof e?e:eu.transform(t+r*e)}var eT={offset:"stroke-dashoffset",array:"stroke-dasharray"},eC={offset:"strokeDashoffset",array:"strokeDasharray"};function eE(e,t,r,i){var n,o,a,s,l,c,h,d,p=t.attrX,f=t.attrY,m=t.originX,g=t.originY,y=t.pathLength,v=t.pathSpacing,b=t.pathOffset;ev(e,(0,u.Tt)(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,i),e.attrs=e.style,e.style={};var _=e.attrs,x=e.style,A=e.dimensions;_.transform&&(A&&(x.transform=_.transform),delete _.transform),A&&(void 0!==m||void 0!==g||x.transform)&&(n=eS(void 0!==m?m:.5,A.x,A.width),o=eS(void 0!==g?g:.5,A.y,A.height),x.transformOrigin="".concat(n," ").concat(o)),void 0!==p&&(_.x=p),void 0!==f&&(_.y=f),void 0!==y&&(l=!1,void 0===(a=void 0===v?1:v)&&(a=1),void 0===(s=void 0===b?0:b)&&(s=0),void 0===l&&(l=!0),_.pathLength=1,_[(c=l?eT:eC).offset]=eu.transform(-s),h=eu.transform(y),d=eu.transform(a),_[c.array]="".concat(h," ").concat(d))}var eP=function(){return(0,u.Cl)((0,u.Cl)({},eb()),{attrs:{}})},eI=/([a-z])([A-Z])/g,eM=function(e){return e.replace(eI,"$1-$2").toLowerCase()};function ek(e,t,r,i){var n=t.style,o=t.vars;for(var a in Object.assign(e.style,n,i&&i.getProjectionStyles(r)),o)e.style.setProperty(a,o[a])}var eO=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function eD(e,t,r,i){for(var n in ek(e,t,void 0,i),t.attrs)e.setAttribute(eO.has(n)?n:eM(n),t.attrs[n])}function eR(e){var t=e.style,r={};for(var i in t)(Y(t[i])||X(i,e))&&(r[i]=t[i]);return r}function eL(e){var t=eR(e);for(var r in e)Y(e[r])&&(t["x"===r||"y"===r?"attr"+r.toUpperCase():r]=e[r]);return t}function eB(e){return"object"==typeof e&&"function"==typeof e.start}var eF=function(e){return Array.isArray(e)},ej=function(e){return eF(e)?e[e.length-1]||0:e};function ez(e){var t=Y(e)?e.get():e;return t&&"object"==typeof t&&t.mix&&t.toValue?t.toValue():t}function eN(e,t,r,i){var n=e.scrapeMotionValuesFromProps,o=e.createRenderState,a=e.onMount,s={latestValues:function(e,t,r,i){var n={},o=(null==r?void 0:r.initial)===!1,a=i(e);for(var s in a)n[s]=ez(a[s]);var l=e.initial,c=e.animate,h=O(e),d=D(e);t&&d&&!h&&!1!==e.inherit&&(null!=l||(l=t.initial),null!=c||(c=t.animate));var p=o||!1===l,f=p?c:l;return f&&"boolean"!=typeof f&&!eB(f)&&(Array.isArray(f)?f:[f]).forEac
968h(function(t){var r=M(e,t);if(r){var i=r.transitionEnd;r.transition;var o=(0,u.Tt)(r,["transitionEnd","transition"]);for(var a in o){var s=o[a];if(Array.isArray(s)){var l=p?s.length-1:0;s=s[l]}null!==s&&(n[a]=s)}for(var a in i)n[a]=i[a]}}),n}(t,r,i,n),renderState:o()};return a&&(s.mount=function(e){return a(t,e,s)}),s}var eG=function(e){return function(t,r){var i=(0,c.useContext)(x),n=(0,c.useContext)(A);return r?eN(e,t,i,n):L(function(){return eN(e,t,i,n)})}},eV={useVisualState:eG({scrapeMotionValuesFromProps:eL,createRenderState:eP,onMount:function(e,t,r){var i=r.renderState,n=r.latestValues;try{i.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){i.dimensions={x:0,y:0,width:0,height:0}}eE(i,n,{enableHardwareAcceleration:!1},e.transformTemplate),eD(t,i)}})},eU={useVisualState:eG({scrapeMotionValuesFromProps:eR,createRenderState:eb})};function eH(e,t,r,i){return void 0===i&&(i={passive:!0}),e.addEventListener(t,r,i),function(){return e.removeEventListener(t,r)}}function eW(e,t,r,i){(0,c.useEffect)(function(){var n=e.current;if(r&&n)return eH(n,t,r,i)},[e,t,r,i])}function eq(e){return"u">typeof PointerEvent&&e instanceof PointerEvent?"mouse"===e.pointerType:e instanceof MouseEvent}(o=s||(s={})).Animate="animate",o.Hover="whileHover",o.Tap="whileTap",o.Drag="whileDrag",o.Focus="whileFocus",o.InView="whileInView",o.Exit="exit";var eZ={pageX:0,pageY:0};function e$(e,t){var r,i,n;return void 0===t&&(t="page"),{point:e.touches?(void 0===(r=t)&&(r="page"),{x:(i=e.touches[0]||e.changedTouches[0]||eZ)[r+"X"],y:i[r+"Y"]}):(void 0===(n=t)&&(n="page"),{x:e[n+"X"],y:e[n+"Y"]})}}var eK=function(e,t){void 0===t&&(t=!1);var r=function(t){return e(t,e$(t))};return t?function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&r(e)}:r},eX={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},eY={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function eQ(e){if(w&&null===window.onpointerdown);else if(w&&null===window.ontouchstart)return eY[e];else if(w&&null===window.onmousedown)return eX[e];return e}function eJ(e,t,r,i){return eH(e,eQ(t),eK(r,"pointerdown"===t),i)}function e0(e,t,r,i){return eW(e,eQ(t),r&&eK(r,"pointerdown"===t),i)}function e1(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var e2=e1("dragHorizontal"),e3=e1("dragVertical");function e5(e){var t=!1;if("y"===e)t=e3();else if("x"===e)t=e2();else{var r=e2(),i=e3();r&&i?t=function(){r(),i()}:(r&&r(),i&&i())}return t}function e4(){var e=e5(!0);return!e||(e(),!1)}function e6(e,t,r){return function(i,n){var o;!eq(i)||e4()||(null==(o=e.animationState)||o.setActive(s.Hover,t),null==r||r(i,n))}}var e8=function(e,t){return!!t&&(e===t||e8(e,t.parentElement))};function e7(e){return(0,c.useEffect)(function(){return function(){return e()}},[])}let e9=(e,t)=>r=>t(e(r)),te=(...e)=>e.reduce(e9);var tt=new Set,tr=new WeakMap,ti=new WeakMap,tn=function(e){var t;null==(t=tr.get(e.target))||t(e)},to=function(e){e.forEach(tn)},ta={some:0,all:1},ts=function(e){return function(t){return e(t),null}},tl={inView:ts(function(e){var t=e.visualElement,r=e.whileInView,i=e.onViewportEnter,n=e.onViewportLeave,o=e.viewport,a=void 0===o?{}:o,l=(0,c.useRef)({hasEnteredView:!1,isInView:!1}),h=!!(r||i||n);a.once&&l.current.hasEnteredView&&(h=!1),("u"<typeof IntersectionObserver?function(e,t,r,i){var n=i.fallback,o=void 0===n||n;(0,c.useEffect)(function(){if(e&&o){var i;"production"!==d&&(i="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",tt.has(i)||(console.warn(i),tt.add(i))),requestAnimationFrame(function(){t.hasEnteredView=!0;var e,i=r.getProps().onViewportEnter;null==i||i(null),null==(e=r.animationState)||e.setActive(s.InView,!0)})}},[e])}:function(e,t,r,i){var n=i.root,o=i.margin,a=i.amount,l=void 0===a?"some":a,h=i.once;(0,c.useEffect)(function(){if(e){var i,a,c,d,p,f,m,g,y={root:null==n?void 0:n.current,rootMargin:o,threshold:"number"==typeof l?l:ta[l]};return i=r.getInstance(),a=function(e){var i,n=e.isIntersecting;if(t.isInView!==n){if(t.isInView=n,h&&!n&&t.hasEnteredView)return;n&&(t.hasEnteredView=!0),null==(i=r.animationState)||i.setActive(s.InView,n);var o=r.getProps(),a=n?o.onViewportEnter:o.onViewportLeave;null==a||a(e)}},c=y.root,d=(0,u.Tt)(y,["root"]),p=c||document,ti.has(p)||ti.set(p,{}),(f=ti.get(p))[m=JSON.stringify(d)]||(f[m]=new IntersectionObserver(to,(0,u.Cl)({root:c},d))),g=f[m],tr.set(i,a),g.observe(i),function(){tr.delete(i),g.unobserve(i)}}},[e,n,o,l])})(h,l.current,t,a)}
968),tap:ts(function(e){var t=e.onTap,r=e.onTapStart,i=e.onTapCancel,n=e.whileTap,o=e.visualElement,a=t||r||i||n,l=(0,c.useRef)(!1),u=(0,c.useRef)(null),h={passive:!(r||t||i||g)};function d(){var e;null==(e=u.current)||e.call(u),u.current=null}function p(){var e;return d(),l.current=!1,null==(e=o.animationState)||e.setActive(s.Tap,!1),!e4()}function f(e,r){p()&&(e8(o.getInstance(),e.target)?null==t||t(e,r):null==i||i(e,r))}function m(e,t){p()&&(null==i||i(e,t))}function g(e,t){var i;d(),l.current||(l.current=!0,u.current=te(eJ(window,"pointerup",f,h),eJ(window,"pointercancel",m,h)),null==(i=o.animationState)||i.setActive(s.Tap,!0),null==r||r(e,t))}e0(o,"pointerdown",a?g:void 0,h),e7(d)}),focus:ts(function(e){var t=e.whileFocus,r=e.visualElement;eW(r,"focus",t?function(){var e;null==(e=r.animationState)||e.setActive(s.Focus,!0)}:void 0),eW(r,"blur",t?function(){var e;null==(e=r.animationState)||e.setActive(s.Focus,!1)}:void 0)}),hover:ts(function(e){var t=e.onHoverStart,r=e.onHoverEnd,i=e.whileHover,n=e.visualElement;e0(n,"pointerenter",t||i?e6(n,!0,t):void 0,{passive:!t}),e0(n,"pointerleave",r||i?e6(n,!1,r):void 0,{passive:!r})})},tu=0,tc=function(){return tu++};function th(){var e=(0,c.useContext)(A);if(null===e)return[!0,null];var t=e.isPresent,r=e.onExitComplete,i=e.register,n=L(tc);return(0,c.useEffect)(function(){return i(n)},[]),!t&&r?[!1,function(){return null==r?void 0:r(n)}]:[!0]}function td(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}let tp=(e,t,r)=>Math.min(Math.max(r,e),t);function tf(e,t){return e*Math.sqrt(1-t*t)}let tm=["duration","bounce"],tg=["stiffness","damping","mass"];function ty(e,t){return t.some(t=>void 0!==e[t])}function tv(e){var{from:t=0,to:r=1,restSpeed:i=2,restDelta:n}=e,o=(0,u.Tt)(e,["from","to","restSpeed","restDelta"]);let a={done:!1,value:t},{stiffness:s,damping:l,mass:c,velocity:h,duration:d,isResolvedFromDuration:p}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ty(e,tg)&&ty(e,tm)){let r=function({duration:e=800,bounce:t=.25,velocity:r=0,mass:i=1}){let n,o;m();let a=1-t;a=tp(.05,1,a),e=tp(.01,10,e/1e3),a<1?(n=t=>{let i=t*a,n=i*e;return .001-(i-r)/tf(t,a)*Math.exp(-n)},o=t=>{let i=t*a*e,o=Math.pow(a,2)*Math.pow(t,2)*e,s=Math.exp(-i),l=tf(Math.pow(t,2),a);return(i*r+r-o)*s*(-n(t)+.001>0?-1:1)/l}):(n=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),o=t=>e*e*(r-t)*Math.exp(-t*e));let s=function(e,t,r){let i=r;for(let r=1;r<12;r++)i-=e(i)/t(i);return i}(n,o,5/e);if(e*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(s,2)*i;return{stiffness:t,damping:2*a*Math.sqrt(i*t),duration:e}}}(e);(t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(o),f=tb,g=tb;function y(){let e=h?-(h/1e3):0,i=r-t,o=l/(2*Math.sqrt(s*c)),a=Math.sqrt(s/c)/1e3;if(void 0===n&&(n=Math.min(Math.abs(r-t)/100,.4)),o<1){let t=tf(a,o);f=n=>r-Math.exp(-o*a*n)*((e+o*a*i)/t*Math.sin(t*n)+i*Math.cos(t*n)),g=r=>{let n=Math.exp(-o*a*r);return o*a*n*(Math.sin(t*r)*(e+o*a*i)/t+i*Math.cos(t*r))-n*(Math.cos(t*r)*(e+o*a*i)-t*i*Math.sin(t*r))}}else if(1===o)f=t=>r-Math.exp(-a*t)*(i+(e+a*i)*t);else{let t=a*Math.sqrt(o*o-1);f=n=>{let s=Math.exp(-o*a*n),l=Math.min(t*n,300);return r-s*((e+o*a*i)*Math.sinh(l)+t*i*Math.cosh(l))/t}}}return y(),{next:e=>{let t=f(e);
968if(p)a.done=e>=d;else{let o=Math.abs(1e3*g(e))<=i,s=Math.abs(r-t)<=n;a.done=o&&s}return a.value=a.done?r:t,a},flipTarget:()=>{h=-h,[t,r]=[r,t],y()}}}tv.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;let tb=e=>0,t_=(e,t,r)=>{let i=t-e;return 0===i?1:(r-e)/i},tx=(e,t,r)=>-r*e+r*t+e,tA=(e,t)=>r=>!!(eo(r)&&en.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),tw=(e,t,r)=>i=>{if(!eo(i))return i;let[n,o,a,s]=i.match(er);return{[e]:parseFloat(n),[t]:parseFloat(o),[r]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},tS=ee(0,255),tT=Object.assign(Object.assign({},ep),{transform:e=>Math.round(tS(e))}),tC={test:tA("rgb","red"),parse:tw("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+tT.transform(e)+", "+tT.transform(t)+", "+tT.transform(r)+", "+et(ef.transform(i))+")"},tE={test:tA("#"),parse:function(e){let t="",r="",i="",n="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),i=e.substr(5,2),n=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),i=e.substr(3,1),n=e.substr(4,1),t+=t,r+=r,i+=i,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}},transform:tC.transform},tP={test:tA("hsl","hue"),parse:tw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+el.transform(et(t))+", "+el.transform(et(r))+", "+et(ef.transform(i))+")"};function tI(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function tM({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,r/=100;let n=0,o=0,a=0;if(t/=100){let i=r<.5?r*(1+t):r+t-r*t,s=2*r-i;n=tI(s,i,e+1/3),o=tI(s,i,e),a=tI(s,i,e-1/3)}else n=o=a=r;return{red:Math.round(255*n),green:Math.round(255*o),blue:Math.round(255*a),alpha:i}}let tk=(e,t,r)=>{let i=e*e;return Math.sqrt(Math.max(0,r*(t*t-i)+i))},tO=[tE,tC,tP],tD=e=>tO.find(t=>t.test(e)),tR=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,tL=(e,t)=>{let r=tD(e),i=tD(t);g(tR(e)),g(tR(t));let n=r.parse(e),o=i.parse(t);r===tP&&(n=tM(n),r=tC),i===tP&&(o=tM(o),i=tC);let a=Object.assign({},n);return e=>{for(let t in a)"alpha"!==t&&(a[t]=tk(n[t],o[t],e));return a.alpha=tx(n.alpha,o.alpha,e),r.transform(a)}},tB={test:e=>tC.test(e)||tE.test(e)||tP.test(e),parse:e=>tC.test(e)?tC.parse(e):tP.test(e)?tP.parse(e):tE.parse(e),transform:e=>eo(e)?e:e.hasOwnProperty("red")?tC.transform(e):tP.transform(e)},tF="${c}",tj="${n}";function tz(e){"number"==typeof e&&(e=`${e}`);let t=[],r=0,i=e.match(ei);i&&(r=i.length,e=e.replace(ei,tF),t.push(...i.map(tB.parse)));let n=e.match(er);return n&&(e=e.replace(er,tj),t.push(...n.map(ep.parse))),{values:t,numColors:r,tokenised:e}}function tN(e){return tz(e).values}function tG(e){let{values:t,numColors:r,tokenised:i}=tz(e),n=t.length;return e=>{let t=i;for(let i=0;i<n;i++)t=t.replace(i<r?tF:tj,i<r?tB.transform(e[i]):et(e[i]));return t}}let tV=e=>"number"==typeof e?0:e,tU={test:function(e){var t,r,i,n;return isNaN(e)&&eo(e)&&(null!=(r=null==(t=e.match(er))?void 0:t.length)?r:0)+(null!=(n=null==(i=e.match(ei))?void 0:i.length)?n:0)>0},parse:tN,createTransformer:tG,getAnimatableNone:function(e){let t=tN(e);return tG(e)(t.map(tV))}};function tH(e,t){return"number"==typeof e?r=>tx(e,t,r):tB.test(e)?tL(e,t):t$(e,t)}let tW=(e,t)=>{let r=[...e],i=r.length,n=e.map((e,r)=>tH(e,t[r]));return e=>{for(let t=0;t<i;t++)r[t]=n[t](e);return r}},tq=(e,t)=>{let r=Object.assign(Object.assign({},e),t),i={};for(let n in r)void 0!==e[n]&&void 0!==t[n]&&(i[n]=tH(e[n],t[n]));return e=>{for(let t in i)r[t]=i[t](e);return r}};function tZ(e){let t=tU.parse(e),r=t.length,i=0,n=0,o=0;for(let e=0;e<r;e++)i||"number"==typeof t[e]?i++:void 0!==t[e].hue?o++:n++;return{parsed:t,numNumbers:i,numRGB:n,numHSL:o}}let t$=(e,t)=>{let r=tU.createTransformer(t),i=tZ(e),n=tZ(t);return i.numHSL===n.numHSL&&i.numRGB===n.numRGB&&i.numNumbers>=n.numNumbers?te(tW(i.parsed,n.parsed),r):(m(`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),r=>`${r>0?t:e}`)},tK=(e,t)=>r=>tx(e,t,r);function tX(e,t,{clamp:r=!0,ease:i,mixer:n}={}){var o;let a,s,l=e.length;g(t.length),g(!i||!Array.isArray(i)||i.length),e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let u=function(e,t,r){let i=[],n=r||function(e){if("number"==typeof e)return tK;if("string"==typeof e)if(tB.test(e))return tL;else return t$;return Array.isArray(e)?tW:"object"==typeof e?tq:void 0}(e[0]),o=e.length-1;for(let r=0;r<o;r++){let o=n(e[r],e[r+1]);t&&(o=te(Array.isArray(t)?t[r]:t,o)),i.push(o)}return i}(t,i,n),c=2===l?function([e,t],[r]){return i=>r(t_(e,t,i))}(e,u):(s=(a=(o=e).length)-1,e=>{let t=0,r=!1;if(e<=o[0]?r=!0:e>=o[s]&&(t=s-1,r=!0),!r){let r=1;for(;r<a&&!(o[r]>e)&&r!==s;r++);t=r-1}let i=t_(o[t],o[t+1],e);return u[t](i)});return r?t=>c(tp(e[0],e[l-1],t)):c}let tY=e=>t=>1-e(1-t),tQ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tJ=e=>t=>t*t*((e+1)*t-e),t0=4/11,t1=8/11,t2=e=>e,t3=e=>Math.pow(e,2),t5=tY(t3),t4=tQ(t3),t6=e=>1-Math.sin(Math.acos(e)),t8=tY(t6),t7=tQ(t8),t9=tJ(1.525),re=tY(t9),rt=tQ(t9),rr=(i=tJ(1.525),e=>(e*=2)<1?.5*i(e):.5*(2-Math.pow(2,-10*(e-1)))),ri=4356/361,rn=35442/1805,ro=16061/1805,ra=e=>{if(1===e||0===e)return e;let t=e*e;return e<t0?7.5625*t:e<t1?9.075*t-9.9*e+3.4:e<.9?ri*t-rn*e+ro:10.8*e*e-20.52*e+10.72},rs=tY(ra);function rl({from:e=0,to:t=1,ease:r,offset:i,duration:n=300}){let o,a={done:!1,value:e},s=Array.isArray(t)?t:[e,t],l=(i&&i.length===s.length?i:(o=s.length,s.map((e,t)=>0!==t?t/(o-1):0))).map(e=>e*n);function u(){return tX(l,s,{ease:Array.isArray(r)?r:s.map(()=>r||t4).splice(0,s.length-1)})}let c=u();return{next:e=>(a.value=c(e),a.done=e>=n,a),flipTarget:()=>{s.reverse(),c=u()}}}let ru={keyframes:rl,spring:tv,decay:function({velocity:e=0,from:t=0,power:r=.8,timeConstant:i=350,restDelta:n=.5,modifyTarget:o}){let a={done:!1,value:t},s=r*e,l=t+s,u=void 0===o?l:o(l);return u!==l&&(s=u-t),{next:e=>{let t=-s*Math.exp(-e/i);return a.done=!(t>n||t<-n),a.value=a.done?u:u+t,a},flipTarget:()=>{}}}},rc=1/60*1e3,rh="u">typeof performance?()=>performance.now():()=>Date.now(),rd="u">typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rh()),rc),rp=!0,rf=!1,rm=!1,rg={delta:0,timestamp:0},ry=["read","update","preRender","render","postRender"],rv=ry.reduce((e,t)=>
968{var r;let i,n,o,a,s,l,u;return e[t]=(r=()=>rf=!0,i=[],n=[],o=0,a=!1,s=!1,l=new WeakSet,u={schedule:(e,t=!1,r=!1)=>{let s=r&&a,u=s?i:n;return t&&l.add(e),-1===u.indexOf(e)&&(u.push(e),s&&a&&(o=i.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),l.delete(e)},process:e=>{if(a){s=!0;return}if(a=!0,[i,n]=[n,i],n.length=0,o=i.length)for(let t=0;t<o;t++){let n=i[t];n(e),l.has(n)&&(u.schedule(n),r())}a=!1,s&&(s=!1,u.process(e))}}),e},{}),rb=ry.reduce((e,t)=>{let r=rv[t];return e[t]=(e,t=!1,i=!1)=>(rf||rS(),r.schedule(e,t,i)),e},{}),r_=ry.reduce((e,t)=>(e[t]=rv[t].cancel,e),{}),rx=ry.reduce((e,t)=>(e[t]=()=>rv[t].process(rg),e),{}),rA=e=>rv[e].process(rg),rw=e=>{rf=!1,rg.delta=rp?rc:Math.max(Math.min(e-rg.timestamp,40),1),rg.timestamp=e,rm=!0,ry.forEach(rA),rm=!1,rf&&(rp=!1,rd(rw))},rS=()=>{rf=!0,rp=!0,rm||rd(rw)};function rT(e,t,r=0){return e-t-r}let rC=e=>{let t=({delta:t})=>e(t);return{start:()=>rb.update(t,!0),stop:()=>r_.update(t)}};function rE(e){let t,r,i;var n,{from:o,autoplay:a=!0,driver:s=rC,elapsed:l=0,repeat:c=0,repeatType:h="loop",repeatDelay:d=0,onPlay:p,onStop:f,onComplete:m,onRepeat:g,onUpdate:y}=e,v=(0,u.Tt)(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=v,_=0,x=v.duration,A=!1,w=!0,S=function(e){if(Array.isArray(e.to))return rl;if(ru[e.type])return ru[e.type];let t=new Set(Object.keys(e));if(t.has("ease")||t.has("duration")&&!t.has("dampingRatio"));else if(t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta"))return tv;return rl}(v);(null==(n=S.needsInterpolation)?void 0:n.call(S,o,b))&&(i=tX([0,100],[o,b],{clamp:!1}),o=0,b=100);let T=S(Object.assign(Object.assign({},v),{from:o,to:b}));return a&&(null==p||p(),(t=s(function(e){if(w||(e=-e),l+=e,!A){let e=T.next(Math.max(0,l));r=e.value,i&&(r=i(r)),A=w?e.done:l<=0}if(null==y||y(r),A)if(0===_&&(null!=x||(x=l)),_<c){var n,o;n=l,o=x,(w?n>=o+d:n<=-d)&&(_++,"reverse"===h?l=function(e,t,r=0,i=!0){return i?rT(t+-e,t,r):t-(e-t)+r}(l,x,d,w=_%2==0):(l=rT(l,x,d),"mirror"===h&&T.flipTarget()),A=!1,g&&g())}else t.stop(),m&&m()})).start()),{stop:()=>{null==f||f(),t.stop()}}}var rP=function(e){return 1e3*e};let rI=(e,t)=>1-3*t+3*e,rM=(e,t)=>3*t-6*e,rk=(e,t,r)=>((rI(t,r)*e+rM(t,r))*e+3*t)*e,rO=(e,t,r)=>3*rI(t,r)*e*e+2*rM(t,r)*e+3*t;var rD={linear:t2,easeIn:t3,easeInOut:t4,easeOut:t5,circIn:t6,circInOut:t7,circOut:t8,backIn:t9,backInOut:rt,backOut:re,anticipate:rr,bounceIn:rs,bounceInOut:e=>e<.5?.5*(1-ra(1-2*e)):.5*ra(2*e-1)+.5,bounceOut:ra},rR=function(e){if(Array.isArray(e)){g(e.length);var t=(0,u.zs)(e,4),r=t[0],i=t[1],n=t[2],o=t[3];if(r===i&&n===o)return t2;let a=new Float32Array(11);for(let e=0;e<11;++e)a[e]=rk(.1*e,r,n);return e=>0===e||1===e?e:rk(function(e){let t=0,i=1;for(;10!==i&&a[i]<=e;++i)t+=.1;let o=t+(e-a[--i])/(a[i+1]-a[i])*.1,s=rO(o,r,n);if(s>=.001){var l=o;for(let t=0;t<8;++t){let t=rO(l,r,n);if(0===t)break;let i=rk(l,r,n)-e;l-=i/t}return l}return 0===s?o:function(e,t,r,i,n){let o,a,s=0;do(o=rk(a=t+(r-t)/2,i,n)-e)>0?r=a:t=a;while(Math.abs(o)>1e-7&&++s<10)return a}(e,t,t+.1,r,n)}(e),i,o)}return"string"==typeof e?(g(rD[e],"Invalid easing type '".concat(e,"'")),rD[e]):e},rL=function(e,t){return"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&tU.test(t)&&!t.startsWith("url("))},rB=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},rF=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}},rj=function(){return{type:"keyframes",ease:"linear",duration:.3}},rz=function(e){return{type:"keyframes",duration:.8,values:e}},rN={x:rB,y:rB,z:rB,rotate:rB,rotateX:rB,rotateY:rB,rotateZ:rB,scaleX:rF,scaleY:rF,scale:rF,opacity:rj,backgroundColor:rj,color:rj,default:rF},rG=function(e,t){var r;return r=eF(t)?rz:rN[e]||rN.default,(0,u.Cl)({to:t},r(t))};let rV=new Set(["brightness","contrast","saturate","opacity"]);function rU(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[i]=r.match(er)||[];if(!i)return e;let n=r.replace(i,""),o=+!!rV.has(t);return i!==r&&(o*=100),t+"("+o+n+")"}let rH=/([a-z-]*)\(.*?\)/g,rW=Object.assign(Object.assign({},tU),{getAnimatableNone:e=>{let t=e.match(rH);return t?t.map(rU).join(" "):e}});var rq=(0,u.Cl)((0,u.Cl)({}
968,ey),{color:tB,backgroundColor:tB,outlineColor:tB,fill:tB,stroke:tB,borderColor:tB,borderTopColor:tB,borderRightColor:tB,borderBottomColor:tB,borderLeftColor:tB,filter:rW,WebkitFilter:rW}),rZ=function(e){return rq[e]};function r$(e,t){var r,i=rZ(e);return i!==rW&&(i=tU),null==(r=i.getAnimatableNone)?void 0:r.call(i,t)}function rK(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function rX(e){return"number"==typeof e?0:r$("",e)}function rY(e,t){return e[t]||e.default||e}function rQ(e,t,r,i){return void 0===i&&(i={}),t.start(function(n){var o,a,s,l,c,h,d,p,f,g,y,v=(l=r,d=null!=(c=(h=rY(i,e)).from)?c:t.get(),p=rL(e,l),"none"===d&&p&&"string"==typeof l?d=r$(e,l):rK(d)&&"string"==typeof l?d=rX(l):!Array.isArray(l)&&rK(l)&&"string"==typeof d&&(l=rX(d)),f=rL(e,d),m("You are trying to animate ".concat(e,' from "').concat(d,'" to "').concat(l,'". ').concat(d," is not an animatable value - to enable this animation set ").concat(d," to a value animatable to ").concat(l," via the `style` property.")),f&&p&&!1!==h.type?function(){var r,i,o,a,s,c,p,f,g,y,v={from:d,to:l,velocity:t.getVelocity(),onComplete:n,onUpdate:function(e){return t.set(e)}};return"inertia"===h.type||"decay"===h.type?function({from:e=0,velocity:t=0,min:r,max:i,power:n=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:h,onComplete:d,onStop:p}){let f;function m(e){return void 0!==r&&e<r||void 0!==i&&e>i}function g(e){return void 0===r?i:void 0===i||Math.abs(r-e)<Math.abs(i-e)?r:i}function y(e){null==f||f.stop(),f=rE(Object.assign(Object.assign({},e),{driver:c,onUpdate:t=>{var r;null==h||h(t),null==(r=e.onUpdate)||r.call(e,t)},onComplete:d,onStop:p}))}function v(e){y(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},e))}if(m(e))v({from:e,velocity:t,to:g(e)});else{let i,a,s=n*t+e;void 0!==u&&(s=u(s));let c=g(s),h=c===r?-1:1;y({type:"decay",from:e,velocity:t,timeConstant:o,power:n,restDelta:l,modifyTarget:u,onUpdate:m(s)?e=>{var r,n;i=a,a=e,r=e-i,t=(n=rg.delta)?1e3/n*r:0,(1===h&&e>c||-1===h&&e<c)&&v({from:e,to:c,velocity:t})}:void 0})}return{stop:()=>null==f?void 0:f.stop()}}((0,u.Cl)((0,u.Cl)({},v),h)):rE((0,u.Cl)((0,u.Cl)({},(r=h,Array.isArray(v.to)&&(null!=r.duration||(r.duration=.8)),Array.isArray(v.to)&&null===v.to[0]&&(v.to=(0,u.fX)([],(0,u.zs)(v.to),!1),v.to[0]=v.from),(i=r).when,i.delay,i.delayChildren,i.staggerChildren,i.staggerDirection,i.repeat,i.repeatType,i.repeatDelay,i.from,Object.keys((0,u.Tt)(i,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"])).length||(r=(0,u.Cl)((0,u.Cl)({},r),rG(e,v.to))),(0,u.Cl)((0,u.Cl)({},v),(a=(o=r).ease,s=o.times,c=o.yoyo,p=o.flip,f=o.loop,g=(0,u.Tt)(o,["ease","times","yoyo","flip","loop"]),y=(0,u.Cl)({},g),s&&(y.offset=s),g.duration&&(y.duration=rP(g.duration)),g.repeatDelay&&(y.repeatDelay=rP(g.repeatDelay)),a&&(y.ease=Array.isArray(a)&&"number"!=typeof a[0]?a.map(rR):rR(a)),"tween"===g.type&&(y.type="keyframes"),(c||f||p)&&(m(),c?y.repeatType="reverse":f?y.repeatType="loop":p&&(y.repeatType="mirror"),y.repeat=f||c||p||g.repeat),"spring"!==g.type&&(y.type="keyframes"),y)))),{onUpdate:function(e){var t;v.onUpdate(e),null==(t=h.onUpdate)||t.call(h,e)},onComplete:function(){var e;v.onComplete(),null==(e=h.onComplete)||e.call(h)}}))}:function(){var e,r,i=ej(l);return t.set(i),n(),null==(e=null==h?void 0:h.onUpdate)||e.call(h,i),null==(r=null==h?void 0:h.onComplete)||r.call(h),{stop:function(){}}}),b=null!=(s=null!=(a=(rY(o=i,e)||{}).delay)?a:o.delay)?s:0,_=function(){return y=v()};return b?g=window.setTimeout(_,rP(b)):_(),function(){clearTimeout(g),null==y||y.stop()}})}function rJ(e,t){-1===e.indexOf(t)&&e.push(t)}function r0(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1)}var r1=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return rJ(this.subscriptions,e),function(){return r0(t.subscriptions,e)}},e.prototype.notify=function(e,t,r){var i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,r);else for(var n=0;n<i;n++){var o=this.subscriptions[n];o&&o(e,t,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),r2=function(){function e(e){var t=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new r1,this.velocityUpdateSubscribers=new r1,this.renderSubscribers=new r1,this.canTrackVelocity=!1,this.updateAndNotify=function(e,r){void 0===r&&(r=!0),t.prev=t.current,t.current=e;var i=rg.delta,n=rg.timestamp;t.lastUpdated!==n&&(t.timeDelta=i,t.lastUpdated=n,rb.postRender(t.scheduleVelocityCheck)),t.prev!==t.current&&t.updateSubscribers.notify(t.current),t.velocityUpdateSubscribers.getSize()&&t.velocityUpdateSubscribers.notify(t.getVelocity()),r&&t.renderSubscribers.notify(t.current)},this.scheduleVelocityCheck=function(){return rb.postRender(t.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==t.lastUpdated&&(t.prev=t.current,t.velocityUpdateSubscribers.notify(t.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=!isNaN(parseFloat(this.current))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){var e,t;return this.canTrackVelocity?(e=parseFloat(this.current)-parseFloat(this.prev),(t=this.timeDelta)?1e3/t*e:0):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise(function(r){t.hasAnimated=!0,t.stopAnimation=e(r)}).then(function(){return t.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function r3(e){return new r2(e)}var r5=function(e){return function(t){return t.test(e)}},r4=[ep,eu,el,es,eh,ec,{test:function(e){return"auto"===e},parse:function(e){return e}}],r6=function(e){return r4.find(r5(e))},r8=(0,u.fX)((0,u.fX)([],(0,u.zs)(r4),!1),[tB,tU],!1);function r7(e,t,r){void 0===r&&(r={});var i,n=k(e,t,r.custom),o=(n||{}).transition,a=void 0===o?e.getDefaultTransition()||{}:o;r.transitionOverride&&(a=r.transitionOverride);var s=n?function(){return r9(e,n,r)}:function(){return Promise.resolve()},l=(null==(i=e.variantChildren)?void 0:i.size)?function(i){void 0===i&&(i=0);var n,o,s,l,c,h,d,p=a.delayChildren;return n=(void 0===p?0:p)+i,o=a.staggerChildren,s=a.staggerDirection,l=r,void 0===n&&(n=0),void 0===o&&(o=0),void 0===s&&(s=1),c=[],h=(e.variantChildren.size-1)*o,d=1===s?function(e){return void 0===e&&(e=0),e*o}:function(e){return void 0===e&&(e=0),h-e*o},Array.from(e.variantChildren).sort(ie).forEach(function(e,r){c.push(r7(e,t,(0,u.Cl)((0,u.Cl)({},l),{delay:n+d(r)})).then(function(){return e.notifyAnimationComplete(t)}))}),Promise.all(c)}:function(){return Promise.resolve()},c=a.when;if(!c)return Promise.all([s(),l(r.delay)]);var h=(0,u.zs)("beforeChildren"===c?[s,l]:[l,s],2),d=h[0],p=h[1];return d().then(p)}function r9(e,t,r){var i,n=void 0===r?{}:r,o=n.delay,a=void 0===o?0:o,s=n.transitionOverride,l=n.type,c=e.makeTargetAnimatable(t),h=c.transition,d=void 0===h?e.getDefaultTransition():h,p=c.transitionEnd,f=(0,u.Tt)(c,["transition","transitionEnd"]);s&&(d=s);var m=[],g=l&&(null==(i=e.animationState)?void 0:i.getState()[l]);for(var y in f){var v=e.getValue(y),b=f[y];if(!(!v||void 0===b||g&&function(e,t){var r=e.protectedKeys,i=e.needsAnimating,
968n=r.hasOwnProperty(t)&&!0!==i[t];return i[t]=!1,n}(g,y))){var _=(0,u.Cl)({delay:a},d);e.shouldReduceMotion&&$(y)&&(_=(0,u.Cl)((0,u.Cl)({},_),{type:!1,delay:0}));var x=rQ(y,v,b,_);m.push(x)}}return Promise.all(m).then(function(){p&&function(e,t){var r=k(e,t),i=r?e.makeTargetAnimatable(r,!1):{},n=i.transitionEnd;i.transition;var o=(0,u.Tt)(i,["transitionEnd","transition"]);for(var a in o=(0,u.Cl)((0,u.Cl)({},o),void 0===n?{}:n)){var s=ej(o[a]);e.hasValue(a)?e.getValue(a).set(s):e.addValue(a,r3(s))}}(e,p)})}function ie(e,t){return e.sortNodePosition(t)}var it=[s.Animate,s.InView,s.Focus,s.Hover,s.Tap,s.Drag,s.Exit],ir=(0,u.fX)([],(0,u.zs)(it),!1).reverse(),ii=it.length;function io(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var ia={animation:ts(function(e){var t=e.visualElement,r=e.animate;t.animationState||(t.animationState=function(e){var t,r=function(t){return Promise.all(t.map(function(t){var r,i=t.animation,n=t.options;if(void 0===n&&(n={}),e.notifyAnimationStart(i),Array.isArray(i))r=Promise.all(i.map(function(t){return r7(e,t,n)}));else if("string"==typeof i)r=r7(e,i,n);else{var o="function"==typeof i?k(e,i,n.custom):i;r=r9(e,o,n)}return r.then(function(){return e.notifyAnimationComplete(i)})}))},i=((t={})[s.Animate]=io(!0),t[s.InView]=io(),t[s.Hover]=io(),t[s.Tap]=io(),t[s.Drag]=io(),t[s.Focus]=io(),t[s.Exit]=io(),t),n={},o=!0,a=function(t,r){var i=k(e,r);if(i){i.transition;var n=i.transitionEnd,o=(0,u.Tt)(i,["transition","transitionEnd"]);t=(0,u.Cl)((0,u.Cl)((0,u.Cl)({},t),o),n)}return t};function l(t,s){for(var l,c=e.getProps(),h=e.getVariantContext(!0)||{},d=[],p=new Set,f={},m=1/0,g=0;g<ii;g++)!function(r){var n,g=ir[r],y=i[g],v=null!=(l=c[g])?l:h[g],b=I(v),_=g===s?y.isActive:null;!1===_&&(m=r);var x=v===h[g]&&v!==c[g]&&b;if(x&&o&&e.manuallyAnimateOnMount&&(x=!1),y.protectedKeys=(0,u.Cl)({},f),!(!y.isActive&&null===_||!v&&!y.prevProp||eB(v))&&"boolean"!=typeof v){var A=(n=y.prevProp,"string"==typeof v?v!==n:!!P(v)&&!td(v,n)),w=A||g===s&&y.isActive&&!x&&b||r>m&&b,S=Array.isArray(v)?v:[v],T=S.reduce(a,{});!1===_&&(T={});var C=y.prevResolvedValues,E=void 0===C?{}:C,M=(0,u.Cl)((0,u.Cl)({},E),T),k=function(e){w=!0,p.delete(e),y.needsAnimating[e]=!0};for(var O in M){var D=T[O],R=E[O];f.hasOwnProperty(O)||(D!==R?eF(D)&&eF(R)?!td(D,R)||A?k(O):y.protectedKeys[O]=!0:void 0!==D?k(O):p.add(O):void 0!==D&&p.has(O)?k(O):y.protectedKeys[O]=!0)}y.prevProp=v,y.prevResolvedValues=T,y.isActive&&(f=(0,u.Cl)((0,u.Cl)({},f),T)),o&&e.blockInitialAnimation&&(w=!1),w&&!x&&d.push.apply(d,(0,u.fX)([],(0,u.zs)(S.map(function(e){return{animation:e,options:(0,u.Cl)({type:g},t)}})),!1))}}(g);if(n=(0,u.Cl)({},f),p.size){var y={};p.forEach(function(t){var r=e.getBaseTarget(t);void 0!==r&&(y[t]=r)}),d.push({animation:y})}var v=!!d.length;return o&&!1===c.initial&&!e.manuallyAnimateOnMount&&(v=!1),o=!1,v?r(d):Promise.resolve()}return{isAnimated:function(e){return void 0!==n[e]},animateChanges:l,setActive:function(t,r,n){if(i[t].isActive===r)return Promise.resolve();null==(o=e.variantChildren)||o.forEach(function(e){var i;return null==(i=e.animationState)?void 0:i.setActive(t,r)}),i[t].isActive=r;var o,a=l(n,t);for(var s in i)i[s].protectedKeys={};return a},setAnimateFunction:function(t){r=t(e)},getState:function(){return i}}}(t)),eB(r)&&(0,c.useEffect)(function(){return r.subscribe(t)},[r])}),exit:ts(function(e){var t=e.custom,r=e.visualElement,i=(0,u.zs)(th(),2),n=i[0],o=i[1],a=(0,c.useContext)(A);(0,c.useEffect)(function(){r.isPresent=n;var e,i,l=null==(e=r.animationState)?void 0:e.setActive(s.Exit,!n,{custom:null!=(i=null==a?void 0:a.custom)?i:t});n||null==l||l.then(o)},[n])})};let is=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),il=e=>is(e)&&e.hasOwnProperty("z"),iu=(e,t)=>Math.abs(e-t);function ic(e,t){return"number"==typeof e&&"number"==typeof t?iu(e,t):is(e)&&is(t)?Math.sqrt(Math.pow(iu(e.x,t.x),2)+Math.pow(iu(e.y,t.y),2)+Math.pow(il(e)&&il(t)?iu(e.z,t.z):0,2)):void 0}var ih=function(){function e(e,t,r){var i=this,n=(void 0===r?{}:r).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var e=im(i.lastMoveEventInfo,i.history),t=null!==i.startEvent,r=ic(e.offset,{x:0,y:0})>=3;if(t||r){var n=e.point,o=rg.timestamp;i.history.push((0,u.Cl)((0,u.Cl)({},n),{timestamp:o}));var a=i.handlers,s=a.onStart,l=a.onMove;t||(s&&s(i.lastMoveEvent,e),i.startEvent=i.lastMoveEvent),l&&l(i.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){(i.lastMoveEvent=e,i.lastMoveEventInfo=id(t,i.transformPagePoint),eq(e)&&0===e.buttons)?i.handlePointerUp(e,t):rb.update(i.updatePoint,!0)},this.handlePointerUp=function(e,t){i.end();var r=i.handlers,n=r.onEnd,o=r.onSessionEnd,a=im(id(t,i.transformPagePoint),i.history);i.startEvent&&n&&n(e,a),o&&o(e,a)},!e.touches||!(e.touches.length>1)){this.handlers=t,this.transformPagePoint=n;var o=id(e$(e),this.transformPagePoint),a=o.point,s=rg.timestamp;this.history=[(0,u.Cl)((0,u.Cl)({},a),{timestamp:s})];var l=t.onSessionStart;l&&l(e,im(o,this.history)),this.removeListeners=te(eJ(window,"pointermove",this.handlePointerMove),eJ(window,"pointerup",this.handlePointerUp),eJ(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),r_.update(this.updatePoint)},e}();function id(e,t){return t?{point:t(e.point)}:e}function ip(e,t){return{x:e.x-t.x,y:e.y-t.y}}function im(e,t){var r=e.point;
968return{point:r,delta:ip(r,ig(t)),offset:ip(r,t[0]),velocity:function(e){if(e.length<2)return{x:0,y:0};for(var t=e.length-1,r=null,i=ig(e);t>=0&&(r=e[t],!(i.timestamp-r.timestamp>rP(.1)));)t--;if(!r)return{x:0,y:0};var n=(i.timestamp-r.timestamp)/1e3;if(0===n)return{x:0,y:0};var o={x:(i.x-r.x)/n,y:(i.y-r.y)/n};return 1/0===o.x&&(o.x=0),1/0===o.y&&(o.y=0),o}(t)}}function ig(e){return e[e.length-1]}function iy(e){return e.max-e.min}function iv(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=.01),ic(e,t)<r}function ib(e,t,r,i){void 0===i&&(i=.5),e.origin=i,e.originPoint=tx(t.min,t.max,e.origin),e.scale=iy(r)/iy(t),(iv(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=tx(r.min,r.max,e.origin)-e.originPoint,(iv(e.translate)||isNaN(e.translate))&&(e.translate=0)}function i_(e,t,r,i){ib(e.x,t.x,r.x,null==i?void 0:i.originX),ib(e.y,t.y,r.y,null==i?void 0:i.originY)}function ix(e,t,r){e.min=r.min+t.min,e.max=e.min+iy(t)}function iA(e,t,r){e.min=t.min-r.min,e.max=e.min+iy(t)}function iw(e,t,r){iA(e.x,t.x,r.x),iA(e.y,t.y,r.y)}function iS(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function iT(e,t){var r,i=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&(i=(r=(0,u.zs)([n,i],2))[0],n=r[1]),{min:i,max:n}}function iC(e,t,r){return{min:iE(e,t),max:iE(e,r)}}function iE(e,t){var r;return"number"==typeof e?e:null!=(r=e[t])?r:0}var iP=function(){return{translate:0,scale:1,origin:0,originPoint:0}},iI=function(){return{x:iP(),y:iP()}},iM=function(){return{min:0,max:0}},ik=function(){return{x:iM(),y:iM()}};function iO(e){return[e("x"),e("y")]}function iD(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}function iR(e){return void 0===e||1===e}function iL(e){var t=e.scale,r=e.scaleX,i=e.scaleY;return!iR(t)||!iR(r)||!iR(i)}function iB(e){var t,r;return iL(e)||(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r||e.z||e.rotate||e.rotateX||e.rotateY}function iF(e,t,r,i,n){return void 0!==n&&(e=i+n*(e-i)),i+r*(e-i)+t}function ij(e,t,r,i,n){void 0===t&&(t=0),void 0===r&&(r=1),e.min=iF(e.min,t,r,i,n),e.max=iF(e.max,t,r,i,n)}function iz(e,t){var r=t.x,i=t.y;ij(e.x,r.translate,r.scale,r.originPoint),ij(e.y,i.translate,i.scale,i.originPoint)}function iN(e,t){e.min=e.min+t,e.max=e.max+t}function iG(e,t,r){var i=(0,u.zs)(r,3),n=i[0],o=i[1],a=i[2],s=void 0!==t[a]?t[a]:.5,l=tx(e.min,e.max,s);ij(e,t[n],t[o],l,t.scale)}var iV=["x","scaleX","originX"],iU=["y","scaleY","originY"];function iH(e,t){iG(e.x,t,iV),iG(e.y,t,iU)}function iW(e,t){return iD(function(e,t){if(!t)return e;var r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}var iq=new WeakMap,iZ=function(){function e(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ik(),this.visualElement=e}return e.prototype.start=function(e,t){var r=this,i=(void 0===t?{}:t).snapToCursor,n=void 0!==i&&i;!1!==this.visualElement.isPresent&&(this.panSession=new ih(e,{onSessionStart:function(e){r.stopAnimation(),n&&r.snapToCursor(e$(e,"page").point)},onStart:function(e,t){var i,n=r.getProps(),o=n.drag,a=n.dragPropagation,l=n.onDragStart;(!o||a||(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=e5(o),r.openGlobalLock))&&(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),iO(function(e){var t,i,n=r.getAxisMotionValue(e).get()||0;if(el.test(n)){var o=null==(i=null==(t=r.visualElement.projection)?void 0:t.layout)?void 0:i.actual[e];o&&(n=iy(o)*(parseFloat(n)/100))}r.originPoint[e]=n}),null==l||l(e,t),null==(i=r.visualElement.animationState)||i.setActive(s.Drag,!0))},onMove:function(e,t){var i=r.getProps(),n=i.dragPropagation,o=i.dragDirectionLock,a=i.onDirectionLock,s=i.onDrag;if(n||r.openGlobalLock){var l,u,c=t.offset;if(o&&null===r.currentDirection){void 0===l&&(l=10),u=null,Math.abs(c.y)>l?u="y":Math.abs(c.x)>l&&(u="x"),r.currentDirection=u,null!==r.currentDirection&&(null==a||a(r.currentDirection));return}r.updateAxis("x",t.point,c),r.updateAxis("y",t.point,c),r.visualElement.syncRender(),null==s||s(e,t)}},onSessionEnd:function(e,t){return r.stop(e,t)}},{transformPagePoint:this.visualElement.getTransformPagePoint()}))},e.prototype.stop=function(e,t){var r=this.isDragging;if(this.cancel(),r){var i=t.velocity;this.startAnimation(i);var n=this.getProps().onDragEnd;null==n||n(e,t)}},e.prototype.cancel=function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null==(e=this.panSession)||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null==(t=this.visualElement.animationState)||t.setActive(s.Drag,!1)},e.prototype.updateAxis=function(e,t,r){var i=this.getProps().drag;if(r&&i$(e,i,this.currentDirection)){var n,o,a,s,l,u=this.getAxisMotionValue(e),c=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(n=c,o=this.constraints[e],a=this.elastic[e],s=o.min,l=o.max,void 0!==s&&n<s?n=a?tx(s,n,a.min):Math.max(n,s):void 0!==l&&n>l&&(n=a?tx(l,n,a.max):Math.min(n,l)),c=n),u.set(c)}}
968,e.prototype.resolveConstraints=function(){var e,t,r,i,n,o,a=this,s=this.getProps(),l=s.dragConstraints,u=s.dragElastic,c=(this.visualElement.projection||{}).layout,h=this.constraints;l&&E(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&c?this.constraints=(e=c.actual,t=l.top,r=l.left,i=l.bottom,n=l.right,{x:iS(e.x,r,n),y:iS(e.y,t,i)}):this.constraints=!1,this.elastic=(void 0===(o=u)&&(o=.35),!1===o?o=0:!0===o&&(o=.35),{x:iC(o,"left","right"),y:iC(o,"top","bottom")}),h!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&iO(function(e){var t,r,i;a.getAxisMotionValue(e)&&(a.constraints[e]=(t=c.actual[e],r=a.constraints[e],i={},void 0!==r.min&&(i.min=r.min-t.min),void 0!==r.max&&(i.max=r.max-t.min),i))})},e.prototype.resolveRefConstraints=function(){var e=this.getProps(),t=e.dragConstraints,r=e.onMeasureDragConstraints;if(!t||!E(t))return!1;var i=t.current;g();var n=this.visualElement.projection;if(!n||!n.layout)return!1;var o=(s=n.root,l=iW(i,this.visualElement.getTransformPagePoint()),(u=s.scroll)&&(iN(l.x,u.x),iN(l.y,u.y)),l),a={x:iT((c=n.layout.actual).x,o.x),y:iT(c.y,o.y)};if(r){var s,l,u,c,h,d,p,f=r((d=(h=a).x,{top:(p=h.y).min,right:d.max,bottom:p.max,left:d.min}));this.hasMutatedConstraints=!!f,f&&(a=iD(f))}return a},e.prototype.startAnimation=function(e){var t=this,r=this.getProps(),i=r.drag,n=r.dragMomentum,o=r.dragElastic,a=r.dragTransition,s=r.dragSnapToOrigin,l=r.onDragTransitionEnd,c=this.constraints||{};return Promise.all(iO(function(r){if(i$(r,i,t.currentDirection)){var l,h=null!=(l=null==c?void 0:c[r])?l:{};s&&(h={min:0,max:0});var d=(0,u.Cl)((0,u.Cl)({type:"inertia",velocity:n?e[r]:0,bounceStiffness:o?200:1e6,bounceDamping:o?40:1e7,timeConstant:750,restDelta:1,restSpeed:10},a),h);return t.startAxisValueAnimation(r,d)}})).then(l)},e.prototype.startAxisValueAnimation=function(e,t){var r=this.getAxisMotionValue(e);return rQ(e,r,0,t)},e.prototype.stopAnimation=function(){var e=this;iO(function(t){return e.getAxisMotionValue(t).stop()})},e.prototype.getAxisMotionValue=function(e){var t,r,i="_drag"+e.toUpperCase();return this.visualElement.getProps()[i]||this.visualElement.getValue(e,null!=(r=null==(t=this.visualElement.getProps().initial)?void 0:t[e])?r:0)},e.prototype.snapToCursor=function(e){var t=this;iO(function(r){if(i$(r,t.getProps().drag,t.currentDirection)){var i=t.visualElement.projection,n=t.getAxisMotionValue(r);if(i&&i.layout){var o=i.layout.actual[r],a=o.min,s=o.max;n.set(e[r]-tx(a,s,.5))}}})},e.prototype.scalePositionWithinConstraints=function(){var e,t=this,r=this.getProps(),i=r.drag,n=r.dragConstraints,o=this.visualElement.projection;if(E(n)&&o&&this.constraints){this.stopAnimation();var a={x:0,y:0};iO(function(e){var r=t.getAxisMotionValue(e);if(r){var i,n,o,s,l,u=r.get();a[e]=(i={min:u,max:u},n=t.constraints[e],o=.5,s=iy(i),(l=iy(n))>s?o=t_(n.min,n.max-s,i.min):s>l&&(o=t_(i.min,i.max-l,n.min)),tp(0,1,o))}});var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null==(e=o.root)||e.updateScroll(),o.updateLayout(),this.resolveConstraints(),iO(function(e){if(i$(e,i,null)){var r=t.getAxisMotionValue(e),n=t.constraints[e],o=n.min,s=n.max;r.set(tx(o,s,a[e]))}})}},e.prototype.addListeners=function(){var e,t=this;iq.set(this.visualElement,this);var r=eJ(this.visualElement.getInstance(),"pointerdown",function(e){var r=t.getProps(),i=r.drag,n=r.dragListener;i&&(void 0===n||n)&&t.start(e)}),i=function(){E(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},n=this.visualElement.projection,o=n.addEventListener("measure",i);n&&!n.layout&&(null==(e=n.root)||e.updateScroll(),n.updateLayout()),i();var a=eH(window,"resize",function(){return t.scalePositionWithinConstraints()});return n.addEventListener("didUpdate",function(e){var r=e.delta,i=e.hasLayoutChanged;t.isDragging&&i&&(iO(function(e){var i=t.getAxisMotionValue(e);i&&(t.originPoint[e]+=r[e].translate,i.set(i.get()+r[e].translate))}),t.visualElement.syncRender())}),function(){a(),r(),o()}},e.prototype.getProps=function(){var e=this.visualElement.getProps(),t=e.drag,r=e.dragDirectionLock,i=e.dragPropagation,n=e.dragConstraints,o=e.dragElastic,a=e.dragMomentum;return(0,u.Cl)((0,u.Cl)({},e),{drag:void 0!==t&&t,dragDirectionLock:void 0!==r&&r,dragPropagation:void 0!==i&&i,dragConstraints:void 0!==n&&n,dragElastic:void 0===o?.35:o,dragMomentum:void 0===a||a})},e}();function i$(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}var iK={pan:ts(function(e){var t=e.onPan,r=e.onPanStart,i=e.onPanEnd,n=e.onPanSessionStart,o=e.visualElement,a=(0,c.useRef)(null),s=(0,c.useContext)(_).transformPagePoint,l={onSessionStart:n,onStart:r,onMove:t,onEnd:function(e,t){a.current=null,i&&i(e,t)}};(0,c.useEffect)(function(){null!==a.current&&a.current.updateHandlers(l)}
968),e0(o,"pointerdown",(t||r||i||n)&&function(e){a.current=new ih(e,l,{transformPagePoint:s})}),e7(function(){return a.current&&a.current.end()})}),drag:ts(function(e){var t=e.dragControls,r=e.visualElement,i=L(function(){return new iZ(r)});(0,c.useEffect)(function(){return t&&t.subscribe(i)},[i,t]),(0,c.useEffect)(function(){return i.addListeners()},[i])})},iX=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"],iY=function(e){var t=e.treeType,r=void 0===t?"":t,i=e.build,n=e.getBaseTarget,o=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,c=e.removeValueFromRenderState,h=e.sortNodePosition,d=e.scrapeMotionValuesFromProps;return function(e,t){var p,f,m,g,y,v=e.parent,b=e.props,_=e.presenceId,x=e.blockInitialAnimation,A=e.visualState,w=e.shouldReduceMotion;void 0===t&&(t={});var S=!1,T=A.latestValues,C=A.renderState,E=(p=iX.map(function(){return new r1}),f={},m={clearAllListeners:function(){return p.forEach(function(e){return e.clear()})},updatePropListeners:function(e){iX.forEach(function(t){var r,i="on"+t,n=e[i];null==(r=f[t])||r.call(f),n&&(f[t]=m[i](n))})}},p.forEach(function(e,t){m["on"+iX[t]]=function(t){return e.add(t)},m["notify"+iX[t]]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.notify.apply(e,(0,u.fX)([],(0,u.zs)(t),!1))}}),m),P=new Map,M=new Map,k={},R=(0,u.Cl)({},T);function L(){g&&S&&(B(),s(g,C,b.style,H.projection))}function B(){i(H,C,T,t,b)}function F(){E.notifyUpdate(T)}function j(e,t){var r=t.onChange(function(t){T[e]=t,b.onUpdate&&rb.update(F,!1,!0)}),i=t.onRenderRequest(H.scheduleRender);M.set(e,function(){r(),i()})}var z=d(b);for(var N in z){var G=z[N];void 0!==T[N]&&Y(G)&&G.set(T[N],!1)}var V=O(b),U=D(b),H=(0,u.Cl)((0,u.Cl)({treeType:r,current:null,depth:v?v.depth+1:0,parent:v,children:new Set,presenceId:_,shouldReduceMotion:w,variantChildren:U?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(null==v?void 0:v.isMounted()),blockInitialAnimation:x,isMounted:function(){return!!g},mount:function(e){S=!0,g=H.current=e,H.projection&&H.projection.mount(e),U&&v&&!V&&(y=null==v?void 0:v.addVariantChild(H)),P.forEach(function(e,t){return j(t,e)}),null==v||v.children.add(H),H.setProps(b)},unmount:function(){var e;null==(e=H.projection)||e.unmount(),r_.update(F),r_.render(L),M.forEach(function(e){return e()}),null==y||y(),null==v||v.children.delete(H),E.clearAllListeners(),g=void 0,S=!1},addVariantChild:function(e){var t,r=H.getClosestVariantNode();if(r)return null==(t=r.variantChildren)||t.add(e),function(){return r.variantChildren.delete(e)}},sortNodePosition:function(e){return h&&r===e.treeType?h(H.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return U?H:null==v?void 0:v.getClosestVariantNode()},getLayoutId:function(){return b.layoutId},getInstance:function(){return g},getStaticValue:function(e){return T[e]},setStaticValue:function(e,t){return T[e]=t},getLatestValues:function(){return T},setVisibility:function(e){H.isVisible!==e&&(H.isVisible=e,H.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),o(H,e,b,t)},measureViewportBox:function(){return a(g,b)},addValue:function(e,t){H.hasValue(e)&&H.removeValue(e),P.set(e,t),T[e]=t.get(),j(e,t)},removeValue:function(e){var t;P.delete(e),null==(t=M.get(e))||t(),M.delete(e),delete T[e],c(e,C)},hasValue:function(e){return P.has(e)},getValue:function(e,t){var r=P.get(e);return void 0===r&&void 0!==t&&(r=r3(t),H.addValue(e,r)),r},forEachValue:function(e){return P.forEach(e)},readValue:function(e){var r;return null!=(r=T[e])?r:l(g,e,t)},setBaseTarget:function(e,t){R[e]=t},getBaseTarget:function(e){if(n){var t=n(b,e);if(void 0!==t&&!Y(t))return t}return R[e]}},E),{build:function(){return B(),C},scheduleRender:function(){rb.render(L,!1,!0)},syncRender:L,setProps:function(e){(e.transformTemplate||b.transformTemplate)&&H.scheduleRender(),b=e,E.updatePropListeners(e),k=function(e,t,r){var i;for(var n in t){var o=t[n],a=r[n];if(Y(o))e.addValue(n,o);else if(Y(a))e.addValue(n,r3(o));else if(a!==o)if(e.hasValue(n)){var s=e.getValue(n);s.hasAnimated||s.set(o)}else e.addValue(n,r3(null!=(i=e.getStaticValue(n))?i:o))}for(var n in r)void 0===t[n]&&e.removeValue(n);return t}(H,d(b),k)},getProps:function(){return b},getVariant:function(e){var t;return null==(t=b.variants)?void 0:t[e]},getDefaultTransition:function(){return b.transition},getTransformPagePoint:function(){return b.transformPagePoint},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null==v?void 0:v.getVariantContext();if(!V){var t=(null==v?void 0:v.getVariantContext())||{};return void 0!==b.initial&&(t.initial=b.initial),t}for(var r={},i=0;i<iJ;i++){var n=iQ[i],o=b[n];(I(o)||!1===o)&&(r[n]=o)}return r}});return H}},iQ=(0,u.fX)(["initial"],(0,u.zs)(it),!1),iJ=iQ.length;function i0(e){return"string"==typeof e&&e.startsWith("var(--")}var i1=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function i2(e,t,r){void 0===r&&(r=1),g('Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));var i=(0,u.zs)(function(e){var t=i1.exec(e);if(!t)return[,];var r=(0,u.zs)(t,3);return[r[1],r[2]]}(e),2),n=i[0],o=i[1];if(n){var a=window.getComputedStyle(t).getPropertyValue(n);return a?a.trim():i0(o)?i2(o,t,r+1):o}}var i3=new Set(["width","height","top","left","right","bottom","x","y"]),i5=function(e){return i3.has(e)},i4=function(e,t){e.set(t,!1),e.set(t)},i6=function(e){return e===ep||e===eu};(a=l||(l={})).width="width",a.height="height",a.left="left",a.right="right",a.top="top",a.bottom="bottom";var i8=function(e,t){return parseFloat(e.split(", ")[t])},i7=function(e,t){return function(r,i){var n=i.transform;if("none"===n||!n)return 0;var o=n.match(/^matrix3d\((.+)\)$/);if(o)return i8(o[1],t);var a=n.match(/^matrix\((.+)\)$/);return a?i8(a[1],e):0}},i9=new Set(["x","y","z"]),ne=W.filter(function(e){return!i9.has(e)}),nt={width:function(e,t){var r=e.x,i=t.paddingLeft,n=t.paddingRight;return r.max-r.min-parseFloat(void 0===i?"0":i)-parseFloat(void 0===n?"0":n)},height:function(e,t){var r=e.y,i=t.paddingTop,n=t.paddingBottom;return r.max-r.min-parseFloat(void 0===i?"0":i)-parseFloat(void 0===n?"0":n)},top:function(e,t){return parseFloat(t.top)},left:function(e,t){return parseFloat(t.left)},bottom:function(e,t){var r=e.y;return parseFloat(t.top)+(r.max-r.min)},right:function(e,t){var r=e.x;return parseFloat(t.left)+(r.max-r.min)},x:i7(4,13),y:i7(5,14)},nr=function(e,t,r){var i=t.measureViewportBox(),n=getComputedStyle(t.getInstance()),o=n.display,a={};"none"===o&&t.setStaticValue("display",e.display||"block"),r.forEach(function(e){a[e]=nt[e](i,n)}),t.syncRender();var s=t.measureViewportBox();return r.forEach(function(r){i4(t.getValue(r),a[r]),e[r]=nt[r](s,n)}),e},ni=function(e,t,r,i){void 0===r&&(r={}),void 0===i&&(i={}),t=(0,u.Cl)({},t),i=(0,u.Cl)({},i);var n=Object.keys(t).filter(i5),o=[],a=!1,s=[];if(n.forEach(function(n){var l,u=e.getValue(n);if(e.hasValue(n)){var c,h=r[n],d=r6(h),p=t[n];if(eF(p)){var f=p.length,m=+(null===p[0]);
968d=r6(h=p[m]);for(var y=m;y<f;y++)l?g(r6(p[y])):g((l=r6(p[y]))===d||i6(d)&&i6(l))}else l=r6(p);if(d!==l)if(i6(d)&&i6(l)){var v=u.get();"string"==typeof v&&u.set(parseFloat(v)),"string"==typeof p?t[n]=parseFloat(p):Array.isArray(p)&&l===eu&&(t[n]=p.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==l?void 0:l.transform)&&(0===h||0===p)?0===h?u.set(l.transform(h)):t[n]=d.transform(p):(a||(c=[],ne.forEach(function(t){var r=e.getValue(t);void 0!==r&&(c.push([t,r.get()]),r.set(+!!t.startsWith("scale")))}),c.length&&e.syncRender(),o=c,a=!0),s.push(n),i[n]=void 0!==i[n]?i[n]:t[n],i4(u,p))}}),!s.length)return{target:t,transitionEnd:i};var l=s.indexOf("height")>=0?window.pageYOffset:null,c=nr(t,e,s);return o.length&&o.forEach(function(t){var r=(0,u.zs)(t,2),i=r[0],n=r[1];e.getValue(i).set(n)}),e.syncRender(),null!==l&&window.scrollTo({top:l}),{target:c,transitionEnd:i}},nn=function(e,t,r,i){var n=function(e,t,r){var i=(0,u.Tt)(t,[]),n=e.getInstance();if(!(n instanceof Element))return{target:i,transitionEnd:r};for(var o in r&&(r=(0,u.Cl)({},r)),e.forEachValue(function(e){var t=e.get();if(i0(t)){var r=i2(t,n);r&&e.set(r)}}),i){var a=i[o];if(i0(a)){var s=i2(a,n);s&&(i[o]=s,r&&(null!=r[o]||(r[o]=a)))}}return{target:i,transitionEnd:r}}(e,t,i);t=n.target,i=n.transitionEnd;var o=t,a=i;return Object.keys(o).some(i5)?ni(e,o,r,a):{target:o,transitionEnd:a}},no={treeType:"dom",readValueFromInstance:function(e,t){if($(t)){var r=rZ(t);return r&&r.default||0}var i=window.getComputedStyle(e);return(J(t)?i.getPropertyValue(t):i[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var r;return null==(r=e.style)?void 0:r[t]},measureViewportBox:function(e,t){return iW(e,t.transformPagePoint)},resetTransform:function(e,t,r){var i=r.transformTemplate;t.style.transform=i?i({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,i=t.style;delete r[e],delete i[e]},makeTargetAnimatable:function(e,t,r,i){var n=r.transformValues;void 0===i&&(i=!0);var o=t.transition,a=t.transitionEnd,s=(0,u.Tt)(t,["transition","transitionEnd"]),l=function(e,t,r){var i,n,o={};for(var a in e)o[a]=null!=(i=function(e,t){if(t)return(t[e]||t.default||t).from}(a,t))?i:null==(n=r.getValue(a))?void 0:n.get();return o}(s,o||{},e);if(n&&(a&&(a=n(a)),s&&(s=n(s)),l&&(l=n(l))),i){!function(e,t,r){var i,n,o=Object.keys(t).filter(function(t){return!e.hasValue(t)}),a=o.length;if(a)for(var s=0;s<a;s++){var l,u,c,h=o[s],d=t[h],p=null;Array.isArray(d)&&(p=d[0]),null===p&&(p=null!=(n=null!=(i=r[h])?i:e.readValue(h))?n:t[h]),null!=p&&("string"==typeof p&&(l=p,/^\-?\d*\.?\d+$/.test(l)||(u=p,/^0[^.\s]+$/.test(u)))?p=parseFloat(p):(c=p,!r8.find(r5(c))&&tU.test(d)&&(p=r$(h,d))),e.addValue(h,r3(p)),null!=r[h]||(r[h]=p),e.setBaseTarget(h,p))}}(e,s,l);var c=nn(e,s,l,a);a=c.transitionEnd,s=c.target}return(0,u.Cl)({transition:o,transitionEnd:a},s)},scrapeMotionValuesFromProps:eR,build:function(e,t,r,i,n){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden"),ev(t,r,i,n.transformTemplate)},render:ek},na=iY(no),ns=iY((0,u.Cl)((0,u.Cl)({},no),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return $(t)?(null==(r=rZ(t))?void 0:r.default)||0:(t=eO.has(t)?t:eM(t),e.getAttribute(t))},scrapeMotionValuesFromProps:eL,build:function(e,t,r,i,n){eE(t,r,i,n.transformTemplate)},render:eD})),nl=function(e,t){return V(e)?ns(t,{enableHardwareAcceleration:!1}):na(t,{enableHardwareAcceleration:!0})};function nu(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var nc={correct:function(e,t){if(!t.target)return e;if("string"==typeof e)if(!eu.test(e))return e;else e=parseFloat(e);var r=nu(e,t.target.x),i=nu(e,t.target.y);return"".concat(r,"% ").concat(i,"%")}},nh="_$css",nd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,u.C6)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,r=t.visualElement,i=t.layoutGroup,n=t.switchLayoutGroup,o=t.layoutId,a=r.projection;Object.assign(U,np),a&&((null==i?void 0:i.group)&&i.group.add(a),(null==n?void 0:n.register)&&o&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",function(){e.safeToRemove()}),a.setOptions((0,u.Cl)((0,u.Cl)({},a.options),{onExitComplete:function(){return e.safeToRemove()}}))),B.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,r=this.props,i=r.layoutDependency,n=r.visualElement,o=r.drag,a=r.isPresent,s=n.projection;return s&&(s.isPresent=a,o||e.layoutDependency!==i||void 0===i?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||rb.postRender(function(){var e;(null==(e=s.getStack())?void 0:e.members.length)||t.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,r=e.layoutGroup,i=e.switchLayoutGroup,n=t.projection;n&&(n.scheduleCheckAfterUnmount(),(null==r?void 0:r.group)&&r.group.remove(n),(null==i?void 0:i.deregister)&&i.deregister(n))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null==e||e()},t.prototype.render=function(){return null},t}(c.Component),np={borderRadius:(0,u.Cl)((0,u.Cl)({},nc),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:nc,borderTopRightRadius:nc,borderBottomLeftRadius:nc,borderBottomRightRadius:nc,boxShadow:{correct:function(e,t){var r=t.treeScale,i=t.projectionDelta,n=e,o=e.includes("var("),a=[];o&&(e=e.replace(i1,function(e){return a.push(e),nh}));var s=tU.parse(e);if(s.length>5)return n;var l=tU.createTransformer(e),u=+("number"!=typeof s[0]),c=i.x.scale*r.x,h=i.y.scale*r.y;s[0+u]/=c,s[1+u]/=h;var d=tx(c,h,.5);"number"==typeof s[2+u]&&(s[2+u]/=d),"number"==typeof s[3+u]&&(s[3+u]/=d);var p=l(s);if(o){var f=0;p=p.replace(nh,function(){var e=a[f];return f++,e})}return p}}},nf=["TopLeft","TopRight","BottomLeft","BottomRight"],nm=nf.length,ng=function(e){return"string"==typeof e?parseFloat(e):e},ny=function(e){return"number"==typeof e||eu.test(e)};function nv(e,t){var r;return null!=(r=e[t])?r:e.borderRadius}var nb=nx(0,.5,t8),n_=nx(.5,.95,t2);function nx(e,t,r){return function(i){return i<e?0:i>t?1:r(t_(e,t,i))}}function nA(e,t){e.min=t.min,e.max=t.max}function nw(e,t){nA(e.x,t.x),nA(e.y,t.y)}function nS(e,t,r,i,n){return e-=t,e=i+1/r*(e-i),void 0!==n&&(e=i+1/n*(e-i)),e}function nT(e,t,r,i,n){var o=(0,u.zs)(r,3),a=o[0],s=o[1],l=o[2];!function(e,t,r,i,n,o,a){if(void 0===t&&(t=0),void 0===r&&(r=1),void 0===i&&(i=.5),void 0===o&&(o=e),void 0===a&&(a=e),el.test(t)&&(t=parseFloat(t),t=tx(a.min,a.max,t/100)-a.min),"number"==typeof t){var s=tx(o.min,o.max,i);e===o&&(s-=t),e.min=nS(e.min,t,r,s,n),e.max=nS(e.max,t,r,s,n)}}(e,t[a],t[s],t[l],t.scale,i,n)}var nC=["x","scaleX","originX"],nE=["y","scaleY","originY"];
968function nP(e,t,r,i){nT(e.x,t,nC,null==r?void 0:r.x,null==i?void 0:i.x),nT(e.y,t,nE,null==r?void 0:r.y,null==i?void 0:i.y)}function nI(e){return 0===e.translate&&1===e.scale}function nM(e){return nI(e.x)&&nI(e.y)}function nk(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var nO=function(){function e(){this.members=[]}return e.prototype.add=function(e){rJ(this.members,e),e.scheduleRender()},e.prototype.remove=function(e){if(r0(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},e.prototype.relegate=function(e){var t,r=this.members.findIndex(function(t){return e===t});if(0===r)return!1;for(var i=r;i>=0;i--){var n=this.members[i];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)},e.prototype.promote=function(e,t){var r,i=this.lead;e!==i&&(this.prevLead=i,this.lead=e,e.show(),i&&(i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues,e.snapshot.isShared=!0),(null==(r=e.root)?void 0:r.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&i.hide()))},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var t,r,i,n,o;null==(r=(t=e.options).onExitComplete)||r.call(t),null==(o=null==(i=e.resumingFrom)?void 0:(n=i.options).onExitComplete)||o.call(n)})},e.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}();function nD(e,t,r){var i=e.x.translate/t.x,n=e.y.translate/t.y,o="translate3d(".concat(i,"px, ").concat(n,"px, 0) ");if(o+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),r){var a=r.rotate,s=r.rotateX,l=r.rotateY;a&&(o+="rotate(".concat(a,"deg) ")),s&&(o+="rotateX(".concat(s,"deg) ")),l&&(o+="rotateY(".concat(l,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===(o+="scale(".concat(u,", ").concat(c,")"))?"none":o}var nR=function(e,t){return e.depth-t.depth},nL=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){rJ(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){r0(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(nR),this.isDirty=!1,this.children.forEach(e)},e}();function nB(e){var t=e.attachResizeListener,r=e.defaultParent,i=e.measureScroll,n=e.checkIsScrollRoot,o=e.resetTransform;function a(e,t,i){var n=this;void 0===t&&(t={}),void 0===i&&(i=null==r?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){n.isUpdating&&(n.isUpdating=!1,n.clearAllSnapshots())},this.updateProjection=function(){n.nodes.forEach(nU),n.nodes.forEach(nH)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?(0,u.fX)((0,u.fX)([],(0,u.zs)(i.path),!1),[i],!1):[],this.parent=i,this.depth=i?i.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(var o=0;o<this.path.length;o++)this.path[o].shouldResetTransform=!0;this.root===this&&(this.nodes=new nL)}return a.prototype.addEventListener=function(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new r1),this.eventHandlers.get(e).add(t)},a.prototype.notifyListeners=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=this.eventHandlers.get(e);null==i||i.notify.apply(i,(0,u.fX)([],(0,u.zs)(t),!1))},a.prototype.hasListeners=function(e){return this.eventHandlers.has(e)},a.prototype.registerPotentialNode=function(e,t){this.potentialNodes.set(e,t)},a.prototype.mount=function(e,r){var i=this;if(void 0===r&&(r=!1),!this.instance){this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;var n=this.options,o=n.layoutId,a=n.layout,s=n.visualElement;
968if(s&&!s.getInstance()&&s.mount(e),this.root.nodes.add(this),null==(l=this.parent)||l.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),r&&(a||o)&&(this.isLayoutDirty=!0),t){var l,c,h=function(){return i.root.updateBlockedByResize=!1};t(e,function(){i.root.updateBlockedByResize=!0,clearTimeout(c),c=window.setTimeout(h,250),B.hasAnimatedSinceResize&&(B.hasAnimatedSinceResize=!1,i.nodes.forEach(nV))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||a)&&this.addEventListener("didUpdate",function(e){var t,r,n,o,a,l=e.delta,c=e.hasLayoutChanged,h=e.hasRelativeTargetChanged,d=e.layout;if(i.isTreeAnimationBlocked()){i.target=void 0,i.relativeTarget=void 0;return}var p=null!=(r=null!=(t=i.options.transition)?t:s.getDefaultTransition())?r:nX,f=s.getProps(),m=f.onLayoutAnimationStart,g=f.onLayoutAnimationComplete,y=!i.targetLayout||!nk(i.targetLayout,d)||h,v=!c&&h;if((null==(n=i.resumeFrom)?void 0:n.instance)||v||c&&(y||!i.currentAnimation)){i.resumeFrom&&(i.resumingFrom=i.resumeFrom,i.resumingFrom.resumingFrom=void 0),i.setAnimationOrigin(l,v);var b=(0,u.Cl)((0,u.Cl)({},rY(p,"layout")),{onPlay:m,onComplete:g});s.shouldReduceMotion&&(b.delay=0,b.type=!1),i.startAnimation(b)}else c||0!==i.animationProgress||i.finishAnimation(),i.isLead()&&(null==(a=(o=i.options).onExitComplete)||a.call(o));i.targetLayout=d})}},a.prototype.unmount=function(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null==(e=this.getStack())||e.remove(this),null==(t=this.parent)||t.children.delete(this),this.instance=void 0,r_.preRender(this.updateProjection)},a.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},a.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},a.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},a.prototype.isTreeAnimationBlocked=function(){var e;return this.isAnimationBlocked||(null==(e=this.parent)?void 0:e.isTreeAnimationBlocked())||!1},a.prototype.startUpdate=function(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null==(e=this.nodes)||e.forEach(nW))},a.prototype.willUpdate=function(e){if(void 0===e&&(e=!0),this.root.isUpdateBlocked()){null==(r=(t=this.options).onExitComplete)||r.call(t);return}if(this.root.isUpdating||this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var t,r,i,n=0;n<this.path.length;n++){var o=this.path[n];o.shouldResetTransform=!0,o.updateScroll()}var a=this.options,s=a.layoutId,l=a.layout;if(void 0!==s||l){var u=null==(i=this.options.visualElement)?void 0:i.getProps().transformTemplate;this.prevTransformTemplateValue=null==u?void 0:u(this.latestValues,""),this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}}},a.prototype.didUpdate=function(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nN);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(nY),this.potentialNodes.clear()),this.nodes.forEach(nG),this.nodes.forEach(nF),this.nodes.forEach(nj),this.clearAllSnapshots(),rx.update(),rx.preRender(),rx.render())},a.prototype.clearAllSnapshots=function(){this.nodes.forEach(nz),this.sharedNodes.forEach(nq)},a.prototype.scheduleUpdateProjection=function(){rb.preRender(this.updateProjection,!1,!0)},a.prototype.scheduleCheckAfterUnmount=function(){var e=this;rb.postRender(function(){e.isLayoutDirty?e.root.didUpdate():e.root.checkUpdateFailed()})},a.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var e=this.measure(),t=this.removeTransform(this.removeElementScroll(e));nJ(t),this.snapshot={measured:e,layout:t,latestValues:{}}}},a.prototype.updateLayout=function(){if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var e,t=0;t<this.path.length;t++)this.path[t].updateScroll();var r=this.measure();nJ(r);var i=this.layout;this.layout={measured:r,actual:this.removeElementScroll(r)},this.layoutCorrected=ik(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null==(e=this.options.visualElement)||e.notifyLayoutMeasure(this.layout.actual,null==i?void 0:i.actual)}},a.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=n(this.instance),this.scroll=i(this.instance))},a.prototype.resetTransform=function(){if(o){var e,t=this.isLayoutDirty||this.shouldResetTransform,r=this.projectionDelta&&!nM(this.projectionDelta),i=null==(e=this.options.visualElement)?void 0:e.getProps().transformTemplate,n=null==i?void 0:i(this.latestValues,""),a=n!==this.prevTransformTemplateValue;t&&(r||iB(this.latestValues)||a)&&(o(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}},a.prototype.measure=function(){var e=this.options.visualElement;if(!e)return ik();var t=e.measureViewportBox(),r=this.root.scroll;return r&&(iN(t.x,r.x),iN(t.y,r.y)),t},a.prototype.removeElementScroll=function(e){var t=ik();nw(t,e);for(var r=0;r<this.path.length;r++){var i=this.path[r],n=i.scroll,o=i.options,a=i.isScrollRoot;if(i!==this.root&&n&&o.layoutScroll){if(a){nw(t,e);var s=this.root.scroll;s&&(iN(t.x,-s.x),iN(t.y,-s.y))}iN(t.x,n.x),iN(t.y,n.y)}}return t},a.prototype.applyTransform=function(e,t){void 0===t&&(t=!1);var r=ik();nw(r,e);for(var i=0;i<this.path.length;i++){var n=this.path[i];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&iH(r,{x:-n.scroll.x,y:-n.scroll.y}),iB(n.latestValues)&&iH(r,n.latestValues)}return iB(this.latestValues)&&iH(r,this.latestValues),r},a.prototype.removeTransform=function(e){var t,r=ik();nw(r,e);for(var i=0;i<this.path.length;i++){var n=this.path[i];if(n.instance&&iB(n.latestValues)){iL(n.latestValues)&&n.updateSnapshot();var o=ik();nw(o,n.measure()),nP(r,n.latestValues,null==(t=n.snapshot)?void 0:t.layout,o)}}return iB(this.latestValues)&&nP(r,this.latestValues),r},a.prototype.setTargetDelta=function(e){this.targetDelta=e,this.root.scheduleUpdateProjection()},a.prototype.setOptions=function(e){var t;this.options=(0,u.Cl)((0,u.Cl)((0,u.Cl)({},this.options),e),{crossfade:null==(t=e.crossfade)||t})},a.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},a.prototype.resolveTargetDelta=function(){var e,t,r,i,n=this.options,o=n.layout,a=n.layoutId;this.layout&&(o||a)&&(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=ik(),this.relativeTargetOrigin=ik(),iw(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),nw(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&((this.target||(this.target=ik(),this.targetWithTransforms=ik()),this.relativeTarget&&this.relativeTargetOrigin&&(null==(i=this.relativeParent)?void 0:i.target))?(e=this.target,t=this.relativeTarget,r=this.relativeParent.target,ix(e.x,t.x,r.x),ix(e.y,t.y,r.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):nw(this.target,this.layout.actual),iz(this.target,this.targetDelta)):nw(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=ik(),this.relativeTargetOrigin=ik(),iw(this.relativeTargetOrigin,this.target,this.relativeParent.target),nw(this.relativeTarget,this.relativeTargetOrigin)))))},a.prototype.getClosestProjectingParent=function(){if(!(!this.parent||iB(this.parent.latestValues)))if((this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout)return this.parent;else return this.parent.getClosestProjectingParent()},a.prototype.calcProjection=function(){var e,t=this.options,r=t.layout,i=t.layoutId;if(this.isTreeAnimating=!!((null==(e=this.parent)?void 0:e.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(r||i)){var n=this.getLead();nw(this.layoutCorrected,this.layout.actual),function(e,t,r,i){void 0===i&&(i=!1);var n,o,a,s,l=r.length;if(l){t.x=t.y=1;for(var u=0;u<l;u++)s=(a=r[u]).projectionDelta,(null==(o=null==(n=a.instance)?void 0:n.style)?void 0:o.display)!=="contents"&&(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&&iH(e,{x:-a.scroll.x,y:-a.scroll.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,iz(e,s)),i&&iB(a.latestValues)&&iH(e,a.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==n);var o=n.target;if(o){this.projectionDelta||(this.projectionDelta=iI(),this.projectionDeltaWithTransform=iI());var a=this.treeScale.x,s=this.treeScale.y,l=this.projectionTransform;i_(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.projectionTransform=nD(this.projectionDelta,this.treeScale),(this.projectionTransform!==l||this.treeScale.x!==a||this.treeScale.y!==s)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}}},a.prototype.hide=function(){this.isVisible=!1},a.prototype.show=function(){this.isVisible=!0},a.prototype.scheduleRender=function(e){var t,r,i;void 0===e&&(e=!0),null==(r=(t=this.options).scheduleRender)||r.call(t),e&&(null==(i=this.getStack())||i.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},a.prototype.setAnimationOrigin=function(e,t){var r,i=this;void 0===t&&(t=!1);var n=this.snapshot,o=(null==n?void 0:n.latestValues)||{},a=(0,u.Cl)({},this.latestValues),s=iI();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!t;var l=ik(),c=null==n?void 0:n.isShared,h=1>=((null==(r=this.getStack())?void 0:r.members.length)||0),d=!!(c&&!h&&!0===this.options.crossfade&&!this.path.some(nK));this.animationProgress=0,this.mixTargetDelta=function(t){var r,n,u,p=t/1e3;nZ(s.x,e.x,p),nZ(s.y,e.y,p),i.setTargetDelta(s),i.relativeTarget&&i.relativeTargetOrigin&&i.layout&&(null==(u=i.relativeParent)?void 0:u.layout)&&(iw(l,i.layout.actual,i.relativeParent.layout.actual),r=i.relativeTarget,n=i.relativeTargetOrigin,n$(r.x,n.x,l.x,p),n$(r.y,n.y,l.y,p)),c&&(i.animationValues=a,function(e,t,r,i,n,o){var a,s,l,u;n?(e.opacity=tx(0,null!=(a=r.opacity)?a:1,nb(i)),e.opacityExit=tx(null!=(s=t.opacity)?s:1,0,n_(i))):o&&(e.opacity=tx(null!=(l=t.opacity)?l:1,null!=(u=r.opacity)?u:1,i));for(var c=0;c<nm;c++){var h="border".concat(nf[c],"Radius"),d=nv(t,h),p=nv(r,h);
968(void 0!==d||void 0!==p)&&(d||(d=0),p||(p=0),0===d||0===p||ny(d)===ny(p)?(e[h]=Math.max(tx(ng(d),ng(p),i),0),(el.test(p)||el.test(d))&&(e[h]+="%")):e[h]=p)}(t.rotate||r.rotate)&&(e.rotate=tx(t.rotate||0,r.rotate||0,i))}(a,o,i.latestValues,p,d,h)),i.root.scheduleUpdateProjection(),i.scheduleRender(),i.animationProgress=p},this.mixTargetDelta(0)},a.prototype.startAnimation=function(e){var t,r,i=this;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),this.resumingFrom&&(null==(r=this.resumingFrom.currentAnimation)||r.stop()),this.pendingAnimation&&(r_.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rb.update(function(){var t,r;B.hasAnimatedSinceResize=!0,void 0===(t=(0,u.Cl)((0,u.Cl)({},e),{onUpdate:function(t){var r;i.mixTargetDelta(t),null==(r=e.onUpdate)||r.call(e,t)},onComplete:function(){var t;null==(t=e.onComplete)||t.call(e),i.completeAnimation()}}))&&(t={}),rQ("",r=Y(0)?0:r3(0),1e3,t),i.currentAnimation={stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}},i.resumingFrom&&(i.resumingFrom.currentAnimation=i.currentAnimation),i.pendingAnimation=void 0})},a.prototype.completeAnimation=function(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null==(e=this.getStack())||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},a.prototype.finishAnimation=function(){var e;this.currentAnimation&&(null==(e=this.mixTargetDelta)||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},a.prototype.applyTransformsToTarget=function(){var e=this.getLead(),t=e.targetWithTransforms,r=e.target,i=e.layout,n=e.latestValues;t&&r&&i&&(nw(t,r),iH(t,n),i_(this.projectionDeltaWithTransform,this.layoutCorrected,t,n))},a.prototype.registerSharedNode=function(e,t){var r,i,n;this.sharedNodes.has(e)||this.sharedNodes.set(e,new nO),this.sharedNodes.get(e).add(t),t.promote({transition:null==(r=t.options.initialPromotionConfig)?void 0:r.transition,preserveFollowOpacity:null==(n=null==(i=t.options.initialPromotionConfig)?void 0:i.shouldPreserveFollowOpacity)?void 0:n.call(i,t)})},a.prototype.isLead=function(){var e=this.getStack();return!e||e.lead===this},a.prototype.getLead=function(){var e;return this.options.layoutId&&(null==(e=this.getStack())?void 0:e.lead)||this},a.prototype.getPrevLead=function(){var e;return this.options.layoutId?null==(e=this.getStack())?void 0:e.prevLead:void 0},a.prototype.getStack=function(){var e=this.options.layoutId;if(e)return this.root.sharedNodes.get(e)},a.prototype.promote=function(e){var t=void 0===e?{}:e,r=t.needsReset,i=t.transition,n=t.preserveFollowOpacity,o=this.getStack();o&&o.promote(this,n),r&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})},a.prototype.relegate=function(){var e=this.getStack();return!!e&&e.relegate(this)},a.prototype.resetRotation=function(){var e=this.options.visualElement;if(e){for(var t=!1,r={},i=0;i<H.length;i++){var n="rotate"+H[i];e.getStaticValue(n)&&(t=!0,r[n]=e.getStaticValue(n),e.setStaticValue(n,0))}if(t){for(var n in null==e||e.syncRender(),r)e.setStaticValue(n,r[n]);e.scheduleRender()}}},a.prototype.getProjectionStyles=function(e){void 0===e&&(e={});var t,r,i,n,o,a,s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";var l=null==(t=this.options.visualElement)?void 0:t.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=ez(e.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;var u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){var c={};return this.options.layoutId&&(c.opacity=null!=(r=this.latestValues.opacity)?r:1,c.pointerEvents=ez(e.pointerEvents)||""),this.hasProjected&&!iB(this.latestValues)&&(c.transform=l?l({},""):"none",this.hasProjected=!1),c}var h=u.animationValues||u.latestValues;this.applyTransformsToTarget(),s.transform=nD(this.projectionDeltaWithTransform,this.treeScale,h),l&&(s.transform=l(h,s.transform));var d=this.projectionDelta,p=d.x,f=d.y;for(var m in s.transformOrigin="".concat(100*p.origin,"% ").concat(100*f.origin,"% 0"),u.animationValues?s.opacity=u===this?null!=(n=null!=(i=h.opacity)?i:this.latestValues.opacity)?n:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:s.opacity=u===this?null!=(o=h.opacity)?o:"":null!=(a=h.opacityExit)?a:0,U)if(void 0!==h[m]){var g=U[m],y=g.correct,v=g.applyTo,b=y(h[m],u);
968if(v)for(var _=v.length,x=0;x<_;x++)s[v[x]]=b;else s[m]=b}return this.options.layoutId&&(s.pointerEvents=u===this?ez(e.pointerEvents)||"":"none"),s},a.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},a.prototype.resetTree=function(){this.root.nodes.forEach(function(e){var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(nN),this.root.sharedNodes.clear()},a}function nF(e){e.updateLayout()}function nj(e){var t,r,i,n,o=null!=(r=null==(t=e.resumeFrom)?void 0:t.snapshot)?r:e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){var a=e.layout,s=a.actual,l=a.measured;"size"===e.options.animationType?iO(function(e){var t=o.isShared?o.measured[e]:o.layout[e],r=iy(t);t.min=s[e].min,t.max=t.min+r}):"position"===e.options.animationType&&iO(function(e){var t=o.isShared?o.measured[e]:o.layout[e],r=iy(s[e]);t.max=t.min+r});var u=iI();i_(u,s,o.layout);var c=iI();o.isShared?i_(c,e.applyTransform(l,!0),o.measured):i_(c,s,o.layout);var h=!nM(u),d=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var p=e.relativeParent,f=p.snapshot,m=p.layout;if(f&&m){var g=ik();iw(g,o.layout,f.layout);var y=ik();iw(y,s,m.actual),nk(g,y)||(d=!0)}}e.notifyListeners("didUpdate",{layout:s,snapshot:o,delta:c,layoutDelta:u,hasLayoutChanged:h,hasRelativeTargetChanged:d})}else e.isLead()&&(null==(n=(i=e.options).onExitComplete)||n.call(i));e.options.transition=void 0}function nz(e){e.clearSnapshot()}function nN(e){e.clearMeasurements()}function nG(e){var t=e.options.visualElement;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function nV(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function nU(e){e.resolveTargetDelta()}function nH(e){e.calcProjection()}function nW(e){e.resetRotation()}function nq(e){e.removeLeadSnapshot()}function nZ(e,t,r){e.translate=tx(t.translate,0,r),e.scale=tx(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function n$(e,t,r,i){e.min=tx(t.min,r.min,i),e.max=tx(t.max,r.max,i)}function nK(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var nX={duration:.45,ease:[.4,0,.1,1]};function nY(e,t){for(var r=e.root,i=e.path.length-1;i>=0;i--)if(e.path[i].instance){r=e.path[i];break}var n=(r&&r!==e.root?r.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));n&&e.mount(n,!0)}function nQ(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function nJ(e){nQ(e.x),nQ(e.y)}var n0=nB({attachResizeListener:function(e,t){return eH(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),n1={current:void 0},n2=nB({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!n1.current){var e=new n0(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),n1.current=e}return n1.current},resetTransform:function(e,t){e.style.transform=null!=t?t:"none"},checkIsScrollRoot:function(e){return"fixed"===window.getComputedStyle(e).position}}),n3=(0,u.Cl)((0,u.Cl)((0,u.Cl)((0,u.Cl)({},ia),tl),iK),{measureLayout:function(e){var t=(0,u.zs)(th(),2),r=t[0],i=t[1],n=(0,c.useContext)(j);return c.createElement(nd,(0,u.Cl)({},e,{layoutGroup:n,switchLayoutGroup:(0,c.useContext)(z),isPresent:r,safeToRemove:i}))}}),n5=function(e){function t(t,r){var i,n,o,a,s,l,h;return void 0===r&&(r={}),n=(i=e(t,r)).preloadedFeatures,o=i.createVisualElement,a=i.projectionNodeConstructor,s=i.useRender,l=i.useVisualState,h=i.Component,n&&function(e){for(var t in e)null!==e[t]&&("projectionNodeConstructor"===t?f.projectionNodeConstructor=e[t]:f[t].Component=e[t])}(n),(0,c.forwardRef)(function(e,t){var r,i,p,m,P,M,k,D,G,V,U,H,W,q,Z,$,K,X,Y,Q,J,ee,et,er,ei,en,eo,ea=(i=e.layoutId,(p=null==(r=(0,c.useContext)(j))?void 0:r.id)&&void 0!==i?p+"-"+i:i);e=(0,u.Cl)((0,u.Cl)({},e),{layoutId:ea});var es=(0,c.useContext)(_),el=null,eu=(P=(m=function(e,t){if(O(e)){var r=e.initial,i=e.animate;return{initial:!1===r||I(r)?r:void 0,animate:I(i)?i:void 0}}return!1!==e.inherit?t:{}}(e,(0,c.useContext)(x))).initial,M=m.animate,(0,c.useMemo)(function(){return{initial:P,animate:M}},[R(P),R(M)])),ec=es.isStatic?void 0:L(function(){if(B.hasEverUpdated)return F++}),eh=l(e,es.isStatic);return!es.isStatic&&w&&(k=(0,u.Cl)((0,u.Cl)({},es),e),D=o,G=(0,c.useContext)(y),V=(0,c.useContext)(x).visualElement,U=(0,c.useContext)(A),C||function(){if(C=!0,w)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return T.current=e.matches};e.addListener(t),t()}else T.current=!1}(),H=(0,u.zs)((0,c.useState)(T.current),1)[0],q="never"!==(W=(0,c.useContext)(_).reducedMotion)&&("always"===W||H),Z=(0,c.useRef)(void 0),D||(D=G.renderer),!Z.current&&D&&(Z.current=D(h,{visualState:eh,parent:V,props:k,presenceId:null==U?void 0:U.id,blockInitialAnimation:(null==U?void 0:U.initial)===!1,shouldReduceMotion:q})),$=Z.current,S(function(){null==$||$.syncRender()}),(0,c.useEffect)(function(){var e;null==(e=null==$?void 0:$.animationState)||e.animateChanges()}),S(function(){return function(){return null==$?void 0:$.notifyUnmount()}},[]),eu.visualElement=$,K=e,X=eu.visualElement,Y=a||f.projectionNodeConstructor,J=K.layoutId,ee=K.layout,et=K.drag,er=K.dragConstraints,ei=K.layoutScroll,en=(0,c.useContext)(z),Y&&X&&(null==X||!X.projection)&&(X.projection=new Y(ec,X.getLatestValues(),null==(Q=X.parent)?void 0:Q.projection),X.projection.setOptions({layoutId:J,layout:ee,alwaysMeasureLayout:!!et||er&&E(er),visualElement:X,scheduleRender:function(){return X.scheduleRender()},animationType:"string"==typeof ee?ee:"both",initialPromotionConfig:en,layoutScroll:ei})),el=function(e,t,r){var i=[],n=(0,c.useContext)(y);if(!t)return null;"production"!==d&&r&&n.strict&&g();for(var o=0;o<b;o++){var a=v[o],s=f[a],l=s.isEnabled,h=s.Component;l(e)&&h&&i.push(c.createElement(h,(0,u.Cl)({key:a},e,{visualElement:t})))}return i}(e,eu.visualElement,n)),c.createElement(N,{visualElement:eu.visualElement,props:(0,u.Cl)((0,u.Cl)({},es),e)},el,c.createElement(x.Provider,{value:eu},s(h,e,ec,(eo=eu.visualElement,(0,c.useCallback)(function(e){var r;e&&(null==(r=eh.mount)||r.call(eh,e)),eo&&(e?eo.mount(e):eo.unmount()),t&&("function"==typeof t?t(e):E(t)&&(t.current=e))},[eo])),eh,es.isStatic,eu.visualElement)))})}if("u"<typeof Proxy)return t;var r=new Map;return new Proxy(t,{get:function(e,i){return r.has(i)||r.set(i,t(i)),r.get(i)}})}(function(e,t){var r,i,n;return r=t.forwardMotionProps,i=V(e)?eV:eU,(0,u.Cl)((0,u.Cl)({},i),{preloadedFeatures:n3,useRender:(void 0===(n=void 0!==r&&r)&&(n=!1),function(e,t,r,i,o,a){var s=o.latestValues,l=(V(e)?function(e,t){var r=(0,c.useMemo)(function(){var r=eP();return eE(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),(0,u.Cl)((0,u.Cl)({},r.attrs),{style:(0,u.Cl)({},r.style)}
968)},[t]);if(e.style){var i={};e_(i,e.style,e),r.style=(0,u.Cl)((0,u.Cl)({},i),r.style)}return r}:function(e,t,r){var i,n,o={},a=(e_(i={},e.style||{},e),Object.assign(i,(n=e.transformTemplate,(0,c.useMemo)(function(){var e=eb();ev(e,t,{enableHardwareAcceleration:!r},n);var i=e.vars,o=e.style;return(0,u.Cl)((0,u.Cl)({},i),o)},[t]))),e.transformValues&&(i=e.transformValues(i)),i);return e.drag&&!1!==e.dragListener&&(o.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),o.style=a,o})(t,s,a),h=function(e,t,r){var i={};for(var n in e)(ew(n)||!0===r&&eA(n)||!t&&!eA(n)||e.draggable&&n.startsWith("onDrag"))&&(i[n]=e[n]);return i}(t,"string"==typeof e,n),d=(0,u.Cl)((0,u.Cl)((0,u.Cl)({},h),l),{ref:i});return r&&(d["data-projection-id"]=r),(0,c.createElement)(e,d)}),createVisualElement:nl,projectionNodeConstructor:n2,Component:e})})},65280(e,t,r){"use strict";r.d(t,{Ay:()=>n});var i=r(6364);let n=i.default||i},14547(e,t,r){"use strict";r.r(t),r.d(t,{DefaultHandler:()=>$.DomHandler,DomHandler:()=>$.DomHandler,DomUtils:()=>x,ElementType:()=>K,Parser:()=>Z,QuoteType:()=>v,Tokenizer:()=>O,createDocumentStream:()=>e2,getFeed:()=>eM,parseDocument:()=>e1,parseFeed:()=>e5});var i,n,o,a,s,l,u,c,h,d,p,f,m,g,y,v,b,_,x={};r.r(x),r.d(x,{DocumentPosition:()=>_,append:()=>eH,appendChild:()=>eU,compareDocumentPosition:()=>ez,existsOne:()=>function e(t,r){return(Array.isArray(r)?r:[r]).some(r=>(0,X.dz)(r)&&t(r)||(0,X.Go)(r)&&e(t,r.children))},filter:()=>Y,find:()=>Q,findAll:()=>ee,findOne:()=>J,getAttributeValue:()=>eX,getChildren:()=>eZ,getElementById:()=>es,getElements:()=>ea,getElementsByClassName:()=>eu,getElementsByTagName:()=>el,getElementsByTagType:()=>ec,getFeed:()=>eM,getInnerHTML:()=>eP,getName:()=>eQ,getOuterHTML:()=>eE,getParent:()=>e$,getSiblings:()=>eK,getText:()=>function e(t){return Array.isArray(t)?t.map(e).join(""):(0,X.dz)(t)?"br"===t.name?`
969`:e(t.children):(0,X.yf)(t)?e(t.children):(0,X.KH)(t)?t.data:""},hasAttrib:()=>eY,innerText:()=>function e(t){return Array.isArray(t)?t.map(e).join(""):(0,X.Go)(t)&&(t.type===K.ElementType.Tag||(0,X.yf)(t))?e(t.children):(0,X.KH)(t)?t.data:""},nextElementSibling:()=>eJ,prepend:()=>eq,prependChild:()=>eW,prevElementSibling:()=>e0,removeElement:()=>eG,removeSubsets:()=>ej,replaceElement:()=>eV,testElement:()=>eo,textContent:()=>eI,uniqueSort:()=>eN});let A=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function w(e){return e>=p.ZERO&&e<=p.NINE}(i=d||(d={}))[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.FLAG13=8192]="FLAG13",i[i.BRANCH_LENGTH=8064]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE",(n=p||(p={}))[n.NUM=35]="NUM",n[n.SEMI=59]="SEMI",n[n.EQUALS=61]="EQUALS",n[n.ZERO=48]="ZERO",n[n.NINE=57]="NINE",n[n.LOWER_A=97]="LOWER_A",n[n.LOWER_F=102]="LOWER_F",n[n.LOWER_X=120]="LOWER_X",n[n.LOWER_Z=122]="LOWER_Z",n[n.UPPER_A=65]="UPPER_A",n[n.UPPER_F=70]="UPPER_F",n[n.UPPER_Z=90]="UPPER_Z",(o=f||(f={}))[o.EntityStart=0]="EntityStart",o[o.NumericStart=1]="NumericStart",o[o.NumericDecimal=2]="NumericDecimal",o[o.NumericHex=3]="NumericHex",o[o.NamedEntity=4]="NamedEntity",(a=m||(m={}))[a.Legacy=0]="Legacy",a[a.Strict=1]="Strict",a[a.Attribute=2]="Attribute";class S{decodeTree;emitCodePoint;errors;constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r}state=f.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=m.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=f.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case f.EntityStart:if(e.charCodeAt(t)===p.NUM)return this.state=f.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=f.NamedEntity,this.stateNamedEntity(e,t);case f.NumericStart:return this.stateNumericStart(e,t);case f.NumericDecimal:return this.stateNumericDecimal(e,t);case f.NumericHex:return this.stateNumericHex(e,t);case f.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===p.LOWER_X?(this.state=f.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=f.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){var r;let i=e.charCodeAt(t);if(!w(i)&&(!((r=i)>=p.UPPER_A)||!(r<=p.UPPER_F))&&(!(r>=p.LOWER_A)||!(r<=p.LOWER_F)))return this.emitNumericEntity(i,3);{let e=i<=p.NINE?i-p.ZERO:(32|i)-p.LOWER_A+10;this.result=16*this.result+e,this.consumed++,t++}}return -1}stateNumericDecimal(e,t){for(;t<e.length;){let r=e.charCodeAt(t);if(!w(r))return this.emitNumericEntity(r,2);this.result=10*this.result+(r-p.ZERO),this.consumed++,t++}return -1}emitNumericEntity(e,t){var r;if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===p.SEMI)this.consumed+=1;else if(this.decodeMode===m.Strict)return 0;return this.emitCodePoint((r=this.result)>=55296&&r<=57343||r>1114111?65533:A.get(r)??r,this.consumed),this.errors&&(e!==p.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:r}=this,i=r[this.treeIndex],n=(i&d.VALUE_LENGTH)>>14;for(;t<e.length;){if(0===n&&(i&d.FLAG13)!=0){let o=(i&d.BRANCH_LENGTH)>>7;if(0===this.runConsumed){let r=i&d.JUMP_TABLE;if(e.charCodeAt(t)!==r)return 0===this.result?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed<o;){if(t>=e.length)return -1;let i=this.runConsumed-1,n=r[this.treeIndex+1+(i>>1)],o=i%2==0?255&n:n>>8&255;if(e.charCodeAt(t)!==o)return this.runConsumed=0,0===this.result?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(o>>1),n=((i=r[this.treeIndex])&d.VALUE_LENGTH)>>14}if(t>=e.length)break;let o=e.charCodeAt(t);if(o===p.SEMI&&0!==n&&(i&d.FLAG13)!=0)return this.emitNamedEntityData(this.treeIndex,n,this.consumed+this.excess);if(this.treeIndex=function(e,t,r,i){let n=(t&d.BRANCH_LENGTH)>>7,o=t&d.JUMP_TABLE;if(0===n)return 0!==o&&i===o?r:-1;if(o){let t=i-o;return t<0||t>=n?-1:e[r+t]-1}let a=n+1>>1,s=0,l=n-1;for(;s<=l;){let t=s+l>>>1,n=e[r+(t>>1)]>>(1&t)*8&255;if(n<i)s=t+1;else{if(!(n>i))return e[r+a+t];l=t-1}}return -1}(r,i,this.treeIndex+Math.max(1,n),o),this.treeIndex<0)return 0===this.result||this.decodeMode===m.Attribute&&(0===n||function(e){var t;return e===p.EQUALS||(t=e)>=p.UPPER_A&&t<=p.UPPER_Z||t>=p.LOWER_A&&t<=p.LOWER_Z||w(t)}(o))?0:this.emitNotTerminatedNamedEntity();if(0!=(n=((i=r[this.treeIndex])&d.VALUE_LENGTH)>>14)){if(o===p.SEMI)return this.emitNamedEntityData(this.treeIndex,n,this.consumed+this.excess);this.decodeMode!==m.Strict&&(i&d.FLAG13)==0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return -1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:t}=this,r=(t[e]&d.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,r,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){let{decodeTree:i}=this;return this.emitCodePoint(1===t?i[e]&~(d.VALUE_LENGTH|d.FLAG13):i[e+1],r),3===t&&this.emitCodePoint(i[e+2],r),r}end(){switch(this.state){case f.NamedEntity:return 0!==this.result&&(this.decodeMode!==m.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case f.NumericDecimal:return this.emitNumericEntity(0,2);case f.NumericHex:return this.emitNumericEntity(0,3);case f.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case f.EntityStart:return 0}}}function T(e){let t=atob(e),r=-2&t.length,i=new Uint16Array(r/2);for(let e=0,n=0;e<r;e+=2){let r=t.charCodeAt(e),o=t.charCodeAt(e+1);i[n++]=r|o<<8}return i}let C=T("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"),E=T("
vendor: 5,274 bytes, line 969
969QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQ
vendor: 19,711 bytes, line 969
969ByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltb
vendor: 7,217 bytes, line 969
969wCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg")
969;function P(e){return e===g.Space||e===g.NewLine||e===g.Tab||e===g.FormFeed||e===g.CarriageReturn}function I(e){return e===g.Slash||e===g.Gt||P(e)}(s=g||(g={}))[s.Tab=9]="Tab",s[s.NewLine=10]="NewLine",s[s.FormFeed=12]="FormFeed",
969s[s.CarriageReturn=13]="CarriageReturn",s[s.Space=32]="Space",s[s.ExclamationMark=33]="ExclamationMark",s[s.Number=35]="Number",s[s.Amp=38]="Amp",s[s.SingleQuote=39]="SingleQuote",s[s.DoubleQuote=34]="DoubleQuote",s[s.Dash=45]="Dash",s[s.Slash=47]="Slash",s[s.Zero=48]="Zero",s[s.Nine=57]="Nine",s[s.Semi=59]="Semi",s[s.Lt=60]="Lt",s[s.Eq=61]="Eq",s[s.Gt=62]="Gt",s[s.Questionmark=63]="Questionmark",s[s.UpperA=65]="UpperA",s[s.LowerA=97]="LowerA",s[s.UpperF=70]="UpperF",s[s.LowerF=102]="LowerF",s[s.UpperZ=90]="UpperZ",s[s.LowerZ=122]="LowerZ",s[s.LowerX=120]="LowerX",s[s.OpeningSquareBracket=91]="OpeningSquareBracket",(l=y||(y={}))[l.Text=1]="Text",l[l.BeforeTagName=2]="BeforeTagName",l[l.InTagName=3]="InTagName",l[l.InSelfClosingTag=4]="InSelfClosingTag",l[l.BeforeClosingTagName=5]="BeforeClosingTagName",l[l.InClosingTagName=6]="InClosingTagName",l[l.AfterClosingTagName=7]="AfterClosingTagName",l[l.BeforeAttributeName=8]="BeforeAttributeName",l[l.InAttributeName=9]="InAttributeName",l[l.AfterAttributeName=10]="AfterAttributeName",l[l.BeforeAttributeValue=11]="BeforeAttributeValue",l[l.InAttributeValueDq=12]="InAttributeValueDq",l[l.InAttributeValueSq=13]="InAttributeValueSq",l[l.InAttributeValueNq=14]="InAttributeValueNq",l[l.BeforeDeclaration=15]="BeforeDeclaration",l[l.InDeclaration=16]="InDeclaration",l[l.InProcessingInstruction=17]="InProcessingInstruction",l[l.BeforeComment=18]="BeforeComment",l[l.CDATASequence=19]="CDATASequence",l[l.DeclarationSequence=20]="DeclarationSequence",l[l.InSpecialComment=21]="InSpecialComment",l[l.InCommentLike=22]="InCommentLike",l[l.SpecialStartSequence=23]="SpecialStartSequence",l[l.InSpecialTag=24]="InSpecialTag",l[l.InPlainText=25]="InPlainText",l[l.InEntity=26]="InEntity",(u=v||(v={}))[u.NoValue=0]="NoValue",u[u.Unquoted=1]="Unquoted",u[u.Single=2]="Single",u[u.Double=3]="Double";let M={Empty:new Uint8Array(0),Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,33,62]),Doctype:new Uint8Array([100,111,99,116,121,112,101]),IframeEnd:new Uint8Array([60,47,105,102,114,97,109,101]),NoembedEnd:new Uint8Array([60,47,110,111,101,109,98,101,100]),NoframesEnd:new Uint8Array([60,47,110,111,102,114,97,109,101,115]),Plaintext:new Uint8Array([60,47,112,108,97,105,110,116,101,120,116]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])},k=new Map([[M.IframeEnd[2],M.IframeEnd],[M.NoembedEnd[2],M.NoembedEnd],[M.Plaintext[2],M.Plaintext],[M.ScriptEnd[2],M.ScriptEnd],[M.TitleEnd[2],M.TitleEnd],[M.XmpEnd[2],M.XmpEnd]]);class O{cbs;state=y.Text;buffer="";sectionStart=0;index=0;entityStart=0;baseState=y.Text;isSpecial=!1;running=!0;offset=0;xmlMode;decodeEntities;recognizeSelfClosing;entityDecoder;constructor({xmlMode:e=!1,decodeEntities:t=!0,recognizeSelfClosing:r=e},i){this.cbs=i,this.xmlMode=e,this.decodeEntities=t,this.recognizeSelfClosing=r,this.entityDecoder=new S(e?C:E,(e,t)=>this.emitCodePoint(e,t))}reset(){this.state=y.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=y.Text,this.isSpecial=!1,this.currentSequence=M.Empty,this.sequenceIndex=0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(e){e===g.Lt||!this.decodeEntities&&this.fastForwardTo(g.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=y.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===g.Amp&&this.startEntity()}currentSequence=M.Empty;sequenceIndex=0;enterTagBody(){this.currentSequence===M.Plaintext?(this.currentSequence=M.Empty,this.state=y.InPlainText):this.isSpecial?(this.state=y.InSpecialTag,this.sequenceIndex=0):this.state=y.Text}stateSpecialStartSequence(e){let t=32|e;if(this.sequenceIndex<this.currentSequence.length){if(t===this.currentSequence[this.sequenceIndex])return void this.sequenceIndex++;
vendor: 16,398 bytes, line 969
969if(3===this.sequenceIndex){if(this.currentSequence===M.ScriptEnd&&t===M.StyleEnd[3]){this.currentSequence=M.StyleEnd,this.sequenceIndex=4;return}if(this.currentSequence===M.TitleEnd&&t===M.TextareaEnd[3]){this.currentSequence=M.TextareaEnd,this.sequenceIndex=4;return}}else if(4===this.sequenceIndex&&this.currentSequence===M.NoembedEnd&&t===M.NoframesEnd[4]){this.currentSequence=M.NoframesEnd,this.sequenceIndex=5;return}}else if(I(e)){this.sequenceIndex=0,this.state=y.InTagName,this.stateInTagName(e);return}this.isSpecial=!1,this.currentSequence=M.Empty,this.sequenceIndex=0,this.state=y.InTagName,this.stateInTagName(e)}stateCDATASequence(e){e===M.Cdata[this.sequenceIndex]?++this.sequenceIndex===M.Cdata.length&&(this.state=y.InCommentLike,this.currentSequence=M.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.xmlMode?(this.state=y.InDeclaration,this.stateInDeclaration(e)):(this.state=y.InSpecialComment,this.stateInSpecialComment(e)))}fastForwardTo(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1}emitComment(e){this.cbs.oncomment(this.sectionStart,this.index,e),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=y.Text}stateInCommentLike(e){!this.xmlMode&&this.currentSequence===M.CommentEnd&&this.sequenceIndex<=1&&this.index===this.sectionStart+this.sequenceIndex&&e===g.Gt?this.emitComment(this.sequenceIndex):this.currentSequence===M.CommentEnd&&2===this.sequenceIndex&&e===g.Gt?this.emitComment(2):this.currentSequence===M.CommentEnd&&this.sequenceIndex===this.currentSequence.length-1&&e!==g.Gt?this.sequenceIndex=Number(e===g.Dash):e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===M.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,3),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=y.Text):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(e){return this.xmlMode?!I(e):e>=g.LowerA&&e<=g.LowerZ||e>=g.UpperA&&e<=g.UpperZ}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(I(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.isSpecial=!1,this.sectionStart=t+2,this.stateInClosingTagName(e);return}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===M.TitleEnd||this.currentSequence===M.TextareaEnd?this.decodeEntities&&e===g.Amp&&this.startEntity():this.fastForwardTo(g.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===g.Lt)}stateBeforeTagName(e){if(e===g.ExclamationMark)this.state=y.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===g.Questionmark)this.xmlMode?(this.state=y.InProcessingInstruction,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.state=y.InSpecialComment,this.sectionStart=this.index);else if(this.isTagStartChar(e)){this.sectionStart=this.index;let t=this.xmlMode||this.cbs.isInForeignContext?.()?void 0:k.get(32|e);void 0===t?this.state=y.InTagName:(this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=3,this.state=y.SpecialStartSequence)}else e===g.Slash?this.state=y.BeforeClosingTagName:(this.state=y.Text,this.stateText(e))}stateInTagName(e){I(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=y.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){P(e)?this.xmlMode||(this.state=y.InSpecialComment,this.sectionStart=this.index):e===g.Gt?(this.state=y.Text,this.xmlMode||(this.sectionStart=this.index+1)):(this.state=this.isTagStartChar(e)?y.InClosingTagName:y.InSpecialComment,this.sectionStart=this.index)}stateInClosingTagName(e){I(e)&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=y.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===g.Gt||this.fastForwardTo(g.Gt))&&(this.state=y.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===g.Gt?(this.cbs.onopentagend(this.index),this.enterTagBody(),this.sectionStart=this.index+1):e===g.Slash?this.state=y.InSelfClosingTag:P(e)||(this.state=y.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){if(e===g.Gt){if(this.cbs.onselfclosingtag(this.index),this.sectionStart=this.index+1,!this.recognizeSelfClosing)return void this.enterTagBody();this.state=y.Text,this.isSpecial=!1,this.currentSequence=M.Empty}else P(e)||(this.state=y.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===g.Eq||I(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=y.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===g.Eq?this.state=y.BeforeAttributeValue:e===g.Slash||e===g.Gt?(this.cbs.onattribend(v.NoValue,this.sectionStart),this.sectionStart=-1,this.state=y.BeforeAttributeName,this.stateBeforeAttributeName(e)):P(e)||(this.cbs.onattribend(v.NoValue,this.sectionStart),this.state=y.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===g.DoubleQuote?(this.state=y.InAttributeValueDq,this.sectionStart=this.index+1):e===g.SingleQuote?(this.state=y.InAttributeValueSq,this.sectionStart=this.index+1):P(e)||(this.sectionStart=this.index,this.state=y.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===g.DoubleQuote?v.Double:v.Single,this.index+1),this.state=y.BeforeAttributeName):this.decodeEntities&&e===g.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,g.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,g.SingleQuote)}stateInAttributeValueNoQuotes(e){P(e)||e===g.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(v.Unquoted,this.index),this.state=y.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===g.Amp&&this.startEntity()}stateBeforeDeclaration(e){e===g.OpeningSquareBracket?(this.state=y.CDATASequence,this.sequenceIndex=0):this.xmlMode?this.state=e===g.Dash?y.BeforeComment:y.InDeclaration:(32|e)===M.Doctype[0]?(this.state=y.DeclarationSequence,this.currentSequence=M.Doctype,this.sequenceIndex=1):e===g.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=y.Text,this.sectionStart=this.index+1):e===g.Dash?this.state=y.BeforeComment:this.state=y.InSpecialComment}stateDeclarationSequence(e){this.sequenceIndex===this.currentSequence.length?(this.state=y.InDeclaration,this.stateInDeclaration(e)):(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:e===g.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=y.Text,this.sectionStart=this.index+1):this.state=y.InSpecialComment}stateInDeclaration(e){(e===g.Gt||this.fastForwardTo(g.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=y.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){e===g.Questionmark?this.sequenceIndex=1:e===g.Gt&&1===this.sequenceIndex?(this.cbs.onprocessinginstruction(this.sectionStart,this.index-1),this.sequenceIndex=0,this.state=y.Text,this.sectionStart=this.index+1):this.sequenceIndex=Number(this.fastForwardTo(g.Questionmark))}stateBeforeComment(e){e===g.Dash?(this.state=y.InCommentLike,this.currentSequence=M.CommentEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):this.xmlMode?this.state=y.InDeclaration:e===g.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=y.Text,this.sectionStart=this.index+1):this.state=y.InSpecialComment}stateInSpecialComment(e){(e===g.Gt||this.fastForwardTo(g.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=y.Text,this.sectionStart=this.index+1)}startEntity(){this.baseState=this.state,this.state=y.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?m.Strict:this.baseState===y.Text||this.baseState===y.InSpecialTag?m.Legacy:m.Attribute)}stateInEntity(){let e=this.index-this.offset,t=this.entityDecoder.write(this.buffer,e);if(t>=0)this.state=this.baseState,0===t&&(this.index-=1);else{if(e<this.buffer.length&&this.buffer.charCodeAt(e)===g.Amp){this.state=this.baseState,this.index-=1;return}this.index=this.offset+this.buffer.length-1}}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===y.Text||this.state===y.InPlainText||this.state===y.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===y.InAttributeValueDq||this.state===y.InAttributeValueSq||this.state===y.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){let e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case y.Text:this.stateText(e);break;case y.InPlainText:this.index=this.buffer.length+this.offset-1;break;case y.SpecialStartSequence:this.stateSpecialStartSequence(e);break;case y.InSpecialTag:this.stateInSpecialTag(e);break;case y.CDATASequence:this.stateCDATASequence(e);break;case y.DeclarationSequence:this.stateDeclarationSequence(e);break;case y.InAttributeValueDq:this.stateInAttributeValueDoubleQuotes(e);break;case y.InAttributeName:this.stateInAttributeName(e);break;case y.InCommentLike:this.stateInCommentLike(e);break;case y.InSpecialComment:this.stateInSpecialComment(e);break;case y.BeforeAttributeName:this.stateBeforeAttributeName(e);break;case y.InTagName:this.stateInTagName(e);break;case y.InClosingTagName:this.stateInClosingTagName(e);break;case y.BeforeTagName:this.stateBeforeTagName(e);break;case y.AfterAttributeName:this.stateAfterAttributeName(e);break;case y.InAttributeValueSq:this.stateInAttributeValueSingleQuotes(e);break;case y.BeforeAttributeValue:this.stateBeforeAttributeValue(e);break;case y.BeforeClosingTagName:this.stateBeforeClosingTagName(e);break;case y.AfterClosingTagName:this.stateAfterClosingTagName(e);break;case y.InAttributeValueNq:this.stateInAttributeValueNoQuotes(e);break;case y.InSelfClosingTag:this.stateInSelfClosingTag(e);break;case y.InDeclaration:this.stateInDeclaration(e);break;case y.BeforeDeclaration:this.stateBeforeDeclaration(e);break;case y.BeforeComment:this.stateBeforeComment(e);break;case y.InProcessingInstruction:this.stateInProcessingInstruction(e);break;case y.InEntity:this.stateInEntity()}this.index++}this.cleanup()}finish(){this.state===y.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingCommentLikeData(e){if(this.state!==y.InCommentLike)return!1;if(this.currentSequence===M.CdataEnd)if(this.xmlMode)this.sectionStart<e&&this.cbs.oncdata(this.sectionStart,e,0);else{let t=this.sectionStart-M.Cdata.length-1;this.cbs.oncomment(t,e,0)}else{let t=this.xmlMode?0:Math.min(this.sequenceIndex,M.CommentEnd.length-1);this.cbs.oncomment(this.sectionStart,e,t)}return!0}handleTrailingMarkupDeclaration(e){if(this.xmlMode)switch(this.state){case y.InSpecialComment:case y.BeforeComment:case y.CDATASequence:case y.DeclarationSequence:case y.InDeclaration:return this.cbs.ontext(this.sectionStart,e),!0;default:return!1}switch(this.state){case y.BeforeDeclaration:case y.InSpecialComment:case y.BeforeComment:case y.CDATASequence:return this.cbs.oncomment(this.sectionStart,e,0),!0;case y.DeclarationSequence:return this.sequenceIndex!==M.Doctype.length&&this.cbs.oncomment(this.sectionStart,e,0),!0;case y.InDeclaration:return!0;default:return!1}}handleTrailingData(){let e=this.buffer.length+this.offset;if(!(this.handleTrailingCommentLikeData(e)||this.handleTrailingMarkupDeclaration(e))&&!(this.sectionStart>=e))switch(this.state){case y.InTagName:case y.BeforeAttributeName:case y.BeforeAttributeValue:case y.AfterAttributeName:case y.InAttributeName:case y.InAttributeValueSq:case y.InAttributeValueDq:case y.InAttributeValueNq:case y.InClosingTagName:break;default:this.cbs.ontext(this.sectionStart,e)}}emitCodePoint(e,t){this.baseState!==y.Text&&this.baseState!==y.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+t,this.index=this.sectionStart-1,this.cbs.onattribentity(e)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+t,this.index=this.sectionStart-1,this.cbs.ontextentity(e,this.sectionStart))}}let{fromCodePoint:D}=String,R=new Set(["input","option","optgroup","select","button","datalist","textarea"]),L=new Set(["p"]),B=new Set(["h1","h2","h3","h4","h5","h6","p"]),F=new Set(["thead","tbody"]),j=new Set(["dd","dt"]),z=new Set(["rt","rp"]),N=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["a",new Set(["a"])],["li",new Set(["li"])],["p",L],["h1",B],["h2",B],["h3",B],["h4",B],["h5",B],["h6",B],["select",R],["input",R],["output",R],["button",R],["datalist",R],["textarea",R],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",j],["dt",j],["address",L],["article",L],["aside",L],["blockquote",L],["details",L],["div",L],["dl",L],["fieldset",L],["figcaption",L],["figure",L],["footer",L],["form",L],["header",L],["hr",L],["main",L],["nav",L],["ol",L],["pre",L],["section",L],["table",L],["ul",L],["rt",z],["rp",z],["tbody",F],["tfoot",F]]),G="doctype",V=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),U=new Set(["math","svg"]),H=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),W=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);(c=b||(b={}))[c.None=0]="None",c[c.Svg=1]="Svg",c[c.MathML=2]="MathML";let q=/\s|\//;class Z{options;startIndex=0;endIndex=0;openTagStart=0;tagname="";attribname="";attribvalue="";attribs=null;stack=[];foreignContext;cbs;lowerCaseTagNames;lowerCaseAttributeNames;recognizeSelfClosing;htmlMode;tokenizer;buffers=[];bufferOffset=0;writeIndex=0;ended=!1;constructor(e,t={}){this.options=t,this.cbs=e??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=t.lowerCaseTags??this.htmlMode,this.lowerCaseAttributeNames=t.lowerCaseAttributeNames??this.htmlMode,this.recognizeSelfClosing=t.recognizeSelfClosing??!this.htmlMode,this.tokenizer=new(t.Tokenizer??O)(this.options,this),this.foreignContext=[b.None],this.cbs.onparserinit?.(this)}ontext(e,t){let r=this.getSlice(e,t);this.endIndex=t-1,this.cbs.ontext?.(r),this.startIndex=t}ontextentity(e,t){this.endIndex=t-1,this.cbs.ontext?.(D(e)),this.startIndex=t}isInForeignContext(){return this.foreignContext[0]!==b.None}isVoidElement(e){return this.htmlMode&&V.has(e)}
969readTagName(e,t){let r=this.lowerCaseTagNames?this.getSlice(e,t).toLowerCase():this.getSlice(e,t);if(!(this.lowerCaseTagNames&&this.htmlMode))return r;if(this.foreignContext[0]===b.Svg)return W.get(r)??r;if(this.foreignContext.length>1){let e=W.get(r);if(void 0!==e&&this.stack.includes(e))return e}return this.isInForeignContext()?r:"image"===r?"img":r}onopentagname(e,t){this.endIndex=t,this.emitOpenTag(this.readTagName(e,t))}emitOpenTag(e){if(this.openTagStart=this.startIndex,this.tagname=e,this.htmlMode&&"form"===e&&this.stack.includes("form")){this.tagname="";return}let t=this.htmlMode&&N.get(e);if(t)for(;this.stack.length>0&&t.has(this.stack[0]);)this.popElement(!0);!this.isVoidElement(e)&&(this.stack.unshift(e),this.htmlMode&&("svg"===e?this.foreignContext.unshift(b.Svg):"math"===e?this.foreignContext.unshift(b.MathML):H.has(e)&&this.foreignContext.unshift(b.None))),this.cbs.onopentagname?.(e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){this.startIndex=this.openTagStart,this.attribs&&(this.cbs.onopentag?.(this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){this.endIndex=t;let r=this.readTagName(e,t);if(this.isVoidElement(r))this.htmlMode&&"br"===r&&(this.cbs.onopentagname?.("br"),this.cbs.onopentag?.("br",{},!0),this.cbs.onclosetag?.("br",!1));else{let e=this.stack.indexOf(r);if(-1!==e){for(let t=0;t<e;t++)this.popElement(!0);this.popElement(!1)}else this.htmlMode&&"p"===r&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.recognizeSelfClosing||this.isInForeignContext()?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}popElement(e){let t=this.stack.shift();this.htmlMode&&(U.has(t)||H.has(t))&&this.foreignContext.shift(),this.cbs.onclosetag?.(t,e)}closeCurrentTag(e){let t=this.tagname;this.endOpenTag(e),this.stack[0]===t&&this.popElement(!e)}onattribname(e,t){this.startIndex=e;let r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=D(e)}onattribend(e,t){this.endIndex=t,this.cbs.onattribute?.(this.attribname,this.attribvalue,e===v.Double?'"':e===v.Single?"'":e===v.NoValue?void 0:null),this.attribs&&!Object.hasOwn(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(e){let t=e.search(q),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r}ondeclaration(e,t){this.endIndex=t;let r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.htmlMode?this.lowerCaseTagNames?G:r.slice(0,G.length):this.getInstructionName(r);this.cbs.onprocessinginstruction(`!${e}`,`!${r}`)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;let r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.getInstructionName(r);this.cbs.onprocessinginstruction(`?${e}`,`?${r}`)}this.startIndex=t+1}oncomment(e,t,r){this.endIndex=t,this.cbs.oncomment?.(this.getSlice(e,t-r)),this.cbs.oncommentend?.(),this.startIndex=t+1}oncdata(e,t,r){this.endIndex=t;let i=this.getSlice(e,t-r);!this.htmlMode||this.options.recognizeCDATA?(this.cbs.oncdatastart?.(),this.cbs.ontext?.(i),this.cbs.oncdataend?.()):this.isInForeignContext()?this.cbs.ontext?.(i):(this.cbs.oncomment?.(`[CDATA[${i}]]`),this.cbs.oncommentend?.()),this.startIndex=t+1}onend(){if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=0;e<this.stack.length;e++)this.cbs.onclosetag(this.stack[e],!0)}this.cbs.onend?.()}reset(){this.cbs.onreset?.(),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,this.cbs.onparserinit?.(this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(b.None),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){if(e===t)return"";for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){this.ended?this.cbs.onerror?.(Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))}end(e){this.ended?this.cbs.onerror?.(Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}}var $=r(35403),K=r(90227),X=r(67147);function Y(e,t,r=!0,i=1/0){return Q(e,Array.isArray(t)?t:[t],r,i)}function Q(e,t,r,i){let n=[],o=[Array.isArray(t)?t:[t]],a=[0];for(;;){if(a[0]>=o[0].length){if(1===a.length)return n;o.shift(),a.shift();continue}let t=o[0][a[0]++];if(e(t)&&(n.push(t),--i<=0))return n;r&&(0,X.Go)(t)&&t.children.length>0&&(a.unshift(0),o.unshift(t.children))}}function J(e,t,r=!0){for(let i of Array.isArray(t)?t:[t]){if((0,X.dz)(i)&&e(i))return i;if(r&&(0,X.Go)(i)&&i.children.length>0){let t=J(e,i.children,!0);if(t)return t}}return null}function ee(e,t){let r=[],i=[Array.isArray(t)?t:[t]],n=[0];for(;;){if(n[0]>=i[0].length){if(1===i.length)return r;i.shift(),n.shift();continue}let t=i[0][n[0]++];(0,X.dz)(t)&&e(t)&&r.push(t),(0,X.Go)(t)&&t.children.length>0&&(n.unshift(0),i.unshift(t.children))}}let et={tag_name:e=>"function"==typeof e?t=>(0,X.dz)(t)&&e(t.name):"*"===e?X.dz:t=>(0,X.dz)(t)&&t.name===e,tag_type:e=>"function"==typeof e?t=>e(t.type):t=>t.type===e,tag_contains:e=>"function"==typeof e?t=>(0,X.KH)(t)&&e(t.data):t=>(0,X.KH)(t)&&t.data===e};function er(e,t){return"function"==typeof t?r=>(0,X.dz)(r)&&t(r.attribs[e]):r=>(0,X.dz)(r)&&r.attribs[e]===t}function ei(e,t){return r=>e(r)||t(r)}function en(e){let t=Object.keys(e).map(t=>{let r=e[t];return Object.hasOwn(et,t)?et[t](r):er(t,r)});return 0===t.length?null:t.reduce(ei)}function eo(e,t){let r=en(e);return!r||r(t)}function ea(e,t,r,i=1/0){let n=en(e);return n?Y(n,t,r,i):[]}function es(e,t,r=!0){return Array.isArray(t)||(t=[t]),J(er("id",e),t,r)}function el(e,t,r=!0,i=1/0){return Y(et.tag_name(e),t,r,i)}function eu(e,t,r=!0,i=1/0){return Y(er("class",e),t,r,i)}function ec(e,t,r=!0,i=1/0){return Y(et.tag_type(e),t,r,i)}let eh=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),ed="function"==typeof String.prototype.codePointAt?(e,t)=>e.codePointAt(t):(e,t)=>(64512&e.charCodeAt(t))==55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function ep(e){let t,r=0,{length:i}=e;for(let n=0;n<i;n++){let i=e.charCodeAt(n);if(i<128&&((0x500000c4>>>i&1)==0||i>=64||i<32))continue;if(void 0===t?t=e.substring(0,n):r!==n&&(t+=e.substring(r,n)),i<64){t+=eh.get(i),r=n+1;continue}let o=ed(e,n);t+=`&#x${o.toString(16)};`,o!==i&&n++,r=n+1}return void 0===t?e:(r<i&&(t+=e.substr(r)),t)}function ef(e,t){return function(r){let i,n=0,o="";for(;i=e.exec(r);
969)n!==i.index&&(o+=r.substring(n,i.index)),o+=t.get(i[0].charCodeAt(0)),n=i.index+1;return o+r.substring(n)}}let em=ef(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),eg=ef(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),ey=new Map("altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath".split(" ").map(e=>[e.toLowerCase(),e])),ev=new Map("definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" ").map(e=>[e.toLowerCase(),e])),eb=new Set("style script xmp iframe noembed noframes plaintext noscript".split(" ")),e_=new Set("area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(" ")),ex=new Set(["svg","math"]),eA=new Set("mi mo mn ms mtext annotation-xml foreignObject desc title".split(" ")),ew=function(e,t={}){let r="length"in e?e:[e],i=t.xmlMode??!1,n="";for(let e=0;e<r.length;e++)n+=eT(r[e],t,i);return n};function eS(e,t,r){let i="";for(let n=0;n<e.length;n++)i+=eT(e[n],t,r);return i}function eT(e,t,r){switch(e.type){case K.Root:return eS(e.children,t,r);case K.Directive:return`<${e.data}>`;case K.Comment:return`<!--${e.data}-->`;case K.CDATA:return`<![CDATA[${e.children[0].data}]]>`;case K.Script:case K.Style:case K.Tag:return function(e,t,r){"foreign"===r&&(e.name=ey.get(e.name)??e.name,e.parent&&eA.has(e.parent.name)&&(r=!1)),!r&&ex.has(e.name)&&(r="foreign");let{name:i,children:n}=e,o=!r&&e_.has(i),a=`<${i}${function(e,t,r){if(!e)return"";let i=(t.encodeEntities??t.decodeEntities)===!1?eC:r||"utf8"!==t.encodeEntities?ep:em,n="foreign"===r,o=!!(t.emptyAttrs??r),a="";for(let t in e){if(!Object.hasOwn(e,t))continue;let r=e[t],s=n?ev.get(t)??t:t;a+=o||null!=r&&""!==r?` ${s}="${i(null==r?"":String(r))}"`:` ${s}`}return a}(e.attribs,t,r)}`;return 0===n.length&&(r?!1!==t.selfClosingTags:t.selfClosingTags&&o)?a+=r?"/>":" />":(a+=">",n.length>0&&(a+=eS(n,t,r)),o||(a+=`</${i}>`)),a}(e,t,r);case K.Text:{let i=e.data||"";if((t.encodeEntities??t.decodeEntities)!==!1&&!(!r&&e.parent&&eb.has(e.parent.name)))return r||"utf8"!==t.encodeEntities?ep(i):eg(i);return i}}}function eC(e){return e.replaceAll('"',"&quot;")}function eE(e,t){return ew(e,t)}function eP(e,t){return(0,X.Go)(e)?e.children.map(e=>ew(e,t)).join(""):""}function eI(e){return Array.isArray(e)?e.map(eI).join(""):(0,X.Go)(e)&&!(0,X.Cn)(e)?eI(e.children):(0,X.KH)(e)?e.data:""}function eM(e){let t,r,i,n,o,a,s,l=eR(eF,e);return l?"feed"===l.name?(r={type:"atom",items:el("entry",t=l.children).map(e=>{let{children:t}=e,r={media:eD(t)};eB(r,"id","id",t),eB(r,"title","title",t);let i=eR("link",t)?.attribs.href;i&&(r.link=i);let n=eL("summary",t)||eL("content",t);n&&(r.description=n);let o=eL("updated",t);return o&&(r.pubDate=new Date(o)),r})},eB(r,"id","id",t),eB(r,"title","title",t),(i=eR("link",t)?.attribs.href)&&(r.link=i),eB(r,"description","subtitle",t),(n=eL("updated",t))&&(r.updated=new Date(n)),eB(r,"author","email",t,!0),r):(o=eR("channel",l.children)?.children??[],a={type:l.name.substr(0,3),id:"",items:el("item",l.children).map(e=>{let{children:t}=e,r={media:eD(t)};eB(r,"id","guid",t),eB(r,"title","title",t),eB(r,"link","link",t),eB(r,"de
969scription","description",t);let i=eL("pubDate",t)||eL("dc:date",t);return i&&(r.pubDate=new Date(i)),r})},eB(a,"title","title",o),eB(a,"link","link",o),eB(a,"description","description",o),(s=eL("lastBuildDate",o))&&(a.updated=new Date(s)),eB(a,"author","managingEditor",o,!0),a):null}let ek=["url","type","lang"],eO=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function eD(e){return el("media:content",e).map(e=>{let{attribs:t}=e,r={medium:t.medium,isDefault:!!t.isDefault};for(let e of ek)t[e]&&(r[e]=t[e]);for(let e of eO)t[e]&&(r[e]=Number.parseInt(t[e],10));return t.expression&&(r.expression=t.expression),r})}function eR(e,t){return el(e,t,!0,1)[0]}function eL(e,t,r=!1){return eI(el(e,t,r,1)).trim()}function eB(e,t,r,i,n=!1){let o=eL(r,i,n);o&&(e[t]=o)}function eF(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}function ej(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let i=r.parent;i;i=i.parent)if(e.includes(i)){e.splice(t,1);break}}return e}function ez(e,t){let r=[],i=[];if(e===t)return 0;let n=(0,X.Go)(e)?e:e.parent;for(;n;)r.unshift(n),n=n.parent;for(n=(0,X.Go)(t)?t:t.parent;n;)i.unshift(n),n=n.parent;let o=Math.min(r.length,i.length),a=0;for(;a<o&&r[a]===i[a];)a++;if(0===a)return _.DISCONNECTED;let s=r[a-1],l=s.children,u=r[a],c=i[a];return l.indexOf(u)>l.indexOf(c)?s===t?_.FOLLOWING|_.CONTAINED_BY:_.FOLLOWING:s===e?_.PRECEDING|_.CONTAINS:_.PRECEDING}function eN(e){return(e=e.filter((e,t,r)=>!r.includes(e,t+1))).sort((e,t)=>{let r=ez(e,t);return r&_.PRECEDING?-1:r&_.FOLLOWING?1:0}),e}function eG(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);-1!==r&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function eV(e,t){if(t.prev=e.prev,t.prev&&(t.prev.next=t),t.next=e.next,t.next&&(t.next.prev=t),t.parent=e.parent,t.parent){let{children:r}=t.parent,i=r.lastIndexOf(e);-1!==i&&(r[i]=t,e.parent=null)}}function eU(e,t){if(eG(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function eH(e,t){eG(t);let{parent:r}=e,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=r,i){if(i.prev=t,r){let e=r.children;e.splice(e.lastIndexOf(i),0,t)}}else r&&r.children.push(t)}function eW(e,t){if(eG(t),t.parent=e,t.prev=null,1===e.children.unshift(t))t.next=null;else{let r=e.children[1];r.prev=t,t.next=r}}function eq(e,t){eG(t);let{parent:r}=e;if(r){let i=r.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}function eZ(e){return(0,X.Go)(e)?e.children:[]}function e$(e){return e.parent||null}function eK(e){let t=e$(e);if(null!=t)return eZ(t);let r=[e],{prev:i,next:n}=e;for(;null!=i;)r.unshift(i),{prev:i}=i;for(;null!=n;)r.push(n),{next:n}=n;return r}function eX(e,t){let{attribs:r}=e;return r?.[t]}function eY(e,t){let{attribs:r}=e;return null!=r&&Object.hasOwn(r,t)&&null!=r[t]}function eQ(e){return e.name}function eJ(e){let{next:t}=e;for(;null!==t&&!(0,X.dz)(t);)({next:t}=t);return t}function e0(e){let{prev:t}=e;for(;null!==t&&!(0,X.dz)(t);)({prev:t}=t);return t}function e1(e,t){let r=new $.DomHandler(void 0,t);return new Z(r,t).end(e),r.root}function e2(e,t,r){let i=new $.DomHandler(t=>e(t,i.root),t,r);return new Z(i,t)}(h=_||(_={}))[h.DISCONNECTED=1]="DISCONNECTED",h[h.PRECEDING=2]="PRECEDING",h[h.FOLLOWING=4]="FOLLOWING",h[h.CONTAINS=8]="CONTAINS",h[h.CONTAINED_BY=16]="CONTAINED_BY";let e3={xmlMode:!0};function e5(e,t=e3){return eM(e1(e,t).children)}},49495(e,t,r){"use strict";function i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)"__proto__"!==i&&(e[i]=r[i])}return e}r.d(t,{A:()=>n});var n=function e(t,r){function n(e,n,o){if("u">typeof document){"number"==typeof(o=i({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+=";
969 "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+a}}return Object.create({set:n,get:function(e){if("u">typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],i={},n=0;n<r.length;n++){var o=r[n].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(s in i||(i[s]=t.read(a,s)),e===s)break}catch(e){}}return e?i[e]:i}},remove:function(e,t){n(e,"",i({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,i({},this.attributes,t))},withConverter:function(t){return e(i({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},25509(e,t,r){"use strict";r.d(t,{A:()=>eL});var i=r(87799);class n{static setup(e={}){n.options=e}static get(){return n.options||{}}static clear(){n.options={},n.errorCallback=null}static onError(e){n.errorCallback=e}static sendError(e){n.errorCallback&&e&&n.errorCallback(e)}}n.errorCallback=null,n.defaultOptions={live:!1,logLevel:"error",host:"https://api.radar.io",version:"v1",debug:!1};let o={none:0,error:1,warn:2,info:3,debug:4},a=()=>{if(window&&window.RADAR_TEST_ENV)return o.none;let{logLevel:e,debug:t}=n.get();return t?o.debug:e?o[e]:o.error};class s{static debug(e,t){a()===o.debug&&console.log(`Radar SDK (debug): ${e.trim()}`,t)}static info(e){a()>=o.info&&console.log(`Radar SDK: ${e.trim()}`)}static warn(e){a()>=o.warn&&console.warn(`Radar SDK: ${e.trim()}`)}static error(e){a()>=o.error&&console.error(`Radar SDK: ${e.trim()}`)}}class l{static get USER_ID(){return"radar-userId"}static get DEVICE_ID(){return"radar-deviceId"}static get INSTALL_ID(){return"radar-installId"}static get SESSION_ID(){return"radar-sessionId"}static get DESCRIPTION(){return"radar-description"}static get METADATA(){return"radar-metadata"}static get CACHED_LOCATION(){return"radar-cached-location"}static get TRIP_OPTIONS(){return"radar-trip-options"}static get PRODUCT(){return"radar-product"}static getStorage(){let e=null==window?void 0:window.localStorage;return e||s.warn("localStorage not available."),e}static setItem(e,t){let r=this.getStorage();r&&null!=t&&r.setItem(e,t)}static getItem(e){let t=this.getStorage();if(!t)return null;let r=t.getItem(e);return null!=r?r:null}static getJSON(e){let t=this.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(t){return s.warn(`could not getJSON from storage for key: ${e}`),null}}static removeItem(e){let t=this.getStorage();if(!t)return null;t.removeItem(e)}static clear(){let e=this.getStorage();if(!e)return null;e.clear()}}
969function u(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}class c extends Error{constructor(e){super(e),this.status=""}}class h extends c{constructor(e){super(e),this.name="RadarPublishableKeyError",this.status="ERROR_PUBLISHABLE_KEY"}}class d extends c{constructor(e){super(e),this.name="RadarLocationError",this.status="ERROR_LOCATION"}}class p extends c{constructor(e){super(e),this.name="RadarPermissionsError",this.status="ERROR_PERMISSIONS"}}class f extends c{constructor(){super("Radar Verify app not running."),this.name="RadarVerifyAppError",this.status="ERROR_VERIFY_APP"}}class m extends c{constructor(e){var t;super((null==(t=null==e?void 0:e.meta)?void 0:t.message)||"Bad request."),this.name="RadarBadRequestError",this.code=400,this.response=e,this.status="ERROR_BAD_REQUEST"}}class g extends c{constructor(e){var t;super((null==(t=null==e?void 0:e.meta)?void 0:t.message)||"Unauthorized."),this.name="RadarUnauthorizedError",this.code=401,this.response=e,this.status="ERROR_UNAUTHORIZED"}}class y extends c{constructor(e){var t;super((null==(t=null==e?void 0:e.meta)?void 0:t.message)||"Payment required."),this.name="RadarPaymentRequiredError",this.code=402,this.response=e,this.status="ERROR_PAYMENT_REQUIRED"}}class v extends c{constructor(e){var t;super((null==(t=null==e?void 0:e.meta)?void 0:t.message)||"Forbidden."),this.name="RadarForbiddenError",this.code=403,this.response=e,this.status="ERROR_FORBIDDEN"}}class b extends c{constructor(e){var t;super((null==(t=null==e?void 0:e.meta)?void 0:t.message)||"Not found."),this.name="RadarNotFoundError",this.code=404,this.response=e,this.status="ERROR_NOT_FOUND"}}class _ extends c{constructor(e){var t,r;super((null==(t=null==e?void 0:e.meta)?void 0:t.message)||"Rate limit exceeded."),this.name="RadarRateLimitError",this.code=429,this.response=e,this.type=null==(r=null==e?void 0:e.meta)?void 0:r.type,this.status="ERROR_RATE_LIMIT"}}class x extends c{constructor(e){var t;super((null==(t=null==e?void 0:e.meta)?void 0:t.message)||"Internal server error."),this.name="RadarServerError",this.response=e,this.status="ERROR_SERVER"}}class A extends c{constructor(){super("Request timed out."),this.name="RadarNetworkError",this.status="ERROR_NETWORK"}}class w extends c{constructor(e){var t;super((null==(t=null==e?void 0:e.meta)?void 0:t.message)||"Something went wrong."),this.name="RadarUnknownError",this.response=e,this.status="ERROR_UNKNOWN"}}class S extends c{constructor(e){super(e),this.name="RadarAutocompleteContainerNotFound",this.status="CONTAINER_NOT_FOUND"}}let T={maximumAge:0,timeout:1e4,enableHighAccuracy:!0};class C{static getCurrentPosition(e={}){return u(this,void 0,void 0,function*(){return new Promise((t,r)=>{let i=n.get();if(!navigator||!navigator.geolocation)return r(new d("navigator.geolocation is not available."));if(i.cacheLocationMinutes)try{let e=l.getItem(l.CACHED_LOCATION);if(e){let{latitude:r,longitude:i,accuracy:n,expiresAt:o}=JSON.parse(e)||{};if(Date.now()<parseInt(o)&&r&&i&&n)return t({latitude:r,longitude:i,accuracy:n})}}catch(e){s.warn("could not load cached location.")}let o=Object.assign({},T);void 0!==i.locationMaximumAge&&(o.maximumAge=i.locationMaximumAge),void 0!==i.locationTimeout&&(o.timeout=i.locationTimeout),void 0!==i.desiredAccuracy&&(o.enableHighAccuracy="high"===i.desiredAccuracy),void 0!==e.desiredAccuracy&&(o.enableHighAccuracy="high"===e.desiredAccuracy),s.info(`Using geolocation options: ${JSON.stringify(o)}`),navigator.geolocation.getCurrentPosition(e=>{if(!e||!e.coords)return r(new d("device location return empty coordinates."));let{latitude:n,longitude:o,accuracy:a}=e.coords;if(i.cacheLocationMinutes){let e=Number.parseFloat(i.cacheLocationMinutes),t=Date.now();l.setItem(l.CACHED_LOCATION,JSON.stringify({latitude:n,longitude:o,accuracy:a,updatedAt:t,expiresAt:t+60*e*1e3}))}return t({latitude:n,longitude:o,accuracy:a})},e=>e&&1===e.code?r(new p("Location permissions denied.")):r(new d("
969Could not determine location.")),o)})})}static getPermissionStatus(){return u(this,void 0,void 0,function*(){return new Promise(e=>{let t="NOT_DETERMINED";if(!navigator||!navigator.permissions)return e(t);navigator.permissions.query({name:"geolocation"}).then(r=>{switch(r.state){case"granted":t="GRANTED_FOREGROUND";break;case"denied":t="DENIED";break;case"prompt":t="NOT_DETERMINED"}return e(t)})})})}static online(){return navigator&&navigator.onLine}}var E="4.5.8";let P=new Map;class I{static request({method:e,path:t,data:r,host:i,version:o,headers:a={},responseType:l,requestId:c}){return u(this,void 0,void 0,function*(){return new Promise((u,S)=>{let T=n.get(),I=T.publishableKey;if(!I)return void S(new h("publishableKey not set."));let M=i||T.host,k=o||T.version,O=`${M}/${k}/${t}`,D={};if(Object.keys(r||{}).forEach(e=>{let t=r[e];void 0!==t&&(D[e]=t)}),"GET"===e){let e=Object.keys(D).map(e=>`${e}=${encodeURIComponent(D[e])}`);if(e.length>0){let t=e.join("&");O=`${O}?${t}`}D=void 0}if(c){let e=P.get(c);e&&e.abort()}let R=new XMLHttpRequest;R.open(e,O,!0),c&&P.set(c,R);let L={};"function"==typeof T.getRequestHeaders&&(L=T.getRequestHeaders());let B=Object.assign({Authorization:I,"Content-Type":"application/json","X-Radar-Device-Type":"Web","X-Radar-SDK-Version":E},L,a);Object.keys(B).forEach(e=>{R.setRequestHeader(e,B[e])}),l&&(R.responseType=l),R.onload=()=>{var e;let t;c&&P.delete(c);try{t="blob"===R.responseType?{code:R.status,data:R.response}:JSON.parse(R.response)}catch(e){return S(new x(t))}let r=null==(e=null==t?void 0:t.meta)?void 0:e.error;return"ERROR_PERMISSIONS"===r?S(new p("Location permissions not granted.")):"ERROR_LOCATION"===r?S(new d("Could not determine location.")):"ERROR_NETWORK"===r?S(new A):200==R.status?u(t):void(T.debug&&(s.debug(`API call failed: ${O}`),s.debug(JSON.stringify(t))),400===R.status?S(new m(t)):401===R.status?S(new g(t)):402===R.status?S(new y(t)):403===R.status?S(new v(t)):404===R.status?S(new b(t)):429===R.status?S(new _(t)):500<=R.status&&R.status<600?S(new x(t)):S(new w(t)))},R.onerror=function(){i&&("http://localhost:52516"===i||"https://radar-verify.com:52516"===i)?S(C.online()?new f:new A):S(new A)},R.ontimeout=function(){i&&("http://localhost:52516"===i||"https://radar-verify.com:52516"===i)?S(C.online()?new f:new A):S(new A)},R.send(JSON.stringify(D))})})}}class M{static validateAddress(e){return u(this,void 0,void 0,function*(){let t=n.get(),r=yield I.request({method:"GET",path:"addresses/validate",data:e}),{address:i,result:o}=r,a={address:i,result:o};return t.debug&&(a.response=r),a})}}let k=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)});class O{static getDeviceId(){let e=l.getItem(l.DEVICE_ID);if(e)return e;let t=k();return l.setItem(l.DEVICE_ID,t),t}static getInstallId(){let e=l.getItem(l.INSTALL_ID);if(e)return e;let t=k();return l.setItem(l.INSTALL_ID,t),t}}class D{static getSessionId(){let e=l.getItem(l.SESSION_ID);if(e&&300>Math.abs(Math.trunc(Date.now()/1e3)-Number.parseInt(e)))return e;let t=Math.trunc(Date.now()/1e3).toString();return l.setItem(l.SESSION_ID,t),t}}class R{static getConfig(e={}){return u(this,void 0,void 0,function*(){let t;if("v1"!=n.get().version)return void s.info("Skipping /config call.");let r=e.deviceId||O.getDeviceId(),i=e.installId||O.getInstallId(),o=D.getSessionId();try{t=yield C.getPermissionStatus()}catch(e){s.warn(`Location authorization error: ${e.message}`)}let a={deviceId:r,installId:i,sessionId:o,locationAuthorization:t};try{yield I.request({method:"GET",path:"config",data:a})}catch(e){s.warn(`Error calling /config: ${e.message}`)}})}}class L{static getContext(e){return u(this,void 0,void 0,function*(){let t=n.get();e.latitude&&e.longitude||(e=yield C.getCurrentPosition());let{latitude:r,longitude:i,accuracy:o}=e,a=yield I.request({method:"GET",path:"context",data:{coordinates:`${r},${i}`,accuracy:o}}),{geofences:s,place:l,country:u,state:c,dma:h,postalCode:d}=a,p={location:e,geofences:s,place:l,country:u,state:c,dma:h,postalCode:d};return t.debug&&(p.response=a),p})}}class B{static logConversion(e){return u(this,void 0,void 0,function*(){let t=n.get(),r=e.name,i=e.userId||l.getItem(l.USER_ID),o=e.deviceId||O.getDeviceId(),a=e.installId||O.getInstallId(),s=e.metadata||{},u=e.createdAt;e.revenue&&(s.revenue=e.revenue);let c={name:r,userId:i,deviceId:o,installId:a,metadata:s};"string"==typeof u?c.createdAt=u:u instanceof Date?c.createdAt=u.toISOString():c.createdAt=new Date().toISOString();let h=yield I.request({method:"POST",path:"events",data:c}),d={event:h.event};return t.debug&&(d.response=h),d})}}class F{static forwardGeocode(e){return u(this,void 0,void 0,function*(){let t=n.get(),{query:r,layers:i,country:o,lang:a}=e,s=yield I.request({method:"GET",path:"geocode/forward",data:{query:r,layers:i,country:o,lang:a}}),l={addresses:s.addresses};return t.debug&&(l.response=s),l})}static reverseGeocode(e){return u(this,void 0,void 0,function*(){let t=n.get(),{latitude:r,longitude:i,layers:o}=e;if(!r||!i){let e=yield C.getCurrentPosition();r=e.latitude,i=e.longitude}let a=yield I.request({method:"GET",path:"geocode/reverse",data:{coordinates:`${r},${i}`,layers:o}}),s={addresses:a.addresses};return t.debug&&(s.response=a),s})}static ipGeocode(){return u(this,void 0,void 0,function*(){let e=n.get(),t=yield I.request({method:"GET",path:"geocode/ip"}),r={ip:t.ip,address:t.address,proxy:t.proxy}
969;return e.debug&&(r.response=t),r})}}class j{static distance(e){return u(this,void 0,void 0,function*(){let t=n.get(),{origin:r,destination:i,modes:o,units:a,geometry:s,geometryPoints:l,avoid:u}=e;if(r){if("string"!=typeof r){let{latitude:e,longitude:t}=r;r=`${e},${t}`}}else{let{latitude:e,longitude:t}=yield C.getCurrentPosition();r=`${e},${t}`}if("string"!=typeof i){let{latitude:e,longitude:t}=i;i=`${e},${t}`}Array.isArray(o)&&(o=o.join(",")),Array.isArray(u)&&(u=u.join(","));let c=yield I.request({method:"GET",path:"route/distance",data:{origin:r,destination:i,modes:o,units:a,geometry:s,geometryPoints:l,avoid:u}}),h={routes:c.routes};return t.debug&&(h.response=c),h})}static matrix(e){return u(this,void 0,void 0,function*(){let t=n.get(),{origins:r,destinations:i,mode:o,units:a,avoid:s}=e;if(r)Array.isArray(r)&&(r=r.map(e=>`${e.latitude},${e.longitude}`).join("|"));else{let{latitude:e,longitude:t}=yield C.getCurrentPosition(),n=[];for(let r=0;r<i.length;r++)n.push(`${e},${t}`);r=n.join("|")}Array.isArray(i)&&(i=i.map(e=>`${e.latitude},${e.longitude}`).join("|")),Array.isArray(s)&&(s=s.join(","));let l=yield I.request({method:"GET",path:"route/matrix",data:{origins:r,destinations:i,mode:o,units:a,avoid:s}}),u={origins:l.origins,destinations:l.destinations,matrix:l.matrix};return t.debug&&(u.response=l),u})}}class z{static autocomplete(e,t){return u(this,void 0,void 0,function*(){let r=n.get(),{query:i,near:o,limit:a,layers:s,countryCode:l,expandUnits:u,mailable:c,lang:h,postalCode:d}=e;o&&"string"!=typeof o&&o.latitude&&o.longitude&&(o=`${o.latitude},${o.longitude}`);let p=yield I.request({method:"GET",path:"search/autocomplete",data:{query:i,near:o,limit:a,layers:s,countryCode:l,expandUnits:u,mailable:c,lang:h,postalCode:d},requestId:t}),f={addresses:p.addresses};return r.debug&&(f.response=p),f})}static searchGeofences(e){return u(this,void 0,void 0,function*(){let t=n.get(),{near:r,radius:i,tags:o,metadata:a,limit:s,includeGeometry:l}=e;if(r){if("string"!=typeof r){let{latitude:e,longitude:t}=r;r=`${e},${t}`}}else{let{latitude:e,longitude:t}=yield C.getCurrentPosition();r=`${e},${t}`}Array.isArray(o)&&(o=o.join(","));let u=yield I.request({method:"GET",path:"search/geofences",data:{near:r,radius:i,tags:o,metadata:a,limit:s,includeGeometry:l}}),c={geofences:u.geofences};return t.debug&&(c.response=u),c})}static searchPlaces(e){return u(this,void 0,void 0,function*(){let t=n.get(),{near:r,radius:i,chains:o,categories:a,groups:s,limit:l}=e;if(r){if("string"!=typeof r){let{latitude:e,longitude:t}=r;r=`${e},${t}`}}else{let{latitude:e,longitude:t}=yield C.getCurrentPosition();r=`${e},${t}`}Array.isArray(o)&&(o=o.join(",")),Array.isArray(a)&&(a=a.join(",")),Array.isArray(s)&&(s=s.join(","));let u=yield I.request({method:"GET",path:"search/places",data:{near:r,radius:i,chains:o,categories:a,groups:s,limit:l}}),c={places:u.places};return t.debug&&(c.response=u),c})}}let N=e=>e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e);class G{static setTripOptions(e){if(!e)return void G.clearTripOptions();let t=JSON.stringify(e);s.debug(`Saving trip options: ${t}`),l.setItem(l.TRIP_OPTIONS,t)}static getTripOptions(){let e=l.getItem(l.TRIP_OPTIONS);return e&&(e=JSON.parse(e)),e}static clearTripOptions(){l.removeItem(l.TRIP_OPTIONS)}static startTrip(e){return u(this,void 0,void 0,function*(){let t=n.get();(e=e||G.getTripOptions())||s.warn('tripOptions not set when calling "startTrip"');let r=e.userId||l.getItem(l.USER_ID);r&&r!==l.getItem(l.USER_ID)&&l.setItem(l.USER_ID,r);let{externalId:i,destinationGeofenceTag:o,destinationGeofenceExternalId:a,mode:u,metadata:c,approachingThreshold:h,scheduledArrivalAt:d}=e,p={userId:r,externalId:i,destinationGeofenceTag:o,destinationGeofenceExternalId:a,mode:u,metadata:c,approachingThreshold:h};N(d)?p.scheduledArrivalAt=null==d?void 0:d.toJSON():(d&&s.warn("Invalid date format for scheduledArrivalAt"),p.scheduledArrivalAt=void 0);let f=yield I.request({method:"POST",path:"trips",data:p});G.setTripOptions(e);let m={trip:f.trip,events:f.events};return t.debug&&(m.response=f),m})}static updateTrip(e,t){return u(this,void 0,void 0,function*(){let r=n.get();(e=e||G.getTripOptions())||s.warn('tripOptions not set when calling "startTrip"');let{externalId:i,destinationGeofenceTag:o,destinationGeofenceExternalId:a,mode:l,metadata:u,approachingThreshold:c,scheduledArrivalAt:h}=e,d={status:t,externalId:i,destinationGeofenceTag:o,destinationGeofenceExternalId:a,mode:l,metadata:u,approachingThreshold:c};N(h)?d.scheduledArrivalAt=null==h?void 0:h.toJSON():(h&&s.warn("Invalid date format for scheduledArrivalAt"),d.scheduledArrivalAt=void 0);let p=yield I.request({method:"PATCH",path:`trips/${i}/update`,data:d}),f={trip:p.trip,events:p.events};return r.debug&&(f.response=p),f})}static completeTrip(){return u(this,void 0,void 0,function*(){let e=G.getTripOptions(),t=yield G.updateTrip(e,"completed");return G.clearTripOptions(),t})}static cancelTrip(){return u(this,void 0,void 0,function*(){let e=G.getTripOptions(),t=yield G.updateTrip(e,"canceled");return G.clearTripOptions(),t})}}let V=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");class U{static trackOnce(e){return u(this,void 0,void 0,function*(){let t,r,i=n.get(),{latitude:o,longitude:a,accuracy:c,desiredAccuracy:h,fraud:d}=e;if(!o||!a){let e=yield C.getCurrentPosition({desiredAccuracy:h});o=e.latitude,a=e.longitude,c=e.accuracy}let p=yield C.getPermissionStatus(),f=e.userId||l.getItem(l.USER_ID),m=e.deviceId||O.getDeviceId(),g=e.installId||O.getInstallId(),y=D.getSessionId(),v=e.deviceType||"Web",b=e.description||l.getItem(l.DESCRIPTION);try{t=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){s.warn(`Error getting time zone: ${e.message}`)}f?l.setItem(l.USER_ID,f):s.warn("userId not provided for trackOnce.");let _=e.metadata||l.getJSON(l.METADATA),x=e.tripOptions||G.getTripOptions();x&&(x.version="2");let A={},w=l.getItem(l.PRODUCT);w&&(A["X-Radar-Product"]=w);let S=Object.assign(Object.assign({},e),{locationAuthorization:p,accuracy:c,description:b,deviceId:m,deviceType:v,foreground:!0,installId:g,sessionId:y,latitude:o,longitude:a,metadata:_,sdkVersion:E,stopped:!0,userId:f,tripOptions:x,timeZone:t});
969if(d){let e="https://api-verified.radar.io",t=navigator.language,n=navigator.languages,{dk:s}=yield I.request({host:e,method:"GET",path:"config",data:{deviceId:m,installId:g,sessionId:y,locationAuthorization:p},headers:{"X-Radar-Desktop-Device-Type":"Web"}}),l={payload:JSON.stringify(Object.assign(Object.assign({},S),{lang:t,langs:n}))},h=yield u(void 0,void 0,void 0,function*(){let e=new TextEncoder,t=V(JSON.stringify({alg:"HS256",typ:"JWT"})),r=V(JSON.stringify(l)),i=e.encode(s),n=e.encode(`${t}.${r}`),o=yield crypto.subtle.importKey("raw",i,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),a=V(String.fromCharCode(...Array.from(new Uint8Array((yield crypto.subtle.sign("HMAC",o,n))))));return`${t}.${r}.${a}`});A["X-Radar-Body-Is-Token"]="true";let{user:d,events:f,token:v,expiresAt:b,expiresIn:_,passed:x,failureReasons:w,_id:T}=r=yield I.request({host:e,method:"POST",path:"track",data:{token:h},headers:A}),C={latitude:o,longitude:a,accuracy:c};b&&(b=new Date(b));let E={user:d,events:f,location:C,token:v,expiresAt:b,expiresIn:_,passed:x,failureReasons:w,_id:T};return i.debug&&(E.response=r),E}let{user:T,events:P}=r=yield I.request({method:"POST",path:"track",data:S,headers:A}),M={user:T,events:P,location:{latitude:o,longitude:a,accuracy:c}};return i.debug&&(M.response=r),M})}}let H=null,W=null,q=!0,Z=null,$=null,K=0,X=null,Y=null,Q=null;class J{static checkIpChanges(){return u(this,void 0,void 0,function*(){try{let{ip:e}=yield I.request({method:"GET",path:"ping"}),t=Q&&e!==Q;return t&&(s.info(`IP changed from ${Q} to ${e}`),$=null),Q=e,t}catch(e){s.error(`Error checking IP: ${e}`)}return!1})}static trackVerified(e,t=!1){return u(this,void 0,void 0,function*(){try{let r,i=n.get(),{skipVerifyApp:o,reason:a}=e,u=e.userId||l.getItem(l.USER_ID),c=O.getDeviceId(),h=O.getInstallId(),d=D.getSessionId(),p=e.description||l.getItem(l.DESCRIPTION);u?l.setItem(l.USER_ID,u):s.warn("userId not provided for trackVerified.");let f=e.metadata||l.getJSON(l.METADATA);if(o)r=yield U.trackOnce({userId:null!=u?u:void 0,description:null!=p?p:void 0,metadata:f,fraud:!0,reason:a});else{let n,o=Object.assign(Object.assign({},e),{description:p,deviceId:c,foreground:!0,installId:h,sessionId:d,metadata:f,sdkVersion:E,stopped:!0,userId:u,encrypted:t,expectedCountryCode:X,expectedStateCode:Y}),a=navigator.userAgent,s=a&&(a.toLowerCase().includes("mac")||a.toLowerCase().includes("iphone")||a.toLowerCase().includes("ipod")||a.toLowerCase().includes("ipad")),l=yield I.request({method:"GET",path:"verify",data:o,host:s?"https://radar-verify.com:52516":"http://localhost:52516"}),{user:m,events:g,token:y,expiresAt:v,expiresIn:b,passed:_,failureReasons:x,_id:A}=l;m&&m.location&&m.location.coordinates&&m.locationAccuracy&&(n={latitude:m.location.coordinates[1],longitude:m.location.coordinates[0],accuracy:m.locationAccuracy}),v&&(v=new Date(v)),r={user:m,events:g,location:n,token:y,expiresAt:v,expiresIn:b,passed:_,failureReasons:x,_id:A},i.debug&&(r.response=l)}return $=r,K=performance.now(),Z&&Z(r),r}catch(e){throw n.sendError(e),e}})}static startTrackingVerified(e){q=!0;let t=()=>u(this,void 0,void 0,function*(){let{interval:t}=e;t||(t=20);let i=t;if($){let e=(performance.now()-K)/1e3;i=Math.min(($.expiresIn||0)-e,t)}(i-=10)<10&&(i=10),H&&clearTimeout(H),q&&(H=setTimeout(r,1e3*i))}),r=()=>u(this,void 0,void 0,function*(){try{yield this.trackVerified(e)}catch(e){s.error(`trackVerified error: ${e.message}`)}t()});(null==e?void 0:e.ipChanges)&&(W&&clearInterval(W),W=setInterval(()=>u(this,void 0,void 0,function*(){(yield J.checkIpChanges())&&r()}),1e4)),this.isLastTokenValid()?t():r()}static stopTrackingVerified(){q=!1,H&&clearTimeout(H),W&&clearInterval(W)}static getVerifiedLocationToken(e){return u(this,void 0,void 0,function*(){return this.isLastTokenValid()?$:this.trackVerified(e)})}static clearVerifiedLocationToken(){$=null}static isLastTokenValid(){if(!$)return!1;let e=(performance.now()-K)/1e3;return $.passed&&e<($.expiresIn||0)}static setExpectedJurisdiction(e,t){X=e||null,Y=t||null}static onTokenUpdated(e){Z=e}}let ee=class{static get VERSION(){return E}static initialize(e,t={}){if(!e)throw new h("Publishable key required in initialization.");
969if(e.includes("_sk_"))throw new h("Secret keys are not allowed. Please use your Radar publishable key.");let r=e.includes("_live_"),i=Object.assign(n.defaultOptions,{publishableKey:e,live:r,logLevel:r?"error":"info",debug:!r},t);n.setup(i),s.info(`initialized with ${r?"live":"test"} publishableKey.`),t.debug&&s.debug("using options",t),(null==window?void 0:window.RADAR_TEST_ENV)||R.getConfig()}static clear(){n.clear()}static setUserId(e){e?l.setItem(l.USER_ID,String(e).trim()):l.removeItem(l.USER_ID)}static setDescription(e){e?l.setItem(l.DESCRIPTION,String(e).trim()):l.removeItem(l.DESCRIPTION)}static setMetadata(e){e?l.setItem(l.METADATA,JSON.stringify(e)):l.removeItem(l.METADATA)}static getLocation(){return C.getCurrentPosition()}static trackOnce(e={}){try{return U.trackOnce(e)}finally{R.getConfig(e)}}static trackVerified(e={}){return J.trackVerified(e)}static startTrackingVerified(e){J.startTrackingVerified(e)}static stopTrackingVerified(){J.stopTrackingVerified()}static getVerifiedLocationToken(e={}){return J.getVerifiedLocationToken(e)}static clearVerifiedLocationToken(){J.clearVerifiedLocationToken()}static setExpectedJurisdiction(e,t){J.setExpectedJurisdiction(e,t)}static getContext(e){return L.getContext(e)}static setTripOptions(e){G.setTripOptions(e)}static clearTripOptions(){G.clearTripOptions()}static getTripOptions(){return G.getTripOptions()}static startTrip(e){return G.startTrip(e)}static updateTrip(e){return G.updateTrip(e)}static completeTrip(){return G.completeTrip()}static cancelTrip(){return G.cancelTrip()}static logConversion(e){return B.logConversion(e)}static setProduct(e){e?l.setItem(l.PRODUCT,String(e).trim()):l.removeItem(l.PRODUCT)}static onTokenUpdated(e){J.onTokenUpdated(e)}static onError(e){n.onError(e)}static forwardGeocode(e){return F.forwardGeocode(e)}static reverseGeocode(e){return F.reverseGeocode(e)}static ipGeocode(){return F.ipGeocode()}static autocomplete(e){return z.autocomplete(e)}static searchGeofences(e){return z.searchGeofences(e)}static searchPlaces(e){return z.searchPlaces(e)}static validateAddress(e){return M.validateAddress(e)}static distance(e){return j.distance(e)}static matrix(e){return j.matrix(e)}};class et{constructor(e,t,r){this.type=e,this.feature=t,this.originalEvent=r}}class er{constructor(e,t){var r;this._sourceIds=[],this._layerIds=[],this.id=(null!=(r=t.id)?r:`feature-${Date.now()}`).toString(),(e.getFeatures()||[]).forEach(e=>{if(e.id===this.id)throw Error(`RadarMapFeature: feature with id ${this.id} already exists.`)}),this.geometry=t.geometry,this.properties=t.properties||{},this._feature=t,this._map=e}remove(){this._layerIds.forEach(e=>{this._map.getLayer(e)&&this._map.removeLayer(e)}),this._sourceIds.forEach(e=>{this._map.getSource(e)&&this._map.removeSource(e)}),this._map._features=this._map._features.filter(e=>e.id!==this.id)}on(e,t){this._map.on(e,this.id,r=>{t(new et(e,this,r))}),"click"===e&&(this._map.on("mouseenter",this.id,()=>{this._map.getCanvas().style.cursor="pointer"}),this._map.on("mouseleave",this.id,()=>{this._map.getCanvas().style.cursor=""}))}}let ei=e=>{let t={};return Object.entries(e).forEach(([e,r])=>{void 0!==r&&(t[e]=r)}),t},en=(e,t={})=>{let r=Object.assign({},e);for(let i in t)t[i]instanceof Object&&!Array.isArray(t[i])&&i in e?r[i]=en(e[i],t[i]):Array.isArray(t[i])&&Array.isArray(e[i])?r[i]=e[i].c
969oncat(t[i]):r[i]=t[i];return r},eo={paint:{"line-cap":"round","line-color":"#000257","line-width":4,"border-color":"#FFFFFF","border-width":2}};class ea extends er{constructor(e,t,r){super(e,t);let i=this.id,n=en(eo,r),o=()=>{if(n.paint=n.paint||{},e.addSource(i,{type:"geojson",data:t}),this._sourceIds.push(i),n.paint["line-width"]&&n.paint["border-width"]){let t=`${i}-border`,r=n.paint["line-width"]+n.paint["border-width"];e.addLayer({id:t,source:i,type:"line",layout:{"line-cap":n.paint["line-cap"]},paint:ei({"line-color":n.paint["border-color"],"line-opacity":n.paint["border-opacity"],"line-width":r})}),this._layerIds.push(t)}e.addLayer({id:i,source:i,type:"line",layout:{"line-cap":n.paint["line-cap"]},paint:ei({"line-color":n.paint["line-color"],"line-width":n.paint["line-width"],"line-opacity":n.paint["line-opacity"],"line-offset":n.paint["line-offset"],"line-blur":n.paint["line-blur"],"line-dasharray":n.paint["line-dasharray"],"line-gap-width":n.paint["line-gap-width"],"line-gradient":n.paint["line-gradient"]})}),this._layerIds.push(i)};return e.loaded()?o():e.once("data",()=>{o()}),this}static fromPolyline(e,t,r){return new ea(e,{id:(null==r?void 0:r.id)||`polyline-feature-${Date.now()}`,type:"Feature",geometry:{type:"LineString",coordinates:((e,t=6)=>{let r,i,n=0,o=0,a=0,s=[],l=0,u=0,c=null,h=Math.pow(10,t||6);for(;n<e.length;){c=null,l=0,u=0;do u|=(31&(c=e.charCodeAt(n++)-63))<<l,l+=5;while(c>=32)r=1&u?~(u>>1):u>>1,l=u=0;do u|=(31&(c=e.charCodeAt(n++)-63))<<l,l+=5;while(c>=32)i=1&u?~(u>>1):u>>1,o+=r,a+=i,s.push([a/h,o/h])}return s})(t,null==r?void 0:r.precision)},properties:(null==r?void 0:r.properties)||{}},r)}}let es={paint:{"fill-color":"#FF6F00","fill-opacity":.3,"border-color":"#FF6F00","border-opacity":1,"border-width":2}};class el extends er{constructor(e,t,r){super(e,t);let i=this.id,n=en(es,r),o=()=>{if(n.paint=n.paint||{},e.addSource(i,{type:"geojson",data:t}),this._sourceIds.push(i),e.addLayer({id:i,source:i,type:"fill",layout:{},paint:ei({"fill-color":n.paint["fill-color"],"fill-opacity":n.paint["fill-opacity"]})}),this._layerIds.push(i),n.paint["border-color"]&&n.paint["border-width"]&&n.paint["border-opacity"]){let t=`${i}-border`;e.addLayer({id:t,source:i,type:"line",layout:{},paint:ei({"line-color":n.paint["border-color"],"line-opacity":n.paint["border-opacity"],"line-width":n.paint["border-width"]})}),this._layerIds.push(t)}};return e.loaded()?o():e.once("data",()=>{o()}),this}}class eu{onAdd(){let e=document.createElement("img");return e.src="https://api.radar.io/maps/static/images/logo.svg",e.alt="Radar Maps Platform",this.link=document.createElement("a"),this.link.id="radar-map-logo",this.link.href="https://radar.com?ref=powered_by_radar",this.link.target="_blank",this.link.style.pointerEvents="auto",this.link.appendChild(e),this.link}onRemove(){var e;null==(e=this.link)||e.remove()}}let ec=(e,t)=>{t.forEach(t=>{e.push(t)})},eh=["radar-default-v1","radar-light-v1","radar-dark-v1"],ed={showZoomControls:!0},ep={maxZoom:20,attributionControl:!1,dragRotate:!1,touchPitch:!1,maplibreLogo:!1},ef={padding:50},em=(e,t)=>{let r=t.style||"radar-default-v1",i=`${e.host}/maps/styles/${r}`;return t.language&&(i+=`?language=${t.language}`),i},eg=e=>!(!eh.includes(e)&&/^(http:|https:)/.test(e));class ey extends i.Map{constructor(e){let t,r=n.get();r.publishableKey||s.warn("publishableKey not set. Call Radar.initialize() with key before creating a new map.");let o=!(t=e.style)||"string"==typeof t&&eg(t)?em(r,e):e.style,a=Object.assign({},ed,ep,e,{style:o},{validateStyle:!r.live});s.debug("map initialized with options",a),a.transformRequest=(e,t)=>{"Style"===t&&eg(e)&&(e=em(r,Object.assign(Object.assign({},a),{style:e})));let i={Authorization:r.publishableKey,"X-Radar-Device-Type":"Web","X-Radar-SDK-Version":E};return"function"==typeof r.getRequestHeaders&&(i=Object.assign(i,r.getRequestHeaders())),{url:e,headers:i}},super(a),this._markers=[],this._features=[];let l=this.getContainer();l.style.width||l.style.height||s.warn('map container does not have a set "width" or "height"');let u=new eu;this.addControl(u,"bottom-left");let c=new i.AttributionControl({compact:!1});this.addControl(c,"bottom-right");let h=new i.NavigationControl({showCompass:!1,showZoom:a.showZoomControls});this.addControl(h,"bottom-right");let d=()=>{let e=document.querySelector(".maplibregl-ctrl-attrib");e&&(this.getContainer().clientWidth<380?e.classList.add("hidden"):e.classList.remove("hidden"))};this.on("resize",d),this.on("load",d)}addMarker(e){this._markers.push(e)}removeMarker(e){this._markers=this._markers.filter(t=>t!==e)}getMarkers(){return this._markers}fitToMarkers(e={},t){let r=t||this.getMarkers();if(0===r.length)return;let n=new i.LngLatBounds;
969r.forEach(e=>{n.extend(e.getLngLat())});let o=Object.assign(ef,e);this.fitBounds(n,o)}clearMarkers(){this._markers.forEach(e=>{e.remove()})}getFeatures(){return this._features}fitToFeatures(e={},t){let r,n=(r=[],((t||this._features).map(e=>e._feature)||[]).forEach(e=>{(e=>{let t=[],r=e.geometry;switch(r.type){case"Point":t.push(r.coordinates);break;case"MultiPoint":case"LineString":ec(t,r.coordinates);break;case"MultiLineString":case"Polygon":r.coordinates.forEach(e=>ec(t,e));break;case"MultiPolygon":r.coordinates.forEach(e=>{e.forEach(e=>ec(t,e))})}return t})(e).forEach(e=>{r.push(e)})}),r);if(n.length>0){let t=new i.LngLatBounds;n.forEach(e=>{t.extend(e)}),this.fitBounds(t,e)}}clearFeatures(){this._features.forEach(e=>{e.remove()})}addPolygon(e,t){let r=new el(this,e,t);return this._features.push(r),r}addLine(e,t){let r=new ea(this,e,t);return this._features.push(r),r}addPolyline(e,t){let r=ea.fromPolyline(this,e,t);return this._features.push(r),r}}class ev{constructor(e,t,r){this.target=t,this.originalEvent=r,this.point=t._pos,this.lngLat=t.getLngLat(),this.type=e}}let eb=new Map,e_=(e,t=5e3)=>new Promise((r,i)=>{if(!eb.has(e))return eb.set(e,"pending"),i("miss");let n=Date.now(),o=setInterval(()=>{let a=eb.get(e);"pending"===a?Date.now()-n>t&&(clearInterval(o),i("timed out")):"failed"===a?(clearInterval(o),i("failed")):void 0!==a&&(clearInterval(o),r(a))},100)}),ex={color:"#000257"};class eA extends i.Marker{constructor(e){let t=Object.assign({},ex);if(e.color&&(t.color=e.color),e.element&&(t.element=e.element),e.scale&&(t.scale=e.scale),super(t),e.marker||e.url){let t=this._element.cloneNode(!0);this._element.childNodes.forEach(e=>{e.remove()});let r=t=>{var r;let i;this._element.replaceChildren((r={width:e.width,height:e.height,url:t},(i=document.createElement("img")).src=r.url,r.width&&("number"==typeof r.width?i.width=r.width:i.style.width=r.width),r.height&&("number"==typeof r.height?i.height=r.height:i.style.height=r.height),r.width||r.height||(i.style.maxWidth="64px",i.style.maxHeight="64px",i.style.width="100%",i.style.height="100%"),i))},i=r=>{s.error(`Could not load marker: ${r.message} - falling back to default marker`),eb.set(e.url,"failed"),this._element.replaceChildren(...Array.from(t.childNodes))};e.url&&e_(e.url).then(r).catch(t=>{"miss"!==t&&s.debug(`RadarMarker: cache lookup for ${e.url}: ${t}`),fetch(e.url).then(t=>{200===t.status?t.blob().then(t=>{let i=URL.createObjectURL(t);eb.set(e.url,i),r(i)}).catch(i):i(Error(t.statusText))}).catch(i)}),e.marker&&e_(e.marker).then(r).catch(t=>{"miss"!==t&&s.debug(`RadarMarker: cache lookup for ${e.marker} ${t}`),I.request({method:"GET",version:"maps",path:`markers/${e.marker}`,responseType:"blob"}).then(({data:t})=>{let i=URL.createObjectURL(t);eb.set(e.marker,i),r(i)}).catch(i)})}if(e.text&&(s.warn('marker option "text" is deprecated, and will be removed in a future version. Use "popup.text".'),e.popup=e.popup||{},e.popup.text=e.text),e.html&&(s.warn('marker option "html" is deprecated, and will be removed in a future version. Use "popup.html".'),e.popup=e.popup||{},e.popup.html=e.html),e.popup){let t=new i.Popup(e.popup);e.popup.text&&t.setText(e.popup.text),e.popup.html&&t.setHTML(e.popup.html),e.popup.element&&t.setDOMContent(e.popup.element),this.setPopup(t)}let r=this.getElement();r&&r.addEventListener("click",e=>{e.stopPropagation(),this.getPopup()&&((this._map.getMarkers()||[]).forEach(e=>{var t;(null==(t=e.getPopup())?void 0:t.isOpen())&&e.togglePopup()}),this.togglePopup()),this.fire("click",new ev("click",this,e))})}addTo(e){return e.addMarker(this),super.addTo(e)}remove(){return this._map&&this._map.removeMarker(this),super.remove()}}class ew extends i.Popup{constructor(e){super(e),e.text&&this.setText(e.text),e.html&&this.setHTML(e.html),e.element&&this.setDOMContent(e.element)}}class eS{static getMapLibre(){return i}static createMap(e){return new ey(e)}static createMarker(e={}){return new eA(e)}static createPopup(e){return new ew(e)}}let eT="radar-autocomplete-results-list",eC="radar-autocomplete-results-item",eE="radar-autocomplete-results-marker",eP="radar-autocomplete-results-item-selected",eI={container:"autocomplete",debounceMS:200,minCharacters:3,limit:8,placeholder:"Search address",responsive:!0,disabled:!1,showMarkers:!0,hideResultsOnBlur:!0},eM=e=>"number"==typeof e?`${e}px`:e,ek=(e,t)=>{if(t.responsive){e.style.width="100%",t.width&&(e.style.maxWidth=eM(t.width));return}e.style.width=eM(t.width||400),e.style.removeProperty("max-width")},eO=(e,t)=>{t.maxHeight&&(e.style.maxHeight=eM(t.maxHeight),e.style.overflowY="auto")},eD=(e="#ACBDC8")=>{let t=e.replace("#","%23"),r=`<svg width="16" height="16" viewB
969ox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
970    <path d="M12.5704 6.57036C12.5704 4.11632 10.6342 2.11257 8.21016 2C8.14262 2 8.06757 2 8.00003 2C7.93249 2 7.85744 2 7.7899 2C5.35838 2.11257 3.42967 4.11632 3.42967 6.57036C3.42967 6.60037 3.42967 6.6379 3.42967 6.66792C3.42967 6.69794 3.42967 6.73546 3.42967 6.76548C3.42967 9.46717 7.09196 13.3621 7.4672 13.7598C7.61729 13.9174 7.84994 14 8.00003 14C8.15012 14 8.38277 13.9174 8.53286 13.7598C8.9156 13.3621 12.5704 9.46717 12.5704 6.76548C12.5704 6.72795 12.5704 6.69794 12.5704 6.66792C12.5704 6.6379 12.5704 6.60037 12.5704 6.57036ZM7.99252 8.28893C7.04693 8.28893 6.27395 7.52345 6.27395 6.57036C6.27395 5.61726 7.03943 4.85178 7.99252 4.85178C8.94562 4.85178 9.7111 5.61726 9.7111 6.57036C9.7111 7.52345 8.94562 8.28893 7.99252 8.28893Z" fill="${t}"/>
971  </svg>`.trim();return`data:image/svg+xml;charset=utf-8,${r}`};class eR{static createAutocomplete(e){return new eR(e)}constructor(e={}){let t;if(this.config=Object.assign({},eI,e),this.isOpen=!1,this.debouncedFetchResults=this.debounce(this.fetchResults,this.config.debounceMS),this.results=[],this.highlightedIndex=-1,void 0!==this.config.threshold&&(this.config.minCharacters=this.config.threshold,s.warn('AutocompleteUI option "threshold" is deprecated, use "minCharacters" instead.')),e.near&&("string"==typeof e.near?this.near=e.near:this.near=`${e.near.latitude},${e.near.longitude}`),!(t="string"==typeof this.config.container?document.getElementById(this.config.container):this.config.container))throw new S(`Could not find container element: ${this.config.container}`);if(this.container=t,this.wrapper=document.createElement("div"),this.wrapper.classList.add("radar-autocomplete-wrapper"),this.wrapper.style.display=this.config.responsive?"block":"inline-block",ek(this.wrapper,this.config),this.resultsList=document.createElement("ul"),this.resultsList.classList.add(eT),this.resultsList.setAttribute("id",eT),this.resultsList.setAttribute("role","listbox"),this.resultsList.setAttribute("aria-live","polite"),this.resultsList.setAttribute("aria-label","Search results"),eO(this.resultsList,this.config),"INPUT"===t.nodeName)this.inputField=t,this.wrapper.appendChild(this.resultsList),t.parentNode.appendChild(this.wrapper);else{this.inputField=document.createElement("input"),this.inputField.classList.add("radar-autocomplete-input"),this.inputField.placeholder=this.config.placeholder,this.inputField.type="text",this.inputField.disabled=this.config.disabled;let e=document.createElement("div");e.classList.add("radar-autocomplete-search-icon"),this.wrapper.appendChild(this.inputField),this.wrapper.appendChild(this.resultsList),this.wrapper.appendChild(e),this.container.appendChild(this.wrapper)}this.inputField.setAttribute("autocomplete","off"),this.inputField.setAttribute("role","combobox"),this.inputField.setAttribute("aria-controls",eT),this.inputField.setAttribute("aria-expanded","false"),this.inputField.setAttribute("aria-haspopup","listbox"),this.inputField.setAttribute("aria-autocomplete","list"),this.inputField.setAttribute("aria-activedescendant",""),this.inputField.addEventListener("input",this.handleInput.bind(this)),this.inputField.addEventListener("keydown",this.handleKeyboardNavigation.bind(this)),this.config.hideResultsOnBlur&&this.inputField.addEventListener("blur",this.close.bind(this),!0),s.debug("AutocompleteUI initialized with options",this.config)}handleInput(){let e=this.inputField.value;e.length<this.config.minCharacters||this.debouncedFetchResults(e).then(e=>{let t=this.config.onResults;t&&t(e),this.displayResults(e)}).catch(e=>{s.warn(`Autocomplete ui error: ${e.message}`);let t=this.config.onError;t&&t(e)})}debounce(e,t){let r,i,n;return(...o)=>(clearTimeout(r),r=setTimeout(()=>{let t=e.apply(this,o);t instanceof Promise&&t.then(e=>{i&&i(e)}).catch(e=>{n&&n(e)})},t),new Promise((e,t)=>{i=e,n=t}))}fetchResults(e){return u(this,void 0,void 0,function*(){let{limit:t,layers:r,countryCode:i,expandUnits:n,mailable:o,lang:a,postalCode:s,onRequest:l}=this.config,u={query:e,limit:t,layers:r,countryCode:i,expandUnits:n,mailable:o,lang:a,postalCode:s};this.near&&(u.near=this.near),l&&l(u);let{addresses:c}=yield z.autocomplete(u,"autocomplete-ui");return c})}displayResults(e){let t;if(this.clearResultsList(),this.results=e,this.config.showMarkers&&((t=document.createElement("img")).classList.add(eE),t.setAttribute("src",eD(this.config.markerColor))),e.forEach((e,r)=>{let i,n=document.createElement("li");if(n.classList.add(eC),n.setAttribute("role","option"),n.setAttribute("id",`${eC}}-${r}`),e.formattedAddress.includes(e.addressLabel)&&"postalCode"!==e.layer){let t=Reg
971Exp(`(${e.addressLabel}),?`);i=e.formattedAddress.replace(t,"<b>$1</b>")}else{let t=e.placeLabel||e.addressLabel;i=`<b>${t}</b> ${e.formattedAddress}`}n.innerHTML=i,t&&n.prepend(t.cloneNode()),n.addEventListener("mousedown",()=>{this.select(r)}),this.resultsList.appendChild(n)}),this.open(),e.length>0){let e=document.createElement("a");e.href="https://radar.com?ref=powered_by_radar",e.target="_blank",this.poweredByLink=e;let t=document.createElement("span");t.textContent="Powered by",e.appendChild(t);let r=document.createElement("span");r.id="radar-powered-logo",r.textContent="Radar",e.appendChild(r);let i=document.createElement("div");i.classList.add("radar-powered"),i.appendChild(e),this.resultsList.appendChild(i)}else{let e=document.createElement("div");e.classList.add("radar-no-results"),e.textContent="No results",this.resultsList.appendChild(e)}}open(){this.isOpen||(this.inputField.setAttribute("aria-expanded","true"),this.resultsList.removeAttribute("hidden"),this.isOpen=!0)}close(e){this.isOpen&&setTimeout(()=>{this.inputField.setAttribute("aria-expanded","false"),this.inputField.setAttribute("aria-activedescendant",""),this.resultsList.setAttribute("hidden",""),this.highlightedIndex=-1,this.isOpen=!1,this.clearResultsList()},100*!!(e&&e.relatedTarget===this.poweredByLink))}goTo(e){if(!this.isOpen||!this.results.length)return;e<0?e=this.results.length-1:e>=this.results.length&&(e=0);let t=this.resultsList.getElementsByTagName("li");this.highlightedIndex>-1&&t[this.highlightedIndex].classList.remove(eP),t[e].classList.add(eP),this.inputField.setAttribute("aria-activedescendant",`${eC}-${e}`),this.highlightedIndex=e}handleKeyboardNavigation(e){let t=e.key;if(this.isOpen)switch("Tab"===t&&e.shiftKey&&(t="ArrowUp"),t){case"Tab":case"ArrowDown":e.preventDefault(),this.goTo(this.highlightedIndex+1);break;case"ArrowUp":e.preventDefault(),this.goTo(this.highlightedIndex-1);break;case"Enter":this.select(this.highlightedIndex);break;case"Esc":this.close()}}select(e){let t,r=this.results[e];if(!r)return void s.warn(`No autocomplete result found at index: ${e}`);if(r.formattedAddress.includes(r.addressLabel))t=r.formattedAddress;else{let e=r.placeLabel||r.addressLabel;t=`${e}, ${r.formattedAddress}`}this.inputField.value=t;let i=this.config.onSelection;i&&i(r),this.close()}clearResultsList(){this.resultsList.innerHTML="",this.results=[]}remove(){s.debug("AutocompleteUI removed."),this.inputField.remove(),this.resultsList.remove(),this.wrapper.remove()}setNear(e){return null==e?this.near=void 0:"string"==typeof e?this.near=e:this.near=`${e.latitude},${e.longitude}`,this}setPlaceholder(e){return this.config.placeholder=e,this.inputField.placeholder=e,this}setDisabled(e){return this.config.disabled=e,this.inputField.disabled=e,this}setResponsive(e){return this.config.responsive=e,ek(this.wrapper,this.config),this}setWidth(e){return null===e?this.config.width=void 0:("string"==typeof e||"number"==typeof e)&&(this.config.width=e),ek(this.wrapper,this.config),this}setMaxHeight(e){return null===e?this.config.maxHeight=void 0:("string"==typeof e||"number"==typeof e)&&(this.config.maxHeight=e),eO(this.resultsList,this.config),this}setMinCharacters(e){return this.config.minCharacters=e,this.config.threshold=e,this}setLimit(e){return this.config.limit=e,this}setLang(e){return null===e?this.config.lang=void 0:"string"==typeof e&&(this.config.lang=e),this}setPostalCode(e){return null===e?this.config.postalCode=void 0:"string"==typeof e&&(this.config.postalCode=e),this}setShowMarkers(e){if(this.config.showMarkers=e,e){let e=document.createElement("img");e.classList.add(eE),e.setAttribute("src",eD(this.config.markerColor));let t=this.resultsList.getElementsByTagName("li");for(let r=0;r<t.length;r++)t[r].getElementsByClassName(eE)[0]||t[r].prepend(e.cloneNode())}else{let e=this.resultsList.getElementsByTagName("li");for(let t=0;t<e.length;t++){let r=e[t].getElementsByClassName(eE)[0];r&&r.remove()}}return this}setMarkerColor(e){this.config.markerColor=e;let t=this.resultsList.getElementsByClassName(eE);for(let r=0;r<t.length;r++)t[r].setAttribute("src",eD(e));return this}setHideResultsOnBlur(e){return this.config.hideResultsOnBlur=e,e?this.inputField.addEventListener("blur",this.close.bind(this),!0):this.inputField.removeEventListener("blur",this.close.bind(this),!0),this}}class eL extends ee{static get ui(){return{maplibregl:eS.getMapLibre(),map:eS.createMap,marker:eS.createMarker,popup:eS.createPopup,autocomplete:eR.createAutocomplete}}}},83455(e,t,r){"use strict";r.d(t,{QP:()=>G});let i=(e,t)=>{if(0===e.length)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?i(e.slice(1),n):void 0;if(o)return o;if(0===t.validators.length)return;let a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},n=/^\[(.+)\]$/,o=(e,t,r,i)=>
971{e.forEach(e=>{if("string"==typeof e){(""===e?t:a(t,e)).classGroupId=r;return}"function"==typeof e?s(e)?o(e(i),t,r,i):t.validators.push({validator:e,classGroupId:r}):Object.entries(e).forEach(([e,n])=>{o(n,a(t,e),r,i)})})},a=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},s=e=>e.isThemeGetter,l=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},u=/\s+/;function c(){let e,t,r=0,i="";for(;r<arguments.length;)(e=arguments[r++])&&(t=h(e))&&(i&&(i+=" "),i+=t);return i}let h=e=>{let t;if("string"==typeof e)return e;let r="";for(let i=0;i<e.length;i++)e[i]&&(t=h(e[i]))&&(r&&(r+=" "),r+=t);return r},d=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},p=/^\[(?:([a-z-]+):)?(.+)\]$/i,f=/^\d+\/\d+$/,m=new Set(["px","full","screen"]),g=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,v=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,b=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,x=e=>w(e)||m.has(e)||f.test(e),A=e=>B(e,"length",F),w=e=>!!e&&!Number.isNaN(Number(e)),S=e=>B(e,"number",w),T=e=>!!e&&Number.isInteger(Number(e)),C=e=>e.endsWith("%")&&w(e.slice(0,-1)),E=e=>p.test(e),P=e=>g.test(e),I=new Set(["length","size","percentage"]),M=e=>B(e,I,j),k=e=>B(e,"position",j),O=new Set(["image","url"]),D=e=>B(e,O,N),R=e=>B(e,"",z),L=()=>!0,B=(e,t,r)=>{let i=p.exec(e);return!!i&&(i[1]?"string"==typeof t?i[1]===t:t.has(i[1]):r(i[2]))},F=e=>y.test(e)&&!v.test(e),j=()=>!1,z=e=>b.test(e),N=e=>_.test(e),G=function(e){let t,r,a,s=function(l){let u;return r=(t={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,i=new Map,n=(n,o)=>{r.set(n,o),++t>e&&(t=0,i=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=i.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}})((u=[].reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{separator:t,experimentalParseClassName:r}=e,i=1===t.length,n=t[0],o=t.length,a=e=>{let r,a=[],s=0,l=0;for(let u=0;u<e.length;u++){let c=e[u];if(0===s){if(c===n&&(i||e.slice(u,u+o)===t)){a.push(e.slice(l,u)),l=u+o;continue}if("/"===c){r=u;continue}}"["===c?s++:"]"===c&&s--}let u=0===a.length?e:e.substring(l),c=u.startsWith("!"),h=c?u.substring(1):u;return{modifiers:a,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:r&&r>l?r-l:void 0}};return r?e=>r({className:e,parseClassName:a}):a})(u),...(e=>{let t=(e=>{let t,r,{theme:i,prefix:n}=e,a={nextPart:new Map,validators:[]};return(t=Object.entries(e.classGroups),(r=n)?t.map(([e,t])=>[e,t.map(e=>"string"==typeof e?r+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,t])=>[r+e,t])):e)]):t).forEach(([e,t])=>{o(t,a,e,i)}),a})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:e=>{let r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),i(r,t)||(e=>{if(n.test(e)){let t=n.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}})(e)},getConflictingClassGroupIds:(e,t)=>{let i=r[e]||[];return t&&a[e]?[...i,...a[e]]:i}}})(u)}).cache.get,a=t.cache.set,s=h,h(l)};function h(e){let i=r(e);if(i)return i;let n=((e,t)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:n}=t,o=[],a=e.trim().split(u),s="";for(let e=a.length-1;e>=0;e-=1){let t=a[e],{modifiers:u,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:d}=r(t),p=!!d,f=i(p?h.substring(0,d):h);if(!f){if(!p||!(f=i(h))){s=t+(s.length>0?" "+s:s);continue}p=!1}let m=l(u).join(":"),g=c?m+"!":m,y=g+f;if(o.includes(y))continue;o.push(y);let v=n(f,p);for(let e=0;e<v.length;++e){let t=v[e];o.push(g+t)}s=t+(s.length>0?" "+s:s)}return s})(e,t);return a(e,n),n}return function(){return s(c.apply(null,arguments))}}(()=>{let e=d("colors"),t=d("spacing"),r=d("blur"),i=d("brightness"),n=d("borderColor"),o=d("borderRadius"),a=d("borderSpacing"),s=d("borderWidth"),l=d("contrast"),u=d("grayscale"),c=d("hueRotate"),h=d("invert"),p=d("gap"),f=d("gradientColorStops"),m=d("gradientColorStopPositions"),g=d("inset"),y=d("margin"),v=d("opacity"),b=d("padding"),_=d("saturate"),I=d("scale"),O=d("sepia"),B=d("skew"),F=d("space"),j=d("translate"),z=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",E,t],V=()=>[E,t],U=()=>["",x,A],H=()=>["auto",w,E],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",E],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[w,E];return{cacheSize:500,separator:":",theme:{colors:[L],spacing:[x,A],blur:["none","",P,E],brightness:Y(),borderColor:[e],borderRadius:["n
971one","","full",P,E],borderSpacing:V(),borderWidth:U(),contrast:Y(),grayscale:K(),hueRotate:Y(),invert:K(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[C,A],inset:G(),margin:G(),opacity:Y(),padding:V(),saturate:Y(),scale:Y(),sepia:K(),skew:Y(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",E]}],container:["container"],columns:[{columns:[P]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),E]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",T,E]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",E]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",T,E]}],"grid-cols":[{"grid-cols":[L]}],"col-start-end":[{col:["auto",{span:["full",T,E]},E]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[L]}],"row-start-end":[{row:["auto",{span:[T,E]},E]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",E]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",E]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[F]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[F]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",E,t]}],"min-w":[{"min-w":[E,t,"min","max","fit"]}],"max-w":[{"max-w":[E,t,"none","full","min","max","fit","prose",{screen:[P]},P]}],h:[{h:[E,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[E,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[E,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[E,t,"auto","min","max","fit"]}],"font-size":[{text:["base",P,A]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",S]}],"font-family":[{font:[L]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",E]}],"line-clamp":[{"line-clamp":["none",w,S]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",x,E]}],"list-image":[{"list-image":["none",E]}],"list-style-type":[{list:["none","disc","decimal",E]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",x,A]}],"underline-offset":[{"underline-offset":["auto",x,E]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),k]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",M]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},D]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}
vendor: 5,162 bytes, line 971
971],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:q()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[x,E]}],"outline-w":[{outline:[x,A]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[x,A]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",P,R]}],"shadow-color":[{shadow:[L]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",P,E]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[h]}],saturate:[{saturate:[_]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",E]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",E]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",E]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[T,E]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",E]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",E]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
971],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",E]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[x,A,S]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}})},65959(e,t,r){"use strict";r.d(t,{C6:()=>n,Cl:()=>o,Tt:()=>a,fX:()=>l,zs:()=>s});var i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function n(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)0>t.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}function s(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}function l(e,t,r){if(r||2==arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError},17683(e,t,r){"use strict";r.d(t,{BL:()=>n,eY:()=>a,oo:()=>o});var i=r(67308);function n({threshold:e=0,root:t=null,rootMargin:r="0%",freezeOnceVisible:o=!1,initialIsIntersecting:a=!1,onChange:s}={}){var l;let[u,c]=(0,i.useState)(null),[h,d]=(0,i.useState)(()=>({isIntersecting:a,entry:void 0})),p=(0,i.useRef)();p.current=s;let f=(null==(l=h.entry)?void 0:l.isIntersecting)&&o;(0,i.useEffect)(()=>{let i;if(!u||!("IntersectionObserver"in window)||f)return;let n=new IntersectionObserver(e=>{let t=Array.isArray(n.thresholds)?n.thresholds:[n.thresholds];
971e.forEach(e=>{let r=e.isIntersecting&&t.some(t=>e.intersectionRatio>=t);d({isIntersecting:r,entry:e}),p.current&&p.current(r,e),r&&o&&i&&(i(),i=void 0)})},{threshold:e,root:t,rootMargin:r});return n.observe(u),()=>{n.disconnect()}},[u,JSON.stringify(e),t,r,f,o]);let m=(0,i.useRef)(null);(0,i.useEffect)(()=>{var e;u||null==(e=h.entry)||!e.target||o||f||m.current===h.entry.target||(m.current=h.entry.target,d({isIntersecting:a,entry:void 0}))},[u,h.entry,o,f,a]);let g=[c,!!h.isIntersecting,h.entry];return g.ref=g[0],g.isIntersecting=g[1],g.entry=g[2],g}function o(e){let[t,r]=(0,i.useState)(1),n=t+1<=e,o=t-1>0,a=(0,i.useCallback)(i=>{let n=i instanceof Function?i(t):i;if(n>=1&&n<=e)return void r(n);throw Error("Step not valid")},[e,t]);return[t,{goToNextStep:(0,i.useCallback)(()=>{n&&r(e=>e+1)},[n]),goToPrevStep:(0,i.useCallback)(()=>{o&&r(e=>e-1)},[o]),canGoToNextStep:n,canGoToPrevStep:o,setStep:a,reset:(0,i.useCallback)(()=>{r(1)},[])}]}function a(e){let[t,r]=(0,i.useState)(!!e);return[t,(0,i.useCallback)(()=>{r(e=>!e)},[]),r]}r(63850),"u">typeof window?i.useLayoutEffect:i.useEffect},12986(e,t,r){"use strict";let i;r.d(t,{A:()=>u});let n=new Uint8Array(16);function o(){if(!i){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(n)}let a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));let s={};function l(e,t,r,i,n,o,a=0){if(e.length<16)throw Error("Random bytes length must be >= 16");if(o){if(a<0||a+16>o.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`)}else o=new Uint8Array(16),a=0;t??=Date.now(),r??=0,i??=(e[8]<<8|e[9])&16383,n??=e.slice(10,16);let s=((0xfffffff&(t+=122192928e5))*1e4+r)%0x100000000;o[a++]=s>>>24&255,o[a++]=s>>>16&255,o[a++]=s>>>8&255,o[a++]=255&s;let u=t/0x100000000*1e4&0xfffffff;o[a++]=u>>>8&255,o[a++]=255&u,o[a++]=u>>>24&15|16,o[a++]=u>>>16&255,o[a++]=i>>>8|128,o[a++]=255&i;for(let e=0;e<6;++e)o[a++]=n[e];return o}let u=function(e,t,r){let i,n=e?._v6??!1;if(e){let t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)i=l(e.random??e.rng?.()??o(),e.msecs,e.nsecs,e.clockseq,e.node,t,r);else{let e=Date.now(),a=o();s.msecs??=-1/0,s.nsecs??=0,e===s.msecs?(s.nsecs++,s.nsecs>=1e4&&(s.node=void 0,s.nsecs=0)):e>s.msecs?s.nsecs=0:e<s.msecs&&(s.node=void 0),s.node||(s.node=a.slice(10,16),s.node[0]|=1,s.clockseq=(a[8]<<8|a[9])&16383),s.msecs=e,i=l(a,s.msecs,s.nsecs,n?void 0:s.clockseq,n?void 0:s.node,t,r)}return t??function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(i)}}}]);

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.