From 3208374b883c4cc919fe134f0338e455b59a6d76 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Fri, 6 Aug 2021 15:04:49 +0200 Subject: [PATCH] Upated demo build --- docs/index.html | 2 +- docs/peripleo.config.json | 18 ++++++++++++++++++ docs/{peripleo.min.js => peripleo.js} | 6 +++--- ....js.LICENSE.txt => peripleo.js.LICENSE.txt} | 0 webpack.config.js | 5 ++++- 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 docs/peripleo.config.json rename docs/{peripleo.min.js => peripleo.js} (52%) rename docs/{peripleo.min.js.LICENSE.txt => peripleo.js.LICENSE.txt} (100%) diff --git a/docs/index.html b/docs/index.html index 29c9892..0fd1901 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -Peripleo Lite
\ No newline at end of file +Peripleo Lite
\ No newline at end of file diff --git a/docs/peripleo.config.json b/docs/peripleo.config.json new file mode 100644 index 0000000..2a834ce --- /dev/null +++ b/docs/peripleo.config.json @@ -0,0 +1,18 @@ +{ + "data": [ + { "name": "ToposText", "format": "LINKED_PLACES", "src": "data/topostext-places.lp.json" }, + { "name": "Pleiades", "format": "LINKED_PLACES", "src": "data/pleiades-places.lp.json" }, + { "name": "iDAI.gazetteer", "format": "LINKED_PLACES", "src": "data/arachne-pausanias-places.lp.json" }, + { "name": "ASCSA Agora", "format": "LINKED_PLACES", "src": "data/ascsa-monuments-places.lp.json" }, + + { "name": "Arachne Monuments", "format": "LINKED_TRACES", "src": "data/arachne-pausanias-traces.lt.json" }, + + { + "name": "Pausanias Book 1", + "format": "TEI+LINKED_TRACES", + "trace": "data/pausanias-book1.jsonld", + "tei": "data/pausanias-book1.tei.xml", + "prefix": "http://recogito.humlab.umu.se/annotation/" + } + ] +} \ No newline at end of file diff --git a/docs/peripleo.min.js b/docs/peripleo.js similarity index 52% rename from docs/peripleo.min.js rename to docs/peripleo.js index 711c8e5..d6bf6de 100644 --- a/docs/peripleo.min.js +++ b/docs/peripleo.js @@ -1,3 +1,3 @@ -/*! For license information please see peripleo.min.js.LICENSE.txt */ -(()=>{var t={594:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const i=(o={},function(t){return void 0===o[t]&&(o[t]=(e=t,r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91)),o[t];var e});var o},184:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t=[],e=0;e{"use strict";n.d(e,{Z:()=>s});var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([t.id,'html,body{padding:0;margin:0;min-height:100%;overflow:hidden;font-family:"Ubuntu",sans-serif}button{cursor:pointer}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}',"",{version:3,sources:["webpack://./src/PeripleoLite.scss"],names:[],mappings:"AAAA,UACE,SAAA,CACA,QAAA,CACA,eAAA,CACA,eAAA,CACA,+BAAA,CAGF,OACE,cAAA,CAGF,UACE,0BAAA,CACE,wBAAA,CACC,uBAAA,CACE,qBAAA,CACC,oBAAA,CACI,gBAAA",sourcesContent:["html, body {\n padding:0;\n margin:0;\n min-height:100%;\n overflow:hidden;\n font-family: 'Ubuntu', sans-serif;\n}\n\nbutton {\n cursor:pointer;\n}\n\n.noselect {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n"],sourceRoot:""}]);const s=a},881:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([t.id,".p6o-controls{font-family:Ubuntu;color:#3e3e3e}.p6o-controls .p6o-magic-button{position:absolute;left:20px;bottom:20px;background-color:#f4f4f4;padding:8px;border-radius:50%;border:1px solid rgba(0,0,0,.2);box-shadow:inset 2px 4px 18px #fff,inset -2px -3px 4px rgba(0,0,0,.15),0 0 12px rgba(0,0,0,.14);z-index:99;transition:all .3s;cursor:pointer}.p6o-controls .p6o-magic-button img{display:block;width:50px;height:50px}.p6o-controls .p6o-magic-button:hover{background-color:#fff;box-shadow:inset 2px 4px 18px #fff,inset -2px -3px 4px rgba(0,0,0,.15),0 0 12px rgba(255,255,255,.2)}.p6o-controls .p6o-stack{position:absolute;bottom:90px;left:50px}.p6o-controls .p6o-stack .p6o-stackpanel-wrapper{position:relative;margin-bottom:10px}.p6o-controls .p6o-stack .p6o-stackpanel-wrapper .p6o-stackpanel{width:300px;height:100%;box-sizing:border-box;background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.25);border-radius:3px}.p6o-controls .p6o-stack .p6o-stackpanel-wrapper .p6o-stackpanel header{padding:8px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-bottom:1px solid rgba(0,0,0,.08)}.p6o-controls .p6o-stack .p6o-stackpanel-wrapper .p6o-stackpanel header h4{font-size:14px;padding:0;margin:0;font-weight:normal}.p6o-controls .p6o-stack .p6o-stackpanel-wrapper .p6o-stackpanel header button{background:none;border:none;outline:none;font-size:17px;padding:0;margin:0;color:#3e3e3e}","",{version:3,sources:["webpack://./src/hud/HUD.scss"],names:[],mappings:"AAAA,cACE,kBAAA,CACA,aAAA,CAEA,gCACE,iBAAA,CACA,SAAA,CACA,WAAA,CACA,wBAAA,CACA,WAAA,CACA,iBAAA,CACA,+BAAA,CACA,+FAAA,CACA,UAAA,CACA,kBAAA,CACA,cAAA,CAEA,oCACE,aAAA,CACA,UAAA,CACA,WAAA,CAKJ,sCACE,qBAAA,CACA,oGAAA,CAGF,yBACE,iBAAA,CACA,WAAA,CACA,SAAA,CAEA,iDACE,iBAAA,CACA,kBAAA,CAEA,iEACE,WAAA,CACA,WAAA,CACA,qBAAA,CACA,qBAAA,CACA,kCAAA,CACA,iBAAA,CAEA,wEACE,WAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,kBAAA,CACA,uCAAA,CAEA,2EACE,cAAA,CACA,SAAA,CACA,QAAA,CACA,kBAAA,CAGF,+EACE,eAAA,CACA,WAAA,CACA,YAAA,CACA,cAAA,CACA,SAAA,CACA,QAAA,CACA,aAAA",sourcesContent:[".p6o-controls {\n font-family:Ubuntu;\n color:#3e3e3e;\n\n .p6o-magic-button {\n position:absolute;\n left:20px;\n bottom:20px;\n background-color:#f4f4f4;\n padding:8px;\n border-radius:50%;\n border:1px solid rgba(0,0,0,0.2);\n box-shadow:inset 2px 4px 18px #fff, inset -2px -3px 4px rgba(0,0,0,0.15), 0 0 12px rgba(0,0,0,0.14);\n z-index:99;\n transition:all 0.3s;\n cursor:pointer;\n\n img {\n display:block;\n width:50px;\n height:50px;\n }\n\n }\n\n .p6o-magic-button:hover {\n background-color:#fff;\n box-shadow:inset 2px 4px 18px #fff, inset -2px -3px 4px rgba(0,0,0,0.15), 0 0 12px rgba(255,255,255,0.2);\n }\n\n .p6o-stack {\n position:absolute;\n bottom:90px;\n left:50px;\n\n .p6o-stackpanel-wrapper {\n position:relative;\n margin-bottom:10px;\n\n .p6o-stackpanel {\n width:300px;\n height:100%;\n box-sizing:border-box;\n background-color:#fff;\n box-shadow:0 0 4px rgba(0,0,0,0.25);\n border-radius:3px;\n\n header {\n padding:8px;\n display:flex;\n flex-direction:row;\n justify-content:space-between;\n align-items:center;\n border-bottom:1px solid rgba(0, 0, 0, 0.08);\n\n h4 {\n font-size:14px;\n padding:0;\n margin:0;\n font-weight:normal;\n }\n\n button {\n background:none;\n border:none;\n outline:none;\n font-size:17px;\n padding:0;\n margin:0;\n color:#3e3e3e;\n }\n\n }\n }\n\n }\n\n }\n\n}\n"],sourceRoot:""}]);const s=a},603:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([t.id,".p6o-hud-menupanel{position:absolute;left:50px;bottom:50px;width:300px;height:36px;padding-left:40px;box-sizing:border-box;background-color:#fcfcfc;box-shadow:inset 4px 1px 6px #fff,inset -1px -1px 2px rgba(0,0,0,.25),0 0 6px rgba(0,0,0,.1);border-radius:4px;overflow:hidden;z-index:0}.p6o-hud-menupanel ul{margin:0;padding:0;display:flex;height:100%}.p6o-hud-menupanel li{display:inline-block;flex:1;position:relative}.p6o-hud-menupanel li button{font-family:Ubuntu;font-size:14px;color:#333;border:none;background-color:transparent;outline:none;width:100%;height:100%;cursor:pointer;border-left:1px solid #ebebeb}.p6o-hud-menupanel li button:hover{background-color:rgba(0,0,0,.02)}.p6o-hud-menupanel li:first-child button{border-left:none}","",{version:3,sources:["webpack://./src/hud/MenuPanel.scss"],names:[],mappings:"AAAA,mBACE,iBAAA,CACA,SAAA,CACA,WAAA,CACA,WAAA,CACA,WAAA,CACA,iBAAA,CACA,qBAAA,CACA,wBAAA,CACA,4FAAA,CACA,iBAAA,CACA,eAAA,CACA,SAAA,CAEA,sBACE,QAAA,CACA,SAAA,CACA,YAAA,CACA,WAAA,CAGF,sBACE,oBAAA,CACA,MAAA,CACA,iBAAA,CAEA,6BACE,kBAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,4BAAA,CACA,YAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,6BAAA,CAGF,mCACE,gCAAA,CAIJ,yCACE,gBAAA",sourcesContent:[".p6o-hud-menupanel {\n position:absolute;\n left:50px;\n bottom:50px;\n width:300px;\n height:36px;\n padding-left:40px;\n box-sizing:border-box;\n background-color:#fcfCfc;\n box-shadow:inset 4px 1px 6px #fff, inset -1px -1px 2px rgba(0,0,0,0.25), 0 0 6px rgba(0,0,0,0.1);\n border-radius:4px;\n overflow:hidden;\n z-index:0;\n\n ul{\n margin:0;\n padding:0;\n display:flex;\n height:100%;\n }\n\n li {\n display:inline-block;\n flex:1;\n position:relative;\n\n button {\n font-family:Ubuntu;\n font-size:14px;\n color:#333;\n border:none;\n background-color:transparent;\n outline:none;\n width:100%;\n height:100%;\n cursor:pointer;\n border-left:1px solid #ebebeb;\n }\n\n button:hover {\n background-color:rgba(0, 0, 0, 0.02);\n }\n }\n\n li:first-child button {\n border-left:none;\n }\n\n}"],sourceRoot:""}]);const s=a},533:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([t.id,".p6o-stackpanel.filters p{padding:20px;position:relative}.p6o-stackpanel.filters input{position:relative;font-size:14px;box-sizing:border-box;width:100%;padding:10px;outline:none;background-color:#ecf5ff;border:1px solid rgba(0,0,0,.08);border-radius:3px;font-family:Ubuntu}.p6o-stackpanel.filters .suggestion{position:absolute;top:0;left:0;display:block;padding:31px;color:rgba(0,0,0,.35);font-size:14px}","",{version:3,sources:["webpack://./src/hud/filters/FilterPanel.scss"],names:[],mappings:"AAEE,0BACE,YAAA,CACA,iBAAA,CAGF,8BACE,iBAAA,CACA,cAAA,CACA,qBAAA,CACA,UAAA,CACA,YAAA,CACA,YAAA,CACA,wBAAA,CACA,gCAAA,CACA,iBAAA,CACA,kBAAA,CAGF,oCACE,iBAAA,CACA,KAAA,CACA,MAAA,CACA,aAAA,CACA,YAAA,CACA,qBAAA,CACA,cAAA",sourcesContent:[".p6o-stackpanel.filters {\n \n p {\n padding:20px;\n position:relative;\n }\n\n input {\n position:relative;\n font-size:14px;\n box-sizing:border-box;\n width:100%;\n padding:10px;\n outline:none;\n background-color:#ecf5ff;\n border:1px solid rgba(0, 0, 0, 0.08);\n border-radius:3px;\n font-family:Ubuntu;\n }\n\n .suggestion {\n position:absolute;\n top:0;\n left:0;\n display:block;\n padding:31px;\n color:rgba(0, 0, 0, 0.35);\n font-size:14px;\n }\n\n}"],sourceRoot:""}]);const s=a},966:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([t.id,'.p6o-infopanel{position:absolute;top:10px;left:10px;width:440px;background-color:#fff;box-shadow:1px 1px 14px rgba(0,0,0,.35);border-radius:4px;overflow:hidden}.p6o-infopanel header{padding:20px 0 0 20px}.p6o-infopanel header h3{font-size:22px;margin:0;padding:0}.p6o-infopanel header.has-depictions{height:200px;background-size:cover;position:relative}.p6o-infopanel header.has-depictions h3{font-size:26px;color:#fff;position:absolute;bottom:10px;left:20px;text-shadow:0 0 4px rgba(0,0,0,.9);-webkit-text-stroke-width:.5px;-webkit-text-stroke-color:rgba(0,0,0,.7)}.p6o-infopanel main{padding:10px 20px 20px 20px}.p6o-infopanel main ul{padding:0;margin:0;list-style:none}.p6o-infopanel main ul li{display:inline-block}.p6o-infopanel main .when{padding:10px 0;margin:0}.p6o-infopanel main .names{color:rgba(0,0,0,.7)}.p6o-infopanel main .names li::after{content:",";margin-right:4px}.p6o-infopanel main .names li:last-child::after{content:""}.p6o-infopanel main .uris{padding-top:10px}.p6o-infopanel main .uris li{padding:3px 8px;border-radius:4px;margin-right:4px}.p6o-infopanel main .uris li a{font-size:14px;color:#fff;text-decoration:none}.p6o-infopanel footer{height:50px;background-color:#ecf0f1}',"",{version:3,sources:["webpack://./src/infopanel/InfoPanel.scss"],names:[],mappings:"AAAA,eACE,iBAAA,CACA,QAAA,CACA,SAAA,CACA,WAAA,CACA,qBAAA,CACA,uCAAA,CACA,iBAAA,CACA,eAAA,CAEA,sBACE,qBAAA,CAEA,yBACE,cAAA,CACA,QAAA,CACA,SAAA,CAKJ,qCACE,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,wCACE,cAAA,CACA,UAAA,CACA,iBAAA,CACA,WAAA,CACA,SAAA,CACA,kCAAA,CACA,8BAAA,CACA,wCAAA,CAIJ,oBACE,2BAAA,CAEA,uBACE,SAAA,CACA,QAAA,CACA,eAAA,CAEA,0BACE,oBAAA,CAKJ,0BACE,cAAA,CACA,QAAA,CAGF,2BACE,oBAAA,CAEA,qCACE,WAAA,CACA,gBAAA,CAGF,gDACE,UAAA,CAKJ,0BACE,gBAAA,CAEA,6BACE,eAAA,CACA,iBAAA,CACA,gBAAA,CAEA,+BACE,cAAA,CACA,UAAA,CACA,oBAAA,CASR,sBACE,WAAA,CACA,wBAAA",sourcesContent:[".p6o-infopanel {\n position:absolute;\n top:10px;\n left:10px;\n width:440px;\n background-color:#fff;\n box-shadow:1px 1px 14px rgba(0, 0, 0, 0.35);\n border-radius:4px;\n overflow:hidden;\n\n header {\n padding:20px 0 0 20px;\n \n h3 {\n font-size:22px;\n margin:0;\n padding:0;\n }\n\n }\n\n header.has-depictions {\n height:200px;\n background-size:cover;\n position:relative;\n\n h3 {\n font-size:26px;\n color:#fff;\n position:absolute;\n bottom:10px;\n left:20px;\n text-shadow:0 0 4px rgba(0, 0, 0, 0.9);\n -webkit-text-stroke-width:0.5px;\n -webkit-text-stroke-color: rgba(0, 0, 0, 0.7);\n }\n }\n\n main {\n padding:10px 20px 20px 20px;\n\n ul {\n padding:0;\n margin:0;\n list-style:none;\n\n li {\n display:inline-block;\n }\n\n }\n\n .when {\n padding:10px 0;\n margin:0;\n }\n\n .names {\n color:rgba(0, 0, 0, 0.7);\n\n li::after{\n content:',';\n margin-right:4px;\n }\n\n li:last-child::after {\n content:'';\n }\n\n }\n\n .uris {\n padding-top:10px;\n\n li {\n padding:3px 8px;\n border-radius:4px;\n margin-right:4px;\n \n a {\n font-size:14px;\n color:#fff;\n text-decoration:none;\n }\n\n }\n\n }\n\n }\n\n footer {\n height:50px;\n background-color:#ecf0f1;\n }\n\n}"],sourceRoot:""}]);const s=a},664:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([t.id,".p6o-map-container{position:relative}.p6o-map-container .p6o-map-hover{position:absolute;background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.15);padding:6px 10px;border-radius:3px;margin-left:15px;margin-top:15px;white-space:nowrap;display:flex;flex-direction:row}.p6o-map-container .p6o-map-hover *{display:block}.p6o-map-container .p6o-map-hover .gazetteers{white-space:nowrap;margin-left:5px}.p6o-map-container .p6o-map-hover .gazetteers .gazetteer{display:inline-block;text-align:center;font-size:11px;color:#fff;line-height:18px;width:18px;height:18px;border-radius:50%;background-color:red;margin:0px 2px}","",{version:3,sources:["webpack://./src/map/Map.scss"],names:[],mappings:"AAAA,mBACE,iBAAA,CAEA,kCACE,iBAAA,CACA,qBAAA,CACA,kCAAA,CACA,gBAAA,CACA,iBAAA,CACA,gBAAA,CACA,eAAA,CACA,kBAAA,CACA,YAAA,CACA,kBAAA,CAGA,oCACE,aAAA,CAGF,8CACE,kBAAA,CACA,eAAA,CAEA,yDACE,oBAAA,CACA,iBAAA,CACA,cAAA,CACA,UAAA,CACA,gBAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,oBAAA,CACA,cAAA",sourcesContent:[".p6o-map-container {\n position:relative;\n\n .p6o-map-hover {\n position:absolute;\n background-color:#fff;\n box-shadow:0 0 4px rgba(0, 0, 0, 0.15);\n padding:6px 10px;\n border-radius:3px;\n margin-left:15px;\n margin-top:15px;\n white-space:nowrap;\n display:flex;\n flex-direction:row;\n\n\n * {\n display:block;\n }\n\n .gazetteers {\n white-space:nowrap;\n margin-left:5px;\n\n .gazetteer {\n display:inline-block;\n text-align:center;\n font-size:11px;\n color:#fff;\n line-height:18px;\n width:18px;\n height:18px;\n border-radius:50%;\n background-color:red;\n margin:0px 2px;\n }\n\n }\n\n }\n\n}"],sourceRoot:""}]);const s=a},38:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([t.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const s=a},284:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([t.id,'.p6o-tei-wrapper{position:absolute;top:20px;left:20px}.p6o-tei-wrapper .p6o-tei{height:100%;box-shadow:1px 1px 18px rgba(0,0,0,.25);border-radius:3px;background-color:#fff;border:1px solid #d6d7d9;display:flex;flex-direction:column}.p6o-tei-wrapper .p6o-tei header{padding:20px;border-bottom:1px solid rgba(0,0,0,.1)}.p6o-tei-wrapper .p6o-tei header h1{font-size:18px;margin:0;padding:0}.p6o-tei-wrapper .p6o-tei .p6o-tei-text{flex:1;overflow-y:scroll;overflow-x:hidden;white-space:normal !important;line-height:170%;padding:10px 20px;position:relative;z-index:1;font-size:17px;background-color:#ecf0f1;border-bottom:1px solid rgba(0,0,0,.1)}.p6o-tei-wrapper .p6o-tei .p6o-tei-text .selected{background-color:red !important;color:#fff !important}.p6o-tei-wrapper .p6o-tei .p6o-tei-histogram{height:90px;position:relative}.p6o-tei-wrapper .p6o-tei .p6o-tei-histogram canvas{width:100%;height:100%}.p6o-tei-wrapper .react-resizable-handle{display:block;position:absolute;width:30px;height:30px;bottom:0;right:0;cursor:se-resize}tei-div[subtype=chapter]::before{content:"Chapter " attr(n)}tei-div[subtype=section]::before{content:"Section " attr(n)}tei-div[subtype]::before,tei-div[subtype]::after{font-family:Arial,Helvetica,sans-serif;font-size:14px;padding:3px 5px;background-color:#fff;border:1px solid #d6d7d9;border-radius:3px}tei-choice tei-abbr+tei-expan:before,tei-choice tei-expan+tei-abbr:before,tei-choice tei-sic+tei-corr:before,tei-choice tei-corr+tei-sic:before,tei-choice tei-orig+tei-reg:before,tei-choice tei-reg+tei-orig:before{content:" ("}tei-choice tei-abbr+tei-expan:after,tei-choice tei-expan+tei-abbr:after,tei-choice tei-sic+tei-corr:after,tei-choice tei-corr+tei-sic:after,tei-choice tei-orig+tei-reg:after,tei-choice tei-reg+tei-orig:after{content:")"}tei-ab{display:block;margin-top:1em;margin-bottom:1em}tei-accMat{display:block}tei-accMat:before{content:"accompanying materials: "}tei-acquisition{display:block;margin-top:0;margin-bottom:0}tei-acquisition:before{font-weight:bold;content:"acquisition"}tei-activity{display:block}tei-activity:before{content:"activity: "}tei-add[place=above]{vertical-align:super}tei-add[place=inline]:before{content:"«"}tei-add[place=inline]:after{content:"»"}tei-add[place=below]{vertical-align:sub}tei-additional{display:block}tei-additions{display:block}tei-additions:before{content:"Significant additions within the document: "}tei-addrLine{display:block}tei-address[data-tei-rend~=block],addresss[data-tei-rendition~="#block"]{display:block}tei-adminInfo{display:block}tei-note{display:none}tei-appInfo{display:block}tei-appInfo:before{content:"Application information: "}tei-application{display:block}tei-application:after{content:" " attr(version)}tei-argument{display:block}tei-att{font-family:Courier,monospace}tei-att:before{content:"@"}tei-titleStmt>tei-author{display:block;margin-bottom:1em}tei-publicationStmt>tei-availability{font-size:80%}tei-publicationStmt>tei-availability:before{font-weight:bold;content:"Availability: "}tei-publicationStmt>tei-availability[data-tei-status]:before{font-weight:bold;content:"Availability (" attr(status) "): "}tei-back{display:block}tei-bibl[data-tei-rend~=block],bibl[data-tei-rendition~="#block"]{display:block;padding-left:2em;text-indent:-2em}tei-biblFull{display:block}tei-binding{display:block}tei-binding:before{content:"Binding: \\a";white-space:pre-wrap}tei-binding[data-tei-contemporary]:before{content:"Binding: \\a" "Contemporary: " attr(contemporary) "\\a";white-space:pre-wrap}tei-bindingDesc{display:block}tei-bindngDesc:before{content:"Binding Description: \\a"}tei-birth{display:block}tei-birth:before{content:"Birth: "}tei-cRefPattern{display:none}tei-caption{display:block;margin-top:1em;margin-bottom:1em}tei-case[data-tei-value]:before{font-weight:bold;content:attr(value) " "}tei-castGroup{display:block;margin-top:1em;margin-bottom:1em}tei-castItem{display:list-item}tei-castList{display:block;list-style-type:none;margin-top:1em;margin-bottom:1em;margin-left:2em}tei-cb{display:block;margin-top:1em;margin-bottom:1em}tei-cb:before{content:"[column break]"}tei-cell{display:table-cell;padding:1em 1.5em 1em 1em;border:1px dotted #aaa;width:100%}tei-[data-tei-role=label]{font-weight:bold}tei-climate{display:block;margin-top:1em;margin-bottom:1em}tei-climate:before{font-weight:bold;content:"Climate: "}tei-code{font-family:Courier,monospace}tei-collation{display:block;margin-top:1em;margin-bottom:1em}tei-colophon{font-style:italic}tei-condition{display:block;margin-top:1em;margin-bottom:1em}tei-constitution{display:block;margin-top:1em;margin-bottom:1em}tei-constitution:before{font-weight:bold;content:"Constitution: "}tei-constitution[data-tei-type]{display:block;margin-top:1em;margin-bottom:1em}tei-constitution[data-tei-type]:before{font-weight:bold;content:"Constitution (" attr(type) "): "}tei-constitution[data-tei-type=frags]{display:block;margin-top:1em;margin-bottom:1em}tei-constitution[data-tei-type=frags]:before{font-weight:bold;content:"Constitution (fragments): "}tei-custEvent{display:list-item}tei-custodialHist{display:block;margin-top:1em;margin-bottom:1em}tei-date[data-tei-when]:empty:before{content:attr(when)}tei-editionStmt{display:block}tei-egXML{display:block;font-size:80%;margin-left:1em;padding-left:1em;border-left:1px solid #aaa;margin-top:.75em;margin-bottom:.75em;padding-top:.75em;padding-bottom:.75em;font-family:monospace;white-space:pre}tei-emph{font-style:italic}tei-encodingDesc{display:none}tei-epigraph{display:block;margin-top:1em;margin-bottom:1em}tei-explicit{font-style:italic}tei-fileDesc>extent{display:none}tei-figure{display:block;text-align:center;margin-left:auto;margin-right:auto}tei-gap[data-tei-reason=lost]:before{content:"["}tei-gap[data-tei-reason=lost]:after{content:attr(data-content) "]"}tei-gap[data-tei-reason=illegible]:after{content:attr(data-content)}tei-gi{font-family:Courier,monospace}tei-gi:before{content:"<"}tei-gi:after{content:">"}tei-graphic{display:none}tei-TEI tei-head{display:block;font-weight:normal}tei-body>tei-head{font-size:135%;font-weight:bold;padding-top:20px}tei-div.textpart{display:none}tei-div>tei-head{font-size:135%;font-weight:bold;padding-top:20px}tei-div>tei-div>tei-head{font-size:140%}tei-div>tei-div>tei-div>tei-head{font-size:140%}tei-div>tei-div>tei-div>tei-div>tei-head,list>tei-head{font-size:130%}tei-div>tei-div>tei-div>tei-div>tei-div>tei-head{font-size:120%}tei-div>tei-div>tei-div>tei-div>tei-div>tei-div tei-head{font-size:110%}tei-figure>tei-head{display:block;margin:1.5em auto 1.5em auto;padding:.5em 1.5em 1.5em 1.5em;border:1px solid #000;border-radius:15px;width:325px;position:relative;border:1px solid #aaa;background:#fafafa;text-indent:0;font-size:85%;-webkit-box-shadow:0px 1px 3px rgba(0,0,0,.25);-moz-box-shadow:0px 1px 3px rgba(0,0,0,.25);box-shadow:0px 1px 3px rgba(0,0,0,.25);width:85%;font-family:Georgia,Serif;font-size:13pt}tei-hi[rend=caps]{font-weight:bold}tei-hi[rend=italic]{font-style:italic}tei-ident{font-family:Courier,monospace}tei-incipit{font-style:italic}tei-item{display:list-item;margin-left:1em}tei-cell item{margin-left:1em}tei-l{display:block;width:35em}tei-l[data-lineno]:before{content:attr(data-lineno);position:absolute;left:2em}tei-lb:after{content:"\\a";white-space:pre}tei-lg{display:block;margin-top:1em;margin-bottom:1em}tei-list{display:block;margin-top:1em;margin-bottom:1em;list-style-type:none}tei-item>tei-list{margin-top:0}tei-sourceDesc tei-list{list-style-type:none}tei-sourceDesc>tei-list>tei-head{font-size:140%;font-weight:bold}tei-sourceDesc tei-list>tei-item{display:list-item}tei-text{margin-top:10px}tei-text tei-list[type=simple]{list-style-type:none}tei-text tei-list[type=bulleted]{list-style-type:disc}tei-text tei-list[type=ordered]{list-style-type:none;counter-reset:items 0}tei-text tei-list[type=ordered]>tei-item{display:list-item;margin-left:0}tei-item>tei-list[type=ordered]{margin-left:1em}tei-text tei-list[type=ordered]>item:before{counter-increment:items 1;content:counter(items, decimal) ". "}tei-text tei-list[type=gloss]{list-style-type:none}tei-list[type=gloss]>tei-label{display:block;margin-top:.25em;margin-bottom:.25em;font-weight:bold}tei-list[type=gloss]>tei-item{margin-left:2em}tei-item>tei-list[type=ordered]{margin-left:1em}tei-listApp{display:block;margin:1em;padding:1em}tei-listBibl{display:block;list-style-type:none;margin-left:.5 em;margin-top:.5em}tei-listBibl>tei-head{font-size:120%;font-weight:bold}tei-listBibl>tei-bibl{display:list-item;margin-left:.5em}tei-listWit{display:block;list-style-type:none;margin-left:.5em}tei-listWit>tei-head{font-size:120%;font-weight:bold}tei-listWit>tei-witness{display:list-item;margin-left:2em;text-indent:-1.1em}tei-witness>tei-listWit{display:inline}tei-witness>tei-listWit>tei-head{display:inline}tei-witness>tei-listWit>tei-witness{display:inline}tei-locus{display:none}tei-milestone{display:none;margin-left:auto;margin-right:auto;text-align:center}tei-musicNotation{font-weight:bold}tei-musicNotation:before{font-weight:bold;content:"Musical Notation: "}tei-node{display:none}tei-notesStmt{display:none}tei-oVar{font-style:italic}tei-origPlace{font-weight:bold}tei-origPlace:before{font-weight:bold;content:"Place of Origin: "}tei-p{display:block;margin-top:.6em;margin-bottom:1.4em;padding:0 2px}*[data-tei-rendition~="#center"] p{text-align:center}tei-availability>p:first-child{margin-top:0em}tei-performance{display:block;margin-top:1em;margin-bottom:1em}tei-person{display:block;margin-top:1em;margin-bottom:1em}tei-personGrp{display:block;margin-top:1em;margin-bottom:1em}tei-placeName{background-color:#00800036;border-bottom:1px dotted #196619;cursor:pointer}tei-postscript{display:block;margin-top:2em}tei-principal{font-weight:bold}tei-principal:before{font-weight:bold;content:"Principal: "}tei-profileDesc{display:none}tei-publicationStmt>*{display:none}tei-publicationStmt{display:block;margin-top:1em;margin-bottom:1em}tei-publicationStmt>date{display:none}tei-publicationStmt>publisher{display:none}tei-q{quotes:"“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”"}tei-q:before{content:""}tei-q:after{content:""}tei-q[data-tei-next]:after{content:"" !important}tei-q[data-tei-prev]:before{content:"" !important}tei-quote{tei-font-style:italic}tei-app tei-rdg{display:none}tei-re{display:block;margin-top:0;margin-bottom:0}tei-recordHist{display:block;margin-top:1em;margin-bottom:1em}tei-ref{color:#5f0000;text-decoration:underline}tei-remarks{font-weight:bold}tei-remarks:before{font-weight:bold;content:"remarks: "}tei-respStmt{display:block;margin-top:0;margin-bottom:0}tei-revisionDesc{display:none}tei-row{display:table-row}tei-s{text-decoration:none}tei-salute{display:block;margin-top:1em;margin-bottom:1em}tei-samplingDecl{display:block;margin-top:0;margin-bottom:0}tei-scriptNote{display:block;margin-top:1em;margin-bottom:1em}tei-seal{display:block;margin-top:0;margin-bottom:0}tei-seal:before{font-weight:bold;content:"Seal: "}tei-sealDesc{display:block;margin-top:1em;margin-bottom:1em}tei-secFol:before{font-weight:bold;content:"Second Folio: "}tei-secl>*:first-child:before{content:"\\a[";white-space:pre}tei-secl>*:last-child:after{content:"]\\a\\a";white-space:pre}tei-seg{outline:0px solid transparent}tei-sense{display:block;margin-top:0;margin-bottom:0}tei-seriesStmt{display:none}tei-setting{display:block;margin-top:0;margin-bottom:0}tei-signed{display:block;margin-top:2em}tei-soCalled{quotes:"“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”"}tei-soCalled:before{content:open-quote}tei-soCalled:after{content:close-quote}tei-soCalled[data-tei-next]:after{content:"" !important}tei-soCalled[data-tei-prev]:before{content:"" !important}tei-sound{font-style:italic}tei-source{display:block;margin-top:0;margin-bottom:0}tei-sourceDesc{display:none}tei-space:before{font-weight:bold;content:""}tei-span[data-tei-data-n]:before{content:attr(data-n)}tei-TEI tei-egXML tei-span{display:inline}tei-speaker{font-weight:bold;margin-right:0}tei-sponsor{display:block;margin-top:0;margin-bottom:0}tei-sponsor:before{font-weight:bold;content:"Sponsor:"}tei-stage{display:block;margin-top:1em;margin-bottom:1em;font-style:italic}tei-stamp{display:block;margin-top:1em;margin-bottom:1em}tei-stamp:before{font-weight:bold;content:"Stamped: "}tei-surplus>*:first-child:before{content:"\\a[";white-space:pre}tei-surplus>*:last-child:after{content:"]\\a\\a";white-space:pre}tei-TEI{display:block}tei-table{border-collapse:separate;border-spacing:2px}tei-TEI tei-table{display:block;margin-top:2em;margin-bottom:2em;font-size:12pt}tei-table>head{text-align:center}tei-teiHeader{display:block;margin:20px 0}tei-TEI>tei-text{display:block}tei-textClass{display:none}tei-textDesc{display:none}tei-TEI tei-title{display:inline;line-height:130%}tei-TEI tei-title[level=a]{quotes:"“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”"}tei-TEI tei-title[level=a]:before{content:open-quote}tei-TEI tei-title[level=a]:after{content:close-quote}tei-TEI tei-title[level=a][next]:after{content:"" !important}tei-TEI tei-title[level=a][prev]:before{content:"" !important}tei-title[level=m]{font-style:italic}tei-titleStmt>tei-title{display:block;font-weight:normal;font-weight:bold !important;font-size:150%}tei-typeDesc{display:none}tei-u:before{content:"-"}tei-view{font-style:italic}tei-wit{display:none}tei-witDetail{display:none}',"",{version:3,sources:["webpack://./src/tei/TEIView.scss"],names:[],mappings:"AAAA,iBAAA,iBACE,CAAA,QACA,CAAA,SACA,CAAA,0BAEA,WACE,CAAA,uCACA,CAAA,iBACA,CAAA,qBACA,CAAA,wBACA,CAAA,YACA,CAAA,qBACA,CAAA,iCAEA,YACE,CAAA,sCACA,CAAA,oCAEA,cACE,CAAA,QACA,CAAA,SACA,CAAA,wCAKJ,MACE,CAAA,iBACA,CAAA,iBACA,CAAA,6BACA,CAAA,gBACA,CAAA,iBACA,CAAA,iBACA,CAAA,SACA,CAAA,cACA,CAAA,wBACA,CAAA,sCACA,CAAA,kDAEA,+BACE,CAAA,qBACA,CAAA,6CAKJ,WACE,CAAA,iBACA,CAAA,oDAEA,UACE,CAAA,WACA,CAAA,yCAMN,aACE,CAAA,iBACA,CAAA,UACA,CAAA,WACA,CAAA,QACA,CAAA,OACA,CAAA,gBACA,CAAA,iCAKJ,0BACE,CAAA,iCAGF,0BACE,CAAA,iDAGF,sCACE,CAAA,cACA,CAAA,eACA,CAAA,qBACA,CAAA,wBACA,CAAA,iBACA,CAAA,sNAIF,YAME,CAAA,gNAEF,WAME,CAAA,OAGF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,WAEF,aACE,CAAA,kBAEF,kCACE,CAAA,gBAEF,aACE,CAAA,YACA,CAAA,eACA,CAAA,uBAEF,gBACE,CAAA,qBACA,CAAA,aAEF,aACE,CAAA,oBAEF,oBACE,CAAA,qBAOF,oBACE,CAAA,6BAEF,WACE,CAAA,4BAEF,WACE,CAAA,qBAEF,kBACE,CAAA,eAQF,aACE,CAAA,cAEF,aACE,CAAA,qBAEF,qDACE,CAAA,aAEF,aACE,CAAA,yEAKF,aACE,CAAA,cAEF,aACE,CAAA,SAgCF,YACE,CAAA,YAEF,aACE,CAAA,mBAEF,mCACE,CAAA,gBAEF,aACE,CAAA,sBAEF,yBACE,CAAA,aAKF,aACE,CAAA,QAEF,6BACE,CAAA,eAEF,WACE,CAAA,yBAcF,aACE,CAAA,iBACA,CAAA,qCAKF,aACE,CAAA,4CAEF,gBACE,CAAA,wBACA,CAAA,6DAEF,gBACE,CAAA,2CACA,CAAA,SAGF,aACE,CAAA,kEAKF,aACE,CAAA,gBACA,CAAA,gBACA,CAAA,aAEF,aACE,CAAA,YAiBF,aACE,CAAA,mBAEF,qBACE,CAAA,oBACA,CAAA,0CAEF,8DACE,CAAA,oBACA,CAAA,gBAEF,aACE,CAAA,sBAEF,iCACE,CAAA,UAEF,aACE,CAAA,iBAEF,iBACE,CAAA,gBAeF,YACE,CAAA,YAQF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,gCAEF,gBACE,CAAA,uBACA,CAAA,cAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,aAEF,iBACE,CAAA,aAEF,aACE,CAAA,oBACA,CAAA,cACA,CAAA,iBACA,CAAA,eACA,CAAA,OAWF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,cAEF,wBACE,CAAA,SAEF,kBACE,CAAA,yBACA,CAAA,sBACA,CAAA,UACA,CAAA,0BAGF,gBACE,CAAA,YA4CF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,mBAEF,gBACE,CAAA,mBACA,CAAA,SAKF,6BACE,CAAA,cAOF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,aAQF,iBACE,CAAA,cAKF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,iBAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,wBAEF,gBACE,CAAA,wBACA,CAAA,gCAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,uCAEF,gBACE,CAAA,yCACA,CAAA,sCAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,6CAEF,gBACE,CAAA,oCACA,CAAA,cA6BF,iBACE,CAAA,kBAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,qCAGF,kBACE,CAAA,gBAGF,aACE,CAAA,UAEF,aACE,CAAA,aACA,CAAA,eACA,CAAA,gBACA,CAAA,0BACA,CAAA,gBACA,CAAA,mBACA,CAAA,iBACA,CAAA,oBACA,CAAA,qBACA,CAAA,eACA,CAAA,SAEF,iBACE,CAAA,iBAEF,YACE,CAAA,aAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,aAEF,iBACE,CAAA,oBAEF,YACE,CAAA,WAGF,aACE,CAAA,iBACA,CAAA,gBACA,CAAA,iBACA,CAAA,qCASF,WACE,CAAA,oCAEF,8BACE,CAAA,yCAEF,0BACE,CAAA,OAuBF,6BACE,CAAA,cAEF,WACE,CAAA,aAEF,WACE,CAAA,YAoBF,YACE,CAAA,iBAmBF,aACE,CAAA,kBACA,CAAA,kBAEF,cACE,CAAA,gBACA,CAAA,gBACA,CAAA,iBAEF,YACE,CAAA,iBAEF,cACE,CAAA,gBACA,CAAA,gBACA,CAAA,yBAEF,cACE,CAAA,iCAEF,cACE,CAAA,uDAEF,cACE,CAAA,iDAEF,cACE,CAAA,yDAEF,cACE,CAAA,oBAEF,aACE,CAAA,4BACA,CAAA,8BACA,CAAA,qBACA,CAAA,kBACA,CAAA,WACA,CAAA,iBACA,CAAA,qBACA,CAAA,kBACA,CAAA,aAEA,CAAA,aACA,CAAA,8CACA,CAAA,2CACA,CAAA,sCACA,CAAA,SACA,CAAA,yBACA,CAAA,cACA,CAAA,kBAcF,gBACE,CAAA,oBAEF,iBACE,CAAA,UAwBF,6BACE,CAAA,YAoBF,iBACE,CAAA,SAiBF,iBACE,CAAA,eACA,CAAA,cAEF,eACE,CAAA,MAkBF,aACE,CAAA,UACA,CAAA,0BAEF,yBACE,CAAA,iBACA,CAAA,QACA,CAAA,aAgCF,YACE,CAAA,eACA,CAAA,OAUF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,SAQF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,oBACA,CAAA,kBAEF,YACE,CAAA,wBAEF,oBACE,CAAA,iCAEF,cACE,CAAA,gBACA,CAAA,iCAEF,iBACE,CAAA,SAIF,eACE,CAAA,+BAEF,oBACE,CAAA,iCAEF,oBACE,CAAA,gCAEF,oBACE,CAAA,qBACA,CAAA,yCAEF,iBACE,CAAA,aACA,CAAA,gCAEF,eACE,CAAA,4CAEF,yBACE,CAAA,oCACA,CAAA,8BAEF,oBACE,CAAA,+BAEF,aACE,CAAA,gBACA,CAAA,mBACA,CAAA,gBACA,CAAA,8BAEF,eACE,CAAA,gCAEF,eACE,CAAA,YAEF,aACE,CAAA,UACA,CAAA,WACA,CAAA,aAIF,aACE,CAAA,oBACA,CAAA,iBACA,CAAA,eACA,CAAA,sBAEF,cACE,CAAA,gBACA,CAAA,sBAEF,iBACE,CAAA,gBACA,CAAA,YAEF,aACE,CAAA,oBACA,CAAA,gBACA,CAAA,qBAEF,cACE,CAAA,gBACA,CAAA,wBAEF,iBACE,CAAA,eACA,CAAA,kBACA,CAAA,wBAEF,cACE,CAAA,iCAEF,cACE,CAAA,oCAEF,cACE,CAAA,UAWF,YACE,CAAA,cA0CF,YACE,CAAA,gBACA,CAAA,iBACA,CAAA,iBACA,CAAA,kBAyCF,gBACE,CAAA,yBAEF,gBACE,CAAA,4BACA,CAAA,SAeF,YACE,CAAA,cA0BF,YAEE,CAAA,SAkBF,iBACE,CAAA,cA0BF,gBACE,CAAA,qBAEF,gBACE,CAAA,2BACA,CAAA,MAMF,aACE,CAAA,eACA,CAAA,mBACA,CAAA,aACA,CAAA,mCAEF,iBACE,CAAA,+BAEF,cACE,CAAA,gBAmCF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,WAKF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,cAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,cAWF,0BACE,CAAA,gCACA,CAAA,cACA,CAAA,eAcF,aACE,CAAA,cACA,CAAA,cAQF,gBACE,CAAA,qBAEF,gBACE,CAAA,qBACA,CAAA,gBAEF,YACE,CAAA,sBAiBF,YACE,CAAA,oBAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,yBAEF,YACE,CAAA,8BAEF,YACE,CAAA,MAMF,8DACE,CAAA,aAEF,UACE,CAAA,YAEF,UACE,CAAA,2BAEF,qBACE,CAAA,4BAEF,qBACE,CAAA,UAKF,qBACA,CAAA,gBAoBA,YAEE,CAAA,OAKF,aACE,CAAA,YACA,CAAA,eACA,CAAA,eAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,QAQF,aACE,CAAA,yBACA,CAAA,YAcF,gBACE,CAAA,mBAEF,gBACE,CAAA,mBACA,CAAA,aAcF,aACE,CAAA,YACA,CAAA,eACA,CAAA,iBAMF,YACE,CAAA,QAiBF,iBACE,CAAA,MAYF,oBACE,CAAA,WAKF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,iBAEF,aACE,CAAA,YACA,CAAA,eACA,CAAA,eAQF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,SAKF,aACE,CAAA,YACA,CAAA,eACA,CAAA,gBAEF,gBACE,CAAA,gBACA,CAAA,aAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,kBAEF,gBACE,CAAA,wBACA,CAAA,8BAIF,aACE,CAAA,eACA,CAAA,4BAEF,eACE,CAAA,eACA,CAAA,QAEF,6BAEE,CAAA,UAKF,aACE,CAAA,YACA,CAAA,eACA,CAAA,eAKF,YACE,CAAA,YAKF,aACE,CAAA,YACA,CAAA,eACA,CAAA,WAoBF,aACE,CAAA,cACA,CAAA,aAGF,8DACE,CAAA,oBAEF,kBACE,CAAA,mBAEF,mBACE,CAAA,kCAEF,qBACE,CAAA,mCAEF,qBACE,CAAA,UAKF,iBACE,CAAA,WAEF,aACE,CAAA,YACA,CAAA,eACA,CAAA,eAEF,YACE,CAAA,iBAKF,gBACE,CAAA,UACA,CAAA,iCAEF,oBACE,CAAA,2BAKF,cACE,CAAA,YAKF,gBACE,CAAA,cACA,CAAA,YAcF,aACE,CAAA,YACA,CAAA,eACA,CAAA,mBAGF,gBACE,CAAA,kBACA,CAAA,UAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,iBACA,CAAA,UAEF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,iBAEF,gBACE,CAAA,mBACA,CAAA,iCAiDF,aACE,CAAA,eACA,CAAA,+BAEF,eACE,CAAA,eACA,CAAA,QAYF,aACE,CAAA,UAEF,wBACE,CAAA,kBACA,CAAA,kBAGF,aACE,CAAA,cACA,CAAA,iBACA,CAAA,cACA,CAAA,eAEF,iBACE,CAAA,cAEF,aACE,CAAA,aACA,CAAA,iBAEF,aACE,CAAA,cAEF,YACE,CAAA,aAEF,YACE,CAAA,kBAIF,cACE,CAAA,gBACA,CAAA,2BAEF,8DACE,CAAA,kCAEF,kBACE,CAAA,iCAEF,mBACE,CAAA,uCAEF,qBACE,CAAA,wCAEF,qBACE,CAAA,mBAEF,iBACE,CAAA,wBAEF,aACE,CAAA,kBACA,CAAA,2BACA,CAAA,cACA,CAAA,aAEF,YACE,CAAA,aAGF,WACE,CAAA,SAgDF,iBACE,CAAA,QAkBF,YAEE,CAAA,cAEF,YACE",sourcesContent:['.p6o-tei-wrapper {\n position:absolute;\n top:20px;\n left:20px;\n\n .p6o-tei {\n height:100%;\n box-shadow:1px 1px 18px rgba(0, 0, 0, 0.25);\n border-radius:3px;\n background-color:#fff;\n border:1px solid #d6d7d9;\n display:flex;\n flex-direction:column;\n\n header {\n padding:20px;\n border-bottom:1px solid rgba(0, 0, 0, 0.1);\n\n h1 {\n font-size:18px;\n margin:0;\n padding:0;\n }\n \n }\n\n .p6o-tei-text {\n flex:1;\n overflow-y:scroll;\n overflow-x:hidden;\n white-space:normal !important;\n line-height:170%;\n padding:10px 20px;\n position:relative;\n z-index:1;\n font-size:17px;\n background-color:#ecf0f1;\n border-bottom:1px solid rgba(0, 0, 0, 0.1);\n\n .selected {\n background-color:red !important;\n color:#fff !important;\n }\n\n }\n\n .p6o-tei-histogram {\n height:90px;\n position:relative;\n\n canvas {\n width:100%;\n height:100%;\n }\n }\n\n }\n\n .react-resizable-handle {\n display:block;\n position: absolute;\n width:30px;\n height:30px;\n bottom:0;\n right:0;\n cursor:se-resize;\n }\n\n}\n\ntei-div[subtype="chapter"]::before {\n content: "Chapter " attr(n);\n}\n\ntei-div[subtype="section"]::before {\n content: "Section " attr(n);\n}\n\ntei-div[subtype]::before, tei-div[subtype]::after {\n font-family:Arial, Helvetica, sans-serif;\n font-size:14px;\n padding:3px 5px;\n background-color:#fff;\n border:1px solid #d6d7d9;\n border-radius:3px;\n}\n\n/* Choice elements */\ntei-choice tei-abbr + tei-expan:before,\ntei-choice tei-expan + tei-abbr:before,\ntei-choice tei-sic + tei-corr:before,\ntei-choice tei-corr + tei-sic:before,\ntei-choice tei-orig + tei-reg:before,\ntei-choice tei-reg + tei-orig:before {\n content: " (";\n}\ntei-choice tei-abbr + tei-expan:after,\ntei-choice tei-expan + tei-abbr:after,\ntei-choice tei-sic + tei-corr:after,\ntei-choice tei-corr + tei-sic:after,\ntei-choice tei-orig + tei-reg:after,\ntei-choice tei-reg + tei-orig:after {\n content: ")";\n}\n/* A */\ntei-ab {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-accMat {\n display: block;\n}\ntei-accMat:before {\n content: "accompanying materials: ";\n}\ntei-acquisition {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n}\ntei-acquisition:before {\n font-weight: bold;\n content: "acquisition";\n}\ntei-activity {\n display: block;\n}\ntei-activity:before {\n content: "activity: ";\n}\ntei-actor {\n /* Empty Rule Set */\n}\n/* add */\n/* Could add other [place=] variations */\ntei-add[place=above] {\n vertical-align: super;\n}\ntei-add[place=inline]:before {\n content: "«";\n}\ntei-add[place=inline]:after {\n content: "»";\n}\ntei-add[place=below] {\n vertical-align: sub;\n}\ntei-addName {\n /* Empty Rule Set */\n}\ntei-addSpan {\n /* Empty Rule Set */\n}\ntei-additional {\n display: block;\n}\ntei-additions {\n display: block;\n}\ntei-additions:before {\n content: "Significant additions within the document: ";\n}\ntei-addrLine {\n display: block;\n}\ntei-address {\n /* Empty Rule Set */\n}\ntei-address[data-tei-rend~="block"], addresss[data-tei-rendition~="#block"] {\n display: block;\n}\ntei-adminInfo {\n display: block;\n}\ntei-affiliation {\n /* Empty Rule Set */\n}\ntei-age {\n /* Empty Rule Set */\n}\ntei-alt {\n /* Empty Rule Set */\n}\ntei-altGrp {\n /* Empty Rule Set */\n}\ntei-altIdent {\n /* Empty Rule Set */\n}\ntei-altIdentifier {\n /* Empty Rule Set */\n}\ntei-am {\n /* Empty Rule Set */\n}\ntei-analytic {\n /* Empty Rule Set */\n}\ntei-anchor {\n /* Empty Rule Set */\n}\ntei-app {\n /* Empty Rule Set */\n}\ntei-note {\n display: none;\n}\ntei-appInfo {\n display: block;\n}\ntei-appInfo:before {\n content: "Application information: ";\n}\ntei-application {\n display: block;\n}\ntei-application:after {\n content: " " attr(version);\n}\ntei-arc {\n /* Empty Rule Set */\n}\ntei-argument {\n display: block;\n}\ntei-att {\n font-family: Courier,monospace;\n}\ntei-att:before {\n content: "@";\n}\ntei-attDef {\n /* Empty Rule Set */\n}\ntei-attList {\n /* Empty Rule Set */\n}\ntei-attRef {\n /* Empty Rule Set */\n}\ntei-author {\n /* Empty Rule Set */\n}\ntei-titleStmt > tei-author {\n display: block;\n margin-bottom: 1em;\n}\ntei-authority {\n /* Empty Rule Set */\n}\ntei-publicationStmt > tei-availability {\n font-size: 80%;\n}\ntei-publicationStmt > tei-availability:before {\n font-weight: bold;\n content: "Availability: ";\n}\ntei-publicationStmt > tei-availability[data-tei-status]:before {\n font-weight: bold;\n content: "Availability (" attr(status) "): ";\n}\n/* B */\ntei-back {\n display: block;\n}\ntei-bibl {\n /* Empty Rule Set */\n}\ntei-bibl[data-tei-rend~="block"], bibl[data-tei-rendition~="#block"] {\n display: block;\n padding-left: 2em;\n text-indent: -2em;\n}\ntei-biblFull {\n display: block;\n}\ntei-biblScope {\n /* Empty Rule Set */\n}\ntei-biblStruct {\n /* Empty Rule Set */\n}\ntei-bicond {\n /* Empty Rule Set */\n}\ntei-binary {\n /* Empty Rule Set */\n}\ntei-binaryObject {\n /* Empty Rule Set */\n}\ntei-binding {\n display: block;\n}\ntei-binding:before {\n content: "Binding: \\a";\n white-space: pre-wrap;\n}\ntei-binding[data-tei-contemporary]:before {\n content: "Binding: \\A" "Contemporary: " attr(contemporary) "\\A";\n white-space: pre-wrap;\n}\ntei-bindingDesc {\n display: block;\n}\ntei-bindngDesc:before {\n content: "Binding Description: \\A";\n}\ntei-birth {\n display: block;\n}\ntei-birth:before {\n content: "Birth: ";\n}\ntei-bloc {\n /* Empty Rule Set */\n}\ntei-broadcast {\n /* Empty Rule Set */\n}\ntei-byline {\n /* Empty Rule Set */\n}\n/* c */\ntei-c {\n /* Empty Rule Set */\n}\ntei-cRefPattern {\n display: none;\n}\ntei-caesura {\n /* Empty Rule Set */\n}\ntei-camera {\n /* Empty Rule Set */\n}\ntei-caption {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-case[data-tei-value]:before {\n font-weight: bold;\n content: attr(value) " ";\n}\ntei-castGroup {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-castItem {\n display: list-item;\n}\ntei-castList {\n display: block;\n list-style-type: none;\n margin-top: 1em;\n margin-bottom: 1em;\n margin-left: 2em;\n}\ntei-catDesc {\n /* Empty Rule Set */\n}\ntei-catRef {\n /* Empty Rule Set */\n}\ntei-category {\n /* Empty Rule Set */\n}\ntei-cb {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-cb:before {\n content: "[column break]";\n}\ntei-cell {\n display: table-cell;\n padding: 1em 1.5em 1em 1em;\n border: 1px dotted #aaaaaa;\n width: 100%;\n}\n/* for cell or row with @role = label */\ntei-[data-tei-role=label] {\n font-weight: bold;\n}\ntei-certainty {\n /* Empty Rule Set */\n}\ntei-change {\n /* Empty Rule Set */\n}\ntei-channel {\n /* Empty Rule Set */\n}\ntei-charDecl {\n /* Empty Rule Set */\n}\ntei-charName {\n /* Empty Rule Set */\n}\ntei-charProp {\n /* Empty Rule Set */\n}\ntei-choice {\n /* Empty Rule Set */\n}\ntei-cit {\n /* Empty Rule Set */\n}\ntei-cl {\n /* Empty Rule Set */\n}\ntei-classCode {\n /* Empty Rule Set */\n}\ntei-classDecl {\n /* Empty Rule Set */\n}\ntei-classRef {\n /* Empty Rule Set */\n}\ntei-classSpec {\n /* Empty Rule Set */\n}\ntei-classes {\n /* Empty Rule Set */\n}\ntei-climate {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-climate:before {\n font-weight: bold;\n content: "Climate: ";\n}\ntei-closer {\n /* Empty Rule Set */\n}\ntei-code {\n font-family: Courier,monospace;\n}\n/* jawalsh:\nFor things like collation, condition, etc. that can have text or paragraphs as\nchildren, we should use margins, when the content is text, and no margins when there\nare child paragraphs (or other block elements). Otherwise we end up with double\nmargins. */\ntei-collation {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-collection {\n /* Empty Rule Set */\n}\ntei-colloc {\n /* Empty Rule Set */\n}\ntei-colophon {\n font-style: italic;\n}\ntei-cond {\n /* Empty Rule Set */\n}\ntei-condition {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-constitution {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-constitution:before {\n font-weight: bold;\n content: "Constitution: ";\n}\ntei-constitution[data-tei-type] {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-constitution[data-tei-type]:before {\n font-weight: bold;\n content: "Constitution (" attr(type) "): ";\n}\ntei-constitution[data-tei-type=frags] {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-constitution[data-tei-type=frags]:before {\n font-weight: bold;\n content: "Constitution (fragments): ";\n}\ntei-constraint {\n /* Empty Rule Set */\n}\ntei-constraintSpec {\n /* Empty Rule Set */\n}\ntei-content {\n /* Empty Rule Set */\n}\n/* jawalsh:\ntei-Need to discuss and coordinate handling of sic/corr, abbr/expan, and orig/reg */\ntei-corr {\n /* Empty Rule Set */\n}\ntei-correction {\n /* Empty Rule Set */\n}\ntei-country {\n /* Empty Rule Set */\n}\ntei-creation {\n /* Empty Rule Set */\n}\n/*jawalsh:\ntei-Need to handle attributes for custEvent. All the att.datable* attributes will be tricky.\ntei-custodialHist and custEvent may normally be hidden along with other header metadata, but\ntei-we\'ll have other datable elements that may be tricky. */\ntei-custEvent {\n display: list-item;\n}\ntei-custodialHist {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\n/* d */\ntei-date[data-tei-when]:empty:before {\n content: attr(when);\n}\n/* e */\ntei-editionStmt {\n display:block;\n}\ntei-egXML {\n display: block;\n font-size: 80%;\n margin-left: 1em;\n padding-left: 1em;\n border-left: 1px solid #aaaaaa;\n margin-top: .75em;\n margin-bottom: .75em;\n padding-top: .75em;\n padding-bottom: .75em;\n font-family: monospace;\n white-space: pre;\n}\ntei-emph {\n font-style: italic;\n}\ntei-encodingDesc {\n display: none;\n}\ntei-epigraph {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-explicit {\n font-style: italic;\n}\ntei-fileDesc > extent {\n display: none;\n}\n/* f */\ntei-figure {\n display: block;\n text-align: center;\n margin-left: auto;\n margin-right: auto;\n}\n/* g */\ntei-g {\n /* Empty Rule Set */\n}\ntei-gap {\n /* GLS: Depending upon how we handle gap and lacuna, we may want to enclose in [] */\n}\ntei-gap[data-tei-reason=\'lost\']:before {\n content:\'[\';\n}\ntei-gap[data-tei-reason=\'lost\']:after {\n content: attr(data-content) \']\';\n}\ntei-gap[data-tei-reason=\'illegible\']:after {\n content: attr(data-content);\n}\ntei-gb {\n /* Empty Rule Set */\n}\ntei-gen {\n /* Empty Rule Set */\n}\ntei-genName {\n /* Empty Rule Set */\n}\ntei-geo {\n /* Empty Rule Set */\n}\ntei-geoDecl {\n /* Empty Rule Set */\n}\ntei-geogFeat {\n /* Empty Rule Set */\n}\ntei-geogName {\n /* Empty Rule Set */\n}\ntei-gi {\n font-family: Courier,monospace;\n}\ntei-gi:before {\n content: "<";\n}\ntei-gi:after {\n content: ">";\n}\ntei-gloss {\n /* Empty Rule Set */\n}\ntei-glyph {\n /* Empty Rule Set */\n}\ntei-glyphName {\n /* Empty Rule Set */\n}\ntei-gram {\n /* Empty Rule Set */\n}\ntei-gramGrp {\n /* Empty Rule Set */\n}\ntei-graph {\n /* Empty for now */\n}\ntei-graphic {\n display:none;\n}\ntei-group {\n /* Empty Rule Set */\n}\n/* h */\ntei-handDesc {\n /* Empty Rule Set */\n}\ntei-handNote {\n /* Empty Rule Set */\n}\ntei-handNotes {\n /* Empty Rule Set */\n}\ntei-handShift {\n /* Empty Rule Set */\n}\n/* Need head with TEI parent to distinguish from HTML head */\ntei-TEI tei-head {\n display: block;\n font-weight: normal;\n}\ntei-body > tei-head {\n font-size: 135%;\n font-weight:bold;\n padding-top:20px;\n}\ntei-div.textpart {\n display: none;\n}\ntei-div > tei-head {\n font-size: 135%;\n font-weight:bold;\n padding-top:20px;\n}\ntei-div > tei-div > tei-head {\n font-size: 140%;\n}\ntei-div > tei-div > tei-div > tei-head {\n font-size: 140%;\n}\ntei-div > tei-div > tei-div > tei-div > tei-head, list > tei-head {\n font-size: 130%;\n}\ntei-div > tei-div > tei-div > tei-div > tei-div > tei-head {\n font-size: 120%;\n}\ntei-div > tei-div > tei-div > tei-div > tei-div > tei-div tei-head {\n font-size: 110%;\n}\ntei-figure > tei-head {\n display: block;\n margin: 1.5em auto 1.5em auto;\n padding: .5em 1.5em 1.5em 1.5em;\n border: 1px solid black;\n border-radius: 15px;\n width: 325px;\n position: relative;\n border: 1px solid #aaaaaa;\n background: #fafafa;\n /* reset text-indent for note with ancestors. */\n text-indent: 0;\n font-size: 85%;\n -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);\n -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);\n width: 85%;\n font-family: Georgia, Serif;\n font-size: 13pt;\n}\ntei-headItem {\n /* Empty Rule Set */\n}\ntei-headLabel {\n /* Empty Rule Set */\n}\ntei-height {\n /* Empty Rule Set */\n}\ntei-heraldry {\n /* Empty Rule Set */\n}\ntei-hi[rend="caps"] {\n font-weight:bold;\n}\ntei-hi[rend="italic"] {\n font-style: italic;\n}\ntei-hi {\n /* GLS: do we want to bold this or change the background color? */\n}\ntei-history {\n /* Empty Rule Set */\n}\ntei-hom {\n /* Empty Rule Set */\n}\ntei-hyph {\n /* Empty Rule Set */\n}\ntei-hyphenation {\n /* Empty Rule Set */\n}\n/* i */\ntei-iNode {\n /* Empty Rule Set */\n}\ntei-iType {\n /* Empty Rule Set */\n}\ntei-ident {\n font-family: Courier,monospace;\n}\ntei-idno {\n /* Empty Rule Set */\n}\ntei-if {\n /* Empty Rule Set */\n}\ntei-iff {\n /* Empty Rule Set */\n}\ntei-imprimatur {\n /* Empty Rule Set */\n}\ntei-imprint {\n /* Empty Rule Set */\n}\ntei-incident {\n /* Empty Rule Set */\n}\ntei-incipit {\n font-style: italic;\n}\ntei-index {\n /* Empty Rule Set */\n}\ntei-institution {\n /* Empty Rule Set */\n}\ntei-interaction {\n /* Empty Rule Set */\n}\ntei-interpGrp {\n /* Empty Rule Set */\n}\ntei-interpretation {\n /* Empty Rule Set */\n}\ntei-item {\n display: list-item;\n margin-left: 1em;\n}\ntei-cell item {\n margin-left: 1em;\n}\n\n/* j */\ntei-join {\n /* Empty Rule Set */\n}\ntei-joinGrp {\n /* Empty Rule Set */\n}\n/* k */\ntei-keywords {\n /* Empty Rule Set */\n}\ntei-kinesic {\n /* Empty Rule Set */\n}\n/* l */\ntei-l {\n display: block;\n width: 35em;\n}\ntei-l[data-lineno]:before {\n content: attr(data-lineno);\n position: absolute;\n left: 2em;\n}\ntei-lacunaEnd {\n /* Empty Rule Set */\n}\ntei-lacunaStart {\n /* Empty Rule Set */\n}\ntei-lang {\n /* Empty Rule Set */\n}\ntei-langKnowledge {\n /* Empty Rule Set */\n}\ntei-langKnown {\n /* Empty Rule Set */\n}\ntei-langUsage {\n /* Empty Rule Set */\n}\ntei-language {\n /* Empty Rule Set */\n}\ntei-layout {\n /* Empty Rule Set */\n}\ntei-layoutDesc {\n /* Empty Rule Set */\n}\ntei-lb {\n /* Empty Rule Set */\n}\ntei-lb:after {\n content: \'\\a\';\n white-space: pre;\n}\ntei-lbl {\n /* Empty Rule Set */\n}\ntei-leaf {\n /* Empty Rule Set */\n}\ntei-app[data-tei-type=inline] tei-lem {\n}\ntei-lg {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-link {\n /* Empty Rule Set */\n}\ntei-linkGrp {\n /* Empty Rule Set */\n}\ntei-list {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n list-style-type: none;\n}\ntei-item > tei-list {\n margin-top: 0;\n}\ntei-sourceDesc tei-list {\n list-style-type: none;\n}\ntei-sourceDesc > tei-list > tei-head {\n font-size: 140%;\n font-weight: bold;\n}\ntei-sourceDesc tei-list > tei-item {\n display: list-item;\n}\n\n/* Match only lists that are descendants of tei-text. Otherwise they show up in the header. */\ntei-text {\n margin-top:10px;\n}\ntei-text tei-list[type=simple] {\n list-style-type: none;\n}\ntei-text tei-list[type=bulleted] {\n list-style-type: disc;\n}\ntei-text tei-list[type=ordered] {\n list-style-type: none;\n counter-reset: items 0;\n}\ntei-text tei-list[type=ordered] > tei-item {\n display: list-item;\n margin-left: 0;\n}\ntei-item > tei-list[type=ordered] {\n margin-left: 1em;\n}\ntei-text tei-list[type=ordered] > item:before {\n counter-increment: items 1;\n content: counter(items, decimal) ". ";\n}\ntei-text tei-list[type=gloss] {\n list-style-type: none;\n}\ntei-list[type="gloss"] > tei-label {\n display: block;\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n font-weight: bold;\n}\ntei-list[type="gloss"] > tei-item {\n margin-left: 2em;\n}\ntei-item > tei-list[type=ordered] {\n margin-left: 1em;\n}\ntei-listApp {\n display: block;\n margin: 1em;\n padding: 1em;\n}\n\n/* sourceDesc lists */\ntei-listBibl {\n display:block;\n list-style-type: none;\n margin-left: .5 em;\n margin-top: .5em;\n}\ntei-listBibl > tei-head {\n font-size: 120%;\n font-weight: bold;\n}\ntei-listBibl > tei-bibl {\n display: list-item;\n margin-left: .5em;\n}\ntei-listWit {\n display:block;\n list-style-type: none;\n margin-left: .5em;\n}\ntei-listWit > tei-head {\n font-size: 120%;\n font-weight: bold;\n}\ntei-listWit > tei-witness {\n display: list-item;\n margin-left: 2em;\n text-indent: -1.1em;\n}\ntei-witness > tei-listWit {\n display: inline;\n}\ntei-witness > tei-listWit > tei-head {\n display: inline;\n}\ntei-witness > tei-listWit > tei-witness {\n display: inline;\n}\ntei-localName {\n /* Empty Rule Set */\n}\ntei-locale {\n /* Empty Rule Set */\n}\ntei-location {\n /* Empty Rule Set */\n}\ntei-locus {\n display: none;\n}\ntei-locusGrp {\n /* Empty Rule Set */\n}\n/* m */\ntei-m {\n /* Empty Rule Set */\n}\ntei-macroRef {\n /* Empty Rule Set NOT SURE WHAT EXACTLY*/\n}\ntei-macroSpec {\n /* dunno */\n}\ntei-mapping {\n /* not sure, maybe create rends for a few standard types, maybe hide */\n}\ntei-material {\n /* Empty Rule Set */\n}\ntei-measure {\n /* Empty Rule Set */\n}\ntei-measureGrp {\n /* probably want to display attributes, at least units and type */\n}\ntei-meeting {\n /*Block */\n}\ntei-memberOf {\n /* Empty Rule Set */\n}\ntei-mentioned {\n /* think do nothing, not real clear on function, maybe hide? */\n}\ntei-metDecl {\n /* Empty Rule Set */\n}\ntei-metSym {\n /* Empty Rule Set */\n}\ntei-milestone {\n display: none;\n margin-left: auto;\n margin-right: auto;\n text-align: center;\n}\ntei-milestone:before {\n /*content: "* * * * *";*/\n}\ntei-moduleRef {\n /* probably hide, not sure how we want to deal */\n}\ntei-moduleSpec {\n /* probably hide, not sure how we want to deal */\n}\ntei-monogr {\n /* block with space above, below */\n}\ntei-mood {\n /* Empty Rule Set */\n}\ntei-move {\n /* not sure, block, maybe just ital, maybe in parenths*/\n}\ntei-msContents {\n /* inline */\n}\ntei-msDesc {\n /* block with space above, below */\n}\ntei-msIdentifier {\n /* block */\n}\ntei-msItem {\n /* block */\n}\ntei-msItemStruct {\n /* block */\n}\ntei-msName {\n /* Empty Rule Set */\n}\ntei-msPart {\n /* not sure, think block */\n}\ntei-musicNotation {\n font-weight: bold;\n}\ntei-musicNotation:before {\n font-weight: bold;\n content: "Musical Notation: ";\n}\n/* n */\ntei-name {\n /* Empty Rule Set */\n}\ntei-nameLink {\n /* Empty Rule Set */\n}\ntei-namespace {\n /* not sure, hide? */\n}\ntei-nationality {\n /* Empty Rule Set */\n}\ntei-node {\n display: none;\n}\ntei-normalization {\n /* Empty Rule Set */\n}\ntei-note {\n /*\n display: block;\n margin: 1.5em auto 1.5em auto;\n padding: .5em 1.5em 1.5em 1.5em;\n border: 1px solid black;\n border-radius: 15px;\n width: 325px;\n position: relative;\n border: 1px solid #aaaaaa;\n background: #fafafa;\n /* reset text-indent for note with ancestors. */\n /*\n text-indent: 0;\n font-size: 85%;\n text-align: justify;\n -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);\n -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);\n */\n}\ntei-notesStmt {\n /* do we want to box each individual if they\'re in a ? */\n display: none;\n}\ntei-num {\n /* Empty Rule Set */\n}\ntei-number {\n /* Empty Rule Set */\n}\ntei-numeric {\n /* not sure, depends how we\'re dealing with \'s */\n}\ntei-nym {\n /* not really sure here */\n}\n/* o */\ntei-oRef {\n /* not sure, think do nothing */\n}\ntei-oVar {\n font-style: italic;\n}\ntei-objectDesc {\n /* Empty Rule Set */\n}\ntei-objectType {\n /* Empty Rule Set */\n}\ntei-occupation {\n /* Empty Rule Set */\n}\ntei-offset {\n /* Empty Rule Set */\n}\ntei-opener {\n /* Empty Rule Set */\n}\ntei-org {\n /* Empty Rule Set */\n}\ntei-orgName {\n /* Empty Rule Set */\n}\ntei-origDate {\n /* Empty Rule Set */\n}\ntei-origPlace {\n font-weight: bold;\n}\ntei-origPlace:before {\n font-weight: bold;\n content: "Place of Origin: ";\n}\ntei-origin {\n /* Empty Rule Set */\n}\n/* p */\ntei-p {\n display: block;\n margin-top: 0.6em;\n margin-bottom: 1.4em;\n padding:0 2px;\n}\n*[data-tei-rendition~="#center"] p {\n text-align: center;\n}\ntei-availability > p:first-child {\n margin-top: 0em;\n}\ntei-pRef {\n /* rend attribute target */\n}\ntei-pVar {\n /* rend attribute target */\n}\ntei-particDesc {\n /* Empty Rule Set */\n}\ntei-pause {\n /* Empty Rule Set*/\n}\ntei-pb {\n /*\n display: block;\n width: 100%;\n text-align: right;\n color: gray;\n margin: 2em 0 2em 0;\n font-size: 11pt;\n */\n}\n/*\ntei-pb:before {\ntei-\tcontent: "[page:\\a0" attr(n) "]";\n}\ntei-*/\ntei-pc {\n /* Empty Rule Set */\n}\ntei-per {\n /* don\'t know, check back */\n}\ntei-performance {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-persName {\n /* Empty Rule Set */\n}\ntei-person {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-personGrp {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-phr {\n /* Empty Rule Set */\n}\ntei-physDesc {\n /* Empty Rule Set */\n}\ntei-place {\n /* Empty Rule Set */\n}\ntei-placeName {\n background-color:#00800036;\n border-bottom:1px dotted #196619;\n cursor:pointer;\n}\ntei-population {\n /* dunno with this one */\n}\ntei-pos {\n /* Empty Rule Set */\n}\ntei-postBox {\n /* Empty Rule Set */\n}\ntei-postCode {\n /* Empty Rule Set */\n}\ntei-postscript {\n display: block;\n margin-top: 2em;\n}\ntei-precision {\n /* Empty Rule Set */\n}\ntei-preparedness {\n /* Empty Rule Set */\n}\ntei-principal {\n font-weight: bold;\n}\ntei-principal:before {\n font-weight: bold;\n content: "Principal: ";\n}\ntei-profileDesc {\n display: none;\n}\ntei-projectDesc {\n /* Empty Rule Set */\n}\ntei-prologue {\n /* Empty Rule Set */\n}\ntei-pron {\n /* Empty Rule Set */\n}\ntei-provenance {\n /* inline */\n}\ntei-pubPlace {\n /* Empty Rule Set */\n}\ntei-publicationStmt > * {\n display: none;\n}\ntei-publicationStmt {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-publicationStmt > date {\n display: none;\n}\ntei-publicationStmt > publisher {\n display: none;\n}\ntei-purpose {\n /* Empty Rule Set */\n}\n/* q */\ntei-q {\n quotes: "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d";\n}\ntei-q:before {\n content: "";\n}\ntei-q:after {\n content: "";\n}\ntei-q[data-tei-next]:after {\n content: "" !important;\n}\ntei-q[data-tei-prev]:before {\n content: "" !important;\n}\ntei-quotation {\n /* Empty Rule Set */\n}\ntei-quote {\ntei-font-style:italic;\n}\n/*\ntei-quote {\n quotes: "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d";\n}\ntei-quote:before {\n content: open-quote;\n}\ntei-quote:after {\n content: close-quote;\n}\ntei-quote[next]:after {\n content: "" !important;\n}\ntei-quote[prev]:before {\n content: "" !important;\n}\ntei-*/\n/* r */\ntei-app tei-rdg {\n /*perhaps choice */\n display:none;\n}\ntei-rdgGrp {\n /* Empty Rule Set */\n}\ntei-re {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n}\ntei-recordHist {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-recording {\n /* not sure here, only in header? */\n}\ntei-recordingStmt {\n /* Empty Rule Set */\n}\ntei-ref {\n color: #5f0000;\n text-decoration: underline;\n}\ntei-region {\n /* Empty Rule Set */\n}\ntei-relatedItem {\n /* Empty Rule Set */\n}\ntei-relation {\n /* Don\'t Know*/\n}\ntei-relationGrp {\n /* Empty Rule Set */\n}\ntei-remarks {\n font-weight: bold;\n}\ntei-remarks:before {\n font-weight: bold;\n content: "remarks: ";\n}\ntei-rendition {\n /*Don\'t remember what we decided to do with this*/\n}\ntei-repository {\n /* Empty Rule Set */\n}\ntei-residence {\n /* Empty Rule Set */\n}\ntei-resp {\n /* Empty Rule Set */\n}\ntei-respStmt {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n}\n/* hide */\ntei-restore {\n /* footnote or sidenote perhaps*/\n}\ntei-revisionDesc {\n display: none;\n}\ntei-rhyme {\n /* Empty Rule Set */\n}\ntei-role {\n /* put on same line as roledesc? */\n}\ntei-roleDesc {\n /* put on same line as role */\n}\ntei-roleName {\n /* Empty Rule Set */\n}\ntei-root {\n /* don\'t know */\n}\ntei-row {\n display: table-row;\n}\ntei-rs {\n /* Empty Rule Set */\n}\n/*label*/\n/* s */\n/* When TEI document is embedded in HTML page,\n TEI\'s element can be interpreted by\n browser as HTML , which results in\n a strike-through from the "user agent"\n styles. */\ntei-s {\n text-decoration: none;\n}\ntei-said {\n /* Empty Rule Set */\n}\ntei-salute {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-samplingDecl {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n}\ntei-schemaSpec {\n /*NOT SURE, talk over with group */\n}\ntei-scriptDesc {\n /*NOT SURE, talk over with group */\n}\ntei-scriptNote {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-scriptStmt {\n /* not sure */\n}\ntei-seal {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n}\ntei-seal:before {\n font-weight: bold;\n content: "Seal: ";\n}\ntei-sealDesc {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-secFol:before {\n font-weight: bold;\n content: "Second Folio: ";\n}\ntei-secl {\n}\ntei-secl>*:first-child:before {\n content: "\\a[";\n white-space: pre;\n}\ntei-secl>*:last-child:after {\n content: "]\\a\\a";\n white-space: pre;\n}\ntei-seg {\n /* Empty Set Rule */\n outline: 0px solid transparent;\n}\ntei-segmentation {\n /* Empty Rule Set */\n}\ntei-sense {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n}\ntei-series {\n /* treat same as seriesstmt? */\n}\ntei-seriesStmt {\n display: none;\n}\ntei-set {\n /* Empty Set Rule */\n}\ntei-setting {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n}\ntei-settingDesc {\n /* Empty Set Rule */\n}\ntei-settlement {\n /* Empty Set Rule */\n}\ntei-sex {\n /* Empty Rule Set */\n}\ntei-shift {\n /* seems a bit to complex to do anything with */\n}\ntei-sic {\n /* rend as choice when contained within a choice tag, perhaps as label with parenthesis after when alone */\n}\ntei-signatures {\n /* DON\'t KNOW, look again later */\n}\ntei-signed {\n display: block;\n margin-top: 2em;\n /*should make name a block when contained within */\n}\ntei-soCalled {\n quotes: "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d";\n}\ntei-soCalled:before {\n content: open-quote;\n}\ntei-soCalled:after {\n content: close-quote;\n}\ntei-soCalled[data-tei-next]:after {\n content: "" !important;\n}\ntei-soCalled[data-tei-prev]:before {\n content: "" !important;\n}\ntei-socecStatus {\n /* Empty Set Rule */\n}\ntei-sound {\n font-style: italic;\n}\ntei-source {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n}\ntei-sourceDesc {\n display: none;\n}\ntei-sp {\n /*empty rule set*/\n}\ntei-space:before {\n font-weight: bold;\n content: "";\n}\ntei-span[data-tei-data-n]:before {\n content: attr(data-n);\n}\ntei-TEI tei-span {\n /*no rules yet */\n}\ntei-TEI tei-egXML tei-span {\n display: inline;\n}\ntei-spanGrp {\n /* NOT SURE, look back on */\n}\ntei-speaker {\n font-weight: bold;\n margin-right: 0;\n}\ntei-specDesc {\n /* NOT SURE, look back on */\n}\ntei-specGrp {\n /* NOT SURE, look back on */\n}\ntei-specGrpRef {\n /* NOT SURE, look back on */\n}\ntei-specList {\n /* Empty Set Rule */\n}\ntei-sponsor {\n display: block;\n margin-top: 0;\n margin-bottom: 0;\n /* Block element, maybe labeled */\n}\ntei-sponsor:before {\n font-weight: bold;\n content: "Sponsor:";\n}\ntei-stage {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n font-style: italic;\n}\ntei-stamp {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n}\ntei-stamp:before {\n font-weight: bold;\n content: "Stamped: ";\n}\ntei-state {\n /* Empty Set Rule */\n}\ntei-stdVals {\n /* Empty Set Rule */\n}\ntei-street {\n /* Empty Set Rule */\n}\ntei-stress {\n /* Empty Set Rule */\n}\ntei-string {\n /* Empty Set Rule */\n}\ntei-stringVal {\n /* doesn\'t seem to be part of tei 5 */\n}\ntei-subc {\n /* Empty Set Rule */\n}\ntei-subst {\n /* Empty Set Rule */\n}\ntei-summary {\n /* Empty Set Rule */\n}\ntei-superEntry {\n /* Block with space above and below, maybe have no block and space for when contained by this element */\n}\ntei-supplied {\n /* not sure on this one, seems like we should indicate somehow. Is there a standard way to do this? */\n}\ntei-support {\n /* Empty Set Rule */\n}\ntei-supportDesc {\n /* do nothing with or maybe block */\n}\ntei-surface {\n /* choice */\n}\ntei-surname {\n /* Empty Set Rule */\n}\ntei-surplus {\n}\ntei-surplus>*:first-child:before {\n content: "\\a[";\n white-space: pre;\n}\ntei-surplus>*:last-child:after {\n content: "]\\a\\a";\n white-space: pre;\n}\ntei-surrogates {\n /*Empty Rule Set */\n}\ntei-syll {\n /* Empty Set Rule */\n}\ntei-symbol {\n /* Empty Set Rule */\n}\n/* t */\ntei-TEI {\n display: block;\n}\ntei-table {\n border-collapse: separate;\n border-spacing: 2px;\n}\n/* Why is this selector "TEI table" instead of just "table"? */\ntei-TEI tei-table {\n display: block;\n margin-top: 2em;\n margin-bottom: 2em;\n font-size: 12pt;\n}\ntei-table > head {\n text-align: center;\n}\ntei-teiHeader {\n display: block;\n margin:20px 0;\n}\ntei-TEI > tei-text {\n display: block;\n}\ntei-textClass {\n display: none;\n}\ntei-textDesc {\n display: none;\n}\n/* title */\n/* Need TEI ancestor to distinguish TEI title from HTML title */\ntei-TEI tei-title {\n display: inline;\n line-height: 130%;\n}\ntei-TEI tei-title[level=a] {\n quotes: "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d" "\\2018" "\\2019" "\\201c" "\\201d";\n}\ntei-TEI tei-title[level=a]:before {\n content: open-quote;\n}\ntei-TEI tei-title[level=a]:after {\n content: close-quote;\n}\ntei-TEI tei-title[level=a][next]:after {\n content: "" !important;\n}\ntei-TEI tei-title[level=a][prev]:before {\n content: "" !important;\n}\ntei-title[level=m] {\n font-style: italic;\n}\ntei-titleStmt > tei-title {\n display: block;\n font-weight: normal;\n font-weight: bold !important;\n font-size: 150%;\n}\ntei-typeDesc {\n display: none;\n}\n/* u */\ntei-u:before {\n content: "-";\n}\ntei-unicodeName {\n /* Empty Rule Set */\n}\ntei-usg {\n /* Empty Rule Set */\n}\n/* v */\ntei-vAlt {\n /* Empty Rule Set */\n}\ntei-vColl {\n /* Empty Rule Set */\n}\ntei-vDefault {\n /* Empty Rule Set */\n}\ntei-vLabel {\n /* Empty Rule Set */\n}\ntei-vMerge {\n /* Empty Rule Set */\n}\ntei-vNot {\n /* Empty Rule Set */\n}\ntei-vRange {\n /* Empty Rule Set */\n}\ntei-val {\n /* Empty Rule Set */\n}\ntei-valDesc {\n /* Empty Rule Set */\n}\ntei-valItem {\n /* Empty Rule Set */\n}\ntei-valList {\n /* Empty Rule Set */\n}\ntei-value {\n /* Empty Rule Set */\n}\ntei-variantEncoding {\n /* Empty Rule Set */\n}\ntei-view {\n font-style: italic;\n}\ntei-vocal {\n /* Empty Rule Set */\n}\n/* w */\ntei-w {\n /* Empty Rule Set */\n}\ntei-watermark {\n /* Empty Rule Set */\n}\ntei-when {\n /* Empty Rule Set */\n}\ntei-width {\n /* Empty Rule Set */\n}\ntei-wit {\n /* Empty Rule Set */\n display: none;\n}\ntei-witDetail {\n display:none;\n /* Empty Rule Set */\n}\ntei-witEnd {\n /* Empty Rule Set */\n}\ntei-witStart {\n /* Empty Rule Set */\n}\ntei-writing {\n /* Empty Rule Set */\n}\n/* x */\ntei-xr {\n /* Empty Rule Set */\n}\n/* z */\ntei-zone {\n /* Empty Rule Set */\n}'],sourceRoot:""}]);const s=a},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o{"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n{var r;!function(i,o,a,s){"use strict";var l,u=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p=Math.round,h=Math.abs,f=Date.now;function d(t,e,n){return setTimeout(x(t,n),e)}function m(t,e,n){return!!Array.isArray(t)&&(y(t,n[e],n),!0)}function y(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==s)for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(t===s||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function k(t){return t.trim().split(/\s+/g)}function P(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;rn[e]})):r.sort()),r}function z(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=Z(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,l=a?a.center:o.center,u=e.center=W(r);e.timeStamp=f(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=Y(l,u),e.distance=H(l,u),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=X(e.deltaX,e.deltaY);var c,p,d=G(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=h(d.x)>h(d.y)?d.x:d.y,e.scale=a?(c=a.pointers,H((p=r)[0],p[1],U)/H(c[0],c[1],U)):1,e.rotation=a?function(t,e){return Y(e[1],e[0],U)+Y(t[1],t[0],U)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(l>25||a.velocity===s)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,p=G(l,u,c);r=p.x,i=p.y,n=h(p.x)>h(p.y)?p.x:p.y,o=X(u,c),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var m=t.element;S(e.srcEvent.target,m)&&(m=e.srcEvent.target),e.target=m}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function Z(t){for(var e=[],n=0;n=h(e)?t<0?2:4:e<0?8:16}function H(t,e,n){n||(n=N);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function Y(t,e,n){n||(n=N);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}V.prototype={handler:function(){},init:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(D(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(D(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4},$="mousedown",J="mousemove mouseup";function Q(){this.evEl=$,this.evWin=J,this.pressed=!1,V.apply(this,arguments)}b(Q,V,{handler:function(t){var e=K[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:j,srcEvent:t}))}});var tt={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},et={2:F,3:"pen",4:j,5:"kinect"},nt="pointerdown",rt="pointermove pointerup pointercancel";function it(){this.evEl=nt,this.evWin=rt,V.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(nt="MSPointerDown",rt="MSPointerMove MSPointerUp MSPointerCancel"),b(it,V,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=tt[r],o=et[t.pointerType]||t.pointerType,a=o==F,s=P(e,t.pointerId,"pointerId");1&i&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):12&i&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var ot={touchstart:1,touchmove:2,touchend:4,touchcancel:8},at="touchstart",st="touchstart touchmove touchend touchcancel";function lt(){this.evTarget=at,this.evWin=st,this.started=!1,V.apply(this,arguments)}function ut(t,e){var n=I(t.touches),r=I(t.changedTouches);return 12&e&&(n=M(n.concat(r),"identifier",!0)),[n,r]}b(lt,V,{handler:function(t){var e=ot[t.type];if(1===e&&(this.started=!0),this.started){var n=ut.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}}});var ct={touchstart:1,touchmove:2,touchend:4,touchcancel:8},pt="touchstart touchmove touchend touchcancel";function ht(){this.evTarget=pt,this.targetIds={},V.apply(this,arguments)}function ft(t,e){var n=I(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=I(t.changedTouches),s=[],l=this.target;if(o=n.filter((function(t){return S(t.target,l)})),1===e)for(i=0;i-1&&r.splice(t,1)}),2500)}}function gt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+It(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+It(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=kt},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return Ot.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Mt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),b(Rt,Ot,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[At]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),b(Lt,Pt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[xt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distancee.time;if(this._input=t,!r||!n||12&t.eventType&&!i)this.reset();else if(1&t.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return kt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),b(Bt,Ot,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[At]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),b(Ft,Ot,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Dt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&h(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=Mt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),b(jt,Pt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[wt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance(r=1))return r;for(;no?n=i:r=i,i=.5*(r-n)+n}return i},r.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=o;function o(t,e){this.x=t,this.y=e}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=n*this.x+e*this.y;return this.x=e*this.x-n*this.y,this.y=r,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=e.x+n*(this.x-e.x)-r*(this.y-e.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var a="undefined"!=typeof self?self:{},s=Math.pow(2,53)-1;function l(t,e,r,i){var o=new n(t,e,r,i);return function(t){return o.solve(t)}}var u=l(.25,.1,.25,1);function c(t,e,n){return Math.min(n,Math.max(e,t))}function p(t,e,n){var r=n-e,i=((t-e)%r+r)%r+e;return i===e?n:i}function h(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e;r>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function y(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function v(t,e){return-1!==t.indexOf(e,t.length-e.length)}function _(t,e,n){var r={};for(var i in t)r[i]=e.call(n||this,t[i],i,t);return r}function b(t,e,n){var r={};for(var i in t)e.call(n||this,t[i],i,t)&&(r[i]=t[i]);return r}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?_(t,x):t}var w={};function A(t){w[t]||("undefined"!=typeof console&&console.warn(t),w[t]=!0)}function E(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}function C(t){for(var e=0,n=0,r=t.length,i=r-1,o=void 0,a=void 0;n@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,n,r,i){var o=r||i;return e[n]=!o||o.toLowerCase(),""})),e["max-age"]){var n=parseInt(e["max-age"],10);isNaN(n)?delete e["max-age"]:e["max-age"]=n}return e}var k=null;function P(t){if(null==k){var e=t.navigator?t.navigator.userAgent:null;k=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return k}function I(t){try{var e=a[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var M,z,O,D,R=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),L=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,B=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,F={now:R,frame:function(t){var e=L(t);return{cancel:function(){return B(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var n=a.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=t.width,n.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return M||(M=a.document.createElement("a")),M.href=t,M.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return!!a.matchMedia&&(null==z&&(z=a.matchMedia("(prefers-reduced-motion: reduce)")),z.matches)}},j={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},N={supported:!1,testSupport:function(t){!U&&D&&(V?q(t):O=t)}},U=!1,V=!1;function q(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,D),t.isContextLost())return;N.supported=!0}catch(t){}t.deleteTexture(e),U=!0}a.document&&((D=a.document.createElement("img")).onload=function(){O&&q(O),O=null,V=!0},D.onerror=function(){U=!0,O=null},D.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Z="01",W=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function G(t){return 0===t.indexOf("mapbox:")}W.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Z,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},W.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},W.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},W.prototype.normalizeStyleURL=function(t,e){if(!G(t))return t;var n=K(t);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},W.prototype.normalizeGlyphsURL=function(t,e){if(!G(t))return t;var n=K(t);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},W.prototype.normalizeSourceURL=function(t,e){if(!G(t))return t;var n=K(t);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||e)},W.prototype.normalizeSpriteURL=function(t,e,n,r){var i=K(t);return G(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+n,this._makeAPIURL(i,this._customAccessToken||r)):(i.path+=""+e+n,$(i))},W.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!G(t))return t;var n=K(t);n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,(F.devicePixelRatio>=2||512===e?"@2x":"")+(N.supported?".webp":"$1")),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path;var r=this._customAccessToken||function(t){for(var e=0,n=t;e=0&&t.params.splice(i,1)}if("/"!==r.path&&(t.path=""+r.path+t.path),!j.REQUIRE_ACCESS_TOKEN)return $(t);if(!(e=e||j.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+n);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+n);return t.params=t.params.filter((function(t){return-1===t.indexOf("access_token")})),t.params.push("access_token="+e),$(t)},W.prototype.setTransformRequest=function(t){this._transformRequestFn=t};var X=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function H(t){return X.test(t)}var Y=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(t){var e=t.match(Y);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function $(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function J(t){if(!t)return null;var e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(decodeURIComponent(a.atob(e[1]).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join("")))}catch(t){return null}}var Q=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Q.prototype.getStorageKey=function(t){var e,n=J(j.ACCESS_TOKEN);return e=n&&n.u?a.btoa(encodeURIComponent(n.u).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(Number("0x"+e))}))):j.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+e:"mapbox.eventData:"+e},Q.prototype.fetchEventData=function(){var t=I("localStorage"),e=this.getStorageKey(),n=this.getStorageKey("uuid");if(t)try{var r=a.localStorage.getItem(e);r&&(this.eventData=JSON.parse(r));var i=a.localStorage.getItem(n);i&&(this.anonId=i)}catch(t){A("Unable to read from LocalStorage")}},Q.prototype.saveEventData=function(){var t=I("localStorage"),e=this.getStorageKey(),n=this.getStorageKey("uuid");if(t)try{a.localStorage.setItem(n,this.anonId),Object.keys(this.eventData).length>=1&&a.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){A("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(t){},Q.prototype.postEvent=function(t,e,n,r){var i=this;if(j.EVENTS_URL){var o=K(j.EVENTS_URL);o.params.push("access_token="+(r||j.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.15.1",skuId:Z,userId:this.anonId},s=e?h(a,e):a,l={url:$(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=wt(l,(function(t){i.pendingRequest=null,n(t),i.saveEventData(),i.processRequests(r)}))}},Q.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var tt,et,nt=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postMapLoadEvent=function(t,e,n,r){this.skuToken=n,(j.EVENTS_URL&&r||j.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||H(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},r)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),r=n.id,i=n.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),y(this.anonId)||(this.anonId=m()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||r&&(e.success[r]=!0)}),t))}},e}(Q),rt=new(function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postTurnstileEvent=function(t,e){j.EVENTS_URL&&j.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||H(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=J(j.ACCESS_TOKEN),r=n?n.u:j.ACCESS_TOKEN,i=r!==this.eventData.tokenU;y(this.anonId)||(this.anonId=m(),i=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||a.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=o,e.eventData.tokenU=r)}),t)}},e}(Q)),it=rt.postTurnstileEvent.bind(rt),ot=new nt,at=ot.postMapLoadEvent.bind(ot),st=500,lt=50;function ut(){a.caches&&!tt&&(tt=a.caches.open("mapbox-tiles"))}function ct(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var pt,ht=1/0;function ft(){return null==pt&&(pt=a.OffscreenCanvas&&new a.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof a.createImageBitmap),pt}var dt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(dt);var mt=function(t){function e(e,n,r){401===n&&H(r)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=n,this.url=r,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),yt=S()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===a.location.protocol?a.parent:a).location.href};function gt(t,e){var n,r=new a.AbortController,i=new a.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:yt(),signal:r.signal}),o=!1,s=!1,l=(n=i.url).indexOf("sku=")>0&&H(n);"json"===t.type&&i.headers.set("Accept","application/json");var u=function(n,r,o){if(!s){if(n&&"SecurityError"!==n.message&&A(n),r&&o)return c(r);var u=Date.now();a.fetch(i).then((function(n){if(n.ok){var r=l?n.clone():null;return c(n,r,u)}return e(new mt(n.statusText,n.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(n,r,l){("arrayBuffer"===t.type?n.arrayBuffer():"json"===t.type?n.json():n.text()).then((function(t){s||(r&&l&&function(t,e,n){if(ut(),tt){var r={status:e.status,statusText:e.statusText,headers:new a.Headers};e.headers.forEach((function(t,e){return r.headers.set(e,t)}));var i=T(e.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&r.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-n<42e4||function(t,e){if(void 0===et)try{new Response(new ReadableStream),et=!0}catch(t){et=!1}et?e(t.body):t.blob().then(e)}(e,(function(e){var n=new a.Response(e,r);ut(),tt&&tt.then((function(e){return e.put(ct(t.url),n)})).catch((function(t){return A(t.message)}))})))}}(i,r,l),o=!0,e(null,t,n.headers.get("Cache-Control"),n.headers.get("Expires")))})).catch((function(t){s||e(new Error(t.message))}))};return l?function(t,e){if(ut(),!tt)return e(null);var n=ct(t.url);tt.then((function(t){t.match(n).then((function(r){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),n=T(t.headers.get("Cache-Control")||"");return e>Date.now()&&!n["no-cache"]}(r);t.delete(n),i&&t.put(n,r.clone()),e(null,r,i)})).catch(e)})).catch(e)}(i,u):u(null,null),{cancel:function(){s=!0,o||r.abort()}}}var vt,_t,bt=function(t,e){if(/:\/\//.test(t.url)&&!/^https?:|^file:/.test(t.url)){if(S()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e);if(!S()){var n=t.url.substring(0,t.url.indexOf("://"));return(j.REGISTERED_PROTOCOLS[n]||gt)(t,e)}}if(!(/^file:/.test(r=t.url)||/^file:/.test(yt())&&!/^\w+:/.test(r))){if(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return gt(t,e);if(S()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var r;return function(t,e){var n=new a.XMLHttpRequest;for(var r in n.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(n.responseType="arraybuffer"),t.headers)n.setRequestHeader(r,t.headers[r]);return"json"===t.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===t.credentials,n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){var r=n.response;if("json"===t.type)try{r=JSON.parse(n.response)}catch(t){return e(t)}e(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else e(new mt(n.statusText,n.status,t.url))},n.send(t.body),{cancel:function(){return n.abort()}}}(t,e)},xt=function(t,e){return bt(h(t,{type:"arrayBuffer"}),e)},wt=function(t,e){return bt(h(t,{method:"POST"}),e)},At="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";vt=[],_t=0;var Et=function(t,e){if(N.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),_t>=j.MAX_PARALLEL_IMAGE_REQUESTS){var n={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return vt.push(n),n}_t++;var r=!1,i=function(){if(!r)for(r=!0,_t--;vt.length&&_t0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Pt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var It={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},Mt=function(t,e,n,r){this.message=(t?t+": ":"")+n,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)};function zt(t){var e=t.value;return e?[new Mt(t.key,e,"constants have been deprecated as of v8")]:[]}function Ot(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var r=0,i=e;r":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Kt=[Ft,jt,Nt,Ut,Vt,Gt,qt,Ht(Zt),Xt];function $t(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!$t(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var n=0,r=Kt;n255?255:t}function i(t){return r("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function a(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}try{e.parseCSSColor=function(t){var e,s=t.replace(/ /g,"").toLowerCase();if(s in n)return n[s].slice();if("#"===s[0])return 4===s.length?(e=parseInt(s.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===s.length&&(e=parseInt(s.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=s.indexOf("("),u=s.indexOf(")");if(-1!==l&&u+1===s.length){var c=s.substr(0,l),p=s.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=o(p.pop());case"rgb":return 3!==p.length?null:[i(p[0]),i(p[1]),i(p[2]),h];case"hsla":if(4!==p.length)return null;h=o(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=o(p[1]),m=o(p[2]),y=m<=.5?m*(d+1):m+d-m*d,g=2*m-y;return[r(255*a(g,y,f+1/3)),r(255*a(g,y,f)),r(255*a(g,y,f-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,ee=function(t,e,n,r){void 0===r&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};ee.parse=function(t){if(t){if(t instanceof ee)return t;if("string"==typeof t){var e=te(t);if(e)return new ee(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},ee.prototype.toString=function(){var t=this.toArray(),e=t[1],n=t[2],r=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(n)+","+r+")"},ee.prototype.toArray=function(){var t=this.a;return 0===t?[0,0,0,0]:[255*this.r/t,255*this.g/t,255*this.b/t,t]},ee.black=new ee(0,0,0,1),ee.white=new ee(1,1,1,1),ee.transparent=new ee(0,0,0,0),ee.red=new ee(1,0,0,1);var ne=function(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ne.prototype.compare=function(t,e){return this.collator.compare(t,e)},ne.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,n,r,i){this.text=t,this.image=e,this.scale=n,this.fontStack=r,this.textColor=i},ie=function(t){this.sections=t};ie.fromString=function(t){return new ie([new re(t,null,null,null,null)])},ie.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ie.factory=function(t){return t instanceof ie?t:ie.fromString(t)},ie.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},ie.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[t,e,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,n,r]:[t,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function se(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(t instanceof oe)return!0;if(Array.isArray(t)){for(var e=0,n=t;e2){var s=t[1];if("string"!=typeof s||!(s in he)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=he[s],r++}else o=Zt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],r++}n=Ht(o,a)}else n=he[i];for(var l=[];r1)&&e.push(r)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var de=function(t){this.type=Gt,this.sections=t};de.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[1];if(!Array.isArray(n)&&"object"==typeof n)return e.error("First argument must be an image or text section.");for(var r=[],i=!1,o=1;o<=t.length-1;++o){var a=t[o];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,jt)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,Ht(Nt))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,Vt)))return null;var c=r[r.length-1];c.scale=s,c.font=l,c.textColor=u}else{var p=e.parse(t[o],1,Zt);if(!p)return null;var h=p.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:p,scale:null,font:null,textColor:null})}}return new de(r)},de.prototype.evaluate=function(t){return new ie(this.sections.map((function(e){var n=e.content.evaluate(t);return le(n)===Xt?new re("",n,null,null,null):new re(ue(n),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},de.prototype.eachChild=function(t){for(var e=0,n=this.sections;e-1),n},me.prototype.eachChild=function(t){t(this.input)},me.prototype.outputDefined=function(){return!1},me.prototype.serialize=function(){return["image",this.input.serialize()]};var ye={"to-boolean":Ut,"to-color":Vt,"to-number":jt,"to-string":Nt},ge=function(t,e){this.type=t,this.args=e};ge.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[0];if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return e.error("Expected one argument.");for(var r=ye[n],i=[],o=1;o4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":ae(e[0],e[1],e[2],e[3])))return new ee(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new pe(n||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Ee(t,e){var n=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,i=Math.pow(2,e.z);return[Math.round(n*i*8192),Math.round(r*i*8192)]}function Ce(t,e,n){return e[1]>t[1]!=n[1]>t[1]&&t[0]<(n[0]-e[0])*(t[1]-e[1])/(n[1]-e[1])+e[0]}function Se(t,e){for(var n,r,i,o,a,s,l,u=!1,c=0,p=e.length;c0&&s<0||a<0&&s>0}function Pe(t,e,n){for(var r=0,i=n;rn[2]){var i=.5*r,o=t[0]-n[0]>i?-r:n[0]-t[0]>i?r:0;0===o&&(o=t[0]-n[2]>i?-r:n[2]-t[0]>i?r:0),t[0]+=o}we(e,t)}function Re(t,e,n,r){for(var i=8192*Math.pow(2,r.z),o=[8192*r.x,8192*r.y],a=[],s=0,l=t;s=0)return!1;var n=!0;return t.eachChild((function(t){n&&!Ne(t,e)&&(n=!1)})),n}Be.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(se(t[1])){var n=t[1];if("FeatureCollection"===n.type)for(var r=0;re))throw new pe("Input is not a number.");o=a-1}return 0}Ve.prototype.parse=function(t,e,n,r,i){return void 0===i&&(i={}),e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)},Ve.prototype._parse=function(t,e){function n(t,e,n){return"assert"===n?new fe(e,[t]):"coerce"===n?new ge(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=n(o,a,e.typeAnnotation||"coerce");else o=n(o,a,e.typeAnnotation||"assert")}if(!(o instanceof ce)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof Ue)return t(e.boundExpression);if(e instanceof be&&"error"===e.name)return!1;if(e instanceof xe)return!1;if(e instanceof Be)return!1;var n=e instanceof ge||e instanceof fe,r=!0;return e.eachChild((function(e){r=n?r&&t(e):r&&e instanceof ce})),!!r&&Fe(e)&&Ne(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new _e;try{o=new ce(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof t+" instead.")},Ve.prototype.concat=function(t,e,n){var r="number"==typeof t?this.path.concat(t):this.path,i=n?this.scope.concat(n):this.scope;return new Ve(this.registry,r,e||null,i,this.errors)},Ve.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Lt(r,t))},Ve.prototype.checkSubtype=function(t,e){var n=$t(t,e);return n&&this.error(n),n};var Ze=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,i=n;r=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(s,u,i);if(!c)return null;i=i||c.type,r.push([a,c])}return new Ze(i,n,r)},Ze.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[qe(e,r)].evaluate(t)},Ze.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ge=Object.freeze({__proto__:null,number:We,color:function(t,e,n){return new ee(We(t.r,e.r,n),We(t.g,e.g,n),We(t.b,e.b,n),We(t.a,e.a,n))},array:function(t,e,n){return t.map((function(t,r){return We(t,e[r],n)}))}}),Xe=6/29*3*(6/29),He=Math.PI/180,Ye=180/Math.PI;function Ke(t){return t>.008856451679035631?Math.pow(t,1/3):t/Xe+4/29}function $e(t){return t>6/29?t*t*t:Xe*(t-4/29)}function Je(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Qe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tn(t){var e=Qe(t.r),n=Qe(t.g),r=Qe(t.b),i=Ke((.4124564*e+.3575761*n+.1804375*r)/.95047),o=Ke((.2126729*e+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Ke((.0193339*e+.119192*n+.9503041*r)/1.08883)),alpha:t.a}}function en(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=1*$e(e),n=.95047*$e(n),r=1.08883*$e(r),new ee(Je(3.2404542*n-1.5371385*e-.4985314*r),Je(-.969266*n+1.8760108*e+.041556*r),Je(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}function nn(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}var rn={forward:tn,reverse:en,interpolate:function(t,e,n){return{l:We(t.l,e.l,n),a:We(t.a,e.a,n),b:We(t.b,e.b,n),alpha:We(t.alpha,e.alpha,n)}}},on={forward:function(t){var e=tn(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*Ye;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:t.a}},reverse:function(t){var e=t.h*He,n=t.c;return en({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:nn(t.h,e.h,n),c:We(t.c,e.c,n),l:We(t.l,e.l,n),alpha:We(t.alpha,e.alpha,n)}}},an=Object.freeze({__proto__:null,lab:rn,hcl:on}),sn=function(t,e,n,r,i){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=i;o1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,jt)))return null;var l=[],u=null;"interpolate-hcl"===n||"interpolate-lab"===n?u=Vt:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(h,d,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new sn(u,n,r,i,l):e.error("Type "+Yt(u)+" is not interpolatable.")},sn.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;if(r>=e[i-1])return n[i-1].evaluate(t);var o=qe(e,r),a=sn.interpolationFactor(this.interpolation,r,e[o],e[o+1]),s=n[o].evaluate(t),l=n[o+1].evaluate(t);return"interpolate"===this.operator?Ge[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?on.reverse(on.interpolate(on.forward(s),on.forward(l),a)):rn.reverse(rn.interpolate(rn.forward(s),rn.forward(l),a))},sn.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e=n.length)throw new pe("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new pe("Array index must be an integer, but found "+e+" instead.");return n[e]},pn.prototype.eachChild=function(t){t(this.index),t(this.input)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var hn=function(t,e){this.type=Ut,this.needle=t,this.haystack=e};hn.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Zt),r=e.parse(t[2],2,Zt);return n&&r?Jt(n.type,[Ut,Nt,jt,Ft,Zt])?new hn(n,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Yt(n.type)+" instead"):null},hn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!n)return!1;if(!Qt(e,["boolean","string","number","null"]))throw new pe("Expected first argument to be of type boolean, string, number or null, but found "+Yt(le(e))+" instead.");if(!Qt(n,["string","array"]))throw new pe("Expected second argument to be of type array or string, but found "+Yt(le(n))+" instead.");return n.indexOf(e)>=0},hn.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},hn.prototype.outputDefined=function(){return!0},hn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var fn=function(t,e,n){this.type=jt,this.needle=t,this.haystack=e,this.fromIndex=n};fn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Zt),r=e.parse(t[2],2,Zt);if(!n||!r)return null;if(!Jt(n.type,[Ut,Nt,jt,Ft,Zt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Yt(n.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,jt);return i?new fn(n,r,i):null}return new fn(n,r)},fn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Qt(e,["boolean","string","number","null"]))throw new pe("Expected first argument to be of type boolean, string, number or null, but found "+Yt(le(e))+" instead.");if(!Qt(n,["string","array"]))throw new pe("Expected second argument to be of type array or string, but found "+Yt(le(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)},fn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var dn=function(t,e,n,r,i,o){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};dn.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,le(h)))return null}else n=le(h);if(void 0!==i[String(h)])return u.error("Branch labels must be unique.");i[String(h)]=o.length}var f=e.parse(l,a,r);if(!f)return null;r=r||f.type,o.push(f)}var d=e.parse(t[1],1,Zt);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,r);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(n,d.type)?null:new dn(n,r,d,i,o,m):null},dn.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(le(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},dn.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},dn.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},dn.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();i=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Zt),r=e.parse(t[2],2,jt);if(!n||!r)return null;if(!Jt(n.type,[Ht(Zt),Nt,Zt]))return e.error("Expected first argument to be of type array or string, but found "+Yt(n.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,jt);return i?new yn(n.type,n,r,i):null}return new yn(n.type,n,r)},yn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Qt(e,["string","array"]))throw new pe("Expected first argument to be of type array or string, but found "+Yt(le(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)},yn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},yn.prototype.outputDefined=function(){return!1},yn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var bn=_n("==",(function(t,e,n){return e===n}),vn),xn=_n("!=",(function(t,e,n){return e!==n}),(function(t,e,n,r){return!vn(0,e,n,r)})),wn=_n("<",(function(t,e,n){return e",(function(t,e,n){return e>n}),(function(t,e,n,r){return r.compare(e,n)>0})),En=_n("<=",(function(t,e,n){return e<=n}),(function(t,e,n,r){return r.compare(e,n)<=0})),Cn=_n(">=",(function(t,e,n){return e>=n}),(function(t,e,n,r){return r.compare(e,n)>=0})),Sn=function(t,e,n,r,i){this.type=Nt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=i};Sn.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var n=e.parse(t[1],1,jt);if(!n)return null;var r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");var i=null;if(r.locale&&!(i=e.parse(r.locale,1,Nt)))return null;var o=null;if(r.currency&&!(o=e.parse(r.currency,1,Nt)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=e.parse(r["min-fraction-digits"],1,jt)))return null;var s=null;return r["max-fraction-digits"]&&!(s=e.parse(r["max-fraction-digits"],1,jt))?null:new Sn(n,i,o,a,s)},Sn.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Sn.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Sn.prototype.outputDefined=function(){return!1},Sn.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Tn=function(t){this.type=jt,this.input=t};Tn.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+Yt(n.type)+" instead."):new Tn(n):null},Tn.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new pe("Expected value to be of type string or array, but found "+Yt(le(e))+" instead.")},Tn.prototype.eachChild=function(t){t(this.input)},Tn.prototype.outputDefined=function(){return!1},Tn.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var kn={"==":bn,"!=":xn,">":An,"<":wn,">=":Cn,"<=":En,array:fe,at:pn,boolean:fe,case:mn,coalesce:un,collator:xe,format:de,image:me,in:hn,"index-of":fn,interpolate:sn,"interpolate-hcl":sn,"interpolate-lab":sn,length:Tn,let:cn,literal:ce,match:dn,number:fe,"number-format":Sn,object:fe,slice:yn,step:Ze,string:fe,"to-boolean":ge,"to-color":ge,"to-number":ge,"to-string":ge,var:Ue,within:Be};function Pn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3];n=n.evaluate(t),r=r.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=ae(n,r,i,a);if(s)throw new pe(s);return new ee(n/255*a,r/255*a,i/255*a,a)}function In(t,e){return t in e}function Mn(t,e){var n=e[t];return void 0===n?null:n}function zn(t){return{type:t}}function On(t){return{result:"success",value:t}}function Dn(t){return{result:"error",value:t}}function Rn(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Ln(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Bn(t){return!!t.expression&&t.expression.interpolated}function Fn(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function jn(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Nn(t){return t}function Un(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function Vn(t,e,n,r,i){return Un(typeof n===i?r[n]:void 0,t.default,e.default)}function qn(t,e,n){if("number"!==Fn(n))return Un(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var i=qe(t.stops.map((function(t){return t[0]})),n);return t.stops[i][1]}function Zn(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==Fn(n))return Un(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];var o=qe(t.stops.map((function(t){return t[0]})),n),a=function(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(n,r,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=Ge[e.type]||Nn;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=an[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=s.evaluate.apply(void 0,t),r=l.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==r)return u(n,r,a)}}:u(s,l,a)}function Wn(t,e,n){return"color"===e.type?n=ee.parse(n):"formatted"===e.type?n=ie.fromString(n.toString()):"resolvedImage"===e.type?n=oe.fromString(n.toString()):Fn(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),Un(n,t.default,e.default)}be.register(kn,{error:[{kind:"error"},[Nt],function(t,e){throw new pe(e[0].evaluate(t))}],typeof:[Nt,[Zt],function(t,e){return Yt(le(e[0].evaluate(t)))}],"to-rgba":[Ht(jt,4),[Vt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Vt,[jt,jt,jt],Pn],rgba:[Vt,[jt,jt,jt,jt],Pn],has:{type:Ut,overloads:[[[Nt],function(t,e){return In(e[0].evaluate(t),t.properties())}],[[Nt,qt],function(t,e){var n=e[1];return In(e[0].evaluate(t),n.evaluate(t))}]]},get:{type:Zt,overloads:[[[Nt],function(t,e){return Mn(e[0].evaluate(t),t.properties())}],[[Nt,qt],function(t,e){var n=e[1];return Mn(e[0].evaluate(t),n.evaluate(t))}]]},"feature-state":[Zt,[Nt],function(t,e){return Mn(e[0].evaluate(t),t.featureState||{})}],properties:[qt,[],function(t){return t.properties()}],"geometry-type":[Nt,[],function(t){return t.geometryType()}],id:[Zt,[],function(t){return t.id()}],zoom:[jt,[],function(t){return t.globals.zoom}],"heatmap-density":[jt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[jt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Zt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[jt,zn(jt),function(t,e){for(var n=0,r=0,i=e;r":[Ut,[Nt,Zt],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[Ut,[Zt],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[Ut,[Nt,Zt],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[Ut,[Zt],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[Ut,[Nt,Zt],function(t,e){var n=e[0],r=e[1],i=t.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[Ut,[Zt],function(t,e){var n=e[0],r=t.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[Ut,[Zt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ut,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Ut,[Ht(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Ut,[Ht(Zt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Ut,[Nt,Ht(Zt)],function(t,e){var n=e[0];return e[1].value.indexOf(t.properties()[n.value])>=0}],"filter-in-large":[Ut,[Nt,Ht(Zt)],function(t,e){var n=e[0],r=e[1];return function(t,e,n,r){for(;n<=r;){var i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1}(t.properties()[n.value],r.value,0,r.value.length-1)}],all:{type:Ut,overloads:[[[Ut,Ut],function(t,e){var n=e[1];return e[0].evaluate(t)&&n.evaluate(t)}],[zn(Ut),function(t,e){for(var n=0,r=e;n0&&"string"==typeof t[0]&&t[0]in kn}function Hn(t,e){var n=new Ve(kn,[],e?function(t){var e={color:Vt,string:Nt,number:jt,enum:Nt,boolean:Ut,formatted:Gt,resolvedImage:Xt};return"array"===t.type?Ht(e[t.value]||Zt,t.length):e[t.type]}(e):void 0),r=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?On(new Gn(r,e)):Dn(n.errors)}Gn.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,i,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},Gn.prototype.evaluate=function(t,e,n,r,i,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new pe("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Yn=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!je(e.expression)};Yn.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)},Yn.prototype.evaluate=function(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)};var Kn=function(t,e,n,r){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent="camera"!==t&&!je(e.expression),this.interpolationType=r};function $n(t,e){if("error"===(t=Hn(t,e)).result)return t;var n=t.value.expression,r=Fe(n);if(!r&&!Rn(e))return Dn([new Lt("","data expressions not supported")]);var i=Ne(n,["zoom"]);if(!i&&!Ln(e))return Dn([new Lt("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof cn)n=t(e.result);else if(e instanceof un)for(var r=0,i=e.args;rr.maximum?[new Mt(e,n,n+" is greater than the maximum value "+r.maximum)]:[]}function nr(t){var e,n,r,i=t.valueSpec,o=Dt(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===Fn(t.value.stops)&&"array"===Fn(t.value.stops[0])&&"object"===Fn(t.value.stops[0][0]),c=Qn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new Mt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;return e=e.concat(tr({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Fn(n)&&0===n.length&&e.push(new Mt(t.key,n,"array must have at least one stop")),e},default:function(t){return Er({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new Mt(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new Mt(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Bn(t.valueSpec)&&c.push(new Mt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Rn(t.valueSpec)?c.push(new Mt(t.key,t.value,"property functions not supported")):s&&!Ln(t.valueSpec)&&c.push(new Mt(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new Mt(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Fn(o))return[new Mt(s,o,"array expected, "+Fn(o)+" found")];if(2!==o.length)return[new Mt(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Fn(o[0]))return[new Mt(s,o,"object expected, "+Fn(o[0])+" found")];if(void 0===o[0].zoom)return[new Mt(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Mt(s,o,"object stop key must have value")];if(r&&r>Dt(o[0].zoom))return[new Mt(s,o[0].zoom,"stop zoom values must appear in ascending order")];Dt(o[0].zoom)!==r&&(r=Dt(o[0].zoom),n=void 0,a={}),e=e.concat(Qn({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:er,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Xn(Rt(o[1]))?e.concat([new Mt(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Er({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,r){var s=Fn(t.value),l=Dt(t.value),u=null!==t.value?t.value:r;if(e){if(s!==e)return[new Mt(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Mt(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return Rn(i)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Mt(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,n=t.slice(1);ee?1:0}function ur(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?cr(t[1],t[2],"=="):"!="===n?fr(cr(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?cr(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(ur))):"all"===n?["all"].concat(t.slice(1).map(ur)):"none"===n?["all"].concat(t.slice(1).map(ur).map(fr)):"in"===n?pr(t[1],t.slice(2)):"!in"===n?fr(pr(t[1],t.slice(2))):"has"===n?hr(t[1]):"!has"===n?fr(hr(t[1])):"within"!==n||t}function cr(t,e,n){switch(t){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,t,e]}}function pr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(lr)]]:["filter-in-small",t,["literal",e]]}}function hr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function fr(t){return["!",t]}function dr(t){return or(Rt(t.value))?rr(Ot({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value,r=e.key;if("array"!==Fn(n))return[new Mt(r,n,"array expected, "+Fn(n)+" found")];var i,o=e.styleSpec,a=[];if(n.length<1)return[new Mt(r,n,"filter array must have at least 1 element")];switch(a=a.concat(ir({key:r+"[0]",value:n[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),Dt(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===Dt(n[1])&&a.push(new Mt(r,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new Mt(r,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(i=Fn(n[1]))&&a.push(new Mt(r+"[1]",n[1],"string expected, "+i+" found"));for(var s=2;s=c[f+0]&&r>=c[f+1])?(a[h]=!0,o.push(u[h])):a[h]=!1}}},Rr.prototype._forEachCell=function(t,e,n,r,i,o,a,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(n),p=this._convertToCellCoord(r),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&i.call(this,t,e,n,r,d,o,a,s))return}},Rr.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Rr.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Rr.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,n=0,r=0;r=0)){var c=t[u];l[u]=Fr[s].shallow.indexOf(u)>=0?c:qr(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}throw new Error("can't serialize object of type "+typeof t)}function Zr(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Ur(t)||Vr(t)||ArrayBuffer.isView(t)||t instanceof Lr)return t;if(Array.isArray(t))return t.map(Zr);if("object"==typeof t){var e=t.$name||"Object",n=Fr[e].klass;if(!n)throw new Error("can't deserialize unregistered class "+e);if(n.deserialize)return n.deserialize(t);for(var r=Object.create(n.prototype),i=0,o=Object.keys(t);i=0?s:Zr(s)}}return r}throw new Error("can't deserialize object of type "+typeof t)}var Wr=function(){this.first=!0};Wr.prototype.update=function(t,e){var n=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function Xr(t){for(var e=0,n=t;e=65097&&t<=65103)||Gr["CJK Compatibility Ideographs"](t)||Gr["CJK Compatibility"](t)||Gr["CJK Radicals Supplement"](t)||Gr["CJK Strokes"](t)||!(!Gr["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Gr["CJK Unified Ideographs Extension A"](t)||Gr["CJK Unified Ideographs"](t)||Gr["Enclosed CJK Letters and Months"](t)||Gr["Hangul Compatibility Jamo"](t)||Gr["Hangul Jamo Extended-A"](t)||Gr["Hangul Jamo Extended-B"](t)||Gr["Hangul Jamo"](t)||Gr["Hangul Syllables"](t)||Gr.Hiragana(t)||Gr["Ideographic Description Characters"](t)||Gr.Kanbun(t)||Gr["Kangxi Radicals"](t)||Gr["Katakana Phonetic Extensions"](t)||Gr.Katakana(t)&&12540!==t||!(!Gr["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!Gr["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Gr["Unified Canadian Aboriginal Syllabics"](t)||Gr["Unified Canadian Aboriginal Syllabics Extended"](t)||Gr["Vertical Forms"](t)||Gr["Yijing Hexagram Symbols"](t)||Gr["Yi Syllables"](t)||Gr["Yi Radicals"](t))))}function Yr(t){return!(Hr(t)||function(t){return!!(Gr["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Gr["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Gr["Letterlike Symbols"](t)||Gr["Number Forms"](t)||Gr["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||Gr["Control Pictures"](t)&&9251!==t||Gr["Optical Character Recognition"](t)||Gr["Enclosed Alphanumerics"](t)||Gr["Geometric Shapes"](t)||Gr["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Gr["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Gr["CJK Symbols and Punctuation"](t)||Gr.Katakana(t)||Gr["Private Use Area"](t)||Gr["CJK Compatibility Forms"](t)||Gr["Small Form Variants"](t)||Gr["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Kr(t){return t>=1424&&t<=2303||Gr["Arabic Presentation Forms-A"](t)||Gr["Arabic Presentation Forms-B"](t)}function $r(t,e){return!(!e&&Kr(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Gr.Khmer(t))}function Jr(t){for(var e=0,n=t;e-1&&(ti="error"),Qr&&Qr(t)};function ri(){ii.fire(new Tt("pluginStateChange",{pluginStatus:ti,pluginURL:ei}))}var ii=new Pt,oi=function(){return ti},ai=function(){if("deferred"!==ti||!ei)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ti="loading",ri(),ei&&xt({url:ei},(function(t){t?ni(t):(ti="loaded",ri())}))},si={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===ti||null!=si.applyArabicShaping},isLoading:function(){return"loading"===ti},setState:function(t){ti=t.pluginStatus,ei=t.pluginURL},isParsed:function(){return null!=si.applyArabicShaping&&null!=si.processBidirectionalText&&null!=si.processStyledBidirectionalText},getPluginURL:function(){return ei}},li=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Wr,this.transition={})};li.prototype.isSupportedScript=function(t){return function(t,e){for(var n=0,r=t;nthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}};var ui=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(jn(t))return new Jn(t,e);if(Xn(t)){var n=$n(t,e);if("error"===n.result)throw new Error(n.value.map((function(t){return t.key+": "+t.message})).join(", "));return n.value}var r=t;return"string"==typeof t&&"color"===e.type&&(r=ee.parse(t)),{kind:"constant",evaluate:function(){return r}}}(void 0===e?t.specification.default:e,t.specification)};ui.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},ui.prototype.possiblyEvaluate=function(t,e,n){return this.property.possiblyEvaluate(this,t,e,n)};var ci=function(t){this.property=t,this.value=new ui(t,void 0)};ci.prototype.transitioned=function(t,e){return new hi(this.property,this.value,e,h({},t.transition,this.transition),t.now)},ci.prototype.untransitioned=function(){return new hi(this.property,this.value,null,{},0)};var pi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};pi.prototype.getValue=function(t){return x(this._values[t].value.value)},pi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new ci(this._values[t].property)),this._values[t].value=new ui(this._values[t].property,null===e?void 0:x(e))},pi.prototype.getTransition=function(t){return x(this._values[t].transition)},pi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new ci(this._values[t].property)),this._values[t].transition=x(e)||void 0},pi.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(r=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}(a))}return i};var fi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};fi.prototype.possiblyEvaluate=function(t,e,n){for(var r=new yi(this._properties),i=0,o=Object.keys(this._values);ir.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},e.prototype.interpolate=function(t){return t},e}(vi),bi=function(t){this.specification=t};bi.prototype.possiblyEvaluate=function(t,e,n,r){if(void 0!==t.value){if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},n,r);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new li(Math.floor(e.zoom-1),e)),t.expression.evaluate(new li(Math.floor(e.zoom),e)),t.expression.evaluate(new li(Math.floor(e.zoom+1),e)),e)}},bi.prototype._calculate=function(t,e,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},bi.prototype.interpolate=function(t){return t};var xi=function(t){this.specification=t};xi.prototype.possiblyEvaluate=function(t,e,n,r){return!!t.expression.evaluate(e,null,{},n,r)},xi.prototype.interpolate=function(){return!1};var wi=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var n=t[e];n.specification.overridable&&this.overridableProperties.push(e);var r=this.defaultPropertyValues[e]=new ui(n,void 0),i=this.defaultTransitionablePropertyValues[e]=new ci(n);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}};jr("DataDrivenProperty",vi),jr("DataConstantProperty",gi),jr("CrossFadedDataDrivenProperty",_i),jr("CrossFadedProperty",bi),jr("ColorRampProperty",xi);var Ai=function(t){function e(e,n){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=(e=e).metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),n.layout&&(this._unevaluatedLayout=new di(n.layout)),n.paint)){for(var r in this._transitionablePaint=new pi(n.paint),e.paint)this.setPaintProperty(r,e.paint[r],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yi(n.paint)}}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,n){void 0===n&&(n={}),null!=e&&this._validate(zr,"layers."+this.id+".layout."+t,t,e,n)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},e.prototype.getPaintProperty=function(t){return v(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,n){if(void 0===n&&(n={}),null!=e&&this._validate(Mr,"layers."+this.id+".paint."+t,t,e,n))return!1;if(v(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var r=this._transitionablePaint._values[t],i="cross-faded-data-driven"===r.property.specification["property-type"],o=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||i||this._handleOverridablePaintPropertyUpdate(t,a,s)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,n){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),b(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,n,r,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Or(this,t.call(Pr,{key:e,layerType:this.type,objectKey:n,value:r,styleSpec:It,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof mi&&Rn(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(Pt),Ei={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Si=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ti(t,e){void 0===e&&(e=1);var n=0,r=0;return{members:t.map((function(t){var i=Ei[t.type].BYTES_PER_ELEMENT,o=n=ki(n,Math.max(e,i)),a=t.components||1;return r=Math.max(r,i),n+=i*a,{name:t.name,type:t.type,components:a,offset:o}})),size:ki(n,Math.max(r,e)),alignment:e}}function ki(t,e){return Math.ceil(t/e)*e}Si.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Si.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Si.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Si.prototype.clear=function(){this.length=0},Si.prototype.resize=function(t){this.reserve(t),this.length=t},Si.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Si.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var r=2*t;return this.int16[r+0]=e,this.int16[r+1]=n,t},e}(Si);Pi.prototype.bytesPerElement=4,jr("StructArrayLayout2i4",Pi);var Ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)},e.prototype.emplace=function(t,e,n,r,i){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,t},e}(Si);Ii.prototype.bytesPerElement=8,jr("StructArrayLayout4i8",Ii);var Mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)},e.prototype.emplace=function(t,e,n,r,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Si);Mi.prototype.bytesPerElement=12,jr("StructArrayLayout2i4i12",Mi);var zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)},e.prototype.emplace=function(t,e,n,r,i,o,a){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.uint8[l+4]=r,this.uint8[l+5]=i,this.uint8[l+6]=o,this.uint8[l+7]=a,t},e}(Si);zi.prototype.bytesPerElement=8,jr("StructArrayLayout2i4ub8",zi);var Oi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var r=2*t;return this.float32[r+0]=e,this.float32[r+1]=n,t},e}(Si);Oi.prototype.bytesPerElement=8,jr("StructArrayLayout2f8",Oi);var Di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,n,r,i,o,a,s,l,u)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l,u,c){var p=10*t;return this.uint16[p+0]=e,this.uint16[p+1]=n,this.uint16[p+2]=r,this.uint16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.uint16[p+8]=u,this.uint16[p+9]=c,t},e}(Si);Di.prototype.bytesPerElement=20,jr("StructArrayLayout10ui20",Di);var Ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,l,u,c,p){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,n,r,i,o,a,s,l,u,c,p)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l,u,c,p,h){var f=12*t;return this.int16[f+0]=e,this.int16[f+1]=n,this.int16[f+2]=r,this.int16[f+3]=i,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=p,this.int16[f+11]=h,t},e}(Si);Ri.prototype.bytesPerElement=24,jr("StructArrayLayout4i4ui4i24",Ri);var Li=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)},e.prototype.emplace=function(t,e,n,r){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=n,this.float32[i+2]=r,t},e}(Si);Li.prototype.bytesPerElement=12,jr("StructArrayLayout3f12",Li);var Bi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint32[1*t+0]=e,t},e}(Si);Bi.prototype.bytesPerElement=4,jr("StructArrayLayout1ul4",Bi);var Fi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,n,r,i,o,a,s,l)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l,u){var c=10*t,p=5*t;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=r,this.int16[c+3]=i,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[p+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}(Si);Fi.prototype.bytesPerElement=20,jr("StructArrayLayout6i1ul2ui20",Fi);var ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,r,i,o)},e.prototype.emplace=function(t,e,n,r,i,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Si);ji.prototype.bytesPerElement=12,jr("StructArrayLayout2i2i2i12",ji);var Ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,n,r,i)},e.prototype.emplace=function(t,e,n,r,i,o){var a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=n,this.float32[a+2]=r,this.int16[s+6]=i,this.int16[s+7]=o,t},e}(Si);Ni.prototype.bytesPerElement=16,jr("StructArrayLayout2f1f2i16",Ni);var Ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)},e.prototype.emplace=function(t,e,n,r,i){var o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=n,this.float32[a+1]=r,this.float32[a+2]=i,t},e}(Si);Ui.prototype.bytesPerElement=12,jr("StructArrayLayout2ub2f12",Ui);var Vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)},e.prototype.emplace=function(t,e,n,r){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=n,this.uint16[i+2]=r,t},e}(Si);Vi.prototype.bytesPerElement=6,jr("StructArrayLayout3ui6",Vi);var qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m,y){var g=this.length;return this.resize(g+1),this.emplace(g,t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m,y)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m,y,g){var v=24*t,_=12*t,b=48*t;return this.int16[v+0]=e,this.int16[v+1]=n,this.uint16[v+2]=r,this.uint16[v+3]=i,this.uint32[_+2]=o,this.uint32[_+3]=a,this.uint32[_+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=c,this.float32[_+7]=p,this.float32[_+8]=h,this.uint8[b+36]=f,this.uint8[b+37]=d,this.uint8[b+38]=m,this.uint32[_+10]=y,this.int16[v+22]=g,t},e}(Si);qi.prototype.bytesPerElement=48,jr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",qi);var Zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m,y,g,v,_,b,x,w,A,E,C,S,T){var k=this.length;return this.resize(k+1),this.emplace(k,t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m,y,g,v,_,b,x,w,A,E,C,S,T)},e.prototype.emplace=function(t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m,y,g,v,_,b,x,w,A,E,C,S,T,k){var P=34*t,I=17*t;return this.int16[P+0]=e,this.int16[P+1]=n,this.int16[P+2]=r,this.int16[P+3]=i,this.int16[P+4]=o,this.int16[P+5]=a,this.int16[P+6]=s,this.int16[P+7]=l,this.uint16[P+8]=u,this.uint16[P+9]=c,this.uint16[P+10]=p,this.uint16[P+11]=h,this.uint16[P+12]=f,this.uint16[P+13]=d,this.uint16[P+14]=m,this.uint16[P+15]=y,this.uint16[P+16]=g,this.uint16[P+17]=v,this.uint16[P+18]=_,this.uint16[P+19]=b,this.uint16[P+20]=x,this.uint16[P+21]=w,this.uint16[P+22]=A,this.uint32[I+12]=E,this.float32[I+13]=C,this.float32[I+14]=S,this.float32[I+15]=T,this.float32[I+16]=k,t},e}(Si);Zi.prototype.bytesPerElement=68,jr("StructArrayLayout8i15ui1ul4f68",Zi);var Wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.float32[1*t+0]=e,t},e}(Si);Wi.prototype.bytesPerElement=4,jr("StructArrayLayout1f4",Wi);var Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)},e.prototype.emplace=function(t,e,n,r){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=n,this.int16[i+2]=r,t},e}(Si);Gi.prototype.bytesPerElement=6,jr("StructArrayLayout3i6",Gi);var Xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n)},e.prototype.emplace=function(t,e,n,r){var i=4*t;return this.uint32[2*t+0]=e,this.uint16[i+2]=n,this.uint16[i+3]=r,t},e}(Si);Xi.prototype.bytesPerElement=8,jr("StructArrayLayout1ul2ui8",Xi);var Hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},e.prototype.emplace=function(t,e,n){var r=2*t;return this.uint16[r+0]=e,this.uint16[r+1]=n,t},e}(Si);Hi.prototype.bytesPerElement=4,jr("StructArrayLayout2ui4",Hi);var Yi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint16[1*t+0]=e,t},e}(Si);Yi.prototype.bytesPerElement=2,jr("StructArrayLayout1ui2",Yi);var Ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n,r)},e.prototype.emplace=function(t,e,n,r,i){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,t},e}(Si);Ki.prototype.bytesPerElement=16,jr("StructArrayLayout4f16",Ki);var $i=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(Ci);$i.prototype.size=20;var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new $i(this,t)},e}(Fi);jr("CollisionBoxArray",Ji);var Qi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,n),e}(Ci);Qi.prototype.size=48;var to=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Qi(this,t)},e}(qi);jr("PlacedSymbolArray",to);var eo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,n),e}(Ci);eo.prototype.size=68;var no=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new eo(this,t)},e}(Zi);jr("SymbolInstanceArray",no);var ro=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(Wi);jr("GlyphOffsetArray",ro);var io=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(Gi);jr("SymbolLineVertexArray",io);var oo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,n),e}(Ci);oo.prototype.size=8;var ao=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new oo(this,t)},e}(Xi);jr("FeatureIndexArray",ao);var so=Ti([{name:"a_pos",components:2,type:"Int16"}],4).members,lo=function(t){void 0===t&&(t=[]),this.segments=t};function uo(t,e){return 256*(t=c(Math.floor(t),0,255))+c(Math.floor(e),0,255)}lo.prototype.prepareSegment=function(t,e,n,r){var i=this.segments[this.segments.length-1];return t>lo.MAX_VERTEX_ARRAY_LENGTH&&A("Max vertices per segment is "+lo.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>lo.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i},lo.prototype.get=function(){return this.segments},lo.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),ho=e((function(t){t.exports=function(t,e){for(var n,r=t.length,i=e^r,o=0;r>=4;)n=1540483477*(65535&(n=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&t.charCodeAt(o+2))<<16;case 2:i^=(255&t.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),fo=po,mo=ho;fo.murmur3=po,fo.murmur2=mo;var yo=function(){this.ids=[],this.positions=[],this.indexed=!1};yo.prototype.add=function(t,e,n,r){this.ids.push(vo(t)),this.positions.push(e,n,r)},yo.prototype.getPositions=function(t){for(var e=vo(t),n=0,r=this.ids.length-1;n>1;this.ids[i]>=e?r=i:n=i+1}for(var o=[];this.ids[n]===e;)o.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return o},yo.serialize=function(t,e){var n=new Float64Array(t.ids),r=new Uint32Array(t.positions);return function t(e,n,r,i){for(;r>1],a=r-1,s=i+1;;){do{a++}while(e[a]o);if(a>=s)break;_o(e,a,s),_o(n,3*a,3*s),_o(n,3*a+1,3*s+1),_o(n,3*a+2,3*s+2)}s-ra.x+1||la.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}function Vo(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Uo(t):[]}}function qo(t,e,n,r,i){t.emplaceBack(2*e+(r+1)/2,2*n+(i+1)/2)}var Zo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Pi,this.indexArray=new Vi,this.segments=new lo,this.programConfigurations=new Lo(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Wo(t,e){for(var n=0;n1){if(Yo(t,e))return!0;for(var r=0;r1?n:n.sub(e)._mult(i)._add(e))}function Qo(t,e){for(var n,r,i,o=!1,a=0;ae.y!=(i=n[l]).y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(o=!o);return o}function ta(t,e){for(var n=!1,r=0,i=t.length-1;re.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function ea(t,e,n){var r=n[0],i=n[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var o=E(t,e,n[0]);return o!==E(t,e,n[1])||o!==E(t,e,n[2])||o!==E(t,e,n[3])}function na(t,e,n){var r=e.paint.get(t).value;return"constant"===r.kind?r.value:n.programConfigurations.get(e.id).getMaxValue(t)}function ra(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ia(t,e,n,r,o){if(!e[0]&&!e[1])return t;var a=i.convert(e)._mult(o);"viewport"===n&&a._rotate(-r);for(var s=[],l=0;l=8192||c<0||c>=8192)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=p.vertexLength;qo(this.layoutVertexArray,u,c,-1,-1),qo(this.layoutVertexArray,u,c,1,-1),qo(this.layoutVertexArray,u,c,1,1),qo(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,n,{},r)},jr("CircleBucket",Zo,{omit:["layers"]});var oa=new wi({"circle-sort-key":new vi(It.layout_circle["circle-sort-key"])}),aa={paint:new wi({"circle-radius":new vi(It.paint_circle["circle-radius"]),"circle-color":new vi(It.paint_circle["circle-color"]),"circle-blur":new vi(It.paint_circle["circle-blur"]),"circle-opacity":new vi(It.paint_circle["circle-opacity"]),"circle-translate":new gi(It.paint_circle["circle-translate"]),"circle-translate-anchor":new gi(It.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new gi(It.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new gi(It.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new vi(It.paint_circle["circle-stroke-width"]),"circle-stroke-color":new vi(It.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new vi(It.paint_circle["circle-stroke-opacity"])}),layout:oa},sa="undefined"!=typeof Float32Array?Float32Array:Array;function la(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ua(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],g=e[14],v=e[15],_=n[0],b=n[1],x=n[2],w=n[3];return t[0]=_*r+b*s+x*p+w*m,t[1]=_*i+b*l+x*h+w*y,t[2]=_*o+b*u+x*f+w*g,t[3]=_*a+b*c+x*d+w*v,t[4]=(_=n[4])*r+(b=n[5])*s+(x=n[6])*p+(w=n[7])*m,t[5]=_*i+b*l+x*h+w*y,t[6]=_*o+b*u+x*f+w*g,t[7]=_*a+b*c+x*d+w*v,t[8]=(_=n[8])*r+(b=n[9])*s+(x=n[10])*p+(w=n[11])*m,t[9]=_*i+b*l+x*h+w*y,t[10]=_*o+b*u+x*f+w*g,t[11]=_*a+b*c+x*d+w*v,t[12]=(_=n[12])*r+(b=n[13])*s+(x=n[14])*p+(w=n[15])*m,t[13]=_*i+b*l+x*h+w*y,t[14]=_*o+b*u+x*f+w*g,t[15]=_*a+b*c+x*d+w*v,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,n=arguments.length;n--;)e+=t[n]*t[n];return Math.sqrt(e)});var ca,pa=ua;function ha(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}ca=new sa(3),sa!=Float32Array&&(ca[0]=0,ca[1]=0,ca[2]=0),function(){var t=new sa(4);sa!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var fa=(function(){var t=new sa(2);sa!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,aa)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new Zo(t)},e.prototype.queryRadius=function(t){var e=t;return na("circle-radius",this,e)+na("circle-stroke-width",this,e)+ra(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,i,o,a,s){for(var l=ia(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,n)+this.paint.get("circle-stroke-width").evaluate(e,n),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(t,e){return t.map((function(t){return da(t,e)}))}(l,s),h=c?u*a:u,f=0,d=r;ft.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l80*n){r=o=t[0],i=a=t[1];for(var d=n;do&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return za(h,f,n,r,i,u),f}function Ia(t,e,n,r,i){var o,a;if(i===ts(t,e,n,r)>0)for(o=e;o=e;o-=r)a=$a(o,t[o],t[o+1],a);return a&&Wa(a,a.next)&&(Ja(a),a=a.next),a}function Ma(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Wa(r,r.next)&&0!==Za(r.prev,r,r.next))r=r.next;else{if(Ja(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function za(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Na(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?Da(t,r,i,o):Oa(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),Ja(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?za(t=Ra(Ma(t),e,n),e,n,r,i,o,2):2===a&&La(t,e,n,r,i,o):za(Ma(t),e,n,r,i,o,1);break}}}function Oa(t){var e=t.prev,n=t,r=t.next;if(Za(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Va(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Za(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Da(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Za(i,o,a)>=0)return!1;for(var s=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,u=Na(i.x=u&&h&&h.z<=c;){if(p!==t.prev&&p!==t.next&&Va(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Za(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,h!==t.prev&&h!==t.next&&Va(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Za(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&Va(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Za(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;h&&h.z<=c;){if(h!==t.prev&&h!==t.next&&Va(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Za(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function Ra(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Wa(i,o)&&Ga(i,r,r.next,o)&&Ya(i,o)&&Ya(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Ja(r),Ja(r.next),r=t=o),r=r.next}while(r!==t);return Ma(r)}function La(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&qa(a,s)){var l=Ka(a,s);return a=Ma(a,a.next),l=Ma(l,l.next),za(a,e,n,r,i,o),void za(l,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function Ba(t,e){return t.x-e.x}function Fa(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&Va(on.x||r.x===n.x&&ja(n,r)))&&(n=r,h=l)),r=r.next}while(r!==u);return n}(t,e)){var n=Ka(e,t);Ma(e,e.next),Ma(n,n.next)}}function ja(t,e){return Za(t.prev,t,e.prev)<0&&Za(e.next,t,t.next)<0}function Na(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Ua(t){var e=t,n=t;do{(e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function qa(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Ga(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Ya(t,e)&&Ya(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(Za(t.prev,t,e.prev)||Za(t,e.prev,e))||Wa(t,e)&&Za(t.prev,t,t.next)>0&&Za(e.prev,e,e.next)>0)}function Za(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Wa(t,e){return t.x===e.x&&t.y===e.y}function Ga(t,e,n,r){var i=Ha(Za(t,e,n)),o=Ha(Za(t,e,r)),a=Ha(Za(n,r,t)),s=Ha(Za(n,r,e));return i!==o&&a!==s||!(0!==i||!Xa(t,n,e))||!(0!==o||!Xa(t,r,e))||!(0!==a||!Xa(n,t,r))||!(0!==s||!Xa(n,e,r))}function Xa(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Ha(t){return t>0?1:t<0?-1:0}function Ya(t,e){return Za(t.prev,t,t.next)<0?Za(t,e,t.next)>=0&&Za(t,t.prev,e)>=0:Za(t,e,t.prev)<0||Za(t,t.next,e)<0}function Ka(t,e){var n=new Qa(t.i,t.x,t.y),r=new Qa(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function $a(t,e,n,r){var i=new Qa(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Ja(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Qa(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ts(t,e,n,r){for(var i=0,o=e,a=n-r;or;){if(i-r>600){var a=i-r+1,s=n-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,n,Math.max(r,Math.floor(n-s*u/a+c)),Math.min(i,Math.floor(n+(a-s)*u/a+c)),o)}var p=e[n],h=r,f=i;for(ns(e,r,n),o(e[i],p)>0&&ns(e,r,i);h0;)f--}0===o(e[r],p)?ns(e,r,f):ns(e,++f,i),f<=n&&(r=f+1),n<=f&&(i=f-1)}}(t,e,n||0,r||t.length-1,i||rs)}function ns(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function rs(t,e){return te?1:0}function is(t,e){var n=t.length;if(n<=1)return[t];for(var r,i,o=[],a=0;a1)for(var l=0;l0&&n.holes.push(r+=t[i-1].length)}return n},Ta.default=ka;var ls=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Pi,this.indexArray=new Vi,this.indexArray2=new Hi,this.programConfigurations=new Lo(t.layers,t.zoom),this.segments=new lo,this.segments2=new lo,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ls.prototype.populate=function(t,e,n){this.hasPattern=as("fill",this.layers,e);for(var r=this.layers[0].layout.get("fill-sort-key"),i=!r.isConstant(),o=[],a=0,s=t;a>3}if(o--,1===r||2===r)a+=t.readSVarint(),s+=t.readSVarint(),1===r&&(e&&l.push(e),e=[]),e.push(new i(a,s));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ds.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(r--,1===n||2===n)(i+=t.readSVarint())s&&(s=i),(o+=t.readSVarint())u&&(u=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,u]},ds.prototype.toGeoJSON=function(t,e,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=ds.types[this.type];function c(t){for(var e=0;e>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}(n))}function bs(t,e,n){if(3===t){var r=new gs(n,n.readVarint()+n.pos);r.length&&(e[r.name]=r)}}vs.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new fs(this._pbf,e,this.extent,this._keys,this._values)};var xs={VectorTile:function(t,e){this.layers=t.readFields(bs,{},e)},VectorTileFeature:fs,VectorTileLayer:gs},ws=xs.VectorTileFeature.types,As=Math.pow(2,13);function Es(t,e,n,r,i,o,a,s){t.emplaceBack(e,n,2*Math.floor(r*As)+a,i*As*2,o*As*2,Math.round(s))}var Cs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Mi,this.indexArray=new Vi,this.programConfigurations=new Lo(t.layers,t.zoom),this.segments=new lo,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Ss(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}Cs.prototype.populate=function(t,e,n){this.features=[],this.hasPattern=as("fill-extrusion",this.layers,e);for(var r=0,i=t;r8192}))||z.every((function(t){return t.y<0}))||z.every((function(t){return t.y>8192}))))for(var m=0,y=0;y=1){var v=d[y-1];if(!Ss(g,v)){p.vertexLength+4>lo.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _=g.sub(v)._perp()._unit(),b=v.dist(g);m+b>32768&&(m=0),Es(this.layoutVertexArray,g.x,g.y,_.x,_.y,0,0,m),Es(this.layoutVertexArray,g.x,g.y,_.x,_.y,0,1,m),Es(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,0,m+=b),Es(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,1,m);var x=p.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),p.vertexLength+=4,p.primitiveLength+=2}}}}if(p.vertexLength+l>lo.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===ws[t.type]){for(var w=[],A=[],E=p.vertexLength,C=0,S=s;C=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u0;if(A&&g>u){var C=c.dist(f);if(C>2*p){var S=c.sub(c.sub(f)._mult(p/C)._round());this.updateDistance(f,S),this.addCurrentVertex(S,m,0,0,h),f=S}}var T=f&&d,k=T?n:s?"butt":r;if(T&&"round"===k&&(xi&&(k="bevel"),"bevel"===k&&(x>2&&(k="flipbevel"),x100)v=y.mult(-1);else{var P=x*m.add(y).mag()/m.sub(y).mag();v._perp()._mult(P*(E?-1:1))}this.addCurrentVertex(c,v,0,0,h),this.addCurrentVertex(c,v.mult(-1),0,0,h)}else if("bevel"===k||"fakeround"===k){var I=-Math.sqrt(x*x-1),M=E?I:0,z=E?0:I;if(f&&this.addCurrentVertex(c,m,M,z,h),"fakeround"===k)for(var O=Math.round(180*w/Math.PI/20),D=1;D2*p){var N=c.add(d.sub(c)._mult(p/j)._round());this.updateDistance(c,N),this.addCurrentVertex(N,y,0,0,h),c=N}}}}},Ls.prototype.addCurrentVertex=function(t,e,n,r,i,o){void 0===o&&(o=!1);var a=e.y*r-e.x,s=-e.y-e.x*r;this.addHalfVertex(t,e.x+e.y*n,e.y-e.x*n,o,!1,n,i),this.addHalfVertex(t,a,s,o,!0,-r,i),this.distance>Rs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,n,r,i,o))},Ls.prototype.addHalfVertex=function(t,e,n,r,i,o,a){var s=.5*(this.lineClips?this.scaledDistance*(Rs-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t.x<<1)+(r?1:0),(t.y<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var l=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),i?this.e2=l:this.e1=l},Ls.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Ls.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},jr("LineBucket",Ls,{omit:["layers","patternFeatures"]});var Bs=new wi({"line-cap":new gi(It.layout_line["line-cap"]),"line-join":new vi(It.layout_line["line-join"]),"line-miter-limit":new gi(It.layout_line["line-miter-limit"]),"line-round-limit":new gi(It.layout_line["line-round-limit"]),"line-sort-key":new vi(It.layout_line["line-sort-key"])}),Fs={paint:new wi({"line-opacity":new vi(It.paint_line["line-opacity"]),"line-color":new vi(It.paint_line["line-color"]),"line-translate":new gi(It.paint_line["line-translate"]),"line-translate-anchor":new gi(It.paint_line["line-translate-anchor"]),"line-width":new vi(It.paint_line["line-width"]),"line-gap-width":new vi(It.paint_line["line-gap-width"]),"line-offset":new vi(It.paint_line["line-offset"]),"line-blur":new vi(It.paint_line["line-blur"]),"line-dasharray":new bi(It.paint_line["line-dasharray"]),"line-pattern":new _i(It.paint_line["line-pattern"]),"line-gradient":new xi(It.paint_line["line-gradient"])}),layout:Bs},js=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(e,n){return n=new li(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),t.prototype.possiblyEvaluate.call(this,e,n)},e.prototype.evaluate=function(e,n,r,i){return n=h({},n,{zoom:Math.floor(n.zoom)}),t.prototype.evaluate.call(this,e,n,r,i)},e}(vi))(Fs.paint.properties["line-width"].specification);js.useIntegerZoom=!0;var Ns=function(t){function e(e){t.call(this,e,Fs),this.gradientVersion=0}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Ze,this.gradientVersion=(this.gradientVersion+1)%s)},e.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},e.prototype.recalculate=function(e,n){t.prototype.recalculate.call(this,e,n),this.paint._values["line-floorwidth"]=js.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Ls(t)},e.prototype.queryRadius=function(t){var e=t,n=Us(na("line-width",this,e),na("line-gap-width",this,e)),r=na("line-offset",this,e);return n/2+Math.abs(r)+ra(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,n,r,o,a,s){var l=ia(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*Us(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),c=this.paint.get("line-offset").evaluate(e,n);return c&&(r=function(t,e){for(var n=[],r=new i(0,0),o=0;o=3)for(var o=0;o0?e+2*t:t}var Vs=Ti([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),qs=Ti([{name:"a_projected_pos",components:3,type:"Float32"}],4),Zs=(Ti([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Ti([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Ws=(Ti([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Ti([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Gs=Ti([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Xs(t,e,n){return t.sections.forEach((function(t){t.text=function(t,e,n){var r=e.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?t=t.toLocaleUpperCase():"lowercase"===r&&(t=t.toLocaleLowerCase()),si.applyArabicShaping&&(t=si.applyArabicShaping(t)),t}(t.text,e,n)})),t}Ti([{name:"triangle",components:3,type:"Uint16"}]),Ti([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Ti([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Ti([{type:"Float32",name:"offsetX"}]),Ti([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Hs={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Ys=function(t,e,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,p=n?i-1:0,h=n?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)},Ks=function(t,e,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?h/l:h*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=d,s/=256,i-=8);for(a=a<0;t[n+f]=255&a,f+=d,a/=256,u-=8);t[n+f-d]|=128*m},$s=Js;function Js(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Js.Varint=0,Js.Fixed64=1,Js.Bytes=2,Js.Fixed32=5;var Qs="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function tl(t){return t.type===Js.Bytes?t.readVarint()+t.pos:t.pos+1}function el(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function nl(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function rl(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function dl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function ml(t,e,n){1===t&&n.readMessage(yl,e)}function yl(t,e,n){if(3===t){var r=n.readMessage(gl,{}),i=r.width,o=r.height,a=r.left,s=r.top,l=r.advance;e.push({id:r.id,bitmap:new _a({width:i+6,height:o+6},r.bitmap),metrics:{width:i,height:o,left:a,top:s,advance:l}})}}function gl(t,e,n){1===t?e.id=n.readVarint():2===t?e.bitmap=n.readBytes():3===t?e.width=n.readVarint():4===t?e.height=n.readVarint():5===t?e.left=n.readSVarint():6===t?e.top=n.readSVarint():7===t&&(e.advance=n.readVarint())}function vl(t){for(var e=0,n=0,r=0,i=t;r=0;h--){var f=a[h];if(!(p.w>f.w||p.h>f.h)){if(p.x=f.x,p.y=f.y,l=Math.max(l,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===f.w&&p.h===f.h){var d=a.pop();h>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=hl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=dl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=hl(this.buf,this.pos)+4294967296*hl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=hl(this.buf,this.pos)+4294967296*dl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ys(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ys(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return el(t,r,e);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return el(t,r,e);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return el(t,r,e);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return el(t,r,e);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return el(t,r,e);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return el(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Qs?function(t,e,n){return Qs.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var r="",i=e;i239?4:l>223?3:l>191?2:1;if(i+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(a=t[i+2],128==(192&(o=t[i+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=t[i+2],s=t[i+3],128==(192&(o=t[i+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),i+=c}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Js.Bytes)return t.push(this.readVarint(e));var n=tl(this);for(t=t||[];this.pos127;);else if(e===Js.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Js.Fixed32)this.pos+=4;else{if(e!==Js.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var n,r;if(t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,n.buf[n.pos]=127&(t>>>=7)}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&nl(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),Ks(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Ks(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n=128&&nl(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,Js.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,rl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,sl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,ol,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,al,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,ll,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,ul,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,cl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,pl,e)},writeBytesField:function(t,e){this.writeTag(t,Js.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Js.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Js.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Js.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Js.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Js.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Js.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Js.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Js.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Js.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var _l=function(t,e){var n=e.pixelRatio,r=e.version,i=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=n,this.stretchX=i,this.stretchY=o,this.content=a,this.version=r},bl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};bl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},bl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},bl.tlbr.get=function(){return this.tl.concat(this.br)},bl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(_l.prototype,bl);var xl=function(t,e){var n={},r={};this.haveRenderCallbacks=[];var i=[];this.addImages(t,n,i),this.addImages(e,r,i);var o=vl(i),a=new ba({width:o.w||1,height:o.h||1});for(var s in t){var l=t[s],u=n[s].paddedRect;ba.copy(l.data,a,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in e){var p=e[c],h=r[c].paddedRect,f=h.x+1,d=h.y+1,m=p.data.width,y=p.data.height;ba.copy(p.data,a,{x:0,y:0},{x:f,y:d},p.data),ba.copy(p.data,a,{x:0,y:y-1},{x:f,y:d-1},{width:m,height:1}),ba.copy(p.data,a,{x:0,y:0},{x:f,y:d+y},{width:m,height:1}),ba.copy(p.data,a,{x:m-1,y:0},{x:f-1,y:d},{width:1,height:y}),ba.copy(p.data,a,{x:0,y:0},{x:f+m,y:d},{width:1,height:y})}this.image=a,this.iconPositions=n,this.patternPositions=r};xl.prototype.addImages=function(t,e,n){for(var r in t){var i=t[r],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};n.push(o),e[r]=new _l(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(r)}},xl.prototype.patchUpdatedImages=function(t,e){for(var n in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[n],t.getImage(n),e),this.patchUpdatedImage(this.patternPositions[n],t.getImage(n),e)},xl.prototype.patchUpdatedImage=function(t,e,n){if(t&&e&&t.version!==e.version){t.version=e.version;var r=t.tl;n.update(e.data,void 0,{x:r[0],y:r[1]})}},jr("ImagePosition",_l),jr("ImageAtlas",xl);var wl={horizontal:1,vertical:2,horizontalOnly:3},Al=function(){this.scale=1,this.fontStack="",this.imageName=null};Al.forText=function(t,e){var n=new Al;return n.scale=t||1,n.fontStack=e,n},Al.forImage=function(t){var e=new Al;return e.imageName=t,e};var El=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Cl(t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m){var y,g=El.fromFeature(t,i);p===wl.vertical&&g.verticalizePunctuation();var v=si.processBidirectionalText,_=si.processStyledBidirectionalText;if(v&&1===g.sections.length){y=[];for(var b=0,x=v(g.toString(),zl(g,u,o,e,r,f,d));b0&&F>C&&(C=F)}else{var j=n[T.fontStack],N=j&&j[P];if(N&&N.rect)z=N.rect,M=N.metrics;else{var U=e[T.fontStack],V=U&&U[P];if(!V)continue;M=V.metrics}I=24*(x-T.scale)}R?(t.verticalizable=!0,E.push({glyph:P,imageName:O,x:h,y:f+I,vertical:R,scale:T.scale,fontStack:T.fontStack,sectionIndex:k,metrics:M,rect:z}),h+=D*T.scale+u):(E.push({glyph:P,imageName:O,x:h,y:f+I,vertical:R,scale:T.scale,fontStack:T.fontStack,sectionIndex:k,metrics:M,rect:z}),h+=M.advance*T.scale+u)}0!==E.length&&(d=Math.max(h-u,d),Dl(E,0,E.length-1,y,C)),h=0;var q=o*x+C;A.lineOffset=Math.max(C,w),f+=q,m=Math.max(q,m),++g}else f+=o,++g}var Z,W=f- -17,G=Ol(a),X=G.horizontalAlign,H=G.verticalAlign;(function(t,e,n,r,i,o,a,s,l){var u,c=(e-n)*i;u=o!==a?-s*r- -17:(-r*l+.5)*a;for(var p=0,h=t;p=0&&r>=t&&Sl[this.text.charCodeAt(r)];r--)n--;this.text=this.text.substring(t,n),this.sectionIndex=this.sectionIndex.slice(t,n)},El.prototype.substring=function(t,e){var n=new El;return n.text=this.text.substring(t,e),n.sectionIndex=this.sectionIndex.slice(t,e),n.sections=this.sections,n},El.prototype.toString=function(){return this.text},El.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,n){return Math.max(e,t.sections[n].scale)}),0)},El.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(Al.forText(t.scale,t.fontStack||e));for(var n=this.sections.length-1,r=0;r=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var Sl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Tl={};function kl(t,e,n,r,i,o){if(e.imageName){var a=r[e.imageName];return a?a.displaySize[0]*e.scale*24/o+i:0}var s=n[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function Pl(t,e,n,r){var i=Math.pow(t-e,2);return r?t=0,p=0,h=0;h-n/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;sr;)u-=l.shift().angleDelta;if(u>i)return!1;a++,s+=c.dist(p)}return!0}function Vl(t){for(var e=0,n=0;nu){var d=(u-l)/f,m=We(p.x,h.x,d),y=We(p.y,h.y,d),g=new Ll(m,y,h.angleTo(p),c);return g._round(),!a||Ul(t,g,s,a,e)?g:void 0}l+=f}}function Gl(t,e,n,r,i,o,a,s,l){var u=ql(r,o,a),c=Zl(r,i),p=c*a,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-p=0&&x=0&&w=0&&f+c<=p){var A=new Ll(x,w,_,m);A._round(),i&&!Ul(e,A,a,i,o)||d.push(A)}}h+=v}return l||d.length||s||(d=t(e,h/2,r,i,o,a,s,!0,u)),d}(t,h?e/2*s%e:(c/2+2*o)*a*s%e,e,u,n,p,h,!1,l)}function Xl(t,e,n,r,o){for(var a=[],s=0;s=r&&h.x>=r||(p.x>=r?p=new i(r,p.y+(r-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x>=r&&(h=new i(r,p.y+(r-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new i(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round():h.y>=o&&(h=new i(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round()),u&&p.equals(u[u.length-1])||a.push(u=[p]),u.push(h)))))}return a}function Hl(t,e,n,r){var o=[],a=t.image,s=a.pixelRatio,l=a.paddedRect.w-2,u=a.paddedRect.h-2,c=t.right-t.left,p=t.bottom-t.top,h=a.stretchX||[[0,l]],f=a.stretchY||[[0,u]],d=function(t,e){return t+e[1]-e[0]},m=h.reduce(d,0),y=f.reduce(d,0),g=l-m,v=u-y,_=0,b=m,x=0,w=y,A=0,E=g,C=0,S=v;if(a.content&&r){var T=a.content;_=Yl(h,0,T[0]),x=Yl(f,0,T[1]),b=Yl(h,T[0],T[2]),w=Yl(f,T[1],T[3]),A=T[0]-_,C=T[1]-x,E=T[2]-T[0]-b,S=T[3]-T[1]-w}var k=function(r,o,l,u){var h=$l(r.stretch-_,b,c,t.left),f=Jl(r.fixed-A,E,r.stretch,m),d=$l(o.stretch-x,w,p,t.top),g=Jl(o.fixed-C,S,o.stretch,y),v=$l(l.stretch-_,b,c,t.left),T=Jl(l.fixed-A,E,l.stretch,m),k=$l(u.stretch-x,w,p,t.top),P=Jl(u.fixed-C,S,u.stretch,y),I=new i(h,d),M=new i(v,d),z=new i(v,k),O=new i(h,k),D=new i(f/s,g/s),R=new i(T/s,P/s),L=e*Math.PI/180;if(L){var B=Math.sin(L),F=Math.cos(L),j=[F,-B,B,F];I._matMult(j),M._matMult(j),O._matMult(j),z._matMult(j)}var N=r.stretch+r.fixed,U=o.stretch+o.fixed;return{tl:I,tr:M,bl:O,br:z,tex:{x:a.paddedRect.x+1+N,y:a.paddedRect.y+1+U,w:l.stretch+l.fixed-N,h:u.stretch+u.fixed-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:R,minFontScaleX:E/s/c,minFontScaleY:S/s/p,isSDF:n}};if(r&&(a.stretchX||a.stretchY))for(var P=Kl(h,g,m),I=Kl(f,v,y),M=0;M0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=a.top*s-l,y=a.bottom*s+l,g=a.left*s-l,v=a.right*s+l,_=a.collisionPadding;if(_&&(g-=_[0]*s,m-=_[1]*s,v+=_[2]*s,y+=_[3]*s),c){var b=new i(g,m),x=new i(v,m),w=new i(g,y),A=new i(v,y),E=c*Math.PI/180;b._rotate(E),x._rotate(E),w._rotate(E),A._rotate(E),g=Math.min(b.x,x.x,w.x,A.x),v=Math.max(b.x,x.x,w.x,A.x),m=Math.min(b.y,x.y,w.y,A.y),y=Math.max(b.y,x.y,w.y,A.y)}t.emplaceBack(e.x,e.y,g,m,v,y,n,r,o)}this.boxEndIndex=t.length},tu=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=eu),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function eu(t,e){return te?1:0}function nu(t,e,n){void 0===e&&(e=1),void 0===n&&(n=!1);for(var r=1/0,o=1/0,a=-1/0,s=-1/0,l=t[0],u=0;ua)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var p=Math.min(a-r,s-o),h=p/2,f=new tu([],ru);if(0===p)return new i(r,o);for(var d=r;dy.d||!y.d)&&(y=v,n&&console.log("found best %d after %d probes",Math.round(1e4*v.d)/1e4,g)),v.max-y.d<=e||(f.push(new iu(v.p.x-(h=v.h/2),v.p.y-h,h,t)),f.push(new iu(v.p.x+h,v.p.y-h,h,t)),f.push(new iu(v.p.x-h,v.p.y+h,h,t)),f.push(new iu(v.p.x+h,v.p.y+h,h,t)),g+=4)}return n&&(console.log("num probes: "+g),console.log("best distance: "+y.d)),y.p}function ru(t,e){return e.max-t.max}function iu(t,e,n,r){this.p=new i(t,e),this.h=n,this.d=function(t,e){for(var n=!1,r=1/0,i=0;it.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(n=!n),r=Math.min(r,Jo(t,u,c))}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}tu.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},tu.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},tu.prototype.peek=function(){return this.data[0]},tu.prototype._up=function(t){for(var e=this.data,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r},tu.prototype._down=function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t=0)break;e[t]=a,t=o}e[t]=i};var ou=Number.POSITIVE_INFINITY;function au(t,e){return e[1]!==ou?function(t,e,n){var r=0,i=0;switch(e=Math.abs(e),n=Math.abs(n),t){case"top-right":case"top-left":case"top":i=n-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-n}switch(t){case"top-right":case"bottom-right":case"right":r=-e;break;case"top-left":case"bottom-left":case"left":r=e}return[r,i]}(t,e[0],e[1]):function(t,e){var n=0,r=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":r=i-7;break;case"bottom-right":case"bottom-left":r=7-i;break;case"bottom":r=7-e;break;case"top":r=e-7}switch(t){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=e;break;case"right":n=-e}return[n,r]}(t,e[0])}function su(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function lu(t,e,n,r,o,a,s,l,u,c,p,h,f,d,m){var y=function(t,e,n,r,o,a,s,l){for(var u=r.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[],p=0,h=e.positionedLines;p32640&&A(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===g.kind&&((v=[128*d.compositeTextSizes[0].evaluate(s,{},m),128*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>32640||v[1]>32640)&&A(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,y,v,l,a,s,c,e,u.lineStartIndex,u.lineLength,f,m);for(var _=0,b=p;_=0;a--)if(r.dist(o[a])0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get("symbol-sort-key");if(this.features=[],l||u){for(var p=e.iconDependencies,h=e.glyphDependencies,f=e.availableImages,d=new li(this.zoom),m=0,y=t;m=0;for(var z=0,O=E.sections;z=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l0},vu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},vu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},vu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},vu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},vu.prototype.addIndicesForPlacedSymbol=function(t,e){for(var n=t.placedSymbolArray.get(e),r=n.vertexStartIndex+4*n.numGlyphs,i=n.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,r=this.symbolInstanceIndexes;n=0&&r.indexOf(t)===n&&e.addIndicesForPlacedSymbol(e.text,t)})),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,i.verticalPlacedTextSymbolIndex),i.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,i.placedIconSymbolIndex),i.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,i.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},jr("SymbolBucket",vu,{omit:["layers","collisionBoxArray","features","compareText"]}),vu.MAX_GLYPHS=65535,vu.addDynamicAttributes=du;var _u=new wi({"symbol-placement":new gi(It.layout_symbol["symbol-placement"]),"symbol-spacing":new gi(It.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new gi(It.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new vi(It.layout_symbol["symbol-sort-key"]),"symbol-z-order":new gi(It.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new gi(It.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new gi(It.layout_symbol["icon-ignore-placement"]),"icon-optional":new gi(It.layout_symbol["icon-optional"]),"icon-rotation-alignment":new gi(It.layout_symbol["icon-rotation-alignment"]),"icon-size":new vi(It.layout_symbol["icon-size"]),"icon-text-fit":new gi(It.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new gi(It.layout_symbol["icon-text-fit-padding"]),"icon-image":new vi(It.layout_symbol["icon-image"]),"icon-rotate":new vi(It.layout_symbol["icon-rotate"]),"icon-padding":new gi(It.layout_symbol["icon-padding"]),"icon-keep-upright":new gi(It.layout_symbol["icon-keep-upright"]),"icon-offset":new vi(It.layout_symbol["icon-offset"]),"icon-anchor":new vi(It.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new gi(It.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new gi(It.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new gi(It.layout_symbol["text-rotation-alignment"]),"text-field":new vi(It.layout_symbol["text-field"]),"text-font":new vi(It.layout_symbol["text-font"]),"text-size":new vi(It.layout_symbol["text-size"]),"text-max-width":new vi(It.layout_symbol["text-max-width"]),"text-line-height":new gi(It.layout_symbol["text-line-height"]),"text-letter-spacing":new vi(It.layout_symbol["text-letter-spacing"]),"text-justify":new vi(It.layout_symbol["text-justify"]),"text-radial-offset":new vi(It.layout_symbol["text-radial-offset"]),"text-variable-anchor":new gi(It.layout_symbol["text-variable-anchor"]),"text-anchor":new vi(It.layout_symbol["text-anchor"]),"text-max-angle":new gi(It.layout_symbol["text-max-angle"]),"text-writing-mode":new gi(It.layout_symbol["text-writing-mode"]),"text-rotate":new vi(It.layout_symbol["text-rotate"]),"text-padding":new gi(It.layout_symbol["text-padding"]),"text-keep-upright":new gi(It.layout_symbol["text-keep-upright"]),"text-transform":new vi(It.layout_symbol["text-transform"]),"text-offset":new vi(It.layout_symbol["text-offset"]),"text-allow-overlap":new gi(It.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new gi(It.layout_symbol["text-ignore-placement"]),"text-optional":new gi(It.layout_symbol["text-optional"])}),bu={paint:new wi({"icon-opacity":new vi(It.paint_symbol["icon-opacity"]),"icon-color":new vi(It.paint_symbol["icon-color"]),"icon-halo-color":new vi(It.paint_symbol["icon-halo-color"]),"icon-halo-width":new vi(It.paint_symbol["icon-halo-width"]),"icon-halo-blur":new vi(It.paint_symbol["icon-halo-blur"]),"icon-translate":new gi(It.paint_symbol["icon-translate"]),"icon-translate-anchor":new gi(It.paint_symbol["icon-translate-anchor"]),"text-opacity":new vi(It.paint_symbol["text-opacity"]),"text-color":new vi(It.paint_symbol["text-color"],{runtimeType:Vt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new vi(It.paint_symbol["text-halo-color"]),"text-halo-width":new vi(It.paint_symbol["text-halo-width"]),"text-halo-blur":new vi(It.paint_symbol["text-halo-blur"]),"text-translate":new gi(It.paint_symbol["text-translate"]),"text-translate-anchor":new gi(It.paint_symbol["text-translate-anchor"])}),layout:_u},xu=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};xu.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},xu.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){return null},jr("FormatSectionOverride",xu,{omit:["defaultValue"]});var wu=function(t){function e(e){t.call(this,e,bu)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,n){if(t.prototype.recalculate.call(this,e,n),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var r=this.layout.get("text-writing-mode");if(r){for(var i=[],o=0,a=r;o",targetMapId:r,sourceMapId:o.mapId})}}},Lu.prototype.receive=function(t){var e=t.data,n=e.id;if(n&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[n];var r=this.cancelCallbacks[n];delete this.cancelCallbacks[n],r&&r()}else S()||e.mustQueue?(this.tasks[n]=e,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,e)},Lu.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},Lu.prototype.processTask=function(t,e){var n=this;if(""===e.type){var r=this.callbacks[t];delete this.callbacks[t],r&&(e.error?r(Zr(e.error)):r(null,Zr(e.data)))}else{var i=!1,o=P(this.globalScope)?void 0:[],a=e.hasCallback?function(e,r){i=!0,delete n.cancelCallbacks[t],n.target.postMessage({id:t,type:"",sourceMapId:n.mapId,error:e?qr(e):null,data:qr(r,o)},o)}:function(t){i=!0},s=null,l=Zr(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},Lu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Fu=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};Fu.prototype.setNorthEast=function(t){return this._ne=t instanceof ju?new ju(t.lng,t.lat):ju.convert(t),this},Fu.prototype.setSouthWest=function(t){return this._sw=t instanceof ju?new ju(t.lng,t.lat):ju.convert(t),this},Fu.prototype.extend=function(t){var e,n,r=this._sw,i=this._ne;if(t instanceof ju)e=t,n=t;else{if(!(t instanceof Fu))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Fu.convert(t)):this.extend(ju.convert(t)):this;if(n=t._ne,!(e=t._sw)||!n)return this}return r||i?(r.lng=Math.min(e.lng,r.lng),r.lat=Math.min(e.lat,r.lat),i.lng=Math.max(n.lng,i.lng),i.lat=Math.max(n.lat,i.lat)):(this._sw=new ju(e.lng,e.lat),this._ne=new ju(n.lng,n.lat)),this},Fu.prototype.getCenter=function(){return new ju((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Fu.prototype.getSouthWest=function(){return this._sw},Fu.prototype.getNorthEast=function(){return this._ne},Fu.prototype.getNorthWest=function(){return new ju(this.getWest(),this.getNorth())},Fu.prototype.getSouthEast=function(){return new ju(this.getEast(),this.getSouth())},Fu.prototype.getWest=function(){return this._sw.lng},Fu.prototype.getSouth=function(){return this._sw.lat},Fu.prototype.getEast=function(){return this._ne.lng},Fu.prototype.getNorth=function(){return this._ne.lat},Fu.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Fu.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Fu.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Fu.prototype.contains=function(t){var e=ju.convert(t),n=e.lng,r=e.lat,i=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&i},Fu.convert=function(t){return!t||t instanceof Fu?t:new Fu(t)};var ju=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};ju.prototype.wrap=function(){return new ju(p(this.lng,-180,180),this.lat)},ju.prototype.toArray=function(){return[this.lng,this.lat]},ju.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},ju.prototype.distanceTo=function(t){var e=Math.PI/180,n=this.lat*e,r=t.lat*e,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},ju.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new Fu(new ju(this.lng-n,this.lat-e),new ju(this.lng+n,this.lat+e))},ju.convert=function(t){if(t instanceof ju)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new ju(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new ju(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Nu=2*Math.PI*6371008.8;function Uu(t){return Nu*Math.cos(t*Math.PI/180)}function Vu(t){return(180+t)/360}function qu(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Zu(t,e){return t/Uu(e)}function Wu(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}var Gu=function(t,e,n){void 0===n&&(n=0),this.x=+t,this.y=+e,this.z=+n};Gu.fromLngLat=function(t,e){void 0===e&&(e=0);var n=ju.convert(t);return new Gu(Vu(n.lng),qu(n.lat),Zu(e,n.lat))},Gu.prototype.toLngLat=function(){return new ju(360*this.x-180,Wu(this.y))},Gu.prototype.toAltitude=function(){return this.z*Uu(Wu(this.y))},Gu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Nu*(t=Wu(this.y),1/Math.cos(t*Math.PI/180));var t};var Xu=function(t,e,n){this.z=t,this.x=e,this.y=n,this.key=Ku(0,t,t,e,n)};Xu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Xu.prototype.url=function(t,e){var n,r,i,o,a,s=(r=this.y,i=this.z,o=Bu(256*(n=this.x),256*(r=Math.pow(2,i)-r-1),i),a=Bu(256*(n+1),256*(r+1),i),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(t,e,n){for(var r,i="",o=t;o>0;o--)i+=(e&(r=1<this.canonical.z?new Yu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Yu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Yu.prototype.calculateScaledKey=function(t,e){var n=this.canonical.z-t;return t>this.canonical.z?Ku(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Ku(this.wrap*+e,t,t,this.canonical.x>>n,this.canonical.y>>n)},Yu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},Yu.prototype.children=function(t){if(this.overscaledZ>=t)return[new Yu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Yu(e,this.wrap,e,n,r),new Yu(e,this.wrap,e,n+1,r),new Yu(e,this.wrap,e,n,r+1),new Yu(e,this.wrap,e,n+1,r+1)]},Yu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},$u.prototype._unpackMapbox=function(t,e,n){return(256*t*256+256*e+n)/10-1e4},$u.prototype._unpackTerrarium=function(t,e,n){return 256*t+e+n/256-32768},$u.prototype.getPixels=function(){return new ba({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},$u.prototype.backfillBorder=function(t,e,n){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var r=e*this.dim,i=e*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(e){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,l=-n*this.dim,u=o;u=0&&c[3]>=0&&s.insert(a,c[0],c[1],c[2],c[3])}},nc.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new xs.VectorTile(new $s(this.rawTileData)).layers,this.sourceLayerCoder=new Ju(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},nc.prototype.query=function(t,e,n,r){var o=this;this.loadVTLayers();for(var a=t.params||{},s=8192/t.tileSize/t.scale,l=sr(a.filter),u=t.queryGeometry,c=t.queryPadding*s,p=ic(u),h=this.grid.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c),f=ic(t.cameraQueryGeometry),d=0,m=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,(function(e,n,r,o){return function(t,e,n,r,o){for(var a=0,s=t;a=l.x&&o>=l.y)return!0}var u=[new i(e,n),new i(e,o),new i(r,o),new i(r,n)];if(t.length>2)for(var c=0,p=u;c=0)return!0;return!1}(o,p)){var f=this.sourceLayerCoder.decode(n),d=this.vtLayers[f].feature(r);if(i.needGeometry){var m=Vo(d,!0);if(!i.filter(new li(this.tileID.overscaledZ),m,this.tileID.canonical))return}else if(!i.filter(new li(this.tileID.overscaledZ),d))return;for(var y=this.getId(d,f),g=0;gr)i=!1;else if(e)if(this.expirationTimelt&&(t.getActor().send("enforceCacheSizeLimit",st),ht=0)},t.clamp=c,t.clearTileCache=function(t){var e=a.caches.delete("mapbox-tiles");t&&e.catch(t).then((function(){return t()}))},t.clipLine=Xl,t.clone=function(t){var e=new sa(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=x,t.clone$2=function(t){var e=new sa(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Gs,t.config=j,t.create=function(){var t=new sa(16);return sa!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new sa(9);return sa!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new sa(4);return sa!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Hn,t.createLayout=Ti,t.createStyleLayer=function(t){return"custom"===t.type?new Tu(t):new ku[t.type](t)},t.cross=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=i*l-o*s,t[1]=o*a-r*l,t[2]=r*s-i*a,t},t.deepEqual=function t(e,n){if(Array.isArray(e)){if(!Array.isArray(n)||e.length!==n.length)return!1;for(var r=0;r0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},t.number=We,t.offscreenCanvasSupported=ft,t.ortho=function(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(a+o)*u,t[15]=1,t},t.parseGlyphPBF=function(t){return new $s(t).readFields(ml,[])},t.pbf=$s,t.performSymbolLayout=function(t,e,n,r,i,o,a){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,l=t.layers[0]._unevaluatedLayout._values,u={};if("composite"===t.textSizeData.kind){var c=t.textSizeData,p=c.maxZoom;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new li(c.minZoom),a),l["text-size"].possiblyEvaluate(new li(p),a)]}if("composite"===t.iconSizeData.kind){var h=t.iconSizeData,f=h.maxZoom;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new li(h.minZoom),a),l["icon-size"].possiblyEvaluate(new li(f),a)]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new li(t.zoom+1),a),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new li(t.zoom+1),a),u.textMaxSize=l["text-size"].possiblyEvaluate(new li(18));for(var d=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),y=s.get("text-keep-upright"),g=s.get("text-size"),v=function(){var o=b[_],l=s.get("text-font").evaluate(o,{},a).join(","),c=g.evaluate(o,{},a),p=u.layoutTextSize.evaluate(o,{},a),h=u.layoutIconSize.evaluate(o,{},a),f={horizontal:{},vertical:void 0},v=o.text,x=[0,0];if(v){var w=v.toString(),E=24*s.get("text-letter-spacing").evaluate(o,{},a),C=function(t){for(var e=0,n=t;e=8192||p.y<0||p.y>=8192||function(t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m,y,g,v,_,b,x,w,E,C){var S,T,k,P,I,M=t.addToLineVertexArray(e,n),z=0,O=0,D=0,R=0,L=-1,B=-1,F={},j=fo(""),N=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(N=(S=s.layout.get("text-offset").evaluate(b,{},E).map((function(t){return 24*t})))[0],U=S[1]):(N=24*s.layout.get("text-radial-offset").evaluate(b,{},E),U=ou),t.allowVerticalPlacement&&r.vertical){var V=s.layout.get("text-rotate").evaluate(b,{},E)+90;P=new Ql(l,e,u,c,p,r.vertical,h,f,d,V),a&&(I=new Ql(l,e,u,c,p,a,y,g,d,V))}if(i){var q=s.layout.get("icon-rotate").evaluate(b,{}),Z="none"!==s.layout.get("icon-text-fit"),W=Hl(i,q,w,Z),G=a?Hl(a,q,w,Z):void 0;k=new Ql(l,e,u,c,p,i,y,g,!1,q),z=4*W.length;var X=t.iconSizeData,H=null;"source"===X.kind?(H=[128*s.layout.get("icon-size").evaluate(b,{})])[0]>32640&&A(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===X.kind&&((H=[128*x.compositeIconSizes[0].evaluate(b,{},E),128*x.compositeIconSizes[1].evaluate(b,{},E)])[0]>32640||H[1]>32640)&&A(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,W,H,_,v,b,!1,e,M.lineStartIndex,M.lineLength,-1,E),L=t.icon.placedSymbolArray.length-1,G&&(O=4*G.length,t.addSymbols(t.icon,G,H,_,v,b,wl.vertical,e,M.lineStartIndex,M.lineLength,-1,E),B=t.icon.placedSymbolArray.length-1)}for(var Y in r.horizontal){var K=r.horizontal[Y];if(!T){j=fo(K.text);var $=s.layout.get("text-rotate").evaluate(b,{},E);T=new Ql(l,e,u,c,p,K,h,f,d,$)}var J=1===K.positionedLines.length;if(D+=lu(t,e,K,o,s,d,b,m,M,r.vertical?wl.horizontal:wl.horizontalOnly,J?Object.keys(r.horizontal):[Y],F,L,x,E),J)break}r.vertical&&(R+=lu(t,e,r.vertical,o,s,d,b,m,M,wl.vertical,["vertical"],F,B,x,E));var Q=T?T.boxStartIndex:t.collisionBoxArray.length,tt=T?T.boxEndIndex:t.collisionBoxArray.length,et=P?P.boxStartIndex:t.collisionBoxArray.length,nt=P?P.boxEndIndex:t.collisionBoxArray.length,rt=k?k.boxStartIndex:t.collisionBoxArray.length,it=k?k.boxEndIndex:t.collisionBoxArray.length,ot=I?I.boxStartIndex:t.collisionBoxArray.length,at=I?I.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};st=lt(T,st),st=lt(P,st),st=lt(k,st);var ut=(st=lt(I,st))>-1?1:0;ut&&(st*=C/24),t.glyphOffsetArray.length>=vu.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,L,B,j,Q,tt,et,nt,rt,it,ot,at,u,D,R,z,O,ut,0,h,N,U,st)}(t,p,s,n,r,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,x,C,l,_,w,S,d,e,o,u,c,a)};if("line"===T)for(var M=0,z=Xl(e.geometry,0,0,8192,8192);M1){var N=Wl(j,E,n.vertical||m,r,24,v);N&&I(j,N)}}else if("Polygon"===e.type)for(var U=0,V=is(e.geometry,0);U=k.maxzoom||"none"!==k.visibility&&(a(T,this.zoom,r),(m[k.id]=k.createBucket({index:c.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(x,y,this.tileID.canonical),c.bucketLayerIDs.push(T.map((function(t){return t.id}))))}}}var P=t.mapObject(y.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(P).length?o.send("getGlyphs",{uid:this.uid,stacks:P},(function(t,e){p||(p=t,h=e,z.call(l))})):h={};var I=Object.keys(y.iconDependencies);I.length?o.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){p||(p=t,f=e,z.call(l))})):f={};var M=Object.keys(y.patternDependencies);function z(){if(p)return s(p);if(h&&f&&d){var e=new i(h),n=new t.ImageAtlas(f,d);for(var o in m){var l=m[o];l instanceof t.SymbolBucket?(a(l.layers,this.zoom,r),t.performSymbolLayout(l,h,e.positions,f,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(a(l.layers,this.zoom,r),l.addFeatures(y,this.tileID.canonical,n.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter((function(t){return!t.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}M.length?o.send("getImages",{icons:M,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){p||(p=t,d=e,z.call(l))})):d={},z.call(this)};var l=function(t,e,n,r){this.actor=t,this.layerIndex=e,this.availableImages=n,this.loadVectorData=r||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,n){var r=this,i=e.uid;this.loading||(this.loading={});var a=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new o(e);s.abort=this.loadVectorData(e,(function(e,o){if(delete r.loading[i],e||!o)return s.status="done",r.loaded[i]=s,n(e);var l=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.cacheControl=o.cacheControl);var c={};if(a){var p=a.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,r.layerIndex,r.availableImages,r.actor,(function(e,r){if(e||!r)return n(e);n(null,t.extend({rawTileData:l.slice(0)},r,u,c))})),r.loaded=r.loaded||{},r.loaded[i]=s}))},l.prototype.reloadTile=function(t,e){var n=this,r=this.loaded,i=t.uid,o=this;if(r&&r[i]){var a=r[i];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,r){var i=a.reloadCallback;i&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,n.availableImages,o.actor,i)),e(t,r)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var n=this.loading,r=t.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),e()},l.prototype.removeTile=function(t,e){var n=this.loaded,r=t.uid;n&&n[r]&&delete n[r],e()};var u=t.window.ImageBitmap,c=function(){this.loaded={}};function p(t,e){if(0!==t.length){h(t[0],e);for(var n=1;n=0!=!!e&&t.reverse()}c.prototype.loadTile=function(e,n){var r=e.uid,i=e.encoding,o=e.rawImageData,a=u&&o instanceof u?this.getImageData(o):o,s=new t.DEMData(r,a,i);this.loaded=this.loaded||{},this.loaded[r]=s,n(null,s)},c.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var n=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:n.width,height:n.height},n.data)},c.prototype.removeTile=function(t){var e=this.loaded,n=t.uid;e&&e[n]&&delete e[n]};var f=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],n=0,r=this._feature.geometry;n>31}function k(t,e){for(var n=t.loadGeometry(),r=t.type,i=0,o=0,a=n.length,s=0;s>1;!function t(e,n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,n,r,Math.max(i,Math.floor(r-l*c/s+p)),Math.min(o,Math.floor(r+(s-l)*c/s+p)),a)}var h=n[2*r+a],f=i,d=o;for(I(e,n,i,r),n[2*o+a]>h&&I(e,n,i,o);fh;)d--}n[2*i+a]===h?I(e,n,i,d):I(e,n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(e,n,s,i,o,a%2),t(e,n,r,i,s-1,a+1),t(e,n,r,s+1,o,a+1)}}(a,s,r,0,a.length-1,0)};R.prototype.range=function(t,e,n,r){return function(t,e,n,r,i,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)l=e[2*d+1],(s=e[2*d])>=n&&s<=i&&l>=r&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);l=e[2*m+1],(s=e[2*m])>=n&&s<=i&&l>=r&&l<=o&&c.push(t[m]);var y=(p+1)%2;(0===p?n<=s:r<=l)&&(u.push(f),u.push(m-1),u.push(y)),(0===p?i>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(y))}}return c}(this.ids,this.coords,t,e,n,r,this.nodeSize)},R.prototype.within=function(t,e,n){return function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],s=[],l=i*i;a.length;){var u=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)z(e[2*h],e[2*h+1],n,r)<=l&&s.push(t[h]);else{var f=Math.floor((p+c)/2),d=e[2*f],m=e[2*f+1];z(d,m,n,r)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?n-i<=d:r-i<=m)&&(a.push(p),a.push(f-1),a.push(y)),(0===u?n+i>=d:r+i>=m)&&(a.push(f+1),a.push(c),a.push(y))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)};var L={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},B=function(t){this.options=Z(Object.create(L),t),this.trees=new Array(this.options.maxZoom+1)};function F(t,e,n,r,i){return{x:t,y:e,zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function j(t,e){var n=t.geometry.coordinates,r=n[1];return{x:V(n[0]),y:q(r),zoom:1/0,index:e,parentId:-1}}function N(t){return{type:"Feature",id:t.id,properties:U(t),geometry:{type:"Point",coordinates:[(r=t.x,360*(r-.5)),(e=t.y,n=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var e,n,r}function U(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return Z(Z({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function V(t){return t/360+.5}function q(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Z(t,e){for(var n in e)t[n]=e[n];return t}function W(t){return t.x}function G(t){return t.y}function X(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var l=((t-n)*a+(e-r)*s)/(a*a+s*s);l>1?(n=i,r=o):l>0&&(n+=a*l,r+=s*l)}return(a=t-n)*a+(s=e-r)*s}function H(t,e,n,r){var i={id:void 0===t?null:t,type:e,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,n=t.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)Y(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r0&&(a+=r?(i*u-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-o,2))),i=l,o=u}var c=e.length-3;e[2]=1,function t(e,n,r,i){for(var o,a=i,s=r-n>>1,l=r-n,u=e[n],c=e[n+1],p=e[r],h=e[r+1],f=n+3;fa)o=f,a=d;else if(d===a){var m=Math.abs(f-s);mi&&(o-n>3&&t(e,n,o,i),e[o+2]=a,r-o>3&&t(e,o,r,i))}(e,0,c,n),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function Q(t,e,n,r){for(var i=0;i1?1:n}function nt(t,e,n,r,i,o,a,s){if(r/=e,o>=(n/=e)&&a=r)return null;for(var l=[],u=0;u=n&&d=r)){var m=[];if("Point"===h||"MultiPoint"===h)rt(p,m,n,r,i);else if("LineString"===h)it(p,m,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===h)at(p,m,n,r,i,!1);else if("Polygon"===h)at(p,m,n,r,i,!0);else if("MultiPolygon"===h)for(var y=0;y=n&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function it(t,e,n,r,i,o,a){for(var s,l,u=ot(t),c=0===i?lt:ut,p=t.start,h=0;hn&&(l=c(u,f,d,y,g,n),a&&(u.start=p+s*l)):v>r?_=n&&(l=c(u,f,d,y,g,n),b=!0),_>r&&v<=r&&(l=c(u,f,d,y,g,r),b=!0),!o&&b&&(a&&(u.end=p+s*l),e.push(u),u=ot(t)),a&&(p+=s)}var x=t.length-3;f=t[x],d=t[x+1],m=t[x+2],(v=0===i?f:d)>=n&&v<=r&&st(u,f,d,m),x=u.length-3,o&&x>=3&&(u[x]!==u[0]||u[x+1]!==u[1])&&st(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ot(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function at(t,e,n,r,i,o){for(var a=0;aa.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function mt(t,e,n,r){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&e.size<(i?a:r))n.numPoints+=e.length/3;else{for(var s=[],l=0;la)&&(n.numSimplified++,s.push(e[l]),s.push(e[l+1])),n.numPoints++;i&&function(t,e){for(var n=0,r=0,i=t.length,o=i-2;r0===e)for(r=0,i=t.length;r24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var r=0;r=r;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new R(s,W,G,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return n&&console.timeEnd("total time"),this},B.prototype.getClusters=function(t,e){var n=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],e),s=this.getClusters([-180,r,i,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,p=l.range(V(n),q(o),V(i),q(r));ce&&(h+=m.numPoints||1)}if(h>=o){for(var y=l.x*p,g=l.y*p,v=i&&p>1?this._map(l,!0):null,_=(s<<5)+(e+1)+this.points.length,b=0,x=c;b1)for(var E=0,C=c;E>5},B.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},B.prototype._map=function(t,e){if(t.numPoints)return e?Z({},t.properties):t.properties;var n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?Z({},r):r},gt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},gt.prototype.splitTile=function(t,e,n,r,i,o,a){for(var s=[t,e,n,r],l=this.options,u=l.debug;s.length;){r=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var c=1<1&&console.time("creation"),h=this.tiles[p]=dt(t,e,n,r,l),this.tileCoords.push({z:e,x:n,y:r}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<1&&console.time("clipping");var m,y,g,v,_,b,x=.5*l.buffer/l.extent,w=.5-x,A=.5+x,E=1+x;m=y=g=v=null,_=nt(t,c,n-x,n+A,0,h.minX,h.maxX,l),b=nt(t,c,n+w,n+E,0,h.minX,h.maxX,l),t=null,_&&(m=nt(_,c,r-x,r+A,1,h.minY,h.maxY,l),y=nt(_,c,r+w,r+E,1,h.minY,h.maxY,l),_=null),b&&(g=nt(b,c,r-x,r+A,1,h.minY,h.maxY,l),v=nt(b,c,r+w,r+E,1,h.minY,h.maxY,l),b=null),u>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*n,2*r),s.push(y||[],e+1,2*n,2*r+1),s.push(g||[],e+1,2*n+1,2*r),s.push(v||[],e+1,2*n+1,2*r+1)}}},gt.prototype.getTile=function(t,e,n){var r=this.options,i=r.extent,o=r.debug;if(t<0||t>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var l,u=t,c=e,p=n;!l&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),l=this.tiles[vt(u,c,p)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,p),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,p,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?ht(this.tiles[s],i):null):null};var bt=function(e){function n(t,n,r,i){e.call(this,t,n,r,_t),i&&(this.loadGeoJSON=i)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(r&&r.request&&r.request.collectResourceTiming)&&new t.RequestPerformance(r.request);this.loadGeoJSON(r,(function(o,a){if(o||!a)return n(o);if("object"!=typeof a)return n(new Error("Input data given to '"+r.source+"' is not a valid GeoJSON object."));!function t(e,n){var r,i=e&&e.type;if("FeatureCollection"===i)for(r=0;r=0?0:e.button},n.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function n(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,n=this.requestors;e=0?1.2:1))}function g(t,e,n,r,i,o,a){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])e(null,{stack:n,id:i,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],_.loadGlyphRange(n,s,r.url,r.requestManager,(function(t,e){if(e){for(var n in e)r._doesCharSupportLocalGlyph(+n)||(o.glyphs[+n]=e[+n]);o.ranges[s]=!0}for(var i=0,a=l;i1&&(s=t[++a]);var u=Math.abs(l-s.left),c=Math.abs(l-s.right),p=Math.min(u,c),h=void 0,f=i/n*(r+1);if(s.isDash){var d=r-Math.abs(f);h=Math.sqrt(p*p+d*d)}else h=r-Math.sqrt(p*p+f*f);this.data[o+l]=Math.max(0,Math.min(255,h+128))}},A.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var n=t[e],r=t[e+1];n.zeroLength?t.splice(e,1):r&&r.isDash===n.isDash&&(r.left=n.left,t.splice(e,1))}var i=t[0],o=t[t.length-1];i.isDash===o.isDash&&(i.left=o.left-this.width,o.right=i.right+this.width);for(var a=this.width*this.nextRow,s=0,l=t[s],u=0;u1&&(l=t[++s]);var c=Math.abs(u-l.left),p=Math.abs(u-l.right),h=Math.min(c,p);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?h:-h)+128))}},A.prototype.addDash=function(e,n){var r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a=r&&e.x=i&&e.y0&&(l[new t.OverscaledTileID(e.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+10&&(r.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",r))}}))},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setData=function(e){var n=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)n.fire(new t.ErrorEvent(e));else{var r={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(r.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new t.Event("data",r))}})),this},n.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},n.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},n.prototype.getClusterLeaves=function(t,e,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:n},r),this},n.prototype._updateWorkerData=function(e){var n=this;this._loaded=!1;var r=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(r.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(i),this.actor.send(this.type+".loadData",r,(function(t,i){n._removed||i&&i.abandoned||(n._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[n.id]&&(n._resourceTiming=i.resourceTiming[n.id].slice(0)),n.actor.send(n.type+".coalesce",{source:r.source},null),e(t))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(e,n){var r=this,i=e.actor?"reloadTile":"loadTile";e.actor=this.actor,e.request=this.actor.send(i,{type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(t,o){return delete e.request,e.unloadVectorData(),e.aborted?n(null):t?n(t):(e.loadVectorData(o,r.map.painter,"reloadTile"===i),n(null))}))},n.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},n.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(t.Evented),M=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),z=function(e){function n(t,n,r,i){e.call(this),this.id=t,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=n}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(e,n){var r=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,o){r._loaded=!0,i?r.fire(new t.ErrorEvent(i)):o&&(r.image=o,e&&(r.coordinates=e),n&&n(),r._finishLoading())}))},n.prototype.loaded=function(){return this._loaded},n.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(t){this.map=t,this.load()},n.prototype.setCoordinates=function(e){var n=this;this.coordinates=e;var r=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0,s=e;an.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=e}},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,n=e.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,M.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(z),D=function(e){function n(n,r,i,o){e.call(this,n,r,i,o),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var n=this.map.painter.context,r=n.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,M.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(n,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[i];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];tthis.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},j.prototype.has=function(t){return t.wrapped().key in this.data},j.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},j.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},j.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},j.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},j.prototype.remove=function(t,e){if(!this.has(t))return this;var n=t.wrapped().key,r=void 0===e?0:this.data[n].indexOf(e),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this},j.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},j.prototype.filter=function(t){var e=[];for(var n in this.data)for(var r=0,i=this.data[n];r1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,n,r),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},n.prototype.getTile=function(t){return this.getTileByID(t.key)},n.prototype.getTileByID=function(t){return this._tiles[t]},n.prototype._retainLoadedChildren=function(t,e,n,r){for(var i in this._tiles){var o=this._tiles[i];if(!(r[i]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>n)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){r[a.key]=a;break}}}},n.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var n=this._loadedParentTiles[t.key];return n&&n.tileID.overscaledZ>=e?n:null}for(var r=t.overscaledZ-1;r>=e;r--){var i=t.scaledTo(r),o=this._getLoadedTile(i);if(o)return o}},n.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},n.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,n=Math.ceil(t.height/this._source.tileSize)+1,r=Math.floor(e*n*5),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)},n.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var n={};for(var r in this._tiles){var i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),n[i.tileID.key]=i}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},n.prototype.update=function(e){var r=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(t){return r._source.hasTile(t)})))):i=[];var o=e.coveringZoomLevel(this._source),a=Math.max(o-n.maxOverzooming,this._source.minzoom),s=Math.max(o+n.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,o);if(zt(this._source.type)){for(var u={},c={},p=0,h=Object.keys(l);pthis._source.maxzoom){var y=d.children(this._source.maxzoom)[0],g=this.getTile(y);if(g&&g.hasData()){r[y.key]=y;continue}}else{var v=d.children(this._source.maxzoom);if(r[v[0].key]&&r[v[1].key]&&r[v[2].key]&&r[v[3].key])continue}for(var _=m.wasRequested(),b=d.overscaledZ-1;b>=o;--b){var x=d.scaledTo(b);if(i[x.key])break;if(i[x.key]=!0,!(m=this.getTile(x))&&_&&(m=this._addTile(x)),m&&(r[x.key]=x,_=m.wasRequested(),m.hasData()))break}}}return r},n.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],n=void 0,r=this._tiles[t].tileID;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}e.push(r.key);var i=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(i))break;r=i}for(var o=0,a=e;o0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},n.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},n.prototype.tilesIn=function(e,n,r){var i=this,o=[],a=this.transform;if(!a)return o;for(var s=r?a.getCameraQueryGeometry(e):e,l=e.map((function(t){return a.pointCoordinate(t)})),u=s.map((function(t){return a.pointCoordinate(t)})),c=this.getIds(),p=1/0,h=1/0,f=-1/0,d=-1/0,m=0,y=u;m=0&&g[1].y+y>=0){var v=l.map((function(t){return s.getTilePoint(t)})),_=u.map((function(t){return s.getTilePoint(t)}));o.push({tile:r,tileID:s,queryGeometry:v,cameraQueryGeometry:_,scale:m})}}},_=0;_=t.browser.now())return!0}return!1},n.prototype.setFeatureState=function(t,e,n){this._state.updateState(t=t||"_geojsonTileLayer",e,n)},n.prototype.removeFeatureState=function(t,e,n){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,n)},n.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},n.prototype.setDependencies=function(t,e,n){var r=this._tiles[t];r&&r.setDependencies(e,n)},n.prototype.reloadTilesForDependencies=function(t,e){for(var n in this._tiles)this._tiles[n].hasDependency(t,e)&&this._reloadTile(n,"reloading");this._cache.filter((function(n){return!n.hasDependency(t,e)}))},n}(t.Evented);function Mt(t,e){var n=Math.abs(2*t.wrap)-+(t.wrap<0),r=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||r-n||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function zt(t){return"raster"===t||"image"===t||"video"===t}function Ot(){return new t.window.Worker(Yi.workerUrl)}It.maxOverzooming=10,It.maxUnderzooming=3;var Dt="mapboxgl_preloaded_worker_pool",Rt=function(){this.active={}};Rt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[n].mult(l))};var Kt=function(t,e,n){var r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/n),this.yCellCount=Math.ceil(e/n);for(var o=0;o=-e[0]&&n<=e[0]&&r>=-e[1]&&r<=e[1]}function ne(e,n,r,i,o,a,s,l){var u=i?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,r.transform.zoom),p=[256/r.width*2+1,256/r.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var f=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=r.transform.width/r.transform.height,y=!1,g=0;gMath.abs(r.x-n.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?n.yr.x)?{needsFlipping:!0}:null}function oe(e,n,r,i,o,a,s,l,u,c,p,h,f,d){var m,y=n/24,g=e.lineOffsetX*y,v=e.lineOffsetY*y;if(e.numGlyphs>1){var _=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,x=e.lineStartIndex+e.lineLength,w=re(y,l,g,v,r,p,h,e,u,a,f);if(!w)return{notEnoughRoom:!0};var A=Qt(w.first.point,s).point,E=Qt(w.last.point,s).point;if(i&&!r){var C=ie(e.writingMode,A,E,d);if(C)return C}m=[w.first];for(var S=e.glyphStartIndex+1;S<_-1;S++)m.push(se(y*l.getoffsetX(S),g,v,r,p,h,e.segment,b,x,u,a,f));m.push(w.last)}else{if(i&&!r){var T=Qt(h,o).point,k=e.lineStartIndex+e.segment+1,P=new t.Point(u.getx(k),u.gety(k)),I=Qt(P,o),M=I.signedDistanceFromCamera>0?I.point:ae(h,P,T,1,o),z=ie(e.writingMode,T,M,d);if(z)return z}var O=se(y*l.getoffsetX(e.glyphStartIndex),g,v,r,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f);if(!O)return{notEnoughRoom:!0};m=[O]}for(var D=0,R=m;D0?1:-1,m=0;i&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var y=d>0?l+s:l+s+1,g=o,v=o,_=0,b=0,x=Math.abs(f),w=[];_+b<=x;){if((y+=d)=u)return null;if(v=g,w.push(g),void 0===(g=h[y])){var A=new t.Point(c.getx(y),c.gety(y)),E=Qt(A,p);if(E.signedDistanceFromCamera>0)g=h[y]=E.point;else{var C=y-d;g=ae(0===_?a:new t.Point(c.getx(C),c.gety(C)),A,v,x-_+1,p)}}_+=b,b=v.dist(g)}var S=(x-_)/b,T=g.sub(v),k=T.mult(S)._add(v);k._add(T._unit()._perp()._mult(r*d));var P=m+Math.atan2(g.y-v.y,g.x-v.x);return w.push(k),{point:k,angle:P,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.prototype.insert=function(t,e,n,r,i){this._forEachCell(e,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},Kt.prototype.insertCircle=function(t,e,n,r){this._forEachCell(e-r,n-r,e+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(n),this.circles.push(r)},Kt.prototype._insertBoxCell=function(t,e,n,r,i,o){this.boxCells[i].push(o)},Kt.prototype._insertCircleCell=function(t,e,n,r,i,o){this.circleCells[i].push(o)},Kt.prototype._query=function(t,e,n,r,i,o){if(n<0||t>this.width||r<0||e>this.height)return!i&&[];var a=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(var s=0;s0:a},Kt.prototype._queryCircle=function(t,e,n,r,i){var o=t-n,a=t+n,s=e-n,l=e+n;if(a<0||o>this.width||l<0||s>this.height)return!r&&[];var u=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:r,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}},i),r?u.length>0:u},Kt.prototype.query=function(t,e,n,r,i){return this._query(t,e,n,r,!1,i)},Kt.prototype.hitTest=function(t,e,n,r,i){return this._query(t,e,n,r,!0,i)},Kt.prototype.hitTestCircle=function(t,e,n,r){return this._queryCircle(t,e,n,!0,r)},Kt.prototype._queryCell=function(t,e,n,r,i,o,a,s){var l=a.seenUids,u=this.boxCells[i];if(null!==u)for(var c=this.bboxes,p=0,h=u;p=c[d+0]&&r>=c[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var m=this.circleCells[i];if(null!==m)for(var y=this.circles,g=0,v=m;ga*a+s*s},Kt.prototype._circleAndRectCollide=function(t,e,n,r,i,o,a){var s=(o-r)/2,l=Math.abs(t-(r+s));if(l>s+n)return!1;var u=(a-i)/2,c=Math.abs(e-(i+u));if(c>u+n)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=n*n};var le=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var n=0;n=1;M--)I.push(k.path[M]);for(var z=1;z0){for(var L=I[0].clone(),B=I[0].clone(),F=1;F=C.x&&B.x<=S.x&&L.y>=C.y&&B.y<=S.y?[I]:B.xS.x||B.yS.y?[]:t.clipLine([I],C.x,C.y,S.x,S.y)}for(var j=0,N=R;j=this.screenRightBoundary||r<100||e>this.screenBottomBoundary},pe.prototype.isInsideGrid=function(t,e,n,r){return n>=0&&t=0&&e0?(this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(m=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={textOffset:y,width:n,height:r,anchor:t,textBoxScale:i,prevAnchor:m},this.markUsedJustification(h,t,p,f),h.allowVerticalPlacement&&(this.markUsedOrientation(h,f,p),this.placedOrientations[p.crossTileID]=f),{shift:g,placedGlyphBoxes:v}):void 0},xe.prototype.placeLayerBucketPart=function(e,n,r){var i=this,o=e.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,u=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,p=o.textPixelRatio,h=o.holdingForFade,f=o.collisionBoxArray,d=o.partiallyEvaluatedTextSize,m=o.collisionGroup,y=s.get("text-optional"),g=s.get("icon-optional"),v=s.get("text-allow-overlap"),_=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),x="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),A="viewport-y"===s.get("symbol-z-order"),E=v&&(_||!a.hasIconData()||g),C=_&&(v||!a.hasTextData()||y);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);var S=function(e,o){if(!n[e.crossTileID])if(h)i.placements[e.crossTileID]=new me(!1,!1,!1);else{var f,A=!1,S=!1,T=!0,k=null,P={box:null,offscreen:null},I={box:null,offscreen:null},M=null,z=null,O=0,D=0,R=0;o.textFeatureIndex?O=o.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),o.verticalTextFeatureIndex&&(D=o.verticalTextFeatureIndex);var L=o.textBox;if(L){var B=function(n){var r=t.WritingMode.horizontal;if(a.allowVerticalPlacement&&!n&&i.prevPlacement){var o=i.prevPlacement.placedOrientations[e.crossTileID];o&&(i.placedOrientations[e.crossTileID]=o,i.markUsedOrientation(a,r=o,e))}return r},F=function(n,r){if(a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var i=0,s=a.writingModes;i0&&(j=j.filter((function(t){return t!==N.anchor}))).unshift(N.anchor)}var U=function(t,n,r){for(var o=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!_?n:null,h={box:[],offscreen:!1},f=v?2*j.length:j.length,d=0;d=j.length,e,a,r,c);if(y&&(h=y.placedGlyphBoxes)&&h.box&&h.box.length){A=!0,k=y.shift;break}}return h};F((function(){return U(L,o.iconBox,t.WritingMode.horizontal)}),(function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&!(P&&P.box&&P.box.length)&&e.numVerticalGlyphVertices>0&&n?U(n,o.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),P&&(A=P.box,T=P.offscreen);var V=B(P&&P.box);if(!A&&i.prevPlacement){var q=i.prevPlacement.variableOffsets[e.crossTileID];q&&(i.variableOffsets[e.crossTileID]=q,i.markUsedJustification(a,q.anchor,e,V))}}else{var Z=function(t,n){var r=i.collisionIndex.placeCollisionBox(t,v,p,l,m.predicate);return r&&r.box&&r.box.length&&(i.markUsedOrientation(a,n,e),i.placedOrientations[e.crossTileID]=n),r};F((function(){return Z(L,t.WritingMode.horizontal)}),(function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&n?Z(n,t.WritingMode.vertical):{box:null,offscreen:null}})),B(P&&P.box&&P.box.length)}}if(A=(f=P)&&f.box&&f.box.length>0,T=f&&f.offscreen,e.useRuntimeCollisionCircles){var W=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),G=t.evaluateSizeForFeature(a.textSizeData,d,W),X=s.get("text-padding");M=i.collisionIndex.placeCollisionCircles(v,W,a.lineVertexArray,a.glyphOffsetArray,G,l,u,c,r,x,m.predicate,e.collisionCircleDiameter,X),A=v||M.circles.length>0&&!M.collisionDetected,T=T&&M.offscreen}if(o.iconFeatureIndex&&(R=o.iconFeatureIndex),o.iconBox){var H=function(t){var e=w&&k?be(t,k.x,k.y,b,x,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,_,p,l,m.predicate)};S=I&&I.box&&I.box.length&&o.verticalIconBox?(z=H(o.verticalIconBox)).box.length>0:(z=H(o.iconBox)).box.length>0,T=T&&z.offscreen}var Y=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=g||0===e.numIconVertices;if(Y||K?K?Y||(S=S&&A):A=S&&A:S=A=S&&A,A&&f&&f.box&&i.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),a.bucketInstanceId,I&&I.box&&D?D:O,m.ID),S&&z&&i.collisionIndex.insertCollisionBox(z.box,s.get("icon-ignore-placement"),a.bucketInstanceId,R,m.ID),M&&(A&&i.collisionIndex.insertCollisionCircles(M.circles,s.get("text-ignore-placement"),a.bucketInstanceId,O,m.ID),r)){var $=a.bucketInstanceId,J=i.collisionCircleArrays[$];void 0===J&&(J=i.collisionCircleArrays[$]=new ye);for(var Q=0;Q=0;--k){var P=T[k];S(a.symbolInstances.get(P),a.collisionArrays[P])}else for(var I=e.symbolInstanceStart;I=0&&(e.text.placedSymbolArray.get(l).crossTileID=o>=0&&l!==o?0:r.crossTileID)}},xe.prototype.markUsedOrientation=function(e,n,r){for(var i=n===t.WritingMode.horizontal||n===t.WritingMode.horizontalOnly?n:0,o=n===t.WritingMode.vertical?n:0,a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];a0,v=i.placedOrientations[o.crossTileID],_=v===t.WritingMode.vertical,b=v===t.WritingMode.horizontal||v===t.WritingMode.horizontalOnly;if(s>0||l>0){var x=Ie(y.text);d(e.text,s,_?Me:x),d(e.text,l,b?Me:x);var w=y.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=w||_?1:0)})),o.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=w||b?1:0);var A=i.variableOffsets[o.crossTileID];A&&i.markUsedJustification(e,A.anchor,o,v);var E=i.placedOrientations[o.crossTileID];E&&(i.markUsedJustification(e,"left",o,E),i.markUsedOrientation(e,E,o))}if(g){var C=Ie(y.icon),S=!(h&&o.verticalPlacedIconSymbolIndex&&_);o.placedIconSymbolIndex>=0&&(d(e.icon,o.numIconVertices,S?C:Me),e.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=y.icon.isHidden()),o.verticalPlacedIconSymbolIndex>=0&&(d(e.icon,o.numVerticalIconVertices,S?Me:C),e.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var T=e.collisionArrays[r];if(T){var k=new t.Point(0,0);if(T.textBox||T.verticalTextBox){var P=!0;if(u){var I=i.variableOffsets[m];I?(k=_e(I.anchor,I.width,I.height,I.textOffset,I.textBoxScale),c&&k._rotate(p?i.transform.angle:-i.transform.angle)):P=!1}T.textBox&&we(e.textCollisionBox.collisionVertexArray,y.text.placed,!P||_,k.x,k.y),T.verticalTextBox&&we(e.textCollisionBox.collisionVertexArray,y.text.placed,!P||b,k.x,k.y)}var M=Boolean(!b&&T.verticalIconBox);T.iconBox&&we(e.iconCollisionBox.collisionVertexArray,y.icon.placed,M,h?k.x:0,h?k.y:0),T.verticalIconBox&&we(e.iconCollisionBox.collisionVertexArray,y.icon.placed,!M,h?k.x:0,h?k.y:0)}}},y=0;yt},xe.prototype.setStale=function(){this.stale=!0};var Ae=Math.pow(2,25),Ee=Math.pow(2,24),Ce=Math.pow(2,17),Se=Math.pow(2,16),Te=Math.pow(2,9),ke=Math.pow(2,8),Pe=Math.pow(2,1);function Ie(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,n=Math.floor(127*t.opacity);return n*Ae+e*Ee+n*Ce+e*Se+n*Te+e*ke+n*Pe+e}var Me=0,ze=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&!t.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};ze.prototype.continuePlacement=function(t,e,n,r,i){for(var o=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=n[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new ze(s)),this._inProgressLayer.continuePlacement(r[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Oe.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Re=function(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var r=0;rt.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,i)}}for(var c=0;c1?"@2x":"",l=t.getJSON(n.transformRequest(n.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){l=null,a||(a=t,i=e,c())})),u=t.getImage(n.transformRequest(n.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){u=null,a||(a=t,o=e,c())}));function c(){if(a)r(a);else if(i&&o){var e=t.browser.getImageData(o),n={};for(var s in i){var l=i[s],u=l.width,c=l.height,p=l.x,h=l.y,f=l.sdf,d=l.pixelRatio,m=l.stretchX,y=l.stretchY,g=l.content,v=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,v,{x:p,y:h},{x:0,y:0},{width:u,height:c}),n[s]={data:v,pixelRatio:d,sdf:f,stretchX:m,stretchY:y,content:g}}r(null,n)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e,this.map._requestManager,(function(e,r){if(n._spriteRequest=null,e)n.fire(new t.ErrorEvent(e));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n._availableImages=n.imageManager.listImages(),n.dispatcher.broadcast("setImages",n._availableImages),n.fire(new t.Event("data",{dataType:"style"}))}))},n.prototype._validateLayer=function(e){var n=this.sourceCaches[e.source];if(n){var r=e.sourceLayer;if(r){var i=n.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+r+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},n.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},n.prototype._serializeLayers=function(t){for(var e=[],n=0,r=t;n0)throw new Error("Unimplemented: "+i.map((function(t){return t.command})).join(", ")+".");return r.forEach((function(t){"setTransition"!==t.command&&n[t.command].apply(n,t.args)})),this.stylesheet=e,!0},n.prototype.addImage=function(e,n){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,n),this._afterImageUpdated(e)},n.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},n.prototype.getImage=function(t){return this.imageManager.getImage(t)},n.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._afterImageUpdated(e)},n.prototype._afterImageUpdated=function(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(e,n,r){var i=this;if(void 0===r&&(r={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,n,null,r))){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var o=this.sourceCaches[e]=new It(e,n,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:e}})),o.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+n+'" is using it.')));var r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},n.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},n.prototype.addLayer=function(e,n,r){void 0===r&&(r={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var o;if("custom"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},r))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}var a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},n.prototype.moveLayer=function(e,n){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==n){var r=this._order.indexOf(e);this._order.splice(r,1);var i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(e){this._checkLoaded();var n=this._layers[e];if(n){n.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(t){return this._layers[t]},n.prototype.hasLayer=function(t){return t in this._layers},n.prototype.setLayerZoomRange=function(e,n,r){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(e,n,r){void 0===r&&(r={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,n))return null==n?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",n,null,r)||(i.filter=t.clone$1(n),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},n.prototype.setLayoutProperty=function(e,n,r,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getLayoutProperty(n),r)||(o.setLayoutProperty(n,r,i),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(e,n){var r=this.getLayer(e);if(r)return r.getLayoutProperty(n);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(e,n,r,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getPaintProperty(n),r)||(o.setPaintProperty(n,r,i)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},n.prototype.setFeatureState=function(e,n){this._checkLoaded();var r=e.source,i=e.sourceLayer,o=this.sourceCaches[r];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,e.id,n)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.removeFeatureState=function(e,n){this._checkLoaded();var r=e.source,i=this.sourceCaches[r];if(void 0!==i){var o=i.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?n&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(a,e.id,n):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(e){this._checkLoaded();var n=e.source,r=e.sourceLayer,i=this.sourceCaches[n];if(void 0!==i){if("vector"!==i.getSource().type||r)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(r,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},n.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,n=function(t){return"fill-extrusion"===e._layers[t].type},r={},i=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(n(a)){r[a]=o;for(var s=0,l=t;s=0;f--){var d=this._order[f];if(n(d))for(var m=i.length-1;m>=0;m--){var y=i[m].feature;if(r[y.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Qe=vn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),tn=vn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),en=vn("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),nn=vn("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),rn=vn("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),on=vn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),an=vn("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),sn=vn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),ln=vn("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),un=vn("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),cn=vn("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),pn=vn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),hn=vn("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),fn=vn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),dn=vn("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),mn=vn("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),yn=vn("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),gn=vn("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function vn(t,e){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=e.match(/attribute ([\w]+) ([\w]+)/g),i=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=o?o.concat(i):i,s={};return{fragmentSource:t=t.replace(n,(function(t,e,n,r,i){return s[i]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+n+" "+r+" "+i+";\n#else\nuniform "+n+" "+r+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:e=e.replace(n,(function(t,e,n,r,i){var o="float"===r?"vec2":"vec4",a=i.match(/color/)?"color":o;return s[i]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+n+" "+o+" a_"+i+";\nvarying "+n+" "+r+" "+i+";\n#else\nuniform "+n+" "+r+" u_"+i+";\n#endif\n":"vec4"===a?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+a+"(a_"+i+", u_"+i+"_t);\n#else\n "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+n+" "+o+" a_"+i+";\n#else\nuniform "+n+" "+r+" u_"+i+";\n#endif\n":"vec4"===a?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+n+" "+r+" "+i+" = a_"+i+";\n#else\n "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+n+" "+r+" "+i+" = unpack_mix_"+a+"(a_"+i+", u_"+i+"_t);\n#else\n "+n+" "+r+" "+i+" = u_"+i+";\n#endif\n"})),staticAttributes:r,staticUniforms:a}}var _n=Object.freeze({__proto__:null,prelude:We,background:Ge,backgroundPattern:Xe,circle:He,clippingMask:Ye,heatmap:Ke,heatmapTexture:$e,collisionBox:Je,collisionCircle:Qe,debug:tn,fill:en,fillOutline:nn,fillOutlinePattern:rn,fillPattern:on,fillExtrusion:an,fillExtrusionPattern:sn,hillshadePrepare:ln,hillshade:un,line:cn,lineGradient:pn,linePattern:hn,lineSDF:fn,raster:dn,symbolIcon:mn,symbolSDF:yn,symbolTextAndIcon:gn}),bn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function xn(t){for(var e=[],n=0;n>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}wn.prototype.draw=function(t,e,n,r,i,o,a,s,l,u,c,p,h,f,d,m){var y,g=t.gl;if(!this.failedToCreate){for(var v in t.program.set(this.program),t.setDepthMode(n),t.setStencilMode(r),t.setColorMode(i),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[v].set(a[v]);f&&f.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var _=(y={},y[g.LINES]=2,y[g.TRIANGLES]=3,y[g.LINE_STRIP]=1,y)[e],b=0,x=c.get();b0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:qn(i.paint.get("raster-hue-rotate"))};var o,a};function qn(t){t*=Math.PI/180;var e=Math.sin(t),n=Math.cos(t);return[(2*n+1)/3,(-Math.sqrt(3)*e-n+1)/3,(Math.sqrt(3)*e-n+1)/3]}var Zn,Wn=function(t,e,n,r,i,o,a,s,l,u){var c=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+r,u_texsize:u,u_texture:0}},Gn=function(e,n,r,i,o,a,s,l,u,c,p){var h=o.transform;return t.extend(Wn(e,n,r,i,o,a,s,l,u,c),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+p})},Xn=function(e,n,r,i,o,a,s,l,u,c){return t.extend(Gn(e,n,r,i,o,a,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Hn=function(t,e,n){return{u_matrix:t,u_opacity:e,u_color:n}},Yn=function(e,n,r,i,o,a){return t.extend(function(t,e,n,r){var i=n.imageManager.getPattern(t.from.toString()),o=n.imageManager.getPattern(t.to.toString()),a=n.imageManager.getPixelSize(),s=a.width,l=a.height,u=Math.pow(2,r.tileID.overscaledZ),c=r.tileSize*Math.pow(2,n.transform.tileZoom)/u,p=c*(r.tileID.canonical.x+r.tileID.wrap*u),h=c*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/he(r,1,n.transform.tileZoom),u_pixel_coord_upper:[p>>16,h>>16],u_pixel_coord_lower:[65535&p,65535&h]}}(i,a,r,o),{u_matrix:e,u_opacity:n})},Kn={fillExtrusion:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient),u_opacity:new t.Uniform1f(e,n.u_opacity)}},fillExtrusionPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_lightpos:new t.Uniform3f(e,n.u_lightpos),u_lightintensity:new t.Uniform1f(e,n.u_lightintensity),u_lightcolor:new t.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,n.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,n.u_height_factor),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade),u_opacity:new t.Uniform1f(e,n.u_opacity)}},fill:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},fillPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},fillOutline:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world)}},fillOutlinePattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_texsize:new t.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},circle:function(e,n){return{u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,n.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},collisionBox:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,n.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,n.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,n.u_overscale_factor)}},collisionCircle:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,n.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,n.u_viewport_size)}},debug:function(e,n){return{u_color:new t.UniformColor(e,n.u_color),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_overlay:new t.Uniform1i(e,n.u_overlay),u_overlay_scale:new t.Uniform1f(e,n.u_overlay_scale)}},clippingMask:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},heatmap:function(e,n){return{u_extrude_scale:new t.Uniform1f(e,n.u_extrude_scale),u_intensity:new t.Uniform1f(e,n.u_intensity),u_matrix:new t.UniformMatrix4f(e,n.u_matrix)}},heatmapTexture:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_world:new t.Uniform2f(e,n.u_world),u_image:new t.Uniform1i(e,n.u_image),u_color_ramp:new t.Uniform1i(e,n.u_color_ramp),u_opacity:new t.Uniform1f(e,n.u_opacity)}},hillshade:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_latrange:new t.Uniform2f(e,n.u_latrange),u_light:new t.Uniform2f(e,n.u_light),u_shadow:new t.UniformColor(e,n.u_shadow),u_highlight:new t.UniformColor(e,n.u_highlight),u_accent:new t.UniformColor(e,n.u_accent)}},hillshadePrepare:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_image:new t.Uniform1i(e,n.u_image),u_dimension:new t.Uniform2f(e,n.u_dimension),u_zoom:new t.Uniform1f(e,n.u_zoom),u_unpack:new t.Uniform4f(e,n.u_unpack)}},line:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels)}},lineGradient:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_image:new t.Uniform1i(e,n.u_image),u_image_height:new t.Uniform1f(e,n.u_image_height)}},linePattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_texsize:new t.Uniform2f(e,n.u_texsize),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_image:new t.Uniform1i(e,n.u_image),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_scale:new t.Uniform3f(e,n.u_scale),u_fade:new t.Uniform1f(e,n.u_fade)}},lineSDF:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_ratio:new t.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,n.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,n.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,n.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,n.u_sdfgamma),u_image:new t.Uniform1i(e,n.u_image),u_tex_y_a:new t.Uniform1f(e,n.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,n.u_tex_y_b),u_mix:new t.Uniform1f(e,n.u_mix)}},raster:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_tl_parent:new t.Uniform2f(e,n.u_tl_parent),u_scale_parent:new t.Uniform1f(e,n.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,n.u_buffer_scale),u_fade_t:new t.Uniform1f(e,n.u_fade_t),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image0:new t.Uniform1i(e,n.u_image0),u_image1:new t.Uniform1i(e,n.u_image1),u_brightness_low:new t.Uniform1f(e,n.u_brightness_low),u_brightness_high:new t.Uniform1f(e,n.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,n.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,n.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,n.u_spin_weights)}},symbolIcon:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture)}},symbolSDF:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texture:new t.Uniform1i(e,n.u_texture),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,n.u_is_halo)}},symbolTextAndIcon:function(e,n){return{u_is_size_zoom_constant:new t.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,n.u_size_t),u_size:new t.Uniform1f(e,n.u_size),u_camera_to_center_distance:new t.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,n.u_pitch),u_rotate_symbol:new t.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,n.u_fade_change),u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new t.Uniform1i(e,n.u_is_text),u_pitch_with_map:new t.Uniform1i(e,n.u_pitch_with_map),u_texsize:new t.Uniform2f(e,n.u_texsize),u_texsize_icon:new t.Uniform2f(e,n.u_texsize_icon),u_texture:new t.Uniform1i(e,n.u_texture),u_texture_icon:new t.Uniform1i(e,n.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,n.u_is_halo)}},background:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_color:new t.UniformColor(e,n.u_color)}},backgroundPattern:function(e,n){return{u_matrix:new t.UniformMatrix4f(e,n.u_matrix),u_opacity:new t.Uniform1f(e,n.u_opacity),u_image:new t.Uniform1i(e,n.u_image),u_pattern_tl_a:new t.Uniform2f(e,n.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,n.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,n.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,n.u_pattern_br_b),u_texsize:new t.Uniform2f(e,n.u_texsize),u_mix:new t.Uniform1f(e,n.u_mix),u_pattern_size_a:new t.Uniform2f(e,n.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,n.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,n.u_scale_a),u_scale_b:new t.Uniform1f(e,n.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,n.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,n.u_tile_units_to_pixels)}}};function $n(e,n,r,i,o,a,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),p=[],h=0,f=0,d=0;d0){var x=t.create(),w=v;t.mul(x,g.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(x,x,g.placementViewportMatrix),p.push({circleArray:b,circleOffset:f,transform:w,invTransform:x}),f=h+=b.length/4}_&&c.draw(l,u.LINES,Ct.disabled,St.disabled,e.colorModeForRenderPass(),kt.disabled,Mn(v,e.transform,y),r.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}}if(s&&p.length){var A=e.useProgram("collisionCircle"),E=new t.StructArrayLayout2f1f2i16;E.resize(4*h),E._trim();for(var C=0,S=0,T=p;S=0&&(m[g.associatedIconIndex]={shiftedAnchor:E,angle:C})}else ue(g.numGlyphs,f)}if(p){d.clear();for(var T=e.icon.placedSymbolArray,k=0;k0){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=n?(s-n.timeAdded)/a:-1,c=r.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!n||Math.abs(n.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),f=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var ur=new t.Color(1,0,0,1),cr=new t.Color(0,1,0,1),pr=new t.Color(0,0,1,1),hr=new t.Color(1,0,1,1),fr=new t.Color(0,1,1,1);function dr(t,e,n,r){yr(t,0,e+n/2,t.transform.width,n,r)}function mr(t,e,n,r){yr(t,e-n/2,0,n,t.transform.height,r)}function yr(e,n,r,i,o,a){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(n*t.browser.devicePixelRatio,r*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,o*t.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function gr(e,n,r){var i=e.context,o=i.gl,a=r.posMatrix,s=e.useProgram("debug"),l=Ct.disabled,u=St.disabled,c=e.colorModeForRenderPass();i.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(i,o.LINE_STRIP,l,u,c,kt.disabled,On(a,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var p=n.getTileByID(r.key).latestRawTileData,h=Math.floor((p&&p.byteLength||0)/1024),f=n.getTile(r).tileSize,d=512/Math.min(f,512)*(r.overscaledZ/e.transform.zoom)*.5,m=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(m+=" => "+r.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var n=t.debugOverlayCanvas,r=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(n),t.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(e,m+" "+h+"kb"),s.draw(i,o.TRIANGLES,l,u,Tt.alphaBlended,kt.disabled,On(a,t.Color.transparent,d),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var vr={symbol:function(e,n,r,i,o){if("translucent"===e.renderPass){var a=St.disabled,s=e.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(e,n,r,i,o,a,s){for(var l=n.transform,u="map"===o,c="map"===a,p=0,h=e;p256&&this.clearStencil(),n.setColorMode(Tt.disabled),n.setDepthMode(Ct.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=e;o256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new St({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_r.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new St({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_r.prototype.stencilConfigForOverlap=function(t){var e,n=this.context.gl,r=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=r[r.length-1].overscaledZ,o=r[0].overscaledZ-i+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s=0;this.currentLayer--){var b=this.style._layers[i[this.currentLayer]],x=o[b.source],w=c[b.source];this._renderTileClippingMasks(b,w),this.renderLayer(this,x,b,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},_r.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),n=this.imageManager.getPattern(t.to.toString());return!e||!n},_r.prototype.useProgram=function(t,e){this.cache=this.cache||{};var n=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new wn(this.context,t,_n[t],e,Kn[t],this._showOverdrawInspector)),this.cache[n]},_r.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_r.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_r.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},_r.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var br=function(t,e){this.points=t,this.planes=e};br.fromInvProjectionMatrix=function(e,n,r){var i=Math.pow(2,r),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(n){return t.transformMat4([],n,e)})).map((function(e){return t.scale$1([],e,1/e[3]/n*i)})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var n=t.sub([],o[e[0]],o[e[1]]),r=t.sub([],o[e[2]],o[e[1]]),i=t.normalize([],t.cross([],n,r)),a=-t.dot(i,o[e[1]]);return i.concat(a)}));return new br(o,a)};var xr=function(e,n){this.min=e,this.max=n,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};xr.prototype.quadrant=function(e){for(var n=[e%2==0,e<2],r=t.clone$2(this.min),i=t.clone$2(this.max),o=0;o=0;if(0===a)return 0;a!==n.length&&(r=!1)}if(r)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;pthis.max[l]-this.min[l])return 0}return 1};var wr=function(t,e,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=n,this.right=r};wr.prototype.interpolate=function(e,n,r){return null!=n.top&&null!=e.top&&(this.top=t.number(e.top,n.top,r)),null!=n.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,n.bottom,r)),null!=n.left&&null!=e.left&&(this.left=t.number(e.left,n.left,r)),null!=n.right&&null!=e.right&&(this.right=t.number(e.right,n.right,r)),this},wr.prototype.getCenter=function(e,n){var r=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+n-this.bottom)/2,0,n);return new t.Point(r,i)},wr.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},wr.prototype.clone=function(){return new wr(this.top,this.bottom,this.left,this.right)},wr.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Ar=function(e,n,r,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=n||22,this._minPitch=null==r?0:r,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new wr,this._posMatrixCache={},this._alignedPosMatrixCache={}},Er={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Ar.prototype.clone=function(){var t=new Ar(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Er.minZoom.get=function(){return this._minZoom},Er.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Er.maxZoom.get=function(){return this._maxZoom},Er.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Er.minPitch.get=function(){return this._minPitch},Er.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Er.maxPitch.get=function(){return this._maxPitch},Er.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Er.renderWorldCopies.get=function(){return this._renderWorldCopies},Er.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Er.worldSize.get=function(){return this.tileSize*this.scale},Er.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Er.size.get=function(){return new t.Point(this.width,this.height)},Er.bearing.get=function(){return-this.angle/Math.PI*180},Er.bearing.set=function(e){var n=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Er.pitch.get=function(){return this._pitch/Math.PI*180},Er.pitch.set=function(e){var n=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},Er.fov.get=function(){return this._fov/Math.PI*180},Er.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Er.zoom.get=function(){return this._zoom},Er.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Er.center.get=function(){return this._center},Er.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Er.padding.get=function(){return this._edgeInsets.toJSON()},Er.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Er.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Ar.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Ar.prototype.interpolatePadding=function(t,e,n){this._unmodified=!1,this._edgeInsets.interpolate(t,e,n),this._constrain(),this._calcMatrices()},Ar.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},Ar.prototype.getVisibleUnwrappedCoordinates=function(e){var n=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(r.x,i.x,o.x,a.x)),l=Math.floor(Math.max(r.x,i.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&n.push(new t.UnwrappedTileID(u,e));return n},Ar.prototype.coveringTiles=function(e){var n=this.coveringZoomLevel(e),r=n;if(void 0!==e.minzoom&&ne.maxzoom&&(n=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,n),a=[o*i.x,o*i.y,0],s=br.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=n);var u=function(t){return{aabb:new xr([t*o,0,0],[(t+1)*o,o,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],p=[],h=n,f=e.reparseOverscaled?r:n;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(u(-d)),c.push(u(d));for(c.push(u(0));c.length>0;){var m=c.pop(),y=m.x,g=m.y,v=m.fullyVisible;if(!v){var _=m.aabb.intersects(s);if(0===_)continue;v=2===_}var b=m.aabb.distanceX(a),x=m.aabb.distanceY(a),w=Math.max(Math.abs(b),Math.abs(x));if(m.zoom===h||w>3+(1<=l)p.push({tileID:new t.OverscaledTileID(m.zoom===h?f:m.zoom,m.wrap,m.zoom,y,g),distanceSq:t.sqrLen([a[0]-.5-y,a[1]-.5-g])});else for(var A=0;A<4;A++){var E=(y<<1)+A%2,C=(g<<1)+(A>>1);c.push({aabb:m.aabb.quadrant(A),zoom:m.zoom+1,x:E,y:C,wrap:m.wrap,fullyVisible:v})}}return p.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},Ar.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Er.unmodified.get=function(){return this._unmodified},Ar.prototype.zoomScale=function(t){return Math.pow(2,t)},Ar.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Ar.prototype.project=function(e){var n=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(n)*this.worldSize)},Ar.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Er.point.get=function(){return this.project(this.center)},Ar.prototype.setLocationAtPoint=function(e,n){var r=this.pointCoordinate(n),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(r.x-i.x),o.y-(r.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},Ar.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Ar.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Ar.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},Ar.prototype.coordinateLocation=function(t){return t.toLngLat()},Ar.prototype.pointCoordinate=function(e){var n=[e.x,e.y,0,1],r=[e.x,e.y,1,1];t.transformMat4(n,n,this.pixelMatrixInverse),t.transformMat4(r,r,this.pixelMatrixInverse);var i=n[3],o=r[3],a=n[1]/i,s=r[1]/o,l=n[2]/i,u=r[2]/o,c=l===u?0:(0-l)/(u-l);return new t.MercatorCoordinate(t.number(n[0]/i,r[0]/o,c)/this.worldSize,t.number(a,s,c)/this.worldSize)},Ar.prototype.coordinatePoint=function(e){var n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(n,n,this.pixelMatrix),new t.Point(n[0]/n[3],n[1]/n[3])},Ar.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Ar.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Ar.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Ar.prototype.calculatePosMatrix=function(e,n){void 0===n&&(n=!1);var r=e.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(l,n?this.alignedProjMatrix:this.projMatrix,l),i[r]=new Float32Array(l),i[r]},Ar.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Ar.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,n,r,i,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=t.mercatorYfromLat(p[1])*this.worldSize,e=(a=t.mercatorYfromLat(p[0])*this.worldSize)-oa&&(i=a-y)}if(this.lngRange){var g=f.x,v=u.x/2;g-vl&&(r=l-v)}void 0===r&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==r?r:f.x,void 0!==i?i:f.y))),this._unmodified=c,this._constraining=!1}},Ar.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var n=Math.PI/2+this._pitch,r=this._fov*(.5+e.y/this.height),i=Math.sin(r)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-r,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,u,l),c[8]=2*-e.x/this.width,c[9]=2*e.y/this.height,t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-a,-s,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=t.invert([],this.projMatrix);var p=this.width%2/2,h=this.height%2/2,f=Math.cos(this.angle),d=Math.sin(this.angle),m=a-Math.round(a)+f*p+d*h,y=s-Math.round(s)+f*h+d*p,g=new Float64Array(c);if(t.translate(g,g,[m>.5?m-1:m,y>.5?y-1:y,0]),this.alignedProjMatrix=g,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Ar.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},Ar.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},Ar.prototype.getCameraQueryGeometry=function(e){var n=this.getCameraPoint();if(1===e.length)return[e[0],n];for(var r=n.x,i=n.y,o=n.x,a=n.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Cr.prototype._updateHashUnthrottled=function(){var e=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,e)}catch(t){}};var Sr={linearity:.3,easing:t.bezier(0,0,.3,1)},Tr=t.extend({deceleration:2500,maxSpeed:1400},Sr),kr=t.extend({deceleration:20,maxSpeed:1400},Sr),Pr=t.extend({deceleration:1e3,maxSpeed:360},Sr),Ir=t.extend({deceleration:1e3,maxSpeed:90},Sr),Mr=function(t){this._map=t,this.clear()};function zr(t,e){(!t.duration||t.duration0&&n-e[0].time>160;)e.shift()},Mr.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var n={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},r=0,i=this._inertiaBuffer;r=this._clickTolerance||this._map.fire(new Dr(t.type,this._map,t))},Br.prototype.dblclick=function(t){return this._firePreventable(new Dr(t.type,this._map,t))},Br.prototype.mouseover=function(t){this._map.fire(new Dr(t.type,this._map,t))},Br.prototype.mouseout=function(t){this._map.fire(new Dr(t.type,this._map,t))},Br.prototype.touchstart=function(t){return this._firePreventable(new Rr(t.type,this._map,t))},Br.prototype.touchmove=function(t){this._map.fire(new Rr(t.type,this._map,t))},Br.prototype.touchend=function(t){this._map.fire(new Rr(t.type,this._map,t))},Br.prototype.touchcancel=function(t){this._map.fire(new Rr(t.type,this._map,t))},Br.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Br.prototype.isEnabled=function(){return!0},Br.prototype.isActive=function(){return!1},Br.prototype.enable=function(){},Br.prototype.disable=function(){};var Fr=function(t){this._map=t};Fr.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Fr.prototype.mousemove=function(t){this._map.fire(new Dr(t.type,this._map,t))},Fr.prototype.mousedown=function(){this._delayContextMenu=!0},Fr.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Dr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Fr.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Dr(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Fr.prototype.isEnabled=function(){return!0},Fr.prototype.isActive=function(){return!1},Fr.prototype.enable=function(){},Fr.prototype.disable=function(){};var jr=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Nr(t,e){for(var n={},r=0;rthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=function(e){for(var n=new t.Point(0,0),r=0,i=e;r30)&&(this.aborted=!0)}}},Ur.prototype.touchend=function(t,e,n){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}};var Vr=function(t){this.singleTap=new Ur(t),this.numTaps=t.numTaps,this.reset()};Vr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Vr.prototype.touchstart=function(t,e,n){this.singleTap.touchstart(t,e,n)},Vr.prototype.touchmove=function(t,e,n){this.singleTap.touchmove(t,e,n)},Vr.prototype.touchend=function(t,e,n){var r=this.singleTap.touchend(t,e,n);if(r){var i=t.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(r)<30;if(i&&o||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}};var qr=function(){this._zoomIn=new Vr({numTouches:1,numTaps:2}),this._zoomOut=new Vr({numTouches:2,numTaps:1}),this.reset()};qr.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},qr.prototype.touchstart=function(t,e,n){this._zoomIn.touchstart(t,e,n),this._zoomOut.touchstart(t,e,n)},qr.prototype.touchmove=function(t,e,n){this._zoomIn.touchmove(t,e,n),this._zoomOut.touchmove(t,e,n)},qr.prototype.touchend=function(t,e,n){var r=this,i=this._zoomIn.touchend(t,e,n),o=this._zoomOut.touchend(t,e,n);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):o?(this._active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(o)},{originalEvent:t})}}):void 0},qr.prototype.touchcancel=function(){this.reset()},qr.prototype.enable=function(){this._enabled=!0},qr.prototype.disable=function(){this._enabled=!1,this.reset()},qr.prototype.isEnabled=function(){return this._enabled},qr.prototype.isActive=function(){return this._active};var Zr={0:1,2:2},Wr=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Wr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Wr.prototype._correctButton=function(t,e){return!1},Wr.prototype._move=function(t,e){return{}},Wr.prototype.mousedown=function(t,e){if(!this._lastPoint){var r=n.mouseButton(t);this._correctButton(t,r)&&(this._lastPoint=e,this._eventButton=r)}},Wr.prototype.mousemoveWindow=function(t,e){var n=this._lastPoint;if(n)if(t.preventDefault(),function(t,e){var n=Zr[e];return void 0===t.buttons||(t.buttons&n)!==n}(t,this._eventButton))this.reset();else if(this._moved||!(e.dist(n)0&&(this._active=!0);var i=Nr(r,n),o=new t.Point(0,0),a=new t.Point(0,0),s=0;for(var l in i){var u=i[l],c=this._touches[l];c&&(o._add(u),a._add(u.sub(c)),s++,i[l]=u)}if(this._touches=i,!(sMath.abs(t.x)}var ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,n){var r=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(r,i,n.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(r.y+i.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,n){if(void 0!==this._valid)return this._valid;var r=t.mag()>=2,i=e.mag()>=2;if(r||i){if(!r||!i)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;var o=t.y>0==e.y>0;return ni(t)&&ni(e)&&o}},e}(Kr),ii={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ii;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1};function ai(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var n=0,r=0,i=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(r=0,i=0),{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ai,zoom:n?Math.round(l)+n*(t.shiftKey?2:1):l,bearing:s.getBearing()+r*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-o*e._panStep,-a*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active},oi.prototype.disableRotation=function(){this._rotationDisabled=!0},oi.prototype.enableRotation=function(){this._rotationDisabled=!1};var si=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onTimeout"],this)};si.prototype.setZoomRate=function(t){this._defaultZoomRate=t},si.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},si.prototype.isEnabled=function(){return!!this._enabled},si.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},si.prototype.isZooming=function(){return!!this._zooming},si.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},si.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},si.prototype.wheel=function(e){if(this.isEnabled()){var n=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=t.browser.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%4.000244140625==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this._active||this._start(e)),e.preventDefault()}},si.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},si.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var r=n.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},si.prototype.renderFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var n=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);var o="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:n.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(p);a=t.number(l,s,h),p<1?this._frameId||(this._frameId=!0):c=!0}else a=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},si.prototype._smoothOutEasing=function(e){var n=t.ease;if(this._prevEase){var r=this._prevEase,i=(t.browser.now()-r.start)/r.duration,o=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);n=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:n},n},si.prototype.reset=function(){this._active=!1};var li=function(t,e){this._clickZoom=t,this._tapZoom=e};li.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},li.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},li.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},li.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(t.shiftKey?-1:1),around:n.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var ci=function(){this._tap=new Vr({numTouches:1,numTaps:1}),this.reset()};ci.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ci.prototype.touchstart=function(t,e,n){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=e[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(t,e,n))},ci.prototype.touchmove=function(t,e,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var r=e[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,n)},ci.prototype.touchend=function(t,e,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(t,e,n)&&(this._tapTime=t.timeStamp)},ci.prototype.touchcancel=function(){this.reset()},ci.prototype.enable=function(){this._enabled=!0},ci.prototype.disable=function(){this._enabled=!1,this.reset()},ci.prototype.isEnabled=function(){return this._enabled},ci.prototype.isActive=function(){return this._active};var pi=function(t,e,n){this._el=t,this._mousePan=e,this._touchPan=n};pi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")},pi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")},pi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},pi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var hi=function(t,e,n){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=n};hi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},hi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},hi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},hi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var fi=function(t,e,n,r){this._el=t,this._touchZoom=e,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0};fi.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")},fi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")},fi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},fi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},fi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},fi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var di=function(t){return t.zoom||t.drag||t.pitch||t.rotate},mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(t.Event);function yi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var gi=function(e,r){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Mr(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),t.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[t.window,"blur",void 0]];for(var o=0,a=this._listeners;oo?Math.min(2,x):Math.max(.5,x),w=Math.pow(y,1-e),A=i.unproject(_.add(b.mult(e*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?A.wrap():A,d)}r._fireMoveEvents(n)}),(function(t){r._afterEase(n,t)}),e),this},n.prototype._prepareEase=function(e,n,r){void 0===r&&(r={}),this._moving=!0,n||r.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!r.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new t.Event("pitchstart",e))},n.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},n.prototype._afterEase=function(e,n){if(!this._easeId||!n||this._easeId!==n){delete this._easeId;var r=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},n.prototype.flyTo=function(e,n){var r=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,n)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,o.minZoom,o.maxZoom):a,p="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,f="padding"in e?e.padding:o.padding,d=o.zoomScale(c-a),m=t.Point.convert(e.offset),y=o.centerPoint.add(m),g=o.pointLocation(y),v=t.LngLat.convert(e.center||g);this._normalizeCenter(v);var _=o.project(g),b=o.project(v).sub(_),x=e.curve,w=Math.max(o.width,o.height),A=w/d,E=b.mag();if("minZoom"in e){var C=t.clamp(Math.min(e.minZoom,a,c),o.minZoom,o.maxZoom),S=w/o.zoomScale(C-a);x=Math.sqrt(S/E*2)}var T=x*x;function k(t){var e=(A*A-w*w+(t?-1:1)*T*T*E*E)/(2*(t?A:w)*T*E);return Math.log(Math.sqrt(e*e+1)-e)}function P(t){return(Math.exp(t)-Math.exp(-t))/2}function I(t){return(Math.exp(t)+Math.exp(-t))/2}var M=k(0),z=function(t){return I(M)/I(M+x*t)},O=function(t){return w*((I(M)*(P(e=M+x*t)/I(e))-P(M))/T)/E;var e},D=(k(1)-M)/x;if(Math.abs(E)<1e-6||!isFinite(D)){if(Math.abs(w-A)<1e-6)return this.easeTo(e,n);var R=Ae.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=h!==l,this._padding=!o.isPaddingEqual(f),this._prepareEase(n,!1),this._ease((function(e){var i=e*D,d=1/z(i);o.zoom=1===e?c:a+o.scaleZoom(d),r._rotating&&(o.bearing=t.number(s,p,e)),r._pitching&&(o.pitch=t.number(l,h,e)),r._padding&&(o.interpolatePadding(u,f,e),y=o.centerPoint.add(m));var g=1===e?v:o.unproject(_.add(b.mult(O(i))).mult(d));o.setLocationAtPoint(o.renderWorldCopies?g.wrap():g,y),r._fireMoveEvents(n)}),(function(){return r._afterEase(n)}),e),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){return this._stop()},n.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,e)}if(!t){var r=this.handlers;r&&r.stop(!1)}return this},n.prototype._ease=function(e,n,r){!1===r.animate||0===r.duration?(e(1),n()):(this._easeStart=t.browser.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(e,n){e=t.wrap(e,-180,180);var r=Math.abs(e-n);return Math.abs(e-360-n)180?-360:n<-180?360:0}},n}(t.Evented),_i=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};_i.prototype.getDefaultPosition=function(){return"bottom-right"},_i.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("button","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._compactButton.type="button",this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),e&&this._container.classList.add("maplibregl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},_i.prototype.onRemove=function(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},_i.prototype._setElementTitle=function(t,e){var n=this._map._getUIString("AttributionControl."+e);t.title=n,t.setAttribute("aria-label",n)},_i.prototype._toggleAttribution=function(){this._container.classList.contains("maplibregl-compact-show")?(this._container.classList.remove("maplibregl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("maplibregl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},_i.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var r=n.reduce((function(t,e,r){return e.value&&(t+=e.key+"="+e.value+(r=0)return!1;return!0}))).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._editLink=null)}},_i.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("maplibregl-compact"):this._container.classList.remove("maplibregl-compact","maplibregl-compact-show")};var bi=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};bi.prototype.onAdd=function(t){this._map=t,this._container=n.create("div","maplibregl-ctrl");var e=n.create("a","maplibregl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://maplibre.org/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},bi.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},bi.prototype.getDefaultPosition=function(){return"bottom-left"},bi.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},bi.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},bi.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("maplibregl-compact"):e.classList.remove("maplibregl-compact")}};var xi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};xi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},xi.prototype.remove=function(t){for(var e=this._currentlyRunning,n=0,r=e?this._queue.concat(e):this._queue;ne.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var i=new Ar(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(r.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new xi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},wi,e.locale),this._clickTolerance=e.clickTolerance,this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Ei))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return n._update(!1)})),this.on("moveend",(function(){return n._update(!1)})),this.on("zoom",(function(){return n._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new gi(this,e),this._hash=e.hash&&new Cr("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new _i({customAttribution:e.customAttribution})),this.addControl(new bi,e.logoPosition),this.on("style.load",(function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)})),this.on("data",(function(e){n._update("style"===e.dataType),n.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){n.fire(new t.Event(e.dataType+"dataloading",e))}))}r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i;var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,n){if(void 0===n&&(n=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var r=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var n=this._controls.indexOf(e);return n>-1&&this._controls.splice(n,1),e.onRemove(this),this},i.prototype.hasControl=function(t){return this._controls.indexOf(t)>-1},i.prototype.resize=function(e){var n=this._containerDimensions(),r=n[0],i=n[1];this._resizeCanvas(r,i),this.transform.resize(r,i),this.painter.resize(r,i);var o=!this._moving;return o&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),o&&this.fire(new t.Event("moveend",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,n){var r,i=this;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){var a=i.getLayer(e)?i.queryRenderedFeatures(r.point,{layers:[e]}):[];a.length?o||(o=!0,n.call(i,new Dr(t,i,r.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:n,delegates:{mousemove:function(r){(i.getLayer(e)?i.queryRenderedFeatures(r.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,n.call(i,new Dr(t,i,r.originalEvent)))},mouseout:function(e){a&&(a=!1,n.call(i,new Dr(t,i,e.originalEvent)))}}}}return{layer:e,listener:n,delegates:(r={},r[t]=function(t){var r=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];r.length&&(t.features=r,n.call(i,t),delete t.features)},r)}},i.prototype.on=function(t,e,n){if(void 0===n)return r.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,n);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(o,i.delegates[o]);return this},i.prototype.once=function(t,e,n){if(void 0===n)return r.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,n);for(var o in i.delegates)this.once(o,i.delegates[o]);return this},i.prototype.off=function(t,e,n){var i=this;return void 0===n?r.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(r){for(var o=r[t],a=0;a180;){var s=r.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e}Mi.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),n.disableDrag()},Mi.prototype.move=function(t,e){var n=this.map,r=this.mouseRotate.mousemoveWindow(t,e);if(r&&r.bearingDelta&&n.setBearing(n.getBearing()+r.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&n.setPitch(n.getPitch()+i.pitchDelta)}},Mi.prototype.off=function(){var t=this.element;n.removeEventListener(t,"mousedown",this.mousedown),n.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(t,"touchmove",this.touchmove),n.removeEventListener(t,"touchend",this.touchend),n.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Mi.prototype.offTemp=function(){n.enableDrag(),n.removeEventListener(t.window,"mousemove",this.mousemove),n.removeEventListener(t.window,"mouseup",this.mouseup)},Mi.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),n.mousePos(this.element,e)),n.addEventListener(t.window,"mousemove",this.mousemove),n.addEventListener(t.window,"mouseup",this.mouseup)},Mi.prototype.mousemove=function(t){this.move(t,n.mousePos(this.element,t))},Mi.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Mi.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Mi.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=n.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Mi.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=n}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))},r.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},r.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},r.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},r.prototype.isDraggable=function(){return this._draggable},r.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},r.prototype.getRotation=function(){return this._rotation},r.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},r.prototype.getRotationAlignment=function(){return this._rotationAlignment},r.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},r.prototype.getPitchAlignment=function(){return this._pitchAlignment},r}(t.Evented),Bi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Fi=0,ji=!1,Ni=function(e){function r(n){e.call(this),this.options=t.extend({},Bi,n),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.onAdd=function(e){var r;return this._map=e,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),r=this._setupUI,void 0!==Ri?r(Ri):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then((function(t){r(Ri="denied"!==t.state)})):r(Ri=!!t.window.navigator.geolocation),this._container},r.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Fi=0,ji=!1},r.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),n=t.coords;return e&&(n.longitudee.getEast()||n.latitudee.getNorth())},r.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting")}},r.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},r.prototype._updateCamera=function(e){var n=new t.LngLat(e.coords.longitude,e.coords.latitude),r=e.coords.accuracy,i=this._map.getBearing(),o=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),o,{geolocateSource:!0})},r.prototype._updateMarker=function(e){if(e){var n=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},r.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),n=this._map.unproject([1,t]),r=e.distanceTo(n),i=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},r.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},r.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(e){var r=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=n.create("button","maplibregl-ctrl-geolocate",this._container),n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Li(this._dotElement),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Li({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){e.geolocateSource||"ACTIVE_LOCK"!==r._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),r.fire(new t.Event("trackuserlocationend")))}))},r.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fi--,ji=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Fi>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},r}(t.Evented),Ui={maxWidth:100,unit:"metric"},Vi=function(e){this.options=t.extend({},Ui,e),t.bindAll(["_onMove","setUnit"],this)};function qi(t,e,n){var r=n&&n.maxWidth||100,i=t._container.clientHeight/2,o=t.unproject([0,i]),a=t.unproject([r,i]),s=o.distanceTo(a);if(n&&"imperial"===n.unit){var l=3.2808*s;l>5280?Zi(e,r,l/5280,t._getUIString("ScaleControl.Miles")):Zi(e,r,l,t._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?Zi(e,r,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Zi(e,r,s/1e3,t._getUIString("ScaleControl.Kilometers")):Zi(e,r,s,t._getUIString("ScaleControl.Meters"))}function Zi(t,e,n,r){var i,o,a,s=(i=n,(o=Math.pow(10,(""+Math.floor(i)).length-1))*(a=(a=i/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(a)));t.style.width=e*(s/n)+"px",t.innerHTML=s+" "+r}Vi.prototype.getDefaultPosition=function(){return"bottom-left"},Vi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Vi.prototype.onAdd=function(t){return this._map=t,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Vi.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Vi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Wi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Wi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Wi.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Wi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Wi.prototype._setupUI=function(){var e=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Wi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Wi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Wi.prototype._isFullscreen=function(){return this._fullscreen},Wi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle())},Wi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Gi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Xi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Hi=function(e){function r(n){e.call(this),this.options=t.extend(Object.create(Gi),n),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this},r.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this},r.prototype.getElement=function(){return this._container},r.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},r.prototype.setHTML=function(e){var n,r=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;n=i.firstChild;)r.appendChild(n);return this.setDOMContent(r)},r.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},r.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},r.prototype.setDOMContent=function(t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(t),this._createCloseButton(),this._update(),this._focusFirstElement(),this},r.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},r.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},r.prototype.setOffset=function(t){return this.options.offset=t,this._update(),this},r.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},r.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},r.prototype._onMouseUp=function(t){this._update(t.point)},r.prototype._onMouseMove=function(t){this._update(t.point)},r.prototype._onDrag=function(t){this._update(t.point)},r.prototype._update=function(e){var r=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return r._container.classList.add(t)})),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=zi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=function e(n){if(n){if("number"==typeof n){var r=Math.round(Math.sqrt(.5*Math.pow(n,2)));return{center:new t.Point(0,0),top:new t.Point(0,n),"top-left":new t.Point(r,r),"top-right":new t.Point(-r,r),bottom:new t.Point(0,-n),"bottom-left":new t.Point(r,-r),"bottom-right":new t.Point(-r,-r),left:new t.Point(n,0),right:new t.Point(-n,0)}}if(n instanceof t.Point||Array.isArray(n)){var i=t.Point.convert(n);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:t.Point.convert(n.center||[0,0]),top:t.Point.convert(n.top||[0,0]),"top-left":t.Point.convert(n["top-left"]||[0,0]),"top-right":t.Point.convert(n["top-right"]||[0,0]),bottom:t.Point.convert(n.bottom||[0,0]),"bottom-left":t.Point.convert(n["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(n["bottom-right"]||[0,0]),left:t.Point.convert(n.left||[0,0]),right:t.Point.convert(n.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=i.y+a.bottom.ythis._map.transform.height-u?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=i.add(a[o]).round();n.setTransform(this._container,Oi[o]+" translate("+c.x+"px,"+c.y+"px)"),Di(this._container,o,"popup")}},r.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var t=this._container.querySelector(Xi);t&&t.focus()}},r.prototype._onClose=function(){this.remove()},r}(t.Evented),Yi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ti,NavigationControl:Ii,GeolocateControl:Ni,AttributionControl:_i,ScaleControl:Vi,FullscreenControl:Wi,Popup:Hi,Marker:Li,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Ft().acquire(Dt)},clearPrewarmedResources:function(){var t=Lt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Dt),Lt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Rt.workerCount},set workerCount(t){Rt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:"",addProtocol:function(e,n){t.config.REGISTERED_PROTOCOLS[e]=n},removeProtocol:function(e){delete t.config.REGISTERED_PROTOCOLS[e]}};return Yi})),n}()},245:t=>{t.exports=function(t){!function(t){if(!t)throw new Error("Eventify cannot use falsy object as events subject");for(var e=["on","fire","off"],n=0;n1&&(r=Array.prototype.splice.call(arguments,1));for(var o=0;o{t.exports=function(t){if("uniqueLinkId"in(t=t||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),t.multigraph=t.uniqueLinkId),void 0===t.multigraph&&(t.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var e,n=new Map,u=[],c={},p=0,h=t.multigraph?function(t,e,n){var r=l(t,e),i=c.hasOwnProperty(r);if(i||T(t,e)){i||(c[r]=0);var o="@"+ ++c[r];r=l(t+o,e+o)}return new s(t,e,n,r)}:function(t,e,n){return new s(t,e,n,l(t,e))},f=[],d=k,m=k,y=k,g=k,v={addNode:x,addLink:function(t,e,n){y();var r=w(t)||x(t),i=w(e)||x(e),o=h(t,e,n);return u.push(o),a(r,o),t!==e&&a(i,o),d(o,"add"),g(),o},removeLink:S,removeNode:A,getNode:w,getNodeCount:E,getLinkCount:C,getLinksCount:C,getNodesCount:E,getLinks:function(t){var e=w(t);return e?e.links:null},forEachNode:M,forEachLinkedNode:function(t,e,r){var i=w(t);if(i&&i.links&&"function"==typeof e)return r?function(t,e,r){for(var i=0;i=0&&n.links.splice(e,1),r&&(e=i(t,r.links))>=0&&r.links.splice(e,1),d(t,"remove"),g(),!0}function T(t,e){var n,r=w(t);if(!r||!r.links)return null;for(n=0;n0&&(v.fire("changed",f),f.length=0)}function M(t){if("function"!=typeof t)throw new Error("Function is expected to iterate over graph nodes. You passed "+t);for(var e=n.values(),r=e.next();!r.done;){if(t(r.value))return!0;r=e.next()}}};var r=n(245);function i(t,e){if(!e)return-1;if(e.indexOf)return e.indexOf(t);var n,r=e.length;for(n=0;n{"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,o){for(var a,s,l=i(t),u=1;u{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},697:(t,e,n)=>{t.exports=n(703)()},414:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},582:function(t){t.exports=function(){"use strict";function t(t,r,i,o,a){!function t(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*c/s+p)),Math.min(o,Math.floor(r+(s-l)*c/s+p)),a)}var h=n[r],f=i,d=o;for(e(n,i,r),a(n[o],h)>0&&e(n,i,o);f0;)d--}0===a(n[i],h)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,a||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return te?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;t(e,s,n,r,o),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=d(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,s,l,u,p,h=1/0,f=1/0,d=e;d<=n-e;d++){var m=a(t,0,d,this.toBBox),y=a(t,d,n,this.toBBox),g=(i=m,o=y,void 0,void 0,void 0,void 0,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),p=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,p-l)),v=c(m)+c(y);g=e;f--){var d=t.children[f];s(l,t.leaf?i(d):d),u+=p(l)}return u},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)s(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}()},448:(t,e,n)=>{"use strict";var r=n(294),i=n(418),o=n(840);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n