@mapxus/mapxus-map-jp 8.4.0 → 9.0.0-pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +23 -6
- package/dist/index.umd.js +2 -1
- package/dist/index.umd.js.LICENSE.txt +14 -0
- package/es/index.d.ts +557 -474
- package/es/index.mjs +2 -1
- package/es/index.mjs.LICENSE.txt +14 -0
- package/es/utils/index.mjs +2 -1
- package/es/utils/index.mjs.LICENSE.txt +14 -0
- package/lib/index.cjs +2 -1
- package/lib/index.cjs.LICENSE.txt +14 -0
- package/lib/utils/index.cjs +2 -1
- package/lib/utils/index.cjs.LICENSE.txt +14 -0
- package/package.json +13 -5
package/dist/index.umd.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios")):"function"==typeof define&&define.amd?define(["axios"],t):"object"==typeof exports?exports.MapxusMap=t(require("axios")):e.MapxusMap=t(e.axios)}(self,(e=>(()=>{"use strict";var t={7:e=>{var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}_(e,t,o,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&_(e,"error",t,i)}(e,r,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,i,n){var r,o,s,c;if(a(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),s=o[t]),void 0===s)s=o[t]=i,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(r=l(e))>0&&s.length>r&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=u.bind(n);return r.listener=i,n.wrapFn=r,r}function h(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):f(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function _(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){n.once&&e.removeEventListener(t,r),i(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var c=l.length,u=f(l,c);for(i=0;i<c;++i)n(u[i],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var i,n,r,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){s=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},742:t=>{t.exports=e}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{AccessControl:()=>qr,AccessControlOrigin:()=>l,BuildingFilterControl:()=>Ts,BuildingSelectorHandler:()=>ra,BuildingsService:()=>Fo,DistanceSearchType:()=>h,FloorSelectorHandler:()=>oa,FloorSwitchMode:()=>o,FloorsControl:()=>zs,Indoor:()=>Es,Map:()=>ua,Marker:()=>ha,OFFSET:()=>Qi,OrientationDistanceSearchType:()=>p,PAGE:()=>Ki,Poi:()=>Ps,PoisOrderBy:()=>c,PoisService:()=>$o,PoisSortBy:()=>u,PresetLanguage:()=>s,RoutePainter:()=>ka,RouteService:()=>Ao,SwitchBuildingHandler:()=>na,SwitchOutdoorHandler:()=>ia,ThemeType:()=>a,VERSION:()=>Oa,VehicleType:()=>d,VenuesService:()=>Oo,convertBrowserLangToPresetLang:()=>Ro,getIdentifier:()=>Ea});var o,s,a,l,c,u,d,h,p,f,_=n(7);function g(e){return e.layers.filter(m)}function m(e){return e.source===v}function y(e){return e.source!==v}!function(e){e[e.SWITCHED_BY_BUILDING=0]="SWITCHED_BY_BUILDING",e[e.SWITCHED_BY_VENUE=1]="SWITCHED_BY_VENUE"}(o||(o={})),function(e){e.ENGLISH="en",e.CHINESE_SIMPLIFIED="zh-Hans",e.CHINESE_TRADITIONAL="zh-Hant",e.CHINESE_TRADITIONAL_TW="zh-Hant-TW",e.JAPANESE="ja",e.KOREAN="ko",e.FILIPINO="fil",e.INDONESIAN="id",e.PORTUGUESE="pt",e.THAI="th",e.VIETNAMESE="vi",e.ARABIC="ar"}(s||(s={})),function(e){e.CHRISTMAS="christmas",e.HALLOWEEN="halloween",e.MAPPY_BEE="mappyBee",e.MAPXUS="mapxus",e.LANDS_D="landsD",e.COMMON="common",e.MAPXUS_V2="mapxus_v2",e.MAPXUS_DEFAULT="mapxus_default"}(a||(a={})),function(e){e.Access="access_control",e.Map="map"}(l||(l={})),function(e){e.DEFAULT_NAME="DefaultName"}(c||(c={})),function(e){e.ABSOLUTE_DISTANCE="AbsoluteDistance",e.ACTUAL_DISTANCE="ActualDistance"}(u||(u={})),function(e){e.FOOT="foot",e.WHEELCHAIR="wheelchair",e.ESCALATOR="escalator",e.EMERGENCY="emergency"}(d||(d={})),function(e){e.POINT="Point",e.POLYGON="Polygon"}(h||(h={})),function(e){e.POINT="Point",e.POLYGON="Polygon",e.GATE="Gate"}(p||(p={})),function(e){e.DEFAULT_NAME="DefaultName"}(f||(f={}));const v="indoor-planet";const b="object"==typeof global&&global&&global.Object===Object&&global;var w="object"==typeof self&&self&&self.Object===Object&&self;const L=b||w||Function("return this")();const I=L.Symbol;var S=Object.prototype,B=S.hasOwnProperty,k=S.toString,M=I?I.toStringTag:void 0;const x=function(e){var t=B.call(e,M),i=e[M];try{e[M]=void 0;var n=!0}catch(e){}var r=k.call(e);return n&&(t?e[M]=i:delete e[M]),r};var C=Object.prototype.toString;const E=function(e){return C.call(e)};var O=I?I.toStringTag:void 0;const P=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O&&O in Object(e)?x(e):E(e)};const F=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const j=function(e){if(!F(e))return!1;var t=P(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const $=L["__core-js_shared__"];var T,A=(T=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"";const R=function(e){return!!A&&A in e};var V=Function.prototype.toString;const N=function(e){if(null!=e){try{return V.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var D=/^\[object .+?Constructor\]$/,H=Function.prototype,W=Object.prototype,z=H.toString,G=W.hasOwnProperty,Z=RegExp("^"+z.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Y=function(e){return!(!F(e)||R(e))&&(j(e)?Z:D).test(N(e))};const X=function(e,t){return null==e?void 0:e[t]};const U=function(e,t){var i=X(e,t);return Y(i)?i:void 0};const J=function(){try{var e=U(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const q=function(e,t,i){"__proto__"==t&&J?J(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i};const Q=function(e){return function(t,i,n){for(var r=-1,o=Object(t),s=n(t),a=s.length;a--;){var l=s[e?a:++r];if(!1===i(o[l],l,o))break}return t}};const K=Q();const ee=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n};const te=function(e){return null!=e&&"object"==typeof e};const ie=function(e){return te(e)&&"[object Arguments]"==P(e)};var ne=Object.prototype,re=ne.hasOwnProperty,oe=ne.propertyIsEnumerable;const se=ie(function(){return arguments}())?ie:function(e){return te(e)&&re.call(e,"callee")&&!oe.call(e,"callee")};const ae=Array.isArray;const le=function(){return!1};var ce="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ce&&"object"==typeof module&&module&&!module.nodeType&&module,de=ue&&ue.exports===ce?L.Buffer:void 0;const he=(de?de.isBuffer:void 0)||le;var pe=/^(?:0|[1-9]\d*)$/;const fe=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&pe.test(e))&&e>-1&&e%1==0&&e<t};const _e=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ge={};ge["[object Float32Array]"]=ge["[object Float64Array]"]=ge["[object Int8Array]"]=ge["[object Int16Array]"]=ge["[object Int32Array]"]=ge["[object Uint8Array]"]=ge["[object Uint8ClampedArray]"]=ge["[object Uint16Array]"]=ge["[object Uint32Array]"]=!0,ge["[object Arguments]"]=ge["[object Array]"]=ge["[object ArrayBuffer]"]=ge["[object Boolean]"]=ge["[object DataView]"]=ge["[object Date]"]=ge["[object Error]"]=ge["[object Function]"]=ge["[object Map]"]=ge["[object Number]"]=ge["[object Object]"]=ge["[object RegExp]"]=ge["[object Set]"]=ge["[object String]"]=ge["[object WeakMap]"]=!1;const me=function(e){return te(e)&&_e(e.length)&&!!ge[P(e)]};const ye=function(e){return function(t){return e(t)}};var ve="object"==typeof exports&&exports&&!exports.nodeType&&exports,be=ve&&"object"==typeof module&&module&&!module.nodeType&&module,we=be&&be.exports===ve&&b.process,Le=function(){try{var e=be&&be.require&&be.require("util").types;return e||we&&we.binding&&we.binding("util")}catch(e){}}();var Ie=Le&&Le.isTypedArray;const Se=Ie?ye(Ie):me;var Be=Object.prototype.hasOwnProperty;const ke=function(e,t){var i=ae(e),n=!i&&se(e),r=!i&&!n&&he(e),o=!i&&!n&&!r&&Se(e),s=i||n||r||o,a=s?ee(e.length,String):[],l=a.length;for(var c in e)!t&&!Be.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||fe(c,l))||a.push(c);return a};var Me=Object.prototype;const xe=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Me)};const Ce=function(e,t){return function(i){return e(t(i))}};const Ee=Ce(Object.keys,Object);var Oe=Object.prototype.hasOwnProperty;const Pe=function(e){if(!xe(e))return Ee(e);var t=[];for(var i in Object(e))Oe.call(e,i)&&"constructor"!=i&&t.push(i);return t};const Fe=function(e){return null!=e&&_e(e.length)&&!j(e)};const je=function(e){return Fe(e)?ke(e):Pe(e)};const $e=function(e,t){return e&&K(e,t,je)};const Te=function(){this.__data__=[],this.size=0};const Ae=function(e,t){return e===t||e!=e&&t!=t};const Re=function(e,t){for(var i=e.length;i--;)if(Ae(e[i][0],t))return i;return-1};var Ve=Array.prototype.splice;const Ne=function(e){var t=this.__data__,i=Re(t,e);return!(i<0)&&(i==t.length-1?t.pop():Ve.call(t,i,1),--this.size,!0)};const De=function(e){var t=this.__data__,i=Re(t,e);return i<0?void 0:t[i][1]};const He=function(e){return Re(this.__data__,e)>-1};const We=function(e,t){var i=this.__data__,n=Re(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function ze(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ze.prototype.clear=Te,ze.prototype.delete=Ne,ze.prototype.get=De,ze.prototype.has=He,ze.prototype.set=We;const Ge=ze;const Ze=function(){this.__data__=new Ge,this.size=0};const Ye=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i};const Xe=function(e){return this.__data__.get(e)};const Ue=function(e){return this.__data__.has(e)};const Je=U(L,"Map");const qe=U(Object,"create");const Qe=function(){this.__data__=qe?qe(null):{},this.size=0};const Ke=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var et=Object.prototype.hasOwnProperty;const tt=function(e){var t=this.__data__;if(qe){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return et.call(t,e)?t[e]:void 0};var it=Object.prototype.hasOwnProperty;const nt=function(e){var t=this.__data__;return qe?void 0!==t[e]:it.call(t,e)};const rt=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=qe&&void 0===t?"__lodash_hash_undefined__":t,this};function ot(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ot.prototype.clear=Qe,ot.prototype.delete=Ke,ot.prototype.get=tt,ot.prototype.has=nt,ot.prototype.set=rt;const st=ot;const at=function(){this.size=0,this.__data__={hash:new st,map:new(Je||Ge),string:new st}};const lt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const ct=function(e,t){var i=e.__data__;return lt(t)?i["string"==typeof t?"string":"hash"]:i.map};const ut=function(e){var t=ct(this,e).delete(e);return this.size-=t?1:0,t};const dt=function(e){return ct(this,e).get(e)};const ht=function(e){return ct(this,e).has(e)};const pt=function(e,t){var i=ct(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function ft(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ft.prototype.clear=at,ft.prototype.delete=ut,ft.prototype.get=dt,ft.prototype.has=ht,ft.prototype.set=pt;const _t=ft;const gt=function(e,t){var i=this.__data__;if(i instanceof Ge){var n=i.__data__;if(!Je||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new _t(n)}return i.set(e,t),this.size=i.size,this};function mt(e){var t=this.__data__=new Ge(e);this.size=t.size}mt.prototype.clear=Ze,mt.prototype.delete=Ye,mt.prototype.get=Xe,mt.prototype.has=Ue,mt.prototype.set=gt;const yt=mt;const vt=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const bt=function(e){return this.__data__.has(e)};function wt(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new _t;++t<i;)this.add(e[t])}wt.prototype.add=wt.prototype.push=vt,wt.prototype.has=bt;const Lt=wt;const It=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1};const St=function(e,t){return e.has(t)};const Bt=function(e,t,i,n,r,o){var s=1&i,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&i?new Lt:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var f=e[d],_=t[d];if(n)var g=s?n(_,f,d,t,e,o):n(f,_,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!It(t,(function(e,t){if(!St(p,t)&&(f===e||r(f,e,i,n,o)))return p.push(t)}))){h=!1;break}}else if(f!==_&&!r(f,_,i,n,o)){h=!1;break}}return o.delete(e),o.delete(t),h};const kt=L.Uint8Array;const Mt=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i};const xt=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i};var Ct=I?I.prototype:void 0,Et=Ct?Ct.valueOf:void 0;const Ot=function(e,t,i,n,r,o,s){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new kt(e),new kt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ae(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Mt;case"[object Set]":var l=1&n;if(a||(a=xt),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var u=Bt(a(e),a(t),n,r,o,s);return s.delete(e),u;case"[object Symbol]":if(Et)return Et.call(e)==Et.call(t)}return!1};const Pt=function(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e};const Ft=function(e,t,i){var n=t(e);return ae(e)?n:Pt(n,i(e))};const jt=function(e,t){for(var i=-1,n=null==e?0:e.length,r=0,o=[];++i<n;){var s=e[i];t(s,i,e)&&(o[r++]=s)}return o};const $t=function(){return[]};var Tt=Object.prototype.propertyIsEnumerable,At=Object.getOwnPropertySymbols;const Rt=At?function(e){return null==e?[]:(e=Object(e),jt(At(e),(function(t){return Tt.call(e,t)})))}:$t;const Vt=function(e){return Ft(e,je,Rt)};var Nt=Object.prototype.hasOwnProperty;const Dt=function(e,t,i,n,r,o){var s=1&i,a=Vt(e),l=a.length;if(l!=Vt(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:Nt.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=s;++c<l;){var _=e[u=a[c]],g=t[u];if(n)var m=s?n(g,_,u,t,e,o):n(_,g,u,e,t,o);if(!(void 0===m?_===g||r(_,g,i,n,o):m)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(e),o.delete(t),p};const Ht=U(L,"DataView");const Wt=U(L,"Promise");const zt=U(L,"Set");const Gt=U(L,"WeakMap");var Zt="[object Map]",Yt="[object Promise]",Xt="[object Set]",Ut="[object WeakMap]",Jt="[object DataView]",qt=N(Ht),Qt=N(Je),Kt=N(Wt),ei=N(zt),ti=N(Gt),ii=P;(Ht&&ii(new Ht(new ArrayBuffer(1)))!=Jt||Je&&ii(new Je)!=Zt||Wt&&ii(Wt.resolve())!=Yt||zt&&ii(new zt)!=Xt||Gt&&ii(new Gt)!=Ut)&&(ii=function(e){var t=P(e),i="[object Object]"==t?e.constructor:void 0,n=i?N(i):"";if(n)switch(n){case qt:return Jt;case Qt:return Zt;case Kt:return Yt;case ei:return Xt;case ti:return Ut}return t});const ni=ii;var ri="[object Arguments]",oi="[object Array]",si="[object Object]",ai=Object.prototype.hasOwnProperty;const li=function(e,t,i,n,r,o){var s=ae(e),a=ae(t),l=s?oi:ni(e),c=a?oi:ni(t),u=(l=l==ri?si:l)==si,d=(c=c==ri?si:c)==si,h=l==c;if(h&&he(e)){if(!he(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new yt),s||Se(e)?Bt(e,t,i,n,r,o):Ot(e,t,l,i,n,r,o);if(!(1&i)){var p=u&&ai.call(e,"__wrapped__"),f=d&&ai.call(t,"__wrapped__");if(p||f){var _=p?e.value():e,g=f?t.value():t;return o||(o=new yt),r(_,g,i,n,o)}}return!!h&&(o||(o=new yt),Dt(e,t,i,n,r,o))};const ci=function e(t,i,n,r,o){return t===i||(null==t||null==i||!te(t)&&!te(i)?t!=t&&i!=i:li(t,i,n,r,e,o))};const ui=function(e,t,i,n){var r=i.length,o=r,s=!n;if(null==e)return!o;for(e=Object(e);r--;){var a=i[r];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++r<o;){var l=(a=i[r])[0],c=e[l],u=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var d=new yt;if(n)var h=n(c,u,l,e,t,d);if(!(void 0===h?ci(u,c,3,n,d):h))return!1}}return!0};const di=function(e){return e==e&&!F(e)};const hi=function(e){for(var t=je(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,di(r)]}return t};const pi=function(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}};const fi=function(e){var t=hi(e);return 1==t.length&&t[0][2]?pi(t[0][0],t[0][1]):function(i){return i===e||ui(i,e,t)}};const _i=function(e){return"symbol"==typeof e||te(e)&&"[object Symbol]"==P(e)};var gi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mi=/^\w*$/;const yi=function(e,t){if(ae(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!_i(e))||(mi.test(e)||!gi.test(e)||null!=t&&e in Object(t))};function vi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],o=i.cache;if(o.has(r))return o.get(r);var s=e.apply(this,n);return i.cache=o.set(r,s)||o,s};return i.cache=new(vi.Cache||_t),i}vi.Cache=_t;const bi=vi;var wi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Li=/\\(\\)?/g;const Ii=function(e){var t=bi(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(wi,(function(e,i,n,r){t.push(n?r.replace(Li,"$1"):i||e)})),t}));const Si=function(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r};var Bi=I?I.prototype:void 0,ki=Bi?Bi.toString:void 0;const Mi=function e(t){if("string"==typeof t)return t;if(ae(t))return Si(t,e)+"";if(_i(t))return ki?ki.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i};const xi=function(e){return null==e?"":Mi(e)};const Ci=function(e,t){return ae(e)?e:yi(e,t)?[e]:Ii(xi(e))};const Ei=function(e){if("string"==typeof e||_i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};const Oi=function(e,t){for(var i=0,n=(t=Ci(t,e)).length;null!=e&&i<n;)e=e[Ei(t[i++])];return i&&i==n?e:void 0};const Pi=function(e,t,i){var n=null==e?void 0:Oi(e,t);return void 0===n?i:n};const Fi=function(e,t){return null!=e&&t in Object(e)};const ji=function(e,t,i){for(var n=-1,r=(t=Ci(t,e)).length,o=!1;++n<r;){var s=Ei(t[n]);if(!(o=null!=e&&i(e,s)))break;e=e[s]}return o||++n!=r?o:!!(r=null==e?0:e.length)&&_e(r)&&fe(s,r)&&(ae(e)||se(e))};const $i=function(e,t){return null!=e&&ji(e,t,Fi)};const Ti=function(e,t){return yi(e)&&di(t)?pi(Ei(e),t):function(i){var n=Pi(i,e);return void 0===n&&n===t?$i(i,e):ci(t,n,3)}};const Ai=function(e){return e};const Ri=function(e){return function(t){return null==t?void 0:t[e]}};const Vi=function(e){return function(t){return Oi(t,e)}};const Ni=function(e){return yi(e)?Ri(Ei(e)):Vi(e)};const Di=function(e){return"function"==typeof e?e:null==e?Ai:"object"==typeof e?ae(e)?Ti(e[0],e[1]):fi(e):Ni(e)};const Hi=function(e,t){var i={};return t=Di(t,3),$e(e,(function(e,n,r){q(i,t(e,n,r),e)})),i};const Wi=function(e,t,i,n){var r=-1,o=null==e?0:e.length;for(n&&o&&(i=e[++r]);++r<o;)i=t(i,e[r],r,e);return i};const zi=function(e,t){return function(i,n){if(null==i)return i;if(!Fe(i))return e(i,n);for(var r=i.length,o=t?r:-1,s=Object(i);(t?o--:++o<r)&&!1!==n(s[o],o,s););return i}};const Gi=zi($e);const Zi=function(e,t,i,n,r){return r(e,(function(e,r,o){i=n?(n=!1,e):t(i,e,r,o)})),i};const Yi=function(e,t,i){var n=ae(e)?Wi:Zi,r=arguments.length<3;return n(e,Di(t,4),i,r,Gi)};function Xi(e){const{buildingId:t,labelCenter:{lat:i,lon:n},floors:r,name:o,venueId:s,defaultFloor:a}=e,l=Hi(o,((e,t)=>"default"===t?"name":`name:${t}`)),{codes:c,ids:u,ordinals:d}=r.reduce(((e,t)=>{const{id:i,code:n,ordinal:r}=t;return{codes:e.codes?`${e.codes},${n}`:n,ids:e.ids?`${e.ids},${i}`:i,ordinals:`${e.ordinals}`?`${e.ordinals},${r}`:`${r}`}}),{codes:"",ids:"",ordinals:""});return{layer:{id:"mapxus-building-line"},properties:{building:"yes",id:t,label_center:`${n},${i}`,level_ids:u,level_names:c,ordinals:d,"ref:venue":s,...l,...a?{default_displayed_floor:a}:{}},source:"indoor-planet",sourceLayer:"mapxus_building"}}var Ui=n(742),Ji=n.n(Ui);const qi="https://map-api.mapxus.co.jp/bms",Qi=10,Ki=1;class en extends Error{}function tn(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let i=t.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i})))}(t)}catch(e){return atob(t)}}en.prototype.name="InvalidTokenError";var nn=function(){return nn=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},nn.apply(this,arguments)};function rn(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}function on(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function sn(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var an="4.6.1";function ln(e,t){return new Promise((function(i){return setTimeout(i,e,t)}))}function cn(e){return!!e&&"function"==typeof e.then}function un(e,t){try{var i=e();cn(i)?i.then((function(e){return t(!0,e)}),(function(e){return t(!1,e)})):t(!0,i)}catch(e){t(!1,e)}}function dn(e,t,i){return void 0===i&&(i=16),rn(this,void 0,void 0,(function(){var n,r,o,s;return on(this,(function(a){switch(a.label){case 0:n=Array(e.length),r=Date.now(),o=0,a.label=1;case 1:return o<e.length?(n[o]=t(e[o],o),(s=Date.now())>=r+i?(r=s,[4,new Promise((function(e){var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(null)}))]):[3,3]):[3,4];case 2:a.sent(),a.label=3;case 3:return++o,[3,1];case 4:return[2,n]}}))}))}function hn(e){return e.then(void 0,(function(){})),e}function pn(e){return parseInt(e)}function fn(e){return parseFloat(e)}function _n(e,t){return"number"==typeof e&&isNaN(e)?t:e}function gn(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function mn(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var i=1/t;return Math.round(e*i)/i}function yn(e,t){var i=e[0]>>>16,n=65535&e[0],r=e[1]>>>16,o=65535&e[1],s=t[0]>>>16,a=65535&t[0],l=t[1]>>>16,c=0,u=0,d=0,h=0;d+=(h+=o+(65535&t[1]))>>>16,h&=65535,u+=(d+=r+l)>>>16,d&=65535,c+=(u+=n+a)>>>16,u&=65535,c+=i+s,c&=65535,e[0]=c<<16|u,e[1]=d<<16|h}function vn(e,t){var i=e[0]>>>16,n=65535&e[0],r=e[1]>>>16,o=65535&e[1],s=t[0]>>>16,a=65535&t[0],l=t[1]>>>16,c=65535&t[1],u=0,d=0,h=0,p=0;h+=(p+=o*c)>>>16,p&=65535,d+=(h+=r*c)>>>16,h&=65535,d+=(h+=o*l)>>>16,h&=65535,u+=(d+=n*c)>>>16,d&=65535,u+=(d+=r*l)>>>16,d&=65535,u+=(d+=o*a)>>>16,d&=65535,u+=i*c+n*l+r*a+o*s,u&=65535,e[0]=u<<16|d,e[1]=h<<16|p}function bn(e,t){var i=e[0];32===(t%=64)?(e[0]=e[1],e[1]=i):t<32?(e[0]=i<<t|e[1]>>>32-t,e[1]=e[1]<<t|i>>>32-t):(t-=32,e[0]=e[1]<<t|i>>>32-t,e[1]=i<<t|e[1]>>>32-t)}function wn(e,t){0!==(t%=64)&&(t<32?(e[0]=e[1]>>>32-t,e[1]=e[1]<<t):(e[0]=e[1]<<t-32,e[1]=0))}function Ln(e,t){e[0]^=t[0],e[1]^=t[1]}var In=[4283543511,3981806797],Sn=[3301882366,444984403];function Bn(e){var t=[0,e[0]>>>1];Ln(e,t),vn(e,In),t[1]=e[0]>>>1,Ln(e,t),vn(e,Sn),t[1]=e[0]>>>1,Ln(e,t)}var kn=[2277735313,289559509],Mn=[1291169091,658871167],xn=[0,5],Cn=[0,1390208809],En=[0,944331445];function On(e,t){var i=function(e){for(var t=new Uint8Array(e.length),i=0;i<e.length;i++){var n=e.charCodeAt(i);if(n>127)return(new TextEncoder).encode(e);t[i]=n}return t}(e);t=t||0;var n,r=[0,i.length],o=r[1]%16,s=r[1]-o,a=[0,t],l=[0,t],c=[0,0],u=[0,0];for(n=0;n<s;n+=16)c[0]=i[n+4]|i[n+5]<<8|i[n+6]<<16|i[n+7]<<24,c[1]=i[n]|i[n+1]<<8|i[n+2]<<16|i[n+3]<<24,u[0]=i[n+12]|i[n+13]<<8|i[n+14]<<16|i[n+15]<<24,u[1]=i[n+8]|i[n+9]<<8|i[n+10]<<16|i[n+11]<<24,vn(c,kn),bn(c,31),vn(c,Mn),Ln(a,c),bn(a,27),yn(a,l),vn(a,xn),yn(a,Cn),vn(u,Mn),bn(u,33),vn(u,kn),Ln(l,u),bn(l,31),yn(l,a),vn(l,xn),yn(l,En);c[0]=0,c[1]=0,u[0]=0,u[1]=0;var d=[0,0];switch(o){case 15:d[1]=i[n+14],wn(d,48),Ln(u,d);case 14:d[1]=i[n+13],wn(d,40),Ln(u,d);case 13:d[1]=i[n+12],wn(d,32),Ln(u,d);case 12:d[1]=i[n+11],wn(d,24),Ln(u,d);case 11:d[1]=i[n+10],wn(d,16),Ln(u,d);case 10:d[1]=i[n+9],wn(d,8),Ln(u,d);case 9:d[1]=i[n+8],Ln(u,d),vn(u,Mn),bn(u,33),vn(u,kn),Ln(l,u);case 8:d[1]=i[n+7],wn(d,56),Ln(c,d);case 7:d[1]=i[n+6],wn(d,48),Ln(c,d);case 6:d[1]=i[n+5],wn(d,40),Ln(c,d);case 5:d[1]=i[n+4],wn(d,32),Ln(c,d);case 4:d[1]=i[n+3],wn(d,24),Ln(c,d);case 3:d[1]=i[n+2],wn(d,16),Ln(c,d);case 2:d[1]=i[n+1],wn(d,8),Ln(c,d);case 1:d[1]=i[n],Ln(c,d),vn(c,kn),bn(c,31),vn(c,Mn),Ln(a,c)}return Ln(a,r),Ln(l,r),yn(a,l),yn(l,a),Bn(a),Bn(l),yn(a,l),yn(l,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)}function Pn(e){return"function"!=typeof e}function Fn(e,t,i,n){var r=Object.keys(e).filter((function(e){return!function(e,t){for(var i=0,n=e.length;i<n;++i)if(e[i]===t)return!0;return!1}(i,e)})),o=hn(dn(r,(function(i){return function(e,t){var i=hn(new Promise((function(i){var n=Date.now();un(e.bind(null,t),(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Date.now()-n;if(!e[0])return i((function(){return{error:e[1],duration:r}}));var o=e[1];if(Pn(o))return i((function(){return{value:o,duration:r}}));i((function(){return new Promise((function(e){var t=Date.now();un(o,(function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=r+Date.now()-t;if(!i[0])return e({error:i[1],duration:o});e({value:i[1],duration:o})}))}))}))}))})));return function(){return i.then((function(e){return e()}))}}(e[i],t)}),n));return function(){return rn(this,void 0,void 0,(function(){var e,t,i,s;return on(this,(function(a){switch(a.label){case 0:return[4,o];case 1:return[4,dn(a.sent(),(function(e){return hn(e())}),n)];case 2:return e=a.sent(),[4,Promise.all(e)];case 3:for(t=a.sent(),i={},s=0;s<r.length;++s)i[r[s]]=t[s];return[2,i]}}))}))}}function jn(){var e=window,t=navigator;return gn(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function $n(){var e=window,t=navigator;return gn(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===(t.vendor||"").indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function Tn(){var e=window;return gn(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===navigator.vendor.indexOf("Apple"),"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function An(){var e=window,t=e.HTMLElement,i=e.Document;return gn(["safari"in e,!("ongestureend"in e),!("TouchEvent"in e),!("orientation"in e),t&&!("autocapitalize"in t.prototype),i&&"pointerLockElement"in i.prototype])>=4}function Rn(){var e,t=window;return e=t.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))&&"[object WebPageNamespace]"===String(t.browser)}function Vn(){var e,t,i=window;return gn(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in i,"mozInnerScreenX"in i,"CSSMozDocumentRule"in i,"CanvasCaptureMediaStream"in i])>=4}function Nn(){var e=window,t=navigator,i=e.CSS,n=e.HTMLButtonElement;return gn([!("getStorageUpdates"in t),n&&"popover"in n.prototype,"CSSCounterStyleRule"in e,i.supports("font-size-adjust: ex-height 0.5"),i.supports("text-transform: full-width")])>=4}function Dn(){var e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function Hn(){var e=$n(),t=Vn(),i=window,n=navigator,r="connection";return e?gn([!("SharedWorker"in i),n[r]&&"ontypechange"in n[r],!("sinkId"in new Audio)])>=2:!!t&&gn(["onorientationchange"in i,"orientation"in i,/android/i.test(n.appVersion)])>=2}function Wn(e){var t=new Error(e);return t.name=e,t}function zn(e,t,i){var n,r,o;return void 0===i&&(i=50),rn(this,void 0,void 0,(function(){var s,a;return on(this,(function(l){switch(l.label){case 0:s=document,l.label=1;case 1:return s.body?[3,3]:[4,ln(i)];case 2:return l.sent(),[3,1];case 3:a=s.createElement("iframe"),l.label=4;case 4:return l.trys.push([4,,10,11]),[4,new Promise((function(e,i){var n=!1,r=function(){n=!0,e()};a.onload=r,a.onerror=function(e){n=!0,i(e)};var o=a.style;o.setProperty("display","block","important"),o.position="absolute",o.top="0",o.left="0",o.visibility="hidden",t&&"srcdoc"in a?a.srcdoc=t:a.src="about:blank",s.body.appendChild(a);var l=function(){var e,t;n||("complete"===(null===(t=null===(e=a.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.readyState)?r():setTimeout(l,10))};l()}))];case 5:l.sent(),l.label=6;case 6:return(null===(r=null===(n=a.contentWindow)||void 0===n?void 0:n.document)||void 0===r?void 0:r.body)?[3,8]:[4,ln(i)];case 7:return l.sent(),[3,6];case 8:return[4,e(a,a.contentWindow)];case 9:return[2,l.sent()];case 10:return null===(o=a.parentNode)||void 0===o||o.removeChild(a),[7];case 11:return[2]}}))}))}function Gn(e){for(var t=function(e){for(var t,i,n="Unexpected syntax '".concat(e,"'"),r=/^\s*([a-z-]*)(.*)$/i.exec(e),o=r[1]||void 0,s={},a=/([.:#][\w-]+|\[.+?\])/gi,l=function(e,t){s[e]=s[e]||[],s[e].push(t)};;){var c=a.exec(r[2]);if(!c)break;var u=c[0];switch(u[0]){case".":l("class",u.slice(1));break;case"#":l("id",u.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(u);if(!d)throw new Error(n);l(d[1],null!==(i=null!==(t=d[4])&&void 0!==t?t:d[5])&&void 0!==i?i:"");break;default:throw new Error(n)}}return[o,s]}(e),i=t[0],n=t[1],r=document.createElement(null!=i?i:"div"),o=0,s=Object.keys(n);o<s.length;o++){var a=s[o],l=n[a].join(" ");"style"===a?Zn(r.style,l):r.setAttribute(a,l)}return r}function Zn(e,t){for(var i=0,n=t.split(";");i<n.length;i++){var r=n[i],o=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(r);if(o){var s=o[1],a=o[2],l=o[4];e.setProperty(s,a,l||"")}}}var Yn=["monospace","sans-serif","serif"],Xn=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function Un(e){return e.toDataURL()}var Jn,qn;function Qn(){var e=this;return function(){if(void 0===qn){var e=function(){var t=Kn();er(t)?qn=setTimeout(e,2500):(Jn=t,qn=void 0)};e()}}(),function(){return rn(e,void 0,void 0,(function(){var e;return on(this,(function(t){switch(t.label){case 0:return er(e=Kn())?Jn?[2,sn([],Jn,!0)]:(i=document).fullscreenElement||i.msFullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement?[4,Dn()]:[3,2]:[3,2];case 1:t.sent(),e=Kn(),t.label=2;case 2:return er(e)||(Jn=e),[2,e]}var i}))}))}}function Kn(){var e=screen;return[_n(fn(e.availTop),null),_n(fn(e.width)-fn(e.availWidth)-_n(fn(e.availLeft),0),null),_n(fn(e.height)-fn(e.availHeight)-_n(fn(e.availTop),0),null),_n(fn(e.availLeft),null)]}function er(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}function tr(e){var t;return rn(this,void 0,void 0,(function(){var i,n,r,o,s,a,l;return on(this,(function(c){switch(c.label){case 0:for(i=document,n=i.createElement("div"),r=new Array(e.length),o={},ir(n),l=0;l<e.length;++l)"DIALOG"===(s=Gn(e[l])).tagName&&s.show(),ir(a=i.createElement("div")),a.appendChild(s),n.appendChild(a),r[l]=s;c.label=1;case 1:return i.body?[3,3]:[4,ln(50)];case 2:return c.sent(),[3,1];case 3:i.body.appendChild(n);try{for(l=0;l<e.length;++l)r[l].offsetParent||(o[e[l]]=!0)}finally{null===(t=n.parentNode)||void 0===t||t.removeChild(n)}return[2,o]}}))}))}function ir(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}function nr(e){return matchMedia("(inverted-colors: ".concat(e,")")).matches}function rr(e){return matchMedia("(forced-colors: ".concat(e,")")).matches}function or(e){return matchMedia("(prefers-contrast: ".concat(e,")")).matches}function sr(e){return matchMedia("(prefers-reduced-motion: ".concat(e,")")).matches}function ar(e){return matchMedia("(prefers-reduced-transparency: ".concat(e,")")).matches}function lr(e){return matchMedia("(dynamic-range: ".concat(e,")")).matches}var cr=Math,ur=function(){return 0};var dr={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var hr=function(){for(var e=window;;){var t=e.parent;if(!t||t===e)return!1;try{if(t.location.origin!==e.location.origin)return!0}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return!0;throw e}e=t}};var pr=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),fr=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),_r=["FRAGMENT_SHADER","VERTEX_SHADER"],gr=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],mr="WEBGL_debug_renderer_info";function yr(e){if(e.webgl)return e.webgl.context;var t,i=document.createElement("canvas");i.addEventListener("webglCreateContextError",(function(){return t=void 0}));for(var n=0,r=["webgl","experimental-webgl"];n<r.length;n++){var o=r[n];try{t=i.getContext(o)}catch(e){}if(t)break}return e.webgl={context:t},t}function vr(e,t,i){var n=e.getShaderPrecisionFormat(e[t],e[i]);return n?[n.rangeMin,n.rangeMax,n.precision]:[]}function br(e){return Object.keys(e.__proto__).filter(wr)}function wr(e){return"string"==typeof e&&!e.match(/[^A-Z0-9_x]/)}function Lr(){return Vn()}function Ir(e){return"function"==typeof e.getParameter}var Sr={fonts:function(){var e=this;return zn((function(t,i){var n=i.document;return rn(e,void 0,void 0,(function(){var e,t,i,r,o,s,a,l,c,u,d;return on(this,(function(h){for((e=n.body).style.fontSize="48px",(t=n.createElement("div")).style.setProperty("visibility","hidden","important"),i={},r={},o=function(e){var i=n.createElement("span"),r=i.style;return r.position="absolute",r.top="0",r.left="0",r.fontFamily=e,i.textContent="mmMwWLliI0O&1",t.appendChild(i),i},s=function(e,t){return o("'".concat(e,"',").concat(t))},a=function(){for(var e={},t=function(t){e[t]=Yn.map((function(e){return s(t,e)}))},i=0,n=Xn;i<n.length;i++){t(n[i])}return e},l=function(e){return Yn.some((function(t,n){return e[n].offsetWidth!==i[t]||e[n].offsetHeight!==r[t]}))},c=function(){return Yn.map(o)}(),u=a(),e.appendChild(t),d=0;d<Yn.length;d++)i[Yn[d]]=c[d].offsetWidth,r[Yn[d]]=c[d].offsetHeight;return[2,Xn.filter((function(e){return l(u[e])}))]}))}))}))},domBlockers:function(e){var t=(void 0===e?{}:e).debug;return rn(this,void 0,void 0,(function(){var e,i,n,r,o;return on(this,(function(s){switch(s.label){case 0:return Tn()||Hn()?(a=atob,e={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',a("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",a("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",a("LnNwb25zb3JpdA=="),".ylamainos",a("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",a("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",a("LmhlYWRlci1ibG9ja2VkLWFk"),a("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",a("I2FkXzMwMFgyNTA="),a("I2Jhbm5lcmZsb2F0MjI="),a("I2NhbXBhaWduLWJhbm5lcg=="),a("I0FkLUNvbnRlbnQ=")],adGuardChinese:[a("LlppX2FkX2FfSA=="),a("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",a("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),a("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",a("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",a("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",a("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),a("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),a("LmFkZ29vZ2xl"),a("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[a("YW1wLWF1dG8tYWRz"),a("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",a("I2FkX2ludmlld19hcmVh")],adGuardRussian:[a("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),a("LnJlY2xhbWE="),'div[id^="smi2adblock"]',a("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[a("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),a("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",a("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),a("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),a("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",a("I3Jla2xhbWk="),a("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),a("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),a("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[a("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",a("LndpZGdldF9wb19hZHNfd2lkZ2V0"),a("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",a("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[a("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),a("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",a("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",a("I3Jla2xhbW5pLWJveA=="),a("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",a("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[a("I2FkdmVydGVudGll"),a("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",a("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",a("LnNwb25zb3JsaW5rZ3J1ZW4="),a("I3dlcmJ1bmdza3k="),a("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),a("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[a("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",a("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[a("LnJla2xhbW9zX3RhcnBhcw=="),a("LnJla2xhbW9zX251b3JvZG9z"),a("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),a("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),a("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[a("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[a("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),a("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",a("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[a("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),a("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),a("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",a("LmFkX19tYWlu"),a("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[a("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[a("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),a("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[a("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),a("I2xpdmVyZUFkV3JhcHBlcg=="),a("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),a("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[a("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",a("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),a("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),a("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[a("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),a("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),a("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",a("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),a("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),a("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),a("ZGl2I3NrYXBpZWNfYWQ=")],ro:[a("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),a("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),a("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[a("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),a("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),a("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",a("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),a("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",a("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},i=Object.keys(e),[4,tr((o=[]).concat.apply(o,i.map((function(t){return e[t]}))))]):[2,void 0];case 1:return n=s.sent(),t&&function(e,t){for(var i="DOM blockers debug:\n```",n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];i+="\n".concat(o,":");for(var s=0,a=e[o];s<a.length;s++){var l=a[s];i+="\n ".concat(t[l]?"🚫":"➡️"," ").concat(l)}}console.log("".concat(i,"\n```"))}(e,n),(r=i.filter((function(t){var i=e[t];return gn(i.map((function(e){return n[e]})))>.6*i.length}))).sort(),[2,r]}var a}))}))},fontPreferences:function(){return function(e,t){void 0===t&&(t=4e3);return zn((function(i,n){var r=n.document,o=r.body,s=o.style;s.width="".concat(t,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",$n()?o.style.zoom="".concat(1/n.devicePixelRatio):Tn()&&(o.style.zoom="reset");var a=r.createElement("div");return a.textContent=sn([],Array(t/20|0),!0).map((function(){return"word"})).join(" "),o.appendChild(a),e(r,o)}),'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}((function(e,t){for(var i={},n={},r=0,o=Object.keys(dr);r<o.length;r++){var s=o[r],a=dr[s],l=a[0],c=void 0===l?{}:l,u=a[1],d=void 0===u?"mmMwWLliI0fiflO&1":u,h=e.createElement("span");h.textContent=d,h.style.whiteSpace="nowrap";for(var p=0,f=Object.keys(c);p<f.length;p++){var _=f[p],g=c[_];void 0!==g&&(h.style[_]=g)}i[s]=h,t.append(e.createElement("br"),h)}for(var m=0,y=Object.keys(dr);m<y.length;m++){n[s=y[m]]=i[s].getBoundingClientRect().width}return n}))},audio:function(){return Tn()&&Nn()&&Rn()||$n()&&(e=navigator,t=window,i=Audio.prototype,n=t.visualViewport,gn(["srLatency"in i,"srChannelCount"in i,"devicePosture"in e,n&&"segments"in n,"getTextInformation"in Image.prototype])>=3)&&function(){var e=window,t=e.URLPattern;return gn(["union"in Set.prototype,"Iterator"in e,t&&"hasRegExpGroups"in t.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}()?-4:function(){var e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(Tn()&&!An()&&!function(){var e=window;return gn(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}())return-1;var i=4500,n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;var o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);var s=function(e){var t=3,i=500,n=500,r=5e3,o=function(){},s=new Promise((function(s,a){var l=!1,c=0,u=0;e.oncomplete=function(e){return s(e.renderedBuffer)};var d=function(){setTimeout((function(){return a(Wn("timeout"))}),Math.min(n,u+r-Date.now()))},h=function(){try{var n=e.startRendering();switch(cn(n)&&hn(n),e.state){case"running":u=Date.now(),l&&d();break;case"suspended":document.hidden||c++,l&&c>=t?a(Wn("suspended")):setTimeout(h,i)}}catch(e){a(e)}};h(),o=function(){l||(l=!0,u>0&&d())}}));return[s,o]}(n),a=s[0],l=s[1],c=hn(a.then((function(e){return function(e){for(var t=0,i=0;i<e.length;++i)t+=Math.abs(e[i]);return t}(e.getChannelData(0).subarray(i))}),(function(e){if("timeout"===e.name||"suspended"===e.name)return-3;throw e})));return function(){return l(),c}}();var e,t,i,n},screenFrame:function(){var e=this;if(Tn()&&Nn()&&Rn())return function(){return Promise.resolve(void 0)};var t=Qn();return function(){return rn(e,void 0,void 0,(function(){var e,i;return on(this,(function(n){switch(n.label){case 0:return[4,t()];case 1:return e=n.sent(),[2,[(i=function(e){return null===e?null:mn(e,10)})(e[0]),i(e[1]),i(e[2]),i(e[3])]]}}))}))}},canvas:function(){return function(e){var t,i,n,r=!1,o=function(){var e=document.createElement("canvas");return e.width=1,e.height=1,[e,e.getContext("2d")]}(),s=o[0],a=o[1];!function(e,t){return!(!t||!e.toDataURL)}(s,a)?i=n="unsupported":(r=function(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,"evenodd")}(a),e?i=n="skipped":(t=function(e,t){!function(e,t){e.width=240,e.height=60,t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';var i="Cwm fjordbank gly ".concat(String.fromCharCode(55357,56835));t.fillText(i,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(i,4,45)}(e,t);var i=Un(e),n=Un(e);if(i!==n)return["unstable","unstable"];!function(e,t){e.width=122,e.height=110,t.globalCompositeOperation="multiply";for(var i=0,n=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];i<n.length;i++){var r=n[i],o=r[0],s=r[1],a=r[2];t.fillStyle=o,t.beginPath(),t.arc(s,a,40,0,2*Math.PI,!0),t.closePath(),t.fill()}t.fillStyle="#f9c",t.arc(60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t.fill("evenodd")}(e,t);var r=Un(e);return[r,i]}(s,a),i=t[0],n=t[1]));return{winding:r,geometry:i,text:n}}(Tn()&&Nn()&&Rn())},osCpu:function(){return navigator.oscpu},languages:function(){var e,t=navigator,i=[],n=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(void 0!==n&&i.push([n]),Array.isArray(t.languages))$n()&&gn([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||i.push(t.languages);else if("string"==typeof t.languages){var r=t.languages;r&&i.push(r.split(","))}return i},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return _n(fn(navigator.deviceMemory),void 0)},screenResolution:function(){var e,t,i;if(!(Tn()&&Nn()&&Rn()))return e=screen,(i=[(t=function(e){return _n(pn(e),null)})(e.width),t(e.height)]).sort().reverse(),i},hardwareConcurrency:function(){return _n(pn(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var i=(new t).resolvedOptions().timeZone;if(i)return i}var n,r=(n=(new Date).getFullYear(),-Math.max(fn(new Date(n,0,1).getTimezoneOffset()),fn(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(r>=0?"+":"").concat(r)},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){var e,t;if(!(jn()||(e=window,t=navigator,gn(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!jn())))try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&Tn()&&!An()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return gn(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],i=0;i<e.length;++i){var n=e[i];if(n){for(var r=[],o=0;o<n.length;++o){var s=n[o];r.push({type:s.type,suffixes:s.suffixes})}t.push({name:n.name,description:n.description,mimeTypes:r})}}return t}},touchSupport:function(){var e,t=navigator,i=0;void 0!==t.maxTouchPoints?i=pn(t.maxTouchPoints):void 0!==t.msMaxTouchPoints&&(i=t.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return{maxTouchPoints:i,touchEvent:e,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var e=[],t=0,i=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];t<i.length;t++){var n=i[t],r=window[n];r&&"object"==typeof r&&e.push(n)}return e.sort()},cookiesEnabled:function(){var e=document;try{e.cookie="cookietest=1; SameSite=Strict;";var t=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(e){return!1}},colorGamut:function(){for(var e=0,t=["rec2020","p3","srgb"];e<t.length;e++){var i=t[e];if(matchMedia("(color-gamut: ".concat(i,")")).matches)return i}},invertedColors:function(){return!!nr("inverted")||!nr("none")&&void 0},forcedColors:function(){return!!rr("active")||!rr("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(var e=0;e<=100;++e)if(matchMedia("(max-monochrome: ".concat(e,")")).matches)return e;throw new Error("Too high value")}},contrast:function(){return or("no-preference")?0:or("high")||or("more")?1:or("low")||or("less")?-1:or("forced")?10:void 0},reducedMotion:function(){return!!sr("reduce")||!sr("no-preference")&&void 0},reducedTransparency:function(){return!!ar("reduce")||!ar("no-preference")&&void 0},hdr:function(){return!!lr("high")||!lr("standard")&&void 0},math:function(){var e,t=cr.acos||ur,i=cr.acosh||ur,n=cr.asin||ur,r=cr.asinh||ur,o=cr.atanh||ur,s=cr.atan||ur,a=cr.sin||ur,l=cr.sinh||ur,c=cr.cos||ur,u=cr.cosh||ur,d=cr.tan||ur,h=cr.tanh||ur,p=cr.exp||ur,f=cr.expm1||ur,_=cr.log1p||ur;return{acos:t(.12312423423423424),acosh:i(1e308),acoshPf:(e=1e154,cr.log(e+cr.sqrt(e*e-1))),asin:n(.12312423423423424),asinh:r(1),asinhPf:function(e){return cr.log(e+cr.sqrt(e*e+1))}(1),atanh:o(.5),atanhPf:function(e){return cr.log((1+e)/(1-e))/2}(.5),atan:s(.5),sin:a(-1e300),sinh:l(1),sinhPf:function(e){return cr.exp(e)-1/cr.exp(e)/2}(1),cos:c(10.000000000123),cosh:u(1),coshPf:function(e){return(cr.exp(e)+1/cr.exp(e))/2}(1),tan:d(-1e300),tanh:h(1),tanhPf:function(e){return(cr.exp(2*e)-1)/(cr.exp(2*e)+1)}(1),exp:p(1),expm1:f(1),expm1Pf:function(e){return cr.exp(e)-1}(1),log1p:_(10),log1pPf:function(e){return cr.log(1+e)}(10),powPI:function(e){return cr.pow(cr.PI,e)}(-100)}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]},applePay:function(){var e=window.ApplePaySession;if("function"!=typeof(null==e?void 0:e.canMakePayments))return-1;if(hr())return-3;try{return e.canMakePayments()?1:0}catch(e){return function(e){if(e instanceof Error&&"InvalidAccessError"===e.name&&/\bfrom\b.*\binsecure\b/i.test(e.message))return-2;throw e}(e)}},privateClickMeasurement:function(){var e,t=document.createElement("a"),i=null!==(e=t.attributionSourceId)&&void 0!==e?e:t.attributionsourceid;return void 0===i?void 0:String(i)},audioBaseLatency:function(){var e;return Hn()||Tn()?window.AudioContext&&null!==(e=(new AudioContext).baseLatency)&&void 0!==e?e:-1:-2},dateTimeLocale:function(){if(!window.Intl)return-1;var e=window.Intl.DateTimeFormat;if(!e)return-2;var t=e().resolvedOptions().locale;return t||""===t?t:-3},webGlBasics:function(e){var t,i,n,r,o,s,a=yr(e.cache);if(!a)return-1;if(!Ir(a))return-2;var l=Lr()?null:a.getExtension(mr);return{version:(null===(t=a.getParameter(a.VERSION))||void 0===t?void 0:t.toString())||"",vendor:(null===(i=a.getParameter(a.VENDOR))||void 0===i?void 0:i.toString())||"",vendorUnmasked:l?null===(n=a.getParameter(l.UNMASKED_VENDOR_WEBGL))||void 0===n?void 0:n.toString():"",renderer:(null===(r=a.getParameter(a.RENDERER))||void 0===r?void 0:r.toString())||"",rendererUnmasked:l?null===(o=a.getParameter(l.UNMASKED_RENDERER_WEBGL))||void 0===o?void 0:o.toString():"",shadingLanguageVersion:(null===(s=a.getParameter(a.SHADING_LANGUAGE_VERSION))||void 0===s?void 0:s.toString())||""}},webGlExtensions:function(e){var t=yr(e.cache);if(!t)return-1;if(!Ir(t))return-2;var i=t.getSupportedExtensions(),n=t.getContextAttributes(),r=[],o=[],s=[],a=[],l=[];if(n)for(var c=0,u=Object.keys(n);c<u.length;c++){var d=u[c];o.push("".concat(d,"=").concat(n[d]))}for(var h=0,p=br(t);h<p.length;h++){var f=t[w=p[h]];s.push("".concat(w,"=").concat(f).concat(pr.has(f)?"=".concat(t.getParameter(f)):""))}if(i)for(var _=0,g=i;_<g.length;_++){var m=g[_];if(!(m===mr&&Lr()||"WEBGL_polygon_mode"===m&&($n()||Tn()))){var y=t.getExtension(m);if(y)for(var v=0,b=br(y);v<b.length;v++){var w;f=y[w=b[v]];a.push("".concat(w,"=").concat(f).concat(fr.has(f)?"=".concat(t.getParameter(f)):""))}else r.push(m)}}for(var L=0,I=_r;L<I.length;L++)for(var S=I[L],B=0,k=gr;B<k.length;B++){var M=k[B],x=vr(t,S,M);l.push("".concat(S,".").concat(M,"=").concat(x.join(",")))}return a.sort(),s.sort(),{contextAttributes:o,parameters:s,shaderPrecisions:l,extensions:i,extensionParameters:a,unsupportedExtensions:r}}};function Br(e){var t=function(e){if(Hn())return.4;if(Tn())return!An()||Nn()&&Rn()?.3:.5;var t="value"in e.platform?e.platform.value:"";if(/^Win/.test(t))return.6;if(/^Mac/.test(t))return.5;return.7}(e),i=function(e){return mn(.99+.01*e,1e-4)}(t);return{score:t,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(i))}}function kr(e){return JSON.stringify(e,(function(e,t){return t instanceof Error?nn({name:(i=t).name,message:i.message,stack:null===(n=i.stack)||void 0===n?void 0:n.split("\n")},i):t;var i,n}),2)}function Mr(e){return On(function(e){for(var t="",i=0,n=Object.keys(e).sort();i<n.length;i++){var r=n[i],o=e[r],s="error"in o?"error":JSON.stringify(o.value);t+="".concat(t?"|":"").concat(r.replace(/([:|\\])/g,"\\$1"),":").concat(s)}return t}(e))}function xr(e){return void 0===e&&(e=50),function(e,t){void 0===t&&(t=1/0);var i=window.requestIdleCallback;return i?new Promise((function(e){return i.call(window,(function(){return e()}),{timeout:t})})):ln(Math.min(e,t))}(e,2*e)}function Cr(e,t){var i=Date.now();return{get:function(n){return rn(this,void 0,void 0,(function(){var r,o,s;return on(this,(function(a){switch(a.label){case 0:return r=Date.now(),[4,e()];case 1:return o=a.sent(),s=function(e){var t,i=Br(e);return{get visitorId(){return void 0===t&&(t=Mr(this.components)),t},set visitorId(e){t=e},confidence:i,components:e,version:an}}(o),(t||(null==n?void 0:n.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(s.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(r-i,"\nvisitorId: ").concat(s.visitorId,"\ncomponents: ").concat(kr(o),"\n```")),[2,s]}}))}))}}}var Er={load:function(e){var t;return void 0===e&&(e={}),rn(this,void 0,void 0,(function(){var i,n,r;return on(this,(function(o){switch(o.label){case 0:return(null===(t=e.monitoring)||void 0===t||t)&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(an,"/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),i=e.delayFallback,n=e.debug,[4,xr(i)];case 1:return o.sent(),r=function(e){return Fn(Sr,e,[])}({cache:{},debug:n}),[2,Cr(r,n)]}}))}))},hashComponents:Mr,componentsToDebugString:kr};const Or="8.4.0";const Pr=function(e){return function(t,i,n){var r=Object(t);if(!Fe(t)){var o=Di(i,3);t=je(t),i=function(e){return o(r[e],e,r)}}var s=e(t,i,n);return s>-1?r[o?t[s]:s]:void 0}};const Fr=function(e,t,i,n){for(var r=e.length,o=i+(n?1:-1);n?o--:++o<r;)if(t(e[o],o,e))return o;return-1};var jr=/\s/;const $r=function(e){for(var t=e.length;t--&&jr.test(e.charAt(t)););return t};var Tr=/^\s+/;const Ar=function(e){return e?e.slice(0,$r(e)+1).replace(Tr,""):e};var Rr=/^[-+]0x[0-9a-f]+$/i,Vr=/^0b[01]+$/i,Nr=/^0o[0-7]+$/i,Dr=parseInt;const Hr=function(e){if("number"==typeof e)return e;if(_i(e))return NaN;if(F(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=F(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ar(e);var i=Vr.test(e);return i||Nr.test(e)?Dr(e.slice(2),i?2:8):Rr.test(e)?NaN:+e};var Wr=1/0;const zr=function(e){return e?(e=Hr(e))===Wr||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const Gr=function(e){var t=zr(e),i=t%1;return t==t?i?t-i:t:0};var Zr=Math.max;const Yr=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:Gr(i);return r<0&&(r=Zr(n+r,0)),Fr(e,Di(t,3),r)};const Xr=Pr(Yr),Ur="permission-disconnected";class Jr extends _.EventEmitter{static instance;static platform={sdkVersion:Or,identifier:""};_appIds=new Map([[l.Access,{}],[l.Map,{}]]);_tokenStorage={};_appIdsHistory=[];static getInstance(){return Jr.instance||(Jr.instance=new Jr),Jr.instance}static setPlatform(e){Jr.platform=e}updateToken(e){const{appId:t,secret:i,token:n,from:r}=e;this._tokenStorage[t]=n,this._appIds.get(r)[t]=i,this._appIdsHistory.push(t)}deleteToken(e,t){delete this._tokenStorage[e],t&&(delete this._appIds.get(t)[e],this.emit(Ur,{appId:e,from:t}))}getVersion(){return Jr.platform.sdkVersion}getToken(e){return this._tokenStorage[e]}async getIdentifier(){if(!Jr.platform.identifier){const e=await Er.load(),t=await e.get();Jr.platform.identifier=t.visitorId}return Jr.platform.identifier}getAppId(e){const t=e?Object.keys(this._appIds.get(e)):[...Object.keys(this._appIds.get(l.Access)),...Object.keys(this._appIds.get(l.Map))];return Xr(this._appIdsHistory.reverse(),(e=>t.includes(e)))}async fetchToken(e,t,i=0){try{const i={appId:e,secret:t,..."bundleId"in Jr.platform?{bundleId:Jr.platform.bundleId}:"sha1"in Jr.platform?{sha1:Jr.platform.sha1,packageName:Jr.platform.packageName}:{origin:window.location.hostname||"restriction.test.example.com",keyPlatform:"WEB"}},n={"Content-Type":"application/json",sdkVersion:Jr.platform.sdkVersion,identifier:Jr.platform.identifier??await this.getIdentifier()},r=await fetch("https://map-api.mapxus.co.jp/sc/api/v1/apikeys/auth",{method:"POST",body:JSON.stringify(i),headers:n});return(await r.json()).result.idToken}catch(n){if(i<3){const n=500*Math.pow(2,i);return console.warn(`Retrying to fetch token in ${n} ms...`,++i),await new Promise((e=>setTimeout(e,n))),this.fetchToken(e,t,i)}throw n}}}class qr extends _.EventEmitter{_appId=null;_secret=null;isClosed=!1;_timeoutId;_isInitialized=!1;_initializationPromise;_tokenManager=Jr.getInstance();_from;constructor(e,t,i=l.Access){super(),this._from=i,this._appId=e,this._secret=t,this._initializationPromise=this._initToken()}async ready(){await this._initializationPromise}get appId(){return this._appId}get token(){if(!this._isInitialized)throw new Error("Token is not initialized yet. Use the 'ready' method to wait for initialization.");return this._tokenManager.getToken(this._appId)}close(){this.isClosed||(this._timeoutId&&clearTimeout(this._timeoutId),this._tokenManager.deleteToken(this._appId,this._from),this.emit("updated",{appId:this._appId,token:null}),Object.keys(this).forEach((e=>{"isClosed"!==e&&"_events"!==e&&delete this[e]})),this.isClosed=!0,this.emit("closed"),delete this._events,Object.freeze(this))}forceUpdateToken(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null),this._isInitialized=!1,this._initializationPromise=this._initToken()}async _initToken(){try{const e=await this._tokenManager.fetchToken(this._appId,this._secret);this._isInitialized=!0,this._tokenManager.updateToken({appId:this._appId,secret:this._secret,token:e,from:this._from});const t=function(e,t){if("string"!=typeof e)throw new en("Invalid token specified: must be a string");t||(t={});const i=!0===t.header?0:1,n=e.split(".")[i];if("string"!=typeof n)throw new en(`Invalid token specified: missing part #${i+1}`);let r;try{r=tn(n)}catch(e){throw new en(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new en(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}(e),i=1e3*(t.exp-t.iat-60);this._loopUpdateToken(i)}catch(e){throw this.emit("error",new Error("Failed to initialize token.",{cause:e})),e}}_loopUpdateToken(e){this.isClosed||(this._timeoutId=setTimeout((async()=>{try{const t=await this._tokenManager.fetchToken(this._appId,this._secret);this._tokenManager.updateToken({appId:this._appId,secret:this._secret,token:t,from:this._from}),this.emit("updated",{appId:this._appId,token:t}),this._loopUpdateToken(e)}catch(e){this.emit("error",new Error("Failed to update token.",{cause:e}))}}),e))}}class Qr{static _instance;_tokenManager=Jr.getInstance();_accessControls=new Map;static setPlatform(e){Jr.setPlatform(e)}static getInstance(){return Qr._instance||(Qr._instance=new Qr),Qr._instance}get version(){return this._tokenManager.getVersion()}async getIdentifier(){return await this._tokenManager.getIdentifier()}async getToken(e,t){let i=this._tokenManager.getToken(e);if(!i){const n=this._accessControls.get(e);if(n)n.forceUpdateToken(),await n.ready(),i=n.token;else if(t){const n=new qr(e,t,l.Map);await n.ready(),i=n.token,this._accessControls.set(e,n)}}return i}deleteToken(e,t){this._tokenManager.deleteToken(e,t)}getAppId(e){return this._tokenManager.getAppId(e)}disconnect(e){this._tokenManager.on(Ur,e)}}let Kr="",eo="";const to=new Map,io=Qr.getInstance();io.disconnect((async({appId:e,from:t})=>{if(t===l.Map){const e=io.getAppId(l.Access);e!==Kr&&(delete Ji().defaults.headers.common.token,e&&await no.setHeaders(e,"")),Kr="",eo=""}else e!==Kr&&(delete Ji().defaults.headers.common.token,Kr&&eo&&await no.setHeaders(Kr,eo))})),Ji().interceptors.response.use(null,(async e=>{const{config:t,response:i}=e;if(401!==i.status||!t)throw e;{const i=t.url,n=(to.get(i)||0)+1;if(n>1&&n<3&&(io.deleteToken(io.getAppId()),await new Promise((e=>setTimeout(e,1e3)))),n>3)throw to.delete(i),e;t.headers.token=await io.getToken(io.getAppId()),to.set(i,n),t.headers.sdkVersion||(t.headers.sdkVersion=io.version),t.headers.identifier||(t.headers.identifier=await io.getIdentifier());try{const e=await Ji()(t);return to.delete(i),e}catch(e){throw e}}}));class no{static async setHeaders(e,t){e&&t&&(Kr=e,eo=t);const i=await io.getIdentifier(),n=await io.getToken(e,t);i&&n&&(Ji().defaults.headers.common={identifier:i,token:n,sdkVersion:io.version,"Content-Type":"application/json"})}static getDefaultRequestParams(e){return{url:e,headers:Ji().defaults.headers.common}}constructor(e){Ji().defaults.baseURL=e??qi}get(e){return Ji().get(e)}post(e,t){return Ji().post(e,t)}}function ro(e){const t=ae(e),i=t&&!e.length||!t&&!e.trim().length;if(i)throw new Error("Parameter cannot be empty.");return i?null:t?e.filter((e=>!!e.trim())).map((e=>e.trim())).join(","):e.trim()}const oo=function(e,t){var i=-1,n=Fe(e)?Array(e.length):[];return Gi(e,(function(e,r,o){n[++i]=t(e,r,o)})),n};const so=function(e,t){return(ae(e)?Si:oo)(e,Di(t,3))};const ao=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};var lo=Object.prototype.hasOwnProperty;const co=function(e,t,i){var n=e[t];lo.call(e,t)&&Ae(n,i)&&(void 0!==i||t in e)||q(e,t,i)};const uo=function(e,t,i,n){if(!F(e))return e;for(var r=-1,o=(t=Ci(t,e)).length,s=o-1,a=e;null!=a&&++r<o;){var l=Ei(t[r]),c=i;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(r!=s){var u=a[l];void 0===(c=n?n(u,l,a):void 0)&&(c=F(u)?u:fe(t[r+1])?[]:{})}co(a,l,c),a=a[l]}return e};const ho=function(e,t,i){for(var n=-1,r=t.length,o={};++n<r;){var s=t[n],a=Oi(e,s);i(a,s)&&uo(o,Ci(s,e),a)}return o};const po=Ce(Object.getPrototypeOf,Object);const fo=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Pt(t,Rt(e)),e=po(e);return t}:$t;const _o=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t};var go=Object.prototype.hasOwnProperty;const mo=function(e){if(!F(e))return _o(e);var t=xe(e),i=[];for(var n in e)("constructor"!=n||!t&&go.call(e,n))&&i.push(n);return i};const yo=function(e){return Fe(e)?ke(e,!0):mo(e)};const vo=function(e){return Ft(e,yo,fo)};const bo=function(e,t){if(null==e)return{};var i=Si(vo(e),(function(e){return[e]}));return t=Di(t),ho(e,i,(function(e,i){return t(e,i[0])}))};const wo=function(e,t){return bo(e,ao(Di(t)))};const Lo=function(e){return e!=e};const Io=function(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1};const So=function(e,t,i){return t==t?Io(e,t,i):Fr(e,Lo,i)};const Bo=function(e){return"string"==typeof e||!ae(e)&&te(e)&&"[object String]"==P(e)};const ko=function(e,t){return Si(t,(function(t){return e[t]}))};const Mo=function(e){return null==e?[]:ko(e,je(e))};var xo=Math.max;const Co=function(e,t,i,n){e=Fe(e)?e:Mo(e),i=i&&!n?Gr(i):0;var r=e.length;return i<0&&(i=xo(r+i,0)),Bo(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&So(e,t,i)>-1},Eo=["opening_hours","description","phone","website","email","appURL","icon"];class Oo{_api="/api/v4/venues";_request;constructor(){this._request=new no}searchByIds(e){const t=ro(e);if(!t)throw new Error("Please input venue id at least one.");const i=`${this._api}/${t}`;return this._changedRes(i)}searchByDistance(e,t,i,n=Qi,r=Ki){if(!e||!t||!i)throw new Error("Missing required parameter.");const o=new URLSearchParams({keywords:e,center:t.join(","),distance:String(i),offset:String(n),page:String(r)}),s=`${this._api}?${o.toString()}`;return this._changedRes(s)}searchByBbox(e,t,i=Qi,n=Ki){if(!e||!t)throw new Error("Missing required parameter.");const r=new URLSearchParams({keywords:e,bbox:t.join(","),offset:String(i),page:String(n)}),o=`${this._api}?${r.toString()}`;return this._changedRes(o)}searchByGlobal(e,t=Qi,i=Ki){if(!e)throw new Error("Missing required parameter.");const n=new URLSearchParams({keywords:e,offset:String(t),page:String(i)}),r=`${this._api}?${n.toString()}`;return this._changedRes(r)}search(e){const t=so(e,((e,t)=>"bounds"===t?`bbox=${e.flat().join()}`:"center"===t?`center=${e.join()}`:`${t}=${e}`));return this._changedRes(`${this._api}?${t.join("&")}`)}_changedRes(e){return new Promise(((t,i)=>{this._request.get(e).then((e=>{e.data.result.venues=so(e.data.result.venues,(e=>wo(e,((e,t)=>Co(Eo,t))))),t(e)})).catch(i)}))}}const Po=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","description"];class Fo{_api="/api/v4/buildings";_request;constructor(){this._request=new no}searchByIds(e){const t=ro(e);if(!t)throw new Error("Please input building id at least one.");const i=`${this._api}/${t}`;return this._changedRes(i)}searchByDistance(e,t,i,n=Qi,r=Ki){if(arguments.length<3)throw new Error("Parameter cannot be empty.");if(2!==t.length)throw new Error("Center lon lat cannot be less than 2.");const o=[`center=${t.join(",")}`,`distance=${i}`,`offset=${n}`,`page=${r}`];e&&o.unshift(`keywords=${e}`);const s=`${this._api}?${o.join("&")}`;return this._changedRes(s)}searchByBbox(e,t,i=Qi,n=Ki){if(arguments.length<2)throw new Error("Parameter cannot be empty.");if(4!==t.length)throw new Error("Bbox parameters cannot be less than 2.");const r=[`bbox=${t.join(",")}`,`offset=${i}`,`page=${n}`];e&&r.unshift(`keywords=${e}`);const o=`${this._api}?${r.join("&")}`;return this._changedRes(o)}searchByGlobal(e,t=Qi,i=Ki){if(!arguments.length)throw new Error("Parameter cannot be empty.");const n=["searchGlobal=true",`offset=${t}`,`page=${i}`];e&&n.unshift(`keywords=${e}`);const r=`${this._api}?${n.join("&")}`;return this._changedRes(r)}searchByFloorId(e){if(!e)throw new Error("Parameter cannot be empty.");return this._changedRes(`${this._api}/floors/${e}`)}search(e){const t=so(e,((e,t)=>"bounds"===t?`bbox=${e.flat().join()}`:"center"===t?`center=${e.join()}`:`${t}=${e}`));return this._changedRes(`${this._api}?${t.join("&")}`)}_changedRes(e){return new Promise(((t,i)=>{this._request.get(e).then((e=>{e.data.result.buildings=so(e.data.result.buildings,(e=>wo(e,((e,t)=>Co(Po,t))))),t(e)})).catch(i)}))}}const jo=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","icon"];class $o{_api="/api/v3/pois";_apiV4="/api/v4/pois";_categoriesApi="/api/v2/categories/pois";_categoriesGroupApi="/api/v5/categories/group";_request;constructor(){this._request=new no}searchByIds(e){const t=ro(e);if(!t)throw new Error("Please input poi id at least one.");const i=`${this._apiV4}/${t}`;return this._changedRes(i,(e=>e.descriptions?.default?{description:e.descriptions.default}:null))}searchByDistance(e){const{center:t,distance:i,keywords:n="",offset:r=Qi,page:o=Ki}=e;if(!t||!i)throw new Error("Parameter missing.");const s=[`keywords=${n}`,`center=${t.join(",")}`,`distance=${Math.round(i)}`,`offset=${r}`,`page=${o}`],a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByBounds(e){const{bounds:t,offset:i=Qi,page:n=Ki,keywords:r,orderBy:o}=e,s=[`bbox=${t.flat().join()}`,`offset=${i}`,`page=${n}`];To(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByBuilding(e){const{buildingId:t,offset:i=Qi,page:n=Ki,keywords:r,orderBy:o}=e,s=[`buildingId=${t}`,`offset=${i}`,`page=${n}`];To(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByVenue(e){const{venueId:t,offset:i=Qi,page:n=Ki,keywords:r,orderBy:o}=e,s=[`venueId=${t}`,`offset=${i}`,`page=${n}`];To(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByFloor(e){const{floorId:t,offset:i=Qi,page:n=Ki,keywords:r,orderBy:o}=e,s=[`floorId=${t}`,`offset=${i}`,`page=${n}`];r&&s.push(`keywords=${r}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchCategories(e){let t,i;var n;"bounds"in e?(t=`bbox=${e.bounds.flat().join()}`,"string"==typeof(n=e.keywords)&&Boolean(n.trim())&&(t+=`&keywords=${e.keywords.trim()}`),i=`${this._categoriesGroupApi}?${t}`):("floorId"in e?t=`floorId=${e.floorId}`:"buildingId"in e?t=`buildingId=${e.buildingId}`:"venueId"in e&&(t=`venueId=${e.venueId}`),i=`${this._categoriesApi}?${t}`);try{return this._request.get(i)}catch(e){throw e}}searchByOrientation(e){const{center:t,angle:i,distance:n,distanceSearchType:r=p.POINT}=e,o=[`center=${t.join()}`,`angle=${Math.round(i)}`,`distance=${n}`,`distanceSearchType=${r}`];"ordinal"in e?o.push(`ordinal=${e.ordinal}`):"floorId"in e?o.push(`floorId=${e.floorId}`):"buildingId"in e&&o.push(`buildingId=${e.buildingId}`);const s=`${this._api}/orientation?${o.join("&")}`;return this._request.get(s)}searchByCategory(e){const{center:t,distance:i,page:n=Ki,offset:r=Qi}=e,o=[`center=${t.join(",")}`,`distance=${i}`,`offset=${r}`,`page=${n}`];let s="";if("category"in e)s=`${this._api}?category=${e.category}&${o.join("&")}`;else if("excludedCategories"in e){const{excludedCategories:t}=e;s=ae(t)?`${this._api}?excludeCategories=${t.join(",")}&${o.join("&")}`:`${this._api}?excludeCategories=${t}&${o.join("&")}`}if(s.length)return this._changedRes(s);throw new Error("Parameter missing.")}search(e){const t=so(e,((e,t)=>"bounds"===t?`bbox=${e.flat().join()}`:"center"===t?`center=${e.join()}`:"excludedCategories"===t?`excludeCategories=${ae(e)?e.join(","):e}`:`${t}=${e}`));return this._request.get(`${this._api}?${t.join("&")}`)}_changedRes(e,t){return new Promise(((i,n)=>{this._request.get(e).then((e=>{e.data.result.pois=so(e.data.result.pois,(e=>{let i=wo(e,((e,t)=>Co(jo,t)));return t&&t(i)&&(i=Object.assign({},i,t(i))),i})),i(e)})).catch(n)}))}}function To(e){return"string"==typeof e&&Boolean(e.trim())}class Ao{_api="/api/v3/route/query";_request;constructor(){this._request=new no}search(e){const{points:t,vehicle:i=d.FOOT,locale:n="en"}=e;if(!(t&&t.length>1&&t.length<6))throw new Error("Parameter error. It must be 1 < {points.length} < 6");const r={points:t,vehicle:i,locale:n};try{return this._request.post(this._api,JSON.stringify(r))}catch(e){throw new Error(e)}}}function Ro(e){let t=null;return!function(e){return/^en(-(US|GB|AU))?$/.test(e)}(e)?!function(e){return/^zh(-(Hans|CN))?$/.test(e)}(e)?!function(e){return/^zh-(Hant|HK|MO)$/.test(e)}(e)?!function(e){return"zh-TW"===e}(e)?!function(e){return/^ja(-JP)?$/.test(e)}(e)?!function(e){return/^ko(-KR)?$/.test(e)}(e)?!function(e){return/^(fil|tl)(-PH)?$/.test(e)}(e)?!function(e){return/^id(-ID)?$/.test(e)}(e)?!function(e){return/^pt(-(BR|PT))?$/.test(e)}(e)?!function(e){return/^th(-TH)?$/.test(e)}(e)?!function(e){return/^vi(-VN)?$/.test(e)}(e)?function(e){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(e)}(e)&&(t=s.ARABIC):t=s.VIETNAMESE:t=s.THAI:t=s.PORTUGUESE:t=s.INDONESIAN:t=s.FILIPINO:t=s.KOREAN:t=s.JAPANESE:t=s.CHINESE_TRADITIONAL_TW:t=s.CHINESE_TRADITIONAL:t=s.CHINESE_SIMPLIFIED:t=s.ENGLISH,t}const Vo={lineWidth:3,lineColor:"#A5E3FF",lineOpacity:1},No={fontColor:"#8c8c8c",activeFontColor:"#fff",backgroundColor:"#fff",activeBackgroundColor:"#074769",itemSize:50,itemCount:4,defaultFolded:!1},Do=Ro(window.navigator.language)??s.ENGLISH,Ho=new Fo,Wo=new Oo,zo=new $o;async function Go(e){try{return(await Ho.searchByIds(e)).data.result.buildings[0]}catch(e){throw new Error(e)}}async function Zo(e){try{const t=(await Ho.searchByFloorId(e)).data.result.buildings[0].buildingId;return await Go(t)}catch(e){throw new Error(e)}}const Yo="reserve_mapxus-building-fill";var Xo={value:()=>{}};function Uo(){for(var e,t=0,i=arguments.length,n={};t<i;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw new Error("illegal type: "+e);n[e]=[]}return new Jo(n)}function Jo(e){this._=e}function qo(e,t){for(var i,n=0,r=e.length;n<r;++n)if((i=e[n]).name===t)return i.value}function Qo(e,t,i){for(var n=0,r=e.length;n<r;++n)if(e[n].name===t){e[n]=Xo,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=i&&e.push({name:t,value:i}),e}Jo.prototype=Uo.prototype={constructor:Jo,on:function(e,t){var i,n,r=this._,o=(n=r,(e+"").trim().split(/^|\s+/).map((function(e){var t="",i=e.indexOf(".");if(i>=0&&(t=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=o[s]).type)r[i]=Qo(r[i],e.name,t);else if(null==t)for(i in r)r[i]=Qo(r[i],e.name,null);return this}for(;++s<a;)if((i=(e=o[s]).type)&&(i=qo(r[i],e.name)))return i},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new Jo(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var i,n,r=new Array(i),o=0;o<i;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,i=(n=this._[e]).length;o<i;++o)n[o].value.apply(t,r)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],r=0,o=n.length;r<o;++r)n[r].value.apply(t,i)}};const Ko=Uo;class es{_historyBuilding;_historyOrdinal;_selectedBuildings;static instance;constructor(){this._historyBuilding=new Map,this._historyOrdinal=new Map,this._selectedBuildings=new Set}static getInstance(){return es.instance||(es.instance=new es),es.instance}getHistoryBuilding(e){return this._historyBuilding.get(e)}setHistoryBuilding(e,t){this._historyBuilding.set(e,t)}getHistoryOrdinal(e){return this._historyOrdinal.get(e)}setHistoryOrdinal(e,t){this._historyOrdinal.set(e,t)}getHistoryBuildings(){return this._selectedBuildings}addHistoryBuilding(e){this._selectedBuildings.delete(e),this._selectedBuildings.add(e),this._selectedBuildings.size>100&&(this._selectedBuildings=new Set(Array.from(this._selectedBuildings).slice(this._selectedBuildings.size-100)))}}class ts{static instance;_upperBuildings;_lowerBuildings;_hiddenBuildings;constructor(){this._upperBuildings=new Set,this._lowerBuildings=new Set,this._hiddenBuildings=new Set}static getInstance(){return ts.instance||(ts.instance=new ts),ts.instance}getUpperBuildings(){return this._upperBuildings}getLowerBuildings(){return this._lowerBuildings}getHiddenBuildings(){return this._hiddenBuildings}}const is=function(e,t,i){for(var n=-1,r=e.length;++n<r;){var o=e[n],s=t(o);if(null!=s&&(void 0===a?s==s&&!_i(s):i(s,a)))var a=s,l=o}return l};const ns=function(e,t){return e<t};const rs=function(e,t){return e&&e.length?is(e,Di(t,2),ns):void 0};const os=function(){return L.Date.now()};var ss=Math.max,as=Math.min;const ls=function(e,t,i){var n,r,o,s,a,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var i=n,o=r;return n=r=void 0,c=t,s=e.apply(o,i)}function f(e){var i=e-l;return void 0===l||i>=t||i<0||d&&e-c>=o}function _(){var e=os();if(f(e))return g(e);a=setTimeout(_,function(e){var i=t-(e-l);return d?as(i,o-(e-c)):i}(e))}function g(e){return a=void 0,h&&n?p(e):(n=r=void 0,s)}function m(){var e=os(),i=f(e);if(n=arguments,r=this,l=e,i){if(void 0===a)return function(e){return c=e,a=setTimeout(_,t),u?p(e):s}(l);if(d)return clearTimeout(a),a=setTimeout(_,t),p(l)}return void 0===a&&(a=setTimeout(_,t)),s}return t=Hr(t)||0,F(i)&&(u=!!i.leading,o=(d="maxWait"in i)?ss(Hr(i.maxWait)||0,t):o,h="trailing"in i?!!i.trailing:h),m.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=r=a=void 0},m.flush=function(){return void 0===a?s:g(os())},m};const cs=function(e,t){return!!(null==e?0:e.length)&&So(e,t,0)>-1};const us=function(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1};const ds=function(){};var hs=zt&&1/xt(new zt([,-0]))[1]==1/0?function(e){return new zt(e)}:ds;const ps=hs;const fs=function(e,t,i){var n=-1,r=cs,o=e.length,s=!0,a=[],l=a;if(i)s=!1,r=us;else if(o>=200){var c=t?null:ps(e);if(c)return xt(c);s=!1,r=St,l=new Lt}else l=t?[]:a;e:for(;++n<o;){var u=e[n],d=t?t(u):u;if(u=i||0!==u?u:0,s&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(u)}else r(l,d,i)||(l!==a&&l.push(d),a.push(u))}return a};const _s=function(e,t){return e&&e.length?fs(e,Di(t,2)):[]};const gs=function(e,t){var i=[];return Gi(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i};const ms=function(e,t){return(ae(e)?jt:gs)(e,Di(t,3))};var ys=0;const vs=function(e){var t=++ys;return xi(e)+t};const bs=function(e,t){var i;return Gi(e,(function(e,n,r){return!(i=t(e,n,r))})),!!i};const ws=function(e,t,i){if(!F(i))return!1;var n=typeof t;return!!("number"==n?Fe(i)&&fe(t,i.length):"string"==n&&t in i)&&Ae(i[t],e)};const Ls=function(e,t,i){var n=ae(e)?It:bs;return i&&ws(e,t,i)&&(t=void 0),n(e,Di(t,3))},Is="Indoor_selectedFloorChanged",Ss="Indoor_selectedBuildingChanged",Bs="Indoor_mapxusMapLoaded",ks="Indoor_maplibreMapLoaded",Ms="mapxus-building-line",xs="assistant-mapxus-level-outline",Cs=new Oo;class Es extends _.EventEmitter{_map;_features;_allBuildings;_curBuildingId=null;_curBuildingFeature=null;_ordinal=null;_floorId=null;_floorName=null;_allowOutdoorSwitch;_allowBuildingSwitch;_outdoorMapShown;_originIndoorLayers;_curVenueId=null;_curVenueFeature=null;_buildingHighlightStyle;_lowerLayers;_upperLayers;_commonLayers;_dispatch=Ko(Is);_fitBuildingBounds;_boundsPadding;_startWithIndoorView;_maplibreMapLoaded=!1;_indoorMapLoaded=!1;_isVenueMode;_isMaskMode;_upperLevels=new Set;_lowerLevels=new Set;_featureIncomplete=!1;_dragPan;_isNewBuilding=!1;_buildingBounds;_history=es.getInstance();_layerBuildings=ts.getInstance();_upperBuildings=this._layerBuildings.getUpperBuildings();_lowerBuildings=this._layerBuildings.getLowerBuildings();_hiddenBuildings=this._layerBuildings.getHiddenBuildings();_isDestroyed=!1;_findBuildingTimeoutId=null;_findBuildingIntervalId=null;_debounceRendering;constructor(e){super();const{map:t,startWithIndoorView:i=!0,outdoorMapShown:n=!0,selectedBuildingBorderStyle:r,floorSwitchMode:s=o.SWITCHED_BY_VENUE,fitBuildingBounds:a,boundsPadding:l,maskNonSelectedAreas:c=!1}=e;this._map=t,this._allowOutdoorSwitch=!0,this._allowBuildingSwitch=!0,this._startWithIndoorView=i,this._outdoorMapShown=n,this._isVenueMode=s===o.SWITCHED_BY_VENUE,this._isMaskMode=c,this._fitBuildingBounds=a,this._boundsPadding=l,this._buildingHighlightStyle=r?Object.assign({},Vo,r):Vo,this._hiddenBuildings=new Set,this._loadData()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._dispatch.on(`.${Is}`,null),this.removeAllListeners(Ss),this.removeAllListeners(ks),this.removeAllListeners(Bs),this._debounceRendering?.cancel(),this._findBuildingTimeoutId&&(clearTimeout(this._findBuildingTimeoutId),this._findBuildingTimeoutId=null),this._findBuildingIntervalId&&(clearInterval(this._findBuildingIntervalId),this._findBuildingIntervalId=null))}setAllowOutdoorSwitch(e){return this._allowOutdoorSwitch=e,this}setAllowBuildingSwitch(e){return this._allowBuildingSwitch=e,this}get floor(){return{code:this._floorName,id:this._floorId,ordinal:this._ordinal}}get building(){return this._curBuildingFeature}get venue(){return this._curVenueFeature}get features(){return this._features}getFeaturesById(e,t){const{layerIds:i,filter:n}=t||{};let r=this.features;if(i?.length){const e=this._map.getCanvas().getBoundingClientRect();r=this._map.queryRenderedFeatures([[0,0],[e.width,e.height]],{layers:i})}return ms(r,n?t=>t.properties.id===e&&n(t):t=>t.properties.id===e)}async switchFloorByOrdinal(e){this._updateFloorState(e),this._dispatch.call(Is,null,{venue:this.venue,building:this.building,floor:this.floor}),e&&this._floorId&&(this._resetSelectedBuildingLevel(),!0===this._dragPan&&(this._fitBuildingBounds?(this._isNewBuilding&&this._featureIncomplete&&await this.panToBuildingCenter(),this.fitBuildingBbox()):await this.panToBuildingCenter()),"restrict"===this._dragPan&&await this._checkAndPanToBuilding()),this.updateRendering()}setOutdoorMapShown(e){this._outdoorMapShown=e,this._setOutdoorVisibility(e)}updateCustomLayers(){this._originIndoorLayers=g(this._map.getStyle()),this._copyOverlapLayers(),this._addBuildingHighlightLayer(),this._addCustomLevelFillLayer(),this._isMaskMode&&this._addBuildingMaskLayer(),this._outdoorMapShown||this._setOutdoorVisibility(!1)}setSelectedBuildingBorderStyle(e){e?(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,e),this._map.getLayer(xs)&&(this._map.setPaintProperty(xs,"line-color",this._buildingHighlightStyle.lineColor),this._map.setPaintProperty(xs,"line-opacity",this._buildingHighlightStyle.lineOpacity),this._map.setPaintProperty(xs,"line-width",this._buildingHighlightStyle.lineWidth),this._map.setPaintProperty(xs,"line-offset",this._buildingHighlightStyle.lineWidth))):(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,{"line-opacity":0}),this._map.getLayer(xs)&&this._map.setPaintProperty(xs,"line-opacity",0))}onMapChange(e){const t=vs(`${Is}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}async selectBuilding(e,t){(this._allowOutdoorSwitch||e)&&this._allowBuildingSwitch&&this._allowBuildingSwitch&&this._isNotCurrentFeature(e)&&(this._featureIncomplete=t?.featureIncomplete??this._featureIncomplete,this._isNewBuilding=!0,this._isMaskMode&&this._invisibleSelectedBuilding(),await this._updateIndoorState(e,t?.floorId),await this.switchFloorByOrdinal(this._ordinal),this.emit(Ss,{buildingId:this._curBuildingId,ordinal:this._ordinal,dragPan:this._dragPan}),this._indoorMapLoaded||(this._indoorMapLoaded=!0,this.emit(Bs)),this._isNewBuilding=!1)}updateRendering(){this._updateFeatures(),this._layerDisplayedBuildings(),this._setDisplayedLevels(),this._filterTiles(),this._setBuildingLineOpacity(),this._filterBuildingHighlight()}async panToBuildingCenter(){const e=this._curBuildingFeature.properties?.label_center?.split(",");if(e&&(this._map.panTo(e),this._featureIncomplete))return new Promise((e=>{this._findBuildingTimeoutId=setTimeout((()=>{let t=!1;const i=()=>{if(this._isDestroyed)return void this._clearTimers();this._map.getLayer(Ms)&&this.getFeaturesById(this._curBuildingId,{layerIds:[Ms]})[0]&&(t=!0,e(!0))};this._findBuildingIntervalId=setInterval((()=>{t?this._clearTimers():i()}),100),i(),this._map.getZoom()<14&&(this._clearTimers(),e(!1))}))}))}fitBuildingBbox(){this._buildingBounds&&this._map.fitBounds(this._buildingBounds,{padding:this._boundsPadding,bearing:this._map.getBearing()})}setDragPan(e){this._dragPan=e}setBuildingBounds(e){this._buildingBounds=e}async selectBuildingByClickMap(e){let t=null;const i=this._map.queryRenderedFeatures(e,{layers:["mapxus-level-fill","mapxus-level-fill-overlap-copy",Ms]});if(i.length){const e=Xr(i,(e=>e.layer.id.startsWith("mapxus-level-fill")));t=e?Xr(i,(t=>t.properties.id===e.properties["ref:building"])):Xr(i,(e=>{const{id:t,level_ids:i}=e.properties;return!this._hiddenBuildings.has(t)&&!Ls(i.split(","),(e=>this._upperLevels.has(e)||this._lowerLevels.has(e)))}))??null}this.setDragPan("restrict"),await this.selectBuilding(t),setTimeout((async()=>{if(this._fitBuildingBounds)if(t){const e=await Go(t.properties.id),{minLon:i,minLat:n,maxLon:r,maxLat:o}=e.bbox;this.setBuildingBounds([[i,n],[r,o]])}else this.setBuildingBounds(null)}))}_loadData(){this._map.on("load",(()=>this._init()))}_init(){this.updateCustomLayers(),this._map.on("data",this._debounceRendering=ls((()=>{this._maplibreMapLoaded||(this._maplibreMapLoaded=!0,this.emit(ks),(!this._startWithIndoorView||this._map.getZoom()<14)&&(this._indoorMapLoaded=!0,this.emit(Bs))),this.updateRendering()}),300))}_clear(){this._curBuildingFeature=null,this._curBuildingId=null,this._ordinal=null,this._floorName=null,this._floorId=null,this._curVenueId=null,this._curVenueFeature=null,this._buildingBounds=null}_getIndoorFeatures(){const e=this._map.getCanvas().getBoundingClientRect(),t=this._map.queryRenderedFeatures([[0,0],[e.width,e.height]]),i=ms(t,(e=>"indoor-planet"===e.source));return _s(i,(e=>e.layer.id+":"+e.properties.id))}_getBuildingFloorByOrdinal(e,t){let i=null,n=null;if(e?.properties){const{ordinals:r,level_names:o,level_ids:s}=e.properties,a=Yr(r?.split(",")||[],(e=>e===t));i=(o?.split(",")||[])[a]??null,n=(s?.split(",")||[])[a]??null}return{code:i,id:n,ordinal:t}}_isNotCurrentFeature(e){return e?.properties?.id!==this._curBuildingId}_setOutdoorVisibility(e){const t=this._map.getStyle().layers.filter(y);if(t.length){const i=e?"visible":"none";t.forEach((({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility",i)}))}}_addCustomLevelFillLayer(){this._map.getLayer("custom-level-fill")||this._map.addLayer({id:"custom-level-fill",source:"indoor-planet","source-layer":"mapxus_level",type:"fill",paint:{"fill-opacity":0}})}_addBuildingMaskLayer(){if(this._map.getLayer(Yo))return;const e=this._originIndoorLayers.find((({id:e})=>e===Ms));if(e){const t=Object.assign({},e,{id:Yo,layout:Object.assign({},e.layout??{},{visibility:"visible"}),paint:Object.assign({},e.paint??{},{"fill-opacity":0})});this._map.addLayer(t,Ms)}}_setBuildingLineOpacity(){this._isMaskMode&&this._map.getLayer(Ms)&&this._map.setPaintProperty(Ms,"fill-opacity",["case",["in",["get","id"],["literal",[...this._upperBuildings]]],0,["in",["get","id"],["literal",[...this._hiddenBuildings]]],0,1])}_addBuildingHighlightLayer(){if(!this._map.getLayer(xs)){const{lineWidth:e,lineOpacity:t,lineColor:i}=this._buildingHighlightStyle;this._map.addLayer({id:xs,source:"indoor-planet","source-layer":"mapxus_level",type:"line",filter:["==","id",""],paint:{"line-offset":e,"line-width":e,"line-color":i,"line-opacity":t}});const n=this._originIndoorLayers.findIndex((({id:e})=>e===this._upperLayers[this._upperLayers.length-1].id)),r=this._originIndoorLayers[n+1];this._map.moveLayer(xs,r.id)}}_filterBuildingHighlight(){this._map.getLayer(xs)&&this._map.setFilter(xs,["==","id",this._floorId??""])}_handleBuildings(e,t){if(t.clear(),e.size)for(const i of e){const n=this._allBuildings.get(i);if(!n?.properties)continue;const{"ref:venue":r,ordinals:o,level_ids:s}=n.properties;let a=this._history.getHistoryOrdinal(this._isVenueMode?this._history.getHistoryBuilding(r):i);if(!a){if(this._isVenueMode){const e=this._features.find((e=>"mapxus-venue-fill"===e.layer.id&&e.properties.id===r));a=this._getVenueDefaultOrdinal(e)}else a=this._getBuildingDefaultOrdinal(n);if(!a)continue;this._history.setHistoryOrdinal(i,a),this._isVenueMode&&this._history.setHistoryBuilding(r,i)}const l=Yr(o.split(","),(e=>e===a));if(l>-1){const n=s.split(",")[l];if(this._isMaskMode){(this._isVenueMode?this._curVenueFeature?.properties?.building_ids?.split(",")||[]:this._curBuildingId?[this._curBuildingId]:[]).includes(i)?(t.add(n),this._hiddenBuildings.delete(i)):e.delete(i)}else t.add(n),this._hiddenBuildings.delete(i)}else this._hiddenBuildings.add(i),e.delete(i)}}_getVenueDefaultOrdinal(e){let t=null;if(e?.properties){const{default_displayed_ordinal:i,building_ids:n}=e.properties;if(i&&(t=i),!t&&n){const e=Xr(this._getBuildingsOfBbox(),(e=>n.includes(e.properties.id)));t=e?this._getBuildingDefaultOrdinal(e):null}}return t}_getBuildingDefaultOrdinal(e){let t=null;if(e?.properties){const{level_ids:i,ordinals:n,default_displayed_floor:r}=e.properties,o=n?.split(",")||[];if(o.length){if(r){t=o[Yr(i?.split(",")||[],(e=>e===r))]??null}t||(t=rs(o,(e=>Math.abs(Number(e)-.1))))}}return t}_getBuildingsOfBbox(e){let t=this._map.queryRenderedFeatures({layers:[Ms]});return t=_s(t,(e=>e.properties.id)),e&&(t=t.filter(e)),t}_copyOverlapLayers(){const e=this._originIndoorLayers.findIndex((({id:e})=>"mapxus-level-fill"===e)),t=this._originIndoorLayers.findIndex((({id:e})=>e.startsWith("mapxus-poi")));this._commonLayers=this._originIndoorLayers.slice(0,e).concat(this._originIndoorLayers.slice(t)),this._upperLayers=this._originIndoorLayers.slice(e,t).filter((e=>"mapxus_building"!==e["source-layer"])),this._lowerLayers=this._upperLayers.map((e=>{const t=Object.assign({},e,{id:`${e.id}-overlap-copy`});return this._map.getLayer(t.id)||(this._map.addLayer(t),this._map.moveLayer(t.id,"mapxus-level-fill")),t}))}_updateFeatures(){this._features=this._getIndoorFeatures();const e=_s(ms(this._features,(e=>e.layer.id===Ms)),(e=>e.properties.id));this._allBuildings=new Map(e.map((e=>[e.properties.id,e]))),this._featureIncomplete&&this._allBuildings.get(this._curBuildingId)&&(this._curBuildingFeature=this._allBuildings.get(this._curBuildingId),this._featureIncomplete=!1)}_layerDisplayedBuildings(){if(this._allBuildings.size)for(const e of this._allBuildings.values()){if(!e.properties)continue;const{id:t,overlap:i}=e.properties;let n=!1;if(t===this._curBuildingId)this._hiddenBuildings.delete(t),this._lowerBuildings.delete(t),this._upperBuildings.add(t),i&&(n=!0);else{!this._upperBuildings.has(t)&&!this._lowerBuildings.has(t)&&!this._hiddenBuildings.has(t)&&(this._upperBuildings.add(t),i&&(n=!0))}n&&i.split(",").forEach((e=>{this._hiddenBuildings.has(e)||(this._upperBuildings.delete(e),this._lowerBuildings.add(e))}))}}_setDisplayedLevels(){this._handleBuildings(this._upperBuildings,this._upperLevels),this._handleBuildings(this._lowerBuildings,this._lowerLevels)}_filterTiles(){this._filterIndoorLayers([...this._upperLevels],this._upperLayers??[]),this._filterIndoorLayers([...this._lowerLevels],this._lowerLayers??[]),this._filterIndoorLayers([...this._upperLevels,...this._lowerLevels],this._commonLayers??[])}_filterIndoorLayers(e,t){if(t.length){let i;for(const n of t){const t=n,r=t["source-layer"];if("mapxus_venue"===r||"mapxus_building"===r)continue;const o=t.layout?.visibility,{id:s,filter:a}=t;"none"===o&&this._map.setLayoutProperty(s,"visibility","visible"),a&&(i=["all","mapxus_level"===r?["in","id",...e]:["in","ref:level",...e],a],"mapxus_place"===r&&i.splice(2,0,["any",["all",["has","overlap"],["in","ref:building",...this._upperBuildings]],["!has","overlap"]]),this._map.setFilter(s,i))}}}async _updateIndoorState(e,t){if(e){if(!e.properties)return void console.warn("Building feature properties is empty.",e);const{id:i,"ref:venue":n,level_ids:r,ordinals:o}=e.properties;if(this._curVenueId!==n){this._curVenueId=n;let e=this.getFeaturesById(n,{layerIds:["mapxus-venue-fill"]})[0]??null;if(!e)try{const t=await Cs.searchByIds(n);e=function(e){const{address:t,buildings:i,id:n,name:r,type:o}=e;return{layer:{id:"mapxus-venue-fill"},properties:{...Yi(t,((e,t,i)=>Object.assign(e,"default"===i?{"addr:street":t.street,"addr:housenumber":t.housenumber}:{[`addr:street:${i}`]:t.street})),{}),...Hi(r,((e,t)=>"default"===t?"name":`name:${t}`)),id:n,venue:o,building_ids:i.map((({id:e})=>e)).join()},source:"indoor-planet",sourceLayer:"mapxus_venue"}}(t.data.result.venues[0])}catch(e){throw new Error("Venue not found.",{cause:e})}this._curVenueFeature=e}this._curBuildingFeature=e,this._curBuildingId=i,this._history.addHistoryBuilding(i);const s=o.split(",");if(t){const i=s[Yr(r.split(","),(e=>e===t))];i||console.warn("Building has no corresponding ordinal.",e),this._ordinal=i??null}else{let t=this._history.getHistoryOrdinal(this._isVenueMode?this._history.getHistoryBuilding(n):i);(!t||t&&!s.includes(t))&&(t=this._getBuildingDefaultOrdinal(e)),this._ordinal=t}}else this._clear()}_updateFloorState(e){if(this._ordinal=e,this._floorName=null,this._floorId=null,e){const{code:e,id:t}=this._getBuildingFloorByOrdinal(this._curBuildingFeature,this._ordinal);if(this._floorName=e,this._floorId=t,!t)return;this._history.setHistoryOrdinal(this._curBuildingId,this._ordinal),this._isVenueMode&&this._history.setHistoryBuilding(this._curVenueId,this._curBuildingId)}}_resetSelectedBuildingLevel(){(this._isVenueMode?this._curVenueFeature?this._curVenueFeature.properties.building_ids.split(","):[]:[this._curBuildingId]).forEach((e=>{this._upperBuildings.delete(e),this._lowerBuildings.delete(e),this._hiddenBuildings.delete(e)})),this._upperBuildings.add(this._curBuildingId);const e=this._curBuildingFeature.properties.overlap;e&&e.split(",").forEach((e=>{this._upperBuildings.has(e)&&(this._upperBuildings.delete(e),this._lowerBuildings.add(e))}))}async _checkAndPanToBuilding(){this.getFeaturesById(this._curBuildingId,{layerIds:[Ms]})[0]||(this._fitBuildingBounds?this.fitBuildingBbox():await this.panToBuildingCenter())}_invisibleSelectedBuilding(){if(this._isVenueMode){if(!this._curVenueFeature)return;const{building_ids:e}=this._curVenueFeature.properties;e&&e.split(",").forEach((e=>{this._upperBuildings.delete(e),this._lowerBuildings.delete(e)}))}else this._curBuildingId&&(this._upperBuildings.delete(this._curBuildingId),this._lowerBuildings.delete(this._curBuildingId))}_clearTimers(){clearInterval(this._findBuildingIntervalId),this._findBuildingIntervalId=null,clearTimeout(this._findBuildingTimeoutId),this._findBuildingTimeoutId=null}}const Os="Poi_poiClick";class Ps{_map;_layerIds=[];_dispatch=Ko(Os);_debounceQueryFeatures;constructor(e){this._map=e,this._bindEvents()}destroy(){this._dispatch.on(`.${Os}`,null),this._debounceQueryFeatures?.cancel()}onPoiClick(e){const t=vs(`${Os}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}_bindEvents(){this._map.on("styledata",this._debounceQueryFeatures=ls((()=>this._queryPoiLayers()),300)),this._initPoiClick()}_queryPoiLayers(){this._layerIds=so(ms(g(this._map.getStyle()),(e=>"mapxus_place"===e["source-layer"])),(({id:e})=>e))}_initPoiClick(){this._map.on("click",(e=>{const t=this._map.queryRenderedFeatures(e.point,{layers:[...this._layerIds,"mapxus-building-line","mapxus-venue-fill"]});if(t.length){const i=Xr(t,(e=>e.layer.id.indexOf("mapxus-poi")>-1));if(i?.properties){const{"ref:level":n=null,"ref:building":r}=i.properties,o=Xr(t,(e=>e.properties.id===r))??null,s=Xr(t,(e=>e.properties.id===o?.properties?.["ref:venue"]))??null,{floorName:a,ordinal:l}=this._getFloorDataByFloorId(n,o);this._dispatch.call(Os,null,{coordinate:e.lngLat,poi:i,building:o,venue:s,floor:{code:a,id:n,ordinal:l}})}}}))}_getFloorDataByFloorId(e,t){let i=null,n=null;if(e&&t?.properties){const{level_ids:r,level_names:o,ordinals:s}=t.properties,a=r?.split(",")||[],l=Yr(a,(t=>t===e));l>-1&&(i=(o?.split(",")||[])[l]??null,n=(s?.split(",")||[])[l]??null)}return{floorName:i,ordinal:n}}}function Fs(e){e.parentNode&&e.parentNode.removeChild(e)}function js(e,t,i){const n=document.createElement(e);return t&&(n.className=t),i&&i.appendChild(n),n}const $s=function(e){return"number"==typeof e||te(e)&&"[object Number]"==P(e)};class Ts{_map;_maplibre;_buildingId;_features;_$container;_$listContainer;_$buildingList;_listHeight;_language;_visible;_position="top-right";_isMobileMode;_isListShown=!1;constructor(e,t){this._map=e,this._language=e.getLanguage(),this._visible=t??!0,this._detectDeviceMode()}onAdd(e){return this._maplibre=e,this._$container=js("div","maplibregl-ctrl maplibregl-ctrl-building-filter "+(this._visible?"":"hide"),this._maplibre.getContainer()),this._$container.appendChild(this._buildingFilterIconCreate("div")),this._$container.appendChild(this._buildingNameListCreate("div")),this._bindEvents(),this._$container}onRemove(){Fs(this._$container)}get position(){return this._position}get enabled(){return this._visible}getDefaultPosition(){return"top-right"}setVisibility(e){this._visible=e,e?this._$showLayout():this._$hideLayout()}changePosition(e,t,i){const n=document.querySelector(`.maplibregl-ctrl-${e}`),r=n.querySelector(".maplibregl-ctrl-building-filter");if(e!==t){this._position=t;const e=document.querySelector(`.maplibregl-ctrl-${t}`);r&&(n.removeChild(r),$s(i)?e.insertBefore(r,e.children[i]):e.append(r),this._updateBuildingListLayout(t))}else $s(i)&&n.children[i]!==r&&(n.removeChild(r),n.insertBefore(r,n.children[i]))}_bindEvents(){this._maplibre.on("moveend",(()=>this._refresh())),this._map.onMapChangeListener((e=>{const t=e.building?.properties?.id??"";this._buildingId!==t&&(this._buildingId=t,this._refresh())})),this._map.renderComplete((()=>this._init()))}_init(){this._load()}_refresh(){this._load()}_load(){this._buildingNameListClean(),this._buildingNameListUpdate()}_buildingFilterIconCreate(e){const t=js(e,"mapxus-building-filter-icon");return this._bindMouseOnEvents(t,!1),this._bindMobileTouchEvents(t),t}_buildingNameListCreate(e){return this._$listContainer=js(e,"mapxus-building-name-layout"),this._$listContainer.style.display="none",this._$listContainer.style.top="20px",this._$buildingList=js(e,"mapxus-building-name-list",this._$listContainer),this._bindMouseOnEvents(this._$listContainer,!0),this._$listContainer}_buildingNameListUpdate(){this._features=[];const e=this._map.getMaplibre(),t=e?e.queryRenderedFeatures({layers:["mapxus-building-line"]}):[];for(const e of t){const{properties:t}=e,{id:i,name:n}=t,r=t?.[`name:${this._language}`]??n;Xr(this._features,(e=>e.properties.id===i))||(this._features.push(e),this._$buildingList.appendChild(this._buildingNameCreate("p",r,i,i===this._map.building?.properties?.id)))}this._setBuildingListHeight(this._features),this._updateBuildingListLayout(this._position)}_buildingNameListClean(){this._$buildingList.replaceChildren()}_setBuildingListHeight(e){const t=e.map((e=>{const t=e?.properties?.[`name:${this._language}`]??e?.properties?.name;return t?Math.ceil(8*t.length/107):0})).reduce(((e,t)=>e+t),0);this._listHeight=26*t+8*e.length,this._$buildingList.style.height=this._$listContainer.style.height=`${this._listHeight>=208?208:this._listHeight}px`}_buildingNameCreate(e,t,i,n){const r=js(e,"mapxus-building-name"+(n?" active":""));return r.dataset.id=i,r.innerText=t,this._buildingNameClickEvent(r),r}_toggleList(e){this._isListShown=e,this._$listContainer.style.display=e?"block":"none"}_buildingNameClickEvent(e){e.onclick||(e.onclick=async e=>{const t=e.target;await this._map.selectBuildingById(t.dataset.id)})}_bindMouseOnEvents(e,t){e.onmouseenter=()=>{this._isMobileMode||this._toggleList(!0)},t&&(e.onmouseleave=()=>this._toggleList(!1))}_bindMobileTouchEvents(e){window.addEventListener("resize",(()=>this._detectDeviceMode())),e.ontouchend=()=>this._toggleList(!this._isListShown)}_$showLayout(){this._$container.classList.remove("hide")}_$hideLayout(){this._$container.classList.add("hide")}_updateBuildingListLayout(e){e.indexOf("left")>-1?(this._$listContainer.style.right=null,this._$listContainer.style.left="55px"):(this._$listContainer.style.left=null,this._$listContainer.style.right="55px");const t=this._$container.offsetParent?this._$container.offsetParent.clientHeight-(this._$container.offsetTop+this._$container.clientHeight)-25:0;e.includes("bottom")&&this._listHeight-20>t?(this._$listContainer.style.top=null,this._$listContainer.style.bottom="15px"):(this._$listContainer.style.bottom=null,this._$listContainer.style.top="20px")}_detectDeviceMode(){this._isMobileMode=window.matchMedia("(pointer: coarse)").matches||window.innerWidth<=768}}const As=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e};const Rs=function(e){return"function"==typeof e?e:Ai};const Vs=function(e,t){return(ae(e)?As:Gi)(e,Rs(t))};var Ns=Math.max,Ds=Math.min;const Hs=function(e,t,i){return e>=Ds(t,i)&&e<Ns(t,i)};const Ws=function(e,t,i){return t=zr(t),void 0===i?(i=t,t=0):i=zr(i),e=Hr(e),Hs(e,t,i)};class zs{_container;_indoor;_maplibre;_position="top-right";_buildingId=null;_floorNames;_ordinals;_ordinal=null;_style;_$innerFloors;_$activeFloor;_centerSelectorIdx;_lastNormalScrollableIdx;_$arrowBtnUp;_$arrowBtnDown;_maxScrollTop;_$selectorExpanded;_$selectorFolded;_componentDidMount=!1;_isEnabled;_visible=!1;_dragPan;_debounceScroll;_clearScrollEventListener;constructor(e,t){const{style:i,enabled:n=!0}=t;this._indoor=e,this._style=i?Object.assign({},No,i):No,this._isEnabled=n,this._bindEvents()}onAdd(e){return this._maplibre=e,this._addMapMoveEventListener(),this._container=js("div","maplibregl-ctrl mapxus-ctrl-floors hidden"),this._container}onRemove(){this._debounceScroll&&this._debounceScroll.cancel(),this._clearScrollEventListener&&this._clearScrollEventListener(),Fs(this._container)}get position(){return this._position}get enabled(){return this._isEnabled}setEnabled(e){this._isEnabled=e,e&&!this._visible&&this._setVisibility(!0),!e&&this._visible&&this._setVisibility(!1)}getDefaultPosition(){return"top-right"}async switchByOrdinal(e,t){this._ordinal=e,this._dragPan=t??!0,await this._indoor.switchFloorByOrdinal(e),this._updateSelectorStatus(e),this._scrollCenterActiveFloor()}changePosition(e,t,i){const n=document.querySelector(`.maplibregl-ctrl-${e}`),r=n.querySelector(".mapxus-ctrl-floors");if(e!==t){this._position=t;const e=document.querySelector(`.maplibregl-ctrl-${t}`);r&&(n.removeChild(r),$s(i)?e.insertBefore(r,e.children[i]):e.append(r),this._show(),this._scrollCenterActiveFloor())}else $s(i)&&n.children[i]!==r&&(n.removeChild(r),n.insertBefore(r,n.children[i]),this._show(),this._scrollCenterActiveFloor())}setStyle(e){this._style=Object.assign({},this._style,e),this._componentDidMount&&(this._clearFloors(),this._render(),this._scrollCenterActiveFloor(),this._componentDidMount=!0)}_setVisibility(e){this._componentDidMount?e?(this._show(),this._scrollCenterActiveFloor()):this._hide():(this._visible=e,this._indoor.building&&e&&(this._mountFloors(this._indoor.building),this._show(),this._scrollCenterActiveFloor()))}_bindEvents(){this._indoor.on(Ss,(({buildingId:e,ordinal:t,dragPan:i})=>{if(this._buildingId=e,this._ordinal=t,this._dragPan=i,this._visible&&this._hide(),this._componentDidMount&&this._clearFloors(),this._indoor.building){this._mountFloors(this._indoor.building);const e=this._indoor.getFeaturesById(this._buildingId,{layerIds:["mapxus-building-line"]})[0];this.enabled&&(!1!==this._dragPan||!1===this._dragPan&&e)&&(this._show(),this._scrollCenterActiveFloor())}else this._clearState()}))}_addMapMoveEventListener(){this._maplibre.on("moveend",(()=>{if(this.enabled&&!1===this._dragPan&&this._buildingId){const e=this._indoor.getFeaturesById(this._buildingId,{layerIds:["mapxus-building-line"]})[0];e?this._componentDidMount?this._visible||(this._show(),this._scrollCenterActiveFloor()):(this._mountFloors(e),this._show(),this._scrollCenterActiveFloor()):this._componentDidMount&&this._visible&&this._hide()}}))}_mountFloors(e){this._updateFloorSelector(e),this._componentDidMount=!0}_updateFloorSelector(e){const{level_names:t,ordinals:i}=e.properties;this._floorNames=t.split(",").reverse(),this._ordinals=i.split(",").reverse(),this._render()}_clearState(){this._floorNames=[],this._ordinals=[],this._ordinal=null}_render(){const{itemCount:e,itemSize:t}=this._style;this._centerSelectorIdx=Math.ceil(e/2)-1,this._maxScrollTop=(this._floorNames.length-e)*t,this._lastNormalScrollableIdx=this._floorNames.length-(e-this._centerSelectorIdx-1)-1,this._createFloors()}_hide(){this._container.classList.add("hidden"),this._visible=!1}_show(){this._container.classList.remove("hidden"),this._visible=!0}_createFloors(){this._$selectorFolded=this._$foldedSelector(this._container,(()=>{this._expandSelector(!0),this._scrollCenterActiveFloor()})),this._$selectorExpanded=this._$expandedSelector(this._container,(()=>this._expandSelector(!1)))}_$expandedSelector(e,t){const{itemSize:i,itemCount:n,defaultFolded:r,backgroundColor:o}=this._style,s=js("div","mapxus-ctrl-floors-expanded "+(r?"hidden":""),e);if(this._floorNames.length>1){js("div","mapxus-ctrl-floors-close",s).onclick=t}const a=js("div","mapxus-ctrl-floors-wrapper",s);return a.style.backgroundColor=o,this._floorNames.length>n&&(this._$arrowBtnUp=this._$createScrollButton(a,"up"),this._$arrowBtnUp.onclick=()=>this._handleScroll("up")),this._$innerFloors=js("div","mapxus-ctrl-floors-inner",a),Object.assign(this._$innerFloors.style,{maxHeight:i*n+"px",width:`${i}px`}),this._$createFloors(this._$innerFloors),this._floorNames.length>n&&(this._$arrowBtnDown=this._$createScrollButton(a,"down"),this._$arrowBtnDown.onclick=()=>this._handleScroll("down"),this._$innerFloors.addEventListener("scroll",this._debounceScroll=ls((e=>{e.stopPropagation(),this._resetArrowBtnStatus(this._$innerFloors.scrollTop)}),100)),this._clearScrollEventListener=()=>this._$innerFloors.removeEventListener("scroll",this._debounceScroll)),s}_$foldedSelector(e,t){const{itemSize:i,activeFontColor:n,activeBackgroundColor:r,defaultFolded:o}=this._style,s=js("div","mapxus-ctrl-floors-folded mapxus-ctrl-floors-floor "+(o?"":"hidden"),e);return s.onclick=t,Object.assign(s.style,{width:`${i}px`,height:`${i}px`,lineHeight:`${i}px`,color:n,backgroundColor:r}),s}_clearFloors(){this._container.replaceChildren(),this._componentDidMount=!1}_$createScrollButton(e,t){return js("div",`mapxus-ctrl-floors-arrow mapxus-ctrl-floors-floor ${t}`,e)}_$createFloors(e){const{fontColor:t,itemSize:i}=this._style;let n;Vs(this._floorNames,((r,o)=>{n=js("div","mapxus-ctrl-floors-floor",e),n.dataset.floor=r,n.dataset.ordinal=this._ordinals[o],n.innerText=r,Object.assign(n.style,{color:t,height:`${i}px`,lineHeight:`${i}px`}),n.dataset.ordinal===this._ordinal&&(this._$activeFloor=n,this._resetActiveFloor(!0),this._$selectorFolded.innerText=r),n.onclick=async e=>{this._indoor.setDragPan("restrict"),await this.switchByOrdinal(e.target.dataset.ordinal)}}))}_updateSelectorStatus(e){const t=this._floorNames[this._ordinals.indexOf(e)];this._$activeFloor&&this._resetActiveFloor(!1),Vs(this._$innerFloors.children,(t=>{t.dataset.ordinal===e&&(this._$activeFloor=t,this._resetActiveFloor(!0))})),this._$selectorFolded.innerText=t}_resetArrowBtnStatus(e){0===e?this._$arrowBtnUp?.classList?.add("hidden"):this._$arrowBtnUp?.classList?.remove("hidden"),e===this._maxScrollTop?this._$arrowBtnDown?.classList?.add("hidden"):this._$arrowBtnDown?.classList?.remove("hidden")}_resetActiveFloor(e){const{activeBackgroundColor:t,backgroundColor:i,activeFontColor:n,fontColor:r}=this._style;Object.assign(this._$activeFloor.style,{color:e?n:r,backgroundColor:e?t:i,fontWeight:e?"bold":"normal",cursor:e?"auto":"pointer"}),this._$activeFloor.disabled=e}_scrollCenterActiveFloor(){if(this._ordinal){const e=this._ordinals.indexOf(this._ordinal);e>-1&&(this._$innerFloors.scrollTop=this._getScrollTop(e),this._$innerFloors.scrollTop||this._resetArrowBtnStatus(0))}}_getScrollTop(e){return Ws(this._centerSelectorIdx,this._lastNormalScrollableIdx+1)?(e-this._centerSelectorIdx)*this._style.itemSize:e>this._lastNormalScrollableIdx?this._maxScrollTop:0}_handleScroll(e){const t=this._$innerFloors.scrollTop,{itemSize:i}=this._style;if("up"===e){const e=t-2*i;this._$innerFloors.scrollTop=e<0?0:e}else if("down"===e){const e=t+2*i;this._$innerFloors.scrollTop=e>this._maxScrollTop?this._maxScrollTop:e}}_expandSelector(e){e?(this._$selectorExpanded.classList.remove("hidden"),this._$selectorFolded.classList.add("hidden")):(this._$selectorExpanded.classList.add("hidden"),this._$selectorFolded.classList.remove("hidden"))}}class Gs{_container;_isEnabled;constructor(e){this._isEnabled=e?.enabled??!0}onAdd(e){if(this._container=js("div","maplibregl-ctrl mapxus-ctrl-logo",e.getContainer()),this._isEnabled){const e=js("a","mapxus-logo",this._container);e.target="_blank",e.href="https://www.khi.co.jp/groupvision2030/mapxus.html",e.setAttribute("aria-label","Mapxus logo"),e.setAttribute("rel","noopener"),this._container.appendChild(e)}return this._container}onRemove(){Fs(this._container)}getDefaultPosition(){return"bottom-left"}}class Zs{_container;_anchor;_theme;constructor(e){this._theme=e.theme?e.theme:"default"}onAdd(e){return this._container=js("div","maplibregl-ctrl mapxus-ctrl-attribution",e.getContainer()),this._anchor=js("a","mapxus-attribution",this._container),this._anchor.target="_blank",this._setCopyrightInfo(this._theme),this._anchor.setAttribute("aria-label","Mapxus attribution"),this._anchor.setAttribute("rel","noopener"),this._container.appendChild(this._anchor),this._container}onRemove(){Fs(this._container)}getDefaultPosition(){return"bottom-right"}changeTheme(e){this._setCopyrightInfo(e)}_setCopyrightInfo(e){this._anchor.innerText="landsD"===e?"© The Government of the Hong Kong SAR":"©Mapxus driven by Kawasaki ©OpenStreetMap contributors","landsD"===e&&(this._anchor.href="https://www.map.gov.hk/gm/")}}class Ys{_container;_$icon;_removeClickEventListener;onAdd(e){return this._container=js("div","maplibregl-ctrl mapxus-ctrl-collapsed-copyright",e.getContainer()),this._container.innerHTML='\n <div class="mapxus-collapsed-copyright-content">\n <div class="mapxus-collapsed-copyright-menu hidden">\n <div class="mapxus-collapsed-copyright-logo" onclick="window.open(\'https://www.khi.co.jp/groupvision2030/mapxus.html\')"></div>\n <div class="mapxus-collapsed-horizontal-divider"></div>\n <div class="mapxus-collapsed-copyright-text" onclick="window.open(\'https://www.openstreetmap.org/copyright/\')"></div>\n </div>\n <div class="mapxus-collapsed-copyright-btn"></div>\n </div>\n ',this._bindEvents(),this._container}onRemove(){this._removeClickEventListener(),Fs(this._container)}getDefaultPosition(){return"bottom-right"}_bindEvents(){const e=this._container.querySelector(".mapxus-collapsed-copyright-menu");this._$icon=this._container.querySelector(".mapxus-collapsed-copyright-btn");let t=!1;function i(){t=!t,t?e.classList.remove("hidden"):e.classList.add("hidden")}this._$icon.addEventListener("click",i),this._removeClickEventListener=()=>this._$icon.removeEventListener("click",i)}}function Xs(e){return`${qi}/api/v3/tiles/styles/${e}`}const Us=Xs("christmas_mims2_v1"),Js=Xs("common_mims2_v1"),qs=Xs("halloween_mims2_v1"),Qs=Xs("mappybee_mims2_v1"),Ks=Xs("mapxus_mims2_v1"),ea=Xs("lands_d_mims2_v1"),ta=Xs("mapxus_mims2_v5");class ia{_indoor;_isEnabled=!0;constructor(e){this._indoor=e}enable(){this._isEnabled=!0,this._indoor.setAllowOutdoorSwitch(!0)}disable(){this._isEnabled=!1,this._indoor.setAllowOutdoorSwitch(!1)}get isEnabled(){return this._isEnabled}}class na{_indoor;_isEnabled=!0;constructor(e){this._indoor=e}enable(){this._isEnabled=!0,this._indoor.setAllowBuildingSwitch(!0)}disable(){this._isEnabled=!1,this._indoor.setAllowBuildingSwitch(!1)}get isEnabled(){return this._isEnabled}}class ra{_buildingSelector;_isEnabled=!0;_position;constructor(e){this._buildingSelector=e}enable(){this._isEnabled=!0,this._buildingSelector.enabled||this._buildingSelector.setVisibility(!0)}disable(){this._isEnabled=!1,this._buildingSelector.enabled&&this._buildingSelector.setVisibility(!1)}setPosition(e,t){this._position=e,this._buildingSelector.changePosition(this._buildingSelector.position,e,t)}get isEnabled(){return this._isEnabled}get position(){return this._position}}class oa{_floorSelector;_isEnabled;_position;constructor(e){this._floorSelector=e,this._position=e.position,this._isEnabled=this._floorSelector.enabled}enable(){this._isEnabled=!0,this._floorSelector.setEnabled(!0)}disable(){this._isEnabled=!1,this._floorSelector.setEnabled(!1)}setPosition(e,t){this._position=e,this._floorSelector.changePosition(this._floorSelector.position,e,t)}setStyle(e){this._floorSelector.setStyle(e)}get isEnabled(){return this._isEnabled}get position(){return this._position}}const sa="Map_mapClick",aa="Map_pointClick",la="Map_isRenderComplete",ca="Map_isDestroyed";class ua{_appId;_map;_indoor;_poi;_floorsControl;_buildingFilterControl;_attributionControl;_initialHiddenLayers;_language;_dispatch=Ko(sa,aa,la,ca);_fitBuildingBounds;_history=es.getInstance();_hiddenBuildings=ts.getInstance().getHiddenBuildings();_debounceHTTPErrorHandler;_debounceTilesFilter;_transformRequestHandler;isDestroyed=!1;switchOutdoor;switchBuilding;buildingSelector;floorSelector;constructor(e){const{map:t,appId:i,secret:n,poiId:r,floorId:o,buildingId:s,venueId:l,theme:c=a.MAPXUS_DEFAULT,floorSelectorEnabled:u,buildingSelectorEnabled:d,outdoorMapShown:h,collapseCopyright:p=!1,floorSwitchMode:f,maskNonSelectedAreas:_,fitBuildingBounds:g=!1,boundsPadding:m=30,selectedBuildingBorderStyle:y,floorSelectorStyle:v,language:b=Do,autoSelectBuilding:w=!1,transformRequest:L=null,mapxusLogoEnabled:I=!0,platform:S}=e;if(!t)throw new Error("Outdoor Map parameter missing.");if(!i||!n)throw new Error("Permission parameter missing.");S&&Qr.setPlatform(S),no.setHeaders(i,n).then((()=>{this._appId=i,this._map=t,this._language=b,this._indoor=new Es({map:this._map,startWithIndoorView:Boolean(l||s||o||r),outdoorMapShown:h,floorSwitchMode:f,fitBuildingBounds:g,boundsPadding:m,maskNonSelectedAreas:_,selectedBuildingBorderStyle:y}),this._poi=new Ps(this._map),this._fitBuildingBounds=g,this._transformRequestHandler=L,this._resourceRequestTransform(),this._setStyle(this._getStyleUrl(c)),this._checkMapZoom(),p?this._attributionControl=new Ys:(this._attributionControl=new Zs({theme:c}),this._addControl(new Gs({enabled:I}))),this._addControl(this._attributionControl),this._addControl(this._buildingFilterControl=new Ts(this,d)),this._addControl(this._floorsControl=new zs(this._indoor,{style:v,enabled:u})),r?this._selectPoiById(r):o?this.selectFloorById(o):s?this.selectBuildingById(s):l&&this.selectVenueById(l),this.switchOutdoor=new ia(this._indoor),this.switchBuilding=new na(this._indoor),this.buildingSelector=new ra(this._buildingFilterControl),this.floorSelector=new oa(this._floorsControl),this._map.on("remove",(()=>this._destroy())),this._map.once("styledata",(()=>this._hideIndoorLayers())),this._map.on("click",(async e=>{const{point:t,lngLat:i}=e;await this._indoor.selectBuildingByClickMap(t),this._dispatch.call(aa,null,{point:t,coordinate:i}),this._dispatch.call(sa,null,{coordinate:i,venue:this.venue,building:this.building,floor:this.floor})})),this._map.on("error",this._debounceHTTPErrorHandler=ls((e=>this._updatePermission(e,i,n)),350)),this._indoor.once(ks,(()=>{this._showIndoorLayers(),this.setLanguage(this._language)})),this._indoor.once(Bs,(()=>{w&&this._map.on("moveend",(()=>this._selectCenterBuilding())),this._dispatch.call(la)}))})).catch((e=>{throw e}))}renderComplete(e){const t=vs(`${la}.`);this._dispatch.on(t,e)}destroyed(e){const t=vs(`${ca}.`);this._dispatch.on(t,(()=>{e(),this._dispatch.on(t,null),0===this._dispatch._[ca].length&&(delete this._dispatch,Object.freeze(this))}))}setTransformRequest(e){this._transformRequestHandler=e}getIndoor(){return this._indoor}getMaplibre(){return this._map}get floor(){return this.getIndoor()?.floor??null}get building(){return this.getIndoor()?.building??null}get venue(){return this.getIndoor()?.venue??null}setLanguage(e){this._language!==e&&(this._language=e);const t=this._map?.getStyle(),i=t?.layers;if(i&&i.length){const t=i.filter((({type:e})=>"symbol"===e));t.length&&t.forEach((({id:t})=>{this._map.getLayer(t)&&this._map.setLayoutProperty(t,"text-field",["coalesce",["get",`name:${e}`],["get","name"]])}))}}getLanguage(){return this._language}setOutdoorMapShown(e){this.getIndoor()?.setOutdoorMapShown(e)}getIndoorFeaturesByCoordinates(e,t){const i=this._map.project(e),n=this._map.queryRenderedFeatures(i,{layers:["mapxus-venue-fill","mapxus-building-line","mapxus-level-fill","mapxus-level-fill-overlap-copy"]});let r=null,o=null,s=null;if(n.length){const e=n.filter((e=>e.layer.id.includes("mapxus-level-fill")));s=Xr(e,(e=>$s(t)?e.properties.ordinal===t+"":e.layer.id.startsWith("mapxus-level-fill"))),s&&(o=Xr(n,(e=>e.properties.id===s.properties["ref:building"])),r=Xr(n,(e=>e.properties.id===o.properties["ref:venue"])))}return{venue:r,building:o,level:s}}getFeaturesById(e,t){return this.getIndoor()?.getFeaturesById(e,t)||[]}async selectFloorById(e,t){const{dragPan:i=!0}=t||{};if(this._indoor.setDragPan(i),e===this.floor?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let t,n,r;if(this._fitBuildingBounds){t=await Zo(e),n=Xi(t),r=!0;const{maxLat:i,maxLon:o,minLat:s,minLon:a}=t.bbox;this._indoor.setBuildingBounds([[a,s],[o,i]])}else n=Xr(this._indoor?.features||[],(t=>t.properties?.level_ids?.includes(e)&&"mapxus-building-line"===t.layer.id))??null,n?r=!1:(t=await Zo(e),n=Xi(t),r=!0);if(n&&n?.properties?.id===this.building?.properties?.id){const{level_ids:t,ordinals:r}=n.properties,o=t.split(",").indexOf(e),s=r.split(",")[o]??null;await this._floorsControl.switchByOrdinal(s,i)}else await(this._indoor?.selectBuilding(n,{floorId:e,featureIncomplete:r}))}}async selectBuildingById(e,t){const{dragPan:i=!0}=t||{};if(this._indoor.setDragPan(i),e===this.building?.properties?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let t,i,n=!1;if(this._fitBuildingBounds){t=await Go(e),i=Xi(t),n=!0;const{maxLat:r,maxLon:o,minLat:s,minLon:a}=t.bbox;this._indoor.setBuildingBounds([[a,s],[o,r]])}else i=this._map.getLayer("mapxus-building-line")&&this.getFeaturesById(e,{layerIds:["mapxus-building-line"]})[0]||null,i||(t=await Go(e),i=Xi(t),n=!0);await(this._indoor?.selectBuilding(i,{featureIncomplete:n}))}}async selectVenueById(e,t){const{dragPan:i=!0}=t||{};if(this._indoor.setDragPan(i),e)if(e===this.venue?.properties?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let t=this._history.getHistoryBuilding(e);if(!t){const i=this._map.getLayer("mapxus-venue-fill")&&this.getFeaturesById(e,{layerIds:["mapxus-venue-fill"]})[0];if(i){const{default_displayed_building:e,building_ids:n}=i.properties;t=e||(n?.split(",")||[])[0]}else{const i=await async function(e){try{return(await Wo.searchByIds(e)).data.result.venues[0]}catch(e){throw new Error(e)}}(e);t=i.defaultBuilding||i.buildings[0]?.id}}await this.selectBuildingById(t,{dragPan:i})}else await(this._indoor?.selectBuilding(null))}onMapClickListener(e){const t=vs(`${sa}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}onPoiClickListener(e){return this._poi?.onPoiClick(e)}onPointClickListener(e){const t=vs(`${aa}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}onMapChangeListener(e){return this._indoor?.onMapChange(e)}switchTheme(e){this._setStyle(this._getStyleUrl(e)),"changeTheme"in this._attributionControl&&this._attributionControl.changeTheme(e),this._map?.once("styledata",this._debounceTilesFilter=ls((()=>this._setIndoorFilter()),250))}setSelectedBuildingBorderStyle(e){return this._indoor?.setSelectedBuildingBorderStyle(e),this}_getStyleUrl(e){let t;if(Mo(a).indexOf(e)>-1)switch(e){case a.CHRISTMAS:t=Us;break;case a.HALLOWEEN:t=qs;break;case a.MAPPY_BEE:t=Qs;break;case a.MAPXUS:t=Ks;break;case a.COMMON:t=Js;break;case a.LANDS_D:t=ea;break;default:t=ta}else t=function(e){return Xs(e)}(e);return t}_setIndoorFilter(){this._indoor.updateCustomLayers(),this._indoor.updateRendering()}_setStyle(e){this._map?.setStyle(e,{localIdeographFontFamily:!1})}_addControl(e,t){this._map.addControl(e,t)}async _selectPoiById(e){try{const t=await async function(e){try{return(await zo.searchByIds([e])).data.result.pois[0]}catch(e){throw new Error(e)}}(e),{floorId:i,location:{lon:n,lat:r}}=t;await this.selectFloorById(i),this._map.panTo([n,r])}catch(e){throw new Error(e)}}_resourceRequestTransform(){this._map.setTransformRequest(((e,t)=>{const{host:i}=new URL(e);return i.includes("map-api")&&i.includes("mapxus")?no.getDefaultRequestParams(e):this._transformRequestHandler?this._transformRequestHandler(e,t):{url:e}}))}_checkMapZoom(){const e=this._map.getZoom();(e<8||e>22)&&e>1&&console.warn("Indoor maps perform better at zoom levels [8, 22].")}_hideIndoorLayers(){this._initialHiddenLayers=g(this._map.getStyle()).filter((({id:e})=>!e.includes("mapxus-building")||"mapxus-venue-fill"!==e)),this._initialHiddenLayers.forEach((({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility","none")}))}_showIndoorLayers(){Vs(this._initialHiddenLayers,(({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility","visible")}))}_updatePermission(e,t,i){401===e.error?.status&&no.setHeaders(t,i).then((()=>{this._resourceRequestTransform()}))}_selectCenterBuilding(){const e=this._getCenterBuildingsMap();if(e.size){let t=e.entries().next().value[0];const i=this._history.getHistoryBuildings();if(i.size){const n=Array.from(i).reverse();for(const i of n)if(e.get(i)){t=i;break}}this.selectBuildingById(t,{dragPan:!1})}}_getCenterBuildingsMap(){const e=this._map.getCanvas().getBoundingClientRect(),t=e.width/4,i=e.height/4,n=[t,i],r=[e.width-t,e.height-i];let o=this._map.queryRenderedFeatures([n,r],{layers:["mapxus-building-line"]});return o=_s(o,"properties.id"),o=ms(o,(e=>!this._hiddenBuildings.has(e.properties.id))),new globalThis.Map(o.map((e=>[`${e.properties.id}`,e])))}_destroy(){if(this.isDestroyed)return;this.isDestroyed=!0,this._debounceHTTPErrorHandler?.cancel(),this._debounceTilesFilter?.cancel();const e=this._dispatch._;for(const t in e)t!==ca&&e.hasOwnProperty(t)&&e[t].forEach((({name:e})=>{this._dispatch.on(`${t}.${e}`,null)}));Jr.getInstance().deleteToken(this._appId,l.Map),this._indoor.destroy(),this._poi.destroy(),Object.keys(this).forEach((e=>{"isDestroyed"!==e&&"_dispatch"!==e&&delete this[e]})),this._dispatch.call(ca)}}async function da(e,t){if(!e.hasImage(t))try{const i=await e.loadImage(t);e.addImage(t,i.data)}catch(e){throw new Error(e)}}class ha{_maplibreMap;_layerId;_sourceId;_imageName="poi-01";_imageSize=.75;_iconAnchor="bottom";constructor(e){this._maplibreMap=e;const t=vs();this._layerId=`MXMap_preset_marker_layer_${t}`,this._sourceId=`MXMap_preset_marker_source_${t}`}async setIcon(e){e&&await da(this._maplibreMap,e),this._imageName=e}setIconSize(e){this._imageSize=e}setIconAnchor(e){this._iconAnchor=e}get layerId(){return this._layerId}get sourceId(){return this._sourceId}create(e){if(e.length){const t=so(e,(e=>this._createIconFeature(e)));this._addIconSource(t),this._addIconLayer()}}updateData(e){const t=this._maplibreMap.getSource(this._sourceId);if(!t)return;const i=!(!e.remove||!e.remove.length),n=!(!e.add||!e.add.length),r=!(!e.update||!e.update.length);if(i||n||r){const o={};i&&(o.remove=e.remove.map((e=>String(e)))),n&&(o.add=e.add.map((e=>this._createIconFeature(e)))),r&&(o.update=e.update.map((e=>{const t="properties"in e,i=this._createIconFeature(e),{id:n,geometry:r,properties:o}=i;return{id:n,newGeometry:r,removeAllProperties:t,...o?{addOrUpdateProperties:so(o,((e,t)=>({key:t,value:e})))}:{}}}))),t.updateData(o)}}remove(){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.removeLayer(this._layerId),this._maplibreMap.getSource(this._sourceId)&&this._maplibreMap.removeSource(this._sourceId)}on(e,t){const i=e=>this._handleEventListener(e,t);return this._maplibreMap.on(e,this._layerId,i),{off:()=>this._maplibreMap.off(e,this._layerId,i)}}setFilter(e){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,e)}setFilterByVenue(e,t){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,["any",["all",["==",["get","venueId"],e??""],["==",["get","ordinal"],t??""]],["all",["==",["get","venueId"],""],["==",["get","ordinal"],""]]])}setFilterByBuilding(e,t){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,["any",["all",["==",["get","buildingId"],e??""],["==",["get","ordinal"],t??""]],["all",["==",["get","buildingId"],""],["==",["get","ordinal"],""]]])}setOpacity(e){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",e)}setOpacityByVenue(e,t,i){if(this._maplibreMap.getLayer(this._layerId)){const n=["case",["all",["==",["get","venueId"],e??""],["==",["get","ordinal"],t??""]],1,["all",["==",["get","venueId"],""],["==",["get","ordinal"],""]],1,i??.5];this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",n)}}setOpacityByBuilding(e,t,i){if(this._maplibreMap.getLayer(this._layerId)){const n=["case",["all",["==",["get","buildingId"],e??""],["==",["get","ordinal"],t??""]],1,["all",["==",["get","buildingId"],""],["==",["get","ordinal"],""]],1,i??.5];this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",n)}}_createIconFeature(e){const{lngLat:t,properties:i}=e;return{id:"featureId"in e&&$s(e.featureId)?String(e.featureId):void 0,type:"Feature",geometry:{type:"Point",coordinates:t},properties:i||null}}_addIconSource(e){const t={type:"geojson",data:{type:"FeatureCollection",features:e}};this._maplibreMap.addSource(this._sourceId,t)}_addIconLayer(){this._maplibreMap.addLayer({id:this._layerId,type:"symbol",source:this._sourceId,layout:{"icon-image":this._imageName,"icon-size":this._imageSize,"icon-anchor":this._iconAnchor,"icon-allow-overlap":!0,"icon-ignore-placement":!0}})}_handleEventListener(e,t){const{point:i}=e;t(this._maplibreMap.queryRenderedFeatures(i,{layers:[this._layerId]})[0])}}const pa=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},fa={indoorLineColor:"#45b1cc",outdoorLineColor:"#8183ba",dashedLineColor:"#969696",shuttleBusLineColor:"#fb923c",lineWidth:4,dashedLineWidth:4,disableDashedLine:!1,inactiveRouteOpacity:.5,outdoorLineOpacity:1,markerIconSize:.75,markers:{from:"poi-02",to:"poi-01",stops:["waypoint-01"]},lineSymbol:{image:"east-blue-arrow-01",size:.25,spacing:1}},_a="mmws-source-line-solid",ga="mmws-layer-line-solid",ma="mmws-layer-icon-line-symbol",ya="mmws-source-line-dashed",va="mmws-layer-line-dashed",ba="mmws-source-icon-connector",wa="mmws-layer-icon-connector",La="mmws-source-icon-marker",Ia="mmws-layer-icon-marker",Sa=[ga,ma,va,wa,Ia],Ba=[_a,ya,ba,La];class ka{_maplibreMap;_routeStyle=fa;_styleDiffs={};_filterBy="venue";_curVenue=null;_curBuilding=null;_curOrdinal=null;constructor(e,t){this._maplibreMap=e,t&&(this._updateStyleProperties(t),e.on("load",(()=>this._loadMarkerIcons())))}async setStyle(e){this._updateStyleProperties(e),await this._loadMarkerIcons(),await this._updateLayers()}async setMarkerIcons(e){if(ae(e)&&e.length){const t=e.slice(1,e.length-1);this._routeStyle.markers={from:e[0],to:pa(e),stops:t.length?t:[e[0]]},this._styleDiffs={markers:this._routeStyle.markers}}else"from"in e&&(this._routeStyle.markers.from=e.from,this._styleDiffs.markers.from=e.from),"to"in e&&(this._routeStyle.markers.to=e.to,this._styleDiffs.markers.to=e.to),"stops"in e&&(this._routeStyle.markers.stops=e.stops??[null],this._styleDiffs.markers.stops=e.stops??[null]);await this._loadMarkerIcons()}setMarkerIconSize(e){return this._routeStyle.markerIconSize=e,this}setIndoorLineColor(e){return this._routeStyle.indoorLineColor=e,this}setOutdoorLineColor(e){return this._routeStyle.outdoorLineColor=e,this}setDashedLineColor(e){return this._routeStyle.dashedLineColor=e,this}setBusLineColor(e){return this._routeStyle.shuttleBusLineColor=e,this}render(e,t){const{instructions:i,points:{coordinates:n}}=e,{lineFeatures:r,connectorFeatures:o,dashedLineFeatures:s,markerFeatures:a}=this._classifyFeatures(i,n,t);this._renderSolidLines(r),this._renderLineSymbols(_a,ma),!0!==this._routeStyle.disableDashedLine&&this._renderDashedLines(s),this._renderConnectors(o),this._renderMarkers(a)}remove(){Sa.forEach((e=>{this._maplibreMap.getLayer(e)&&this._maplibreMap.removeLayer(e)})),Ba.forEach((e=>{this._maplibreMap.getSource(e)&&this._maplibreMap.removeSource(e)}))}setFilterByVenue(e,t){this._filterBy="venue",this._curVenue=e??null,this._curOrdinal=t??null,this._filterRouteOpacity()}setFilterByBuilding(e,t){this._filterBy="building",this._curBuilding=e??null,this._curOrdinal=t??null,this._filterRouteOpacity()}_classifyFeatures(e,t,i){const n=[],r=[],o=[],s=[],a=[];Vs(e,((i,o)=>{const{venue_id:s,building_id:l,floor_id:c,ordinal:u,sign:d,type:h,interval:[p,f]}=i;if(function(e){return 5===e}(d))a.push(i);else if(function(e){return 100===e||-100===e}(d)){0!==o&&o!==e.length-1&&r.push(this._createIconFeature(`connector-${r.length}`,t[p],{...Ma({venue_id:s,building_id:l,floor_id:c,ordinal:u}),icon:h}));const i=e[o+1];if(i){const{venue_id:e,building_id:n,floor_id:o,ordinal:s}=i;r.push(this._createIconFeature(`connector-${r.length}`,t[f],{...Ma({venue_id:e,building_id:n,floor_id:o,ordinal:s}),icon:h}))}}else n.push(this._createLineFeature(`solid-line-${n.length}`,t.slice(p,f+1),Ma({venue_id:s,building_id:l,floor_id:c,ordinal:u,isShuttleBus:xa(d)?1:0})))}));const l=e[0],{venue_id:c,building_id:u,floor_id:d,ordinal:h}=l,p=e[e.length-1],{venue_id:f,building_id:_,floor_id:g,ordinal:m}=p,y=t[0],v=t[t.length-1],b=i[0],w=i[i.length-1],L=i.slice(1,i.length-1);return b&&o.push(this._createLineFeature(`dashed-line-${o.length}`,[b,y],Ma({venue_id:c,building_id:u,floor_id:d,ordinal:h}))),w&&o.push(this._createLineFeature(`dashed-line-${o.length}`,[v,w],Ma({venue_id:f,building_id:_,floor_id:g,ordinal:m}))),a.length&&L.length&&a.forEach((({venue_id:e,building_id:i,floor_id:n,ordinal:r,interval:[a]},l)=>{o.push(this._createLineFeature(`dashed-line-${o.length}`,[t[a],L[l]],Ma({venue_id:e,building_id:i,floor_id:n,ordinal:r}))),s.push(this._createIconFeature(`marker-${s.length}`,L[l],{...Ma({venue_id:e,building_id:i,floor_id:n,ordinal:r,markerType:`stops_${l}`}),icon:this._routeStyle.markers.stops[l]??pa(this._routeStyle.markers.stops),iconSize:this._routeStyle.markerIconSize}))})),s.push(this._createIconFeature(`marker-${s.length}`,b??y,{...Ma({venue_id:c,building_id:u,floor_id:d,ordinal:h,markerType:"from"}),icon:this._routeStyle.markers.from,iconSize:this._routeStyle.markerIconSize})),s.push(this._createIconFeature(`marker-${s.length}`,w??v,{...Ma({venue_id:f,building_id:_,floor_id:g,ordinal:m,markerType:"to"}),icon:this._routeStyle.markers.to,iconSize:this._routeStyle.markerIconSize})),{lineFeatures:n,connectorFeatures:r,dashedLineFeatures:o,markerFeatures:s}}_createLineFeature(e,t,i){return{id:e,type:"Feature",geometry:{type:"LineString",coordinates:t},properties:i}}_createIconFeature(e,t,i){return{id:e,type:"Feature",geometry:{type:"Point",coordinates:t},properties:i}}_renderSolidLines(e){this._addCollectionSource(_a,e),this._addLineLayer(_a,ga,{"line-color":["case",["==",["get","isShuttleBus"],"1"],this._routeStyle.shuttleBusLineColor,["==",["get","floor_id"],null],this._routeStyle.outdoorLineColor,this._routeStyle.indoorLineColor],"line-opacity":["case",["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,1],"line-width":this._routeStyle.lineWidth})}_renderDashedLines(e){this._addCollectionSource(ya,e),this._addLineLayer(ya,va,{"line-color":this._routeStyle.dashedLineColor,"line-width":this._routeStyle.dashedLineWidth,"line-dasharray":[.1,1.8]})}_renderConnectors(e){this._addCollectionSource(ba,e),this._addIconLayer(ba,wa)}_renderMarkers(e){this._addCollectionSource(La,e),this._addIconLayer(La,Ia,{"icon-anchor":"bottom","icon-allow-overlap":!0,"icon-ignore-placement":!0})}_addCollectionSource(e,t){this._maplibreMap.addSource(e,{type:"geojson",data:{type:"FeatureCollection",features:t}})}_addLineLayer(e,t,i){this._maplibreMap.addLayer({id:t,type:"line",source:e,layout:{"line-join":"round","line-cap":"round"},paint:{"line-width":4,...i||{}}})}_renderLineSymbols(e,t){this._maplibreMap.addLayer({id:t,type:"symbol",source:e,layout:{"symbol-placement":"line","symbol-spacing":this._routeStyle.lineSymbol.spacing,"icon-size":this._routeStyle.lineSymbol.size,"icon-image":this._routeStyle.lineSymbol.image},paint:{"icon-opacity":["case",["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,1]}})}_addIconLayer(e,t,i){this._maplibreMap.addLayer({id:t,type:"symbol",source:e,layout:{"icon-image":["get","icon"],"icon-size":["case",["has","iconSize"],["get","iconSize"],1],...i||{}}})}_updateStyleProperties(e){if(this._styleDiffs=Ca(this._routeStyle,e??fa),e){if(Object.keys(this._styleDiffs).length){const e={...this._routeStyle.lineSymbol,...this._styleDiffs.lineSymbol??{}},t=this._styleDiffs.markers;let i=this._routeStyle.markers;const n={outdoorLineOpacity:(this._styleDiffs.outdoorLineOpacity>1?1:this._styleDiffs.outdoorLineOpacity<0?0:this._styleDiffs.outdoorLineOpacity)??this._routeStyle.outdoorLineOpacity},r={inactiveRouteOpacity:(this._styleDiffs.inactiveRouteOpacity>1?1:this._styleDiffs.inactiveRouteOpacity<0?0:this._styleDiffs.inactiveRouteOpacity)??this._routeStyle.inactiveRouteOpacity};t&&Object.keys(t).length&&(i={...i,...t}),this._routeStyle={...this._routeStyle,...this._styleDiffs,...n,...r,markers:i,lineSymbol:e}}}else this._routeStyle=fa}async _loadMarkerIcons(){const{markers:e,lineSymbol:t}=this._styleDiffs;if(t?.image&&await da(this._maplibreMap,t.image),e&&Object.keys(e).length){const{from:t,to:i,stops:n}=e;if(t&&await da(this._maplibreMap,t),i&&await da(this._maplibreMap,i),n&&n.length){const e=n.filter((e=>!!e));e.length&&await Promise.all(e.map((e=>da(this._maplibreMap,e))))}}}async _updateLayers(){if(!this._maplibreMap.getLayer(ga))return;const{indoorLineColor:e,outdoorLineColor:t,dashedLineColor:i,shuttleBusLineColor:n,lineWidth:r,dashedLineWidth:o,disableDashedLine:s,inactiveRouteOpacity:a,outdoorLineOpacity:l,markerIconSize:c,markers:u,lineSymbol:d}=this._styleDiffs;if((e||t||n)&&this._maplibreMap.setPaintProperty(ga,"line-color",["case",["==",["get","isShuttleBus"],"1"],this._routeStyle.shuttleBusLineColor,["==",["get","floor_id"],null],this._routeStyle.outdoorLineColor,this._routeStyle.indoorLineColor]),void 0!==r&&r+""&&this._maplibreMap.setPaintProperty(ga,"line-width",r),"boolean"==typeof s?s?this._maplibreMap.setPaintProperty(va,"line-color","transparent"):(this._maplibreMap.setPaintProperty(va,"line-color",this._routeStyle.dashedLineColor),this._maplibreMap.setPaintProperty(va,"line-width",this._routeStyle.dashedLineWidth)):!0!==this._routeStyle.disableDashedLine&&(i&&this._maplibreMap.setPaintProperty(va,"line-color",i),void 0!==o&&o+""&&this._maplibreMap.setPaintProperty(va,"line-width",o)),void 0!==a&&a+""&&this._filterRouteOpacity(),void 0!==c&&c+""&&this._maplibreMap.setLayoutProperty(Ia,"icon-size",c),u&&Object.keys(u).length){const{from:e,to:t,stops:i}=u,n=this._maplibreMap.getSource(La),r=await n.getData();r.features=r.features.map((n=>{const{markerType:r}=n.properties;if(void 0!==e&&"from"===r&&(n.properties.icon=e),void 0!==t&&"to"===r&&(n.properties.icon=t),i&&r.includes("stops")){const e=parseInt(r.split("_")[1]);n.properties.icon=i[e]??pa(i)}return n})),n.setData(r)}if(d){const{image:e,size:t,spacing:i}=d;void 0!==e&&this._maplibreMap.setLayoutProperty(ma,"icon-image",e),void 0!==t&&t+""&&this._maplibreMap.setLayoutProperty(ma,"icon-size",t),void 0!==i&&i+""&&this._maplibreMap.setLayoutProperty(ma,"symbol-spacing",i)}void 0!==l&&l+""&&(this._maplibreMap.setPaintProperty(ga,"line-opacity",["case",["==",["get","floor_id"],null],l,1]),this._maplibreMap.setPaintProperty(ma,"icon-opacity",["case",["==",["get","floor_id"],null],l,1]),this._filterRouteOpacity())}_filterRouteOpacity(){let e;switch(this._filterBy){case"venue":e=["case",["all",["==",["get","ordinal"],this._curOrdinal??""],["==",["get","venue_id"],this._curVenue??""]],1,["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,this._routeStyle.inactiveRouteOpacity];break;case"building":e=["case",["all",["==",["get","ordinal"],this._curOrdinal??""],["==",["get","building_id"],this._curBuilding??""]],1,["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,this._routeStyle.inactiveRouteOpacity]}Sa.forEach((t=>{this._maplibreMap.getLayer(t)&&this._maplibreMap.setPaintProperty(t,t.includes("layer-line")?"line-opacity":"icon-opacity",e)}))}}function Ma(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,$s(t)?t+"":t])))}function xa(e){return Ws(e,104,108)}function Ca(e,t){const i={};for(const n in t){const r=e[n],o=t[n];if("markers"===n||"lineSymbol"===n)if(ae(o)){const e=o.slice(1,o.length-1);i[n]={from:o[0],to:pa(o),stops:e.length?e:[o[0]]}}else{const e=Ca(r,o);Object.keys(e).length&&(i[n]=e)}else o+""!=r+""&&(i[n]="stops"===n?o??[null]:o)}return i}async function Ea(){return Qr.getInstance().getIdentifier()}const Oa=Or;return r})()));
|
|
1
|
+
/*! For license information please see index.umd.js.LICENSE.txt */
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("axios"),require("maplibre-gl")):"function"==typeof define&&define.amd?define(["axios","maplibre-gl"],e):"object"==typeof exports?exports.MapxusMap=e(require("axios"),require("maplibre-gl")):t.MapxusMap=e(t.axios,t["maplibre-gl"])}(self,(t,e)=>(()=>{var r={22:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.polyval=e.ghash=void 0,e._toGHASHKey=l;const n=r(6527),i=16,o=new Uint8Array(16),s=(0,n.u32)(o),a=(t,e,r,n)=>({s3:r<<31|n>>>1,s2:e<<31|r>>>1,s1:t<<31|e>>>1,s0:t>>>1^225<<24&-(1&(1&n))}),c=t=>(t>>>0&255)<<24|(t>>>8&255)<<16|(t>>>16&255)<<8|t>>>24&255;function l(t){t.reverse();const e=1&t[15];let r=0;for(let e=0;e<t.length;e++){const n=t[e];t[e]=n>>>1|r,r=(1&n)<<7}return t[0]^=225&-e,t}class u{constructor(t,e){this.blockLen=i,this.outputLen=i,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,t=(0,n.toBytes)(t),(0,n.abytes)(t,16);const r=(0,n.createView)(t);let o=r.getUint32(0,!1),s=r.getUint32(4,!1),l=r.getUint32(8,!1),u=r.getUint32(12,!1);const d=[];for(let t=0;t<128;t++)d.push({s0:c(o),s1:c(s),s2:c(l),s3:c(u)}),({s0:o,s1:s,s2:l,s3:u}=a(o,s,l,u));const h=(f=e||1024)>65536?8:f>1024?4:2;var f;if(![1,2,4,8].includes(h))throw new Error("ghash: invalid window size, expected 2, 4 or 8");this.W=h;const p=128/h,y=this.windowSize=2**h,g=[];for(let t=0;t<p;t++)for(let e=0;e<y;e++){let r=0,n=0,i=0,o=0;for(let s=0;s<h;s++){if(!(e>>>h-s-1&1))continue;const{s0:a,s1:c,s2:l,s3:u}=d[h*t+s];r^=a,n^=c,i^=l,o^=u}g.push({s0:r,s1:n,s2:i,s3:o})}this.t=g}_updateBlock(t,e,r,n){t^=this.s0,e^=this.s1,r^=this.s2,n^=this.s3;const{W:i,t:o,windowSize:s}=this;let a=0,c=0,l=0,u=0;const d=(1<<i)-1;let h=0;for(const f of[t,e,r,n])for(let t=0;t<4;t++){const e=f>>>8*t&255;for(let t=8/i-1;t>=0;t--){const r=e>>>i*t&d,{s0:n,s1:f,s2:p,s3:y}=o[h*s+r];a^=n,c^=f,l^=p,u^=y,h+=1}}this.s0=a,this.s1=c,this.s2=l,this.s3=u}update(t){(0,n.aexists)(this),t=(0,n.toBytes)(t),(0,n.abytes)(t);const e=(0,n.u32)(t),r=Math.floor(t.length/i),a=t.length%i;for(let t=0;t<r;t++)this._updateBlock(e[4*t+0],e[4*t+1],e[4*t+2],e[4*t+3]);return a&&(o.set(t.subarray(r*i)),this._updateBlock(s[0],s[1],s[2],s[3]),(0,n.clean)(s)),this}destroy(){const{t}=this;for(const e of t)e.s0=0,e.s1=0,e.s2=0,e.s3=0}digestInto(t){(0,n.aexists)(this),(0,n.aoutput)(t,this),this.finished=!0;const{s0:e,s1:r,s2:i,s3:o}=this,s=(0,n.u32)(t);return s[0]=e,s[1]=r,s[2]=i,s[3]=o,t}digest(){const t=new Uint8Array(i);return this.digestInto(t),this.destroy(),t}}class d extends u{constructor(t,e){t=(0,n.toBytes)(t),(0,n.abytes)(t);const r=l((0,n.copyBytes)(t));super(r,e),(0,n.clean)(r)}update(t){t=(0,n.toBytes)(t),(0,n.aexists)(this);const e=(0,n.u32)(t),r=t.length%i,a=Math.floor(t.length/i);for(let t=0;t<a;t++)this._updateBlock(c(e[4*t+3]),c(e[4*t+2]),c(e[4*t+1]),c(e[4*t+0]));return r&&(o.set(t.subarray(a*i)),this._updateBlock(c(s[3]),c(s[2]),c(s[1]),c(s[0])),(0,n.clean)(s)),this}digestInto(t){(0,n.aexists)(this),(0,n.aoutput)(t,this),this.finished=!0;const{s0:e,s1:r,s2:i,s3:o}=this,s=(0,n.u32)(t);return s[0]=e,s[1]=r,s[2]=i,s[3]=o,t.reverse()}}function h(t){const e=(e,r)=>t(r,e.length).update((0,n.toBytes)(e)).digest(),r=t(new Uint8Array(16),0);return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=(e,r)=>t(e,r),e}e.ghash=h((t,e)=>new u(t,e)),e.polyval=h((t,e)=>new d(t,e))},42:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},52:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(241),i=r(5572),o=r(2049),s=r(1882),a=n.A?n.A.prototype:void 0,c=a?a.toString:void 0;const l=function t(e){if("string"==typeof e)return e;if((0,o.A)(e))return(0,i.A)(e,t)+"";if((0,s.A)(e))return c?c.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},83:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.chacha20=e.xchacha20=void 0;var n=r(8900);e.xchacha20=function(t,e,r){return(0,n.xchacha20poly1305)(t,e,r)};e.chacha20=function(t,e,r){return(0,n.chacha20poly1305)(t,e,r)}},169:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(6984);const i=function(t,e){for(var r=t.length;r--;)if((0,n.A)(t[r][0],e))return r;return-1}},180:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(702),i=r(1917);const o=(0,n.A)(i.A,"Promise")},181:(t,e,r)=>{"use strict";r.d(e,{d:()=>n});class n{static instance;_buildingUnitsMap;_ordinalsMap;_visitedBuildingUnits;constructor(){this._buildingUnitsMap=new Map,this._ordinalsMap=new Map,this._visitedBuildingUnits=[]}static getInstance(){return n.instance||(n.instance=new n),n.instance}getBuildingUnitByVenue(t){return this._buildingUnitsMap.get(t)}setBuildingUnitByVenue(t,e){this._buildingUnitsMap.set(t,e)}getOrdinalByBuildingUnit(t){return this._ordinalsMap.get(t)}setOrdinalByBuildingUnit(t,e){this._ordinalsMap.set(t,e)}getVisitedBuildingUnits(){return this._visitedBuildingUnits}addVisitedBuildingUnit(t){this._visitedBuildingUnits.push(t),this._visitedBuildingUnits.length>100&&(this._visitedBuildingUnits=this._visitedBuildingUnits.slice(this._visitedBuildingUnits.length-100))}}},241:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=r(1917).A.Symbol},244:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSharedKey=e.deriveKey=void 0;var n=r(6527),i=r(4139),o=r(7076);e.deriveKey=function(t,e,r){return(0,i.hkdf)(o.sha256,t,e,r,32)};e.getSharedKey=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0,e.deriveKey)(n.concatBytes.apply(void 0,t))}},251:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,l=c>>1,u=-7,d=r?i-1:0,h=r?-1:1,f=t[e+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+t[e+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+t[e+d],d+=h,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=l}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,l=8*o-i-1,u=(1<<l)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(e*c-1)*Math.pow(2,i),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;t[r+f]=255&s,f+=p,s/=256,l-=8);t[r+f-p]|=128*y}},367:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return function(r){return t(e(r))}}},402:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var n=r(241),i=r(3988),o=r(6984),s=r(8967),a=r(4877),c=r(9959),l=n.A?n.A.prototype:void 0,u=l?l.valueOf:void 0;const d=function(t,e,r,n,l,d,h){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!d(new i.A(t),new i.A(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,o.A)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var f=a.A;case"[object Set]":var p=1&n;if(f||(f=c.A),t.size!=e.size&&!p)return!1;var y=h.get(t);if(y)return y==e;n|=2,h.set(t,e);var g=(0,s.A)(f(t),f(e),n,l,d,h);return h.delete(t),g;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},423:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var n=r(9520),i=r(1788),o=r(2049),s=r(4616),a=r(5353),c=r(8719),l=Object.prototype.hasOwnProperty;const u=function(t,e){var r=(0,o.A)(t),u=!r&&(0,i.A)(t),d=!r&&!u&&(0,s.A)(t),h=!r&&!u&&!d&&(0,c.A)(t),f=r||u||d||h,p=f?(0,n.A)(t.length,String):[],y=p.length;for(var g in t)!e&&!l.call(t,g)||f&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||(0,a.A)(g,y))||p.push(g);return p}},451:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(241),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n.A?n.A.toStringTag:void 0;const c=function(t){var e=o.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var i=s.call(t);return n&&(e?t[a]=r:delete t[a]),i}},459:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hash_to_ristretto255=e.hashToRistretto255=e.RistrettoPoint=e.encodeToCurve=e.hashToCurve=e.ed25519_hasher=e.edwardsToMontgomery=e.x25519=e.ed25519ph=e.ed25519ctx=e.ed25519=e.ED25519_TORSION_SUBGROUP=void 0,e.edwardsToMontgomeryPub=S,e.edwardsToMontgomeryPriv=function(t){const e=A.hash(t.subarray(0,32));return A.adjustScalarBytes(e).subarray(0,32)};const n=r(7076),i=r(9175),o=r(2422),s=r(6377),a=r(1761),c=r(4967),l=r(2854),u=r(8627),d=BigInt(0),h=BigInt(1),f=BigInt(2),p=BigInt(3),y=BigInt(5),g=BigInt(8),m={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:g,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function _(t){const e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),o=m.p,s=t*t%o*t%o,a=(0,c.pow2)(s,f,o)*s%o,l=(0,c.pow2)(a,h,o)*t%o,u=(0,c.pow2)(l,y,o)*l%o,d=(0,c.pow2)(u,e,o)*u%o,p=(0,c.pow2)(d,r,o)*d%o,g=(0,c.pow2)(p,n,o)*p%o,_=(0,c.pow2)(g,i,o)*g%o,b=(0,c.pow2)(_,i,o)*g%o,v=(0,c.pow2)(b,e,o)*u%o;return{pow_p_5_8:(0,c.pow2)(v,f,o)*t%o,b2:s}}function b(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const v=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function w(t,e){const r=m.p,n=(0,c.mod)(e*e*e,r),i=_(t*(0,c.mod)(n*n*e,r)).pow_p_5_8;let o=(0,c.mod)(t*n*i,r);const s=(0,c.mod)(e*o*o,r),a=o,l=(0,c.mod)(o*v,r),u=s===t,d=s===(0,c.mod)(-t,r),h=s===(0,c.mod)(-t*v,r);return u&&(o=a),(d||h)&&(o=l),(0,c.isNegativeLE)(o,r)&&(o=(0,c.mod)(-o,r)),{isValid:u||d,value:o}}e.ED25519_TORSION_SUBGROUP=["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"];const B=(()=>(0,c.Field)(m.p,void 0,!0))(),A=(()=>({...m,Fp:B,hash:n.sha512,adjustScalarBytes:b,uvRatio:w}))();function E(t,e,r){if(e.length>255)throw new Error("Context is too big");return(0,i.concatBytes)((0,i.utf8ToBytes)("SigEd25519 no Ed25519 collisions"),new Uint8Array([r?1:0,e.length]),e,t)}function S(t){const r=(0,u.ensureBytes)("pub",t),{y:n}=e.ed25519.Point.fromHex(r),i=BigInt(1);return B.toBytes(B.create((i+n)*B.inv(i-n)))}e.ed25519=(0,s.twistedEdwards)(A),e.ed25519ctx=(0,s.twistedEdwards)({...A,domain:E}),e.ed25519ph=(0,s.twistedEdwards)(Object.assign({},A,{domain:E,prehash:n.sha512})),e.x25519=(()=>{const t=m.p;return(0,l.montgomery)({P:t,type:"x25519",powPminus2:e=>{const{pow_p_5_8:r,b2:n}=_(e);return(0,c.mod)((0,c.pow2)(r,p,t)*n,t)},adjustScalarBytes:b})})(),e.edwardsToMontgomery=S;const I=(()=>(B.ORDER+p)/g)(),x=(()=>B.pow(f,I))(),L=(()=>B.sqrt(B.neg(B.ONE)))();const k=(()=>(0,c.FpSqrtEven)(B,B.neg(BigInt(486664))))();function O(t){const{xMn:e,xMd:r,yMn:n,yMd:i}=function(t){const e=(B.ORDER-y)/g,r=BigInt(486662);let n=B.sqr(t);n=B.mul(n,f);let i=B.add(n,B.ONE),o=B.neg(r),s=B.sqr(i),a=B.mul(s,i),c=B.mul(n,r);c=B.mul(c,o),c=B.add(c,s),c=B.mul(c,o);let l=B.sqr(a);s=B.sqr(l),l=B.mul(l,a),l=B.mul(l,c),s=B.mul(s,l);let u=B.pow(s,e);u=B.mul(u,l);let d=B.mul(u,L);s=B.sqr(u),s=B.mul(s,a);let p=B.eql(s,c),m=B.cmov(d,u,p),_=B.mul(o,n),b=B.mul(u,t);b=B.mul(b,x);let v=B.mul(b,L),w=B.mul(c,n);s=B.sqr(b),s=B.mul(s,a);let A=B.eql(s,w),E=B.cmov(v,b,A);s=B.sqr(m),s=B.mul(s,a);let S=B.eql(s,c),I=B.cmov(_,o,S),k=B.cmov(E,m,S),O=B.isOdd(k);return k=B.cmov(k,B.neg(k),S!==O),{xMn:I,xMd:i,yMn:k,yMd:h}}(t);let o=B.mul(e,i);o=B.mul(o,k);let s=B.mul(r,n),a=B.sub(e,r),l=B.add(e,r),u=B.mul(s,l),d=B.eql(u,B.ZERO);o=B.cmov(o,B.ZERO,d),s=B.cmov(s,B.ONE,d),a=B.cmov(a,B.ONE,d),l=B.cmov(l,B.ONE,d);const[p,m]=(0,c.FpInvertBatch)(B,[s,l],!0);return{x:B.mul(o,p),y:B.mul(a,m)}}function C(t){if(!(t instanceof N))throw new Error("RistrettoPoint expected")}e.ed25519_hasher=(0,a.createHasher)(e.ed25519.Point,t=>O(t[0]),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:B.ORDER,m:1,k:128,expand:"xmd",hash:n.sha512}),e.hashToCurve=e.ed25519_hasher.hashToCurve,e.encodeToCurve=e.ed25519_hasher.encodeToCurve;const T=v,P=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),F=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),R=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),M=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),H=t=>w(h,t),U=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),V=t=>e.ed25519.CURVE.Fp.create((0,u.bytesToNumberLE)(t)&U);function j(t){const{d:r}=e.ed25519.CURVE,n=e.ed25519.CURVE.Fp.ORDER,i=e.ed25519.CURVE.Fp.create,o=i(T*t*t),s=i((o+h)*R);let a=BigInt(-1);const l=i((a-r*o)*i(o+r));let{isValid:u,value:d}=w(s,l),f=i(d*t);(0,c.isNegativeLE)(f,n)||(f=i(-f)),u||(d=f),u||(a=o);const p=i(a*(o-h)*M-l),y=d*d,g=i((d+d)*l),m=i(p*P),_=i(h-y),b=i(h+y);return new e.ed25519.Point(i(g*b),i(_*m),i(m*b),i(g*_))}class N{constructor(t){this.ep=t}static fromAffine(t){return new N(e.ed25519.Point.fromAffine(t))}static hashToCurve(t){t=(0,u.ensureBytes)("ristrettoHash",t,64);const e=j(V(t.slice(0,32))),r=j(V(t.slice(32,64)));return new N(e.add(r))}static fromBytes(t){return(0,i.abytes)(t),this.fromHex(t)}static fromHex(t){t=(0,u.ensureBytes)("ristrettoHex",t,32);const{a:r,d:n}=e.ed25519.CURVE,i=B.ORDER,o=B.create,s="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",a=V(t);if(!(0,u.equalBytes)((0,u.numberToBytesLE)(a,32),t)||(0,c.isNegativeLE)(a,i))throw new Error(s);const l=o(a*a),f=o(h+r*l),p=o(h-r*l),y=o(f*f),g=o(p*p),m=o(r*n*y-g),{isValid:_,value:b}=H(o(m*g)),v=o(b*p),w=o(b*v*m);let A=o((a+a)*v);(0,c.isNegativeLE)(A,i)&&(A=o(-A));const E=o(f*w),S=o(A*E);if(!_||(0,c.isNegativeLE)(S,i)||E===d)throw new Error(s);return new N(new e.ed25519.Point(A,E,h,S))}static msm(t,r){const n=(0,c.Field)(e.ed25519.CURVE.n,e.ed25519.CURVE.nBitLength);return(0,o.pippenger)(N,n,t,r)}toBytes(){let{ex:t,ey:e,ez:r,et:n}=this.ep;const i=B.ORDER,o=B.create,s=o(o(r+e)*o(r-e)),a=o(t*e),l=o(a*a),{value:d}=H(o(s*l)),h=o(d*s),f=o(d*a),p=o(h*f*n);let y;if((0,c.isNegativeLE)(n*p,i)){let r=o(e*T),n=o(t*T);t=r,e=n,y=o(h*F)}else y=f;(0,c.isNegativeLE)(t*p,i)&&(e=o(-e));let g=o((r-e)*y);return(0,c.isNegativeLE)(g,i)&&(g=o(-g)),(0,u.numberToBytesLE)(g,32)}toRawBytes(){return this.toBytes()}toHex(){return(0,u.bytesToHex)(this.toBytes())}toString(){return this.toHex()}equals(t){C(t);const{ex:e,ey:r}=this.ep,{ex:n,ey:i}=t.ep,o=B.create,s=o(e*i)===o(r*n),a=o(r*i)===o(e*n);return s||a}add(t){return C(t),new N(this.ep.add(t.ep))}subtract(t){return C(t),new N(this.ep.subtract(t.ep))}multiply(t){return new N(this.ep.multiply(t))}multiplyUnsafe(t){return new N(this.ep.multiplyUnsafe(t))}double(){return new N(this.ep.double())}negate(){return new N(this.ep.negate())}}e.RistrettoPoint=(N.BASE||(N.BASE=new N(e.ed25519.Point.BASE)),N.ZERO||(N.ZERO=new N(e.ed25519.Point.ZERO)),N);e.hashToRistretto255=(t,e)=>{const r=e.DST,o="string"==typeof r?(0,i.utf8ToBytes)(r):r,s=(0,a.expand_message_xmd)(t,o,64,n.sha512);return N.hashToCurve(s)},e.hash_to_ristretto255=e.hashToRistretto255},469:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unsafe=e.aeskwp=e.aeskw=e.siv=e.gcmsiv=e.gcm=e.cfb=e.cbc=e.ecb=e.ctr=void 0;const n=r(22),i=r(6527),o=16,s=new Uint8Array(o);function a(t){return t<<1^283&-(t>>7)}function c(t,e){let r=0;for(;e>0;e>>=1)r^=t&-(1&e),t=a(t);return r}const l=(()=>{const t=new Uint8Array(256);for(let e=0,r=1;e<256;e++,r^=a(r))t[e]=r;const e=new Uint8Array(256);e[0]=99;for(let r=0;r<255;r++){let n=t[255-r];n|=n<<8,e[t[r]]=255&(n^n>>4^n>>5^n>>6^n>>7^99)}return(0,i.clean)(t),e})(),u=l.map((t,e)=>l.indexOf(e)),d=t=>t<<24|t>>>8,h=t=>t<<8|t>>>24,f=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;function p(t,e){if(256!==t.length)throw new Error("Wrong sbox length");const r=new Uint32Array(256).map((r,n)=>e(t[n])),n=r.map(h),i=n.map(h),o=i.map(h),s=new Uint32Array(65536),a=new Uint32Array(65536),c=new Uint16Array(65536);for(let e=0;e<256;e++)for(let l=0;l<256;l++){const u=256*e+l;s[u]=r[e]^n[l],a[u]=i[e]^o[l],c[u]=t[e]<<8|t[l]}return{sbox:t,sbox2:c,T0:r,T1:n,T2:i,T3:o,T01:s,T23:a}}const y=p(l,t=>c(t,3)<<24|t<<16|t<<8|c(t,2)),g=p(u,t=>c(t,11)<<24|c(t,13)<<16|c(t,9)<<8|c(t,14)),m=(()=>{const t=new Uint8Array(16);for(let e=0,r=1;e<16;e++,r=a(r))t[e]=r;return t})();function _(t){(0,i.abytes)(t);const e=t.length;if(![16,24,32].includes(e))throw new Error("aes: invalid key size, should be 16, 24 or 32, got "+e);const{sbox2:r}=y,n=[];(0,i.isAligned32)(t)||n.push(t=(0,i.copyBytes)(t));const o=(0,i.u32)(t),s=o.length,a=t=>w(r,t,t,t,t),c=new Uint32Array(e+28);c.set(o);for(let t=s;t<c.length;t++){let e=c[t-1];t%s===0?e=a(d(e))^m[t/s-1]:s>6&&t%s===4&&(e=a(e)),c[t]=c[t-s]^e}return(0,i.clean)(...n),c}function b(t){const e=_(t),r=e.slice(),n=e.length,{sbox2:o}=y,{T0:s,T1:a,T2:c,T3:l}=g;for(let t=0;t<n;t+=4)for(let i=0;i<4;i++)r[t+i]=e[n-t-4+i];(0,i.clean)(e);for(let t=4;t<n-4;t++){const e=r[t],n=w(o,e,e,e,e);r[t]=s[255&n]^a[n>>>8&255]^c[n>>>16&255]^l[n>>>24]}return r}function v(t,e,r,n,i,o){return t[r<<8&65280|n>>>8&255]^e[i>>>8&65280|o>>>24&255]}function w(t,e,r,n,i){return t[255&e|65280&r]|t[n>>>16&255|i>>>16&65280]<<16}function B(t,e,r,n,i){const{sbox2:o,T01:s,T23:a}=y;let c=0;e^=t[c++],r^=t[c++],n^=t[c++],i^=t[c++];const l=t.length/4-2;for(let o=0;o<l;o++){const o=t[c++]^v(s,a,e,r,n,i),l=t[c++]^v(s,a,r,n,i,e),u=t[c++]^v(s,a,n,i,e,r),d=t[c++]^v(s,a,i,e,r,n);e=o,r=l,n=u,i=d}return{s0:t[c++]^w(o,e,r,n,i),s1:t[c++]^w(o,r,n,i,e),s2:t[c++]^w(o,n,i,e,r),s3:t[c++]^w(o,i,e,r,n)}}function A(t,e,r,n,i){const{sbox2:o,T01:s,T23:a}=g;let c=0;e^=t[c++],r^=t[c++],n^=t[c++],i^=t[c++];const l=t.length/4-2;for(let o=0;o<l;o++){const o=t[c++]^v(s,a,e,i,n,r),l=t[c++]^v(s,a,r,e,i,n),u=t[c++]^v(s,a,n,r,e,i),d=t[c++]^v(s,a,i,n,r,e);e=o,r=l,n=u,i=d}return{s0:t[c++]^w(o,e,i,n,r),s1:t[c++]^w(o,r,e,i,n),s2:t[c++]^w(o,n,r,e,i),s3:t[c++]^w(o,i,n,r,e)}}function E(t,e,r,n){(0,i.abytes)(e,o),(0,i.abytes)(r);const s=r.length;n=(0,i.getOutput)(s,n),(0,i.complexOverlapBytes)(r,n);const a=e,c=(0,i.u32)(a);let{s0:l,s1:u,s2:d,s3:h}=B(t,c[0],c[1],c[2],c[3]);const f=(0,i.u32)(r),p=(0,i.u32)(n);for(let e=0;e+4<=f.length;e+=4){p[e+0]=f[e+0]^l,p[e+1]=f[e+1]^u,p[e+2]=f[e+2]^d,p[e+3]=f[e+3]^h;let r=1;for(let t=a.length-1;t>=0;t--)r=r+(255&a[t])|0,a[t]=255&r,r>>>=8;({s0:l,s1:u,s2:d,s3:h}=B(t,c[0],c[1],c[2],c[3]))}const y=o*Math.floor(f.length/4);if(y<s){const t=new Uint32Array([l,u,d,h]),e=(0,i.u8)(t);for(let t=y,i=0;t<s;t++,i++)n[t]=r[t]^e[i];(0,i.clean)(t)}return n}function S(t,e,r,n,s){(0,i.abytes)(r,o),(0,i.abytes)(n),s=(0,i.getOutput)(n.length,s);const a=r,c=(0,i.u32)(a),l=(0,i.createView)(a),u=(0,i.u32)(n),d=(0,i.u32)(s),h=e?0:12,f=n.length;let p=l.getUint32(h,e),{s0:y,s1:g,s2:m,s3:_}=B(t,c[0],c[1],c[2],c[3]);for(let r=0;r+4<=u.length;r+=4)d[r+0]=u[r+0]^y,d[r+1]=u[r+1]^g,d[r+2]=u[r+2]^m,d[r+3]=u[r+3]^_,p=p+1>>>0,l.setUint32(h,p,e),({s0:y,s1:g,s2:m,s3:_}=B(t,c[0],c[1],c[2],c[3]));const b=o*Math.floor(u.length/4);if(b<f){const t=new Uint32Array([y,g,m,_]),e=(0,i.u8)(t);for(let t=b,r=0;t<f;t++,r++)s[t]=n[t]^e[r];(0,i.clean)(t)}return s}function I(t){if((0,i.abytes)(t),t.length%o!==0)throw new Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size 16")}function x(t,e,r){(0,i.abytes)(t);let n=t.length;const s=n%o;if(!e&&0!==s)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");(0,i.isAligned32)(t)||(t=(0,i.copyBytes)(t));const a=(0,i.u32)(t);if(e){let t=o-s;t||(t=o),n+=t}r=(0,i.getOutput)(n,r),(0,i.complexOverlapBytes)(t,r);return{b:a,o:(0,i.u32)(r),out:r}}function L(t,e){if(!e)return t;const r=t.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");const n=t[r-1];if(n<=0||n>16)throw new Error("aes/pcks5: wrong padding");const i=t.subarray(0,-n);for(let e=0;e<n;e++)if(t[r-e-1]!==n)throw new Error("aes/pcks5: wrong padding");return i}function k(t){const e=new Uint8Array(16),r=(0,i.u32)(e);e.set(t);const n=o-t.length;for(let t=o-n;t<o;t++)e[t]=n;return r}function O(t,e,r,n,o){const s=o?o.length:0,a=t.create(r,n.length+s);o&&a.update(o);const c=(0,i.u64Lengths)(8*n.length,8*s,e);a.update(n),a.update(c);const l=a.digest();return(0,i.clean)(c),l}e.ctr=(0,i.wrapCipher)({blockSize:16,nonceLength:16},function(t,e){function r(r,n){if((0,i.abytes)(r),void 0!==n&&((0,i.abytes)(n),!(0,i.isAligned32)(n)))throw new Error("unaligned destination");const o=_(t),s=(0,i.copyBytes)(e),a=[o,s];(0,i.isAligned32)(r)||a.push(r=(0,i.copyBytes)(r));const c=E(o,s,r,n);return(0,i.clean)(...a),c}return{encrypt:(t,e)=>r(t,e),decrypt:(t,e)=>r(t,e)}}),e.ecb=(0,i.wrapCipher)({blockSize:16},function(t,e={}){const r=!e.disablePadding;return{encrypt(e,n){const{b:o,o:s,out:a}=x(e,r,n),c=_(t);let l=0;for(;l+4<=o.length;){const{s0:t,s1:e,s2:r,s3:n}=B(c,o[l+0],o[l+1],o[l+2],o[l+3]);s[l++]=t,s[l++]=e,s[l++]=r,s[l++]=n}if(r){const t=k(e.subarray(4*l)),{s0:r,s1:n,s2:i,s3:o}=B(c,t[0],t[1],t[2],t[3]);s[l++]=r,s[l++]=n,s[l++]=i,s[l++]=o}return(0,i.clean)(c),a},decrypt(e,n){I(e);const o=b(t);n=(0,i.getOutput)(e.length,n);const s=[o];(0,i.isAligned32)(e)||s.push(e=(0,i.copyBytes)(e)),(0,i.complexOverlapBytes)(e,n);const a=(0,i.u32)(e),c=(0,i.u32)(n);for(let t=0;t+4<=a.length;){const{s0:e,s1:r,s2:n,s3:i}=A(o,a[t+0],a[t+1],a[t+2],a[t+3]);c[t++]=e,c[t++]=r,c[t++]=n,c[t++]=i}return(0,i.clean)(...s),L(n,r)}}}),e.cbc=(0,i.wrapCipher)({blockSize:16,nonceLength:16},function(t,e,r={}){const n=!r.disablePadding;return{encrypt(r,o){const s=_(t),{b:a,o:c,out:l}=x(r,n,o);let u=e;const d=[s];(0,i.isAligned32)(u)||d.push(u=(0,i.copyBytes)(u));const h=(0,i.u32)(u);let f=h[0],p=h[1],y=h[2],g=h[3],m=0;for(;m+4<=a.length;)f^=a[m+0],p^=a[m+1],y^=a[m+2],g^=a[m+3],({s0:f,s1:p,s2:y,s3:g}=B(s,f,p,y,g)),c[m++]=f,c[m++]=p,c[m++]=y,c[m++]=g;if(n){const t=k(r.subarray(4*m));f^=t[0],p^=t[1],y^=t[2],g^=t[3],({s0:f,s1:p,s2:y,s3:g}=B(s,f,p,y,g)),c[m++]=f,c[m++]=p,c[m++]=y,c[m++]=g}return(0,i.clean)(...d),l},decrypt(r,o){I(r);const s=b(t);let a=e;const c=[s];(0,i.isAligned32)(a)||c.push(a=(0,i.copyBytes)(a));const l=(0,i.u32)(a);o=(0,i.getOutput)(r.length,o),(0,i.isAligned32)(r)||c.push(r=(0,i.copyBytes)(r)),(0,i.complexOverlapBytes)(r,o);const u=(0,i.u32)(r),d=(0,i.u32)(o);let h=l[0],f=l[1],p=l[2],y=l[3];for(let t=0;t+4<=u.length;){const e=h,r=f,n=p,i=y;h=u[t+0],f=u[t+1],p=u[t+2],y=u[t+3];const{s0:o,s1:a,s2:c,s3:l}=A(s,h,f,p,y);d[t++]=o^e,d[t++]=a^r,d[t++]=c^n,d[t++]=l^i}return(0,i.clean)(...c),L(o,n)}}}),e.cfb=(0,i.wrapCipher)({blockSize:16,nonceLength:16},function(t,e){function r(r,n,s){(0,i.abytes)(r);const a=r.length;if(s=(0,i.getOutput)(a,s),(0,i.overlapBytes)(r,s))throw new Error("overlapping src and dst not supported.");const c=_(t);let l=e;const u=[c];(0,i.isAligned32)(l)||u.push(l=(0,i.copyBytes)(l)),(0,i.isAligned32)(r)||u.push(r=(0,i.copyBytes)(r));const d=(0,i.u32)(r),h=(0,i.u32)(s),f=n?h:d,p=(0,i.u32)(l);let y=p[0],g=p[1],m=p[2],b=p[3];for(let t=0;t+4<=d.length;){const{s0:e,s1:r,s2:n,s3:i}=B(c,y,g,m,b);h[t+0]=d[t+0]^e,h[t+1]=d[t+1]^r,h[t+2]=d[t+2]^n,h[t+3]=d[t+3]^i,y=f[t++],g=f[t++],m=f[t++],b=f[t++]}const v=o*Math.floor(d.length/4);if(v<a){({s0:y,s1:g,s2:m,s3:b}=B(c,y,g,m,b));const t=(0,i.u8)(new Uint32Array([y,g,m,b]));for(let e=v,n=0;e<a;e++,n++)s[e]=r[e]^t[n];(0,i.clean)(t)}return(0,i.clean)(...u),s}return{encrypt:(t,e)=>r(t,!0,e),decrypt:(t,e)=>r(t,!1,e)}}),e.gcm=(0,i.wrapCipher)({blockSize:16,nonceLength:12,tagLength:16,varSizeNonce:!0},function(t,e,r){if(e.length<8)throw new Error("aes/gcm: invalid nonce length");function o(t,e,i){const o=O(n.ghash,!1,t,i,r);for(let t=0;t<e.length;t++)o[t]^=e[t];return o}function a(){const r=_(t),o=s.slice(),a=s.slice();if(S(r,!1,a,a,o),12===e.length)a.set(e);else{const t=s.slice(),r=(0,i.createView)(t);(0,i.setBigUint64)(r,8,BigInt(8*e.length),!1);const c=n.ghash.create(o).update(e).update(t);c.digestInto(a),c.destroy()}return{xk:r,authKey:o,counter:a,tagMask:S(r,!1,a,s)}}return{encrypt(t){const{xk:e,authKey:r,counter:n,tagMask:s}=a(),c=new Uint8Array(t.length+16),l=[e,r,n,s];(0,i.isAligned32)(t)||l.push(t=(0,i.copyBytes)(t)),S(e,!1,n,t,c.subarray(0,t.length));const u=o(r,s,c.subarray(0,c.length-16));return l.push(u),c.set(u,t.length),(0,i.clean)(...l),c},decrypt(t){const{xk:e,authKey:r,counter:n,tagMask:s}=a(),c=[e,r,s,n];(0,i.isAligned32)(t)||c.push(t=(0,i.copyBytes)(t));const l=t.subarray(0,-16),u=t.subarray(-16),d=o(r,s,l);if(c.push(d),!(0,i.equalBytes)(d,u))throw new Error("aes/gcm: invalid ghash tag");const h=S(e,!1,n,l);return(0,i.clean)(...c),h}}});const C=(t,e,r)=>n=>{if(!Number.isSafeInteger(n)||e>n||n>r){throw new Error(t+": expected value in range "+("["+e+".."+r+"]")+", got "+n)}};function T(t){return t instanceof Uint32Array||ArrayBuffer.isView(t)&&"Uint32Array"===t.constructor.name}function P(t,e){if((0,i.abytes)(e,16),!T(t))throw new Error("_encryptBlock accepts result of expandKeyLE");const r=(0,i.u32)(e);let{s0:n,s1:o,s2:s,s3:a}=B(t,r[0],r[1],r[2],r[3]);return r[0]=n,r[1]=o,r[2]=s,r[3]=a,e}function F(t,e){if((0,i.abytes)(e,16),!T(t))throw new Error("_decryptBlock accepts result of expandKeyLE");const r=(0,i.u32)(e);let{s0:n,s1:o,s2:s,s3:a}=A(t,r[0],r[1],r[2],r[3]);return r[0]=n,r[1]=o,r[2]=s,r[3]=a,e}e.gcmsiv=(0,i.wrapCipher)({blockSize:16,nonceLength:12,tagLength:16,varSizeNonce:!0},function(t,e,r){const o=C("AAD",0,2**36),s=C("plaintext",0,2**36),a=C("nonce",12,12),c=C("ciphertext",16,2**36+16);function l(){const r=_(t),n=new Uint8Array(t.length),o=new Uint8Array(16),s=[r,n];let a=e;(0,i.isAligned32)(a)||s.push(a=(0,i.copyBytes)(a));const c=(0,i.u32)(a);let l=0,u=c[0],d=c[1],h=c[2],f=0;for(const t of[o,n].map(i.u32)){const e=(0,i.u32)(t);for(let t=0;t<e.length;t+=2){const{s0:n,s1:i}=B(r,l,u,d,h);e[t+0]=n,e[t+1]=i,l=++f}}const p={authKey:o,encKey:_(n)};return(0,i.clean)(...s),p}function u(t,o,s){const a=O(n.polyval,!0,o,s,r);for(let t=0;t<12;t++)a[t]^=e[t];a[15]&=127;const c=(0,i.u32)(a);let l=c[0],u=c[1],d=c[2],h=c[3];return({s0:l,s1:u,s2:d,s3:h}=B(t,l,u,d,h)),c[0]=l,c[1]=u,c[2]=d,c[3]=h,a}function d(t,e,r){let n=(0,i.copyBytes)(e);n[15]|=128;const o=S(t,!0,n,r);return(0,i.clean)(n),o}return(0,i.abytes)(t,16,24,32),a(e.length),void 0!==r&&o(r.length),{encrypt(t){s(t.length);const{encKey:e,authKey:r}=l(),n=u(e,r,t),o=[e,r,n];(0,i.isAligned32)(t)||o.push(t=(0,i.copyBytes)(t));const a=new Uint8Array(t.length+16);return a.set(n,t.length),a.set(d(e,n,t)),(0,i.clean)(...o),a},decrypt(t){c(t.length);const e=t.subarray(-16),{encKey:r,authKey:n}=l(),o=[r,n];(0,i.isAligned32)(t)||o.push(t=(0,i.copyBytes)(t));const s=d(r,e,t.subarray(0,-16)),a=u(r,n,s);if(o.push(a),!(0,i.equalBytes)(e,a))throw(0,i.clean)(...o),new Error("invalid polyval tag");return(0,i.clean)(...o),s}}}),e.siv=e.gcmsiv;const R={encrypt(t,e){if(e.length>=2**32)throw new Error("plaintext should be less than 4gb");const r=_(t);if(16===e.length)P(r,e);else{const t=(0,i.u32)(e);let n=t[0],o=t[1];for(let e=0,i=1;e<6;e++)for(let e=2;e<t.length;e+=2,i++){const{s0:s,s1:a,s2:c,s3:l}=B(r,n,o,t[e],t[e+1]);n=s,o=a^f(i),t[e]=c,t[e+1]=l}t[0]=n,t[1]=o}r.fill(0)},decrypt(t,e){if(e.length-8>=2**32)throw new Error("ciphertext should be less than 4gb");const r=b(t),n=e.length/8-1;if(1===n)F(r,e);else{const t=(0,i.u32)(e);let o=t[0],s=t[1];for(let e=0,i=6*n;e<6;e++)for(let e=2*n;e>=1;e-=2,i--){s^=f(i);const{s0:n,s1:a,s2:c,s3:l}=A(r,o,s,t[e],t[e+1]);o=n,s=a,t[e]=c,t[e+1]=l}t[0]=o,t[1]=s}r.fill(0)}},M=new Uint8Array(8).fill(166);e.aeskw=(0,i.wrapCipher)({blockSize:8},t=>({encrypt(e){if(!e.length||e.length%8!=0)throw new Error("invalid plaintext length");if(8===e.length)throw new Error("8-byte keys not allowed in AESKW, use AESKWP instead");const r=(0,i.concatBytes)(M,e);return R.encrypt(t,r),r},decrypt(e){if(e.length%8!=0||e.length<24)throw new Error("invalid ciphertext length");const r=(0,i.copyBytes)(e);if(R.decrypt(t,r),!(0,i.equalBytes)(r.subarray(0,8),M))throw new Error("integrity check failed");return r.subarray(0,8).fill(0),r.subarray(8)}}));const H=2790873510;e.aeskwp=(0,i.wrapCipher)({blockSize:8},t=>({encrypt(e){if(!e.length)throw new Error("invalid plaintext length");const r=8*Math.ceil(e.length/8),n=new Uint8Array(8+r);n.set(e,8);const o=(0,i.u32)(n);return o[0]=H,o[1]=f(e.length),R.encrypt(t,n),n},decrypt(e){if(e.length<16)throw new Error("invalid ciphertext length");const r=(0,i.copyBytes)(e),n=(0,i.u32)(r);R.decrypt(t,r);const o=f(n[1])>>>0,s=8*Math.ceil(o/8);if(n[0]!==H||r.length-8!==s)throw new Error("integrity check failed");for(let t=o;t<s;t++)if(0!==r[8+t])throw new Error("integrity check failed");return r.subarray(0,8).fill(0),r.subarray(8,8+o)}})),e.unsafe={expandKeyLE:_,expandKeyDecLE:b,encrypt:B,decrypt:A,encryptBlock:P,decryptBlock:F,ctrCounter:E,ctr32:S}},520:(t,e,r)=>{"use strict";r.d(e,{z:()=>i});var n=r(1682);class i{_container;_anchor;_theme;constructor(t){this._theme=t.theme?t.theme:"default"}onAdd(t){return this._container=(0,n.r)("div","maplibregl-ctrl mapxus-ctrl-attribution",t.getContainer()),this._anchor=(0,n.r)("a","mapxus-attribution",this._container),this._anchor.target="_blank",this._setCopyrightInfo(this._theme),this._anchor.setAttribute("aria-label","Mapxus attribution"),this._anchor.setAttribute("rel","noopener"),this._container.appendChild(this._anchor),this._container}onRemove(){(0,n.Z)(this._container)}getDefaultPosition(){return"bottom-right"}changeTheme(t){this._setCopyrightInfo(t)}_setCopyrightInfo(t){this._anchor.innerText="landsD"===t?"© The Government of the Hong Kong SAR":"©Mapxus driven by Kawasaki ©OpenStreetMap contributors","landsD"===t&&(this._anchor.href="https://www.map.gov.hk/gm/")}}},549:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(5547);const i=function(t,e){var r=(0,n.A)(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},608:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(6632);const i=function(t){var e=(0,n.A)(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}},640:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n,i=r(3161),o=(n=/[^.]+$/.exec(i.A&&i.A.keys&&i.A.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";const s=function(t){return!!o&&o in t}},674:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(702).A)(Object,"create")},702:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(1979),i=r(8104);const o=function(t,e){var r=(0,i.A)(t,e);return(0,n.A)(r)?r:void 0}},759:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(3265),i=r(1038);const o=function(t,e,r,o){var s=r.length,a=s,c=!o;if(null==t)return!a;for(t=Object(t);s--;){var l=r[s];if(c&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++s<a;){var u=(l=r[s])[0],d=t[u],h=l[1];if(c&&l[2]){if(void 0===d&&!(u in t))return!1}else{var f=new n.A;if(o)var p=o(d,h,u,t,e,f);if(!(void 0===p?(0,i.A)(h,d,3,o,f):p))return!1}}return!0}},805:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e){return null==e?void 0:e[t]}}},853:(t,e,r)=>{"use strict";async function n(t,e){if(!t.hasImage(e))try{const r=await t.loadImage(e);t.addImage(e,r.data)}catch(t){throw new Error(t)}}r.d(e,{K:()=>n})},901:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(1882);const i=function(t){if("string"==typeof t||(0,n.A)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},1031:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(169);const i=function(t,e){var r=this.__data__,i=(0,n.A)(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},1038:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(3244),i=r(3098);const o=function t(e,r,o,s,a){return e===r||(null==e||null==r||!(0,i.A)(e)&&!(0,i.A)(r)?e!=e&&r!=r:(0,n.A)(e,r,o,s,t,a))}},1052:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(1917);const i=function(){return n.A.Date.now()}},1088:(t,e,r)=>{"use strict";r.d(e,{B6:()=>s.B,CA:()=>i.C,EJ:()=>n.E,Nj:()=>o.N});var n=r(2468),i=r(9644),o=r(9205),s=r(6294)},1089:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n={value:()=>{}};function i(){for(var t,e=0,r=arguments.length,n={};e<r;++e){if(!(t=arguments[e]+"")||t in n||/[\s.]/.test(t))throw new Error("illegal type: "+t);n[t]=[]}return new o(n)}function o(t){this._=t}function s(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}function a(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=n,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}o.prototype=i.prototype={constructor:o,on:function(t,e){var r,n,i=this._,o=(n=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),c=-1,l=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++c<l;)if(r=(t=o[c]).type)i[r]=a(i[r],t.name,e);else if(null==e)for(r in i)i[r]=a(i[r],t.name,null);return this}for(;++c<l;)if((r=(t=o[c]).type)&&(r=s(i[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new o(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),o=0;o<r;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,r=(n=this._[t]).length;o<r;++o)n[o].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,o=n.length;i<o;++i)n[i].value.apply(e,r)}};const c=i},1121:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=Function.prototype.toString;const i=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},1210:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.poly1305=void 0,e.wrapConstructorWithKey=s;const n=r(6527),i=(t,e)=>255&t[e++]|(255&t[e++])<<8;class o{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=(0,n.toBytes)(t),(0,n.abytes)(t,32);const e=i(t,0),r=i(t,2),o=i(t,4),s=i(t,6),a=i(t,8),c=i(t,10),l=i(t,12),u=i(t,14);this.r[0]=8191&e,this.r[1]=8191&(e>>>13|r<<3),this.r[2]=7939&(r>>>10|o<<6),this.r[3]=8191&(o>>>7|s<<9),this.r[4]=255&(s>>>4|a<<12),this.r[5]=a>>>1&8190,this.r[6]=8191&(a>>>14|c<<2),this.r[7]=8065&(c>>>11|l<<5),this.r[8]=8191&(l>>>8|u<<8),this.r[9]=u>>>5&127;for(let e=0;e<8;e++)this.pad[e]=i(t,16+2*e)}process(t,e,r=!1){const n=r?0:2048,{h:o,r:s}=this,a=s[0],c=s[1],l=s[2],u=s[3],d=s[4],h=s[5],f=s[6],p=s[7],y=s[8],g=s[9],m=i(t,e+0),_=i(t,e+2),b=i(t,e+4),v=i(t,e+6),w=i(t,e+8),B=i(t,e+10),A=i(t,e+12),E=i(t,e+14);let S=o[0]+(8191&m),I=o[1]+(8191&(m>>>13|_<<3)),x=o[2]+(8191&(_>>>10|b<<6)),L=o[3]+(8191&(b>>>7|v<<9)),k=o[4]+(8191&(v>>>4|w<<12)),O=o[5]+(w>>>1&8191),C=o[6]+(8191&(w>>>14|B<<2)),T=o[7]+(8191&(B>>>11|A<<5)),P=o[8]+(8191&(A>>>8|E<<8)),F=o[9]+(E>>>5|n),R=0,M=R+S*a+I*(5*g)+x*(5*y)+L*(5*p)+k*(5*f);R=M>>>13,M&=8191,M+=O*(5*h)+C*(5*d)+T*(5*u)+P*(5*l)+F*(5*c),R+=M>>>13,M&=8191;let H=R+S*c+I*a+x*(5*g)+L*(5*y)+k*(5*p);R=H>>>13,H&=8191,H+=O*(5*f)+C*(5*h)+T*(5*d)+P*(5*u)+F*(5*l),R+=H>>>13,H&=8191;let U=R+S*l+I*c+x*a+L*(5*g)+k*(5*y);R=U>>>13,U&=8191,U+=O*(5*p)+C*(5*f)+T*(5*h)+P*(5*d)+F*(5*u),R+=U>>>13,U&=8191;let V=R+S*u+I*l+x*c+L*a+k*(5*g);R=V>>>13,V&=8191,V+=O*(5*y)+C*(5*p)+T*(5*f)+P*(5*h)+F*(5*d),R+=V>>>13,V&=8191;let j=R+S*d+I*u+x*l+L*c+k*a;R=j>>>13,j&=8191,j+=O*(5*g)+C*(5*y)+T*(5*p)+P*(5*f)+F*(5*h),R+=j>>>13,j&=8191;let N=R+S*h+I*d+x*u+L*l+k*c;R=N>>>13,N&=8191,N+=O*a+C*(5*g)+T*(5*y)+P*(5*p)+F*(5*f),R+=N>>>13,N&=8191;let D=R+S*f+I*h+x*d+L*u+k*l;R=D>>>13,D&=8191,D+=O*c+C*a+T*(5*g)+P*(5*y)+F*(5*p),R+=D>>>13,D&=8191;let $=R+S*p+I*f+x*h+L*d+k*u;R=$>>>13,$&=8191,$+=O*l+C*c+T*a+P*(5*g)+F*(5*y),R+=$>>>13,$&=8191;let z=R+S*y+I*p+x*f+L*h+k*d;R=z>>>13,z&=8191,z+=O*u+C*l+T*c+P*a+F*(5*g),R+=z>>>13,z&=8191;let G=R+S*g+I*y+x*p+L*f+k*h;R=G>>>13,G&=8191,G+=O*d+C*u+T*l+P*c+F*a,R+=G>>>13,G&=8191,R=(R<<2)+R|0,R=R+M|0,M=8191&R,R>>>=13,H+=R,o[0]=M,o[1]=H,o[2]=U,o[3]=V,o[4]=j,o[5]=N,o[6]=D,o[7]=$,o[8]=z,o[9]=G}finalize(){const{h:t,pad:e}=this,r=new Uint16Array(10);let i=t[1]>>>13;t[1]&=8191;for(let e=2;e<10;e++)t[e]+=i,i=t[e]>>>13,t[e]&=8191;t[0]+=5*i,i=t[0]>>>13,t[0]&=8191,t[1]+=i,i=t[1]>>>13,t[1]&=8191,t[2]+=i,r[0]=t[0]+5,i=r[0]>>>13,r[0]&=8191;for(let e=1;e<10;e++)r[e]=t[e]+i,i=r[e]>>>13,r[e]&=8191;r[9]-=8192;let o=(1^i)-1;for(let t=0;t<10;t++)r[t]&=o;o=~o;for(let e=0;e<10;e++)t[e]=t[e]&o|r[e];t[0]=65535&(t[0]|t[1]<<13),t[1]=65535&(t[1]>>>3|t[2]<<10),t[2]=65535&(t[2]>>>6|t[3]<<7),t[3]=65535&(t[3]>>>9|t[4]<<4),t[4]=65535&(t[4]>>>12|t[5]<<1|t[6]<<14),t[5]=65535&(t[6]>>>2|t[7]<<11),t[6]=65535&(t[7]>>>5|t[8]<<8),t[7]=65535&(t[8]>>>8|t[9]<<5);let s=t[0]+e[0];t[0]=65535&s;for(let r=1;r<8;r++)s=(t[r]+e[r]|0)+(s>>>16)|0,t[r]=65535&s;(0,n.clean)(r)}update(t){(0,n.aexists)(this),t=(0,n.toBytes)(t),(0,n.abytes)(t);const{buffer:e,blockLen:r}=this,i=t.length;for(let n=0;n<i;){const o=Math.min(r-this.pos,i-n);if(o!==r)e.set(t.subarray(n,n+o),this.pos),this.pos+=o,n+=o,this.pos===r&&(this.process(e,0,!1),this.pos=0);else for(;r<=i-n;n+=r)this.process(t,n)}return this}destroy(){(0,n.clean)(this.h,this.r,this.buffer,this.pad)}digestInto(t){(0,n.aexists)(this),(0,n.aoutput)(t,this),this.finished=!0;const{buffer:e,h:r}=this;let{pos:i}=this;if(i){for(e[i++]=1;i<16;i++)e[i]=0;this.process(e,0,!0)}this.finalize();let o=0;for(let e=0;e<8;e++)t[o++]=r[e]>>>0,t[o++]=r[e]>>>8;return t}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}}function s(t){const e=(e,r)=>t(r).update((0,n.toBytes)(e)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e}e.poly1305=s(t=>new o(t))},1275:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(5917),i=r(5668),o=r(9875);function s(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n.A;++e<r;)this.add(t[e])}s.prototype.add=s.prototype.push=i.A,s.prototype.has=o.A;const a=s},1470:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(5572),i=r(2141),o=r(9084),s=r(3973);const a=function(t,e){if(null==t)return{};var r=(0,n.A)((0,s.A)(t),function(t){return[t]});return e=(0,i.A)(e),(0,o.A)(t,r,function(t,r){return e(t,r[0])})}},1472:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(3454),i=r(8776),o=r(9313);const s=function(t,e,r){return e=(0,i.A)(e),void 0===r?(r=e,e=0):r=(0,i.A)(r),t=(0,o.A)(t),(0,n.A)(t,e,r)}},1493:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},1521:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(5547);const i=function(t){return(0,n.A)(this,t).get(t)}},1532:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(7919);const i=function(){this.__data__=new n.A,this.size=0}},1635:(t,e,r)=>{"use strict";r.d(e,{Cl:()=>n,YH:()=>o,fX:()=>s,sH:()=>i});var n=function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},n.apply(this,arguments)};function i(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})}function o(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function s(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}Object.create;"function"==typeof SuppressedError&&SuppressedError},1666:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AEAD_TAG_LENGTH=e.XCHACHA20_NONCE_LENGTH=e.CURVE25519_PUBLIC_KEY_SIZE=e.ETH_PUBLIC_KEY_SIZE=e.UNCOMPRESSED_PUBLIC_KEY_SIZE=e.COMPRESSED_PUBLIC_KEY_SIZE=e.SECRET_KEY_LENGTH=void 0,e.SECRET_KEY_LENGTH=32,e.COMPRESSED_PUBLIC_KEY_SIZE=33,e.UNCOMPRESSED_PUBLIC_KEY_SIZE=65,e.ETH_PUBLIC_KEY_SIZE=64,e.CURVE25519_PUBLIC_KEY_SIZE=32,e.XCHACHA20_NONCE_LENGTH=24,e.AEAD_TAG_LENGTH=16},1682:(t,e,r)=>{"use strict";function n(t){t.parentNode&&t.parentNode.removeChild(t)}function i(t,e,r){const n=document.createElement(t);return e&&(n.className=e),r&&r.appendChild(n),n}r.d(e,{Z:()=>n,r:()=>i})},1694:(t,e,r)=>{"use strict";r.d(e,{F0:()=>u,F2:()=>c,pT:()=>a,qT:()=>l,xW:()=>d});var n=r(4545);const i=new n.H$,o=new n.w1,s=new n.FR;async function a(t){try{return(await i.searchByIds(t)).data.result.buildings[0]}catch(t){throw t}}async function c(t){try{const e=(await i.searchByFloorId(t)).data.result.buildings[0].buildingId;return await a(e)}catch(t){throw t}}async function l(t){try{return(await o.searchByIds(t)).data.result.venues[0]}catch(t){throw t}}async function u(t){try{return(await o.searchBySharedFloorId(t)).data.result.venues[0]}catch(t){throw t}}async function d(t){try{return(await s.searchByIds([t])).data.result.pois[0]}catch(t){throw t}}},1705:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DER=e.DERErr=void 0,e._legacyHelperEquat=p,e._legacyHelperNormPriv=y,e.weierstrassN=g,e.weierstrassPoints=function(t){const{CURVE:e,curveOpts:r}=b(t),n=g(e,r);return function(t,e){const{Fp:r,Fn:n}=e;function o(t){return(0,i.inRange)(t,u,n.ORDER)}const s=p(r,t.a,t.b),a=y(n,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return Object.assign({},{CURVE:t,Point:e,ProjectivePoint:e,normPrivateKeyToScalar:a,weierstrassEquation:s,isWithinCurveOrder:o})}(t,n)},e.ecdsa=_,e.weierstrass=function(t){const{CURVE:e,curveOpts:r,ecdsaOpts:n}=function(t){const{CURVE:e,curveOpts:r}=b(t),n={hash:t.hash,hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:r,ecdsaOpts:n}}(t),i=_(g(e,r),n,r);return function(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}(t,i)},e.SWUFpSqrtRatio=v,e.mapToCurveSimpleSWU=function(t,e){(0,s.validateField)(t);const{A:r,B:n,Z:i}=e;if(!t.isValid(r)||!t.isValid(n)||!t.isValid(i))throw new Error("mapToCurveSimpleSWU: invalid opts");const o=v(t,i);if(!t.isOdd)throw new Error("Field does not have .isOdd()");return e=>{let a,c,l,u,d,h,f,p;a=t.sqr(e),a=t.mul(a,i),c=t.sqr(a),c=t.add(c,a),l=t.add(c,t.ONE),l=t.mul(l,n),u=t.cmov(i,t.neg(c),!t.eql(c,t.ZERO)),u=t.mul(u,r),c=t.sqr(l),h=t.sqr(u),d=t.mul(h,r),c=t.add(c,d),c=t.mul(c,l),h=t.mul(h,u),d=t.mul(h,n),c=t.add(c,d),f=t.mul(a,l);const{isValid:y,value:g}=o(c,h);p=t.mul(a,e),p=t.mul(p,g),f=t.cmov(f,l,y),p=t.cmov(p,g,y);const m=t.isOdd(e)===t.isOdd(p);p=t.cmov(t.neg(p),p,m);const _=(0,s.FpInvertBatch)(t,[u],!0)[0];return f=t.mul(f,_),{x:f,y:p}}};const n=r(9615),i=r(8627),o=r(2422),s=r(4967);function a(t){void 0!==t.lowS&&(0,i.abool)("lowS",t.lowS),void 0!==t.prehash&&(0,i.abool)("prehash",t.prehash)}class c extends Error{constructor(t=""){super(t)}}e.DERErr=c,e.DER={Err:c,_tlv:{encode:(t,r)=>{const{Err:n}=e.DER;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(1&r.length)throw new n("tlv.encode: unpadded data");const o=r.length/2,s=(0,i.numberToHexUnpadded)(o);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const a=o>127?(0,i.numberToHexUnpadded)(s.length/2|128):"";return(0,i.numberToHexUnpadded)(t)+a+s+r},decode(t,r){const{Err:n}=e.DER;let i=0;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(r.length<2||r[i++]!==t)throw new n("tlv.decode: wrong tlv");const o=r[i++];let s=0;if(!!(128&o)){const t=127&o;if(!t)throw new n("tlv.decode(long): indefinite length not supported");if(t>4)throw new n("tlv.decode(long): byte length is too big");const e=r.subarray(i,i+t);if(e.length!==t)throw new n("tlv.decode: length bytes not complete");if(0===e[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of e)s=s<<8|t;if(i+=t,s<128)throw new n("tlv.decode(long): not minimal encoding")}else s=o;const a=r.subarray(i,i+s);if(a.length!==s)throw new n("tlv.decode: wrong value length");return{v:a,l:r.subarray(i+s)}}},_int:{encode(t){const{Err:r}=e.DER;if(t<l)throw new r("integer: negative integers are not allowed");let n=(0,i.numberToHexUnpadded)(t);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new r("unexpected DER parsing assertion: unpadded hex");return n},decode(t){const{Err:r}=e.DER;if(128&t[0])throw new r("invalid signature integer: negative");if(0===t[0]&&!(128&t[1]))throw new r("invalid signature integer: unnecessary leading zero");return(0,i.bytesToNumberBE)(t)}},toSig(t){const{Err:r,_int:n,_tlv:o}=e.DER,s=(0,i.ensureBytes)("signature",t),{v:a,l:c}=o.decode(48,s);if(c.length)throw new r("invalid signature: left bytes after parsing");const{v:l,l:u}=o.decode(2,a),{v:d,l:h}=o.decode(2,u);if(h.length)throw new r("invalid signature: left bytes after parsing");return{r:n.decode(l),s:n.decode(d)}},hexFromSig(t){const{_tlv:r,_int:n}=e.DER,i=r.encode(2,n.encode(t.r))+r.encode(2,n.encode(t.s));return r.encode(48,i)}};const l=BigInt(0),u=BigInt(1),d=BigInt(2),h=BigInt(3),f=BigInt(4);function p(t,e,r){return function(n){const i=t.sqr(n),o=t.mul(i,n);return t.add(t.add(o,t.mul(n,e)),r)}}function y(t,e,r){const{BYTES:n}=t;return function(o){let s;if("bigint"==typeof o)s=o;else{let r=(0,i.ensureBytes)("private key",o);if(e){if(!e.includes(2*r.length))throw new Error("invalid private key");const t=new Uint8Array(n);t.set(r,t.length-r.length),r=t}try{s=t.fromBytes(r)}catch(t){throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof o}`)}}if(r&&(s=t.create(s)),!t.isValidNot0(s))throw new Error("invalid private key: out of range [1..N-1]");return s}}function g(t,e={}){const{Fp:r,Fn:n}=(0,o._createCurveFields)("weierstrass",t,e),{h:s,n:a}=t;(0,i._validateObject)(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:c}=e;if(c&&(!r.is0(t.a)||"bigint"!=typeof c.beta||"function"!=typeof c.splitScalar))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function d(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const g=e.toBytes||function(t,e,n){const{x:o,y:s}=e.toAffine(),a=r.toBytes(o);if((0,i.abool)("isCompressed",n),n){d();const t=!r.isOdd(s);return(0,i.concatBytes)(m(t),a)}return(0,i.concatBytes)(Uint8Array.of(4),a,r.toBytes(s))},_=e.fromBytes||function(t){(0,i.abytes)(t);const e=r.BYTES,n=e+1,o=2*e+1,s=t.length,a=t[0],c=t.subarray(1);if(s!==n||2!==a&&3!==a){if(s===o&&4===a){const t=r.fromBytes(c.subarray(0*e,1*e)),n=r.fromBytes(c.subarray(1*e,2*e));if(!v(t,n))throw new Error("bad point: is not on curve");return{x:t,y:n}}throw new Error(`bad point: got length ${s}, expected compressed=${n} or uncompressed=${o}`)}{const t=r.fromBytes(c);if(!r.isValid(t))throw new Error("bad point: is not on curve, wrong x");const e=b(t);let n;try{n=r.sqrt(e)}catch(t){const e=t instanceof Error?": "+t.message:"";throw new Error("bad point: is not on curve, sqrt error"+e)}d();return!(1&~a)!==r.isOdd(n)&&(n=r.neg(n)),{x:t,y:n}}},b=p(r,t.a,t.b);function v(t,e){const n=r.sqr(e),i=b(t);return r.eql(n,i)}if(!v(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const w=r.mul(r.pow(t.a,h),f),B=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(w,B)))throw new Error("bad curve params: a or b");function A(t,e,n=!1){if(!r.isValid(e)||n&&r.is0(e))throw new Error(`bad point coordinate ${t}`);return e}function E(t){if(!(t instanceof L))throw new Error("ProjectivePoint expected")}const S=(0,i.memoized)((t,e)=>{const{px:n,py:i,pz:o}=t;if(r.eql(o,r.ONE))return{x:n,y:i};const s=t.is0();null==e&&(e=s?r.ONE:r.inv(o));const a=r.mul(n,e),c=r.mul(i,e),l=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(l,r.ONE))throw new Error("invZ was invalid");return{x:a,y:c}}),I=(0,i.memoized)(t=>{if(t.is0()){if(e.allowInfinityPoint&&!r.is0(t.py))return;throw new Error("bad point: ZERO")}const{x:n,y:i}=t.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error("bad point: x or y not field elements");if(!v(n,i))throw new Error("bad point: equation left != right");if(!t.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function x(t,e,n,i,s){return n=new L(r.mul(n.px,t),n.py,n.pz),e=(0,o.negateCt)(i,e),n=(0,o.negateCt)(s,n),e.add(n)}class L{constructor(t,e,r){this.px=A("x",t),this.py=A("y",e,!0),this.pz=A("z",r),Object.freeze(this)}static fromAffine(t){const{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw new Error("invalid affine point");if(t instanceof L)throw new Error("projective point not allowed");return r.is0(e)&&r.is0(n)?L.ZERO:new L(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){return(0,o.normalizeZ)(L,"pz",t)}static fromBytes(t){return(0,i.abytes)(t),L.fromHex(t)}static fromHex(t){const e=L.fromAffine(_((0,i.ensureBytes)("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){const r=y(n,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return L.BASE.multiply(r(t))}static msm(t,e){return(0,o.pippenger)(L,n,t,e)}precompute(t=8,e=!0){return O.setWindowSize(this,t),e||this.multiply(h),this}_setWindowSize(t){this.precompute(t)}assertValidity(){I(this)}hasEvenY(){const{y:t}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(t)}equals(t){E(t);const{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,c=r.eql(r.mul(e,a),r.mul(o,i)),l=r.eql(r.mul(n,a),r.mul(s,i));return c&&l}negate(){return new L(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,h),{px:o,py:s,pz:a}=this;let c=r.ZERO,l=r.ZERO,u=r.ZERO,d=r.mul(o,o),f=r.mul(s,s),p=r.mul(a,a),y=r.mul(o,s);return y=r.add(y,y),u=r.mul(o,a),u=r.add(u,u),c=r.mul(e,u),l=r.mul(i,p),l=r.add(c,l),c=r.sub(f,l),l=r.add(f,l),l=r.mul(c,l),c=r.mul(y,c),u=r.mul(i,u),p=r.mul(e,p),y=r.sub(d,p),y=r.mul(e,y),y=r.add(y,u),u=r.add(d,d),d=r.add(u,d),d=r.add(d,p),d=r.mul(d,y),l=r.add(l,d),p=r.mul(s,a),p=r.add(p,p),d=r.mul(p,y),c=r.sub(c,d),u=r.mul(p,f),u=r.add(u,u),u=r.add(u,u),new L(c,l,u)}add(e){E(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let l=r.ZERO,u=r.ZERO,d=r.ZERO;const f=t.a,p=r.mul(t.b,h);let y=r.mul(n,s),g=r.mul(i,a),m=r.mul(o,c),_=r.add(n,i),b=r.add(s,a);_=r.mul(_,b),b=r.add(y,g),_=r.sub(_,b),b=r.add(n,o);let v=r.add(s,c);return b=r.mul(b,v),v=r.add(y,m),b=r.sub(b,v),v=r.add(i,o),l=r.add(a,c),v=r.mul(v,l),l=r.add(g,m),v=r.sub(v,l),d=r.mul(f,b),l=r.mul(p,m),d=r.add(l,d),l=r.sub(g,d),d=r.add(g,d),u=r.mul(l,d),g=r.add(y,y),g=r.add(g,y),m=r.mul(f,m),b=r.mul(p,b),g=r.add(g,m),m=r.sub(y,m),m=r.mul(f,m),b=r.add(b,m),y=r.mul(g,b),u=r.add(u,y),y=r.mul(v,b),l=r.mul(_,l),l=r.sub(l,y),y=r.mul(_,g),d=r.mul(v,d),d=r.add(d,y),new L(l,u,d)}subtract(t){return this.add(t.negate())}is0(){return this.equals(L.ZERO)}multiply(t){const{endo:r}=e;if(!n.isValidNot0(t))throw new Error("invalid scalar: out of range");let i,o;const s=t=>O.wNAFCached(this,t,L.normalizeZ);if(r){const{k1neg:e,k1:n,k2neg:a,k2:c}=r.splitScalar(t),{p:l,f:u}=s(n),{p:d,f:h}=s(c);o=u.add(h),i=x(r.beta,l,d,e,a)}else{const{p:e,f:r}=s(t);i=e,o=r}return L.normalizeZ([i,o])[0]}multiplyUnsafe(t){const{endo:r}=e,i=this;if(!n.isValid(t))throw new Error("invalid scalar: out of range");if(t===l||i.is0())return L.ZERO;if(t===u)return i;if(O.hasPrecomputes(this))return this.multiply(t);if(r){const{k1neg:e,k1:n,k2neg:s,k2:a}=r.splitScalar(t),{p1:c,p2:l}=(0,o.mulEndoUnsafe)(L,i,n,a);return x(r.beta,c,l,e,s)}return O.wNAFCachedUnsafe(i,t)}multiplyAndAddUnsafe(t,e,r){const n=this.multiplyUnsafe(e).add(t.multiplyUnsafe(r));return n.is0()?void 0:n}toAffine(t){return S(this,t)}isTorsionFree(){const{isTorsionFree:t}=e;return s===u||(t?t(L,this):O.wNAFCachedUnsafe(this,a).is0())}clearCofactor(){const{clearCofactor:t}=e;return s===u?this:t?t(L,this):this.multiplyUnsafe(s)}toBytes(t=!0){return(0,i.abool)("isCompressed",t),this.assertValidity(),g(L,this,t)}toRawBytes(t=!0){return this.toBytes(t)}toHex(t=!0){return(0,i.bytesToHex)(this.toBytes(t))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}L.BASE=new L(t.Gx,t.Gy,r.ONE),L.ZERO=new L(r.ZERO,r.ONE,r.ZERO),L.Fp=r,L.Fn=n;const k=n.BITS,O=(0,o.wNAF)(L,e.endo?Math.ceil(k/2):k);return L}function m(t){return Uint8Array.of(t?2:3)}function _(t,r,o={}){(0,i._validateObject)(r,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const c=r.randomBytes||i.randomBytes,h=r.hmac||((t,...e)=>(0,n.hmac)(r.hash,t,(0,i.concatBytes)(...e))),{Fp:f,Fn:p}=t,{ORDER:g,BITS:_}=p;function b(t){return t>g>>u}function v(t,e){if(!p.isValidNot0(e))throw new Error(`invalid signature ${t}: out of range 1..CURVE.n`)}class w{constructor(t,e,r){v("r",t),v("s",e),this.r=t,this.s=e,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(t){const e=p.BYTES,r=(0,i.ensureBytes)("compactSignature",t,2*e);return new w(p.fromBytes(r.subarray(0,e)),p.fromBytes(r.subarray(e,2*e)))}static fromDER(t){const{r,s:n}=e.DER.toSig((0,i.ensureBytes)("DER",t));return new w(r,n)}assertValidity(){}addRecoveryBit(t){return new w(this.r,this.s,t)}recoverPublicKey(e){const r=f.ORDER,{r:n,s:o,recovery:s}=this;if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");if(g*d<r&&s>1)throw new Error("recovery id is ambiguous for h>1 curve");const a=2===s||3===s?n+g:n;if(!f.isValid(a))throw new Error("recovery id 2 or 3 invalid");const c=f.toBytes(a),l=t.fromHex((0,i.concatBytes)(m(!(1&s)),c)),u=p.inv(a),h=I((0,i.ensureBytes)("msgHash",e)),y=p.create(-h*u),_=p.create(o*u),b=t.BASE.multiplyUnsafe(y).add(l.multiplyUnsafe(_));if(b.is0())throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return b(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,p.neg(this.s),this.recovery):this}toBytes(t){if("compact"===t)return(0,i.concatBytes)(p.toBytes(this.r),p.toBytes(this.s));if("der"===t)return(0,i.hexToBytes)(e.DER.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,i.bytesToHex)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,i.bytesToHex)(this.toBytes("compact"))}}const B=y(p,o.allowedPrivateKeyLengths,o.wrapPrivateKey),A={isValidPrivateKey(t){try{return B(t),!0}catch(t){return!1}},normPrivateKeyToScalar:B,randomPrivateKey:()=>{const t=g;return(0,s.mapHashToField)(c((0,s.getMinHashLength)(t)),t)},precompute:(e=8,r=t.BASE)=>r.precompute(e,!1)};function E(e){if("bigint"==typeof e)return!1;if(e instanceof t)return!0;const r=(0,i.ensureBytes)("key",e).length,n=f.BYTES,s=n+1,a=2*n+1;return o.allowedPrivateKeyLengths||p.BYTES===s?void 0:r===s||r===a}const S=r.bits2int||function(t){if(t.length>8192)throw new Error("input is too large");const e=(0,i.bytesToNumberBE)(t),r=8*t.length-_;return r>0?e>>BigInt(r):e},I=r.bits2int_modN||function(t){return p.create(S(t))},x=(0,i.bitMask)(_);function L(t){return(0,i.aInRange)("num < 2^"+_,t,l,x),p.toBytes(t)}function k(e,n,o=O){if(["recovered","canonical"].some(t=>t in o))throw new Error("sign() legacy options not supported");const{hash:s}=r;let{lowS:d,prehash:h,extraEntropy:y}=o;null==d&&(d=!0),e=(0,i.ensureBytes)("msgHash",e),a(o),h&&(e=(0,i.ensureBytes)("prehashed msgHash",s(e)));const g=I(e),m=B(n),_=[L(m),L(g)];if(null!=y&&!1!==y){const t=!0===y?c(f.BYTES):y;_.push((0,i.ensureBytes)("extraEntropy",t))}const v=(0,i.concatBytes)(..._),A=g;return{seed:v,k2sig:function(e){const r=S(e);if(!p.isValidNot0(r))return;const n=p.inv(r),i=t.BASE.multiply(r).toAffine(),o=p.create(i.x);if(o===l)return;const s=p.create(n*p.create(A+o*m));if(s===l)return;let a=(i.x===o?0:2)|Number(i.y&u),c=s;return d&&b(s)&&(c=function(t){return b(t)?p.neg(t):t}(s),a^=1),new w(o,c,a)}}}const O={lowS:r.lowS,prehash:!1},C={lowS:r.lowS,prehash:!1};return t.BASE.precompute(8),Object.freeze({getPublicKey:function(e,r=!0){return t.fromPrivateKey(e).toBytes(r)},getSharedSecret:function(e,r,n=!0){if(!0===E(e))throw new Error("first arg must be private key");if(!1===E(r))throw new Error("second arg must be public key");return t.fromHex(r).multiply(B(e)).toBytes(n)},sign:function(t,e,n=O){const{seed:o,k2sig:s}=k(t,e,n);return(0,i.createHmacDrbg)(r.hash.outputLen,p.BYTES,h)(o,s)},verify:function(n,o,s,c=C){const l=n;o=(0,i.ensureBytes)("msgHash",o),s=(0,i.ensureBytes)("publicKey",s),a(c);const{lowS:u,prehash:d,format:h}=c;if("strict"in c)throw new Error("options.strict was renamed to lowS");if(void 0!==h&&!["compact","der","js"].includes(h))throw new Error('format must be "compact", "der" or "js"');const f="string"==typeof l||(0,i.isBytes)(l),y=!f&&!h&&"object"==typeof l&&null!==l&&"bigint"==typeof l.r&&"bigint"==typeof l.s;if(!f&&!y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let g,m;try{if(y){if(void 0!==h&&"js"!==h)throw new Error("invalid format");g=new w(l.r,l.s)}if(f){try{"compact"!==h&&(g=w.fromDER(l))}catch(t){if(!(t instanceof e.DER.Err))throw t}g||"der"===h||(g=w.fromCompact(l))}m=t.fromHex(s)}catch(t){return!1}if(!g)return!1;if(u&&g.hasHighS())return!1;d&&(o=r.hash(o));const{r:_,s:b}=g,v=I(o),B=p.inv(b),A=p.create(v*B),E=p.create(_*B),S=t.BASE.multiplyUnsafe(A).add(m.multiplyUnsafe(E));return!S.is0()&&p.create(S.x)===_},utils:A,Point:t,Signature:w})}function b(t){const e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy};return{CURVE:e,curveOpts:{Fp:t.Fp,Fn:(0,s.Field)(e.n,t.nBitLength),allowedPrivateKeyLengths:t.allowedPrivateKeyLengths,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,wrapPrivateKey:t.wrapPrivateKey,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes}}}function v(t,e){const r=t.ORDER;let n=l;for(let t=r-u;t%d===l;t/=d)n+=u;const i=n,o=d<<i-u-u,s=o*d,a=(r-u)/s,c=(a-u)/d,p=s-u,y=o,g=t.pow(e,a),m=t.pow(e,(a+u)/d);let _=(e,r)=>{let n=g,o=t.pow(r,p),s=t.sqr(o);s=t.mul(s,r);let a=t.mul(e,s);a=t.pow(a,c),a=t.mul(a,o),o=t.mul(a,r),s=t.mul(a,e);let l=t.mul(s,o);a=t.pow(l,y);let h=t.eql(a,t.ONE);o=t.mul(s,m),a=t.mul(l,n),s=t.cmov(o,s,h),l=t.cmov(a,l,h);for(let e=i;e>u;e--){let r=e-d;r=d<<r-u;let i=t.pow(l,r);const a=t.eql(i,t.ONE);o=t.mul(s,n),n=t.mul(n,n),i=t.mul(l,n),s=t.cmov(o,s,a),l=t.cmov(i,l,a)}return{isValid:h,value:s}};if(t.ORDER%f===h){const r=(t.ORDER-h)/f,n=t.sqrt(t.neg(e));_=(e,i)=>{let o=t.sqr(i);const s=t.mul(e,i);o=t.mul(o,s);let a=t.pow(o,r);a=t.mul(a,s);const c=t.mul(a,n),l=t.mul(t.sqr(a),i),u=t.eql(l,e);return{isValid:u,value:t.cmov(c,a,u)}}}return _}},1761:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.expand_message_xmd=l,e.expand_message_xof=u,e.hash_to_field=d,e.isogenyMap=function(t,e){const r=e.map(t=>Array.from(t).reverse());return(e,n)=>{const[o,s,a,c]=r.map(r=>r.reduce((r,n)=>t.add(t.mul(r,e),n))),[l,u]=(0,i.FpInvertBatch)(t,[s,c],!0);return e=t.mul(o,l),n=t.mul(n,t.mul(a,u)),{x:e,y:n}}},e.createHasher=function(t,e,r){if("function"!=typeof e)throw new Error("mapToCurve() must be defined");function n(r){return t.fromAffine(e(r))}function i(e){const r=e.clearCofactor();return r.equals(t.ZERO)?t.ZERO:(r.assertValidity(),r)}return{defaults:r,hashToCurve(t,e){const o=r.DST?r.DST:{},s=d(t,2,Object.assign({},r,o,e)),a=n(s[0]),c=n(s[1]);return i(a.add(c))},encodeToCurve(t,e){const o=r.encodeDST?r.encodeDST:{};return i(n(d(t,1,Object.assign({},r,o,e))[0]))},mapToCurve(t){if(!Array.isArray(t))throw new Error("expected array of bigints");for(const e of t)if("bigint"!=typeof e)throw new Error("expected array of bigints");return i(n(t))}}};const n=r(8627),i=r(4967),o=n.bytesToNumberBE;function s(t,e){if(c(t),c(e),t<0||t>=1<<8*e)throw new Error("invalid I2OSP input: "+t);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=255&t,t>>>=8;return new Uint8Array(r)}function a(t,e){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function c(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function l(t,e,r,i){(0,n.abytes)(t),(0,n.abytes)(e),c(r),e.length>255&&(e=i((0,n.concatBytes)((0,n.utf8ToBytes)("H2C-OVERSIZE-DST-"),e)));const{outputLen:o,blockLen:l}=i,u=Math.ceil(r/o);if(r>65535||u>255)throw new Error("expand_message_xmd: invalid lenInBytes");const d=(0,n.concatBytes)(e,s(e.length,1)),h=s(0,l),f=s(r,2),p=new Array(u),y=i((0,n.concatBytes)(h,t,f,s(0,1),d));p[0]=i((0,n.concatBytes)(y,s(1,1),d));for(let t=1;t<=u;t++){const e=[a(y,p[t-1]),s(t+1,1),d];p[t]=i((0,n.concatBytes)(...e))}return(0,n.concatBytes)(...p).slice(0,r)}function u(t,e,r,i,o){if((0,n.abytes)(t),(0,n.abytes)(e),c(r),e.length>255){const t=Math.ceil(2*i/8);e=o.create({dkLen:t}).update((0,n.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(t).update(s(r,2)).update(e).update(s(e.length,1)).digest()}function d(t,e,r){(0,n._validateObject)(r,{p:"bigint",m:"number",k:"number",hash:"function"});const{p:s,k:a,m:d,hash:h,expand:f,DST:p}=r;if(!(0,n.isBytes)(p)&&"string"!=typeof p)throw new Error("DST must be string or uint8array");if(!(0,n.isHash)(r.hash))throw new Error("expected valid hash");(0,n.abytes)(t),c(e);const y="string"==typeof p?(0,n.utf8ToBytes)(p):p,g=s.toString(2).length,m=Math.ceil((g+a)/8),_=e*d*m;let b;if("xmd"===f)b=l(t,y,_,h);else if("xof"===f)b=u(t,y,_,a,h);else{if("_internal_pass"!==f)throw new Error('expand must be "xmd" or "xof"');b=t}const v=new Array(e);for(let t=0;t<e;t++){const e=new Array(d);for(let r=0;r<d;r++){const n=m*(r+t*d),a=b.subarray(n,n+m);e[r]=(0,i.mod)(o(a),s)}v[t]=e}return v}},1788:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(4846),i=r(3098),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;const c=(0,n.A)(function(){return arguments}())?n.A:function(t){return(0,i.A)(t)&&s.call(t,"callee")&&!a.call(t,"callee")}},1865:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(423),i=r(8823),o=r(8446);const s=function(t){return(0,o.A)(t)?(0,n.A)(t,!0):(0,i.A)(t)}},1882:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9672),i=r(3098);const o=function(t){return"symbol"==typeof t||(0,i.A)(t)&&"[object Symbol]"==(0,n.A)(t)}},1917:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(2136),i="object"==typeof self&&self&&self.Object===Object&&self;const o=n.A||i||Function("return this")()},1965:(t,e,r)=>{"use strict";r.d(e,{FI:()=>n,TU:()=>i,Zj:()=>o});const n="reserve_mapxus-level-fill",i="reserve_mapxus-shared-level-fill",o="reserve_mapxus-building-fill"},1979:(t,e,r)=>{"use strict";r.d(e,{A:()=>f});var n=r(9610),i=r(640),o=r(3149),s=r(1121),a=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const f=function(t){return!(!(0,o.A)(t)||(0,i.A)(t))&&((0,n.A)(t)?h:a).test((0,s.A)(t))}},2049:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=Array.isArray},2068:(t,e,r)=>{"use strict";r.d(e,{K:()=>a});var n=r(2742),i=r.n(n),o=r(9588);const s=r(7311).o.getInstance();class a{static instance;_axios;_isRefreshingToken=!1;_retryCount=0;constructor(){this._axios=i().create({baseURL:o.hl}),this._setupInterceptors()}static getInstance(){return a.instance||(a.instance=new a),a.instance}async get(t){return this._axios.get(t)}async post(t,e){return this._axios.post(t,e)}async getRequestHeaders(){return{"Content-Type":"application/json",sdkVersion:s.getSdkVersion(),identifier:await s.getIdentifier(),token:await s.getAccessToken()}}_setupInterceptors(){this._axios.interceptors.request.use(async t=>{const e=await this.getRequestHeaders();return t.headers=Object.assign({},t.headers,e),t},t=>{throw t}),this._axios.interceptors.response.use(null,async t=>{if(401!==t.response?.status||this._retryCount>=3)throw this._retryCount=0,t;if(this._isRefreshingToken)throw t;s.getGlobalDispatcher().call("unauthorized"),this._isRefreshingToken=!0,this._retryCount++;try{const e=await this.getRequestHeaders(),r=t.config;return r.headers=Object.assign({},r.headers,e),this._axios.request(r)}catch(t){throw t}finally{this._isRefreshingToken=!1}})}}},2075:(t,e,r)=>{"use strict";r.d(e,{$b:()=>h,Hf:()=>d,_C:()=>s,aS:()=>f,em:()=>u,lu:()=>a,ts:()=>c,xR:()=>l});var n=r(9588);const i="v3";function o(t){return`${n.hl}/api/${i}/tiles/styles/${t}`}const s=o("christmas_mims2_v1"),a=o("common_mims2_v1"),c=o("halloween_mims2_v1"),l=o("mappybee_mims2_v1"),u=o("mapxus_mims2_v1"),d=o("lands_d_mims2_v1"),h=o("mapxus_v7");function f(t){return o(t)}},2136:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},2141:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(4943),i=r(6474),o=r(9008),s=r(2049),a=r(2263);const c=function(t){return"function"==typeof t?t:null==t?o.A:"object"==typeof t?(0,s.A)(t)?(0,i.A)(t[0],t[1]):(0,n.A)(t):(0,a.A)(t)}},2158:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(9378),e),i(r(244),e),i(r(3503),e),i(r(7757),e)},2199:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(6318);const i=function(t){return function(e){return(0,n.A)(e,t)}}},2263:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(805),i=r(2199),o=r(6586),s=r(901);const a=function(t){return(0,o.A)(t)?(0,n.A)((0,s.A)(t)):(0,i.A)(t)}},2302:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(){}},2318:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toBig=e.shrSL=e.shrSH=e.rotrSL=e.rotrSH=e.rotrBL=e.rotrBH=e.rotr32L=e.rotr32H=e.rotlSL=e.rotlSH=e.rotlBL=e.rotlBH=e.add5L=e.add5H=e.add4L=e.add4H=e.add3L=e.add3H=void 0,e.add=b,e.fromBig=i,e.split=o;const r=BigInt(2**32-1),n=BigInt(32);function i(t,e=!1){return e?{h:Number(t&r),l:Number(t>>n&r)}:{h:0|Number(t>>n&r),l:0|Number(t&r)}}function o(t,e=!1){const r=t.length;let n=new Uint32Array(r),o=new Uint32Array(r);for(let s=0;s<r;s++){const{h:r,l:a}=i(t[s],e);[n[s],o[s]]=[r,a]}return[n,o]}const s=(t,e)=>BigInt(t>>>0)<<n|BigInt(e>>>0);e.toBig=s;const a=(t,e,r)=>t>>>r;e.shrSH=a;const c=(t,e,r)=>t<<32-r|e>>>r;e.shrSL=c;const l=(t,e,r)=>t>>>r|e<<32-r;e.rotrSH=l;const u=(t,e,r)=>t<<32-r|e>>>r;e.rotrSL=u;const d=(t,e,r)=>t<<64-r|e>>>r-32;e.rotrBH=d;const h=(t,e,r)=>t>>>r-32|e<<64-r;e.rotrBL=h;const f=(t,e)=>e;e.rotr32H=f;const p=(t,e)=>t;e.rotr32L=p;const y=(t,e,r)=>t<<r|e>>>32-r;e.rotlSH=y;const g=(t,e,r)=>e<<r|t>>>32-r;e.rotlSL=g;const m=(t,e,r)=>e<<r-32|t>>>64-r;e.rotlBH=m;const _=(t,e,r)=>t<<r-32|e>>>64-r;function b(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}}e.rotlBL=_;const v=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0);e.add3L=v;const w=(t,e,r,n)=>e+r+n+(t/2**32|0)|0;e.add3H=w;const B=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0);e.add4L=B;const A=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0;e.add4H=A;const E=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0);e.add5L=E;const S=(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0;e.add5H=S;const I={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:l,rotrSL:u,rotrBH:d,rotrBL:h,rotr32H:f,rotr32L:p,rotlSH:y,rotlSL:g,rotlBH:m,rotlBL:_,add:b,add3L:v,add3H:w,add4L:B,add4H:A,add5H:S,add5L:E};e.default=I},2384:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(169),i=Array.prototype.splice;const o=function(t){var e=this.__data__,r=(0,n.A)(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},2422:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.negateCt=a,e.normalizeZ=function(t,e,r){const n="pz"===e?t=>t.pz:t=>t.ez,o=(0,i.FpInvertBatch)(t.Fp,r.map(n));return r.map((t,e)=>t.toAffine(o[e])).map(t.fromAffine)},e.wNAF=function(t,e){return{constTimeNegate:a,hasPrecomputes:t=>1!==y(t),unsafeLadder(e,r,n=t.ZERO){let i=e;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(t,r){const{windows:n,windowSize:i}=l(r,e),o=[];let s=t,a=s;for(let t=0;t<n;t++){a=s,o.push(a);for(let t=1;t<i;t++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(r,n,i){let o=t.ZERO,s=t.BASE;const c=l(r,e);for(let t=0;t<c.windows;t++){const{nextN:e,offset:r,isZero:l,isNeg:d,isNegF:h,offsetF:f}=u(i,t,c);i=e,l?s=s.add(a(h,n[f])):o=o.add(a(d,n[r]))}return g(i),{p:o,f:s}},wNAFUnsafe(r,n,i,s=t.ZERO){const a=l(r,e);for(let t=0;t<a.windows&&i!==o;t++){const{nextN:e,offset:r,isZero:o,isNeg:c}=u(i,t,a);if(i=e,!o){const t=n[r];s=s.add(c?t.negate():t)}}return g(i),s},getPrecomputes(t,e,r){let n=f.get(e);return n||(n=this.precomputeWindow(e,t),1!==t&&("function"==typeof r&&(n=r(n)),f.set(e,n))),n},wNAFCached(t,e,r){const n=y(t);return this.wNAF(n,this.getPrecomputes(n,t,r),e)},wNAFCachedUnsafe(t,e,r,n){const i=y(t);return 1===i?this.unsafeLadder(t,e,n):this.wNAFUnsafe(i,this.getPrecomputes(i,t,r),e,n)},setWindowSize(t,r){c(r,e),p.set(t,r),f.delete(t)}}},e.mulEndoUnsafe=function(t,e,r,n){let i=e,a=t.ZERO,c=t.ZERO;for(;r>o||n>o;)r&s&&(a=a.add(i)),n&s&&(c=c.add(i)),i=i.double(),r>>=s,n>>=s;return{p1:a,p2:c}},e.pippenger=function(t,e,r,i){d(r,t),h(i,e);const o=r.length,s=i.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const a=t.ZERO,c=(0,n.bitLen)(BigInt(o));let l=1;c>12?l=c-3:c>4?l=c-2:c>0&&(l=2);const u=(0,n.bitMask)(l),f=new Array(Number(u)+1).fill(a),p=Math.floor((e.BITS-1)/l)*l;let y=a;for(let t=p;t>=0;t-=l){f.fill(a);for(let e=0;e<s;e++){const n=i[e],o=Number(n>>BigInt(t)&u);f[o]=f[o].add(r[e])}let e=a;for(let t=f.length-1,r=a;t>0;t--)r=r.add(f[t]),e=e.add(r);if(y=y.add(e),0!==t)for(let t=0;t<l;t++)y=y.double()}return y},e.precomputeMSMUnsafe=function(t,e,r,i){c(i,e.BITS),d(r,t);const o=t.ZERO,s=2**i-1,a=Math.ceil(e.BITS/i),l=(0,n.bitMask)(i),u=r.map(t=>{const e=[];for(let r=0,n=t;r<s;r++)e.push(n),n=n.add(t);return e});return t=>{if(h(t,e),t.length>r.length)throw new Error("array of scalars must be smaller than array of points");let n=o;for(let e=0;e<a;e++){if(n!==o)for(let t=0;t<i;t++)n=n.double();const r=BigInt(a*i-(e+1)*i);for(let e=0;e<t.length;e++){const i=t[e],o=Number(i>>r&l);o&&(n=n.add(u[e][o-1]))}}return n}},e.validateBasic=function(t){return(0,i.validateField)(t.Fp),(0,n.validateObject)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,i.nLength)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})},e._createCurveFields=function(t,e,r={}){if(!e||"object"!=typeof e)throw new Error(`expected valid ${t} CURVE object`);for(const t of["p","n","h"]){const r=e[t];if(!("bigint"==typeof r&&r>o))throw new Error(`CURVE.${t} must be positive bigint`)}const n=m(e.p,r.Fp),i=m(e.n,r.Fn),s=["Gx","Gy","a","weierstrass"===t?"b":"d"];for(const t of s)if(!n.isValid(e[t]))throw new Error(`CURVE.${t} must be valid field element of CURVE.Fp`);return{Fp:n,Fn:i}};const n=r(8627),i=r(4967),o=BigInt(0),s=BigInt(1);function a(t,e){const r=e.negate();return t?r:e}function c(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function l(t,e){c(t,e);const r=2**t;return{windows:Math.ceil(e/t)+1,windowSize:2**(t-1),mask:(0,n.bitMask)(t),maxNumber:r,shiftBy:BigInt(t)}}function u(t,e,r){const{windowSize:n,mask:i,maxNumber:o,shiftBy:a}=r;let c=Number(t&i),l=t>>a;c>n&&(c-=o,l+=s);const u=e*n;return{nextN:l,offset:u+Math.abs(c)-1,isZero:0===c,isNeg:c<0,isNegF:e%2!=0,offsetF:u}}function d(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw new Error("invalid point at index "+r)})}function h(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw new Error("invalid scalar at index "+r)})}const f=new WeakMap,p=new WeakMap;function y(t){return p.get(t)||1}function g(t){if(t!==o)throw new Error("invalid wNAF")}function m(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.validateField)(e),e}return(0,i.Field)(t)}},2468:(t,e,r)=>{"use strict";r.d(e,{E:()=>n});class n{_buildingSelector;_isEnabled=!0;_position;constructor(t){this._buildingSelector=t}enable(){this._isEnabled=!0,this._buildingSelector.enabled||this._buildingSelector.setVisibility(!0)}disable(){this._isEnabled=!1,this._buildingSelector.enabled&&this._buildingSelector.setVisibility(!1)}setPosition(t,e){this._position=t,this._buildingSelector.changePosition(this._buildingSelector.position,t,e)}get isEnabled(){return this._isEnabled}get position(){return this._position}}},2506:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rotl=function(t,e){return t<<e|t>>>32-e},e.createCipher=function(t,e){const{allowShortKeys:r,extendNonceFn:i,counterLength:o,counterRight:s,rounds:p}=(0,n.checkOpts)({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if("function"!=typeof t)throw new Error("core must be a function");return(0,n.anumber)(o),(0,n.anumber)(p),(0,n.abool)(s),(0,n.abool)(r),(e,y,g,m,_=0)=>{(0,n.abytes)(e),(0,n.abytes)(y),(0,n.abytes)(g);const b=g.length;if(void 0===m&&(m=new Uint8Array(b)),(0,n.abytes)(m),(0,n.anumber)(_),_<0||_>=h)throw new Error("arx: counter overflow");if(m.length<b)throw new Error(`arx: output (${m.length}) is shorter than data (${b})`);const v=[];let w,B,A=e.length;if(32===A)v.push(w=(0,n.copyBytes)(e)),B=c;else{if(16!==A||!r)throw new Error(`arx: invalid 32-byte key, got length=${A}`);w=new Uint8Array(32),w.set(e),w.set(e,16),B=a,v.push(w)}l(y)||v.push(y=(0,n.copyBytes)(y));const E=(0,n.u32)(w);if(i){if(24!==y.length)throw new Error("arx: extended nonce must be 24 bytes");i(B,E,(0,n.u32)(y.subarray(0,16)),E),y=y.subarray(16)}const S=16-o;if(S!==y.length)throw new Error(`arx: nonce must be ${S} or 16 bytes`);if(12!==S){const t=new Uint8Array(12);t.set(y,s?0:12-y.length),y=t,v.push(y)}const I=(0,n.u32)(y);return function(t,e,r,i,o,s,a,c){const p=o.length,y=new Uint8Array(u),g=(0,n.u32)(y),m=l(o)&&l(s),_=m?(0,n.u32)(o):f,b=m?(0,n.u32)(s):f;for(let n=0;n<p;a++){if(t(e,r,i,g,a,c),a>=h)throw new Error("arx: counter overflow");const l=Math.min(u,p-n);if(m&&l===u){const t=n/4;if(n%4!=0)throw new Error("arx: invalid block position");for(let e,r=0;r<d;r++)e=t+r,b[e]=_[e]^g[r];n+=u;continue}for(let t,e=0;e<l;e++)t=n+e,s[t]=o[t]^y[e];n+=l}}(t,B,E,I,g,m,_,p),(0,n.clean)(...v),m}};const n=r(6527),i=t=>Uint8Array.from(t.split("").map(t=>t.charCodeAt(0))),o=i("expand 16-byte k"),s=i("expand 32-byte k"),a=(0,n.u32)(o),c=(0,n.u32)(s);function l(t){return t.byteOffset%4==0}const u=64,d=16,h=2**32-1,f=new Uint32Array},2509:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(5547);const i=function(t){return(0,n.A)(this,t).has(t)}},2528:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(4171);const i=function(t,e,r){"__proto__"==e&&n.A?(0,n.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},2531:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(5707),i=r(6983),o=r(6031);const s=function(t,e,r){return e==e?(0,o.A)(t,e,r):(0,n.A)(t,i.A,r)}},2557:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PublicKey=void 0;var n=r(6527),i=r(2158),o=function(){function t(t,e){var r=(0,i.convertPublicKeyFormat)(t,!0,e),n=(0,i.convertPublicKeyFormat)(t,!1,e);this.data=r,this.dataUncompressed=r.length!==n.length?n:null}return t.fromHex=function(e,r){return new t((0,i.hexToPublicKey)(e,r),r)},Object.defineProperty(t.prototype,"_uncompressed",{get:function(){return null!==this.dataUncompressed?this.dataUncompressed:this.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uncompressed",{get:function(){return Buffer.from(this._uncompressed)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"compressed",{get:function(){return Buffer.from(this.data)},enumerable:!1,configurable:!0}),t.prototype.toBytes=function(t){return void 0===t&&(t=!0),t?this.data:this._uncompressed},t.prototype.toHex=function(t){return void 0===t&&(t=!0),(0,n.bytesToHex)(this.toBytes(t))},t.prototype.decapsulate=function(t,e){void 0===e&&(e=!1);var r=this.toBytes(e),n=t.multiply(this,e);return(0,i.getSharedKey)(r,n)},t.prototype.equals=function(t){return(0,n.equalBytes)(this.data,t.data)},t}();e.PublicKey=o},2559:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(1882);const i=function(t,e,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=e(s);if(null!=a&&(void 0===c?a==a&&!(0,n.A)(a):r(a,c)))var c=a,l=s}return l}},2634:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}},2658:(t,e,r)=>{"use strict";r.d(e,{S:()=>i,d:()=>o});let n=[];const i={[Symbol.for("mapxus/callers-register")]:t=>{n=t}};function o(){return n}},2732:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(702),i=r(1917);const o=(0,n.A)(i.A,"DataView")},2742:e=>{"use strict";e.exports=t},2789:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e){return t(e)}}},2801:(t,e,r)=>{"use strict";r.d(e,{w:()=>c});var n=r(2068),i=r(9573),o=r(9588),s=r(6034);const a=["opening_hours","description","phone","website","email","appURL","icon"];class c{_api="/api/v5/venues";_request=n.K.getInstance();constructor(){}searchByIds(t){const e=(0,i.VS)(t);if(!e)throw new Error("Please input venue id at least one.");const r=`${this._api}/${e}`;return this._changedRes(r)}searchByDistance(t){const{center:e,distance:r,keywords:n="",offset:s=o.e$,page:a=o.KL}=t;if(!(0,i.ES)(e))throw new Error("Invalid center parameter. Expected an array of two numbers.");if(!(0,i.F5)(r)||r>1e4)throw new Error("Invalid distance parameter. Expected a positive number and no more than 10000.");const c=new URLSearchParams;c.set("center",e.join(",")),c.set("distance",String(r)),c.set("offset",String(s)),c.set("page",String(a)),(0,i.BW)(n)&&c.set("keywords",n);const l=`${this._api}?${c.toString()}`;return this._changedRes(l)}searchByBounds(t){const{keywords:e,bounds:r,offset:n=o.e$,page:s=o.KL}=t;if(!(0,i.dD)(r))throw new Error("'bounds' must be an array of two arrays, each containing two numbers.");const a=new URLSearchParams;a.set("bbox",r.flat().join()),a.set("offset",String(n)),a.set("page",String(s)),(0,i.BW)(e)&&a.set("keywords",e);const c=`${this._api}?${a.toString()}`;return this._changedRes(c)}searchByGlobal(t){const{keywords:e,offset:r=o.e$,page:n=o.KL}=t,s=new URLSearchParams;s.set("offset",String(r)),s.set("page",String(n)),(0,i.BW)(e)&&s.set("keywords",e);const a=`${this._api}?${s.toString()}`;return this._changedRes(a)}searchBySharedFloorId(t){if(!(0,i.BW)(t))throw new Error("Please input correct sharedFloorId.");const e=`${this._api}/shared_floors/${t}`;return this._changedRes(e)}search(t){const e=new URLSearchParams;return Object.entries(t).forEach(([t,r])=>{"bounds"===t?e.set("bbox",r.flat().join()):"center"===t?e.set("center",r.join()):e.set(t,String(r))}),this._changedRes(`${this._api}?${e.toString()}`)}async _changedRes(t){return this._request.get(t).then(t=>{if(t.data?.result?.venues){const e=t.data.result.venues.map(t=>(0,s.A)(t,(t,e)=>a.includes(e)));return{...t,data:{...t.data,result:{...t.data.result,venues:e}}}}return t})}}},2851:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(2528),i=r(6984),o=Object.prototype.hasOwnProperty;const s=function(t,e,r){var s=t[e];o.call(t,e)&&(0,i.A)(s,r)&&(void 0!==r||e in t)||(0,n.A)(t,e,r)}},2854:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.montgomery=function(t){const e=(f=t,(0,n._validateObject)(f,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...f})),{P:r,type:c,adjustScalarBytes:l,powPminus2:u,randomBytes:d}=e,h="x25519"===c;var f;if(!h&&"x448"!==c)throw new Error("invalid type");const p=d||n.randomBytes,y=h?255:448,g=h?32:56,m=h?BigInt(9):BigInt(5),_=h?BigInt(121665):BigInt(39081),b=h?a**BigInt(254):a**BigInt(447),v=h?BigInt(8)*a**BigInt(251)-s:BigInt(4)*a**BigInt(445)-s,w=b+v+s,B=t=>(0,i.mod)(t,r),A=E(m);function E(t){return(0,n.numberToBytesLE)(B(t),g)}function S(t,e){const i=function(t,e){(0,n.aInRange)("u",t,o,r),(0,n.aInRange)("scalar",e,b,w);const i=e,a=t;let c=s,l=o,d=t,h=s,f=o;for(let t=BigInt(y-1);t>=o;t--){const e=i>>t&s;f^=e,({x_2:c,x_3:d}=x(f,c,d)),({x_2:l,x_3:h}=x(f,l,h)),f=e;const r=c+l,n=B(r*r),o=c-l,u=B(o*o),p=n-u,y=d+h,g=B((d-h)*r),m=B(y*o),b=g+m,v=g-m;d=B(b*b),h=B(a*B(v*v)),c=B(n*u),l=B(p*(n+B(_*p)))}({x_2:c,x_3:d}=x(f,c,d)),({x_2:l,x_3:h}=x(f,l,h));const p=u(l);return B(c*p)}(function(t){const e=(0,n.ensureBytes)("u coordinate",t,g);return h&&(e[31]&=127),B((0,n.bytesToNumberLE)(e))}(e),function(t){return(0,n.bytesToNumberLE)(l((0,n.ensureBytes)("scalar",t,g)))}(t));if(i===o)throw new Error("invalid private or public key received");return E(i)}function I(t){return S(t,A)}function x(t,e,r){const n=B(t*(e-r));return{x_2:e=B(e-n),x_3:r=B(r+n)}}return{scalarMult:S,scalarMultBase:I,getSharedSecret:(t,e)=>S(t,e),getPublicKey:t=>I(t),utils:{randomPrivateKey:()=>p(g)},GuBytes:A.slice()}};const n=r(8627),i=r(4967),o=BigInt(0),s=BigInt(1),a=BigInt(2)},2944:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(674);const i=function(){this.__data__=n.A?(0,n.A)(null):{},this.size=0}},3061:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return this.__data__.get(t)}},3098:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return null!=t&&"object"==typeof t}},3149:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3153:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(){return[]}},3161:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=r(1917).A["__core-js_shared__"]},3207:(t,e,r)=>{"use strict";r.d(e,{t:()=>c});var n=r(6568),i=r(8330),o=r(9588),s=r(7007),a=r(3574);class c extends s.EventEmitter{static instance;static platform={sdkVersion:i.rE,identifier:""};_appIds=new Map([[a.en.Access,{}],[a.en.Map,{}]]);_tokenStorage={};_appIdsHistory=[];static getInstance(){return c.instance||(c.instance=new c),c.instance}static setPlatform(t){c.platform=t}updateToken(t){const{appId:e,secret:r,token:n,from:i}=t;this._tokenStorage[e]=n,this._appIds.get(i)[e]=r,this._appIdsHistory.push(e)}deleteToken(t,e){delete this._tokenStorage[t],e&&(delete this._appIds.get(e)[t],this.emit("permission-disconnected",{appId:t,from:e}))}getVersion(){return c.platform.sdkVersion}getToken(t){return this._tokenStorage[t]}async getIdentifier(){if(!c.platform.identifier){const t=await n.Ay.load(),e=await t.get();c.platform.identifier=e.visitorId}return c.platform.identifier}getAppId(t){const e=t?Object.keys(this._appIds.get(t)):[...Object.keys(this._appIds.get(a.en.Access)),...Object.keys(this._appIds.get(a.en.Map))];return this._appIdsHistory.reverse().find(t=>e.includes(t))}async fetchToken(t,e,r=0){try{const r={appId:t,secret:e,..."bundleId"in c.platform?{bundleId:c.platform.bundleId}:"sha1"in c.platform?{sha1:c.platform.sha1,packageName:c.platform.packageName}:{origin:window.location.hostname||"restriction.test.example.com",keyPlatform:"WEB"}},n={"Content-Type":"application/json",sdkVersion:c.platform.sdkVersion,identifier:c.platform.identifier??await this.getIdentifier()},i=await fetch(o.R0,{method:"POST",body:JSON.stringify(r),headers:n});return(await i.json()).result.idToken}catch(n){if(r<3){const n=500*Math.pow(2,r);return console.warn(`Retrying to fetch token in ${n} ms...`,++r),await new Promise(t=>setTimeout(t,n)),this.fetchToken(t,e,r)}throw n}}}},3236:(t,e,r)=>{"use strict";function n(t){const{buildingId:e,labelCenter:{lat:r,lon:n},floors:i,name:o,venueId:s,defaultFloor:a}=t,c=Object.keys(o).map(t=>"default"===t?"name":`name:${t}`),{codes:l,ids:u,ordinals:d}=i.reduce((t,e)=>{const{id:r,code:n,ordinal:i}=e;return{codes:t.codes?`${t.codes},${n}`:n,ids:t.ids?`${t.ids},${r}`:r,ordinals:`${t.ordinals}`?`${t.ordinals},${i}`:`${i}`}},{codes:"",ids:"",ordinals:""});return{layer:{id:"mapxus-building-line"},properties:{building:"yes",id:e,label_center:`${n},${r}`,level_ids:u,level_names:l,ordinals:d,"ref:venue":s,...c,...a?{default_displayed_floor:a}:{}},source:"indoor-planet",sourceLayer:"mapxus_building"}}function i(t){const{address:e,buildings:r,id:n,name:i,type:o,labelCenter:{lon:s,lat:a},defaultBuilding:c,sharedFloors:l}=t,u=Object.entries(e).reduce((t,[e,r])=>Object.assign(t,"default"===e?{"addr:street":r.street,"addr:housenumber":r.housenumber}:{[`addr:street:${e}`]:r.street}),{}),d=Object.keys(i).map(t=>"default"===t?"name":`name:${t}`),h=c?r.find(t=>t.id===c)?.defaultFloor:null,f=c?{default_displayed_building:c,...h?{default_displayed_ordinal:h}:{}}:{},p=l?.length?{shared_level_ids:l.map(({id:t})=>t).join(","),shared_level_ordinals:l.map(({ordinal:t})=>t).join(",")}:{};return{layer:{id:"mapxus-venue-fill"},properties:{...u,...d,id:n,venue:o,label_center:`${s},${a}`,building_ids:r.map(({id:t})=>t).join(),...f,...p},source:"indoor-planet",sourceLayer:"mapxus_venue"}}r.d(e,{E:()=>i,r:()=>n})},3244:(t,e,r)=>{"use strict";r.d(e,{A:()=>y});var n=r(3265),i=r(8967),o=r(402),s=r(7265),a=r(5861),c=r(2049),l=r(4616),u=r(8719),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;const y=function(t,e,r,y,g,m){var _=(0,c.A)(t),b=(0,c.A)(e),v=_?h:(0,a.A)(t),w=b?h:(0,a.A)(e),B=(v=v==d?f:v)==f,A=(w=w==d?f:w)==f,E=v==w;if(E&&(0,l.A)(t)){if(!(0,l.A)(e))return!1;_=!0,B=!1}if(E&&!B)return m||(m=new n.A),_||(0,u.A)(t)?(0,i.A)(t,e,r,y,g,m):(0,o.A)(t,e,v,r,y,g,m);if(!(1&r)){var S=B&&p.call(t,"__wrapped__"),I=A&&p.call(e,"__wrapped__");if(S||I){var x=S?t.value():t,L=I?e.value():e;return m||(m=new n.A),g(x,L,r,y,m)}}return!!E&&(m||(m=new n.A),(0,s.A)(t,e,r,y,g,m))}},3265:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var n=r(7919),i=r(1532),o=r(42),s=r(3061),a=r(4105),c=r(7681);function l(t){var e=this.__data__=new n.A(t);this.size=e.size}l.prototype.clear=i.A,l.prototype.delete=o.A,l.prototype.get=s.A,l.prototype.has=a.A,l.prototype.set=c.A;const u=l},3442:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(5629),i=r(1682),o=r(5056),s=r(1472),a=r(3549);class c{_container;_indoor;_maplibre;_position="top-right";_buildingId;_floorNames;_ordinals;_ordinal;_style;_$innerFloors;_$activeFloor;_centerSelectorIdx;_lastNormalScrollableIdx;_$arrowBtnUp;_$arrowBtnDown;_maxScrollTop;_$selectorExpanded;_$selectorFolded;_componentDidMount=!1;_visible=!1;_isEnabled;_dragPan;_language;_debounceScroll;_clearScrollEventListener;constructor(t,e){const{style:r,enabled:n=!0,language:i}=e;this._indoor=t,this._language=i,this._style=r?Object.assign({},o.kC,r):o.kC,this._isEnabled=n,this._addIndoorEventListeners()}onAdd(t){return this._maplibre=t,this._addMapMoveEventListener(),this._container=(0,i.r)("div","maplibregl-ctrl mapxus-ctrl-floors hidden"),this._container}onRemove(){this._debounceScroll&&this._debounceScroll.cancel(),this._clearScrollEventListener&&this._clearScrollEventListener(),(0,i.Z)(this._container)}get position(){return this._position}get enabled(){return this._isEnabled}setEnabled(t){this._isEnabled=t,t&&!this._visible&&this._setVisibility(!0),!t&&this._visible&&this._setVisibility(!1)}getDefaultPosition(){return"top-right"}async switchByOrdinal(t,e){this._ordinal=t,this._dragPan=e??!0,await this._indoor.switchFloorByOrdinal(t),this._updateSelectorStatus(t),this._scrollCenterActiveFloor()}changePosition(t,e,r){const n=document.querySelector(`.maplibregl-ctrl-${t}`),i=n.querySelector(".mapxus-ctrl-floors");if(t!==e){this._position=e;const t=document.querySelector(`.maplibregl-ctrl-${e}`);i&&(n.removeChild(i),Number.isFinite(r)?t.insertBefore(i,t.children[r]):t.append(i),this._show(),this._scrollCenterActiveFloor())}else Number.isFinite(r)&&n.children[r]!==i&&(n.removeChild(i),n.insertBefore(i,n.children[r]),this._show(),this._scrollCenterActiveFloor())}setStyle(t){this._style=Object.assign({},this._style,t),this._componentDidMount&&(this._clearFloors(),this._calcSelectorLayout(),this._render(),this._scrollCenterActiveFloor())}_setVisibility(t){this._componentDidMount?t?(this._show(),this._scrollCenterActiveFloor()):this._hide():(this._visible=t,this._indoor.building&&t&&(this._render(),this._show(),this._scrollCenterActiveFloor()))}_addIndoorEventListeners(){this._indoor.on(n.Ms,t=>{if(this._updatePrepared(),!t)return;const{ordinal:e,dragPan:r}=t;this._dragPan=r,"building"in t?this._renderBuildingFloors(t.building,e):this._renderSharedLevelFloor(t)})}_updatePrepared(){this._clearState(),this._visible&&this._hide(),this._componentDidMount&&this._clearFloors()}_renderBuildingFloors(t,e){const{level_names:r,ordinals:n,id:i}=t.properties;this._buildingId=i,this._floorNames=r.split(",").reverse(),this._ordinals=n.split(",").reverse(),this._ordinal=e,this._calcSelectorLayout(),this._render();const o=this._indoor.getFeaturesById(i,{filter:t=>"mapxus-building-line"===t.layer.id})[0];this._checkIfShowFloorSelector(o)}_renderSharedLevelFloor(t){const{name:e,ordinal:r,id:n}=t;this._floorNames=[e[this._language]||e.default],this._ordinals=[r],this._ordinal=r,this._calcSelectorLayout(),this._render();const i=this._indoor.getFeaturesById(n,{filter:t=>"mapxus-shared-level-fill"===t.layer.id})[0];this._checkIfShowFloorSelector(i)}_checkIfShowFloorSelector(t){this.enabled&&(!1!==this._dragPan||!1===this._dragPan&&t)&&(this._show(),this._scrollCenterActiveFloor())}_addMapMoveEventListener(){this._maplibre.on("moveend",()=>{if(this.enabled&&!1===this._dragPan&&this._buildingId){this._indoor.getFeaturesById(this._buildingId,{layerIds:["mapxus-building-line"]})[0]?this._componentDidMount?this._visible||(this._show(),this._scrollCenterActiveFloor()):(this._render(),this._show(),this._scrollCenterActiveFloor()):this._componentDidMount&&this._visible&&this._hide()}})}_clearState(){this._buildingId=null,this._floorNames=[],this._ordinals=[],this._ordinal=null}_calcSelectorLayout(){const{itemCount:t,itemSize:e}=this._style;this._centerSelectorIdx=Math.ceil(t/2)-1,this._maxScrollTop=(this._floorNames.length-t)*e,this._lastNormalScrollableIdx=this._floorNames.length-(t-this._centerSelectorIdx-1)-1}_render(){this._createFloors(),this._componentDidMount=!0}_hide(){this._container.classList.add("hidden"),this._visible=!1}_show(){this._container.classList.remove("hidden"),this._visible=!0}_createFloors(){this._$selectorFolded=this._$foldedSelector(this._container,()=>{this._expandSelector(!0),this._scrollCenterActiveFloor()}),this._$selectorExpanded=this._$expandedSelector(this._container,()=>this._expandSelector(!1))}_$expandedSelector(t,e){const{itemSize:r,itemCount:n,defaultFolded:o,backgroundColor:s}=this._style,c=(0,i.r)("div","mapxus-ctrl-floors-expanded "+(o?"hidden":""),t);if(this._floorNames.length>1){(0,i.r)("div","mapxus-ctrl-floors-close",c).onclick=e}const l=(0,i.r)("div","mapxus-ctrl-floors-wrapper",c);return l.style.backgroundColor=s,this._floorNames.length>n&&(this._$arrowBtnUp=this._$createScrollButton(l,"up"),this._$arrowBtnUp.onclick=()=>this._handleScroll("up")),this._$innerFloors=(0,i.r)("div","mapxus-ctrl-floors-inner",l),Object.assign(this._$innerFloors.style,{maxHeight:r*n+"px",width:`${r}px`}),this._$createFloors(this._$innerFloors),this._floorNames.length>n&&(this._$arrowBtnDown=this._$createScrollButton(l,"down"),this._$arrowBtnDown.onclick=()=>this._handleScroll("down"),this._$innerFloors.addEventListener("scroll",this._debounceScroll=(0,a.A)(t=>{t.stopPropagation(),this._resetArrowBtnStatus(this._$innerFloors.scrollTop)},100)),this._clearScrollEventListener=()=>this._$innerFloors.removeEventListener("scroll",this._debounceScroll)),c}_$foldedSelector(t,e){const{itemSize:r,activeFontColor:n,activeBackgroundColor:o,defaultFolded:s}=this._style,a=(0,i.r)("div","mapxus-ctrl-floors-folded mapxus-ctrl-floors-floor "+(s?"":"hidden"),t);return a.onclick=e,Object.assign(a.style,{width:`${r}px`,height:`${r}px`,lineHeight:`${r}px`,color:n,backgroundColor:o}),a}_clearFloors(){this._container.replaceChildren(),this._componentDidMount=!1}_$createScrollButton(t,e){return(0,i.r)("div",`mapxus-ctrl-floors-arrow mapxus-ctrl-floors-floor ${e}`,t)}_$createFloors(t){const{fontColor:e,itemSize:r}=this._style;let n;this._floorNames.forEach((o,s)=>{n=(0,i.r)("div","mapxus-ctrl-floors-floor",t),n.dataset.floor=o,n.dataset.ordinal=this._ordinals[s],n.innerText=o,Object.assign(n.style,{color:e,height:`${r}px`,lineHeight:`${r}px`}),n.dataset.ordinal===this._ordinal&&(this._$activeFloor=n,this._resetActiveFloor(!0),this._$selectorFolded.innerText=o),n.onclick=async t=>{this._indoor.setDragPan("restrict"),await this.switchByOrdinal(t.target.dataset.ordinal)}})}_updateSelectorStatus(t){const e=this._floorNames[this._ordinals.indexOf(t)];this._$activeFloor&&this._resetActiveFloor(!1);for(const e of this._$innerFloors.children){const r=e;r.dataset.ordinal===t&&(this._$activeFloor=r,this._resetActiveFloor(!0))}this._$selectorFolded.innerText=e}_resetArrowBtnStatus(t){0===t?this._$arrowBtnUp?.classList?.add("hidden"):this._$arrowBtnUp?.classList?.remove("hidden"),t===this._maxScrollTop?this._$arrowBtnDown?.classList?.add("hidden"):this._$arrowBtnDown?.classList?.remove("hidden")}_resetActiveFloor(t){const{activeBackgroundColor:e,backgroundColor:r,activeFontColor:n,fontColor:i}=this._style;Object.assign(this._$activeFloor.style,{color:t?n:i,backgroundColor:t?e:r,fontWeight:t?"bold":"normal",cursor:t?"auto":"pointer"}),this._$activeFloor.disabled=t}_scrollCenterActiveFloor(){if(this._ordinal){const t=this._ordinals.indexOf(this._ordinal);t>-1&&(this._$innerFloors.scrollTop=this._getScrollTop(t),this._$innerFloors.scrollTop||this._resetArrowBtnStatus(0))}}_getScrollTop(t){return(0,s.A)(this._centerSelectorIdx,this._lastNormalScrollableIdx+1)?(t-this._centerSelectorIdx)*this._style.itemSize:t>this._lastNormalScrollableIdx?this._maxScrollTop:0}_handleScroll(t){const e=this._$innerFloors.scrollTop,{itemSize:r}=this._style;if("up"===t){const t=e-2*r;this._$innerFloors.scrollTop=t<0?0:t}else if("down"===t){const t=e+2*r;this._$innerFloors.scrollTop=t>this._maxScrollTop?this._maxScrollTop:t}}_expandSelector(t){t?(this._$selectorExpanded.classList.remove("hidden"),this._$selectorFolded.classList.add("hidden")):(this._$selectorExpanded.classList.add("hidden"),this._$selectorFolded.classList.remove("hidden"))}}},3454:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=Math.max,i=Math.min;const o=function(t,e,r){return t>=i(e,r)&&t<n(e,r)}},3503:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeHex=e.remove0x=void 0;var n=r(6527);e.remove0x=function(t){return t.startsWith("0x")||t.startsWith("0X")?t.slice(2):t};e.decodeHex=function(t){return(0,n.hexToBytes)((0,e.remove0x)(t))}},3511:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(6912),i=r(5647),o=r(4792),s=r(3153);const a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,n.A)(e,(0,o.A)(t)),t=(0,i.A)(t);return e}:s.A},3549:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(3149),i=r(1052),o=r(9313),s=Math.max,a=Math.min;const c=function(t,e,r){var c,l,u,d,h,f,p=0,y=!1,g=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(e){var r=c,n=l;return c=l=void 0,p=e,d=t.apply(n,r)}function b(t){var r=t-f;return void 0===f||r>=e||r<0||g&&t-p>=u}function v(){var t=(0,i.A)();if(b(t))return w(t);h=setTimeout(v,function(t){var r=e-(t-f);return g?a(r,u-(t-p)):r}(t))}function w(t){return h=void 0,m&&c?_(t):(c=l=void 0,d)}function B(){var t=(0,i.A)(),r=b(t);if(c=arguments,l=this,f=t,r){if(void 0===h)return function(t){return p=t,h=setTimeout(v,e),y?_(t):d}(f);if(g)return clearTimeout(h),h=setTimeout(v,e),_(f)}return void 0===h&&(h=setTimeout(v,e)),d}return e=(0,o.A)(e)||0,(0,n.A)(r)&&(y=!!r.leading,u=(g="maxWait"in r)?s((0,o.A)(r.maxWait)||0,e):u,m="trailing"in r?!!r.trailing:m),B.cancel=function(){void 0!==h&&clearTimeout(h),p=0,c=f=l=h=void 0},B.flush=function(){return void 0===h?d:w((0,i.A)())},B}},3562:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHash=function(t){return{hash:t}},e.createCurve=function(t,e){const r=e=>(0,n.weierstrass)({...t,hash:e});return{...r(e),create:r}};const n=r(1705)},3574:(t,e,r)=>{"use strict";r.d(e,{$O:()=>a.$,Kp:()=>s.Kp,LJ:()=>s.LJ,SV:()=>i.S,_P:()=>s._P,en:()=>o.e,nH:()=>s.nH,ys:()=>n.y});var n=r(6612),i=r(9408),o=r(8884),s=r(6358),a=r(5405)},3626:(t,e,r)=>{"use strict";r.d(e,{V:()=>i});var n=r(1682);class i{_container;_isEnabled;constructor(t){this._isEnabled=t?.enabled??!0}onAdd(t){if(this._container=(0,n.r)("div","maplibregl-ctrl mapxus-ctrl-logo",t.getContainer()),this._isEnabled){const t=(0,n.r)("a","mapxus-logo",this._container);t.target="_blank",t.href="https://www.khi.co.jp/groupvision2030/mapxus.html",t.setAttribute("aria-label","Mapxus logo"),t.setAttribute("rel","noopener"),this._container.appendChild(t)}return this._container}onRemove(){(0,n.Z)(this._container)}getDefaultPosition(){return"bottom-left"}}},3631:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(702),i=r(1917);const o=(0,n.A)(i.A,"WeakMap")},3724:(t,e,r)=>{"use strict";r.d(e,{H:()=>c});var n=r(9588),i=r(2068),o=r(9573),s=r(6034);const a=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","description"];class c{_api="/api/v5/buildings";_request=i.K.getInstance();constructor(){}searchByIds(t){const e=(0,o.VS)(t);if(!e)throw new Error("Please input building id at least one.");const r=`${this._api}/${e}`;return this._changedRes(r)}searchByDistance(t){const{center:e,distance:r,keywords:i="",offset:s=n.e$,page:a=n.KL}=t;if(!(0,o.ES)(e))throw new Error("Invalid center parameter. Expected an array of two numbers.");if(!(0,o.F5)(r)||r>1e4)throw new Error("Invalid distance parameter. Expected a positive number and no more than 10000.");const c=new URLSearchParams;c.set("center",e.join(",")),c.set("distance",String(r)),c.set("offset",String(s)),c.set("page",String(a)),(0,o.BW)(i)&&c.set("keywords",i);const l=`${this._api}?${c.toString()}`;return this._changedRes(l)}searchByBounds(t){const{bounds:e,offset:r=n.e$,page:i=n.KL,keywords:s}=t;if(!(0,o.dD)(e))throw new Error("'bounds' must be an array of two arrays, each containing two numbers.");const a=new URLSearchParams;a.set("bbox",e.flat().join()),a.set("offset",String(r)),a.set("page",String(i)),(0,o.BW)(s)&&a.set("keywords",s);const c=`${this._api}?${a.toString()}`;return this._changedRes(c)}searchByGlobal(t){const{keywords:e,offset:r=n.e$,page:i=n.KL}=t,s=new URLSearchParams;s.set("searchGlobal",String(!0)),s.set("offset",String(r)),s.set("page",String(i)),(0,o.BW)(e)&&s.set("keywords",e);const a=`${this._api}?${s.toString()}`;return this._changedRes(a)}searchByFloorId(t){if(!(0,o.BW)(t))throw new Error("'floorId' cannot be empty.");return this._changedRes(`${this._api}/floors/${t}`)}search(t){const e=new URLSearchParams;return Object.entries(t).forEach(([t,r])=>{"bounds"===t?e.set("bbox",r.flat().join()):"center"===t?e.set("center",r.join()):e.set(t,String(r))}),this._changedRes(`${this._api}?${e.toString()}`)}async _changedRes(t){return this._request.get(t).then(t=>{if(t.data?.result?.buildings){const e=t.data.result.buildings.map(t=>(0,s.A)(t,(t,e)=>a.includes(e)));return{...t,data:{...t.data,result:{...t.data.result,buildings:e}}}}return t})}}},3736:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},3831:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(6912),i=r(2049);const o=function(t,e,r){var o=e(t);return(0,i.A)(t)?o:(0,n.A)(o,r(t))}},3913:(t,e,r)=>{"use strict";r.d(e,{d:()=>i});var n=r(1682);class i{_container;_$icon;_removeClickEventListener;onAdd(t){return this._container=(0,n.r)("div","maplibregl-ctrl mapxus-ctrl-collapsed-copyright",t.getContainer()),this._container.innerHTML='\n <div class="mapxus-collapsed-copyright-content">\n <div class="mapxus-collapsed-copyright-menu hidden">\n <div class="mapxus-collapsed-copyright-logo" onclick="window.open(\'https://www.khi.co.jp/groupvision2030/mapxus.html\')"></div>\n <div class="mapxus-collapsed-horizontal-divider"></div>\n <div class="mapxus-collapsed-copyright-text" onclick="window.open(\'https://www.openstreetmap.org/copyright/\')"></div>\n </div>\n <div class="mapxus-collapsed-copyright-btn"></div>\n </div>\n ',this._bindEvents(),this._container}onRemove(){this._removeClickEventListener(),(0,n.Z)(this._container)}getDefaultPosition(){return"bottom-right"}_bindEvents(){const t=this._container.querySelector(".mapxus-collapsed-copyright-menu");this._$icon=this._container.querySelector(".mapxus-collapsed-copyright-btn");let e=!1;function r(){e=!e,e?t.classList.remove("hidden"):t.classList.add("hidden")}this._$icon.addEventListener("click",r),this._removeClickEventListener=()=>this._$icon.removeEventListener("click",r)}}},3938:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(367).A)(Object.keys,Object)},3957:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(674);const i=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n.A&&void 0===e?"__lodash_hash_undefined__":e,this}},3973:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(3831),i=r(3511),o=r(1865);const s=function(t){return(0,n.A)(t,o.A,i.A)}},3988:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=r(1917).A.Uint8Array},4099:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return t.has(e)}},4105:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return this.__data__.has(t)}},4116:(t,e,r)=>{"use strict";r.d(e,{p:()=>o});var n=r(853),i=r(5664);class o{_maplibreMap;_layerId;_sourceId;_imageName="poi-01";_imageSize=.75;_iconAnchor="bottom";constructor(t){this._maplibreMap=t;const e=(0,i.A)();this._layerId=`MXMap_preset_marker_layer_${e}`,this._sourceId=`MXMap_preset_marker_source_${e}`}async setIcon(t){t&&await(0,n.K)(this._maplibreMap,t),this._imageName=t}setIconSize(t){this._imageSize=t}setIconAnchor(t){this._iconAnchor=t}get layerId(){return this._layerId}get sourceId(){return this._sourceId}create(t){if(t.length){const e=t.map(t=>this._createIconFeature(t));this._addIconSource(e),this._addIconLayer()}}updateData(t){const e=this._maplibreMap.getSource(this._sourceId);if(!e)return;const r=!(!t.remove||!t.remove.length),n=!(!t.add||!t.add.length),i=!(!t.update||!t.update.length);if(r||n||i){const o={};r&&(o.remove=t.remove.map(t=>String(t))),n&&(o.add=t.add.map(t=>this._createIconFeature(t))),i&&(o.update=t.update.map(t=>{const e="properties"in t,r=this._createIconFeature(t),{id:n,geometry:i,properties:o}=r;return{id:n,newGeometry:i,removeAllProperties:e,...o?{addOrUpdateProperties:o.map((t,e)=>({key:e,value:t}))}:{}}})),e.updateData(o)}}remove(){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.removeLayer(this._layerId),this._maplibreMap.getSource(this._sourceId)&&this._maplibreMap.removeSource(this._sourceId)}on(t,e){const{unsubscribe:r}=this._maplibreMap.on(t,this._layerId,t=>this._handleEventListener(t,e));return{off:r}}setFilter(t){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,t)}setFilterByVenue(t,e){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,["any",["all",["==",["get","venueId"],t??""],["==",["get","ordinal"],e??""]],["all",["==",["get","venueId"],""],["==",["get","ordinal"],""]]])}setFilterByBuilding(t,e){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,["any",["all",["==",["get","buildingId"],t??""],["==",["get","ordinal"],e??""]],["all",["==",["get","buildingId"],""],["==",["get","ordinal"],""]]])}setOpacity(t){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",t)}setOpacityByVenue(t,e,r){if(this._maplibreMap.getLayer(this._layerId)){const n=["case",["all",["==",["get","venueId"],t??""],["==",["get","ordinal"],e??""]],1,["all",["==",["get","venueId"],""],["==",["get","ordinal"],""]],1,r??.5];this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",n)}}setOpacityByBuilding(t,e,r){if(this._maplibreMap.getLayer(this._layerId)){const n=["case",["all",["==",["get","buildingId"],t??""],["==",["get","ordinal"],e??""]],1,["all",["==",["get","buildingId"],""],["==",["get","ordinal"],""]],1,r??.5];this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",n)}}_createIconFeature(t){const{lngLat:e,properties:r}=t;return{id:"featureId"in t&&Number.isFinite(t.featureId)?String(t.featureId):void 0,type:"Feature",geometry:{type:"Point",coordinates:e},properties:r||null}}_addIconSource(t){const e={type:"geojson",data:{type:"FeatureCollection",features:t}};this._maplibreMap.addSource(this._sourceId,e)}_addIconLayer(){this._maplibreMap.addLayer({id:this._layerId,type:"symbol",source:this._sourceId,layout:{"icon-image":this._imageName,"icon-size":this._imageSize,"icon-anchor":this._iconAnchor,"icon-allow-overlap":!0,"icon-ignore-placement":!0}})}_handleEventListener(t,e){const{point:r}=t;e(this._maplibreMap.queryRenderedFeatures(r,{layers:[this._layerId]})[0])}}},4139:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hkdf=void 0,e.extract=o,e.expand=c;const n=r(9615),i=r(9175);function o(t,e,r){return(0,i.ahash)(t),void 0===r&&(r=new Uint8Array(t.outputLen)),(0,n.hmac)(t,(0,i.toBytes)(r),(0,i.toBytes)(e))}const s=Uint8Array.from([0]),a=Uint8Array.of();function c(t,e,r,o=32){(0,i.ahash)(t),(0,i.anumber)(o);const c=t.outputLen;if(o>255*c)throw new Error("Length should be <= 255*HashLen");const l=Math.ceil(o/c);void 0===r&&(r=a);const u=new Uint8Array(l*c),d=n.hmac.create(t,e),h=d._cloneInto(),f=new Uint8Array(d.outputLen);for(let t=0;t<l;t++)s[0]=t+1,h.update(0===t?a:f).update(r).update(s).digestInto(f),u.set(f,c*t),d._cloneInto(h);return d.destroy(),h.destroy(),(0,i.clean)(f,s),u.slice(0,o)}e.hkdf=(t,e,r,n,i)=>c(t,o(t,e,r),n,i)},4171:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(702);const i=function(){try{var t=(0,n.A)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},4543:(t,e,r)=>{"use strict";r.d(e,{e:()=>n});class n extends Error{status;constructor(t,e){super(t);const{status:r,name:n}=e;void 0!==r&&(this.status=r),void 0!==n&&(this.name=n)}}},4545:(t,e,r)=>{"use strict";r.d(e,{FR:()=>o.F,H$:()=>i.H,v$:()=>s.v,w1:()=>n.w});var n=r(2801),i=r(3724),o=r(5568),s=r(5344)},4616:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(1917),i=r(4639),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=s&&s.exports===o?n.A.Buffer:void 0;const c=(a?a.isBuffer:void 0)||i.A},4639:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(){return!1}},4762:(t,e,r)=>{"use strict";r.d(e,{G:()=>i});var n=r(1682);class i{_map;_maplibre;_buildingId;_features;_$container;_$listContainer;_$buildingList;_listHeight;_language;_visible;_position="top-right";_isMobileMode;_isListShown=!1;constructor(t,e){this._map=t,this._language=t.getLanguage(),this._visible=e??!0,this._detectDeviceMode()}onAdd(t){return this._maplibre=t,this._$container=(0,n.r)("div","maplibregl-ctrl maplibregl-ctrl-building-filter "+(this._visible?"":"hide"),this._maplibre.getContainer()),this._$container.appendChild(this._buildingFilterIconCreate("div")),this._$container.appendChild(this._buildingNameListCreate("div")),this._bindEvents(),this._$container}onRemove(){(0,n.Z)(this._$container)}get position(){return this._position}get enabled(){return this._visible}getDefaultPosition(){return"top-right"}setVisibility(t){this._visible=t,t?this._$showLayout():this._$hideLayout()}changePosition(t,e,r){const n=document.querySelector(`.maplibregl-ctrl-${t}`),i=n.querySelector(".maplibregl-ctrl-building-filter");if(t!==e){this._position=e;const t=document.querySelector(`.maplibregl-ctrl-${e}`);i&&(n.removeChild(i),Number.isFinite(r)?t.insertBefore(i,t.children[r]):t.append(i),this._updateBuildingListLayout(e))}else Number.isFinite(r)&&n.children[r]!==i&&(n.removeChild(i),n.insertBefore(i,n.children[r]))}_bindEvents(){this._maplibre.on("moveend",()=>this._refresh()),this._map.onMapChangeListener(t=>{const e=t.building?.properties?.id??"";this._buildingId!==e&&(this._buildingId=e,this._refresh())}),this._map.renderComplete(()=>this._init())}_init(){this._load()}_refresh(){this._load()}_load(){this._buildingNameListClean(),this._buildingNameListUpdate()}_buildingFilterIconCreate(t){const e=(0,n.r)(t,"mapxus-building-filter-icon");return this._bindMouseOnEvents(e,!1),this._bindMobileTouchEvents(e),e}_buildingNameListCreate(t){return this._$listContainer=(0,n.r)(t,"mapxus-building-name-layout"),this._$listContainer.style.display="none",this._$listContainer.style.top="20px",this._$buildingList=(0,n.r)(t,"mapxus-building-name-list",this._$listContainer),this._bindMouseOnEvents(this._$listContainer,!0),this._$listContainer}_buildingNameListUpdate(){this._features=[];const t=this._map.getMaplibre(),e=t?t.queryRenderedFeatures({layers:["mapxus-building-line"]}):[];for(const t of e){const{properties:e}=t,{id:r,name:n}=e,i=e?.[`name:${this._language}`]??n;this._features.find(t=>t.properties.id===r)||(this._features.push(t),this._$buildingList.appendChild(this._buildingNameCreate("p",i,r,r===this._map.building?.properties?.id)))}this._setBuildingListHeight(this._features),this._updateBuildingListLayout(this._position)}_buildingNameListClean(){this._$buildingList.replaceChildren()}_setBuildingListHeight(t){const e=t.map(t=>{const e=t?.properties?.[`name:${this._language}`]??t?.properties?.name;return e?Math.ceil(8*e.length/107):0}).reduce((t,e)=>t+e,0);this._listHeight=26*e+8*t.length,this._$buildingList.style.height=this._$listContainer.style.height=`${this._listHeight>=208?208:this._listHeight}px`}_buildingNameCreate(t,e,r,i){const o=(0,n.r)(t,"mapxus-building-name"+(i?" active":""));return o.dataset.id=r,o.innerText=e,this._buildingNameClickEvent(o),o}_toggleList(t){this._isListShown=t,this._$listContainer.style.display=t?"block":"none"}_buildingNameClickEvent(t){t.onclick||(t.onclick=async t=>{const e=t.target;await this._map.selectBuildingById(e.dataset.id)})}_bindMouseOnEvents(t,e){t.onmouseenter=()=>{this._isMobileMode||this._toggleList(!0)},e&&(t.onmouseleave=()=>this._toggleList(!1))}_bindMobileTouchEvents(t){window.addEventListener("resize",()=>this._detectDeviceMode()),t.ontouchend=()=>this._toggleList(!this._isListShown)}_$showLayout(){this._$container.classList.remove("hide")}_$hideLayout(){this._$container.classList.add("hide")}_updateBuildingListLayout(t){t.indexOf("left")>-1?(this._$listContainer.style.right=null,this._$listContainer.style.left="55px"):(this._$listContainer.style.left=null,this._$listContainer.style.right="55px");const e=this._$container.offsetParent?this._$container.offsetParent.clientHeight-(this._$container.offsetTop+this._$container.clientHeight)-25:0;t.includes("bottom")&&this._listHeight-20>e?(this._$listContainer.style.top=null,this._$listContainer.style.bottom="15px"):(this._$listContainer.style.bottom=null,this._$listContainer.style.top="20px")}_detectDeviceMode(){this._isMobileMode=window.matchMedia("(pointer: coarse) and (max-width: 768px)").matches}}},4787:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(169);const i=function(t){var e=this.__data__,r=(0,n.A)(e,t);return r<0?void 0:e[r][1]}},4792:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(2634),i=r(3153),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const a=s?function(t){return null==t?[]:(t=Object(t),(0,n.A)(s(t),function(e){return o.call(t,e)}))}:i.A},4841:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(2136),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===i&&n.A.process;const a=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}()},4846:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9672),i=r(3098);const o=function(t){return(0,i.A)(t)&&"[object Arguments]"==(0,n.A)(t)}},4877:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}},4928:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ephemeralKeySize=e.symmetricNonceLength=e.symmetricAlgorithm=e.isHkdfKeyCompressed=e.isEphemeralKeyCompressed=e.ellipticCurve=e.ECIES_CONFIG=void 0;var n=r(1666),i=function(){this.ellipticCurve="secp256k1",this.isEphemeralKeyCompressed=!1,this.isHkdfKeyCompressed=!1,this.symmetricAlgorithm="aes-256-gcm",this.symmetricNonceLength=16};e.ECIES_CONFIG=new i;e.ellipticCurve=function(){return e.ECIES_CONFIG.ellipticCurve};e.isEphemeralKeyCompressed=function(){return e.ECIES_CONFIG.isEphemeralKeyCompressed};e.isHkdfKeyCompressed=function(){return e.ECIES_CONFIG.isHkdfKeyCompressed};e.symmetricAlgorithm=function(){return e.ECIES_CONFIG.symmetricAlgorithm};e.symmetricNonceLength=function(){return e.ECIES_CONFIG.symmetricNonceLength};e.ephemeralKeySize=function(){var t={secp256k1:e.ECIES_CONFIG.isEphemeralKeyCompressed?n.COMPRESSED_PUBLIC_KEY_SIZE:n.UNCOMPRESSED_PUBLIC_KEY_SIZE,x25519:n.CURVE25519_PUBLIC_KEY_SIZE,ed25519:n.CURVE25519_PUBLIC_KEY_SIZE};if(e.ECIES_CONFIG.ellipticCurve in t)return t[e.ECIES_CONFIG.ellipticCurve];throw new Error("Not implemented")}},4943:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(759),i=r(7960),o=r(5997);const s=function(t){var e=(0,i.A)(t);return 1==e.length&&e[0][2]?(0,o.A)(e[0][0],e[0][1]):function(r){return r===t||(0,n.A)(r,t,e)}}},4967:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNegativeLE=void 0,e.mod=d,e.pow=function(t,e,r){return _(B(r),t,e)},e.pow2=function(t,e,r){let n=t;for(;e-- >i;)n*=n,n%=r;return n},e.invert=h,e.tonelliShanks=y,e.FpSqrt=g,e.validateField=function(t){const e=m.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n._validateObject)(t,e),t},e.FpPow=_,e.FpInvertBatch=b,e.FpDiv=function(t,e,r){return t.mul(e,"bigint"==typeof r?h(r,t.ORDER):t.inv(r))},e.FpLegendre=v,e.FpIsSquare=function(t,e){return 1===v(t,e)},e.nLength=w,e.Field=B,e.FpSqrtOdd=function(t,e){if(!t.isOdd)throw new Error("Field doesn't have isOdd");const r=t.sqrt(e);return t.isOdd(r)?r:t.neg(r)},e.FpSqrtEven=function(t,e){if(!t.isOdd)throw new Error("Field doesn't have isOdd");const r=t.sqrt(e);return t.isOdd(r)?t.neg(r):r},e.hashToPrivateScalar=function(t,e,r=!1){const i=(t=(0,n.ensureBytes)("privateHash",t)).length,s=w(e).nByteLength+8;if(s<24||i<s||i>1024)throw new Error("hashToPrivateScalar: expected "+s+"-1024 bytes of input, got "+i);return d(r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t),e-o)+o},e.getFieldBytesLength=A,e.getMinHashLength=E,e.mapHashToField=function(t,e,r=!1){const i=t.length,s=A(e),a=E(e);if(i<16||i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const c=d(r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t),e-o)+o;return r?(0,n.numberToBytesLE)(c,s):(0,n.numberToBytesBE)(c,s)};const n=r(8627),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),l=BigInt(5),u=BigInt(8);function d(t,e){const r=t%e;return r>=i?r:e+r}function h(t,e){if(t===i)throw new Error("invert: expected non-zero number");if(e<=i)throw new Error("invert: expected positive modulus, got "+e);let r=d(t,e),n=e,s=i,a=o,c=o,l=i;for(;r!==i;){const t=n/r,e=n%r,i=s-c*t,o=a-l*t;n=r,r=e,s=c,a=l,c=i,l=o}if(n!==o)throw new Error("invert: does not exist");return d(s,e)}function f(t,e){const r=(t.ORDER+o)/c,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}function p(t,e){const r=(t.ORDER-l)/u,n=t.mul(e,s),i=t.pow(n,r),o=t.mul(e,i),a=t.mul(t.mul(o,s),i),c=t.mul(o,t.sub(a,t.ONE));if(!t.eql(t.sqr(c),e))throw new Error("Cannot find square root");return c}function y(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-o,r=0;for(;e%s===i;)e/=s,r++;let n=s;const a=B(t);for(;1===v(a,n);)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===r)return f;let c=a.pow(n,e);const l=(e+o)/s;return function(t,n){if(t.is0(n))return n;if(1!==v(t,n))throw new Error("Cannot find square root");let i=r,s=t.mul(t.ONE,c),a=t.pow(n,e),u=t.pow(n,l);for(;!t.eql(a,t.ONE);){if(t.is0(a))return t.ZERO;let e=1,r=t.sqr(a);for(;!t.eql(r,t.ONE);)if(e++,r=t.sqr(r),e===i)throw new Error("Cannot find square root");const n=o<<BigInt(i-e-1),c=t.pow(s,n);i=e,s=t.sqr(c),a=t.mul(a,s),u=t.mul(u,c)}return u}}function g(t){return t%c===a?f:t%u===l?p:y(t)}e.isNegativeLE=(t,e)=>(d(t,e)&o)===o;const m=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function _(t,e,r){if(r<i)throw new Error("invalid exponent, negatives unsupported");if(r===i)return t.ONE;if(r===o)return e;let n=t.ONE,s=e;for(;r>i;)r&o&&(n=t.mul(n,s)),s=t.sqr(s),r>>=o;return n}function b(t,e,r=!1){const n=new Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((e,r,i)=>t.is0(r)?e:(n[i]=e,t.mul(e,r)),t.ONE),o=t.inv(i);return e.reduceRight((e,r,i)=>t.is0(r)?e:(n[i]=t.mul(e,n[i]),t.mul(e,r)),o),n}function v(t,e){const r=(t.ORDER-o)/s,n=t.pow(e,r),i=t.eql(n,t.ONE),a=t.eql(n,t.ZERO),c=t.eql(n,t.neg(t.ONE));if(!i&&!a&&!c)throw new Error("invalid Legendre symbol result");return i?1:a?0:-1}function w(t,e){void 0!==e&&(0,n.anumber)(e);const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function B(t,e,r=!1,s={}){if(t<=i)throw new Error("invalid field: expected ORDER > 0, got "+t);let a,c;if("object"==typeof e&&null!=e){if(s.sqrt||r)throw new Error("cannot specify opts in two arguments");const t=e;t.BITS&&(a=t.BITS),t.sqrt&&(c=t.sqrt),"boolean"==typeof t.isLE&&(r=t.isLE)}else"number"==typeof e&&(a=e),s.sqrt&&(c=s.sqrt);const{nBitLength:l,nByteLength:u}=w(t,a);if(u>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let f;const p=Object.freeze({ORDER:t,isLE:r,BITS:l,BYTES:u,MASK:(0,n.bitMask)(l),ZERO:i,ONE:o,create:e=>d(e,t),isValid:e=>{if("bigint"!=typeof e)throw new Error("invalid field element: expected bigint, got "+typeof e);return i<=e&&e<t},is0:t=>t===i,isValidNot0:t=>!p.is0(t)&&p.isValid(t),isOdd:t=>(t&o)===o,neg:e=>d(-e,t),eql:(t,e)=>t===e,sqr:e=>d(e*e,t),add:(e,r)=>d(e+r,t),sub:(e,r)=>d(e-r,t),mul:(e,r)=>d(e*r,t),pow:(t,e)=>_(p,t,e),div:(e,r)=>d(e*h(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>h(e,t),sqrt:c||(e=>(f||(f=g(t)),f(p,e))),toBytes:t=>r?(0,n.numberToBytesLE)(t,u):(0,n.numberToBytesBE)(t,u),fromBytes:t=>{if(t.length!==u)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+t.length);return r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t)},invertBatch:t=>b(p,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(p)}function A(t){if("bigint"!=typeof t)throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function E(t){const e=A(t);return e+Math.ceil(e/2)}},4969:(t,e,r)=>{"use strict";r.d(e,{y:()=>i});var n=r(3574);function i(t){let e=null;return!function(t){return/^en(-(US|GB|AU))?$/.test(t)}(t)?!function(t){return/^zh(-(Hans|CN))?$/.test(t)}(t)?!function(t){return/^zh-(Hant|HK|MO)$/.test(t)}(t)?!function(t){return"zh-TW"===t}(t)?!function(t){return/^ja(-JP)?$/.test(t)}(t)?!function(t){return/^ko(-KR)?$/.test(t)}(t)?!function(t){return/^(fil|tl)(-PH)?$/.test(t)}(t)?!function(t){return/^id(-ID)?$/.test(t)}(t)?!function(t){return/^pt(-(BR|PT))?$/.test(t)}(t)?!function(t){return/^th(-TH)?$/.test(t)}(t)?!function(t){return/^vi(-VN)?$/.test(t)}(t)?function(t){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(t)}(t)&&(e=n.ys.ARABIC):e=n.ys.VIETNAMESE:e=n.ys.THAI:e=n.ys.PORTUGUESE:e=n.ys.INDONESIAN:e=n.ys.FILIPINO:e=n.ys.KOREAN:e=n.ys.JAPANESE:e=n.ys.CHINESE_TRADITIONAL_TW:e=n.ys.CHINESE_TRADITIONAL:e=n.ys.CHINESE_SIMPLIFIED:e=n.ys.ENGLISH,e}},5054:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(7465),i=r(1788),o=r(2049),s=r(5353),a=r(5254),c=r(901);const l=function(t,e,r){for(var l=-1,u=(e=(0,n.A)(e,t)).length,d=!1;++l<u;){var h=(0,c.A)(e[l]);if(!(d=null!=t&&r(t,h)))break;t=t[h]}return d||++l!=u?d:!!(u=null==t?0:t.length)&&(0,a.A)(u)&&(0,s.A)(h,u)&&((0,o.A)(t)||(0,i.A)(t))}},5056:(t,e,r)=>{"use strict";r.d(e,{eG:()=>a,kC:()=>s,sy:()=>o});var n=r(4969),i=r(3574);const o={lineWidth:3,lineColor:"#A5E3FF",lineOpacity:1,lineOffset:-1.5},s={fontColor:"#8c8c8c",activeFontColor:"#fff",backgroundColor:"#fff",activeBackgroundColor:"#074769",itemSize:50,itemCount:4,defaultFolded:!1},a=(0,n.y)(window.navigator.language)??i.ys.ENGLISH},5088:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(5373),i=r(7919),o=r(8335);const s=function(){this.size=0,this.__data__={hash:new n.A,map:new(o.A||i.A),string:new n.A}}},5145:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=void 0,e.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},5188:(t,e,r)=>{"use strict";r.d(e,{p:()=>a});var n=r(8291),i=r(1089),o=r(5664);const s="Poi_poiClick";class a{_map;_currentStyle=null;_layerIds=[];_dispatch=(0,i.A)(s);_listeners=[];constructor(t){this._map=t,this._bindPoiClickEvent()}destroy(){this._dispatch.on(`.${s}`,null),this._currentStyle=null,this._map=null,this._dispatch=null,this._listeners=[],this._layerIds=[]}onPoiClick(t){const e=(0,o.A)(`${s}.`);return this._dispatch.on(e,t),this._listeners.push(e),{unsubscribe:()=>this._dispatch.on(e,null)}}_queryPoiLayers(){const t=this._map.getStyle();if(t.name===this._currentStyle)return;const e=(0,n.cq)(t).filter(t=>"mapxus_place"===t["source-layer"]&&"symbol"===t.type);this._layerIds=e.map(({id:t})=>t),this._currentStyle=t.name}_bindPoiClickEvent(){this._map.on("click",t=>{if(0===this._listeners.length)return;this._queryPoiLayers();const e=this._map.queryRenderedFeatures(t.point,{layers:this._layerIds});if(0===e.length)return;const r=e[0],n=Boolean(r.properties?.["ref:shared_level"]),i=n?r.properties?.["ref:shared_level"]:r.properties?.["ref:level"],{floor:o,building:a,venue:c}=n?this._queryIndoorFeaturesBySharedFloor(i):this._queryIndoorFeaturesByFloor(i);this._dispatch.call(s,null,{coordinate:t.lngLat,poi:r,building:a,venue:c,floor:o})})}_queryIndoorFeaturesBySharedFloor(t){const e=this._map.queryRenderedFeatures({layers:["mapxus-shared-level-fill","mapxus-shared-level-fill-overlap-copy","mapxus-shared-level-fill-shared-bg","mapxus-building-line","mapxus-venue-fill"]}),r=e.find(e=>e.layer.id.includes("mapxus-shared-level-fill")&&e.properties.id===t);if(!r)return{floor:null,building:null,venue:null};const n=r.properties["ref:venue"],i=e.find(t=>"mapxus-venue-fill"===t.layer.id&&t.properties.id===n),{id:o,ordinal:s,name:a}=r.properties;return{floor:{id:o,ordinal:s,name:{default:a}},building:null,venue:i}}_queryIndoorFeaturesByFloor(t){const e=this._map.queryRenderedFeatures({layers:["mapxus-level-fill","mapxus-level-fill-overlap-copy","mapxus-building-line","mapxus-venue-fill"]}),r=e.find(e=>e.layer.id.includes("mapxus-level-fill")&&e.properties.id===t);if(!r)return{floor:null,building:null,venue:null};const{id:n,ordinal:i,name:o,"ref:building":s}=r.properties,a=e.find(t=>"mapxus-building-line"===t.layer.id&&t.properties.id===s),c=e.find(t=>"mapxus-venue-fill"===t.layer.id&&t.properties.id===a?.properties?.["ref:venue"]);return{floor:{id:n,ordinal:i,code:o},building:a,venue:c}}}},5254:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},5295:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrivateKey=void 0;var n=r(6527),i=r(2158),o=r(2557),s=function(){function t(t,e){if(this.curve=e,void 0===t)this.data=(0,i.getValidSecret)(e);else{if(!(0,i.isValidPrivateKey)(t,e))throw new Error("Invalid private key");this.data=t}this.publicKey=new o.PublicKey((0,i.getPublicKey)(this.data,e),e)}return t.fromHex=function(e,r){return new t((0,i.decodeHex)(e),r)},Object.defineProperty(t.prototype,"secret",{get:function(){return Buffer.from(this.data)},enumerable:!1,configurable:!0}),t.prototype.toHex=function(){return(0,n.bytesToHex)(this.data)},t.prototype.encapsulate=function(t,e){void 0===e&&(e=!1);var r=this.publicKey.toBytes(e),n=this.multiply(t,e);return(0,i.getSharedKey)(r,n)},t.prototype.multiply=function(t,e){return void 0===e&&(e=!1),(0,i.getSharedPoint)(this.data,t.toBytes(!0),e,this.curve)},t.prototype.equals=function(t){return(0,n.equalBytes)(this.data,t.data)},t}();e.PrivateKey=s},5297:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=void 0,e.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},5344:(t,e,r)=>{"use strict";r.d(e,{v:()=>o});var n=r(2068),i=r(5405);class o{_api="/api/v4/route/query";_request=n.K.getInstance();constructor(){}search(t){const{points:e,vehicle:r=i.$.FOOT,locale:n="en"}=t;if(!(e&&e.length>1&&e.length<6))throw new Error("Parameter error. It must be 1 < {points.length} < 6");if(function(t){return t.some(t=>!t||"number"!=typeof t.lat||"number"!=typeof t.lon)}(e))throw new Error("Parameter error. Points must have lat and lon.");const o={points:e,vehicle:r,locale:n};return this._request.post(this._api,JSON.stringify(o))}}},5353:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=/^(?:0|[1-9]\d*)$/;const i=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},5373:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(2944),i=r(9190),o=r(8417),s=r(8813),a=r(3957);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n.A,c.prototype.delete=i.A,c.prototype.get=o.A,c.prototype.has=s.A,c.prototype.set=a.A;const l=c},5405:(t,e,r)=>{"use strict";var n;r.d(e,{$:()=>n}),function(t){t.FOOT="foot",t.WHEELCHAIR="wheelchair",t.ESCALATOR="escalator",t.EMERGENCY="emergency"}(n||(n={}))},5461:(t,e,r)=>{"use strict";r.d(e,{U:()=>a,l:()=>s});var n=r(9588);const i="-webkit-extension-67d8e3e8-";let o=null;async function s(){let t=sessionStorage.getItem(i);if(!t)try{a(),await c(Date.now()),t=sessionStorage.getItem(i)}catch(t){throw new Error("Failed to fetch public key: "+t)}return t}function a(){sessionStorage.removeItem(i),o&&(clearTimeout(o),o=null)}async function c(t){try{const r=await fetch(`${n.kk}?timestamp=${t}`,{method:"GET",headers:{"Content-Type":"text/plain"}}),{headers:s}=r,a=parseInt(s.get("x-retry-in"));o=setTimeout(async()=>{await c(t)},1e3*a),e=await r.text(),sessionStorage.setItem(i,e)}catch(t){throw t}var e}},5462:(t,e,r)=>{"use strict";r.d(e,{T:()=>F});var n=r(5629),i=r(5188),o=r(9983),s=r(2068),a=r(3626),c=r(520),l=r(3913),u=r(1089),d=r(3236),h=r(5056),f=r(181),p=r(5706),y=r(7311),g=r(1682),m=r(3574),_=r(8488),b=r.n(_),v=r(2075),w=r(1694),B=r(6294),A=r(9205),E=r(2468),S=r(9644),I=r(3549),x=r(5664),L=r(5582);const k="Map_mapClick",O="Map_pointClick",C="Map_isRenderComplete",T="Map_isDestroyed",P=y.o.getInstance();class F{_map;_indoor;_poi;_floorsControl;_buildingFilterControl;_attributionControl;_language;_dispatch=(0,u.A)(k,O,C,T);_fitBuildingBounds;_history=f.d.getInstance();_hiddenBuildings=p.Q.getInstance().getHiddenBuildings();_debounceHTTPErrorHandler;_transformRequestHandler;_tokenRefreshingPromise=null;_request=s.K.getInstance();_$mask=null;_cancelTokenChangedListener;isDestroyed=!1;switchOutdoor;switchBuilding;buildingSelector;floorSelector;constructor(t){if(!t.map)throw new Error("Map is required.");if(!M(t)&&!R(t))throw new Error("Access params are required.");M(t)?P.setAccessByAppKey({appId:t.appId,secret:t.secret,platform:t.platform}).then(async()=>{await P.setupTokenManager(),this._setup(t)}):R(t)&&(P.setTokenGetter(t.getTokenAsync),P.setupTokenManager().then(()=>{this._setup(t)}))}renderComplete(t){const e=(0,x.A)(`${C}.`);this._dispatch.on(e,t)}destroyed(t){const e=(0,x.A)(`${T}.`);this._dispatch.on(e,()=>{t(),this._dispatch.on(e,null),0===this._dispatch._[T].length&&(delete this._dispatch,Object.freeze(this))})}setTransformRequest(t){this._transformRequestHandler=t}getIndoor(){return this._indoor}getMaplibre(){return this._map}get floor(){return this.getIndoor()?.floor??null}get building(){return this.getIndoor()?.building??null}get venue(){return this.getIndoor()?.venue??null}setLanguage(t){this._language!==t&&(this._language=t);const e=this._map?.getStyle(),r=(e?.layers||[]).filter(({type:t})=>"symbol"===t);for(const{id:e}of r){const r=this._map.getLayer(e),n="string"==typeof this._map.getLayoutProperty(e,"text-field");r&&!n&&this._map.setLayoutProperty(e,"text-field",["coalesce",["get",`name:${t}`],["get","name"]])}}getLanguage(){return this._language}setOutdoorMapShown(t){this.getIndoor()?.setOutdoorMapShown(t)}getIndoorFeaturesByCoordinates(t,e){const r=this._map.project(t),n=this._map.queryRenderedFeatures(r,{layers:["mapxus-venue-fill","mapxus-building-line","mapxus-level-fill","mapxus-level-fill-overlap-copy"]});if(0===n.length)return{venue:null,building:null,level:null};const i=n.filter(t=>t.layer.id.includes("mapxus-level-fill")).find(t=>Number.isFinite(e)?t.properties.ordinal===e+"":t.layer.id.startsWith("mapxus-level-fill"));if(!i)return{venue:null,building:null,level:null};const o=n.find(t=>t.properties.id===i.properties["ref:building"]);return{venue:n.find(t=>t.properties.id===o.properties["ref:venue"]),building:o,level:i}}getFeaturesById(t,e){return this.getIndoor()?.getFeaturesById(t,e)||[]}async selectFloorById(t,e){const{dragPan:r=!0}=e||{};if(this._indoor.setDragPan(r),t===this.floor?.id){if(!r)return;this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter()}else{let e,n,i=!1;try{if(this._fitBuildingBounds){e=await(0,w.F2)(t),n=(0,d.r)(e),i=!0;const{maxLat:r,maxLon:o,minLat:s,minLon:a}=e.bbox;this._indoor.setBuildingBounds([[a,s],[o,r]])}else n=(this._indoor?.features||[]).find(e=>e.properties?.level_ids?.includes(t)&&"mapxus-building-line"===e.layer.id)??null,n||(e=await(0,w.F2)(t),n=(0,d.r)(e),i=!0)}catch(t){this._handleSearchError(t)}if(n&&n?.properties?.id===this.building?.properties?.id){const{level_ids:e,ordinals:i}=n.properties,o=e.split(",").indexOf(t),s=i.split(",")[o]??null;await this._floorsControl.switchByOrdinal(s,r)}else await(this._indoor?.selectBuilding(n,{floorId:t,featureIncomplete:i}))}}async selectSharedFloorById(t,e){const{dragPan:r=!0}=e||{};if(this._indoor.setDragPan(r),t===this.floor?.id){if(!r)return;this._fitBuildingBounds?this._indoor.fitVenueBbox():await this._indoor.panToVenueCenter()}else{let e,r,n=!1;const i=async t=>{n=!0;const i=await(0,w.F0)(t);r=(0,d.E)(i);const{maxLat:o,maxLon:s,minLat:a,minLon:c}=i.bbox;this._indoor.setVenueBounds([[c,a],[s,o]]);const l=i.sharedFloors.find(({id:e})=>e===t),{id:u,name:h,ordinal:f}=l;e={id:u,name:h,ordinal:f+""}};try{if(this._fitBuildingBounds)await i(t);else{r=(this._indoor?.features||[]).find(e=>e.properties?.shared_level_ids?.includes(t)&&"mapxus-venue-fill"===e.layer.id);const n=r?this._indoor.features.find(e=>e.properties.id===t):null;if(n){const{id:t,name:r,ordinal:i}=n.properties;e={id:t,name:"string"==typeof r?{default:r}:r,ordinal:i}}else await i(t)}}catch(t){this._handleSearchError(t)}e&&r&&await(this._indoor?.selectSharedFloor(e,r,{featureIncomplete:n}))}}async selectBuildingById(t,e){const{dragPan:r=!0}=e||{};if(this._indoor.setDragPan(r),t===this.building?.properties?.id){if(!r)return;this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter()}else{let e,r,n=!1;try{if(this._fitBuildingBounds){e=await(0,w.pT)(t),r=(0,d.r)(e),n=!0;const{maxLat:i,maxLon:o,minLat:s,minLon:a}=e.bbox;this._indoor.setBuildingBounds([[a,s],[o,i]])}else r=this._map.getLayer("mapxus-building-line")&&this.getFeaturesById(t,{layerIds:["mapxus-building-line"]})[0]||null,r||(e=await(0,w.pT)(t),r=(0,d.r)(e),n=!0);await(this._indoor?.selectBuilding(r,{featureIncomplete:n}))}catch(t){this._handleSearchError(t)}}}async selectVenueById(t,e){const{dragPan:r=!0}=e||{};if(this._indoor.setDragPan(r),"string"==typeof t&&""===t.trim()||null===t)await(this._indoor?.selectBuilding(null));else if(t===this.venue?.properties?.id){if(!r)return;this.building?this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter():"name"in this.floor&&(this._fitBuildingBounds?this._indoor.fitVenueBbox():await this._indoor.panToVenueCenter())}else{const e=this._history.getBuildingUnitByVenue(t);if(e){const{id:t,type:n}=e;"building"===n?await this.selectBuildingById(t,{dragPan:r}):await this.selectSharedFloorById(t,{dragPan:r})}else{let e;const n=this._map.getLayer("mapxus-venue-fill")&&this.getFeaturesById(t,{layerIds:["mapxus-venue-fill"]})[0];if(n){const{default_displayed_building:t,building_ids:r}=n.properties;e=t||(r?.split(",")||[])[0]}else try{const r=await(0,w.qT)(t);e=r.defaultBuilding||r.buildings[0]?.id}catch(t){this._handleSearchError(t)}e&&await this.selectBuildingById(e,{dragPan:r})}}}onMapClickListener(t){const e=(0,x.A)(`${k}.`);return this._dispatch.on(e,t),{unsubscribe:()=>this._dispatch.on(e,null)}}onPoiClickListener(t){return this._poi?.onPoiClick(t)}onPointClickListener(t){const e=(0,x.A)(`${O}.`);return this._dispatch.on(e,t),{unsubscribe:()=>this._dispatch.on(e,null)}}onMapChangeListener(t){return this._indoor?.onMapChange(t)}switchTheme(t){this._setStyle(this._getStyleUrl(t)),this._map?.once("styledata",()=>this._setIndoorFilter()),"changeTheme"in this._attributionControl&&this._attributionControl.changeTheme(t)}setSelectedBuildingBorderStyle(t){return this._indoor?.setSelectedHighlightStyle(t),this}setSelectedHighlightStyle(t){return this._indoor?.setSelectedHighlightStyle(t),this}async _setup(t){const{map:e,poiId:r,sharedFloorId:s,floorId:u,buildingId:d,venueId:f,theme:p=m.SV.MAPXUS_DEFAULT,floorSelectorEnabled:y,buildingSelectorEnabled:g,outdoorMapShown:_,collapseCopyright:b=!1,maskNonSelectedAreas:v,fitBuildingBounds:w=!1,boundsPadding:x=30,selectedHighlightStyle:L,floorSelectorStyle:k,language:O=h.eG,autoSelectBuilding:T=!1,transformRequest:P=null,mapxusLogoEnabled:F=!0}=t;this._map=e,this._language=O,this._indoor=new n.SN({map:this._map,startWithIndoorView:Boolean(f||d||u||r),outdoorMapShown:_,fitBuildingBounds:w,boundsPadding:x,maskNonSelectedAreas:v,selectedHighlightStyle:L}),this._poi=new i.p(this._map),this._fitBuildingBounds=w,this._transformRequestHandler=P,this._setMaskEnabled(!0),await this._resourceRequestTransform(),this._installRtlTextPlugin(),this._setStyle(this._getStyleUrl(p)),this._checkMapZoom(),b?this._attributionControl=new l.d:(this._attributionControl=new c.z({theme:p}),this._addControl(new a.V({enabled:F}))),this._addControl(this._attributionControl),this._addControl(this._buildingFilterControl=new o.G(this,g)),this._addControl(this._floorsControl=new o.Z(this._indoor,{language:O,style:k,enabled:y})),r?this._selectPoiById(r):u?this.selectFloorById(u):d?this.selectBuildingById(d):f?this.selectVenueById(f):s&&this.selectSharedFloorById(s),this.switchOutdoor=new B.B(this._indoor),this.switchBuilding=new A.N(this._indoor),this.buildingSelector=new E.E(this._buildingFilterControl),this.floorSelector=new S.C(this._floorsControl),this._map.once("styledata",()=>this.setLanguage(this._language)),this._map.on("remove",()=>this._destroy()),this._map.on("error",this._debounceHTTPErrorHandler=(0,I.A)(t=>this._updatePermission(t),300)),this._indoor.once(n.Hv,()=>{this._setMaskEnabled(!1),T&&this._map.on("moveend",()=>this._selectCenterBuilding()),this._bindMapClickListener(),this._bindTokenChangedListener(),this._dispatch.call(C)})}_getStyleUrl(t){const e=new globalThis.Map([[m.SV.CHRISTMAS,v._C],[m.SV.HALLOWEEN,v.ts],[m.SV.MAPPY_BEE,v.xR],[m.SV.MAPXUS,v.em],[m.SV.COMMON,v.lu],[m.SV.LANDS_D,v.Hf],[m.SV.MAPXUS_DEFAULT,v.$b]]);return e.has(t)?e.get(t):(0,v.aS)(t)}_setIndoorFilter(){this._indoor.updateCustomLayers(),this._indoor.updateRendering()}_setStyle(t){this._map?.setStyle(t,{localIdeographFontFamily:!1})}_addControl(t,e){this._map.addControl(t,e)}async _selectPoiById(t){try{const e=await(0,w.xW)(t),{lon:r,lat:n}=e.location;"floorId"in e?await this.selectFloorById(e.floorId):"sharedFloorId"in e&&await this.selectSharedFloorById(e.sharedFloorId),this._map.panTo([r,n])}catch(t){this._handleSearchError(t)}}async _resourceRequestTransform(){const t=await this._request.getRequestHeaders();this._map.setTransformRequest((e,r)=>{const{host:n}=new URL(e);return n.includes("map-api")&&n.includes("mapxus")?{url:e,headers:t}:this._transformRequestHandler?this._transformRequestHandler(e,r):{url:e}})}_checkMapZoom(){const t=this._map.getZoom();(t<8||t>22)&&t>1&&console.warn("Indoor maps perform better at zoom levels [8, 22].")}async _updatePermission(t){if(401===t.error?.status)return this._tokenRefreshingPromise||(this._tokenRefreshingPromise=this._resourceRequestTransform().finally(()=>this._tokenRefreshingPromise=null)),this._tokenRefreshingPromise}_selectCenterBuilding(){const t=this._getCenterBuildingUnitsMap();if(!t.size)return;let e=t.entries().next().value[1];const r=this._history.getVisitedBuildingUnits().reverse();for(const n of r){const{id:r}=n;if(t.get(r)){e=n;break}}"building"===e.type?this.selectBuildingById(e.id,{dragPan:!1}):this.selectSharedFloorById(e.id,{dragPan:!1})}_getCenterBuildingUnitsMap(){const t=this._map.getCanvas().getBoundingClientRect(),e=t.width/4,r=t.height/4,n=[e,r],i=[t.width-e,t.height-r];let o=this._map.queryRenderedFeatures([n,i],{layers:["mapxus-building-line","mapxus-shared-level-fill","mapxus-shared-level-fill-overlap-copy"]});return o=(0,L.A)(o,"properties.id"),o=o.filter(t=>!this._hiddenBuildings.has(t.properties.id)),new globalThis.Map(o.map(({properties:t})=>[`${t.id}`,{id:t.id,type:t.building?"building":"sharedFloor"}]))}_bindMapClickListener(){this._map.on("click",async t=>{const{point:e,lngLat:r}=t;await this._indoor.selectByClickMap(e),this._dispatch.call(O,null,{point:e,coordinate:r}),this._dispatch.call(k,null,{coordinate:r,venue:this.venue,building:this.building,floor:this.floor})})}_bindTokenChangedListener(){const{off:t}=P.on(y.O,async()=>{await this._resourceRequestTransform()});this._cancelTokenChangedListener=t}_handleSearchError(t){const e=t?.response?.status||"unknown",r=t?.response?.data?.message||"unknown";P.getGlobalDispatcher().call("initError",null,{status:e,message:r})}_setMaskEnabled(t){t?this._$mask||(this._$mask=(0,g.r)("div","mapxus-map-mask",this._map.getContainer())):this._$mask&&((0,g.Z)(this._$mask),this._$mask=null)}_installRtlTextPlugin(){"unavailable"===b().getRTLTextPluginStatus()&&b().setRTLTextPlugin("https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js",!0)}_destroy(){if(this.isDestroyed)return;this.isDestroyed=!0,this._debounceHTTPErrorHandler?.cancel();const t=this._dispatch._;for(const e in t)e!==T&&t.hasOwnProperty(e)&&t[e].forEach(({name:t})=>{this._dispatch.on(`${e}.${t}`,null)});this._indoor.destroy(),this._poi.destroy(),Object.keys(this).forEach(t=>{"isDestroyed"!==t&&"_dispatch"!==t&&delete this[t]}),this._cancelTokenChangedListener&&this._cancelTokenChangedListener(),P.clearState(),this._dispatch.call(T)}}function R(t){return"getTokenAsync"in t&&"function"==typeof t.getTokenAsync}function M(t){return"appId"in t&&""!==t.appId.trim()&&"secret"in t&&""!==t.secret.trim()}},5488:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(7880),i=/^\s+/;const o=function(t){return t?t.slice(0,(0,n.A)(t)+1).replace(i,""):t}},5530:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(2531);const i=function(t,e){return!!(null==t?0:t.length)&&(0,n.A)(t,e,0)>-1}},5537:(t,e,r)=>{"use strict";r.d(e,{s:()=>o});class n extends Error{}function i(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(t){return decodeURIComponent(atob(t).replace(/(.)/g,(t,e)=>{let r=e.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}(e)}catch(t){return atob(e)}}function o(t,e){if("string"!=typeof t)throw new n("Invalid token specified: must be a string");e||(e={});const r=!0===e.header?0:1,o=t.split(".")[r];if("string"!=typeof o)throw new n(`Invalid token specified: missing part #${r+1}`);let s;try{s=i(o)}catch(t){throw new n(`Invalid token specified: invalid base64 for part #${r+1} (${t.message})`)}try{return JSON.parse(s)}catch(t){throw new n(`Invalid token specified: invalid json for part #${r+1} (${t.message})`)}}n.prototype.name="InvalidTokenError"},5547:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(9914);const i=function(t,e){var r=t.__data__;return(0,n.A)(e)?r["string"==typeof e?"string":"hash"]:r.map}},5568:(t,e,r)=>{"use strict";r.d(e,{F:()=>l});var n=r(9588),i=r(2068),o=r(9573),s=r(3574),a=r(6034);const c=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","icon"];class l{_poisApi="/api/v5/pois";_categoriesGroupApi="/api/v5/categories/group";_request=i.K.getInstance();constructor(){}searchByIds(t){const e=(0,o.VS)(t);if(!e)throw new Error("Invalid ids parameter. Expected a non-empty string or an array of strings.");const r=`${this._poisApi}/${e}`;return this._changedRes(r)}searchByDistance(t){const{center:e,distance:r,keywords:i="",offset:s=n.e$,page:a=n.KL}=t;if(!(0,o.ES)(e))throw new Error("Invalid center parameter. Expected an array of two numbers.");if(!(0,o.F5)(r)||r>1e4)throw new Error("Invalid distance parameter. Expected a positive number and no more than 10000.");const c=new URLSearchParams;c.set("center",e.join(",")),c.set("distance",String(Math.round(r))),c.set("offset",String(s)),c.set("page",String(a)),(0,o.BW)(i)&&c.set("keywords",i);const l=`${this._poisApi}?${c.toString()}`;return this._changedRes(l)}searchByBounds(t){const{bounds:e,offset:r=n.e$,page:i=n.KL,keywords:s,orderBy:a}=t;if(!(0,o.dD)(e))throw new Error("'bounds' must be an array of two arrays, each containing two numbers.");const c=new URLSearchParams;c.set("bbox",e.flat().join()),c.set("offset",String(r)),c.set("page",String(i)),(0,o.BW)(s)&&c.set("keywords",s),a&&c.set("orderBy",a);const l=`${this._poisApi}?${c.toString()}`;return this._changedRes(l)}searchByBuilding(t){const{buildingId:e,offset:r=n.e$,page:i=n.KL,keywords:s,orderBy:a}=t;if(!(0,o.BW)(e))throw new Error("'buildingId' must be a non-empty string.");const c=new URLSearchParams;c.set("buildingId",e),c.set("offset",String(r)),c.set("page",String(i)),(0,o.BW)(s)&&c.set("keywords",s),a&&c.set("orderBy",a);const l=`${this._poisApi}?${c.toString()}`;return this._changedRes(l)}searchByVenue(t){const{venueId:e,offset:r=n.e$,page:i=n.KL,keywords:s,orderBy:a}=t;if(!(0,o.BW)(e))throw new Error("'venueId' must be a non-empty string.");const c=new URLSearchParams;c.set("venueId",e),c.set("offset",String(r)),c.set("page",String(i)),(0,o.BW)(s)&&c.set("keywords",s),a&&c.set("orderBy",a);const l=`${this._poisApi}?${c.toString()}`;return this._changedRes(l)}searchByFloor(t){let e=null,r=null;if("floorId"in t&&(0,o.BW)(t.floorId)?(e="floorId",r=t.floorId):"sharedFloorId"in t&&(0,o.BW)(t.sharedFloorId)&&(e="sharedFloorId",r=t.sharedFloorId),!e||!r)throw new Error("Either 'floorId' or 'sharedFloorId' must be a non-empty string.");const{offset:i=n.e$,page:s=n.KL,keywords:a,orderBy:c}=t,l=new URLSearchParams;l.set("offset",String(i)),l.set("page",String(s)),l.set(e,r),(0,o.BW)(a)&&l.set("keywords",a),c&&l.set("orderBy",c);const u=`${this._poisApi}?${l.toString()}`;return this._changedRes(u)}searchByOrientation(t){const{center:e,angle:r,distance:n,distanceSearchType:i=s._P.POINT}=t;if(!(0,o.ES)(e))throw new Error("Invalid center parameter. Expected an array of two numbers.");if(!(0,o.F5)(n)||n>100)throw new Error("Invalid distance parameter. Expected a positive number and no more than 100.");if(!(0,o.F5)(r))throw new Error("Invalid angle parameter. Expected a positive number.");const a=new URLSearchParams;if("ordinal"in t){if(!(0,o.BW)(t.ordinal))throw new Error("'ordinal' must be a non-empty string.");a.set("ordinal",t.ordinal)}else if("floorId"in t){if(!(0,o.BW)(t.floorId))throw new Error("'floorId' must be a non-empty string.");a.set("floorId",t.floorId)}else{if(!("buildingId"in t))throw new Error("Either 'ordinal', 'floorId', or 'buildingId' must be provided.");if(!(0,o.BW)(t.buildingId))throw new Error("'buildingId' must be a non-empty string.");a.set("buildingId",t.buildingId)}a.set("center",e.join()),a.set("angle",String(Math.round(r))),a.set("distance",String(n)),a.set("distanceSearchType",i);const c=`${this._poisApi}/orientation?${a.toString()}`;return this._request.get(c)}searchByCategory(t){const{center:e,distance:r,page:i=n.KL,offset:s=n.e$}=t;if(!(0,o.ES)(e))throw new Error("Invalid center parameter. Expected an array of two numbers.");if(!(0,o.F5)(r)||r>1e4)throw new Error("Invalid distance parameter. Expected a positive number and no more than 10000");const a=new URLSearchParams;if("category"in t&&(0,o.BW)(t.category))a.set("category",String(t.category));else{if(!("excludedCategories"in t)||!(0,o.VS)(t.excludedCategories))throw new Error("Either 'category' or 'excludedCategories' must be provided.");a.set("excludeCategories",(0,o.VS)(t.excludedCategories))}a.set("center",e.join(",")),a.set("distance",String(r)),a.set("page",String(i)),a.set("offset",String(s));const c=`${this._poisApi}?${a.toString()}`;return this._changedRes(c)}searchCategories(t){const e=new URLSearchParams;if("floorId"in t&&(0,o.BW)(t.floorId)?e.set("floorId",t.floorId):"buildingId"in t&&(0,o.BW)(t.buildingId)?e.set("buildingId",t.buildingId):"sharedFloorId"in t&&(0,o.BW)(t.sharedFloorId)?e.set("sharedFloorId",t.sharedFloorId):"venueId"in t&&(0,o.BW)(t.venueId)&&e.set("venueId",t.venueId),"bounds"in t&&(0,o.dD)(t.bounds)&&(e.set("bbox",t.bounds.flat().join()),(0,o.BW)(t.keywords)&&e.set("keywords",t.keywords)),0===e.toString().length)throw new Error("At least one of 'floorId', 'buildingId', 'sharedFloorId', 'venueId', or 'bounds' must be provided.");const r=`${this._categoriesGroupApi}?${e.toString()}`;return this._request.get(r)}search(t){const e=new URLSearchParams;Object.entries(t).forEach(([t,r])=>{switch(t){case"bounds":(0,o.dD)(r)&&e.set("bbox",r.flat().join());break;case"center":(0,o.ES)(r)&&e.set("center",r.join());break;case"excludedCategories":(0,o.VS)(r)&&e.set("excludeCategories",(0,o.VS)(r));break;default:e.set(t,String(r))}});const r=`${this._poisApi}?${e.toString()}`;return this._request.get(r)}async _changedRes(t){return this._request.get(t).then(t=>{if(t.data?.result?.pois){const e=t.data.result.pois.map(t=>(0,a.A)(t,(t,e)=>c.includes(e)));return{...t,data:{...t.data,result:{...t.data.result,pois:e}}}}return t})}}},5572:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},5582:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(2141),i=r(5781);const o=function(t,e){return t&&t.length?(0,i.A)(t,(0,n.A)(e,2)):[]}},5606:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=Object.prototype.toString;const i=function(t){return n.call(t)}},5629:(t,e,r)=>{"use strict";r.d(e,{Hv:()=>B,Ms:()=>w,SN:()=>C});var n=r(7007),i=r(8291),o=r(3236),s=r(8700),a=r(9266),c=r(1965),l=r(4545),u=r(5056),d=r(1694),h=r(8021),f=r(1089),p=r(181),y=r(5706),g=r(8389),m=r(3549),_=r(5582),b=r(5664);const v="Indoor_selectedFloorChanged",w="Indoor_selectedBuildingChanged",B="Indoor_mapxusMapLoaded",A="Indoor_maplibreMapLoaded",E="mapxus-venue-fill",S="mapxus-building-line",I="mapxus-level-fill",x="mapxus-shared-level-fill",L="highlight-mapxus_level",k="highlight-mapxus_shared_level",O=new l.w1;class C extends n.EventEmitter{_map;_features;_allVenuesMap;_allBuildingsMap;_allSharedLevelsMap;_curBuildingId=null;_curBuildingFeature=null;_curSharedLevelId=null;_floor={code:null,id:null,ordinal:null};_sharedFloor={id:null,ordinal:null,name:null};_allowOutdoorSwitch;_allowBuildingSwitch;_outdoorMapShown;_originIndoorLayers;_outdoorLayers;_curVenueId=null;_curVenueFeature=null;_selectedHighlightStyle;_upperLayers=[];_middleLayers=[];_commonLayers=[];_lowerLayers=[];_excludedPoisInMiddle=[];_dispatch=(0,f.A)(v);_fitBuildingBounds;_boundsPadding;_startWithIndoorView;_indoorMapLoaded=!1;_isSelectSharedFloor=!1;_isMaskMode;_upperLevels=new Set;_middleLevels=new Set;_lowerLevels=new Set;_featureIncomplete=!1;_dragPan;_buildingBounds;_venueBounds;_history=p.d.getInstance();_layerBuildings=y.Q.getInstance();_hiddenBuildings=this._layerBuildings.getHiddenBuildings();_maskBuildings=new Set;_maskSharedFloors=new Set;_isDestroyed=!1;_fetchBuildingTimeoutId=null;_fetchVenueTimeoutId=null;_fitBoundsTimer=null;_abortQueryBuilding;_debounceRendering;constructor(t){super();const{map:e,startWithIndoorView:r=!0,outdoorMapShown:n=!0,selectedHighlightStyle:i,fitBuildingBounds:o,boundsPadding:s,maskNonSelectedAreas:a=!1}=t;this._map=e,this._allowOutdoorSwitch=!0,this._allowBuildingSwitch=!0,this._startWithIndoorView=r,this._outdoorMapShown=n,this._isMaskMode=a,this._fitBuildingBounds=o,this._boundsPadding=s,this._selectedHighlightStyle=i?Object.assign({},u.sy,i):u.sy,this._hiddenBuildings=new Set,this._bindMaplibreEventListeners()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._dispatch.on(`.${v}`,null),this.removeAllListeners(w),this.removeAllListeners(A),this.removeAllListeners(B),this._debounceRendering?.cancel(),this._fetchBuildingTimeoutId&&(clearTimeout(this._fetchBuildingTimeoutId),this._fetchBuildingTimeoutId=null),this._fetchVenueTimeoutId&&(clearTimeout(this._fetchVenueTimeoutId),this._fetchVenueTimeoutId=null),this._fitBoundsTimer&&(clearTimeout(this._fitBoundsTimer),this._fitBoundsTimer=null),this._abortQueryBuilding&&(this._abortQueryBuilding(),this._abortQueryBuilding=null))}setAllowOutdoorSwitch(t){return this._allowOutdoorSwitch=t,this}setAllowBuildingSwitch(t){return this._allowBuildingSwitch=t,this}get floor(){return this._isSelectSharedFloor?this._sharedFloor:this._curBuildingId?this._floor:null}get building(){return this._curBuildingFeature}get venue(){return this._curVenueFeature}get features(){return this._features}getFeaturesById(t,e){const{layerIds:r,filter:n}=e||{},i=this._queryRenderedFeatures(r),o=n?e=>e.properties.id===t&&n(e):e=>e.properties.id===t;return i.filter(o)}async switchFloorByOrdinal(t){this._updateFloorState(t),this._dispatch.call(v,null,{venue:this.venue,building:this.building,floor:this.floor}),this.venue&&t&&(!0===this._dragPan&&(this._fitBuildingBounds?await this.fitBuildingBbox():await this.panToBuildingCenter()),"restrict"===this._dragPan&&await this._checkAndPanToBuilding(),this._resetSelectedDisplayedLevel()),this.updateRendering()}setOutdoorMapShown(t){this._outdoorMapShown=t,this._setOutdoorVisibility(t)}setSelectedHighlightStyle(t){this._selectedHighlightStyle=Object.assign({},this._selectedHighlightStyle,t??{"line-opacity":0});for(const e of[L,k])if(this._map.getLayer(e))if(t){const{lineColor:t,lineOpacity:r,lineWidth:n,lineOffset:i}=this._selectedHighlightStyle,o=T(n,i);this._map.setPaintProperty(e,"line-color",t),this._map.setPaintProperty(e,"line-opacity",r),this._map.setPaintProperty(e,"line-width",n),this._map.setPaintProperty(e,"line-offset",o)}else this._map.setPaintProperty(e,"line-opacity",0)}onMapChange(t){const e=(0,b.A)(`${v}.`);return this._dispatch.on(e,t),{unsubscribe:()=>this._dispatch.on(e,null)}}async selectBuilding(t,e){(this._allowOutdoorSwitch||t)&&this._allowBuildingSwitch&&this._isNotCurrentFeature(t)&&(this._isSelectSharedFloor=!1,this._curSharedLevelId=null,this._featureIncomplete=e?.featureIncomplete??this._featureIncomplete,t?.properties?.id&&this._history.addVisitedBuildingUnit({id:t.properties.id,type:"building"}),await this._updateIndoorState(t,e?.floorId),await this.switchFloorByOrdinal(this._floor.ordinal),this.emit(w,t?{building:t,ordinal:this._floor.ordinal,dragPan:this._dragPan}:null),this._dispatchIndoorMapLoaded())}async selectSharedFloor(t,e,r){const{id:n,ordinal:i}=t;this._isSelectSharedFloor=!0,this._curBuildingId=null,this._curBuildingFeature=null,this._sharedFloor=t,this._curSharedLevelId=n,this._curVenueFeature=e,this._curVenueId=e.properties.id,this._featureIncomplete=r?.featureIncomplete??this._featureIncomplete,this._history.addVisitedBuildingUnit({id:n,type:"sharedFloor"}),this._history.setOrdinalByBuildingUnit(n,i),this._history.setBuildingUnitByVenue(this._curVenueId,{id:n,type:"sharedFloor"}),this._dragPan&&"restrict"!==this._dragPan&&(this._fitBuildingBounds?this.fitVenueBbox():await this.panToVenueCenter()),this._dispatch.call(v,null,{venue:this.venue,building:this.building,floor:this.floor}),this.emit(w,{...t,dragPan:this._dragPan}),this._dispatchIndoorMapLoaded(),this._resetSelectedDisplayedLevel(),this.updateRendering()}updateCustomLayers(){const t=this._map.getStyle();this._originIndoorLayers=(0,i.cq)(t),this._outdoorLayers=(0,i.Z3)(t),this._copyOverlapLayers(),this._copySharedFloorBackgroundLayers(),this._addSelectedHighlightLayers(),this._addReserveFloorLayers(),this._isMaskMode&&this._addBuildingMaskLayer(),this._outdoorMapShown||this._setOutdoorVisibility(!1)}updateRendering(){this._updateFeatures(),this._updateSelectedFeatures(),this._layerFloors(),this._calExcludedPoisInMiddle(),this._filterLayers(),this._filterSelectedHighlight(),this._updateUnselectedMask()}async panToBuildingCenter(){const t=this._curBuildingFeature.properties?.label_center?.split(",");if(!t)return;if(this._map.panTo(t),!this._featureIncomplete)return;const{promise:e,abort:r}=(0,h.B)(()=>{if(!this._isDestroyed)return this._map.getLayer("mapxus-building-line")&&this.getFeaturesById(this._curBuildingId,{layerIds:["mapxus-building-line"]})[0]});this._abortQueryBuilding=r,await e}async fitBuildingBbox(){return this._map.fitBounds(this._buildingBounds,{animate:!0,duration:500,padding:this._boundsPadding,bearing:this._map.getBearing()}),new Promise(t=>{this._fitBoundsTimer=setTimeout(()=>{t(!0),this._fitBoundsTimer=null},600)})}async panToVenueCenter(){const t=this._curVenueFeature.properties?.label_center?.split(",");if(!t)return;if(this._map.panTo(t),!this._featureIncomplete)return;const{promise:e,abort:r}=(0,h.B)(()=>{if(!this._isDestroyed)return this._map.getLayer(E)&&this.getFeaturesById(this._curVenueId,{layerIds:[E]})[0]});this._abortQueryBuilding=r,await e}fitVenueBbox(){this._map.fitBounds(this._venueBounds,{padding:this._boundsPadding,bearing:this._map.getBearing()})}setDragPan(t){this._dragPan=t}setBuildingBounds(t){this._buildingBounds=t}setVenueBounds(t){this._venueBounds=t}async selectByClickMap(t){this.setDragPan("restrict"),this._featureIncomplete=!1;const e=await this._queryFeatureByPoint(t);if(e){if("building"in e){if(await this.selectBuilding(e.building,{floorId:e.floorId}),this._fitBuildingBounds){const t=e.building;if(!t)return;this._fetchBuildingTimeoutId=setTimeout(()=>this._updateBuildingBounds(t.properties.id))}}else if("sharedLevel"in e&&(await this.selectSharedFloor(e.sharedLevel,e.venue),this._fitBuildingBounds)){const t=e.venue;if(!t)return;this._fetchVenueTimeoutId=setTimeout(()=>this._updateVenueBounds(t.properties.id))}}else await this.selectBuilding(null)}async _updateBuildingBounds(t){const e=await(0,d.pT)(t),{minLon:r,minLat:n,maxLon:i,maxLat:o}=e.bbox;this.setBuildingBounds([[r,n],[i,o]])}async _updateVenueBounds(t){const e=await(0,d.qT)(t),{minLon:r,minLat:n,maxLon:i,maxLat:o}=e.bbox;this.setVenueBounds([[r,n],[i,o]])}_bindMaplibreEventListeners(){this._map.once("styledata",()=>this.updateCustomLayers()),this._map.once("idle",()=>{this.emit(A),(!this._startWithIndoorView||this._map.getZoom()<14)&&this._dispatchIndoorMapLoaded()}),this._map.on("sourcedata",this._debounceRendering=(0,m.A)(()=>this.updateRendering(),300))}_clear(){this._curBuildingFeature=null,this._curBuildingId=null,this._floor={code:null,id:null,ordinal:null},this._curVenueId=null,this._curVenueFeature=null,this._buildingBounds=null,this._curSharedLevelId=null,this._venueBounds=null}_getIndoorFeatures(){return this._queryRenderedFeatures().filter(t=>(0,i.ld)(t.source))}_getBuildingFloorByOrdinal(t,e){let r=null,n=null;if(t?.properties){const{ordinals:i,level_names:o,level_ids:a}=t.properties,c=(0,s.S)(i).findIndex(t=>t===e);r=(0,s.S)(o)[c]??null,n=(0,s.S)(a)[c]??null}return{code:r,id:n,ordinal:e}}_isNotCurrentFeature(t){return t?.properties?.id!==this._curBuildingId}_setOutdoorVisibility(t){for(const{id:e}of this._outdoorLayers)this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility",t?"visible":"none")}_addReserveFloorLayers(){for(const t of[a.FI,a.TU]){if(this._map.getLayer(t))continue;const e=t.split("_")[1],r=this._map.getLayer(e);if(!r)continue;const{source:n,sourceLayer:i}=r,o=t===a.FI?this._middleLayers[0]:this._lowerLayers[0];let s={"fill-opacity":0};if(this._isMaskMode&&t===a.TU){const t=this._originIndoorLayers.find(({id:t})=>t===S);t&&(s=Object.assign({},t.paint??{},s))}this._map.addLayer({id:t,source:n,"source-layer":i,type:"fill",paint:s},o.id)}}_addBuildingMaskLayer(){if(this._map.getLayer(c.Zj))return;const t=this._originIndoorLayers.find(({id:t})=>t===S);if(t){const e=Object.assign({},t,{id:c.Zj,layout:Object.assign({},t.layout??{},{visibility:"visible"}),paint:Object.assign({},t.paint??{},{"fill-opacity":0})});this._map.addLayer(e,S)}}_updateUnselectedMask(){if(!this._isMaskMode)return;const t=[...this._maskBuildings],e=[...this._maskSharedFloors];this._map.getLayer(c.Zj)&&this._map.setPaintProperty(c.Zj,"fill-opacity",["case",["in",["get","id"],["literal",t]],1,0]),this._map.getLayer(a.TU)&&this._map.setPaintProperty(a.TU,"fill-opacity",["case",["in",["get","id"],["literal",e]],1,0])}_addSelectedHighlightLayers(){const t=[{layerId:L,sourceLayer:"mapxus_level"},{layerId:k,sourceLayer:"mapxus_shared_level"}];let e=this._originIndoorLayers.find(({type:t})=>V(t));if(!e){const t=this._originIndoorLayers.findIndex(({id:t})=>t===this._upperLayers[this._upperLayers.length-1].id);e=this._originIndoorLayers[t+1]}for(const{layerId:r,sourceLayer:n}of t){if(this._map.getLayer(r))continue;const{lineWidth:t,lineOpacity:i,lineColor:o,lineOffset:s}=this._selectedHighlightStyle,a=T(t,s);this._map.addLayer({id:r,source:"indoor-planet","source-layer":n,type:"line",filter:["==","id",""],paint:{"line-offset":a,"line-width":t,"line-color":o,"line-opacity":i}},e?.id)}}_filterSelectedHighlight(){for(const t of[L,k])this._map.getLayer(t)&&this._map.setFilter(t,["==","id",this._isSelectSharedFloor?this._curSharedLevelId:this._floor.id??""])}_getBuildingDefaultOrdinal(t){let e=null;if(t?.properties){const{level_ids:r,ordinals:n,default_displayed_floor:i}=t.properties,o=(0,s.S)(n);if(o.length){if(i){e=o[(0,s.S)(r).findIndex(t=>t===i)]??null}e||(e=(0,g.A)(o,t=>Math.abs(Number(t)-.1)))}}return e}_copyOverlapLayers(){const t=this._originIndoorLayers.findIndex(({type:t,"source-layer":e})=>R(e,t)),e=this._originIndoorLayers.findIndex(({type:t,"source-layer":e})=>U(e,t));this._commonLayers=this._originIndoorLayers.slice(0,t).concat(this._originIndoorLayers.slice(e)),this._upperLayers=this._originIndoorLayers.slice(t,e).filter(({type:t})=>function(t){return"line"===t||"fill"===t||"fill-extrusion"===t}(t));const r=this._upperLayers[0];this._middleLayers=this._upperLayers.filter(({type:t})=>!V(t)).map(t=>{const e=`${t.id}-overlap-copy`;let n=this._map.getLayer(e);return n||(n=Object.assign({},t,{id:e}),this._map.addLayer(n,r.id)),n})}_copySharedFloorBackgroundLayers(){if(!!!this._upperLayers.find(t=>t.id===a.TU.split("_")[1]))return;const t=this._upperLayers.filter(({"source-layer":t,type:e})=>!M(t,e)&&!V(e)),e=this._commonLayers.filter(({"source-layer":t,type:e})=>U(t,e)),r=this._middleLayers[0]||this._upperLayers[0];this._lowerLayers=[...t,...e].map(t=>{const e=`${t.id}-shared-bg`;let n=this._map.getLayer(e);return n||(n=Object.assign({},t,{id:e}),this._map.addLayer(n,r.id)),n})}_updateFeatures(){this._features=this._getIndoorFeatures();const t=(0,_.A)(this._features,t=>t.layer.id+":"+t.properties.id),e=[],r=[],n=[];for(const i of t){const t=i.layer.id;t===E?e.push(i):t===S?r.push(i):t===a.TU&&n.push(i)}this._allVenuesMap=new Map(e.map(t=>[t.properties.id,t])),this._allBuildingsMap=new Map(r.map(t=>[t.properties.id,t])),this._allSharedLevelsMap=new Map(n.map(t=>[t.properties.id,t]))}_calExcludedPoisInMiddle(){const t=this._map.querySourceFeatures("indoor-planet",{sourceLayer:"mapxus_place"}),e=t=>{if(!t)return!1;return(0,s.S)(t).some(t=>this._upperLevels.has(t))},r=t.filter(t=>{const r=t.properties["ref:level"]||t.properties["ref:shared_level"];return!!this._middleLevels.has(r)&&e(t.properties.overlap)});this._excludedPoisInMiddle=r.map(t=>t.properties["osm:ref"])}_updateSelectedFeatures(){if(this._featureIncomplete){if(this._isSelectSharedFloor){const t=this._features.find(t=>t.properties.id===this._curVenueId);if(!t)return;this._curVenueFeature=t}else{const t=this._allBuildingsMap.get(this._curBuildingId);if(!t)return;this._curBuildingFeature=t}this._featureIncomplete=!1}}_layerFloors(){const{displayedLevels:t,selectedLevelIds:e,alwaysDisplayedSharedLevelIds:r,hiddenBuildingIds:n,maskBuildingIds:i,maskSharedFloorIds:o}=this._classifyFloors();this._isMaskMode&&(this._maskBuildings.clear(),i.forEach(t=>this._maskBuildings.add(t)),this._maskSharedFloors.clear(),o.forEach(t=>this._maskSharedFloors.add(t)),this._upperLevels.clear(),this._middleLevels.clear(),this._lowerLevels.clear()),this._layerSelectedLevels(t,e,r),this._layerUnselectedLevels(t,e,r),n.forEach(t=>{this._hiddenBuildings.has(t)||this._hiddenBuildings.add(t)})}_layerSelectedLevels(t,e,r){for(const n of e){this._upperLevels.has(n)||(this._middleLevels.delete(n),this._lowerLevels.delete(n),this._upperLevels.add(n));const e=t.find(({level:t,overlap:e})=>t===n&&!!e);if(e)for(const t of e.overlap)this._upperLevels.has(t)&&(this._upperLevels.delete(t),r.includes(t)?this._lowerLevels.add(t):this._middleLevels.add(t))}}_layerUnselectedLevels(t,e,r){for(const n of t){if(e.includes(n.level))continue;const{level:t,overlap:i}=n,o=!i||!i.some(t=>this._upperLevels.has(t)),s=r.includes(t);o?s?this._lowerLevels.add(t):this._upperLevels.add(t):s?this._lowerLevels.add(t):this._middleLevels.add(t)}}_classifyFloors(){const t=[],e=[],r=[],n=[],i=[],o=[],a=[...this._allVenuesMap.values()],c=this._curVenueId?[this._allVenuesMap.get(this._curVenueId),...a.filter(t=>t.properties.id!==this._curVenueId)]:a;for(const a of c){if(!a||!a.properties)continue;const{id:c,overlap:l,building_ids:u,shared_level_ids:d,default_displayed_ordinal:h}=a.properties,f=c===this._curVenueId,p=j(l),y=(0,s.S)(u),g=this._history.getBuildingUnitByVenue(c);let m=g?this._history.getOrdinalByBuildingUnit(g.id):h;m||(m=this._setVenueInitOrdinal(c,y)),m&&(y.forEach(r=>{const o=this._allBuildingsMap.get(r),s=this._getBuildingDisplayedLevel(o,m);s?this._isMaskMode?f?(e.push(s),t.push({level:s,overlap:p.get(s)??null})):i.push(r):(t.push({level:s,overlap:p.get(s)??null}),f&&e.push(s)):n.push(r)}),(0,s.S)(d).forEach(i=>{const s=this._allSharedLevelsMap.get(i),{ordinal:a,persistence:c=!1}=s?.properties||{},l=Boolean(c)&&0<=a&&a<=m,u=a===m,d=l||u,h={level:i,overlap:p.get(i)??null};d?this._isMaskMode?f?(t.push(h),l&&r.push(i),u&&e.push(i)):o.push(i):(t.push(h),f&&u&&e.push(i),l&&r.push(i)):n.push(i)}))}return{displayedLevels:t,hiddenBuildingIds:n,maskBuildingIds:i,maskSharedFloorIds:o,alwaysDisplayedSharedLevelIds:r,selectedLevelIds:e}}_setVenueInitOrdinal(t,e){const r=e.find(t=>this._allBuildingsMap.has(t)),n=r?this._allBuildingsMap.get(r):null,i=n?this._getBuildingDefaultOrdinal(n):null;return i&&(this._history.setOrdinalByBuildingUnit(r,i),this._history.setBuildingUnitByVenue(t,{id:r,type:"building"})),i}_getBuildingDisplayedLevel(t,e){if(!t||!t.properties)return null;const{level_ids:r,ordinals:n}=t.properties,i=(0,s.S)(n).findIndex(t=>t===e);return(0,s.S)(r)[i]??null}_filterLayers(){this._filterIndoorLayers([...this._upperLevels,...this._middleLevels],this._commonLayers),this._filterIndoorLayers([...this._upperLevels],this._upperLayers),this._filterIndoorLayers([...this._middleLevels],this._middleLayers),this._filterIndoorLayers([...this._lowerLevels],this._lowerLayers)}_filterIndoorLayers(t,e){let r;for(const n of e){const{id:e,filter:i,type:o,"source-layer":s}=n,a=e.includes("-shared-bg"),c=[...this._maskBuildings],l=[...this._maskSharedFloors];P(s,o)||F(s,o)||(R(s,o)?r=["all",M(s,o)?["!in","ref:building",...c]:["!in","id",...l],["in","id",...t],i]:a?r=["all",["!in","ref:shared_level",...l],["in","ref:shared_level",...t],i]:(r=["all",["any",["all",["!in","ref:building",...c],["in","ref:level",...t]],["all",["!in","ref:shared_level",...l],["in","ref:shared_level",...t]]],i],U(s,o)&&r.splice(1,0,["any",["!has","overlap"],["any",["in","ref:level",...this._upperLevels],["in","ref:shared_level",...this._upperLevels],["!in","osm:ref",...this._excludedPoisInMiddle]]])),this._map.setFilter(e,r))}}async _updateIndoorState(t,e){if(!t)return void this._clear();if(!t.properties)return;const{id:r,"ref:venue":n,level_ids:i,ordinals:a}=t.properties;if(this._curVenueId!==n){this._curVenueId=n;let t=this.getFeaturesById(n,{layerIds:[E]})[0]??null;if(!t)try{const e=(await O.searchByIds(n)).data.result.venues[0];t=(0,o.E)(e)}catch(t){throw t}this._curVenueFeature=t}if(this._curBuildingFeature=t,this._curBuildingId=r,e){const t=(0,s.S)(i).findIndex(t=>t===e);this._floor.ordinal=(0,s.S)(a)[t]??null}else{const e=this._history.getBuildingUnitByVenue(n);this._floor.ordinal=e?this._history.getOrdinalByBuildingUnit(e.id):this._getBuildingDefaultOrdinal(t)}}_updateFloorState(t){if(this._floor={code:null,id:null,ordinal:t},!t)return;const{code:e,id:r}=this._getBuildingFloorByOrdinal(this._curBuildingFeature,t);this._floor.code=e,this._floor.id=r,this._history.setOrdinalByBuildingUnit(this._curBuildingId,t),this._history.setBuildingUnitByVenue(this._curVenueId,{id:this._curBuildingId,type:"building"})}_resetSelectedDisplayedLevel(){const{building_ids:t,shared_level_ids:e}=this._curVenueFeature.properties,r=(0,s.S)(t),n=(0,s.S)(e);for(const t of r){const e=this._allBuildingsMap.get(t);if(!e)continue;const r=(0,s.S)(e.properties.level_ids);n.push(...r),this._hiddenBuildings.delete(t),this._isMaskMode&&this._maskBuildings.delete(t)}for(const t of n)this._upperLevels.delete(t),this._middleLevels.delete(t),this._lowerLevels.delete(t),this._isMaskMode&&this._maskSharedFloors.delete(t)}async _checkAndPanToBuilding(){this.getFeaturesById(this._curBuildingId,{layerIds:[S]})[0]||(this._fitBuildingBounds?this.fitBuildingBbox():await this.panToBuildingCenter())}async _queryFeatureByPoint(t){const e=this._queryVisibleFeature(t);if(!e)return null;let r=null;if(M(e.sourceLayer,e.layer.type)){const{id:t,"ref:building":n}=e.properties;let i=this._allBuildingsMap.get(n);if(!i){const t=await(0,d.pT)(n);i=(0,o.r)(t),this._featureIncomplete=!0}i&&(r={building:i,floorId:t})}else if(H(e.sourceLayer,e.layer.type)){const{id:t,ordinal:n,name:i,"ref:venue":s}=e.properties;let a=this._allVenuesMap.get(s);if(!a){const t=await(0,d.qT)(s);a=(0,o.E)(t),this._featureIncomplete=!0}a&&(r={sharedLevel:{id:t,ordinal:n,name:"string"==typeof i?{default:i}:i},venue:a})}else r={building:e};return r}_queryVisibleFeature(t){const e=[I,x,`${I}-overlap-copy`,`${x}-overlap-copy`,`${x}-shared-bg`,...this._isMaskMode?[c.Zj,a.TU]:[]].filter(t=>!!this._map.getLayer(t)),r=this._map.queryRenderedFeatures(t,{layers:e});let n=null;for(const t of e){const e=r.find(e=>e.layer.id===t);if(e){n=e;break}}return n&&F(n.sourceLayer,n.layer.type)&&(this._maskBuildings.has(n.properties.id)||(n=null)),n}_queryRenderedFeatures(t){const e=(t||[]).filter(t=>this._map.getLayer(t)),r=e.length?{layers:e}:void 0,n=this._map.getCanvas().getBoundingClientRect();return this._map.queryRenderedFeatures([[0,0],[n.width,n.height]],r)}_dispatchIndoorMapLoaded(){this._indoorMapLoaded||(this._indoorMapLoaded=!0,this.emit(B))}}function T(t,e){const r="number"==typeof t&&t===u.sy.lineWidth,n="number"==typeof e&&e===u.sy.lineOffset;return n?r&&n?["interpolate",["linear"],["zoom"],18,-1.5,20.2,-3.75,20.4,-3.8,21.5,-7.5,22,-9.55]:!r&&n?"number"==typeof t?-t/2:e:void 0:e}function P(t,e){return"mapxus_venue"===t&&"fill"===e}function F(t,e){return"mapxus_building"===t&&("fill"===e||"line"===e||"symbol"===e)}function R(t,e){return M(t,e)||H(t,e)}function M(t,e){return"mapxus_level"===t&&("fill"===e||"line"===e)}function H(t,e){return"mapxus_shared_level"===t&&("fill"===e||"line"===e)}function U(t,e){return"mapxus_place"===t&&"symbol"===e}function V(t){return"fill-extrusion"===t}function j(t){const e=new Map;if(!t)return e;for(const r of(0,s.S)(t,"/")){const[t,n]=(0,s.S)(r,":");e.set(t,(0,s.S)(n))}return e}},5647:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(367).A)(Object.getPrototypeOf,Object)},5664:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(8182),i=0;const o=function(t){var e=++i;return(0,n.A)(t)+e}},5668:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},5706:(t,e,r)=>{"use strict";r.d(e,{Q:()=>n});class n{static instance;_hiddenBuildings;constructor(){this._hiddenBuildings=new Set}static getInstance(){return n.instance||(n.instance=new n),n.instance}getHiddenBuildings(){return this._hiddenBuildings}}},5707:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},5722:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(608),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;const s=(0,n.A)(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)}),e})},5781:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(1275),i=r(5530),o=r(7809),s=r(4099),a=r(9109),c=r(9959);const l=function(t,e,r){var l=-1,u=i.A,d=t.length,h=!0,f=[],p=f;if(r)h=!1,u=o.A;else if(d>=200){var y=e?null:(0,a.A)(t);if(y)return(0,c.A)(y);h=!1,u=s.A,p=new n.A}else p=e?[]:f;t:for(;++l<d;){var g=t[l],m=e?e(g):g;if(g=r||0!==g?g:0,h&&m==m){for(var _=p.length;_--;)if(p[_]===m)continue t;e&&p.push(m),f.push(g)}else u(p,m,r)||(p!==f&&p.push(m),f.push(g))}return f}},5861:(t,e,r)=>{"use strict";r.d(e,{A:()=>w});var n=r(2732),i=r(8335),o=r(180),s=r(9857),a=r(3631),c=r(9672),l=r(1121),u="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",y=(0,l.A)(n.A),g=(0,l.A)(i.A),m=(0,l.A)(o.A),_=(0,l.A)(s.A),b=(0,l.A)(a.A),v=c.A;(n.A&&v(new n.A(new ArrayBuffer(1)))!=p||i.A&&v(new i.A)!=u||o.A&&v(o.A.resolve())!=d||s.A&&v(new s.A)!=h||a.A&&v(new a.A)!=f)&&(v=function(t){var e=(0,c.A)(t),r="[object Object]"==e?t.constructor:void 0,n=r?(0,l.A)(r):"";if(n)switch(n){case y:return p;case g:return u;case m:return d;case _:return h;case b:return f}return e});const w=v},5917:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(5088),i=r(9846),o=r(1521),s=r(2509),a=r(549);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n.A,c.prototype.delete=i.A,c.prototype.get=o.A,c.prototype.has=s.A,c.prototype.set=a.A;const l=c},5997:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}},6031:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}},6034:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(2141),i=r(8672),o=r(1470);const s=function(t,e){return(0,o.A)(t,(0,i.A)((0,n.A)(e)))}},6224:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return t<e}},6242:(t,e,r)=>{"use strict";r.d(e,{k:()=>a});var n=r(7007),i=r(5537),o=r(3574),s=r(3207);class a extends n.EventEmitter{_appId=null;_secret=null;isClosed=!1;_timeoutId;_isInitialized=!1;_initializationPromise;_tokenManager=s.t.getInstance();_from;constructor(t,e,r=o.en.Access){super(),this._from=r,this._appId=t,this._secret=e,this._initializationPromise=this._initToken()}async ready(){await this._initializationPromise}get appId(){return this._appId}get token(){if(!this._isInitialized)throw new Error("Token is not initialized yet. Use the 'ready' method to wait for initialization.");return this._tokenManager.getToken(this._appId)}close(){this.isClosed||(this._timeoutId&&clearTimeout(this._timeoutId),this._tokenManager.deleteToken(this._appId,this._from),this.emit("updated",{appId:this._appId,token:null}),Object.keys(this).forEach(t=>{"isClosed"!==t&&"_events"!==t&&delete this[t]}),this.isClosed=!0,this.emit("closed"),delete this._events,Object.freeze(this))}forceUpdateToken(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null),this._isInitialized=!1,this._initializationPromise=this._initToken()}async _initToken(){try{const t=await this._tokenManager.fetchToken(this._appId,this._secret);this._isInitialized=!0,this._tokenManager.updateToken({appId:this._appId,secret:this._secret,token:t,from:this._from});const e=(0,i.s)(t),r=1e3*(e.exp-e.iat-60);this._loopUpdateToken(r)}catch(t){throw this.emit("error",new Error("Failed to initialize token.",{cause:t})),t}}_loopUpdateToken(t){this.isClosed||(this._timeoutId=setTimeout(async()=>{try{const e=await this._tokenManager.fetchToken(this._appId,this._secret);this._tokenManager.updateToken({appId:this._appId,secret:this._secret,token:e,from:this._from}),this.emit("updated",{appId:this._appId,token:e}),this._loopUpdateToken(t)}catch(t){this.emit("error",new Error("Failed to update token.",{cause:t}))}},t))}}},6294:(t,e,r)=>{"use strict";r.d(e,{B:()=>n});class n{_indoor;_isEnabled=!0;constructor(t){this._indoor=t}enable(){this._isEnabled=!0,this._indoor.setAllowOutdoorSwitch(!0)}disable(){this._isEnabled=!1,this._indoor.setAllowOutdoorSwitch(!1)}get isEnabled(){return this._isEnabled}}},6318:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(7465),i=r(901);const o=function(t,e){for(var r=0,o=(e=(0,n.A)(e,t)).length;null!=t&&r<o;)t=t[(0,i.A)(e[r++])];return r&&r==o?t:void 0}},6358:(t,e,r)=>{"use strict";var n,i,o,s;r.d(e,{Kp:()=>n,LJ:()=>o,_P:()=>i,nH:()=>s}),function(t){t.POINT="Point",t.POLYGON="Polygon"}(n||(n={})),function(t){t.POINT="Point",t.POLYGON="Polygon",t.GATE="Gate"}(i||(i={})),function(t){t.DEFAULT_NAME="DefaultName"}(o||(o={})),function(t){t.ABSOLUTE_DISTANCE="AbsoluteDistance",t.ACTUAL_DISTANCE="ActualDistance"}(s||(s={}))},6377:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.edwards=d,e.eddsa=h,e.twistedEdwards=function(t){const{CURVE:e,curveOpts:r,eddsaOpts:n}=function(t){const e={a:t.a,d:t.d,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r=t.Fp,n=(0,o.Field)(e.n,t.nBitLength,!0),i={Fp:r,Fn:n,uvRatio:t.uvRatio},s={hash:t.hash,randomBytes:t.randomBytes,adjustScalarBytes:t.adjustScalarBytes,domain:t.domain,prehash:t.prehash,mapToCurve:t.mapToCurve};return{CURVE:e,curveOpts:i,eddsaOpts:s}}(t),i=h(d(e,r),n);return function(t,e){const r=Object.assign({},e,{ExtendedPoint:e.Point,CURVE:t});return r}(t,i)};const n=r(8627),i=r(2422),o=r(4967),s=BigInt(0),a=BigInt(1),c=BigInt(2),l=BigInt(8),u={zip215:!0};function d(t,e={}){const{Fp:r,Fn:o}=(0,i._createCurveFields)("edwards",t,e),{h:u,n:d}=t;(0,n._validateObject)(e,{},{uvRatio:"function"});const h=c<<BigInt(8*o.BYTES)-a,f=t=>r.create(t),p=e.uvRatio||((t,e)=>{try{return{isValid:!0,value:r.sqrt(r.div(t,e))}}catch(t){return{isValid:!1,value:s}}});if(!function(t,e,r,n){const i=t.sqr(r),o=t.sqr(n),s=t.add(t.mul(e.a,i),o),a=t.add(t.ONE,t.mul(e.d,t.mul(i,o)));return t.eql(s,a)}(r,t,t.Gx,t.Gy))throw new Error("bad curve params: generator point");function y(t,e,r=!1){const i=r?a:s;return(0,n.aInRange)("coordinate "+t,e,i,h),e}function g(t){if(!(t instanceof b))throw new Error("ExtendedPoint expected")}const m=(0,n.memoized)((t,e)=>{const{ex:n,ey:i,ez:o}=t,c=t.is0();null==e&&(e=c?l:r.inv(o));const u=f(n*e),d=f(i*e),h=f(o*e);if(c)return{x:s,y:a};if(h!==a)throw new Error("invZ was invalid");return{x:u,y:d}}),_=(0,n.memoized)(e=>{const{a:r,d:n}=t;if(e.is0())throw new Error("bad point: ZERO");const{ex:i,ey:o,ez:s,et:a}=e,c=f(i*i),l=f(o*o),u=f(s*s),d=f(u*u),h=f(c*r);if(f(u*f(h+l))!==f(d+f(n*f(c*l))))throw new Error("bad point: equation left != right (1)");if(f(i*o)!==f(s*a))throw new Error("bad point: equation left != right (2)");return!0});class b{constructor(t,e,r,n){this.ex=y("x",t),this.ey=y("y",e),this.ez=y("z",r,!0),this.et=y("t",n),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(t){if(t instanceof b)throw new Error("extended point not allowed");const{x:e,y:r}=t||{};return y("x",e),y("y",r),new b(e,r,a,f(e*r))}static normalizeZ(t){return(0,i.normalizeZ)(b,"ez",t)}static msm(t,e){return(0,i.pippenger)(b,o,t,e)}_setWindowSize(t){this.precompute(t)}precompute(t=8,e=!0){return v.setWindowSize(this,t),e||this.multiply(c),this}assertValidity(){_(this)}equals(t){g(t);const{ex:e,ey:r,ez:n}=this,{ex:i,ey:o,ez:s}=t,a=f(e*s),c=f(i*n),l=f(r*s),u=f(o*n);return a===c&&l===u}is0(){return this.equals(b.ZERO)}negate(){return new b(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){const{a:e}=t,{ex:r,ey:n,ez:i}=this,o=f(r*r),s=f(n*n),a=f(c*f(i*i)),l=f(e*o),u=r+n,d=f(f(u*u)-o-s),h=l+s,p=h-a,y=l-s,g=f(d*p),m=f(h*y),_=f(d*y),v=f(p*h);return new b(g,m,v,_)}add(e){g(e);const{a:r,d:n}=t,{ex:i,ey:o,ez:s,et:a}=this,{ex:c,ey:l,ez:u,et:d}=e,h=f(i*c),p=f(o*l),y=f(a*n*d),m=f(s*u),_=f((i+o)*(c+l)-h-p),v=m-y,w=m+y,B=f(p-r*h),A=f(_*v),E=f(w*B),S=f(_*B),I=f(v*w);return new b(A,E,I,S)}subtract(t){return this.add(t.negate())}multiply(t){const e=t;(0,n.aInRange)("scalar",e,a,d);const{p:r,f:i}=v.wNAFCached(this,e,b.normalizeZ);return b.normalizeZ([r,i])[0]}multiplyUnsafe(t,e=b.ZERO){const r=t;return(0,n.aInRange)("scalar",r,s,d),r===s?b.ZERO:this.is0()||r===a?this:v.wNAFCachedUnsafe(this,r,b.normalizeZ,e)}isSmallOrder(){return this.multiplyUnsafe(u).is0()}isTorsionFree(){return v.wNAFCachedUnsafe(this,d).is0()}toAffine(t){return m(this,t)}clearCofactor(){return u===a?this:this.multiplyUnsafe(u)}static fromBytes(t,e=!1){return(0,n.abytes)(t),this.fromHex(t,e)}static fromHex(e,i=!1){const{d:o,a:c}=t,l=r.BYTES;e=(0,n.ensureBytes)("pointHex",e,l),(0,n.abool)("zip215",i);const u=e.slice(),d=e[l-1];u[l-1]=-129&d;const y=(0,n.bytesToNumberLE)(u),g=i?h:r.ORDER;(0,n.aInRange)("pointHex.y",y,s,g);const m=f(y*y),_=f(m-a),v=f(o*m-c);let{isValid:w,value:B}=p(_,v);if(!w)throw new Error("Point.fromHex: invalid y coordinate");const A=(B&a)===a,E=!!(128&d);if(!i&&B===s&&E)throw new Error("Point.fromHex: x=0 and x_0=1");return E!==A&&(B=f(-B)),b.fromAffine({x:B,y})}static fromPrivateScalar(t){return b.BASE.multiply(t)}toBytes(){const{x:t,y:e}=this.toAffine(),i=(0,n.numberToBytesLE)(e,r.BYTES);return i[i.length-1]|=t&a?128:0,i}toRawBytes(){return this.toBytes()}toHex(){return(0,n.bytesToHex)(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}b.BASE=new b(t.Gx,t.Gy,a,f(t.Gx*t.Gy)),b.ZERO=new b(s,a,a,s),b.Fp=r,b.Fn=o;const v=(0,i.wNAF)(b,8*o.BYTES);return b}function h(t,e){(0,n._validateObject)(e,{hash:"function"},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:r,hash:i}=e,{BASE:o,Fp:a,Fn:c}=t,l=c.ORDER,d=e.randomBytes||n.randomBytes,h=e.adjustScalarBytes||(t=>t),f=e.domain||((t,e,r)=>{if((0,n.abool)("phflag",r),e.length||r)throw new Error("Contexts/pre-hash are not supported");return t});function p(t){return c.create(t)}function y(t){return p((0,n.bytesToNumberLE)(t))}function g(t){const{head:e,prefix:r,scalar:s}=function(t){const e=a.BYTES;t=(0,n.ensureBytes)("private key",t,e);const r=(0,n.ensureBytes)("hashed private key",i(t),2*e),o=h(r.slice(0,e));return{head:o,prefix:r.slice(e,2*e),scalar:y(o)}}(t),c=o.multiply(s),l=c.toBytes();return{head:e,prefix:r,scalar:s,point:c,pointBytes:l}}function m(t=Uint8Array.of(),...e){const o=(0,n.concatBytes)(...e);return y(i(f(o,(0,n.ensureBytes)("context",t),!!r)))}const _=u;o.precompute(8);return{getPublicKey:function(t){return g(t).pointBytes},sign:function(t,e,i={}){t=(0,n.ensureBytes)("message",t),r&&(t=r(t));const{prefix:c,scalar:u,pointBytes:d}=g(e),h=m(i.context,c,t),f=o.multiply(h).toBytes(),y=p(h+m(i.context,f,d,t)*u);(0,n.aInRange)("signature.s",y,s,l);const _=a.BYTES,b=(0,n.concatBytes)(f,(0,n.numberToBytesLE)(y,_));return(0,n.ensureBytes)("result",b,2*_)},verify:function(e,i,s,c=_){const{context:l,zip215:u}=c,d=a.BYTES;e=(0,n.ensureBytes)("signature",e,2*d),i=(0,n.ensureBytes)("message",i),s=(0,n.ensureBytes)("publicKey",s,d),void 0!==u&&(0,n.abool)("zip215",u),r&&(i=r(i));const h=(0,n.bytesToNumberLE)(e.slice(d,2*d));let f,p,y;try{f=t.fromHex(s,u),p=t.fromHex(e.slice(0,d),u),y=o.multiplyUnsafe(h)}catch(t){return!1}if(!u&&f.isSmallOrder())return!1;const g=m(l,p.toBytes(),f.toBytes(),i);return p.add(f.multiplyUnsafe(g)).subtract(y).clearCofactor().is0()},utils:{getExtendedPublicKey:g,randomPrivateKey:()=>d(a.BYTES),precompute:(e=8,r=t.BASE)=>r.precompute(e,!1)},Point:t}}},6474:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var n=r(1038),i=r(7500),o=r(7511),s=r(6586),a=r(9396),c=r(5997),l=r(901);const u=function(t,e){return(0,s.A)(t)&&(0,a.A)(e)?(0,c.A)((0,l.A)(t),e):function(r){var s=(0,i.A)(r,t);return void 0===s&&s===e?(0,o.A)(r,t):(0,n.A)(e,s,3)}}},6527:(t,e)=>{"use strict";function r(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function n(t){if("boolean"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function i(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function o(t,...e){if(!r(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function s(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}Object.defineProperty(e,"__esModule",{value:!0}),e.wrapCipher=e.Hash=e.nextTick=e.isLE=void 0,e.isBytes=r,e.abool=n,e.anumber=i,e.abytes=o,e.ahash=function(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.createHasher");i(t.outputLen),i(t.blockLen)},e.aexists=function(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")},e.aoutput=function(t,e){o(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)},e.u8=function(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},e.u32=function(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))},e.clean=function(...t){for(let e=0;e<t.length;e++)t[e].fill(0)},e.createView=s,e.bytesToHex=l,e.hexToBytes=h,e.hexToNumber=f,e.bytesToNumberBE=function(t){return f(l(t))},e.numberToBytesBE=function(t,e){return h(t.toString(16).padStart(2*e,"0"))},e.utf8ToBytes=p,e.bytesToUtf8=function(t){return(new TextDecoder).decode(t)},e.toBytes=function(t){if("string"==typeof t)t=p(t);else{if(!r(t))throw new Error("Uint8Array expected, got "+typeof t);t=_(t)}return t},e.overlapBytes=y,e.complexOverlapBytes=function(t,e){if(y(t,e)&&t.byteOffset<e.byteOffset)throw new Error("complex overlap of input and output is not supported")},e.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];o(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r},e.checkOpts=function(t,e){if(null==e||"object"!=typeof e)throw new Error("options must be defined");return Object.assign(t,e)},e.equalBytes=function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r},e.getOutput=function(t,e,r=!0){if(void 0===e)return new Uint8Array(t);if(e.length!==t)throw new Error("invalid output length, expected "+t+", got: "+e.length);if(r&&!m(e))throw new Error("invalid output, must be aligned");return e},e.setBigUint64=g,e.u64Lengths=function(t,e,r){n(r);const i=new Uint8Array(16),o=s(i);return g(o,0,BigInt(e),r),g(o,8,BigInt(t),r),i},e.isAligned32=m,e.copyBytes=_,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];const a=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),c=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function l(t){if(o(t),a)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=c[t[r]];return e}const u={_0:48,_9:57,A:65,F:70,a:97,f:102};function d(t){return t>=u._0&&t<=u._9?t-u._0:t>=u.A&&t<=u.F?t-(u.A-10):t>=u.a&&t<=u.f?t-(u.a-10):void 0}function h(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);if(a)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=d(t.charCodeAt(i)),o=d(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+e+'" at index '+i)}n[e]=16*r+o}return n}function f(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":"0x"+t)}function p(t){if("string"!=typeof t)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(t))}function y(t,e){return t.buffer===e.buffer&&t.byteOffset<e.byteOffset+e.byteLength&&e.byteOffset<t.byteOffset+t.byteLength}e.nextTick=async()=>{};e.Hash=class{};function g(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,l=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+l,a,n)}function m(t){return t.byteOffset%4==0}function _(t){return Uint8Array.from(t)}e.wrapCipher=(t,r)=>{function n(n,...i){if(o(n),!e.isLE)throw new Error("Non little-endian hardware is not yet supported");if(void 0!==t.nonceLength){const e=i[0];if(!e)throw new Error("nonce / iv required");t.varSizeNonce?o(e):o(e,t.nonceLength)}const s=t.tagLength;s&&void 0!==i[1]&&o(i[1]);const a=r(n,...i),c=(t,e)=>{if(void 0!==e){if(2!==t)throw new Error("cipher output not supported");o(e)}};let l=!1;return{encrypt(t,e){if(l)throw new Error("cannot encrypt() twice with same key + nonce");return l=!0,o(t),c(a.encrypt.length,e),a.encrypt(t,e)},decrypt(t,e){if(o(t),s&&t.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(a.decrypt.length,e),a.decrypt(t,e)}}}return Object.assign(n,t),n}},6568:(t,e,r)=>{"use strict";r.d(e,{Ay:()=>Lt});var n=r(1635),i="4.6.2";function o(t,e){return new Promise(function(r){return setTimeout(r,t,e)})}function s(t){return!!t&&"function"==typeof t.then}function a(t,e){try{var r=t();s(r)?r.then(function(t){return e(!0,t)},function(t){return e(!1,t)}):e(!0,r)}catch(t){e(!1,t)}}function c(t,e,r){return void 0===r&&(r=16),(0,n.sH)(this,void 0,void 0,function(){var i,o,s,a;return(0,n.YH)(this,function(n){switch(n.label){case 0:i=Array(t.length),o=Date.now(),s=0,n.label=1;case 1:return s<t.length?(i[s]=e(t[s],s),(a=Date.now())>=o+r?(o=a,[4,new Promise(function(t){var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(null)})]):[3,3]):[3,4];case 2:n.sent(),n.label=3;case 3:return++s,[3,1];case 4:return[2,i]}})})}function l(t){return t.then(void 0,function(){}),t}function u(t){return parseInt(t)}function d(t){return parseFloat(t)}function h(t,e){return"number"==typeof t&&isNaN(t)?e:t}function f(t){return t.reduce(function(t,e){return t+(e?1:0)},0)}function p(t,e){if(void 0===e&&(e=1),Math.abs(e)>=1)return Math.round(t/e)*e;var r=1/e;return Math.round(t*r)/r}function y(t,e){var r=t[0]>>>16,n=65535&t[0],i=t[1]>>>16,o=65535&t[1],s=e[0]>>>16,a=65535&e[0],c=e[1]>>>16,l=0,u=0,d=0,h=0;d+=(h+=o+(65535&e[1]))>>>16,h&=65535,u+=(d+=i+c)>>>16,d&=65535,l+=(u+=n+a)>>>16,u&=65535,l+=r+s,l&=65535,t[0]=l<<16|u,t[1]=d<<16|h}function g(t,e){var r=t[0]>>>16,n=65535&t[0],i=t[1]>>>16,o=65535&t[1],s=e[0]>>>16,a=65535&e[0],c=e[1]>>>16,l=65535&e[1],u=0,d=0,h=0,f=0;h+=(f+=o*l)>>>16,f&=65535,d+=(h+=i*l)>>>16,h&=65535,d+=(h+=o*c)>>>16,h&=65535,u+=(d+=n*l)>>>16,d&=65535,u+=(d+=i*c)>>>16,d&=65535,u+=(d+=o*a)>>>16,d&=65535,u+=r*l+n*c+i*a+o*s,u&=65535,t[0]=u<<16|d,t[1]=h<<16|f}function m(t,e){var r=t[0];32===(e%=64)?(t[0]=t[1],t[1]=r):e<32?(t[0]=r<<e|t[1]>>>32-e,t[1]=t[1]<<e|r>>>32-e):(e-=32,t[0]=t[1]<<e|r>>>32-e,t[1]=r<<e|t[1]>>>32-e)}function _(t,e){0!==(e%=64)&&(e<32?(t[0]=t[1]>>>32-e,t[1]=t[1]<<e):(t[0]=t[1]<<e-32,t[1]=0))}function b(t,e){t[0]^=e[0],t[1]^=e[1]}var v=[4283543511,3981806797],w=[3301882366,444984403];function B(t){var e=[0,t[0]>>>1];b(t,e),g(t,v),e[1]=t[0]>>>1,b(t,e),g(t,w),e[1]=t[0]>>>1,b(t,e)}var A=[2277735313,289559509],E=[1291169091,658871167],S=[0,5],I=[0,1390208809],x=[0,944331445];function L(t,e){var r=function(t){for(var e=new Uint8Array(t.length),r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n>127)return(new TextEncoder).encode(t);e[r]=n}return e}(t);e=e||0;var n,i=[0,r.length],o=i[1]%16,s=i[1]-o,a=[0,e],c=[0,e],l=[0,0],u=[0,0];for(n=0;n<s;n+=16)l[0]=r[n+4]|r[n+5]<<8|r[n+6]<<16|r[n+7]<<24,l[1]=r[n]|r[n+1]<<8|r[n+2]<<16|r[n+3]<<24,u[0]=r[n+12]|r[n+13]<<8|r[n+14]<<16|r[n+15]<<24,u[1]=r[n+8]|r[n+9]<<8|r[n+10]<<16|r[n+11]<<24,g(l,A),m(l,31),g(l,E),b(a,l),m(a,27),y(a,c),g(a,S),y(a,I),g(u,E),m(u,33),g(u,A),b(c,u),m(c,31),y(c,a),g(c,S),y(c,x);l[0]=0,l[1]=0,u[0]=0,u[1]=0;var d=[0,0];switch(o){case 15:d[1]=r[n+14],_(d,48),b(u,d);case 14:d[1]=r[n+13],_(d,40),b(u,d);case 13:d[1]=r[n+12],_(d,32),b(u,d);case 12:d[1]=r[n+11],_(d,24),b(u,d);case 11:d[1]=r[n+10],_(d,16),b(u,d);case 10:d[1]=r[n+9],_(d,8),b(u,d);case 9:d[1]=r[n+8],b(u,d),g(u,E),m(u,33),g(u,A),b(c,u);case 8:d[1]=r[n+7],_(d,56),b(l,d);case 7:d[1]=r[n+6],_(d,48),b(l,d);case 6:d[1]=r[n+5],_(d,40),b(l,d);case 5:d[1]=r[n+4],_(d,32),b(l,d);case 4:d[1]=r[n+3],_(d,24),b(l,d);case 3:d[1]=r[n+2],_(d,16),b(l,d);case 2:d[1]=r[n+1],_(d,8),b(l,d);case 1:d[1]=r[n],b(l,d),g(l,A),m(l,31),g(l,E),b(a,l)}return b(a,i),b(c,i),y(a,c),y(c,a),B(a),B(c),y(a,c),y(c,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(c[0]>>>0).toString(16)).slice(-8)+("00000000"+(c[1]>>>0).toString(16)).slice(-8)}function k(t){return"function"!=typeof t}function O(t,e,r,i){var o=Object.keys(t).filter(function(t){return!function(t,e){for(var r=0,n=t.length;r<n;++r)if(t[r]===e)return!0;return!1}(r,t)}),s=l(c(o,function(r){return function(t,e){var r=l(new Promise(function(r){var n=Date.now();a(t.bind(null,e),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=Date.now()-n;if(!t[0])return r(function(){return{error:t[1],duration:i}});var o=t[1];if(k(o))return r(function(){return{value:o,duration:i}});r(function(){return new Promise(function(t){var e=Date.now();a(o,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=i+Date.now()-e;if(!r[0])return t({error:r[1],duration:o});t({value:r[1],duration:o})})})})})}));return function(){return r.then(function(t){return t()})}}(t[r],e)},i));return function(){return(0,n.sH)(this,void 0,void 0,function(){var t,e,r,a;return(0,n.YH)(this,function(n){switch(n.label){case 0:return[4,s];case 1:return[4,c(n.sent(),function(t){return l(t())},i)];case 2:return t=n.sent(),[4,Promise.all(t)];case 3:for(e=n.sent(),r={},a=0;a<o.length;++a)r[o[a]]=e[a];return[2,r]}})})}}function C(){var t=window,e=navigator;return f(["MSCSSMatrix"in t,"msSetImmediate"in t,"msIndexedDB"in t,"msMaxTouchPoints"in e,"msPointerEnabled"in e])>=4}function T(){var t=window,e=navigator;return f(["webkitPersistentStorage"in e,"webkitTemporaryStorage"in e,0===(e.vendor||"").indexOf("Google"),"webkitResolveLocalFileSystemURL"in t,"BatteryManager"in t,"webkitMediaStream"in t,"webkitSpeechGrammar"in t])>=5}function P(){var t=window;return f(["ApplePayError"in t,"CSSPrimitiveValue"in t,"Counter"in t,0===navigator.vendor.indexOf("Apple"),"RGBColor"in t,"WebKitMediaKeys"in t])>=4}function F(){var t=window,e=t.HTMLElement,r=t.Document;return f(["safari"in t,!("ongestureend"in t),!("TouchEvent"in t),!("orientation"in t),e&&!("autocapitalize"in e.prototype),r&&"pointerLockElement"in r.prototype])>=4}function R(){var t,e=window;return t=e.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(t))&&"[object WebPageNamespace]"===String(e.browser)}function M(){var t,e,r=window;return f(["buildID"in navigator,"MozAppearance"in(null!==(e=null===(t=document.documentElement)||void 0===t?void 0:t.style)&&void 0!==e?e:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function H(){var t=window,e=navigator,r=t.CSS,n=t.HTMLButtonElement;return f([!("getStorageUpdates"in e),n&&"popover"in n.prototype,"CSSCounterStyleRule"in t,r.supports("font-size-adjust: ex-height 0.5"),r.supports("text-transform: full-width")])>=4}function U(){var t=document;return(t.exitFullscreen||t.msExitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen).call(t)}function V(){var t=T(),e=M(),r=window,n=navigator,i="connection";return t?f([!("SharedWorker"in r),n[i]&&"ontypechange"in n[i],!("sinkId"in new Audio)])>=2:!!e&&f(["onorientationchange"in r,"orientation"in r,/android/i.test(n.appVersion)])>=2}function j(t){var e=new Error(t);return e.name=t,e}function N(t,e,r){var i,s,a;return void 0===r&&(r=50),(0,n.sH)(this,void 0,void 0,function(){var c,l;return(0,n.YH)(this,function(n){switch(n.label){case 0:c=document,n.label=1;case 1:return c.body?[3,3]:[4,o(r)];case 2:return n.sent(),[3,1];case 3:l=c.createElement("iframe"),n.label=4;case 4:return n.trys.push([4,,10,11]),[4,new Promise(function(t,r){var n=!1,i=function(){n=!0,t()};l.onload=i,l.onerror=function(t){n=!0,r(t)};var o=l.style;o.setProperty("display","block","important"),o.position="absolute",o.top="0",o.left="0",o.visibility="hidden",e&&"srcdoc"in l?l.srcdoc=e:l.src="about:blank",c.body.appendChild(l);var s=function(){var t,e;n||("complete"===(null===(e=null===(t=l.contentWindow)||void 0===t?void 0:t.document)||void 0===e?void 0:e.readyState)?i():setTimeout(s,10))};s()})];case 5:n.sent(),n.label=6;case 6:return(null===(s=null===(i=l.contentWindow)||void 0===i?void 0:i.document)||void 0===s?void 0:s.body)?[3,8]:[4,o(r)];case 7:return n.sent(),[3,6];case 8:return[4,t(l,l.contentWindow)];case 9:return[2,n.sent()];case 10:return null===(a=l.parentNode)||void 0===a||a.removeChild(l),[7];case 11:return[2]}})})}function D(t){for(var e=function(t){for(var e,r,n="Unexpected syntax '".concat(t,"'"),i=/^\s*([a-z-]*)(.*)$/i.exec(t),o=i[1]||void 0,s={},a=/([.:#][\w-]+|\[.+?\])/gi,c=function(t,e){s[t]=s[t]||[],s[t].push(e)};;){var l=a.exec(i[2]);if(!l)break;var u=l[0];switch(u[0]){case".":c("class",u.slice(1));break;case"#":c("id",u.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(u);if(!d)throw new Error(n);c(d[1],null!==(r=null!==(e=d[4])&&void 0!==e?e:d[5])&&void 0!==r?r:"");break;default:throw new Error(n)}}return[o,s]}(t),r=e[0],n=e[1],i=document.createElement(null!=r?r:"div"),o=0,s=Object.keys(n);o<s.length;o++){var a=s[o],c=n[a].join(" ");"style"===a?$(i.style,c):i.setAttribute(a,c)}return i}function $(t,e){for(var r=0,n=e.split(";");r<n.length;r++){var i=n[r],o=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(i);if(o){var s=o[1],a=o[2],c=o[4];t.setProperty(s,a,c||"")}}}var z=["monospace","sans-serif","serif"],G=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function W(t){return t.toDataURL()}var Z,q;function K(){var t=this;return function(){if(void 0===q){var t=function(){var e=Y();X(e)?q=setTimeout(t,2500):(Z=e,q=void 0)};t()}}(),function(){return(0,n.sH)(t,void 0,void 0,function(){var t;return(0,n.YH)(this,function(e){switch(e.label){case 0:return X(t=Y())?Z?[2,(0,n.fX)([],Z,!0)]:(r=document).fullscreenElement||r.msFullscreenElement||r.mozFullScreenElement||r.webkitFullscreenElement?[4,U()]:[3,2]:[3,2];case 1:e.sent(),t=Y(),e.label=2;case 2:return X(t)||(Z=t),[2,t]}var r})})}}function Y(){var t=screen;return[h(d(t.availTop),null),h(d(t.width)-d(t.availWidth)-h(d(t.availLeft),0),null),h(d(t.height)-d(t.availHeight)-h(d(t.availTop),0),null),h(d(t.availLeft),null)]}function X(t){for(var e=0;e<4;++e)if(t[e])return!1;return!0}function J(t){var e;return(0,n.sH)(this,void 0,void 0,function(){var r,i,s,a,c,l,u;return(0,n.YH)(this,function(n){switch(n.label){case 0:for(r=document,i=r.createElement("div"),s=new Array(t.length),a={},Q(i),u=0;u<t.length;++u)"DIALOG"===(c=D(t[u])).tagName&&c.show(),Q(l=r.createElement("div")),l.appendChild(c),i.appendChild(l),s[u]=c;n.label=1;case 1:return r.body?[3,3]:[4,o(50)];case 2:return n.sent(),[3,1];case 3:r.body.appendChild(i);try{for(u=0;u<t.length;++u)s[u].offsetParent||(a[t[u]]=!0)}finally{null===(e=i.parentNode)||void 0===e||e.removeChild(i)}return[2,a]}})})}function Q(t){t.style.setProperty("visibility","hidden","important"),t.style.setProperty("display","block","important")}function tt(t){return matchMedia("(inverted-colors: ".concat(t,")")).matches}function et(t){return matchMedia("(forced-colors: ".concat(t,")")).matches}function rt(t){return matchMedia("(prefers-contrast: ".concat(t,")")).matches}function nt(t){return matchMedia("(prefers-reduced-motion: ".concat(t,")")).matches}function it(t){return matchMedia("(prefers-reduced-transparency: ".concat(t,")")).matches}function ot(t){return matchMedia("(dynamic-range: ".concat(t,")")).matches}var st=Math,at=function(){return 0};var ct={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var lt=function(){for(var t=window;;){var e=t.parent;if(!e||e===t)return!1;try{if(e.location.origin!==t.location.origin)return!0}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return!0;throw t}t=e}};var ut=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),dt=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),ht=["FRAGMENT_SHADER","VERTEX_SHADER"],ft=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],pt="WEBGL_debug_renderer_info";function yt(t){if(t.webgl)return t.webgl.context;var e,r=document.createElement("canvas");r.addEventListener("webglCreateContextError",function(){return e=void 0});for(var n=0,i=["webgl","experimental-webgl"];n<i.length;n++){var o=i[n];try{e=r.getContext(o)}catch(t){}if(e)break}return t.webgl={context:e},e}function gt(t,e,r){var n=t.getShaderPrecisionFormat(t[e],t[r]);return n?[n.rangeMin,n.rangeMax,n.precision]:[]}function mt(t){return Object.keys(t.__proto__).filter(_t)}function _t(t){return"string"==typeof t&&!t.match(/[^A-Z0-9_x]/)}function bt(){return M()}function vt(){return T()||P()}function wt(t){return"function"==typeof t.getParameter}var Bt={fonts:function(){var t=this;return N(function(e,r){var i=r.document;return(0,n.sH)(t,void 0,void 0,function(){var t,e,r,o,s,a,c,l,u,d,h;return(0,n.YH)(this,function(n){for((t=i.body).style.fontSize="48px",(e=i.createElement("div")).style.setProperty("visibility","hidden","important"),r={},o={},s=function(t){var r=i.createElement("span"),n=r.style;return n.position="absolute",n.top="0",n.left="0",n.fontFamily=t,r.textContent="mmMwWLliI0O&1",e.appendChild(r),r},a=function(t,e){return s("'".concat(t,"',").concat(e))},c=function(){for(var t={},e=function(e){t[e]=z.map(function(t){return a(e,t)})},r=0,n=G;r<n.length;r++){e(n[r])}return t},l=function(t){return z.some(function(e,n){return t[n].offsetWidth!==r[e]||t[n].offsetHeight!==o[e]})},u=function(){return z.map(s)}(),d=c(),t.appendChild(e),h=0;h<z.length;h++)r[z[h]]=u[h].offsetWidth,o[z[h]]=u[h].offsetHeight;return[2,G.filter(function(t){return l(d[t])})]})})})},domBlockers:function(t){var e=(void 0===t?{}:t).debug;return(0,n.sH)(this,void 0,void 0,function(){var t,r,i,o,s;return(0,n.YH)(this,function(n){switch(n.label){case 0:return P()||V()?(a=atob,t={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',a("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",a("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",a("LnNwb25zb3JpdA=="),".ylamainos",a("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",a("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",a("LmhlYWRlci1ibG9ja2VkLWFk"),a("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",a("I2FkXzMwMFgyNTA="),a("I2Jhbm5lcmZsb2F0MjI="),a("I2NhbXBhaWduLWJhbm5lcg=="),a("I0FkLUNvbnRlbnQ=")],adGuardChinese:[a("LlppX2FkX2FfSA=="),a("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",a("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),a("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",a("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",a("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",a("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),a("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),a("LmFkZ29vZ2xl"),a("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[a("YW1wLWF1dG8tYWRz"),a("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",a("I2FkX2ludmlld19hcmVh")],adGuardRussian:[a("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),a("LnJlY2xhbWE="),'div[id^="smi2adblock"]',a("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[a("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),a("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",a("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),a("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),a("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",a("I3Jla2xhbWk="),a("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),a("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),a("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[a("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",a("LndpZGdldF9wb19hZHNfd2lkZ2V0"),a("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",a("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[a("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),a("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",a("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",a("I3Jla2xhbW5pLWJveA=="),a("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",a("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[a("I2FkdmVydGVudGll"),a("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",a("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",a("LnNwb25zb3JsaW5rZ3J1ZW4="),a("I3dlcmJ1bmdza3k="),a("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),a("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[a("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",a("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[a("LnJla2xhbW9zX3RhcnBhcw=="),a("LnJla2xhbW9zX251b3JvZG9z"),a("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),a("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),a("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[a("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[a("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),a("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",a("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[a("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),a("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),a("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",a("LmFkX19tYWlu"),a("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[a("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[a("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),a("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[a("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),a("I2xpdmVyZUFkV3JhcHBlcg=="),a("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),a("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[a("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",a("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),a("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),a("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[a("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),a("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),a("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",a("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),a("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),a("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),a("ZGl2I3NrYXBpZWNfYWQ=")],ro:[a("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),a("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),a("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[a("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),a("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),a("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",a("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),a("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",a("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},r=Object.keys(t),[4,J((s=[]).concat.apply(s,r.map(function(e){return t[e]})))]):[2,void 0];case 1:return i=n.sent(),e&&function(t,e){for(var r="DOM blockers debug:\n```",n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];r+="\n".concat(o,":");for(var s=0,a=t[o];s<a.length;s++){var c=a[s];r+="\n ".concat(e[c]?"🚫":"➡️"," ").concat(c)}}console.log("".concat(r,"\n```"))}(t,i),(o=r.filter(function(e){var r=t[e];return f(r.map(function(t){return i[t]}))>.6*r.length})).sort(),[2,o]}var a})})},fontPreferences:function(){return function(t,e){void 0===e&&(e=4e3);return N(function(r,i){var o=i.document,s=o.body,a=s.style;a.width="".concat(e,"px"),a.webkitTextSizeAdjust=a.textSizeAdjust="none",T()?s.style.zoom="".concat(1/i.devicePixelRatio):P()&&(s.style.zoom="reset");var c=o.createElement("div");return c.textContent=(0,n.fX)([],Array(e/20|0),!0).map(function(){return"word"}).join(" "),s.appendChild(c),t(o,s)},'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}(function(t,e){for(var r={},n={},i=0,o=Object.keys(ct);i<o.length;i++){var s=o[i],a=ct[s],c=a[0],l=void 0===c?{}:c,u=a[1],d=void 0===u?"mmMwWLliI0fiflO&1":u,h=t.createElement("span");h.textContent=d,h.style.whiteSpace="nowrap";for(var f=0,p=Object.keys(l);f<p.length;f++){var y=p[f],g=l[y];void 0!==g&&(h.style[y]=g)}r[s]=h,e.append(t.createElement("br"),h)}for(var m=0,_=Object.keys(ct);m<_.length;m++){n[s=_[m]]=r[s].getBoundingClientRect().width}return n})},audio:function(){return P()&&H()&&R()||T()&&(t=navigator,e=window,r=Audio.prototype,n=e.visualViewport,f(["srLatency"in r,"srChannelCount"in r,"devicePosture"in t,n&&"segments"in n,"getTextInformation"in Image.prototype])>=3)&&function(){var t=window,e=t.URLPattern;return f(["union"in Set.prototype,"Iterator"in t,e&&"hasRegExpGroups"in e.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}()?-4:function(){var t=window,e=t.OfflineAudioContext||t.webkitOfflineAudioContext;if(!e)return-2;if(P()&&!F()&&!function(){var t=window;return f(["DOMRectList"in t,"RTCPeerConnectionIceEvent"in t,"SVGGeometryElement"in t,"ontransitioncancel"in t])>=3}())return-1;var r=4500,n=new e(1,5e3,44100),i=n.createOscillator();i.type="triangle",i.frequency.value=1e4;var o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,i.connect(o),o.connect(n.destination),i.start(0);var a=function(t){var e=3,r=500,n=500,i=5e3,o=function(){},a=new Promise(function(a,c){var u=!1,d=0,h=0;t.oncomplete=function(t){return a(t.renderedBuffer)};var f=function(){setTimeout(function(){return c(j("timeout"))},Math.min(n,h+i-Date.now()))},p=function(){try{var n=t.startRendering();switch(s(n)&&l(n),t.state){case"running":h=Date.now(),u&&f();break;case"suspended":document.hidden||d++,u&&d>=e?c(j("suspended")):setTimeout(p,r)}}catch(t){c(t)}};p(),o=function(){u||(u=!0,h>0&&f())}});return[a,o]}(n),c=a[0],u=a[1],d=l(c.then(function(t){return function(t){for(var e=0,r=0;r<t.length;++r)e+=Math.abs(t[r]);return e}(t.getChannelData(0).subarray(r))},function(t){if("timeout"===t.name||"suspended"===t.name)return-3;throw t}));return function(){return u(),d}}();var t,e,r,n},screenFrame:function(){var t=this;if(P()&&H()&&R())return function(){return Promise.resolve(void 0)};var e=K();return function(){return(0,n.sH)(t,void 0,void 0,function(){var t,r;return(0,n.YH)(this,function(n){switch(n.label){case 0:return[4,e()];case 1:return t=n.sent(),[2,[(r=function(t){return null===t?null:p(t,10)})(t[0]),r(t[1]),r(t[2]),r(t[3])]]}})})}},canvas:function(){return function(t){var e,r,n,i=!1,o=function(){var t=document.createElement("canvas");return t.width=1,t.height=1,[t,t.getContext("2d")]}(),s=o[0],a=o[1];!function(t,e){return!(!e||!t.toDataURL)}(s,a)?r=n="unsupported":(i=function(t){return t.rect(0,0,10,10),t.rect(2,2,6,6),!t.isPointInPath(5,5,"evenodd")}(a),t?r=n="skipped":(e=function(t,e){!function(t,e){t.width=240,t.height=60,e.textBaseline="alphabetic",e.fillStyle="#f60",e.fillRect(100,1,62,20),e.fillStyle="#069",e.font='11pt "Times New Roman"';var r="Cwm fjordbank gly ".concat(String.fromCharCode(55357,56835));e.fillText(r,2,15),e.fillStyle="rgba(102, 204, 0, 0.2)",e.font="18pt Arial",e.fillText(r,4,45)}(t,e);var r=W(t),n=W(t);if(r!==n)return["unstable","unstable"];!function(t,e){t.width=122,t.height=110,e.globalCompositeOperation="multiply";for(var r=0,n=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];r<n.length;r++){var i=n[r],o=i[0],s=i[1],a=i[2];e.fillStyle=o,e.beginPath(),e.arc(s,a,40,0,2*Math.PI,!0),e.closePath(),e.fill()}e.fillStyle="#f9c",e.arc(60,60,60,0,2*Math.PI,!0),e.arc(60,60,20,0,2*Math.PI,!0),e.fill("evenodd")}(t,e);var i=W(t);return[i,r]}(s,a),r=e[0],n=e[1]));return{winding:i,geometry:r,text:n}}(P()&&H()&&R())},osCpu:function(){return navigator.oscpu},languages:function(){var t,e=navigator,r=[],n=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(void 0!==n&&r.push([n]),Array.isArray(e.languages))T()&&f([!("MediaSettingsRange"in(t=window)),"RTCEncodedAudioFrame"in t,""+t.Intl=="[object Intl]",""+t.Reflect=="[object Reflect]"])>=3||r.push(e.languages);else if("string"==typeof e.languages){var i=e.languages;i&&r.push(i.split(","))}return r},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return h(d(navigator.deviceMemory),void 0)},screenResolution:function(){var t,e,r;if(!(P()&&H()&&R()))return t=screen,(r=[(e=function(t){return h(u(t),null)})(t.width),e(t.height)]).sort().reverse(),r},hardwareConcurrency:function(){return h(u(navigator.hardwareConcurrency),void 0)},timezone:function(){var t,e=null===(t=window.Intl)||void 0===t?void 0:t.DateTimeFormat;if(e){var r=(new e).resolvedOptions().timeZone;if(r)return r}var n,i=(n=(new Date).getFullYear(),-Math.max(d(new Date(n,0,1).getTimezoneOffset()),d(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(i>=0?"+":"").concat(i)},sessionStorage:function(){try{return!!window.sessionStorage}catch(t){return!0}},localStorage:function(){try{return!!window.localStorage}catch(t){return!0}},indexedDB:function(){var t,e;if(!(C()||(t=window,e=navigator,f(["msWriteProfilerMark"in t,"MSStream"in t,"msLaunchUri"in e,"msSaveBlob"in e])>=3&&!C())))try{return!!window.indexedDB}catch(t){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var t=navigator.platform;return"MacIntel"===t&&P()&&!F()?function(){if("iPad"===navigator.platform)return!0;var t=screen,e=t.width/t.height;return f(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,e>.65&&e<1.53])>=2}()?"iPad":"iPhone":t},plugins:function(){var t=navigator.plugins;if(t){for(var e=[],r=0;r<t.length;++r){var n=t[r];if(n){for(var i=[],o=0;o<n.length;++o){var s=n[o];i.push({type:s.type,suffixes:s.suffixes})}e.push({name:n.name,description:n.description,mimeTypes:i})}}return e}},touchSupport:function(){var t,e=navigator,r=0;void 0!==e.maxTouchPoints?r=u(e.maxTouchPoints):void 0!==e.msMaxTouchPoints&&(r=e.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(e){t=!1}return{maxTouchPoints:r,touchEvent:t,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var t=[],e=0,r=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];e<r.length;e++){var n=r[e],i=window[n];i&&"object"==typeof i&&t.push(n)}return t.sort()},cookiesEnabled:function(){var t=document;try{t.cookie="cookietest=1; SameSite=Strict;";var e=-1!==t.cookie.indexOf("cookietest=");return t.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(t){return!1}},colorGamut:function(){for(var t=0,e=["rec2020","p3","srgb"];t<e.length;t++){var r=e[t];if(matchMedia("(color-gamut: ".concat(r,")")).matches)return r}},invertedColors:function(){return!!tt("inverted")||!tt("none")&&void 0},forcedColors:function(){return!!et("active")||!et("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(var t=0;t<=100;++t)if(matchMedia("(max-monochrome: ".concat(t,")")).matches)return t;throw new Error("Too high value")}},contrast:function(){return rt("no-preference")?0:rt("high")||rt("more")?1:rt("low")||rt("less")?-1:rt("forced")?10:void 0},reducedMotion:function(){return!!nt("reduce")||!nt("no-preference")&&void 0},reducedTransparency:function(){return!!it("reduce")||!it("no-preference")&&void 0},hdr:function(){return!!ot("high")||!ot("standard")&&void 0},math:function(){var t,e=st.acos||at,r=st.acosh||at,n=st.asin||at,i=st.asinh||at,o=st.atanh||at,s=st.atan||at,a=st.sin||at,c=st.sinh||at,l=st.cos||at,u=st.cosh||at,d=st.tan||at,h=st.tanh||at,f=st.exp||at,p=st.expm1||at,y=st.log1p||at;return{acos:e(.12312423423423424),acosh:r(1e308),acoshPf:(t=1e154,st.log(t+st.sqrt(t*t-1))),asin:n(.12312423423423424),asinh:i(1),asinhPf:function(t){return st.log(t+st.sqrt(t*t+1))}(1),atanh:o(.5),atanhPf:function(t){return st.log((1+t)/(1-t))/2}(.5),atan:s(.5),sin:a(-1e300),sinh:c(1),sinhPf:function(t){return st.exp(t)-1/st.exp(t)/2}(1),cos:l(10.000000000123),cosh:u(1),coshPf:function(t){return(st.exp(t)+1/st.exp(t))/2}(1),tan:d(-1e300),tanh:h(1),tanhPf:function(t){return(st.exp(2*t)-1)/(st.exp(2*t)+1)}(1),exp:f(1),expm1:p(1),expm1Pf:function(t){return st.exp(t)-1}(1),log1p:y(10),log1pPf:function(t){return st.log(1+t)}(10),powPI:function(t){return st.pow(st.PI,t)}(-100)}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=1/0,t[0]=t[0]-t[0],e[3]},applePay:function(){var t=window.ApplePaySession;if("function"!=typeof(null==t?void 0:t.canMakePayments))return-1;if(lt())return-3;try{return t.canMakePayments()?1:0}catch(t){return function(t){if(t instanceof Error&&"InvalidAccessError"===t.name&&/\bfrom\b.*\binsecure\b/i.test(t.message))return-2;throw t}(t)}},privateClickMeasurement:function(){var t,e=document.createElement("a"),r=null!==(t=e.attributionSourceId)&&void 0!==t?t:e.attributionsourceid;return void 0===r?void 0:String(r)},audioBaseLatency:function(){if(!(V()||P()))return-2;if(!window.AudioContext)return-1;var t=(new AudioContext).baseLatency;return null==t?-1:isFinite(t)?t:-3},dateTimeLocale:function(){if(!window.Intl)return-1;var t=window.Intl.DateTimeFormat;if(!t)return-2;var e=t().resolvedOptions().locale;return e||""===e?e:-3},webGlBasics:function(t){var e,r,n,i,o,s,a=yt(t.cache);if(!a)return-1;if(!wt(a))return-2;var c=bt()?null:a.getExtension(pt);return{version:(null===(e=a.getParameter(a.VERSION))||void 0===e?void 0:e.toString())||"",vendor:(null===(r=a.getParameter(a.VENDOR))||void 0===r?void 0:r.toString())||"",vendorUnmasked:c?null===(n=a.getParameter(c.UNMASKED_VENDOR_WEBGL))||void 0===n?void 0:n.toString():"",renderer:(null===(i=a.getParameter(a.RENDERER))||void 0===i?void 0:i.toString())||"",rendererUnmasked:c?null===(o=a.getParameter(c.UNMASKED_RENDERER_WEBGL))||void 0===o?void 0:o.toString():"",shadingLanguageVersion:(null===(s=a.getParameter(a.SHADING_LANGUAGE_VERSION))||void 0===s?void 0:s.toString())||""}},webGlExtensions:function(t){var e=yt(t.cache);if(!e)return-1;if(!wt(e))return-2;var r=e.getSupportedExtensions(),n=e.getContextAttributes(),i=[],o=[],s=[],a=[],c=[];if(n)for(var l=0,u=Object.keys(n);l<u.length;l++){var d=u[l];o.push("".concat(d,"=").concat(n[d]))}for(var h=0,f=mt(e);h<f.length;h++){var p=e[w=f[h]];s.push("".concat(w,"=").concat(p).concat(ut.has(p)?"=".concat(e.getParameter(p)):""))}if(r)for(var y=0,g=r;y<g.length;y++){var m=g[y];if(!(m===pt&&bt()||"WEBGL_polygon_mode"===m&&vt())){var _=e.getExtension(m);if(_)for(var b=0,v=mt(_);b<v.length;b++){var w;p=_[w=v[b]];a.push("".concat(w,"=").concat(p).concat(dt.has(p)?"=".concat(e.getParameter(p)):""))}else i.push(m)}}for(var B=0,A=ht;B<A.length;B++)for(var E=A[B],S=0,I=ft;S<I.length;S++){var x=I[S],L=gt(e,E,x);c.push("".concat(E,".").concat(x,"=").concat(L.join(",")))}return a.sort(),s.sort(),{contextAttributes:o,parameters:s,shaderPrecisions:c,extensions:r,extensionParameters:a,unsupportedExtensions:i}}};function At(t){var e=function(t){if(V())return.4;if(P())return!F()||H()&&R()?.3:.5;var e="value"in t.platform?t.platform.value:"";if(/^Win/.test(e))return.6;if(/^Mac/.test(e))return.5;return.7}(t),r=function(t){return p(.99+.01*t,1e-4)}(e);return{score:e,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(r))}}function Et(t){return JSON.stringify(t,function(t,e){return e instanceof Error?(r=e,(0,n.Cl)({name:r.name,message:r.message,stack:null===(i=r.stack)||void 0===i?void 0:i.split("\n")},r)):e;var r,i},2)}function St(t){return L(function(t){for(var e="",r=0,n=Object.keys(t).sort();r<n.length;r++){var i=n[r],o=t[i],s="error"in o?"error":JSON.stringify(o.value);e+="".concat(e?"|":"").concat(i.replace(/([:|\\])/g,"\\$1"),":").concat(s)}return e}(t))}function It(t){return void 0===t&&(t=50),function(t,e){void 0===e&&(e=1/0);var r=window.requestIdleCallback;return r?new Promise(function(t){return r.call(window,function(){return t()},{timeout:e})}):o(Math.min(t,e))}(t,2*t)}function xt(t,e){var r=Date.now();return{get:function(o){return(0,n.sH)(this,void 0,void 0,function(){var s,a,c;return(0,n.YH)(this,function(n){switch(n.label){case 0:return s=Date.now(),[4,t()];case 1:return a=n.sent(),c=function(t){var e,r=At(t);return{get visitorId(){return void 0===e&&(e=St(this.components)),e},set visitorId(t){e=t},confidence:r,components:t,version:i}}(a),(e||(null==o?void 0:o.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(c.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(s-r,"\nvisitorId: ").concat(c.visitorId,"\ncomponents: ").concat(Et(a),"\n```")),[2,c]}})})}}}var Lt={load:function(t){var e;return void 0===t&&(t={}),(0,n.sH)(this,void 0,void 0,function(){var r,o,s;return(0,n.YH)(this,function(n){switch(n.label){case 0:return(null===(e=t.monitoring)||void 0===e||e)&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var t=new XMLHttpRequest;t.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(i,"/npm-monitoring"),!0),t.send()}catch(t){console.error(t)}}(),r=t.delayFallback,o=t.debug,[4,It(r)];case 1:return n.sent(),s=function(t){return O(Bt,t,[])}({cache:{},debug:o}),[2,xt(s,o)]}})})},hashComponents:St,componentsToDebugString:Et}},6586:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(2049),i=r(1882),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const a=function(t,e){if((0,n.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,i.A)(t))||(s.test(t)||!o.test(t)||null!=e&&t in Object(e))}},6612:(t,e,r)=>{"use strict";var n;r.d(e,{y:()=>n}),function(t){t.ENGLISH="en",t.CHINESE_SIMPLIFIED="zh-Hans",t.CHINESE_TRADITIONAL="zh-Hant",t.CHINESE_TRADITIONAL_TW="zh-Hant-TW",t.JAPANESE="ja",t.KOREAN="ko",t.FILIPINO="fil",t.INDONESIAN="id",t.PORTUGUESE="pt",t.THAI="th",t.VIETNAMESE="vi",t.ARABIC="ar"}(n||(n={}))},6632:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(5917);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(i.Cache||n.A),r}i.Cache=n.A;const o=i},6666:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},6733:(t,e,r)=>{"use strict";r.d(e,{B:()=>b});var n=r(8291),i=r(853),o=r(1472),s=r(6666);const a={indoorLineColor:"#45b1cc",outdoorLineColor:"#8183ba",dashedLineColor:"#969696",shuttleBusLineColor:"#fb923c",lineWidth:4,dashedLineWidth:4,disableDashedLine:!1,inactiveRouteOpacity:.5,outdoorLineOpacity:1,markerIconSize:.75,markers:{from:"poi-02",to:"poi-01",stops:["waypoint-01"]},lineSymbol:{image:"east-blue-arrow-01",size:.25,spacing:1}},c="mmws-source-line-solid",l="mmws-layer-line-solid",u="mmws-layer-icon-line-symbol",d="mmws-source-line-dashed",h="mmws-layer-line-dashed",f="mmws-source-icon-connector",p="mmws-layer-icon-connector",y="mmws-source-icon-marker",g="mmws-layer-icon-marker",m=[l,u,h,p,g],_=[c,d,f,y];class b{_maplibreMap;_routeStyle=a;_styleDiffs={};_filterBy="venue";_curVenue=null;_curBuilding=null;_curOrdinal=null;_renderBoundaryLayer;constructor(t,e){this._maplibreMap=t,e&&(this._updateStyleProperties(e),t.on("load",()=>this._loadMarkerIcons()))}async setStyle(t){this._updateStyleProperties(t),await this._loadMarkerIcons(),await this._updateLayers()}async setMarkerIcons(t){if(Array.isArray(t)&&t.length){const e=t.slice(1,t.length-1);this._routeStyle.markers={from:t[0],to:(0,s.A)(t),stops:e.length?e:[t[0]]},this._styleDiffs={markers:this._routeStyle.markers}}else"from"in t&&(this._routeStyle.markers.from=t.from,this._styleDiffs.markers.from=t.from),"to"in t&&(this._routeStyle.markers.to=t.to,this._styleDiffs.markers.to=t.to),"stops"in t&&(this._routeStyle.markers.stops=t.stops??[null],this._styleDiffs.markers.stops=t.stops??[null]);await this._loadMarkerIcons()}setMarkerIconSize(t){return this._routeStyle.markerIconSize=t,this}setIndoorLineColor(t){return this._routeStyle.indoorLineColor=t,this}setOutdoorLineColor(t){return this._routeStyle.outdoorLineColor=t,this}setDashedLineColor(t){return this._routeStyle.dashedLineColor=t,this}setBusLineColor(t){return this._routeStyle.shuttleBusLineColor=t,this}render(t,e){if(!this._renderBoundaryLayer){const t=this._maplibreMap.getStyle(),e=(0,n.cq)(t);let r=e.find(({type:t,id:e})=>!e.includes("-overlap-copy")&&"fill-extrusion"===t);r||(r=e.find(t=>"symbol"===t.type&&"mapxus_place"===t?.["source-layer"])),this._renderBoundaryLayer=r?.id}const{instructions:r,points:{coordinates:i}}=t,{lineFeatures:o,connectorFeatures:s,dashedLineFeatures:a,markerFeatures:l}=this._classifyFeatures(r,i,e);this._renderSolidLines(o),this._renderLineSymbols(c,u),!0!==this._routeStyle.disableDashedLine&&this._renderDashedLines(a),this._renderConnectors(s),this._renderMarkers(l)}remove(){m.forEach(t=>{this._maplibreMap.getLayer(t)&&this._maplibreMap.removeLayer(t)}),_.forEach(t=>{this._maplibreMap.getSource(t)&&this._maplibreMap.removeSource(t)})}setFilterByVenue(t,e){this._filterBy="venue",this._curVenue=t??null,this._curOrdinal=e??null,this._filterRouteOpacity()}setFilterByBuilding(t,e){this._filterBy="building",this._curBuilding=t??null,this._curOrdinal=e??null,this._filterRouteOpacity()}_classifyFeatures(t,e,r){const n=[],i=[],o=[],a=[],c=[];t.forEach((r,o)=>{const{venue_id:s,building_id:a,floor_id:l,ordinal:u,sign:d,type:h,interval:[f,p]}=r;if(function(t){return 5===t}(d))c.push(r);else if(function(t){return 100===t||-100===t}(d)){0!==o&&o!==t.length-1&&i.push(this._createIconFeature(`connector-${i.length}`,e[f],{...v({venue_id:s,building_id:a,floor_id:l,ordinal:u}),icon:h}));const r=t[o+1];if(r){const{venue_id:t,building_id:n,floor_id:o,ordinal:s}=r;i.push(this._createIconFeature(`connector-${i.length}`,e[p],{...v({venue_id:t,building_id:n,floor_id:o,ordinal:s}),icon:h}))}}else n.push(this._createLineFeature(`solid-line-${n.length}`,e.slice(f,p+1),v({venue_id:s,building_id:a,floor_id:l,ordinal:u,isShuttleBus:w(d)?1:0})))});const l=t[0],{venue_id:u,building_id:d,floor_id:h,ordinal:f}=l,p=t[t.length-1],{venue_id:y,building_id:g,floor_id:m,ordinal:_}=p,b=e[0],B=e[e.length-1],A=r[0],E=r[r.length-1],S=r.slice(1,r.length-1);return A&&o.push(this._createLineFeature(`dashed-line-${o.length}`,[A,b],v({venue_id:u,building_id:d,floor_id:h,ordinal:f}))),E&&o.push(this._createLineFeature(`dashed-line-${o.length}`,[B,E],v({venue_id:y,building_id:g,floor_id:m,ordinal:_}))),c.length&&S.length&&c.forEach(({venue_id:t,building_id:r,floor_id:n,ordinal:i,interval:[c]},l)=>{o.push(this._createLineFeature(`dashed-line-${o.length}`,[e[c],S[l]],v({venue_id:t,building_id:r,floor_id:n,ordinal:i}))),a.push(this._createIconFeature(`marker-${a.length}`,S[l],{...v({venue_id:t,building_id:r,floor_id:n,ordinal:i,markerType:`stops_${l}`}),icon:this._routeStyle.markers.stops[l]??(0,s.A)(this._routeStyle.markers.stops),iconSize:this._routeStyle.markerIconSize}))}),a.push(this._createIconFeature(`marker-${a.length}`,A??b,{...v({venue_id:u,building_id:d,floor_id:h,ordinal:f,markerType:"from"}),icon:this._routeStyle.markers.from,iconSize:this._routeStyle.markerIconSize})),a.push(this._createIconFeature(`marker-${a.length}`,E??B,{...v({venue_id:y,building_id:g,floor_id:m,ordinal:_,markerType:"to"}),icon:this._routeStyle.markers.to,iconSize:this._routeStyle.markerIconSize})),{lineFeatures:n,connectorFeatures:i,dashedLineFeatures:o,markerFeatures:a}}_createLineFeature(t,e,r){return{id:t,type:"Feature",geometry:{type:"LineString",coordinates:e},properties:r}}_createIconFeature(t,e,r){return{id:t,type:"Feature",geometry:{type:"Point",coordinates:e},properties:r}}_renderSolidLines(t){this._addCollectionSource(c,t),this._addLineLayer(c,l,{"line-color":["case",["==",["get","isShuttleBus"],"1"],this._routeStyle.shuttleBusLineColor,["==",["get","floor_id"],null],this._routeStyle.outdoorLineColor,this._routeStyle.indoorLineColor],"line-opacity":["case",["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,1],"line-width":this._routeStyle.lineWidth})}_renderDashedLines(t){this._addCollectionSource(d,t),this._addLineLayer(d,h,{"line-color":this._routeStyle.dashedLineColor,"line-width":this._routeStyle.dashedLineWidth,"line-dasharray":[.1,1.8]})}_renderConnectors(t){this._addCollectionSource(f,t),this._addIconLayer(f,p)}_renderMarkers(t){this._addCollectionSource(y,t),this._addIconLayer(y,g,{"icon-anchor":"bottom","icon-allow-overlap":!0,"icon-ignore-placement":!0})}_addCollectionSource(t,e){this._maplibreMap.addSource(t,{type:"geojson",data:{type:"FeatureCollection",features:e}})}_addLineLayer(t,e,r){this._maplibreMap.addLayer({id:e,type:"line",source:t,layout:{"line-join":"round","line-cap":"round"},paint:{"line-width":4,...r||{}}},this._renderBoundaryLayer)}_renderLineSymbols(t,e){this._maplibreMap.addLayer({id:e,type:"symbol",source:t,layout:{"symbol-placement":"line","symbol-spacing":this._routeStyle.lineSymbol.spacing,"icon-size":this._routeStyle.lineSymbol.size,"icon-image":this._routeStyle.lineSymbol.image},paint:{"icon-opacity":["case",["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,1]}},this._renderBoundaryLayer)}_addIconLayer(t,e,r){this._maplibreMap.addLayer({id:e,type:"symbol",source:t,layout:{"icon-image":["get","icon"],"icon-size":["case",["has","iconSize"],["get","iconSize"],1],...r||{}}})}_updateStyleProperties(t){if(this._styleDiffs=B(this._routeStyle,t??a),t){if(Object.keys(this._styleDiffs).length){const t={...this._routeStyle.lineSymbol,...this._styleDiffs.lineSymbol??{}},e=this._styleDiffs.markers;let r=this._routeStyle.markers;const n={outdoorLineOpacity:(this._styleDiffs.outdoorLineOpacity>1?1:this._styleDiffs.outdoorLineOpacity<0?0:this._styleDiffs.outdoorLineOpacity)??this._routeStyle.outdoorLineOpacity},i={inactiveRouteOpacity:(this._styleDiffs.inactiveRouteOpacity>1?1:this._styleDiffs.inactiveRouteOpacity<0?0:this._styleDiffs.inactiveRouteOpacity)??this._routeStyle.inactiveRouteOpacity};e&&Object.keys(e).length&&(r={...r,...e}),this._routeStyle={...this._routeStyle,...this._styleDiffs,...n,...i,markers:r,lineSymbol:t}}}else this._routeStyle=a}async _loadMarkerIcons(){const{markers:t,lineSymbol:e}=this._styleDiffs;if(e?.image&&await(0,i.K)(this._maplibreMap,e.image),t&&Object.keys(t).length){const{from:e,to:r,stops:n}=t;if(e&&await(0,i.K)(this._maplibreMap,e),r&&await(0,i.K)(this._maplibreMap,r),n&&n.length){const t=n.filter(t=>!!t);t.length&&await Promise.all(t.map(t=>(0,i.K)(this._maplibreMap,t)))}}}async _updateLayers(){if(!this._maplibreMap.getLayer(l))return;const{indoorLineColor:t,outdoorLineColor:e,dashedLineColor:r,shuttleBusLineColor:n,lineWidth:i,dashedLineWidth:o,disableDashedLine:a,inactiveRouteOpacity:c,outdoorLineOpacity:d,markerIconSize:f,markers:p,lineSymbol:m}=this._styleDiffs;if((t||e||n)&&this._maplibreMap.setPaintProperty(l,"line-color",["case",["==",["get","isShuttleBus"],"1"],this._routeStyle.shuttleBusLineColor,["==",["get","floor_id"],null],this._routeStyle.outdoorLineColor,this._routeStyle.indoorLineColor]),void 0!==i&&i+""&&this._maplibreMap.setPaintProperty(l,"line-width",i),"boolean"==typeof a?a?this._maplibreMap.setPaintProperty(h,"line-color","transparent"):(this._maplibreMap.setPaintProperty(h,"line-color",this._routeStyle.dashedLineColor),this._maplibreMap.setPaintProperty(h,"line-width",this._routeStyle.dashedLineWidth)):!0!==this._routeStyle.disableDashedLine&&(r&&this._maplibreMap.setPaintProperty(h,"line-color",r),void 0!==o&&o+""&&this._maplibreMap.setPaintProperty(h,"line-width",o)),void 0!==c&&c+""&&this._filterRouteOpacity(),void 0!==f&&f+""&&this._maplibreMap.setLayoutProperty(g,"icon-size",f),p&&Object.keys(p).length){const{from:t,to:e,stops:r}=p,n=this._maplibreMap.getSource(y),i=await n.getData();i.features=i.features.map(n=>{const{markerType:i}=n.properties;if(void 0!==t&&"from"===i&&(n.properties.icon=t),void 0!==e&&"to"===i&&(n.properties.icon=e),r&&i.includes("stops")){const t=parseInt(i.split("_")[1]);n.properties.icon=r[t]??(0,s.A)(r)}return n}),n.setData(i)}if(m){const{image:t,size:e,spacing:r}=m;void 0!==t&&this._maplibreMap.setLayoutProperty(u,"icon-image",t),void 0!==e&&e+""&&this._maplibreMap.setLayoutProperty(u,"icon-size",e),void 0!==r&&r+""&&this._maplibreMap.setLayoutProperty(u,"symbol-spacing",r)}void 0!==d&&d+""&&(this._maplibreMap.setPaintProperty(l,"line-opacity",["case",["==",["get","floor_id"],null],d,1]),this._maplibreMap.setPaintProperty(u,"icon-opacity",["case",["==",["get","floor_id"],null],d,1]),this._filterRouteOpacity())}_filterRouteOpacity(){let t;switch(this._filterBy){case"venue":t=["case",["all",["==",["get","ordinal"],this._curOrdinal??""],["==",["get","venue_id"],this._curVenue??""]],1,["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,this._routeStyle.inactiveRouteOpacity];break;case"building":t=["case",["all",["==",["get","ordinal"],this._curOrdinal??""],["==",["get","building_id"],this._curBuilding??""]],1,["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,this._routeStyle.inactiveRouteOpacity]}m.forEach(e=>{this._maplibreMap.getLayer(e)&&this._maplibreMap.setPaintProperty(e,e.includes("layer-line")?"line-opacity":"icon-opacity",t)})}}function v(t){return Object.fromEntries(Object.entries(t).map(([t,e])=>[t,Number.isFinite(e)?e+"":e]))}function w(t){return(0,o.A)(t,104,108)}function B(t,e){const r={};for(const n in e){const i=t[n],o=e[n];if("markers"===n||"lineSymbol"===n)if(Array.isArray(o)){const t=o.slice(1,o.length-1);r[n]={from:o[0],to:(0,s.A)(o),stops:t.length?t:[o[0]]}}else{const t=B(i,o);Object.keys(t).length&&(r[n]=t)}else o+""!=i+""&&(r[n]="stops"===n?o??[null]:o)}return r}},6748:(t,e,r)=>{"use strict";e.VV=void 0,e.w=function(t,e){return Buffer.from(function(t,e){var r=(0,i.ellipticCurve)(),a=new o.PrivateKey(void 0,r),c=t instanceof Uint8Array?new o.PublicKey(t,r):o.PublicKey.fromHex(t,r),l=a.encapsulate(c,(0,i.isHkdfKeyCompressed)()),u=a.publicKey.toBytes((0,i.isEphemeralKeyCompressed)()),d=(0,s.symEncrypt)(l,e);return(0,n.concatBytes)(u,d)}(t,e))};var n=r(6527),i=r(4928),o=r(9065),s=r(2158);var a=r(4928);Object.defineProperty(e,"VV",{enumerable:!0,get:function(){return a.ECIES_CONFIG}});var c=r(9065);s.aesEncrypt,s.aesDecrypt,s.symEncrypt,s.symDecrypt,s.decodeHex,s.getValidSecret,s.remove0x},6838:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(){this.__data__=[],this.size=0}},6912:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},6983:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return t!=t}},6984:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return t===e||t!=t&&e!=e}},7007:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise(function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}y(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&y(t,"error",e,r)}(t,i,{once:!0})})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){var i,o,s,l;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return t}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function f(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function y(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)n(c,this,e);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,e)}return!0},o.prototype.addListener=function(t,e){return l(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return l(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,d(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,d(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},7064:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(7271),i=r(3938),o=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,n.A)(t))return(0,i.A)(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},7076:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha512_224=e.sha512_256=e.sha384=e.sha512=e.sha224=e.sha256=e.SHA512_256=e.SHA512_224=e.SHA384=e.SHA512=e.SHA224=e.SHA256=void 0;const n=r(7202),i=r(2318),o=r(9175),s=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array(64);class c extends n.HashMD{constructor(t=32){super(64,t,8,!1),this.A=0|n.SHA256_IV[0],this.B=0|n.SHA256_IV[1],this.C=0|n.SHA256_IV[2],this.D=0|n.SHA256_IV[3],this.E=0|n.SHA256_IV[4],this.F=0|n.SHA256_IV[5],this.G=0|n.SHA256_IV[6],this.H=0|n.SHA256_IV[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=a[t-15],r=a[t-2],n=(0,o.rotr)(e,7)^(0,o.rotr)(e,18)^e>>>3,i=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;a[t]=i+a[t-7]+n+a[t-16]|0}let{A:r,B:i,C:c,D:l,E:u,F:d,G:h,H:f}=this;for(let t=0;t<64;t++){const e=f+((0,o.rotr)(u,6)^(0,o.rotr)(u,11)^(0,o.rotr)(u,25))+(0,n.Chi)(u,d,h)+s[t]+a[t]|0,p=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+(0,n.Maj)(r,i,c)|0;f=h,h=d,d=u,u=l+e|0,l=c,c=i,i=r,r=e+p|0}r=r+this.A|0,i=i+this.B|0,c=c+this.C|0,l=l+this.D|0,u=u+this.E|0,d=d+this.F|0,h=h+this.G|0,f=f+this.H|0,this.set(r,i,c,l,u,d,h,f)}roundClean(){(0,o.clean)(a)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,o.clean)(this.buffer)}}e.SHA256=c;class l extends c{constructor(){super(28),this.A=0|n.SHA224_IV[0],this.B=0|n.SHA224_IV[1],this.C=0|n.SHA224_IV[2],this.D=0|n.SHA224_IV[3],this.E=0|n.SHA224_IV[4],this.F=0|n.SHA224_IV[5],this.G=0|n.SHA224_IV[6],this.H=0|n.SHA224_IV[7]}}e.SHA224=l;const u=(()=>i.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))))(),d=(()=>u[0])(),h=(()=>u[1])(),f=new Uint32Array(80),p=new Uint32Array(80);class y extends n.HashMD{constructor(t=64){super(128,t,16,!1),this.Ah=0|n.SHA512_IV[0],this.Al=0|n.SHA512_IV[1],this.Bh=0|n.SHA512_IV[2],this.Bl=0|n.SHA512_IV[3],this.Ch=0|n.SHA512_IV[4],this.Cl=0|n.SHA512_IV[5],this.Dh=0|n.SHA512_IV[6],this.Dl=0|n.SHA512_IV[7],this.Eh=0|n.SHA512_IV[8],this.El=0|n.SHA512_IV[9],this.Fh=0|n.SHA512_IV[10],this.Fl=0|n.SHA512_IV[11],this.Gh=0|n.SHA512_IV[12],this.Gl=0|n.SHA512_IV[13],this.Hh=0|n.SHA512_IV[14],this.Hl=0|n.SHA512_IV[15]}get(){const{Ah:t,Al:e,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:l,Fh:u,Fl:d,Gh:h,Gl:f,Hh:p,Hl:y}=this;return[t,e,r,n,i,o,s,a,c,l,u,d,h,f,p,y]}set(t,e,r,n,i,o,s,a,c,l,u,d,h,f,p,y){this.Ah=0|t,this.Al=0|e,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|f,this.Hh=0|p,this.Hl=0|y}process(t,e){for(let r=0;r<16;r++,e+=4)f[r]=t.getUint32(e),p[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){const e=0|f[t-15],r=0|p[t-15],n=i.rotrSH(e,r,1)^i.rotrSH(e,r,8)^i.shrSH(e,r,7),o=i.rotrSL(e,r,1)^i.rotrSL(e,r,8)^i.shrSL(e,r,7),s=0|f[t-2],a=0|p[t-2],c=i.rotrSH(s,a,19)^i.rotrBH(s,a,61)^i.shrSH(s,a,6),l=i.rotrSL(s,a,19)^i.rotrBL(s,a,61)^i.shrSL(s,a,6),u=i.add4L(o,l,p[t-7],p[t-16]),d=i.add4H(u,n,c,f[t-7],f[t-16]);f[t]=0|d,p[t]=0|u}let{Ah:r,Al:n,Bh:o,Bl:s,Ch:a,Cl:c,Dh:l,Dl:u,Eh:y,El:g,Fh:m,Fl:_,Gh:b,Gl:v,Hh:w,Hl:B}=this;for(let t=0;t<80;t++){const e=i.rotrSH(y,g,14)^i.rotrSH(y,g,18)^i.rotrBH(y,g,41),A=i.rotrSL(y,g,14)^i.rotrSL(y,g,18)^i.rotrBL(y,g,41),E=y&m^~y&b,S=g&_^~g&v,I=i.add5L(B,A,S,h[t],p[t]),x=i.add5H(I,w,e,E,d[t],f[t]),L=0|I,k=i.rotrSH(r,n,28)^i.rotrBH(r,n,34)^i.rotrBH(r,n,39),O=i.rotrSL(r,n,28)^i.rotrBL(r,n,34)^i.rotrBL(r,n,39),C=r&o^r&a^o&a,T=n&s^n&c^s&c;w=0|b,B=0|v,b=0|m,v=0|_,m=0|y,_=0|g,({h:y,l:g}=i.add(0|l,0|u,0|x,0|L)),l=0|a,u=0|c,a=0|o,c=0|s,o=0|r,s=0|n;const P=i.add3L(L,O,T);r=i.add3H(P,x,k,C),n=0|P}({h:r,l:n}=i.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:s}=i.add(0|this.Bh,0|this.Bl,0|o,0|s)),({h:a,l:c}=i.add(0|this.Ch,0|this.Cl,0|a,0|c)),({h:l,l:u}=i.add(0|this.Dh,0|this.Dl,0|l,0|u)),({h:y,l:g}=i.add(0|this.Eh,0|this.El,0|y,0|g)),({h:m,l:_}=i.add(0|this.Fh,0|this.Fl,0|m,0|_)),({h:b,l:v}=i.add(0|this.Gh,0|this.Gl,0|b,0|v)),({h:w,l:B}=i.add(0|this.Hh,0|this.Hl,0|w,0|B)),this.set(r,n,o,s,a,c,l,u,y,g,m,_,b,v,w,B)}roundClean(){(0,o.clean)(f,p)}destroy(){(0,o.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}e.SHA512=y;class g extends y{constructor(){super(48),this.Ah=0|n.SHA384_IV[0],this.Al=0|n.SHA384_IV[1],this.Bh=0|n.SHA384_IV[2],this.Bl=0|n.SHA384_IV[3],this.Ch=0|n.SHA384_IV[4],this.Cl=0|n.SHA384_IV[5],this.Dh=0|n.SHA384_IV[6],this.Dl=0|n.SHA384_IV[7],this.Eh=0|n.SHA384_IV[8],this.El=0|n.SHA384_IV[9],this.Fh=0|n.SHA384_IV[10],this.Fl=0|n.SHA384_IV[11],this.Gh=0|n.SHA384_IV[12],this.Gl=0|n.SHA384_IV[13],this.Hh=0|n.SHA384_IV[14],this.Hl=0|n.SHA384_IV[15]}}e.SHA384=g;const m=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),_=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class b extends y{constructor(){super(28),this.Ah=0|m[0],this.Al=0|m[1],this.Bh=0|m[2],this.Bl=0|m[3],this.Ch=0|m[4],this.Cl=0|m[5],this.Dh=0|m[6],this.Dl=0|m[7],this.Eh=0|m[8],this.El=0|m[9],this.Fh=0|m[10],this.Fl=0|m[11],this.Gh=0|m[12],this.Gl=0|m[13],this.Hh=0|m[14],this.Hl=0|m[15]}}e.SHA512_224=b;class v extends y{constructor(){super(32),this.Ah=0|_[0],this.Al=0|_[1],this.Bh=0|_[2],this.Bl=0|_[3],this.Ch=0|_[4],this.Cl=0|_[5],this.Dh=0|_[6],this.Dl=0|_[7],this.Eh=0|_[8],this.El=0|_[9],this.Fh=0|_[10],this.Fl=0|_[11],this.Gh=0|_[12],this.Gl=0|_[13],this.Hh=0|_[14],this.Hl=0|_[15]}}e.SHA512_256=v,e.sha256=(0,o.createHasher)(()=>new c),e.sha224=(0,o.createHasher)(()=>new l),e.sha512=(0,o.createHasher)(()=>new y),e.sha384=(0,o.createHasher)(()=>new g),e.sha512_256=(0,o.createHasher)(()=>new v),e.sha512_224=(0,o.createHasher)(()=>new b)},7202:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHA512_IV=e.SHA384_IV=e.SHA224_IV=e.SHA256_IV=e.HashMD=void 0,e.setBigUint64=i,e.Chi=function(t,e,r){return t&e^~t&r},e.Maj=function(t,e,r){return t&e^t&r^e&r};const n=r(9175);function i(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,l=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+l,a,n)}class o extends n.Hash{constructor(t,e,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=(0,n.createView)(this.buffer)}update(t){(0,n.aexists)(this),t=(0,n.toBytes)(t),(0,n.abytes)(t);const{view:e,buffer:r,blockLen:i}=this,o=t.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const e=(0,n.createView)(t);for(;i<=o-s;s+=i)this.process(e,s);continue}r.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.aexists)(this),(0,n.aoutput)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;e[a++]=128,(0,n.clean)(this.buffer.subarray(a)),this.padOffset>o-a&&(this.process(r,0),a=0);for(let t=a;t<o;t++)e[t]=0;i(r,o-8,BigInt(8*this.length),s),this.process(r,0);const c=(0,n.createView)(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<u;t++)c.setUint32(4*t,d[t],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=i,t.length=n,t.pos=s,n%e&&t.buffer.set(r),t}clone(){return this._cloneInto()}}e.HashMD=o,e.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),e.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),e.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),e.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])},7265:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9042),i=Object.prototype.hasOwnProperty;const o=function(t,e,r,o,s,a){var c=1&r,l=(0,n.A)(t),u=l.length;if(u!=(0,n.A)(e).length&&!c)return!1;for(var d=u;d--;){var h=l[d];if(!(c?h in e:i.call(e,h)))return!1}var f=a.get(t),p=a.get(e);if(f&&p)return f==e&&p==t;var y=!0;a.set(t,e),a.set(e,t);for(var g=c;++d<u;){var m=t[h=l[d]],_=e[h];if(o)var b=c?o(_,m,h,e,t,a):o(m,_,h,t,e,a);if(!(void 0===b?m===_||s(m,_,r,o,a):b)){y=!1;break}g||(g="constructor"==h)}if(y&&!g){var v=t.constructor,w=e.constructor;v==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(y=!1)}return a.delete(t),a.delete(e),y}},7271:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=Object.prototype;const i=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},7311:(t,e,r)=>{"use strict";r.d(e,{O:()=>a,o:()=>l});var n=r(6568),i=r(8330),o=r(8693),s=r(1089);const a="tokenUpdated",c={maxRetries:3,initialDelay:500};class l{static instance;_appId="";_secret="";_platform;_accessToken="";_expiredTime=0;_version="";_identifier="";_webIdentifier="";_tokenGetter;_tokenPending=null;_dispatch=(0,s.A)(a);_globalDispatcher;constructor(){}static getInstance(){return l.instance||(l.instance=new l),l.instance}async setAccessByAppKey(t){this._tokenGetter=this._fetchToken.bind(this);const{appId:e,secret:r,platform:n}=t;this._appId=e,this._secret=r,this._platform=n,this._version=n?.sdkVersion||i.rE,this._identifier=n?.identifier||await this.getWebIdentifier()}setTokenGetter(t){this._tokenGetter=t}async setupTokenManager(){if(!this._tokenGetter)throw new Error("getTokenAsync() is not set!");const{maxRetries:t,initialDelay:e}=c;let r=0;for(;r<=t;)try{const t=await this._tokenGetter();if(t)return void this._updateContext(t)}catch(n){if(r++,r>t)throw this._globalDispatcher.call("unauthorized"),n;await this._retryDelay(r,e)}}getSdkVersion(){return this._version||i.rE}async getIdentifier(){return this._identifier||await this.getWebIdentifier()}async getAccessToken(){if(this._accessToken&&!this._isTokenExpired)return this._accessToken;if(this._tokenPending)return this._tokenPending;if(!this._tokenGetter)throw new Error("Token getter not configured. Call setGetTokenAsync() first.");return this._tokenPending=this._tokenGetter().then(t=>(this._updateContext(t),this._dispatch.call(a,null,t.accessToken),t.accessToken)).catch(t=>{throw this._tokenPending=null,t}).finally(()=>{this._tokenPending=null}),this._tokenPending}async getWebIdentifier(){if(!this._webIdentifier){const t=await n.Ay.load(),e=await t.get();this._webIdentifier=e.visitorId}return this._webIdentifier}on(t,e){return this._dispatch.on(t,e),{off:()=>this._dispatch.on(t,null)}}setGlobalDispatcher(t){this._globalDispatcher=t}getGlobalDispatcher(){return this._globalDispatcher}clearState(){this._appId="",this._secret="",this._platform=void 0,this._webIdentifier="",this._tokenPending=null,this._tokenGetter=void 0,this._accessToken="",this._expiredTime=0,this._version="",this._identifier=""}get _isTokenExpired(){return this._expiredTime<=Date.now()}_updateContext(t){const{accessToken:e,expiredTime:r,identifier:n,sdkVersion:i}=t;this._accessToken=e,this._expiredTime=r,void 0!==n&&(this._identifier=n),void 0!==i&&(this._version=i)}_fetchToken(){return(0,o.i)(this._appId,this._secret,this._platform)}async _retryDelay(t,e){const r=e*Math.pow(2,t-1);return console.warn(`Retrying in ${r} ms... (Attempt ${t})`),new Promise(t=>setTimeout(t,r))}}},7346:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(2851),i=r(7465),o=r(5353),s=r(3149),a=r(901);const c=function(t,e,r,c){if(!(0,s.A)(t))return t;for(var l=-1,u=(e=(0,i.A)(e,t)).length,d=u-1,h=t;null!=h&&++l<u;){var f=(0,a.A)(e[l]),p=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(l!=d){var y=h[f];void 0===(p=c?c(y,f,h):void 0)&&(p=(0,s.A)(y)?y:(0,o.A)(e[l+1])?[]:{})}(0,n.A)(h,f,p),h=h[f]}return t}},7422:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(423),i=r(7064),o=r(8446);const s=function(t){return(0,o.A)(t)?(0,n.A)(t):(0,i.A)(t)}},7465:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(2049),i=r(6586),o=r(5722),s=r(8182);const a=function(t,e){return(0,n.A)(t)?t:(0,i.A)(t,e)?[t]:(0,o.A)((0,s.A)(t))}},7500:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(6318);const i=function(t,e,r){var i=null==t?void 0:(0,n.A)(t,e);return void 0===i?r:i}},7511:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9789),i=r(5054);const o=function(t,e){return null!=t&&(0,i.A)(t,e,n.A)}},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],c=o[1],l=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,c)),u=0,d=c>0?s-4:s;for(r=0;r<d;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(l(t,a,a+s>c?c:a+s));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function l(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(c(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},7678:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.aes256cbc=e.aes256gcm=void 0;var n=r(469);e.aes256gcm=function(t,e,r){return(0,n.gcm)(t,e,r)};e.aes256cbc=function(t,e,r){return(0,n.cbc)(t,e)}},7681:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(7919),i=r(8335),o=r(5917);const s=function(t,e){var r=this.__data__;if(r instanceof n.A){var s=r.__data__;if(!i.A||s.length<199)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new o.A(s)}return r.set(t,e),this.size=r.size,this}},7757:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.aesDecrypt=e.aesEncrypt=e.symDecrypt=e.symEncrypt=void 0;var n=r(6527),i=r(8489),o=r(7678),s=r(83),a=r(4928),c=r(1666);e.symEncrypt=function(t,e,r){return l(u,t,e,r)};function l(t,e,r,n){var i=(0,a.symmetricAlgorithm)();if("aes-256-gcm"===i)return t(o.aes256gcm,e,r,(0,a.symmetricNonceLength)(),c.AEAD_TAG_LENGTH,n);if("xchacha20"===i)return t(s.xchacha20,e,r,c.XCHACHA20_NONCE_LENGTH,c.AEAD_TAG_LENGTH,n);if("aes-256-cbc"===i)return t(o.aes256cbc,e,r,16,0);throw new Error("Not implemented")}function u(t,e,r,o,s,a){var c=(0,i.randomBytes)(o),l=t(e,c,a).encrypt(r);if(0===s)return(0,n.concatBytes)(c,l);var u=l.length-s,d=l.subarray(0,u),h=l.subarray(u);return(0,n.concatBytes)(c,h,d)}function d(t,e,r,i,o,s){var a=r.subarray(0,i),c=t(e,Uint8Array.from(a),s),l=r.subarray(i);if(0===o)return c.decrypt(l);var u=l.subarray(0,o),d=l.subarray(o);return c.decrypt((0,n.concatBytes)(d,u))}e.symDecrypt=function(t,e,r){return l(d,t,e,r)},e.aesEncrypt=e.symEncrypt,e.aesDecrypt=e.symDecrypt},7808:(t,e,r)=>{"use strict";r.d(e,{Cm:()=>i,EC:()=>s,Uk:()=>o});var n=r(7311);function i(){return n.o.getInstance().getIdentifier()}function o(t){n.o.getInstance().setTokenGetter(t)}function s(){return n.o.getInstance().setupTokenManager()}},7809:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}},7880:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=/\s/;const i=function(t){for(var e=t.length;e--&&n.test(t.charAt(e)););return e}},7919:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(6838),i=r(2384),o=r(4787),s=r(8207),a=r(1031);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n.A,c.prototype.delete=i.A,c.prototype.get=o.A,c.prototype.has=s.A,c.prototype.set=a.A;const l=c},7960:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9396),i=r(7422);const o=function(t){for(var e=(0,i.A)(t),r=e.length;r--;){var o=e[r],s=t[o];e[r]=[o,s,(0,n.A)(s)]}return e}},8021:(t,e,r)=>{"use strict";r.d(e,{B:()=>i});var n=r(4543);function i(t,e=30){let r,i=null;return{promise:new Promise((o,s)=>{i=s;const a=performance.now(),c=t();c?o(c):r=setInterval(()=>{const i=t();i?(clearInterval(r),o(i)):(performance.now()-a)/1e3>e&&(s(new n.e("Timeouts or Feature is not found in the map at current zoom level.",{status:404,name:"NetworkError"})),clearInterval(r))},100)}),abort:()=>{r&&(clearInterval(r),r=void 0),i&&(i(new n.e("Query was aborted by the user.",{status:400,name:"AbortError"})),i=null)}}}},8104:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return null==t?void 0:t[e]}},8167:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(8287),i=r(6748);void 0===globalThis.Buffer&&(globalThis.Buffer=n.hp),i.VV.ellipticCurve="secp256k1",i.VV.symmetricAlgorithm="aes-256-gcm";const o=new TextEncoder;function s(t,e){return(0,i.w)(t,o.encode(e)).toString("hex")}},8182:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(52);const i=function(t){return null==t?"":(0,n.A)(t)}},8207:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(169);const i=function(t){return(0,n.A)(this.__data__,t)>-1}},8287:(t,e,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=c,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=a(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return f(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return f(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return f(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const i=function(t){if(c.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||Y(t.length)?a(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return u(t),a(t<0?0:0|p(t))}function h(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function f(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function y(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(t).length;default:if(i)return n?-1:W(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(l(t,o)===l(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(l(t,o+n)!==l(e,n)){r=!1;break}if(r)return o}return-1}function v(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(Y(n))return s;t[r+s]=n}return s}function w(t,e,r,n){return q(W(e,t.length-r),t,r,n)}function B(t,e,r,n){return q(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return q(Z(e),t,r,n)}function E(t,e,r,n){return q(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(o=c));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=x));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return d(t)},c.allocUnsafeSlow=function(t){return d(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).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}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(K(e,Uint8Array))i+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),l=this.slice(n,i),u=t.slice(e,r);for(let t=0;t<a;++t)if(l[t]!==u[t]){o=l[t],s=u[t];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":case"latin1":case"binary":return B(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function L(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function k(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function O(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=X[t[n]];return i}function C(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function T(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function F(t,e,r,n,i){D(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function R(t,e,r,n,i){D(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function M(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function H(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=J(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),c.prototype.readBigUInt64BE=J(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||T(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||T(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=J(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),c.prototype.readBigInt64BE=J(function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)}),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){P(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=J(function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=J(function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);P(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);P(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=J(function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=J(function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(t,e,r){return H(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return H(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=c.isBuffer(t)?t:c.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const V={};function j(t,e,r){V[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function N(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function D(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new V.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){$(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||z(e,t.length-(r+1))}(n,i,o)}function $(t,e){if("number"!=typeof t)throw new V.ERR_INVALID_ARG_TYPE(e,"number",t)}function z(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new V.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new V.ERR_BUFFER_OUT_OF_BOUNDS;throw new V.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),j("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=N(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=N(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);const G=/[^+/0-9A-Za-z-_]/g;function W(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Z(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},8291:(t,e,r)=>{"use strict";function n(t){return t.layers.filter(t=>!o(t.source))}function i(t){return t.layers.filter(t=>o(t.source))}function o(t){return"string"==typeof t&&t.startsWith("indoor-")}r.d(e,{Z3:()=>n,cq:()=>i,ld:()=>o})},8330:t=>{"use strict";t.exports={rE:"9.0.0-pre.1"}},8335:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(702),i=r(1917);const o=(0,n.A)(i.A,"Map")},8389:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(2559),i=r(2141),o=r(6224);const s=function(t,e){return t&&t.length?(0,n.A)(t,(0,i.A)(e,2),o.A):void 0}},8417:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(674),i=Object.prototype.hasOwnProperty;const o=function(t){var e=this.__data__;if(n.A){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},8446:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9610),i=r(5254);const o=function(t){return null!=t&&(0,i.A)(t.length)&&!(0,n.A)(t)}},8488:t=>{"use strict";t.exports=e},8489:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gcm=e.ctr=e.cbc=e.utils=void 0,e.randomBytes=o,e.getWebcryptoSubtle=s,e.managedNonce=function(t){const{nonceLength:e}=t;return(0,i.anumber)(e),(r,...n)=>({encrypt(s,...a){const c=o(e),l=t(r,c,...n).encrypt(s,...a),u=(0,i.concatBytes)(c,l);return l.fill(0),u},decrypt(i,...o){const s=i.subarray(0,e),a=i.subarray(e);return t(r,s,...n).decrypt(a,...o)}})};const n=r(5297),i=r(6527);function o(t=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return Uint8Array.from(n.crypto.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}function s(){if(n.crypto&&"object"==typeof n.crypto.subtle&&null!=n.crypto.subtle)return n.crypto.subtle;throw new Error("crypto.subtle must be defined")}e.utils={async encrypt(t,e,r,n){const i=s(),o=await i.importKey("raw",t,e,!0,["encrypt"]),a=await i.encrypt(r,o,n);return new Uint8Array(a)},async decrypt(t,e,r,n){const i=s(),o=await i.importKey("raw",t,e,!0,["decrypt"]),a=await i.decrypt(r,o,n);return new Uint8Array(a)}};const a="AES-CBC",c="AES-CTR",l="AES-GCM";function u(t){return(r,n,o)=>{(0,i.abytes)(r),(0,i.abytes)(n);const s={name:t,length:8*r.length},u=function(t,e,r){if(t===a)return{name:a,iv:e};if(t===c)return{name:c,counter:e,length:64};if(t===l)return r?{name:l,iv:e,additionalData:r}:{name:l,iv:e};throw new Error("unknown aes block mode")}(t,n,o);let d=!1;return{encrypt(t){if((0,i.abytes)(t),d)throw new Error("Cannot encrypt() twice with same key / nonce");return d=!0,e.utils.encrypt(r,s,u,t)},decrypt:t=>((0,i.abytes)(t),e.utils.decrypt(r,s,u,t))}}}e.cbc=u(a),e.ctr=u(c),e.gcm=(()=>u(l))()},8510:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.secp256k1_hasher=e.schnorr=e.secp256k1=void 0;const n=r(7076),i=r(9175),o=r(3562),s=r(1761),a=r(4967),c=r(1705),l=r(8627),u={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},d=BigInt(0),h=BigInt(1),f=BigInt(2),p=(t,e)=>(t+e/f)/e;function y(t){const e=u.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),c=BigInt(44),l=BigInt(88),d=t*t*t%e,h=d*d*t%e,p=(0,a.pow2)(h,r,e)*h%e,y=(0,a.pow2)(p,r,e)*h%e,m=(0,a.pow2)(y,f,e)*d%e,_=(0,a.pow2)(m,i,e)*m%e,b=(0,a.pow2)(_,o,e)*_%e,v=(0,a.pow2)(b,c,e)*b%e,w=(0,a.pow2)(v,l,e)*v%e,B=(0,a.pow2)(w,c,e)*b%e,A=(0,a.pow2)(B,r,e)*h%e,E=(0,a.pow2)(A,s,e)*_%e,S=(0,a.pow2)(E,n,e)*d%e,I=(0,a.pow2)(S,f,e);if(!g.eql(g.sqr(I),t))throw new Error("Cannot find square root");return I}const g=(0,a.Field)(u.p,void 0,void 0,{sqrt:y});e.secp256k1=(0,o.createCurve)({...u,Fp:g,lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=u.n,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),c=p(o*t,e),l=p(-n*t,e);let d=(0,a.mod)(t-c*r-l*i,e),f=(0,a.mod)(-c*n-l*o,e);const y=d>s,g=f>s;if(y&&(d=e-d),g&&(f=e-f),d>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:y,k1:d,k2neg:g,k2:f}}}},n.sha256);const m={};function _(t,...e){let r=m[t];if(void 0===r){const e=(0,n.sha256)(Uint8Array.from(t,t=>t.charCodeAt(0)));r=(0,l.concatBytes)(e,e),m[t]=r}return(0,n.sha256)((0,l.concatBytes)(r,...e))}const b=t=>t.toBytes(!0).slice(1),v=t=>(0,l.numberToBytesBE)(t,32),w=t=>(0,a.mod)(t,u.p),B=t=>(0,a.mod)(t,u.n),A=(()=>e.secp256k1.Point)(),E=t=>t%f===d;function S(t){let r=e.secp256k1.utils.normPrivateKeyToScalar(t),n=A.fromPrivateKey(r);return{scalar:E(n.y)?r:B(-r),bytes:b(n)}}function I(t){(0,l.aInRange)("x",t,h,u.p);const e=w(t*t);let r=y(w(e*t+BigInt(7)));E(r)||(r=w(-r));const n=A.fromAffine({x:t,y:r});return n.assertValidity(),n}const x=l.bytesToNumberBE;function L(...t){return B(x(_("BIP0340/challenge",...t)))}function k(t){return S(t).bytes}function O(t,e,r=(0,i.randomBytes)(32)){const n=(0,l.ensureBytes)("message",t),{bytes:o,scalar:s}=S(e),a=(0,l.ensureBytes)("auxRand",r,32),c=v(s^x(_("BIP0340/aux",a))),u=_("BIP0340/nonce",c,o,n),h=B(x(u));if(h===d)throw new Error("sign failed: k is zero");const{bytes:f,scalar:p}=S(h),y=L(f,o,n),g=new Uint8Array(64);if(g.set(f,0),g.set(v(B(p+y*s)),32),!C(g,n,o))throw new Error("sign: Invalid signature produced");return g}function C(t,e,r){const n=(0,l.ensureBytes)("signature",t,64),i=(0,l.ensureBytes)("message",e),o=(0,l.ensureBytes)("publicKey",r,32);try{const t=I(x(o)),e=x(n.subarray(0,32));if(!(0,l.inRange)(e,h,u.p))return!1;const r=x(n.subarray(32,64));if(!(0,l.inRange)(r,h,u.n))return!1;const s=L(v(e),b(t),i),a=A.BASE.multiplyUnsafe(r).add(t.multiplyUnsafe(B(-s))),{x:c,y:d}=a.toAffine();return!(a.is0()||!E(d)||c!==e)}catch(t){return!1}}e.schnorr={getPublicKey:k,sign:O,verify:C,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:I,pointToBytes:b,numberToBytesBE:l.numberToBytesBE,bytesToNumberBE:l.bytesToNumberBE,taggedHash:_,mod:a.mod}};const T=(()=>(0,s.isogenyMap)(g,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(t=>BigInt(t)))))(),P=(()=>(0,c.mapToCurveSimpleSWU)(g,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:g.create(BigInt("-11"))}))();e.secp256k1_hasher=(0,s.createHasher)(e.secp256k1.Point,t=>{const{x:e,y:r}=P(g.create(t[0]));return T(e,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:g.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}),e.hashToCurve=e.secp256k1_hasher.hashToCurve,e.encodeToCurve=e.secp256k1_hasher.encodeToCurve},8627:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notImplemented=e.bitMask=e.utf8ToBytes=e.randomBytes=e.isBytes=e.hexToBytes=e.concatBytes=e.bytesToUtf8=e.bytesToHex=e.anumber=e.abytes=void 0,e.abool=function(t,e){if("boolean"!=typeof e)throw new Error(t+" boolean expected, got "+e)},e.numberToHexUnpadded=a,e.hexToNumber=c,e.bytesToNumberBE=function(t){return c((0,n.bytesToHex)(t))},e.bytesToNumberLE=function(t){return(0,n.abytes)(t),c((0,n.bytesToHex)(Uint8Array.from(t).reverse()))},e.numberToBytesBE=l,e.numberToBytesLE=function(t,e){return l(t,e).reverse()},e.numberToVarBytesBE=function(t){return(0,n.hexToBytes)(a(t))},e.ensureBytes=function(t,e,r){let i;if("string"==typeof e)try{i=(0,n.hexToBytes)(e)}catch(e){throw new Error(t+" must be hex string or Uint8Array, cause: "+e)}else{if(!(0,n.isBytes)(e))throw new Error(t+" must be hex string or Uint8Array");i=Uint8Array.from(e)}const o=i.length;if("number"==typeof r&&o!==r)throw new Error(t+" of length "+r+" expected, got "+o);return i},e.equalBytes=function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r},e.inRange=d,e.aInRange=function(t,e,r,n){if(!d(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)},e.bitLen=function(t){let e;for(e=0;t>o;t>>=s,e+=1);return e},e.bitGet=function(t,e){return t>>BigInt(e)&s},e.bitSet=function(t,e,r){return t|(r?s:o)<<BigInt(e)},e.createHmacDrbg=function(t,e,r){if("number"!=typeof t||t<2)throw new Error("hashLen must be a number");if("number"!=typeof e||e<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");const i=t=>new Uint8Array(t),o=t=>Uint8Array.of(t);let s=i(t),a=i(t),c=0;const l=()=>{s.fill(1),a.fill(0),c=0},u=(...t)=>r(a,s,...t),d=(t=i(0))=>{a=u(o(0),t),s=u(),0!==t.length&&(a=u(o(1),t),s=u())},h=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let t=0;const r=[];for(;t<e;){s=u();const e=s.slice();r.push(e),t+=s.length}return(0,n.concatBytes)(...r)};return(t,e)=>{let r;for(l(),d(t);!(r=e(h()));)d();return l(),r}},e.validateObject=function(t,e,r={}){const n=(e,r,n)=>{const i=h[r];if("function"!=typeof i)throw new Error("invalid validator function");const o=t[e];if(!(n&&void 0===o||i(o,t)))throw new Error("param "+String(e)+" is invalid. Expected "+r+", got "+o)};for(const[t,r]of Object.entries(e))n(t,r,!1);for(const[t,e]of Object.entries(r))n(t,e,!0);return t},e.isHash=function(t){return"function"==typeof t&&Number.isSafeInteger(t.outputLen)},e._validateObject=function(t,e,r={}){if(!t||"object"!=typeof t)throw new Error("expected valid options object");function n(e,r,n){const i=t[e];if(n&&void 0===i)return;const o=typeof i;if(o!==r||null===i)throw new Error(`param "${e}" is invalid: expected ${r}, got ${o}`)}Object.entries(e).forEach(([t,e])=>n(t,e,!1)),Object.entries(r).forEach(([t,e])=>n(t,e,!0))},e.memoized=function(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(void 0!==i)return i;const o=t(r,...n);return e.set(r,o),o}};const n=r(9175);var i=r(9175);Object.defineProperty(e,"abytes",{enumerable:!0,get:function(){return i.abytes}}),Object.defineProperty(e,"anumber",{enumerable:!0,get:function(){return i.anumber}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(e,"bytesToUtf8",{enumerable:!0,get:function(){return i.bytesToUtf8}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return i.concatBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return i.hexToBytes}}),Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return i.isBytes}}),Object.defineProperty(e,"randomBytes",{enumerable:!0,get:function(){return i.randomBytes}}),Object.defineProperty(e,"utf8ToBytes",{enumerable:!0,get:function(){return i.utf8ToBytes}});const o=BigInt(0),s=BigInt(1);function a(t){const e=t.toString(16);return 1&e.length?"0"+e:e}function c(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);return""===t?o:BigInt("0x"+t)}function l(t,e){return(0,n.hexToBytes)(t.toString(16).padStart(2*e,"0"))}const u=t=>"bigint"==typeof t&&o<=t;function d(t,e,r){return u(t)&&u(e)&&u(r)&&e<=t&&t<r}e.bitMask=t=>(s<<BigInt(t))-s;const h={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||(0,n.isBytes)(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};e.notImplemented=()=>{throw new Error("not implemented")}},8672:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}},8693:(t,e,r)=>{"use strict";r.d(e,{i:()=>u});var n=r(2658),i=r(5461),o=r(7808),s=r(9588),a=r(8167),c=r(8330);const l=["CORE_SDK",...(0,n.d)()];async function u(t,e,r,n){if(!t||!e)throw new Error("appId and secret are required");try{const u=await(0,i.l)(),h=await async function(t,e=d){return t??async function(t){return{identifier:await(0,o.Cm)(),origin:t,keyPlatform:"WEB",sdkVersion:c.rE}}(e)}(r,n),{identifier:f,sdkVersion:p,...y}=h,g={"Content-Type":"text/plain",sdkVersion:p},m=function(t,e){return(0,a.Z)(t,JSON.stringify(e))}(u,{appId:t,secret:e,identifier:f,timestamp:Date.now(),products:l,...y}),_=await fetch(s.R0,{method:"POST",body:m,headers:g});if(!_.ok){const t=await _.json(),{code:e,message:r}=t;if(401===_.status&&7001005===e)throw(0,i.U)(),new Error(r);throw new Error(r||`HTTP error! status: ${_.status}`)}const b=await _.json(),{accessToken:v,expiresIn:w}=b;return{accessToken:v,expiredTime:Date.now()+1e3*(w-90)}}catch(t){throw t instanceof Error?new Error(`Failed to get access token: ${t.message}`,{cause:t}):new Error(`Failed to get access token: ${String(t)}`)}}const d="undefined"!=typeof window&&window.location?.hostname?window.location.hostname:"restriction.test.example.com"},8700:(t,e,r)=>{"use strict";function n(t,e=","){return"string"==typeof t&&t.trim()?t.split(e):[]}r.d(e,{S:()=>n})},8719:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(9717),i=r(2789),o=r(4841),s=o.A&&o.A.isTypedArray;const a=s?(0,i.A)(s):n.A},8776:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9313),i=1/0;const o=function(t){return t?(t=(0,n.A)(t))===i||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},8813:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(674),i=Object.prototype.hasOwnProperty;const o=function(t){var e=this.__data__;return n.A?void 0!==e[t]:i.call(e,t)}},8823:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(3149),i=r(7271),o=r(1493),s=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,n.A)(t))return(0,o.A)(t);var e=(0,i.A)(t),r=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&r.push(a);return r}},8884:(t,e,r)=>{"use strict";var n;r.d(e,{e:()=>n}),function(t){t.Access="access_control",t.Map="map"}(n||(n={}))},8900:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.xchacha20poly1305=e.chacha20poly1305=e._poly1305_aead=e.chacha12=e.chacha8=e.xchacha20=e.chacha20=e.chacha20orig=void 0,e.hchacha=a;const n=r(2506),i=r(1210),o=r(6527);function s(t,e,r,i,o,s=20){let a=t[0],c=t[1],l=t[2],u=t[3],d=e[0],h=e[1],f=e[2],p=e[3],y=e[4],g=e[5],m=e[6],_=e[7],b=o,v=r[0],w=r[1],B=r[2],A=a,E=c,S=l,I=u,x=d,L=h,k=f,O=p,C=y,T=g,P=m,F=_,R=b,M=v,H=w,U=B;for(let t=0;t<s;t+=2)A=A+x|0,R=(0,n.rotl)(R^A,16),C=C+R|0,x=(0,n.rotl)(x^C,12),A=A+x|0,R=(0,n.rotl)(R^A,8),C=C+R|0,x=(0,n.rotl)(x^C,7),E=E+L|0,M=(0,n.rotl)(M^E,16),T=T+M|0,L=(0,n.rotl)(L^T,12),E=E+L|0,M=(0,n.rotl)(M^E,8),T=T+M|0,L=(0,n.rotl)(L^T,7),S=S+k|0,H=(0,n.rotl)(H^S,16),P=P+H|0,k=(0,n.rotl)(k^P,12),S=S+k|0,H=(0,n.rotl)(H^S,8),P=P+H|0,k=(0,n.rotl)(k^P,7),I=I+O|0,U=(0,n.rotl)(U^I,16),F=F+U|0,O=(0,n.rotl)(O^F,12),I=I+O|0,U=(0,n.rotl)(U^I,8),F=F+U|0,O=(0,n.rotl)(O^F,7),A=A+L|0,U=(0,n.rotl)(U^A,16),P=P+U|0,L=(0,n.rotl)(L^P,12),A=A+L|0,U=(0,n.rotl)(U^A,8),P=P+U|0,L=(0,n.rotl)(L^P,7),E=E+k|0,R=(0,n.rotl)(R^E,16),F=F+R|0,k=(0,n.rotl)(k^F,12),E=E+k|0,R=(0,n.rotl)(R^E,8),F=F+R|0,k=(0,n.rotl)(k^F,7),S=S+O|0,M=(0,n.rotl)(M^S,16),C=C+M|0,O=(0,n.rotl)(O^C,12),S=S+O|0,M=(0,n.rotl)(M^S,8),C=C+M|0,O=(0,n.rotl)(O^C,7),I=I+x|0,H=(0,n.rotl)(H^I,16),T=T+H|0,x=(0,n.rotl)(x^T,12),I=I+x|0,H=(0,n.rotl)(H^I,8),T=T+H|0,x=(0,n.rotl)(x^T,7);let V=0;i[V++]=a+A|0,i[V++]=c+E|0,i[V++]=l+S|0,i[V++]=u+I|0,i[V++]=d+x|0,i[V++]=h+L|0,i[V++]=f+k|0,i[V++]=p+O|0,i[V++]=y+C|0,i[V++]=g+T|0,i[V++]=m+P|0,i[V++]=_+F|0,i[V++]=b+R|0,i[V++]=v+M|0,i[V++]=w+H|0,i[V++]=B+U|0}function a(t,e,r,i){let o=t[0],s=t[1],a=t[2],c=t[3],l=e[0],u=e[1],d=e[2],h=e[3],f=e[4],p=e[5],y=e[6],g=e[7],m=r[0],_=r[1],b=r[2],v=r[3];for(let t=0;t<20;t+=2)o=o+l|0,m=(0,n.rotl)(m^o,16),f=f+m|0,l=(0,n.rotl)(l^f,12),o=o+l|0,m=(0,n.rotl)(m^o,8),f=f+m|0,l=(0,n.rotl)(l^f,7),s=s+u|0,_=(0,n.rotl)(_^s,16),p=p+_|0,u=(0,n.rotl)(u^p,12),s=s+u|0,_=(0,n.rotl)(_^s,8),p=p+_|0,u=(0,n.rotl)(u^p,7),a=a+d|0,b=(0,n.rotl)(b^a,16),y=y+b|0,d=(0,n.rotl)(d^y,12),a=a+d|0,b=(0,n.rotl)(b^a,8),y=y+b|0,d=(0,n.rotl)(d^y,7),c=c+h|0,v=(0,n.rotl)(v^c,16),g=g+v|0,h=(0,n.rotl)(h^g,12),c=c+h|0,v=(0,n.rotl)(v^c,8),g=g+v|0,h=(0,n.rotl)(h^g,7),o=o+u|0,v=(0,n.rotl)(v^o,16),y=y+v|0,u=(0,n.rotl)(u^y,12),o=o+u|0,v=(0,n.rotl)(v^o,8),y=y+v|0,u=(0,n.rotl)(u^y,7),s=s+d|0,m=(0,n.rotl)(m^s,16),g=g+m|0,d=(0,n.rotl)(d^g,12),s=s+d|0,m=(0,n.rotl)(m^s,8),g=g+m|0,d=(0,n.rotl)(d^g,7),a=a+h|0,_=(0,n.rotl)(_^a,16),f=f+_|0,h=(0,n.rotl)(h^f,12),a=a+h|0,_=(0,n.rotl)(_^a,8),f=f+_|0,h=(0,n.rotl)(h^f,7),c=c+l|0,b=(0,n.rotl)(b^c,16),p=p+b|0,l=(0,n.rotl)(l^p,12),c=c+l|0,b=(0,n.rotl)(b^c,8),p=p+b|0,l=(0,n.rotl)(l^p,7);let w=0;i[w++]=o,i[w++]=s,i[w++]=a,i[w++]=c,i[w++]=m,i[w++]=_,i[w++]=b,i[w++]=v}e.chacha20orig=(0,n.createCipher)(s,{counterRight:!1,counterLength:8,allowShortKeys:!0}),e.chacha20=(0,n.createCipher)(s,{counterRight:!1,counterLength:4,allowShortKeys:!1}),e.xchacha20=(0,n.createCipher)(s,{counterRight:!1,counterLength:8,extendNonceFn:a,allowShortKeys:!1}),e.chacha8=(0,n.createCipher)(s,{counterRight:!1,counterLength:4,rounds:8}),e.chacha12=(0,n.createCipher)(s,{counterRight:!1,counterLength:4,rounds:12});const c=new Uint8Array(16),l=(t,e)=>{t.update(e);const r=e.length%16;r&&t.update(c.subarray(r))},u=new Uint8Array(32);function d(t,e,r,n,s){const a=t(e,r,u),c=i.poly1305.create(a);s&&l(c,s),l(c,n);const d=(0,o.u64Lengths)(n.length,s?s.length:0,!0);c.update(d);const h=c.digest();return(0,o.clean)(a,d),h}e._poly1305_aead=t=>(e,r,n)=>{const i=16;return{encrypt(s,a){const c=s.length;(a=(0,o.getOutput)(c+i,a,!1)).set(s);const l=a.subarray(0,-16);t(e,r,l,l,1);const u=d(t,e,r,l,n);return a.set(u,c),(0,o.clean)(u),a},decrypt(s,a){a=(0,o.getOutput)(s.length-i,a,!1);const c=s.subarray(0,-16),l=s.subarray(-16),u=d(t,e,r,c,n);if(!(0,o.equalBytes)(l,u))throw new Error("invalid tag");return a.set(s.subarray(0,-16)),t(e,r,a,a,1),(0,o.clean)(u),a}}},e.chacha20poly1305=(0,o.wrapCipher)({blockSize:64,nonceLength:12,tagLength:16},(0,e._poly1305_aead)(e.chacha20)),e.xchacha20poly1305=(0,o.wrapCipher)({blockSize:64,nonceLength:24,tagLength:16},(0,e._poly1305_aead)(e.xchacha20))},8967:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(1275),i=r(3736),o=r(4099);const s=function(t,e,r,s,a,c){var l=1&r,u=t.length,d=e.length;if(u!=d&&!(l&&d>u))return!1;var h=c.get(t),f=c.get(e);if(h&&f)return h==e&&f==t;var p=-1,y=!0,g=2&r?new n.A:void 0;for(c.set(t,e),c.set(e,t);++p<u;){var m=t[p],_=e[p];if(s)var b=l?s(_,m,p,e,t,c):s(m,_,p,t,e,c);if(void 0!==b){if(b)continue;y=!1;break}if(g){if(!(0,i.A)(e,function(t,e){if(!(0,o.A)(g,e)&&(m===t||a(m,t,r,s,c)))return g.push(e)})){y=!1;break}}else if(m!==_&&!a(m,_,r,s,c)){y=!1;break}}return c.delete(t),c.delete(e),y}},9008:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return t}},9042:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(3831),i=r(4792),o=r(7422);const s=function(t){return(0,n.A)(t,o.A,i.A)}},9065:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PublicKey=e.PrivateKey=void 0;var n=r(5295);Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return n.PrivateKey}});var i=r(2557);Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return i.PublicKey}})},9084:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(6318),i=r(7346),o=r(7465);const s=function(t,e,r){for(var s=-1,a=e.length,c={};++s<a;){var l=e[s],u=(0,n.A)(t,l);r(u,l)&&(0,i.A)(c,(0,o.A)(l,t),u)}return c}},9109:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(9857),i=r(2302),o=r(9959);const s=n.A&&1/(0,o.A)(new n.A([,-0]))[1]==1/0?function(t){return new n.A(t)}:i.A},9175:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=i,e.anumber=o,e.abytes=s,e.ahash=function(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.createHasher");o(t.outputLen),o(t.blockLen)},e.aexists=function(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")},e.aoutput=function(t,e){s(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)},e.u8=function(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},e.u32=function(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))},e.clean=function(...t){for(let e=0;e<t.length;e++)t[e].fill(0)},e.createView=function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)},e.rotr=function(t,e){return t<<32-e|t>>>e},e.rotl=function(t,e){return t<<e|t>>>32-e>>>0},e.byteSwap=a,e.byteSwap32=c,e.bytesToHex=function(t){if(s(t),l)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=u[t[r]];return e},e.hexToBytes=function(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);if(l)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=h(t.charCodeAt(i)),o=h(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+e+'" at index '+i)}n[e]=16*r+o}return n},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o<t;o++){n(o);const t=Date.now()-i;t>=0&&t<r||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=f,e.bytesToUtf8=function(t){return(new TextDecoder).decode(t)},e.toBytes=p,e.kdfInputToBytes=function(t){"string"==typeof t&&(t=f(t));return s(t),t},e.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];s(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r},e.checkOpts=function(t,e){if(void 0!==e&&"[object Object]"!=={}.toString.call(e))throw new Error("options should be object or undefined");return Object.assign(t,e)},e.createHasher=y,e.createOptHasher=g,e.createXOFer=m,e.randomBytes=function(t=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return Uint8Array.from(n.crypto.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")};const n=r(5145);function i(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function o(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function s(t,...e){if(!i(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function a(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function c(t){for(let e=0;e<t.length;e++)t[e]=a(t[e]);return t}e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],e.swap8IfBE=e.isLE?t=>t:t=>a(t),e.byteSwapIfBE=e.swap8IfBE,e.swap32IfBE=e.isLE?t=>t:c;const l=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),u=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const d={_0:48,_9:57,A:65,F:70,a:97,f:102};function h(t){return t>=d._0&&t<=d._9?t-d._0:t>=d.A&&t<=d.F?t-(d.A-10):t>=d.a&&t<=d.f?t-(d.a-10):void 0}function f(t){if("string"!=typeof t)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(t))}function p(t){return"string"==typeof t&&(t=f(t)),s(t),t}e.nextTick=async()=>{};function y(t){const e=e=>t().update(p(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function g(t){const e=(e,r)=>t(r).update(p(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e}function m(t){const e=(e,r)=>t(r).update(p(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e}e.Hash=class{},e.wrapConstructor=y,e.wrapConstructorWithOpts=g,e.wrapXOFConstructorWithOpts=m},9190:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},9205:(t,e,r)=>{"use strict";r.d(e,{N:()=>n});class n{_indoor;_isEnabled=!0;constructor(t){this._indoor=t}enable(){this._isEnabled=!0,this._indoor.setAllowBuildingSwitch(!0)}disable(){this._isEnabled=!1,this._indoor.setAllowBuildingSwitch(!1)}get isEnabled(){return this._isEnabled}}},9266:(t,e,r)=>{"use strict";r.d(e,{Cm:()=>c.Cm,EC:()=>c.EC,FI:()=>s.FI,KL:()=>i.KL,SN:()=>l.S,Sr:()=>u.S,TU:()=>s.TU,Uk:()=>c.Uk,e$:()=>i.e$,iD:()=>a.i,xv:()=>d,yf:()=>o.y});var n=r(8330),i=r(9588),o=r(4969),s=r(1965),a=r(8693),c=r(7808),l=r(2658),u=r(9489);const d=n.rE},9313:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var n=r(5488),i=r(3149),o=r(1882),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;const u=function(t){if("number"==typeof t)return t;if((0,o.A)(t))return NaN;if((0,i.A)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,i.A)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=(0,n.A)(t);var r=a.test(t);return r||c.test(t)?l(t.slice(2),r?2:8):s.test(t)?NaN:+t}},9378:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToPublicKey=e.convertPublicKeyFormat=e.getSharedPoint=e.getPublicKey=e.isValidPrivateKey=e.getValidSecret=void 0;var n=r(8489),i=r(459),o=r(8510),s=r(4928),a=r(1666),c=r(3503);e.getValidSecret=function(t){var r;do{r=(0,n.randomBytes)(a.SECRET_KEY_LENGTH)}while(!(0,e.isValidPrivateKey)(r,t));return r};e.isValidPrivateKey=function(t,e){return l(e||(0,s.ellipticCurve)(),function(e){return e.utils.isValidPrivateKey(t)},function(){return!0},function(){return!0})};e.getPublicKey=function(t,e){return l(e||(0,s.ellipticCurve)(),function(e){return e.getPublicKey(t)},function(e){return e.getPublicKey(t)},function(e){return e.getPublicKey(t)})};e.getSharedPoint=function(t,e,r,n){return l(n||(0,s.ellipticCurve)(),function(n){return n.getSharedSecret(t,e,r)},function(r){return r.getSharedSecret(t,e)},function(r){return d(r,t,e)})};e.convertPublicKeyFormat=function(t,e,r){return l(r||(0,s.ellipticCurve)(),function(r){return r.getSharedSecret(BigInt(1),t,e)},function(){return t},function(){return t})};function l(t,e,r,n){if("secp256k1"===t)return e(o.secp256k1);if("x25519"===t)return r(i.x25519);if("ed25519"===t)return n(i.ed25519);throw new Error("Not implemented")}e.hexToPublicKey=function(t,e){var r=(0,c.decodeHex)(t);return l(e||(0,s.ellipticCurve)(),function(){return u(r)},function(){return r},function(){return r})};var u=function(t){if(t.length===a.ETH_PUBLIC_KEY_SIZE){var e=new Uint8Array(1+t.length);return e.set([4]),e.set(t,1),e}return t},d=function(t,e,r){var n=t.utils.getExtendedPublicKey(e).scalar;return t.ExtendedPoint.fromHex(r).multiply(n).toRawBytes()}},9396:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(3149);const i=function(t){return t==t&&!(0,n.A)(t)}},9408:(t,e,r)=>{"use strict";var n;r.d(e,{S:()=>n}),function(t){t.CHRISTMAS="christmas",t.HALLOWEEN="halloween",t.MAPPY_BEE="mappyBee",t.MAPXUS="mapxus",t.LANDS_D="landsD",t.COMMON="common",t.MAPXUS_V2="mapxus_v2",t.MAPXUS_DEFAULT="mapxus_default"}(n||(n={}))},9489:(t,e,r)=>{"use strict";r.d(e,{S:()=>o});var n=r(1089),i=r(7311);const o=["unauthorized","initError"],s=globalThis,a=(0,n.A)(...o);i.o.getInstance().setGlobalDispatcher(a),s.MapxusMapEvents=s.MapxusMapEvents||{},s.MapxusMapEvents.on=function(t,e){return a.on(t,e),{off:()=>a.on(t,null)}}},9520:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},9573:(t,e,r)=>{"use strict";function n(t){let e=!0,r="";if(Array.isArray(t)){const n=t.filter(i);e=0===n.length,r=n.join(",")}else i(t)&&(e=!1,r=t.trim());return e?null:r}function i(t){return"string"==typeof t&&t.trim().length>0}function o(t){return Array.isArray(t)&&2===t.length&&t.every(t=>"number"==typeof t)}function s(t){return Array.isArray(t)&&2===t.length&&t.every(t=>o(t))}function a(t){return"number"==typeof t&&t>0}r.d(e,{BW:()=>i,ES:()=>o,F5:()=>a,VS:()=>n,dD:()=>s})},9588:(t,e,r)=>{"use strict";r.d(e,{KL:()=>a,R0:()=>n,e$:()=>s,hl:()=>i,kk:()=>o});const n="https://map-api.mapxus.co.jp/accounts/v1/auth/secure-token",i="https://map-api.mapxus.co.jp/bms",o="https://map-sdk.mapxus.co.jp/prod/static/resources/manifest-z6frc5.dat",s=10,a=1},9610:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9672),i=r(3149);const o=function(t){if(!(0,i.A)(t))return!1;var e=(0,n.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},9615:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const n=r(9175);class i extends n.Hash{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,n.ahash)(t);const r=(0,n.toBytes)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let t=0;t<o.length;t++)o[t]^=54;this.iHash.update(o),this.oHash=t.create();for(let t=0;t<o.length;t++)o[t]^=106;this.oHash.update(o),(0,n.clean)(o)}update(t){return(0,n.aexists)(this),this.iHash.update(t),this}digestInto(t){(0,n.aexists)(this),(0,n.abytes)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=i;e.hmac=(t,e,r)=>new i(t,e).update(r).digest(),e.hmac.create=(t,e)=>new i(t,e)},9644:(t,e,r)=>{"use strict";r.d(e,{C:()=>n});class n{_floorSelector;_isEnabled;_position;constructor(t){this._floorSelector=t,this._position=t.position,this._isEnabled=this._floorSelector.enabled}enable(){this._isEnabled=!0,this._floorSelector.setEnabled(!0)}disable(){this._isEnabled=!1,this._floorSelector.setEnabled(!1)}setPosition(t,e){this._position=t,this._floorSelector.changePosition(this._floorSelector.position,t,e)}setStyle(t){this._floorSelector.setStyle(t)}get isEnabled(){return this._isEnabled}get position(){return this._position}}},9672:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(241),i=r(451),o=r(5606),s=n.A?n.A.toStringTag:void 0;const a=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?(0,i.A)(t):(0,o.A)(t)}},9717:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(9672),i=r(5254),o=r(3098),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;const a=function(t){return(0,o.A)(t)&&(0,i.A)(t.length)&&!!s[(0,n.A)(t)]}},9789:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return null!=t&&e in Object(t)}},9846:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(5547);const i=function(t){var e=(0,n.A)(this,t).delete(t);return this.size-=e?1:0,e}},9857:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(702),i=r(1917);const o=(0,n.A)(i.A,"Set")},9875:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return this.__data__.has(t)}},9914:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},9959:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},9983:(t,e,r)=>{"use strict";r.d(e,{G:()=>n.G,Z:()=>i.Z});var n=r(4762),i=r(3442)}},n={};function i(t){var e=n[t];if(void 0!==e)return e.exports;var o=n[t]={exports:{}};return r[t].call(o.exports,o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";i.r(o),i.d(o,{ASSISTANT_LAYER_INDOOR_FLOORS:()=>h.FI,ASSISTANT_LAYER_SHARED_FLOORS:()=>h.TU,AccessControl:()=>a.k,AccessControlOrigin:()=>d.en,BuildingFilterControl:()=>c.G,BuildingSelectorHandler:()=>l.EJ,BuildingsService:()=>u.H$,DistanceSearchType:()=>d.Kp,ERRORS:()=>h.Sr,FloorSelectorHandler:()=>l.CA,FloorsControl:()=>c.Z,Indoor:()=>e.SN,Map:()=>t.T,Marker:()=>r.p,OFFSET:()=>h.e$,OrientationDistanceSearchType:()=>d._P,PAGE:()=>h.KL,Poi:()=>n.p,PoisOrderBy:()=>d.LJ,PoisService:()=>u.FR,PoisSortBy:()=>d.nH,PresetLanguage:()=>d.ys,RoutePainter:()=>s.B,RouteService:()=>u.v$,SwitchBuildingHandler:()=>l.Nj,SwitchOutdoorHandler:()=>l.B6,ThemeType:()=>d.SV,VERSION:()=>h.xv,VehicleType:()=>d.$O,VenuesService:()=>u.w1,__internal:()=>h.SN,convertBrowserLangToPresetLang:()=>h.yf,getAccessToken:()=>h.iD,getIdentifier:()=>h.Cm,setGetTokenAsync:()=>h.Uk,setupTokenManager:()=>h.EC});var t=i(5462),e=i(5629),r=i(4116),n=i(5188),s=i(6733),a=i(6242),c=i(9983),l=i(1088),u=i(4545),d=i(3574),h=i(9266)})(),o})());
|