mirror of
https://github.com/maputnik/editor.git
synced 2026-12-06 00:34:22 +00:00
deploy: 699241b691
This commit is contained in:
1 parent
8eb9fe062f
commit
d379d462f2
4 files changed
+981
-999
No files matched your search
@@ -0,0 +1,979 @@
|
||||
var DN=Object.defineProperty;var FN=(n,e,t)=>e in n?DN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Kn=(n,e,t)=>FN(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function fl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function R6(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var p3={exports:{}},ov={},m3={exports:{}},fs={},JO;function LN(){if(JO)return fs;JO=1;/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),B=Symbol.iterator;function O(De){return De===null||typeof De!="object"?null:(De=B&&De[B]||De["@@iterator"],typeof De=="function"?De:null)}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,j={};function N(De,He,bt){this.props=De,this.context=He,this.refs=j,this.updater=bt||P}N.prototype.isReactComponent={},N.prototype.setState=function(De,He){if(typeof De!="object"&&typeof De!="function"&&De!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,De,He,"setState")},N.prototype.forceUpdate=function(De){this.updater.enqueueForceUpdate(this,De,"forceUpdate")};function Y(){}Y.prototype=N.prototype;function H(De,He,bt){this.props=De,this.context=He,this.refs=j,this.updater=bt||P}var se=H.prototype=new Y;se.constructor=H,U(se,N.prototype),se.isPureReactComponent=!0;var re=Array.isArray,V=Object.prototype.hasOwnProperty,ne={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function oe(De,He,bt){var Yt,yt={},Ft=null,Pt=null;if(He!=null)for(Yt in He.ref!==void 0&&(Pt=He.ref),He.key!==void 0&&(Ft=""+He.key),He)V.call(He,Yt)&&!G.hasOwnProperty(Yt)&&(yt[Yt]=He[Yt]);var Ue=arguments.length-2;if(Ue===1)yt.children=bt;else if(1<Ue){for(var Pe=Array(Ue),Be=0;Be<Ue;Be++)Pe[Be]=arguments[Be+2];yt.children=Pe}if(De&&De.defaultProps)for(Yt in Ue=De.defaultProps,Ue)yt[Yt]===void 0&&(yt[Yt]=Ue[Yt]);return{$$typeof:n,type:De,key:Ft,ref:Pt,props:yt,_owner:ne.current}}function he(De,He){return{$$typeof:n,type:De.type,key:He,ref:De.ref,props:De.props,_owner:De._owner}}function fe(De){return typeof De=="object"&&De!==null&&De.$$typeof===n}function Ee(De){var He={"=":"=0",":":"=2"};return"$"+De.replace(/[=:]/g,function(bt){return He[bt]})}var me=/\/+/g;function Se(De,He){return typeof De=="object"&&De!==null&&De.key!=null?Ee(""+De.key):He.toString(36)}function Ke(De,He,bt,Yt,yt){var Ft=typeof De;(Ft==="undefined"||Ft==="boolean")&&(De=null);var Pt=!1;if(De===null)Pt=!0;else switch(Ft){case"string":case"number":Pt=!0;break;case"object":switch(De.$$typeof){case n:case e:Pt=!0}}if(Pt)return Pt=De,yt=yt(Pt),De=Yt===""?"."+Se(Pt,0):Yt,re(yt)?(bt="",De!=null&&(bt=De.replace(me,"$&/")+"/"),Ke(yt,He,bt,"",function(Be){return Be})):yt!=null&&(fe(yt)&&(yt=he(yt,bt+(!yt.key||Pt&&Pt.key===yt.key?"":(""+yt.key).replace(me,"$&/")+"/")+De)),He.push(yt)),1;if(Pt=0,Yt=Yt===""?".":Yt+":",re(De))for(var Ue=0;Ue<De.length;Ue++){Ft=De[Ue];var Pe=Yt+Se(Ft,Ue);Pt+=Ke(Ft,He,bt,Pe,yt)}else if(Pe=O(De),typeof Pe=="function")for(De=Pe.call(De),Ue=0;!(Ft=De.next()).done;)Ft=Ft.value,Pe=Yt+Se(Ft,Ue++),Pt+=Ke(Ft,He,bt,Pe,yt);else if(Ft==="object")throw He=String(De),Error("Objects are not valid as a React child (found: "+(He==="[object Object]"?"object with keys {"+Object.keys(De).join(", ")+"}":He)+"). If you meant to render a collection of children, use an array instead.");return Pt}function xe(De,He,bt){if(De==null)return De;var Yt=[],yt=0;return Ke(De,Yt,"","",function(Ft){return He.call(bt,Ft,yt++)}),Yt}function at(De){if(De._status===-1){var He=De._result;He=He(),He.then(function(bt){(De._status===0||De._status===-1)&&(De._status=1,De._result=bt)},function(bt){(De._status===0||De._status===-1)&&(De._status=2,De._result=bt)}),De._status===-1&&(De._status=0,De._result=He)}if(De._status===1)return De._result.default;throw De._result}var Ze={current:null},Je={transition:null},Ne={ReactCurrentDispatcher:Ze,ReactCurrentBatchConfig:Je,ReactCurrentOwner:ne};function we(){throw Error("act(...) is not supported in production builds of React.")}return fs.Children={map:xe,forEach:function(De,He,bt){xe(De,function(){He.apply(this,arguments)},bt)},count:function(De){var He=0;return xe(De,function(){He++}),He},toArray:function(De){return xe(De,function(He){return He})||[]},only:function(De){if(!fe(De))throw Error("React.Children.only expected to receive a single React element child.");return De}},fs.Component=N,fs.Fragment=t,fs.Profiler=i,fs.PureComponent=H,fs.StrictMode=r,fs.Suspense=f,fs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ne,fs.act=we,fs.cloneElement=function(De,He,bt){if(De==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+De+".");var Yt=U({},De.props),yt=De.key,Ft=De.ref,Pt=De._owner;if(He!=null){if(He.ref!==void 0&&(Ft=He.ref,Pt=ne.current),He.key!==void 0&&(yt=""+He.key),De.type&&De.type.defaultProps)var Ue=De.type.defaultProps;for(Pe in He)V.call(He,Pe)&&!G.hasOwnProperty(Pe)&&(Yt[Pe]=He[Pe]===void 0&&Ue!==void 0?Ue[Pe]:He[Pe])}var Pe=arguments.lengthLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var t8;function UN(){if(t8)return ov;t8=1;var n=Ia(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(o,f,y){var x,B={},O=null,P=null;y!==void 0&&(O=""+y),f.key!==void 0&&(O=""+f.key),f.ref!==void 0&&(P=f.ref);for(x in f)r.call(f,x)&&!s.hasOwnProperty(x)&&(B[x]=f[x]);if(o&&o.defaultProps)for(x in f=o.defaultProps,f)B[x]===void 0&&(B[x]=f[x]);return{$$typeof:e,type:o,key:O,ref:P,props:B,_owner:i.current}}return ov.Fragment=t,ov.jsx=l,ov.jsxs=l,ov}var n8;function zN(){return n8||(n8=1,p3.exports=UN()),p3.exports}var ue=zN(),ci=Ia();const Xn=fl(ci);var gD={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},_E=Xn.createContext&&Xn.createContext(gD),jN=["attr","size","title"];function NN(n,e){if(n==null)return{};var t=WN(n,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function WN(n,e){if(n==null)return{};var t={};for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){if(e.indexOf(r)>=0)continue;t[r]=n[r]}return t}function Kb(){return Kb=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Kb.apply(this,arguments)}function r8(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Rb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?r8(Object(t),!0).forEach(function(r){GN(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):r8(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function GN(n,e,t){return e=QN(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function QN(n){var e=YN(n,"string");return typeof e=="symbol"?e:e+""}function YN(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function yD(n){return n&&n.map((e,t)=>Xn.createElement(e.tag,Rb({key:t},e.attr),yD(e.child)))}function Xl(n){return e=>Xn.createElement(qN,Kb({attr:Rb({},n.attr)},e),yD(n.child))}function qN(n){var e=t=>{var{attr:r,size:i,title:s}=n,l=NN(n,jN),o=i||t.size||"1em",f;return t.className&&(f=t.className),n.className&&(f=(f?f+" ":"")+n.className),Xn.createElement("svg",Kb({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,l,{className:f,style:Rb(Rb({color:n.color||t.color},t.style),n.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),s&&Xn.createElement("title",null,s),n.children)};return _E!==void 0?Xn.createElement(_E.Consumer,null,t=>e(t)):e(gD)}var T_={},g3={exports:{}},uh={},y3={exports:{}},v3={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var i8;function VN(){return i8||(i8=1,function(n){function e(Je,Ne){var we=Je.length;Je.push(Ne);e:for(;0<we;){var De=we-1>>>1,He=Je[De];if(0<i(He,Ne))Je[De]=Ne,Je[we]=He,we=De;else break e}}function t(Je){return Je.length===0?null:Je[0]}function r(Je){if(Je.length===0)return null;var Ne=Je[0],we=Je.pop();if(we!==Ne){Je[0]=we;e:for(var De=0,He=Je.length,bt=He>>>1;De<bt;){var Yt=2*(De+1)-1,yt=Je[Yt],Ft=Yt+1,Pt=Je[Ft];if(0>i(yt,we))Ft<He&&0>i(Pt,yt)?(Je[De]=Pt,Je[Ft]=we,De=Ft):(Je[De]=yt,Je[Yt]=we,De=Yt);else if(Ft<He&&0>i(Pt,we))Je[De]=Pt,Je[Ft]=we,De=Ft;else break e}}return Ne}function i(Je,Ne){var we=Je.sortIndex-Ne.sortIndex;return we!==0?we:Je.id-Ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var l=Date,o=l.now();n.unstable_now=function(){return l.now()-o}}var f=[],y=[],x=1,B=null,O=3,P=!1,U=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function se(Je){for(var Ne=t(y);Ne!==null;){if(Ne.callback===null)r(y);else if(Ne.startTime<=Je)r(y),Ne.sortIndex=Ne.expirationTime,e(f,Ne);else break;Ne=t(y)}}function re(Je){if(j=!1,se(Je),!U)if(t(f)!==null)U=!0,at(V);else{var Ne=t(y);Ne!==null&&Ze(re,Ne.startTime-Je)}}function V(Je,Ne){U=!1,j&&(j=!1,Y(oe),oe=-1),P=!0;var we=O;try{for(se(Ne),B=t(f);B!==null&&(!(B.expirationTime>Ne)||Je&&!Ee());){var De=B.callback;if(typeof De=="function"){B.callback=null,O=B.priorityLevel;var He=De(B.expirationTime<=Ne);Ne=n.unstable_now(),typeof He=="function"?B.callback=He:B===t(f)&&r(f),se(Ne)}else r(f);B=t(f)}if(B!==null)var bt=!0;else{var Yt=t(y);Yt!==null&&Ze(re,Yt.startTime-Ne),bt=!1}return bt}finally{B=null,O=we,P=!1}}var ne=!1,G=null,oe=-1,he=5,fe=-1;function Ee(){return!(n.unstable_now()-fe<he)}function me(){if(G!==null){var Je=n.unstable_now();fe=Je;var Ne=!0;try{Ne=G(!0,Je)}finally{Ne?Se():(ne=!1,G=null)}}else ne=!1}var Se;if(typeof H=="function")Se=function(){H(me)};else if(typeof MessageChannel<"u"){var Ke=new MessageChannel,xe=Ke.port2;Ke.port1.onmessage=me,Se=function(){xe.postMessage(null)}}else Se=function(){N(me,0)};function at(Je){G=Je,ne||(ne=!0,Se())}function Ze(Je,Ne){oe=N(function(){Je(n.unstable_now())},Ne)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Je){Je.callback=null},n.unstable_continueExecution=function(){U||P||(U=!0,at(V))},n.unstable_forceFrameRate=function(Je){0>Je||125<Je?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<Je?Math.floor(1e3/Je):5},n.unstable_getCurrentPriorityLevel=function(){return O},n.unstable_getFirstCallbackNode=function(){return t(f)},n.unstable_next=function(Je){switch(O){case 1:case 2:case 3:var Ne=3;break;default:Ne=O}var we=O;O=Ne;try{return Je()}finally{O=we}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(Je,Ne){switch(Je){case 1:case 2:case 3:case 4:case 5:break;default:Je=3}var we=O;O=Je;try{return Ne()}finally{O=we}},n.unstable_scheduleCallback=function(Je,Ne,we){var De=n.unstable_now();switch(typeof we=="object"&&we!==null?(we=we.delay,we=typeof we=="number"&&0<we?De+we:De):we=De,Je){case 1:var He=-1;break;case 2:He=250;break;case 5:He=1073741823;break;case 4:He=1e4;break;default:He=5e3}return He=we+He,Je={id:x++,callback:Ne,priorityLevel:Je,startTime:we,expirationTime:He,sortIndex:-1},we>De?(Je.sortIndex=we,e(y,Je),t(f)===null&&Je===t(y)&&(j?(Y(oe),oe=-1):j=!0,Ze(re,we-De))):(Je.sortIndex=He,e(f,Je),U||P||(U=!0,at(V))),Je},n.unstable_shouldYield=Ee,n.unstable_wrapCallback=function(Je){var Ne=O;return function(){var we=O;O=Ne;try{return Je.apply(this,arguments)}finally{O=we}}}}(v3)),v3}var o8;function $N(){return o8||(o8=1,y3.exports=VN()),y3.exports}/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var s8;function HN(){if(s8)return uh;s8=1;var n=Ia(),e=$N();function t(m){for(var C="https://reactjs.org/docs/error-decoder.html?invariant="+m,D=1;D<arguments.length;D++)C+="&args[]="+encodeURIComponent(arguments[D]);return"Minified React error #"+m+"; visit "+C+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(m,C){l(m,C),l(m+"Capture",C)}function l(m,C){for(i[m]=C,m=0;m<C.length;m++)r.add(C[m])}var o=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,x={},B={};function O(m){return f.call(B,m)?!0:f.call(x,m)?!1:y.test(m)?B[m]=!0:(x[m]=!0,!1)}function P(m,C,D,Q){if(D!==null&&D.type===0)return!1;switch(typeof C){case"function":case"symbol":return!0;case"boolean":return Q?!1:D!==null?!D.acceptsBooleans:(m=m.toLowerCase().slice(0,5),m!=="data-"&&m!=="aria-");default:return!1}}function U(m,C,D,Q){if(C===null||typeof C>"u"||P(m,C,D,Q))return!0;if(Q)return!1;if(D!==null)switch(D.type){case 3:return!C;case 4:return C===!1;case 5:return isNaN(C);case 6:return isNaN(C)||1>C}return!1}function j(m,C,D,Q,le,ge,tt){this.acceptsBooleans=C===2||C===3||C===4,this.attributeName=Q,this.attributeNamespace=le,this.mustUseProperty=D,this.propertyName=m,this.type=C,this.sanitizeURL=ge,this.removeEmptyString=tt}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(m){N[m]=new j(m,0,!1,m,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(m){var C=m[0];N[C]=new j(C,1,!1,m[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(m){N[m]=new j(m,2,!1,m.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(m){N[m]=new j(m,2,!1,m,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(m){N[m]=new j(m,3,!1,m.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(m){N[m]=new j(m,3,!0,m,null,!1,!1)}),["capture","download"].forEach(function(m){N[m]=new j(m,4,!1,m,null,!1,!1)}),["cols","rows","size","span"].forEach(function(m){N[m]=new j(m,6,!1,m,null,!1,!1)}),["rowSpan","start"].forEach(function(m){N[m]=new j(m,5,!1,m.toLowerCase(),null,!1,!1)});var Y=/[\-:]([a-z])/g;function H(m){return m[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(m){var C=m.replace(Y,H);N[C]=new j(C,1,!1,m,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(m){var C=m.replace(Y,H);N[C]=new j(C,1,!1,m,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(m){var C=m.replace(Y,H);N[C]=new j(C,1,!1,m,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(m){N[m]=new j(m,1,!1,m.toLowerCase(),null,!1,!1)}),N.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(m){N[m]=new j(m,1,!1,m.toLowerCase(),null,!0,!0)});function se(m,C,D,Q){var le=N.hasOwnProperty(C)?N[C]:null;(le!==null?le.type!==0:Q||!(2<C.length)||C[0]!=="o"&&C[0]!=="O"||C[1]!=="
Line truncated
|
||||
`+De+m}var bt=!1;function Yt(m,C){if(!m||bt)return"";bt=!0;var D=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(C)if(C=function(){throw Error()},Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[])}catch(wn){var Q=wn}Reflect.construct(m,[],C)}else{try{C.call()}catch(wn){Q=wn}m.call(C.prototype)}else{try{throw Error()}catch(wn){Q=wn}m()}}catch(wn){if(wn&&Q&&typeof wn.stack=="string"){for(var le=wn.stack.split(`
|
||||
`),ge=Q.stack.split(`
|
||||
`),tt=le.length-1,Ot=ge.length-1;1<=tt&&0<=Ot&&le[tt]!==ge[Ot];)Ot--;for(;1<=tt&&0<=Ot;tt--,Ot--)if(le[tt]!==ge[Ot]){if(tt!==1||Ot!==1)do if(tt--,Ot--,0>Ot||le[tt]!==ge[Ot]){var Wt=`
|
||||
`+le[tt].replace(" at new "," at ");return m.displayName&&Wt.includes("<anonymous>")&&(Wt=Wt.replace("<anonymous>",m.displayName)),Wt}while(1<=tt&&0<=Ot);break}}}finally{bt=!1,Error.prepareStackTrace=D}return(m=m?m.displayName||m.name:"")?He(m):""}function yt(m){switch(m.tag){case 5:return He(m.type);case 16:return He("Lazy");case 13:return He("Suspense");case 19:return He("SuspenseList");case 0:case 2:case 15:return m=Yt(m.type,!1),m;case 11:return m=Yt(m.type.render,!1),m;case 1:return m=Yt(m.type,!0),m;default:return""}}function Ft(m){if(m==null)return null;if(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case G:return"Fragment";case ne:return"Portal";case he:return"Profiler";case oe:return"StrictMode";case Se:return"Suspense";case Ke:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case Ee:return(m.displayName||"Context")+".Consumer";case fe:return(m._context.displayName||"Context")+".Provider";case me:var C=m.render;return m=m.displayName,m||(m=C.displayName||C.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case xe:return C=m.displayName||null,C!==null?C:Ft(m.type)||"Memo";case at:C=m._payload,m=m._init;try{return Ft(m(C))}catch{}}return null}function Pt(m){var C=m.type;switch(m.tag){case 24:return"Cache";case 9:return(C.displayName||"Context")+".Consumer";case 10:return(C._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return m=C.render,m=m.displayName||m.name||"",C.displayName||(m!==""?"ForwardRef("+m+")":"ForwardRef");case 7:return"Fragment";case 5:return C;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ft(C);case 8:return C===oe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C}return null}function Ue(m){switch(typeof m){case"boolean":case"number":case"string":case"undefined":return m;case"object":return m;default:return""}}function Pe(m){var C=m.type;return(m=m.nodeName)&&m.toLowerCase()==="input"&&(C==="checkbox"||C==="radio")}function Be(m){var C=Pe(m)?"checked":"value",D=Object.getOwnPropertyDescriptor(m.constructor.prototype,C),Q=""+m[C];if(!m.hasOwnProperty(C)&&typeof D<"u"&&typeof D.get=="function"&&typeof D.set=="function"){var le=D.get,ge=D.set;return Object.defineProperty(m,C,{configurable:!0,get:function(){return le.call(this)},set:function(tt){Q=""+tt,ge.call(this,tt)}}),Object.defineProperty(m,C,{enumerable:D.enumerable}),{getValue:function(){return Q},setValue:function(tt){Q=""+tt},stopTracking:function(){m._valueTracker=null,delete m[C]}}}}function it(m){m._valueTracker||(m._valueTracker=Be(m))}function _t(m){if(!m)return!1;var C=m._valueTracker;if(!C)return!0;var D=C.getValue(),Q="";return m&&(Q=Pe(m)?m.checked?"true":"false":m.value),m=Q,m!==D?(C.setValue(m),!0):!1}function pt(m){if(m=m||(typeof document<"u"?document:void 0),typeof m>"u")return null;try{return m.activeElement||m.body}catch{return m.body}}function Lt(m,C){var D=C.checked;return we({},C,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:D??m._wrapperState.initialChecked})}function nn(m,C){var D=C.defaultValue==null?"":C.defaultValue,Q=C.checked!=null?C.checked:C.defaultChecked;D=Ue(C.value!=null?C.value:D),m._wrapperState={initialChecked:Q,initialValue:D,controlled:C.type==="checkbox"||C.type==="radio"?C.checked!=null:C.value!=null}}function Kt(m,C){C=C.checked,C!=null&&se(m,"checked",C,!1)}function vn(m,C){Kt(m,C);var D=Ue(C.value),Q=C.type;if(D!=null)Q==="number"?(D===0&&m.value===""||m.value!=D)&&(m.value=""+D):m.value!==""+D&&(m.value=""+D);else if(Q==="submit"||Q==="reset"){m.removeAttribute("value");return}C.hasOwnProperty("value")?tn(m,C.type,D):C.hasOwnProperty("defaultValue")&&tn(m,C.type,Ue(C.defaultValue)),C.checked==null&&C.defaultChecked!=null&&(m.defaultChecked=!!C.defaultChecked)}function Gn(m,C,D){if(C.hasOwnProperty("value")||C.hasOwnProperty("defaultValue")){var Q=C.type;if(!(Q!=="submit"&&Q!=="reset"||C.value!==void 0&&C.value!==null))return;C=""+m._wrapperState.initialValue,D||C===m.value||(m.value=C),m.defaultValue=C}D=m.name,D!==""&&(m.name=""),m.defaultChecked=!!m._wrapperState.initialChecked,D!==""&&(m.name=D)}function tn(m,C,D){(C!=="number"||pt(m.ownerDocument)!==m)&&(D==null?m.defaultValue=""+m._wrapperState.initialValue:m.defaultValue!==""+D&&(m.defaultValue=""+D))}var dr=Array.isArray;function Pn(m,C,D,Q){if(m=m.options,C){C={};for(var le=0;le<D.length;le++)C["$"+D[le]]=!0;for(D=0;D<m.length;D++)le=C.hasOwnProperty("$"+m[D].value),m[D].selected!==le&&(m[D].selected=le),le&&Q&&(m[D].defaultSelected=!0)}else{for(D=""+Ue(D),C=null,le=0;le<m.length;le++){if(m[le].value===D){m[le].selected=!0,Q&&(m[le].defaultSelected=!0);return}C!==null||m[le].disabled||(C=m[le])}C!==null&&(C.selecte
Line truncated
|
||||
`).replace(_d,"")}function Vc(m,C,D){if(C=Ul(C),Ul(m)!==C&&D)throw Error(t(425))}function oc(){}var bd=null,nl=null;function vu(m,C){return m==="textarea"||m==="noscript"||typeof C.children=="string"||typeof C.children=="number"||typeof C.dangerouslySetInnerHTML=="object"&&C.dangerouslySetInnerHTML!==null&&C.dangerouslySetInnerHTML.__html!=null}var rl=typeof setTimeout=="function"?setTimeout:void 0,sc=typeof clearTimeout=="function"?clearTimeout:void 0,Qu=typeof Promise=="function"?Promise:void 0,xd=typeof queueMicrotask=="function"?queueMicrotask:typeof Qu<"u"?function(m){return Qu.resolve(null).then(m).catch($c)}:rl;function $c(m){setTimeout(function(){throw m})}function Zd(m,C){var D=C,Q=0;do{var le=D.nextSibling;if(m.removeChild(D),le&&le.nodeType===8)if(D=le.data,D==="/$"){if(Q===0){m.removeChild(le),Ki(C);return}Q--}else D!=="$"&&D!=="$?"&&D!=="$!"||Q++;D=le}while(D);Ki(C)}function nu(m){for(;m!=null;m=m.nextSibling){var C=m.nodeType;if(C===1||C===3)break;if(C===8){if(C=m.data,C==="$"||C==="$!"||C==="$?")break;if(C==="/$")return null}}return m}function Yu(m){m=m.previousSibling;for(var C=0;m;){if(m.nodeType===8){var D=m.data;if(D==="$"||D==="$!"||D==="$?"){if(C===0)return m;C--}else D==="/$"&&C++}m=m.previousSibling}return null}var qu=Math.random().toString(36).slice(2),kA="__reactFiber$"+qu,wc="__reactProps$"+qu,Cu="__reactContainer$"+qu,Sh="__reactEvents$"+qu,ot="__reactListeners$"+qu,Vu="__reactHandles$"+qu;function _s(m){var C=m[kA];if(C)return C;for(var D=m.parentNode;D;){if(C=D[Cu]||D[kA]){if(D=C.alternate,C.child!==null||D!==null&&D.child!==null)for(m=Yu(m);m!==null;){if(D=m[kA])return D;m=Yu(m)}return C}m=D,D=m.parentNode}return null}function gi(m){return m=m[kA]||m[Cu],!m||m.tag!==5&&m.tag!==6&&m.tag!==13&&m.tag!==3?null:m}function Gr(m){if(m.tag===5||m.tag===6)return m.stateNode;throw Error(t(33))}function ta(m){return m[wc]||null}var zl=[],TA=-1;function _a(m){return{current:m}}function Us(m){0>TA||(m.current=zl[TA],zl[TA]=null,TA--)}function bs(m,C){TA++,zl[TA]=m.current,m.current=C}var Hc={},ba=_a(Hc),il=_a(!1),gs=Hc;function xr(m,C){var D=m.type.contextTypes;if(!D)return Hc;var Q=m.stateNode;if(Q&&Q.__reactInternalMemoizedUnmaskedChildContext===C)return Q.__reactInternalMemoizedMaskedChildContext;var le={},ge;for(ge in D)le[ge]=C[ge];return Q&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=C,m.__reactInternalMemoizedMaskedChildContext=le),le}function xa(m){return m=m.childContextTypes,m!=null}function Zc(){Us(il),Us(ba)}function nf(m,C,D){if(ba.current!==Hc)throw Error(t(168));bs(ba,C),bs(il,D)}function ac(m,C,D){var Q=m.stateNode;if(C=C.childContextTypes,typeof Q.getChildContext!="function")return D;Q=Q.getChildContext();for(var le in Q)if(!(le in C))throw Error(t(108,Pt(m)||"Unknown",le));return we({},D,Q)}function yl(m){return m=(m=m.stateNode)&&m.__reactInternalMemoizedMergedChildContext||Hc,gs=ba.current,bs(ba,m),bs(il,il.current),!0}function Xd(m,C,D){var Q=m.stateNode;if(!Q)throw Error(t(169));D?(m=ac(m,C,gs),Q.__reactInternalMemoizedMergedChildContext=m,Us(il),Us(ba),bs(ba,m)):Us(il),bs(il,D)}var Mi=null,Md=!1,wd=!1;function $u(m){Mi===null?Mi=[m]:Mi.push(m)}function Sc(m){Md=!0,$u(m)}function lc(){if(!wd&&Mi!==null){wd=!0;var m=0,C=oi;try{var D=Mi;for(oi=1;m<D.length;m++){var Q=D[m];do Q=Q(!0);while(Q!==null)}Mi=null,Md=!1}catch(le){throw Mi!==null&&(Mi=Mi.slice(m+1)),Sl(Jl,lc),le}finally{oi=C,wd=!1}}return null}var Ec=[],ds=0,So=null,_u=0,Ma=[],Ra=0,Bc=null,ol=1,Uo="";function PA(m,C){Ec[ds++]=_u,Ec[ds++]=So,So=m,_u=C}function Sd(m,C,D){Ma[Ra++]=ol,Ma[Ra++]=Uo,Ma[Ra++]=Bc,Bc=m;var Q=ol;m=Uo;var le=32-Cn(Q)-1;Q&=~(1<<le),D+=1;var ge=32-Cn(C)+le;if(30<ge){var tt=le-le%5;ge=(Q&(1<<tt)-1).toString(32),Q>>=tt,le-=tt,ol=1<<32-Cn(C)+le|D<<le|Q,Uo=ge+m}else ol=1<<ge|D<<le|Q,Uo=m}function KA(m){m.return!==null&&(PA(m,1),Sd(m,1,0))}function uc(m){for(;m===So;)So=Ec[--ds],Ec[ds]=null,_u=Ec[--ds],Ec[ds]=null;for(;m===Bc;)Bc=Ma[--Ra],Ma[Ra]=null,Uo=Ma[--Ra],Ma[Ra]=null,ol=Ma[--Ra],Ma[Ra]=null}var da=null,Da=null,Eo=!1,ru=null;function Kr(m,C){var D=GA(5,null,null,0);D.elementType="DELETED",D.stateNode=C,D.return=m,C=m.deletions,C===null?(m.deletions=[D],m.flags|=16):C.push(D)}function ei(m,C){switch(m.tag){case 5:var D=m.type;return C=C.nodeType!==1||D.toLowerCase()!==C.nodeName.toLowerCase()?null:C,C!==null?(m.stateNode=C,da=m,Da=nu(C.firstChild),!0):!1;case 6:return C=m.pendingProps===""||C.nodeType!==3?null:C,C!==null?(m.stateNode=C,da=m,Da=null,!0):!1;case 13:return C=C.nodeType!==8?null:C,C!==null?(D=Bc!==null?{id:ol,overflow:Uo}:null,m.memoizedState={dehydrated:C,treeContext:D,retryLane:1073741824},D=GA(18,null,null,0),D.stateNode=C,D.return=m,m.child=D,da=m,Da=null,!0):!1;default:return!1}}function iu(m){return(m.mode&1)!==0&&(m.flags&128)===0}function vl(m){if(Eo){var C=Da;if(C){var D=C;if(!ei(m,C)){if(iu(m))throw Error(t(418));C=nu(D.nextSibling);var Q=da;C&&ei(m,C)?Kr(Q,D):(m.flags=m.flags&-4097|2,Eo=!1,da=m)}}else{if(iu(m))throw Error(t(418));m.flags=m.flags&-4097|
Line truncated
|
||||
Error generating stack: `+ge.message+`
|
||||
`+ge.stack}return{value:m,source:C,stack:le,digest:null}}function wp(m,C,D){return{value:m,source:null,stack:D??null,digest:C??null}}function Jc(m,C){try{console.error(C.value)}catch(D){setTimeout(function(){throw D})}}var lf=typeof WeakMap=="function"?WeakMap:Map;function ed(m,C,D){D=a(-1,D),D.tag=3,D.payload={element:null};var Q=C.value;return D.callback=function(){qm||(qm=!0,q0=Q),Jc(m,C)},D}function uf(m,C,D){D=a(-1,D),D.tag=3;var Q=m.type.getDerivedStateFromError;if(typeof Q=="function"){var le=C.value;D.payload=function(){return Q(le)},D.callback=function(){Jc(m,C)}}var ge=m.stateNode;return ge!==null&&typeof ge.componentDidCatch=="function"&&(D.callback=function(){Jc(m,C),typeof Q!="function"&&(td===null?td=new Set([this]):td.add(this));var tt=C.stack;this.componentDidCatch(C.value,{componentStack:tt!==null?tt:""})}),D}function Af(m,C,D){var Q=m.pingCache;if(Q===null){Q=m.pingCache=new lf;var le=new Set;Q.set(C,le)}else le=Q.get(C),le===void 0&&(le=new Set,Q.set(C,le));le.has(D)||(le.add(D),m=$y.bind(null,m,C,D),C.then(m,m))}function um(m){do{var C;if((C=m.tag===13)&&(C=m.memoizedState,C=C!==null?C.dehydrated!==null:!0),C)return m;m=m.return}while(m!==null);return null}function eh(m,C,D,Q,le){return(m.mode&1)===0?(m===C?m.flags|=65536:(m.flags|=128,D.flags|=131072,D.flags&=-52805,D.tag===1&&(D.alternate===null?D.tag=17:(C=a(-1,1),C.tag=2,c(D,C,1))),D.lanes|=1),m):(m.flags|=65536,m.lanes=le,m)}var cf=re.ReactCurrentOwner,El=!1;function Nl(m,C,D,Q){C.child=m===null?Oc(C,null,D,Q):ks(C,m.child,D,Q)}function Qm(m,C,D,Q,le){D=D.render;var ge=C.ref;return su(C,le),Q=Tr(m,C,D,Q,ge,le),D=Zr(),m!==null&&!El?(C.updateQueue=m.updateQueue,C.flags&=-2053,m.lanes&=~le,Eu(m,C,le)):(Eo&&D&&KA(C),C.flags|=1,Nl(m,C,Q,le),C.child)}function Nf(m,C,D,Q,le){if(m===null){var ge=D.type;return typeof ge=="function"&&!Cf(ge)&&ge.defaultProps===void 0&&D.compare===null&&D.defaultProps===void 0?(C.tag=15,C.type=ge,Ho(m,C,ge,Q,le)):(m=Vf(D.type,null,Q,C,C.mode,le),m.ref=C.ref,m.return=C,C.child=m)}if(ge=m.child,(m.lanes&le)===0){var tt=ge.memoizedProps;if(D=D.compare,D=D!==null?D:Dr,D(tt,Q)&&m.ref===C.ref)return Eu(m,C,le)}return C.flags|=1,m=hc(ge,Q),m.ref=C.ref,m.return=C,C.child=m}function Ho(m,C,D,Q,le){if(m!==null){var ge=m.memoizedProps;if(Dr(ge,Q)&&m.ref===C.ref)if(El=!1,C.pendingProps=Q=ge,(m.lanes&le)!==0)(m.flags&131072)!==0&&(El=!0);else return C.lanes=m.lanes,Eu(m,C,le)}return Bl(m,C,D,Q,le)}function Wf(m,C,D){var Q=C.pendingProps,le=Q.children,ge=m!==null?m.memoizedState:null;if(Q.mode==="hidden")if((C.mode&1)===0)C.memoizedState={baseLanes:0,cachePool:null,transitions:null},bs(Bu,xs),xs|=D;else{if((D&1073741824)===0)return m=ge!==null?ge.baseLanes|D:D,C.lanes=C.childLanes=1073741824,C.memoizedState={baseLanes:m,cachePool:null,transitions:null},C.updateQueue=null,bs(Bu,xs),xs|=m,null;C.memoizedState={baseLanes:0,cachePool:null,transitions:null},Q=ge!==null?ge.baseLanes:D,bs(Bu,xs),xs|=Q}else ge!==null?(Q=ge.baseLanes|D,C.memoizedState=null):Q=D,bs(Bu,xs),xs|=Q;return Nl(m,C,le,D),C.child}function Bd(m,C){var D=C.ref;(m===null&&D!==null||m!==null&&m.ref!==D)&&(C.flags|=512,C.flags|=2097152)}function Bl(m,C,D,Q,le){var ge=xa(D)?gs:ba.current;return ge=xr(C,ge),su(C,le),D=Tr(m,C,D,Q,ge,le),Q=Zr(),m!==null&&!El?(C.updateQueue=m.updateQueue,C.flags&=-2053,m.lanes&=~le,Eu(m,C,le)):(Eo&&Q&&KA(C),C.flags|=1,Nl(m,C,D,le),C.child)}function vA(m,C,D,Q,le){if(xa(D)){var ge=!0;yl(C)}else ge=!1;if(su(C,le),C.stateNode===null)Ep(m,C),Ed(C,D,Q),Mp(C,D,Q,le),Q=!0;else if(m===null){var tt=C.stateNode,Ot=C.memoizedProps;tt.props=Ot;var Wt=tt.context,wn=D.contextType;typeof wn=="object"&&wn!==null?wn=au(wn):(wn=xa(D)?gs:ba.current,wn=xr(C,wn));var ir=D.getDerivedStateFromProps,mr=typeof ir=="function"||typeof tt.getSnapshotBeforeUpdate=="function";mr||typeof tt.UNSAFE_componentWillReceiveProps!="function"&&typeof tt.componentWillReceiveProps!="function"||(Ot!==Q||Wt!==wn)&&Ih(C,tt,Q,wn),jl=!1;var or=C.memoizedState;tt.state=or,T(C,Q,tt,le),Wt=C.memoizedState,Ot!==Q||or!==Wt||il.current||jl?(typeof ir=="function"&&(xp(C,D,ir,Q),Wt=C.memoizedState),(Ot=jl||lm(C,D,Ot,Q,or,Wt,wn))?(mr||typeof tt.UNSAFE_componentWillMount!="function"&&typeof tt.componentWillMount!="function"||(typeof tt.componentWillMount=="function"&&tt.componentWillMount(),typeof tt.UNSAFE_componentWillMount=="function"&&tt.UNSAFE_componentWillMount()),typeof tt.componentDidMount=="function"&&(C.flags|=4194308)):(typeof tt.componentDidMount=="function"&&(C.flags|=4194308),C.memoizedProps=Q,C.memoizedState=Wt),tt.props=Q,tt.state=Wt,tt.context=wn,Q=Ot):(typeof tt.componentDidMount=="function"&&(C.flags|=4194308),Q=!1)}else{tt=C.stateNode,I(m,C),Ot=C.memoizedProps,wn=C.type===C.elementType?Ot:ll(C.type,Ot),tt.props=wn,mr=C.pendingProps,or=tt.context,Wt=D.contextType,typeof Wt=="object"&&Wt!==null?Wt=au(Wt):(Wt=xa(D)?gs:ba.current,Wt=xr(C,Wt));var Vr=D.getDerivedStateFromProps;(ir=typeof Vr=="function"||typeof tt.getSnapshotBeforeUpdate=="function")||typeof tt.UNSAFE_compon
Line truncated
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/var U8;function yG(){return U8||(U8=1,function(n){const e=mG(),t=gG(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=o,n.SlowBuffer=H,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=s(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const Ge=new Uint8Array(1),ce={foo:function(){return 42}};return Object.setPrototypeOf(ce,Uint8Array.prototype),Object.setPrototypeOf(Ge,ce),Ge.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function l(Ge){if(Ge>i)throw new RangeError('The value "'+Ge+'" is invalid for option "size"');const ce=new Uint8Array(Ge);return Object.setPrototypeOf(ce,o.prototype),ce}function o(Ge,ce,pe){if(typeof Ge=="number"){if(typeof ce=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(Ge)}return f(Ge,ce,pe)}o.poolSize=8192;function f(Ge,ce,pe){if(typeof Ge=="string")return O(Ge,ce);if(ArrayBuffer.isView(Ge))return U(Ge);if(Ge==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ge);if(pn(Ge,ArrayBuffer)||Ge&&pn(Ge.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pn(Ge,SharedArrayBuffer)||Ge&&pn(Ge.buffer,SharedArrayBuffer)))return j(Ge,ce,pe);if(typeof Ge=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const nt=Ge.valueOf&&Ge.valueOf();if(nt!=null&&nt!==Ge)return o.from(nt,ce,pe);const wt=N(Ge);if(wt)return wt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ge[Symbol.toPrimitive]=="function")return o.from(Ge[Symbol.toPrimitive]("string"),ce,pe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ge)}o.from=function(Ge,ce,pe){return f(Ge,ce,pe)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function y(Ge){if(typeof Ge!="number")throw new TypeError('"size" argument must be of type number');if(Ge<0)throw new RangeError('The value "'+Ge+'" is invalid for option "size"')}function x(Ge,ce,pe){return y(Ge),Ge<=0?l(Ge):ce!==void 0?typeof pe=="string"?l(Ge).fill(ce,pe):l(Ge).fill(ce):l(Ge)}o.alloc=function(Ge,ce,pe){return x(Ge,ce,pe)};function B(Ge){return y(Ge),l(Ge<0?0:Y(Ge)|0)}o.allocUnsafe=function(Ge){return B(Ge)},o.allocUnsafeSlow=function(Ge){return B(Ge)};function O(Ge,ce){if((typeof ce!="string"||ce==="")&&(ce="utf8"),!o.isEncoding(ce))throw new TypeError("Unknown encoding: "+ce);const pe=se(Ge,ce)|0;let nt=l(pe);const wt=nt.write(Ge,ce);return wt!==pe&&(nt=nt.slice(0,wt)),nt}function P(Ge){const ce=Ge.length<0?0:Y(Ge.length)|0,pe=l(ce);for(let nt=0;nt<ce;nt+=1)pe[nt]=Ge[nt]&255;return pe}function U(Ge){if(pn(Ge,Uint8Array)){const ce=new Uint8Array(Ge);return j(ce.buffer,ce.byteOffset,ce.byteLength)}return P(Ge)}function j(Ge,ce,pe){if(ce<0||Ge.byteLength<ce)throw new RangeError('"offset" is outside of buffer bounds');if(Ge.byteLength<ce+(pe||0))throw new RangeError('"length" is outside of buffer bounds');let nt;return ce===void 0&&pe===void 0?nt=new Uint8Array(Ge):pe===void 0?nt=new Uint8Array(Ge,ce):nt=new Uint8Array(Ge,ce,pe),Object.setPrototypeOf(nt,o.prototype),nt}function N(Ge){if(o.isBuffer(Ge)){const ce=Y(Ge.length)|0,pe=l(ce);return pe.length===0||Ge.copy(pe,0,0,ce),pe}if(Ge.length!==void 0)return typeof Ge.length!="number"||$n(Ge.length)?l(0):P(Ge);if(Ge.type==="Buffer"&&Array.isArray(Ge.data))return P(Ge.data)}function Y(Ge){if(Ge>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return Ge|0}function H(Ge){return+Ge!=Ge&&(Ge=0),o.alloc(+Ge)}o.isBuffer=function(ce){return ce!=null&&ce._isBuffer===!0&&ce!==o.prototype},o.compare=function(ce,pe){if(pn(ce,Uint8Array)&&(ce=o.from(ce,ce.offset,ce.byteLength)),pn(pe,Uint8Array)&&(pe=o.from(pe,pe.offset,pe.byteLength)),!o.isBuffer(ce)||!o.isBuffer(pe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ce===pe)return 0;let nt=ce.length,wt=pe.length;for(let Ht=0,sn=Math.min(nt,wt);Ht<sn;++Ht)if(ce[Ht]!==pe[Ht]){nt=ce[Ht],wt=pe[Ht];break}return nt<wt?-1:wt<nt?1:0},o.isEncoding=function(ce){switch(String(ce).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(ce,pe){if(!Array.isArray(ce))throw new TypeError('"list" argument must be an Array of BuLine truncated
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/var MG=_v.exports,j8;function wG(){return j8||(j8=1,function(n,e){(function(){var t,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",o="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",y=500,x="__lodash_placeholder__",B=1,O=2,P=4,U=1,j=2,N=1,Y=2,H=4,se=8,re=16,V=32,ne=64,G=128,oe=256,he=512,fe=30,Ee="...",me=800,Se=16,Ke=1,xe=2,at=3,Ze=1/0,Je=9007199254740991,Ne=17976931348623157e292,we=NaN,De=4294967295,He=De-1,bt=De>>>1,Yt=[["ary",G],["bind",N],["bindKey",Y],["curry",se],["curryRight",re],["flip",he],["partial",V],["partialRight",ne],["rearg",oe]],yt="[object Arguments]",Ft="[object Array]",Pt="[object AsyncFunction]",Ue="[object Boolean]",Pe="[object Date]",Be="[object DOMException]",it="[object Error]",_t="[object Function]",pt="[object GeneratorFunction]",Lt="[object Map]",nn="[object Number]",Kt="[object Null]",vn="[object Object]",Gn="[object Promise]",tn="[object Proxy]",dr="[object RegExp]",Pn="[object Set]",pn="[object String]",$n="[object Symbol]",lr="[object Undefined]",vr="[object WeakMap]",Zn="[object WeakSet]",Ge="[object ArrayBuffer]",ce="[object DataView]",pe="[object Float32Array]",nt="[object Float64Array]",wt="[object Int8Array]",Ht="[object Int16Array]",sn="[object Int32Array]",Hn="[object Uint8Array]",Ve="[object Uint8ClampedArray]",J="[object Uint16Array]",ve="[object Uint32Array]",p=/\b__p \+= '';/g,Fe=/\b(__p \+=) '' \+/g,Qe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rt=/&(?:amp|lt|gt|quot|#39);/g,ct=/[&<>"']/g,dt=RegExp(rt.source),qt=RegExp(ct.source),Gt=/<%-([\s\S]+?)%>/g,zt=/<%([\s\S]+?)%>/g,on=/<%=([\s\S]+?)%>/g,jt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dn=/^\w*$/,rr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Br=/[\\^$.*+?()[\]{}|]/g,Jn=RegExp(Br.source),un=/^\s+/,er=/\s/,fr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Sr=/\{\n\/\* \[wrapped with (.+)\] \*/,Ur=/,? & /,ri=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Or=/[()=,{}\[\]\/\s]/,ka=/\\(\\)?/g,Wi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bi=/\w*$/,eo=/^[-+]0x[0-9a-f]+$/i,ws=/^0b[01]+$/i,ko=/^\[object .+?Constructor\]$/,Hi=/^0o[0-7]+$/i,Sl=/^(?:0|[1-9]\d*)$/,Go=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Za=/($^)/,Xa=/['\n\r\u2028\u2029\\]/g,Yi="\\ud800-\\udfff",Lu="\\u0300-\\u036f",Jl="\\ufe20-\\ufe2f",wo="\\u20d0-\\u20ff",wr=Lu+Jl+wo,Ta="\\u2700-\\u27bf",Ss="a-z\\xdf-\\xf6\\xf8-\\xff",Zs="\\xac\\xb1\\xd7\\xf7",Ye="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xt="\\u2000-\\u206f",Cn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qn="A-Z\\xc0-\\xd6\\xd8-\\xde",fn="\\ufe0e\\ufe0f",ur=Zs+Ye+xt+Cn,Di="['’]",vo="["+Yi+"]",rs="["+ur+"]",ua="["+wr+"]",eu="\\d+",ii="["+Ta+"]",qi="["+Ss+"]",Aa="[^"+Yi+ur+eu+Ta+Ss+Qn+"]",Cs="\\ud83c[\\udffb-\\udfff]",xi="(?:"+ua+"|"+Cs+")",uA="[^"+Yi+"]",Ja="(?:\\ud83c[\\udde6-\\uddff]){2}",oi="[\\ud800-\\udbff][\\udc00-\\udfff]",to="["+Qn+"]",$o="\\u200d",Qo="(?:"+qi+"|"+Aa+")",js="(?:"+to+"|"+Aa+")",Es="(?:"+Di+"(?:d|ll|m|re|s|t|ve))?",Xs="(?:"+Di+"(?:D|LL|M|RE|S|T|VE))?",Js=xi+"?",Au="["+fn+"]?",Ns="(?:"+$o+"(?:"+[uA,Ja,oi].join("|")+")"+Au+Js+")*",Oi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",is="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ea=Au+Js+Ns,va="(?:"+[ii,Ja,oi].join("|")+")"+ea,As="(?:"+[uA+ua+"?",ua,Ja,oi,vo].join("|")+")",pl=RegExp(Di,"g"),ml=RegExp(ua,"g"),fo=RegExp(Cs+"(?="+Cs+")|"+As+ea,"g"),Uu=RegExp([to+"?"+qi+"+"+Es+"(?="+[rs,to,"$"].join("|")+")",js+"+"+Xs+"(?="+[rs,to+Qo,"$"].join("|")+")",to+"?"+Qo+"+"+Es,to+"+"+Xs,is,Oi,eu,va].join("|"),"g"),zi=RegExp("["+$o+Yi+wr+fn+"]"),qr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Dl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Vi=-1,uo={};uo[pe]=uo[nt]=uo[wt]=uo[Ht]=uo[sn]=uo[Hn]=uo[Ve]=uo[J]=uo[ve]=!0,uo[yt]=uo[Ft]=uo[Ge]=uo[Ue]=uo[ce]=uo[Pe]=uo[it]=uo[_t]=uo[Lt]=uo[nn]=uo[vn]=uo[dr]=uo[Pn]=uo[pn]=uo[vr]=!1;var Ki={};Ki[yt]=Ki[Ft]=Ki[Ge]=Ki[ce]=Ki[Ue]=Ki[Pe]=Ki[pe]=Ki[nt]=Ki[wt]=Ki[Ht]=Ki[sn]=Ki[Lt]=Ki[nn]=Ki[vn]=Ki[dr]=Ki[Pn]=Ki[pn]=Ki[$n]=Ki[Hn]=Ki[Ve]=Ki[J]=Ki[ve]=!0,Ki[it]=Ki[_t]=Ki[vr]=!1;var ee={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:Line truncated
|
||||
/* [wrapped with `+k+`] */
|
||||
`)}function g(b){return xo(b)||_m(b)||!!(Mh&&b&&b[Mh])}function S(b,k){var $=typeof b;return k=k??Je,!!k&&($=="number"||$!="symbol"&&Sl.test(b))&&b>-1&&b%1==0&&b<k}function E(b,k,$){if(!kl($))return!1;var ye=typeof k;return(ye=="number"?Kc($)&&S(k,$.length):ye=="string"&&k in $)?sh($[k],b):!1}function R(b,k){if(xo(b))return!1;var $=typeof b;return $=="number"||$=="symbol"||$=="boolean"||b==null||Rc(b)?!0:Dn.test(b)||!jt.test(b)||k!=null&&b in Jo(k)}function Z(b){var k=typeof b;return k=="string"||k=="number"||k=="symbol"||k=="boolean"?b!=="__proto__":b===null}function Ae(b){var k=kh(b),$=ot[k];if(typeof $!="function"||!(k in Gr.prototype))return!1;if(b===$)return!0;var ye=ff($);return!!ye&&b===ye[0]}function Ce(b){return!!$d&&$d in b}var Ie=AA?ah:f3;function je(b){var k=b&&b.constructor,$=typeof k=="function"&&k.prototype||Ka;return b===$}function gt(b){return b===b&&!kl(b)}function Mt(b,k){return function($){return $==null?!1:$[b]===k&&(k!==t||b in Jo($))}}function Xt(b){var k=Cr(b,function(ye){return $.size===y&&$.clear(),ye}),$=k.cache;return k}function Qt(b,k){var $=b[1],ye=k[1],qe=$|ye,ht=qe<(N|Y|G),Tt=ye==G&&$==se||ye==G&&$==oe&&b[7].length<=k[8]||ye==(G|oe)&&k[7].length<=k[8]&&$==se;if(!(ht||Tt))return b;ye&N&&(b[2]=k[2],qe|=$&N?0:H);var $t=k[3];if($t){var ln=b[3];b[3]=ln?Bh(ln,$t,k[4]):$t,b[4]=ln?tl(b[3],x):k[4]}return $t=k[5],$t&&(ln=b[5],b[5]=ln?cc(ln,$t,k[6]):$t,b[6]=ln?tl(b[5],x):k[6]),$t=k[7],$t&&(b[7]=$t),ye&G&&(b[8]=b[8]==null?k[8]:ao(b[8],k[8])),b[9]==null&&(b[9]=k[9]),b[0]=k[0],b[1]=qe,b}function xn(b){var k=[];if(b!=null)for(var $ in Jo(b))k.push($);return k}function Fn(b){return cA.call(b)}function Ar(b,k,$){return k=ms(k===t?b.length-1:k,0),function(){for(var ye=arguments,qe=-1,ht=ms(ye.length-k,0),Tt=an(ht);++qe<ht;)Tt[qe]=ye[k+qe];qe=-1;for(var $t=an(k+1);++qe<k;)$t[qe]=ye[qe];return $t[k]=$(Tt),Ws(b,this,$t)}}function tr(b,k){return k.length<2?b:xu(b,ki(k,0,-1))}function gr(b,k){for(var $=b.length,ye=ao(k.length,$),qe=Ts(b);ye--;){var ht=k[ye];b[ye]=S(ht,$)?qe[ht]:t}return b}function yr(b,k){if(!(k==="constructor"&&typeof b[k]=="function")&&k!="__proto__")return b[k]}var Rr=Bo(Zr),ti=Cd||function(b,k){return Ir.setTimeout(b,k)},jr=Bo(Xi);function Ji(b,k,$){var ye=k+"";return jr(b,A(ye,Ga(Ea(ye),$)))}function Bo(b){var k=0,$=0;return function(){var ye=_d(),qe=Se-(ye-$);if($=ye,qe>0){if(++k>=me)return arguments[0]}else k=0;return b.apply(t,arguments)}}function Na(b,k){var $=-1,ye=b.length,qe=ye-1;for(k=k===t?ye:k;++$<k;){var ht=Mn($,qe),Tt=b[ht];b[ht]=b[$],b[$]=Tt}return b.length=k,b}var na=Xt(function(b){var k=[];return b.charCodeAt(0)===46&&k.push(""),b.replace(rr,function($,ye,qe,ht){k.push(qe?ht.replace(ka,"$1"):ye||$)}),k});function fa(b){if(typeof b=="string"||Rc(b))return b;var k=b+"";return k=="0"&&1/b==-1/0?"-0":k}function Wa(b){if(b!=null){try{return xc.call(b)}catch{}try{return b+""}catch{}}return""}function Ga(b,k){return el(Yt,function($){var ye="_."+$[0];k&$[1]&&!jd(b,ye)&&b.push(ye)}),b.sort()}function Wl(b){if(b instanceof Gr)return b.clone();var k=new gi(b.__wrapped__,b.__chain__);return k.__actions__=Ts(b.__actions__),k.__index__=b.__index__,k.__values__=b.__values__,k}function Qa(b,k,$){($?E(b,k,$):k===t)?k=1:k=ms(Oo(k),0);var ye=b==null?0:b.length;if(!ye||k<1)return[];for(var qe=0,ht=0,Tt=an(dA(ye/k));qe<ye;)Tt[ht++]=ki(b,qe,qe+=k);return Tt}function pa(b){for(var k=-1,$=b==null?0:b.length,ye=0,qe=[];++k<$;){var ht=b[k];ht&&(qe[ye++]=ht)}return qe}function as(){var b=arguments.length;if(!b)return[];for(var k=an(b-1),$=arguments[0],ye=b;ye--;)k[ye-1]=arguments[ye];return Cc(xo($)?Ts($):[$],ks(k,1))}var Ci=On(function(b,k){return Ql(b)?al(b,ks(k,1,Ql,!0)):[]}),ls=On(function(b,k){var $=jA(k);return Ql($)&&($=t),Ql(b)?al(b,ks(k,1,Ql,!0),wi($,2)):[]}),ra=On(function(b,k){var $=jA(k);return Ql($)&&($=t),Ql(b)?al(b,ks(k,1,Ql,!0),t,$):[]});function Ys(b,k,$){var ye=b==null?0:b.length;return ye?(k=$||k===t?1:Oo(k),ki(b,k<0?0:k,ye)):[]}function xs(b,k,$){var ye=b==null?0:b.length;return ye?(k=$||k===t?1:Oo(k),k=ye-k,ki(b,0,k<0?0:k)):[]}function Bu(b,k){return b&&b.length?wu(b,wi(k,3),!0,!0):[]}function Ko(b,k){return b&&b.length?wu(b,wi(k,3),!0):[]}function Pc(b,k,$,ye){var qe=b==null?0:b.length;return qe?($&&typeof $!="number"&&E(b,k,$)&&($=0,ye=qe),sf(b,k,$,ye)):[]}function Ou(b,k,$){var ye=b==null?0:b.length;if(!ye)return-1;var qe=$==null?0:Oo($);return qe<0&&(qe=ms(ye+qe,0)),_c(b,wi(k,3),qe)}function zA(b,k,$){var ye=b==null?0:b.length;if(!ye)return-1;var qe=ye-1;return $!==t&&(qe=Oo($),qe=$<0?ms(ye+qe,0):ao(qe,ye-1)),_c(b,wi(k,3),qe,!0)}function CA(b){var k=b==null?0:b.length;return k?ks(b,1):[]}function Ya(b){var k=b==null?0:b.length;return k?ks(b,Ze):[]}function Ol(b,k){var $=b==null?0:b.length;return $?(k=k===t?1:Oo(k),ks(b,k)):[]}function Qf(b){for(var k=-1,$=b==null?0:b.length,ye={};++k<$;){var qe=b[k];ye[qe[0]]=qe[1]}return ye}function pf(b){return b&&b.length?b[0]:t}function nh(b,k,$){var ye=b==null?0:b.length;if(!ye)return-1;var qe=$==null?0:Oo($);return qe<0&&(
Line truncated
|
||||
`;b.replace($r,function(ro,vs,Ps,Uh,Rd,zh){return Ps||(Ps=Uh),pr+=b.slice(Yn,zh).replace(Xa,XA),vs&&($t=!0,pr+=`' +
|
||||
__e(`+vs+`) +
|
||||
'`),Rd&&(ln=!0,pr+=`';
|
||||
`+Rd+`;
|
||||
__p += '`),Ps&&(pr+=`' +
|
||||
((__t = (`+Ps+`)) == null ? '' : __t) +
|
||||
'`),Yn=zh+ro.length,ro}),pr+=`';
|
||||
`;var no=Yr.call(k,"variable")&&k.variable;if(!no)pr=`with (obj) {
|
||||
`+pr+`
|
||||
}
|
||||
`;else if(Or.test(no))throw new Ri(o);pr=(ln?pr.replace(p,""):pr).replace(Fe,"$1").replace(Qe,"$1;"),pr="function("+(no||"obj")+`) {
|
||||
`+(no?"":`obj || (obj = {});
|
||||
`)+"var __t, __p = ''"+($t?", __e = _.escape":"")+(ln?`, __j = Array.prototype.join;
|
||||
function print() { __p += __j.call(arguments, '') }
|
||||
`:`;
|
||||
`)+pr+`return __p
|
||||
}`;var ts=I_(function(){return Po(ht,Ii+"return "+pr).apply(t,Tt)});if(ts.source=pr,u0(ts))throw ts;return ts}function nv(b){return u(b).toLowerCase()}function rv(b){return u(b).toUpperCase()}function Xf(b,k,$){if(b=u(b),b&&($||k===t))return bc(b);if(!b||!(k=ss(k)))return b;var ye=Nu(b),qe=Nu(k),ht=EA(ye,qe),Tt=Wc(ye,qe)+1;return Ua(ye,ht,Tt).join("")}function E_(b,k,$){if(b=u(b),b&&($||k===t))return b.slice(0,Yd(b)+1);if(!b||!(k=ss(k)))return b;var ye=Nu(b),qe=Wc(ye,Nu(k))+1;return Ua(ye,0,qe).join("")}function B_(b,k,$){if(b=u(b),b&&($||k===t))return b.replace(un,"");if(!b||!(k=ss(k)))return b;var ye=Nu(b),qe=EA(ye,Nu(k));return Ua(ye,qe).join("")}function o3(b,k){var $=fe,ye=Ee;if(kl(k)){var qe="separator"in k?k.separator:qe;$="length"in k?Oo(k.length):$,ye="omission"in k?ss(k.omission):ye}b=u(b);var ht=b.length;if(pu(b)){var Tt=Nu(b);ht=Tt.length}if($>=ht)return b;var $t=$-pd(ye);if($t<1)return ye;var ln=Tt?Ua(Tt,0,$t).join(""):b.slice(0,$t);if(qe===t)return ln+ye;if(Tt&&($t+=ln.length-$t),A1(qe)){if(b.slice($t).search(qe)){var Yn,Vn=ln;for(qe.global||(qe=JA(qe.source,u(Bi.exec(qe))+"g")),qe.lastIndex=0;Yn=qe.exec(Vn);)var pr=Yn.index;ln=ln.slice(0,pr===t?$t:pr)}}else if(b.indexOf(ss(qe),$t)!=$t){var $r=ln.lastIndexOf(qe);$r>-1&&(ln=ln.slice(0,$r))}return ln+ye}function s3(b){return b=u(b),b&&dt.test(b)?b.replace(rt,Uf):b}var a3=Ed(function(b,k,$){return b+($?" ":"")+k.toUpperCase()}),iv=lm("toUpperCase");function O_(b,k,$){return b=u(b),k=$?t:k,k===t?ef(b)?bh(b):_p(b):b.match(k)||[]}var I_=On(function(b,k){try{return Ws(b,t,k)}catch($){return u0($)?$:new Ri($)}}),l3=dc(function(b,k){return el(k,function($){$=fa($),Kr(b,$,or(b[$],b))}),b});function u3(b){var k=b==null?0:b.length,$=wi();return b=k?Fo(b,function(ye){if(typeof ye[1]!="function")throw new tu(l);return[$(ye[0]),ye[1]]}):[],On(function(ye){for(var qe=-1;++qe<k;){var ht=b[qe];if(Ws(ht[0],this,ye))return Ws(ht[1],this,ye)}})}function Fh(b){return rf(vl(b,B))}function m0(b){return function(){return b}}function k_(b,k){return b==null||b!==b?k:b}var A3=wp(),c3=wp(!0);function id(b){return b}function rA(b){return be(typeof b=="function"?b:vl(b,B))}function Kd(b){return mt(vl(b,B))}function Mm(b,k){return ut(b,vl(k,B))}var Lh=On(function(b,k){return function($){return jl($,b,k)}}),wm=On(function(b,k){return function($){return jl(b,$,k)}});function lh(b,k,$){var ye=kn(k),qe=Ic(k,ye);$==null&&!(kl(k)&&(qe.length||!ye.length))&&($=k,k=b,b=this,qe=Ic(k,kn(k)));var ht=!(kl($)&&"chain"in $)||!!$.chain,Tt=ah(b);return el(qe,function($t){var ln=k[$t];b[$t]=ln,Tt&&(b.prototype[$t]=function(){var Yn=this.__chain__;if(ht||Yn){var Vn=b(this.__wrapped__),pr=Vn.__actions__=Ts(this.__actions__);return pr.push({func:ln,args:arguments,thisArg:b}),Vn.__chain__=Yn,Vn}return ln.apply(b,Cc([this.value()],arguments))})}),b}function aN(){return Ir._===this&&(Ir._=Ll),this}function d3(){}function lN(b){return b=Oo(b),On(function(k){return Et(k,b)})}var uN=uf(Fo),AN=uf(Ad),cN=uf(zu);function ZO(b){return R(b)?Hh(fa(b)):It(b)}function dN(b){return function(k){return b==null?t:xu(b,k)}}var hN=eh(),fN=eh(!0);function h3(){return[]}function f3(){return!1}function pN(){return{}}function mN(){return""}function gN(){return!0}function yN(b,k){if(b=Oo(b),b<1||b>Je)return[];var $=De,ye=ao(b,De);k=wi(k),b-=De;for(var qe=Xh(ye,k);++$<b;)k($);return qe}function vN(b){return xo(b)?Fo(b,fa):Rc(b)?[b]:Ts(na(u(b)))}function CN(b){var k=++tc;return u(b)+k}var _N=ed(function(b,k){return b+k},0),bN=Nl("ceil"),xN=ed(function(b,k){return b/k},1),MN=Nl("floor");function wN(b){return b&&b.length?Is(b,id,su):t}function SN(b,k){return b&&b.length?Is(b,wi(k,2),su):t}function EN(b){return jc(b,id)}function BN(b,k){return jc(b,wi(k,2))}function ON(b){return b&&b.length?Is(b,id,$e):t}function IN(b,k){return b&&b.length?Is(b,wi(k,2),$e):t}var kN=ed(function(b,k){return b*k},1),TN=Nl("round"),PN=ed(function(b,k){return b-k},0);function KN(b){return b&&b.length?ZA(b,id):0}function RN(b,k){return b&&b.length?ZA(b,wi(k,2)):0}return ot.after=wn,ot.ary=ir,ot.assign=h,ot.assignIn=v,ot.assignInWith=w,ot.assignWith=K,ot.at=F,ot.before=mr,ot.bind=or,ot.bindAll=l3,ot.bindKey=Vr,ot.castArray=o_,ot.chain=Cf,ot.chunk=Qa,ot.compact=pa,ot.concat=as,ot.cond=u3,ot.conforms=Fh,ot.constant=m0,ot.countBy=i0,ot.create=W,ot.curry=ai,ot.curryRight=ui,ot.debounce=xl,ot.defaults=X,ot.defaultsDeep=ie,ot.defer=hn,ot.delay=en,ot.difference=Ci,ot.differenceBy=ls,ot.differenceWith=ra,ot.drop=Ys,ot.dropRight=xs,ot.dropRightWhile=Bu,ot.dropWhile=Ko,ot.fill=Pc,ot.filter=s0,ot.flatMap=J0,ot.flatMapDeep=a1,ot.flatMapDepth=eg,ot.flatten=CA,ot.flattenDeep=Ya,ot.flattenDepth=Ol,ot.flip=yn,ot.flow=A3,ot.flowRight=c3,ot.fromPairs=Qf,ot.functions=At,ot.functionsIn=Ct,ot.groupBy=vm,ot.initial=qm,ot.intersection=q0,ot.intersectionBy=td,ot.intersectionWith=dm,ot.invert=lt,ot.invertBy=Bt,ot.invokeMap=ih,ot.iteratee=rA,ot.keyBy=Od,ot.keys=kn,ot.keysIn=An,ot.map=Cm,ot.mapKeys=Bn,ot.mapValues=nr,ot.matches=Kd,ot.matchesProperty=Mm,ot.memoize=Cr,ot.mer
Line truncated
|
||||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(B[1])} }\`.`)];const O=[];return n.layerType==="symbol"&&(o==="text-field"&&i&&!i.glyphs&&O.push(new Mr(t,l,'use of "text-field" requires a style "glyphs" property')),o==="text-font"&&Fy(Fg(l))&&Ru(l.type)==="identity"&&O.push(new Mr(t,l,'"text-font" does not support identity functions'))),O.concat(r({key:n.key,value:l,valueSpec:x,style:i,styleSpec:s,expressionContext:"property",propertyType:e,propertyKey:o}))}function MF(n){return xF(n,"paint")}function wF(n){return xF(n,"layout")}function SF(n){let e=[];const t=n.value,r=n.key,i=n.style,s=n.styleSpec;!t.type&&!t.ref&&e.push(new Mr(r,t,'either "type" or "ref" is required'));let l=Ru(t.type);const o=Ru(t.ref);if(t.id){const f=Ru(t.id);for(let y=0;y<n.arrayIndex;y++){const x=i.layers[y];Ru(x.id)===f&&e.push(new Mr(r,t.id,`duplicate layer id "${t.id}", previously used at line ${x.id.__line__}`))}}if("ref"in t){["type","source","source-layer","filter","layout"].forEach(y=>{y in t&&e.push(new Mr(r,t[y],`"${y}" is prohibited for ref layers`))});let f;i.layers.forEach(y=>{Ru(y.id)===o&&(f=y)}),f?f.ref?e.push(new Mr(r,t.ref,"ref cannot reference another ref layer")):l=Ru(f.type):e.push(new Mr(r,t.ref,`ref layer "${o}" not found`))}else if(l!=="background")if(!t.source)e.push(new Mr(r,t,'missing required property "source"'));else{const f=i.sources&&i.sources[t.source],y=f&&Ru(f.type);f?y==="vector"&&l==="raster"?e.push(new Mr(r,t.source,`layer "${t.id}" requires a raster source`)):y!=="raster-dem"&&l==="hillshade"?e.push(new Mr(r,t.source,`layer "${t.id}" requires a raster-dem source`)):y==="raster"&&l!=="raster"?e.push(new Mr(r,t.source,`layer "${t.id}" requires a vector source`)):y==="vector"&&!t["source-layer"]?e.push(new Mr(r,t,`layer "${t.id}" must specify a "source-layer"`)):y==="raster-dem"&&l!=="hillshade"?e.push(new Mr(r,t.source,"raster-dem source can only be used with layer type 'hillshade'.")):l==="line"&&t.paint&&t.paint["line-gradient"]&&(y!=="geojson"||!f.lineMetrics)&&e.push(new Mr(r,t,`layer "${t.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new Mr(r,t.source,`source "${t.source}" not found`))}return e=e.concat(Ef({key:r,value:t,valueSpec:s.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*"(){return[]},type(){return n.validateSpec({key:`${r}.type`,value:t.type,valueSpec:s.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:t,objectKey:"type"})},filter:pB,layout(f){return Ef({layer:t,key:f.key,value:f.value,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*"(y){return wF(_y({layerType:l},y))}}})},paint(f){return Ef({layer:t,key:f.key,value:f.value,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*"(y){return MF(_y({layerType:l},y))}}})}}})),e}function Lg(n){const e=n.value,t=n.key,r=Ds(e);return r!=="string"?[new Mr(t,e,`string expected, ${r} found`)]:[]}function Tq(n){var e;const t=(e=n.sourceName)!==null&&e!==void 0?e:"",r=n.value,i=n.styleSpec,s=i.source_raster_dem,l=n.style;let o=[];const f=Ds(r);if(r===void 0)return o;if(f!=="object")return o.push(new Mr("source_raster_dem",r,`object expected, ${f} found`)),o;const x=Ru(r.encoding)==="custom",B=["redFactor","greenFactor","blueFactor","baseShift"],O=n.value.encoding?`"${n.value.encoding}"`:"Default";for(const P in r)!x&&B.includes(P)?o.push(new Mr(P,r[P],`In "${t}": "${P}" is only valid when "encoding" is set to "custom". ${O} encoding found`)):s[P]?o=o.concat(n.validateSpec({key:P,value:r[P],valueSpec:s[P],validateSpec:n.validateSpec,style:l,styleSpec:i})):o.push(new Mr(P,r[P],`unknown property "${P}"`));return o}const f7={promoteId:Pq};function EF(n){const e=n.value,t=n.key,r=n.styleSpec,i=n.style,s=n.validateSpec;if(!e.type)return[new Mr(t,e,'"type" is required')];const l=Ru(e.type);let o;switch(l){case"vector":case"raster":return o=Ef({key:t,value:e,valueSpec:r[`source_${l.replace("-","_")}`],style:n.style,styleSpec:r,objectElementValidators:f7,validateSpec:s}),o;case"raster-dem":return o=Tq({sourceName:t,value:e,style:n.style,styleSpec:r,validateSpec:s}),o;case"geojson":if(o=Ef({key:t,value:e,valueSpec:r.source_geojson,style:i,styleSpec:r,validateSpec:s,objectElementValidators:f7}),e.cluster)for(const f in e.clusterProperties){const[y,x]=e.clusterProperties[f],B=typeof y=="string"?[y,["accumulated"],["get",f]]:y;o.push(...xy({key:`${t}.${f}.map`,value:x,validateSpec:s,expressionContext:"cluster-map"})),o.push(...xy({key:`${t}.${f}.reduce`,value:B,validateSpec:s,expressionContext:"cluster-reduce"}))}return o;case"video":return Ef({key:t,value:e,valueSpec:r.source_video,style:i,validateSpec:s,styleSpec:r});case"image":return Ef({key:t,value:e,valueSpec:r.source_image,style:i,validateSpec:s,styleSpec:r});case"canvas":return[new Mr(t,null,"Please use runtime APIs to add canvas sources,Line truncated
|
||||
${B}`),j].join(`
|
||||
${o}`)}return y}(n,"",0)}function m7(n,e){const t={};for(const r in e)n[r]!==void 0&&(t[r]=n[r]);for(const r in n)t[r]===void 0&&(t[r]=n[r]);return t}function KF(n,e=2){return n=m7(n,Ms.$root),n.layers&&(n.layers=n.layers.map(t=>m7(t,Ms.layer))),Wq(n,{indent:e})}function z3(n,e){for(const t in n)t.indexOf("layout")===0&&e(n[t],t)}function g7(n,e){for(const t in n)t.indexOf("paint")===0&&e(n[t],t)}function UE(n,e){return typeof e=="string"&&e[0]==="@"?UE(n,n.constants[e]):e}function Gq(n){return Array.isArray(n.stops)}function lv(n,e,t){n[t]=n[e],delete n[e]}function Qq(n){n.version=8,Oq(n,i=>{i.type==="video"&&i.url!==void 0&&lv(i,"url","urls"),i.type==="video"&&i.coordinates.forEach(s=>s.reverse())}),Gv(n,i=>{z3(i,s=>{s["symbol-min-distance"]!==void 0&&lv(s,"symbol-min-distance","symbol-spacing")}),g7(i,s=>{s["background-image"]!==void 0&&lv(s,"background-image","background-pattern"),s["line-image"]!==void 0&&lv(s,"line-image","line-pattern"),s["fill-image"]!==void 0&&lv(s,"fill-image","fill-pattern")})}),dB(n,{paint:!0,layout:!0},i=>{const s=UE(n,i.value);Gq(s)&&s.stops.forEach(l=>{l[1]=UE(n,l[1])}),i.set(s)}),delete n.constants,Gv(n,i=>{z3(i,s=>{delete s["text-max-size"],delete s["icon-max-size"]}),g7(i,s=>{s["text-size"]&&(i.layout||(i.layout={}),i.layout["text-size"]=s["text-size"],delete s["text-size"]),s["icon-size"]&&(i.layout||(i.layout={}),i.layout["icon-size"]=s["icon-size"],delete s["icon-size"])})});function e(i){function s(l){return l.split(",").map(o=>o.trim())}if(Array.isArray(i))return i;if(typeof i=="string")return s(i);if(typeof i=="object")return i.stops.forEach(l=>{l[1]=s(l[1])}),i;throw new Error("unexpected font value")}Gv(n,i=>{z3(i,s=>{s["text-font"]&&(s["text-font"]=e(s["text-font"]))})});let t=0;for(let i=n.layers.length-1;i>=0;i--)if(n.layers[i].type!=="symbol"){t=i+1;break}const r=n.layers.splice(t);return r.reverse(),n.layers=n.layers.concat(r),n}function Yq(n){const e=[];return Gv(n,t=>{t.filter&&(t.filter=Wv(t.filter))}),dB(n,{paint:!0,layout:!0},({path:t,value:r,reference:i,set:s})=>{Ly(r)||(typeof r=="object"&&!Array.isArray(r)?(s(lB(r,i)),e.push(t.join("."))):i.tokens&&typeof r=="string"&&s(vF(r)))}),n}function qq(n){return JSON.parse(Vq(JSON.stringify(n)))}function Vq(n){return n.replace(/"hsla?\((.+?)\)"/gi,(e,t)=>{const r=t.match(/^(.+?)\s*,\s*(.+?)\s*,\s*(.+?)(?:\s*,\s*(.+))?$/i);if(r){let[i,s,l,o]=r.slice(1);return[s,l]=[s,l].map(f=>f.endsWith("%")?f:`${parseFloat(f)*100}%`),`"hsl${typeof o=="string"?"a":""}(${[i,s,l,o].filter(Boolean).join(",")})"`}return e})}function $q(n){let e=!1;if(n.version===7&&(n=Qq(n),e=!0),n.version===8&&(e=!!Yq(n),e=!0),dB(n,{paint:!0,layout:!0},({value:t,reference:r,set:i})=>{r.type==="color"&&i(qq(t))}),!e)throw new Error(`Cannot migrate from ${n.version}`);return n}const Hq=Ms,Zq={StyleExpression:gF,StylePropertyFunction:sx,ZoomConstantExpression:DE,ZoomDependentExpression:FE,createExpression:ix,createPropertyExpression:ox,isExpression:Ly,isExpressionFilter:RC,isZoomExpression:fq,normalizePropertyExpression:pq},Xq={convertFunction:lB,createFunction:aB,isFunction:Fy};var ax=IC();const Jq=fl(ax);var xb={exports:{}};/**
|
||||
* MapLibre GL JS
|
||||
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.2.0/LICENSE.txt
|
||||
*/var eV=xb.exports,y7;function tV(){return y7||(y7=1,function(n,e){(function(t,r){n.exports=r()})(eV,function(){var t={},r={};function i(l,o,f){if(r[l]=f,l==="index"){var y="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",x={};return r.shared(x),r.index(t,x),typeof window<"u"&&t.setWorkerUrl(window.URL.createObjectURL(new Blob([y],{type:"text/javascript"}))),t}}i("shared",["exports"],function(l){function o(d,u,h,v){return new(h||(h=Promise))(function(w,K){function F(ie){try{X(v.next(ie))}catch(de){K(de)}}function W(ie){try{X(v.throw(ie))}catch(de){K(de)}}function X(ie){var de;ie.done?w(ie.value):(de=ie.value,de instanceof h?de:new h(function(_e){_e(de)})).then(F,W)}X((v=v.apply(d,u||[])).next())})}function f(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var y,x;function B(){if(x)return y;function d(u,h){this.x=u,this.y=h}return x=1,y=d,d.prototype={clone:function(){return new d(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,h){return this.clone()._rotateAround(u,h)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var h=u.x-this.x,v=u.y-this.y;return h*h+v*v},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,h){return Math.atan2(this.x*h-this.y*u,this.x*u+this.y*h)},_matMult:function(u){var h=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=h,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var h=Math.cos(u),v=Math.sin(u),w=v*this.x+h*this.y;return this.x=h*this.x-v*this.y,this.y=w,this},_rotateAround:function(u,h){var v=Math.cos(u),w=Math.sin(u),K=h.y+w*(this.x-h.x)+v*(this.y-h.y);return this.x=h.x+v*(this.x-h.x)-w*(this.y-h.y),this.y=K,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},d.convert=function(u){return u instanceof d?u:Array.isArray(u)?new d(u[0],u[1]):u},y}typeof SuppressedError=="function"&&SuppressedError;var O,P,U=f(B()),j=function(){if(P)return O;function d(u,h,v,w){this.cx=3*u,this.bx=3*(v-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*h,this.by=3*(w-h)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=h,this.p2x=v,this.p2y=w}return P=1,O=d,d.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,h){if(h===void 0&&(h=1e-6),u<0)return 0;if(u>1)return 1;for(var v=u,w=0;w<8;w++){var K=this.sampleCurveX(v)-u;if(Math.abs(K)<h)return v;var F=this.sampleCurveDerivativeX(v);if(Math.abs(F)<1e-6)break;v-=K/F}var W=0,X=1;for(v=u,w=0;w<20&&(K=this.sampleCurveX(v),!(Math.abs(K-u)<h));w++)u>K?W=v:X=v,v=.5*(X-W)+W;return v},solve:function(u,h){return this.sampleCurveY(this.solveCurveX(u,h))}},O}(),N=f(j);let Y,H;function se(){return Y==null&&(Y=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Y}function re(){if(H==null&&(H=!1,se())){const u=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(u){for(let v=0;v<5*5;v++){const w=4*v;u.fillStyle=`rgb(${w},${w+1},${w+2})`,u.fillRect(v%5,Math.floor(v/5),1,1)}const h=u.getImageData(0,0,5,5).data;for(let v=0;v<5*5*4;v++)if(v%4!=3&&h[v]!==v){H=!0;break}}}return H||!1}var V,ne=1e-6,G=typeof Float32Array<"u"?Float32Array:Array;function oe(){var d=new G(9);return G!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[5]=0,d[6]=0,d[7]=0),d[0]=1,d[4]=1,d[8]=1,d}function he(d){return d[0]=1,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=1,d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1,d}function fe(){var d=new G(3);return G!=Float32Array&&(d[0]=0,d[1]=0,d[2]=0),d}function Ee(d,u,h){var v=new G(3);return v[0]=d,v[1]=u,v[2]=h,v}function me(d,u,hLine truncated
|
||||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(_e[1])} }\`.`)];const Re=[];return d.layerType==="symbol"&&(W==="text-field"&&w&&!w.glyphs&&Re.push(new jt(h,F,'use of "text-field" requires a style "glyphs" property')),W==="text-font"&&tc(_d(F))&&ao(F.type)==="identity"&&Re.push(new jt(h,F,'"text-font" does not support identity functions'))),Re.concat(v({key:d.key,value:F,valueSpec:de,style:w,styleSpec:K,expressionContext:"property",propertyType:u,propertyKey:W}))}function xd(d){return Qu(d,"paint")}function $c(d){return Qu(d,"layout")}function Zd(d){let u=[];const h=d.value,v=d.key,w=d.style,K=d.styleSpec;h.type||h.ref||u.push(new jt(v,h,'either "type" or "ref" is required'));let F=ao(h.type);const W=ao(h.ref);if(h.id){const X=ao(h.id);for(let ie=0;ie<d.arrayIndex;ie++){const de=w.layers[ie];ao(de.id)===X&&u.push(new jt(v,h.id,`duplicate layer id "${h.id}", previously used at line ${de.id.__line__}`))}}if("ref"in h){let X;["type","source","source-layer","filter","layout"].forEach(ie=>{ie in h&&u.push(new jt(v,h[ie],`"${ie}" is prohibited for ref layers`))}),w.layers.forEach(ie=>{ao(ie.id)===W&&(X=ie)}),X?X.ref?u.push(new jt(v,h.ref,"ref cannot reference another ref layer")):F=ao(X.type):u.push(new jt(v,h.ref,`ref layer "${W}" not found`))}else if(F!=="background")if(h.source){const X=w.sources&&w.sources[h.source],ie=X&&ao(X.type);X?ie==="vector"&&F==="raster"?u.push(new jt(v,h.source,`layer "${h.id}" requires a raster source`)):ie!=="raster-dem"&&F==="hillshade"?u.push(new jt(v,h.source,`layer "${h.id}" requires a raster-dem source`)):ie==="raster"&&F!=="raster"?u.push(new jt(v,h.source,`layer "${h.id}" requires a vector source`)):ie!=="vector"||h["source-layer"]?ie==="raster-dem"&&F!=="hillshade"?u.push(new jt(v,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):F!=="line"||!h.paint||!h.paint["line-gradient"]||ie==="geojson"&&X.lineMetrics||u.push(new jt(v,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):u.push(new jt(v,h,`layer "${h.id}" must specify a "source-layer"`)):u.push(new jt(v,h.source,`source "${h.source}" not found`))}else u.push(new jt(v,h,'missing required property "source"'));return u=u.concat(Ul({key:v,value:h,valueSpec:K.layer,style:d.style,styleSpec:d.styleSpec,validateSpec:d.validateSpec,objectElementValidators:{"*":()=>[],type:()=>d.validateSpec({key:`${v}.type`,value:h.type,valueSpec:K.layer.type,style:d.style,styleSpec:d.styleSpec,validateSpec:d.validateSpec,object:h,objectKey:"type"}),filter:rl,layout:X=>Ul({layer:h,key:X.key,value:X.value,style:X.style,styleSpec:X.styleSpec,validateSpec:X.validateSpec,objectElementValidators:{"*":ie=>$c(Dn({layerType:F},ie))}}),paint:X=>Ul({layer:h,key:X.key,value:X.value,style:X.style,styleSpec:X.styleSpec,validateSpec:X.validateSpec,objectElementValidators:{"*":ie=>xd(Dn({layerType:F},ie))}})}})),u}function nu(d){const u=d.value,h=d.key,v=Yr(u);return v!=="string"?[new jt(h,u,`string expected, ${v} found`)]:[]}const Yu={promoteId:function({key:d,value:u}){if(Yr(u)==="string")return nu({key:d,value:u});{const h=[];for(const v in u)h.push(...nu({key:`${d}.${v}`,value:u[v]}));return h}}};function qu(d){const u=d.value,h=d.key,v=d.styleSpec,w=d.style,K=d.validateSpec;if(!u.type)return[new jt(h,u,'"type" is required')];const F=ao(u.type);let W;switch(F){case"vector":case"raster":return W=Ul({key:h,value:u,valueSpec:v[`source_${F.replace("-","_")}`],style:d.style,styleSpec:v,objectElementValidators:Yu,validateSpec:K}),W;case"raster-dem":return W=function(X){var ie;const de=(ie=X.sourceName)!==null&&ie!==void 0?ie:"",_e=X.value,Re=X.styleSpec,ze=Re.source_raster_dem,We=X.style;let et=[];const At=Yr(_e);if(_e===void 0)return et;if(At!=="object")return et.push(new jt("source_raster_dem",_e,`object expected, ${At} found`)),et;const Ct=ao(_e.encoding)==="custom",Nt=["redFactor","greenFactor","blueFactor","baseShift"],St=X.value.encoding?`"${X.value.encoding}"`:"Default";for(const Le in _e)!Ct&&Nt.includes(Le)?et.push(new jt(Le,_e[Le],`In "${de}": "${Le}" is only valid when "encoding" is set to "custom". ${St} encoding found`)):ze[Le]?et=et.concat(X.validateSpec({key:Le,value:_e[Le],valueSpec:ze[Le],validateSpec:X.validateSpec,style:We,styleSpec:Re})):et.push(new jt(Le,_e[Le],`unknown property "${Le}"`));return et}({sourceName:h,value:u,style:d.style,styleSpec:v,validateSpec:K}),W;case"geojson":if(W=Ul({key:h,value:u,valueSpec:v.source_geojson,style:w,styleSpec:v,validateSpec:K,objectElementValidators:Yu}),u.cluster)for(const X in u.clusterProperties){const[ie,de]=u.clusterProperties[X],_e=typeof ie=="string"?[ie,["accumulated"],["get",X]]:ie;W.push(...nl({key:`${h}.${X}.map`,value:de,expressionContext:"cluster-map"})),W.push(...nl({key:`${h}.${X}.reduce`,value:_e,expressionContext:"cluster-reduce"}))}return W;case"video":return Ul({key:h,value:u,valueSpec:v.source_video,style:w,validateSpec:K,styleSpec:v});case"image":retuLine truncated
|
||||
precision mediump float;
|
||||
#else
|
||||
#if !defined(lowp)
|
||||
#define lowp
|
||||
#endif
|
||||
#if !defined(mediump)
|
||||
#define mediump
|
||||
#endif
|
||||
#if !defined(highp)
|
||||
#define highp
|
||||
#endif
|
||||
#endif
|
||||
out highp vec4 fragColor;`,`#ifdef GL_ES
|
||||
precision highp float;
|
||||
#else
|
||||
#if !defined(lowp)
|
||||
#define lowp
|
||||
#endif
|
||||
#if !defined(mediump)
|
||||
#define mediump
|
||||
#endif
|
||||
#if !defined(highp)
|
||||
#define highp
|
||||
#endif
|
||||
#endif
|
||||
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
|
||||
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c
|
||||
);}
|
||||
#ifdef TERRAIN3D
|
||||
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
|
||||
#endif
|
||||
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
|
||||
#ifdef TERRAIN3D
|
||||
highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
|
||||
#else
|
||||
return 1.0;
|
||||
#endif
|
||||
}float calculate_visibility(vec4 pos) {
|
||||
#ifdef TERRAIN3D
|
||||
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
|
||||
#else
|
||||
return 1.0;
|
||||
#endif
|
||||
}float ele(vec2 pos) {
|
||||
#ifdef TERRAIN3D
|
||||
vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
|
||||
#else
|
||||
return 0.0;
|
||||
#endif
|
||||
}float get_elevation(vec2 pos) {
|
||||
#ifdef TERRAIN3D
|
||||
#ifdef GLOBE
|
||||
if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
|
||||
#endif
|
||||
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
|
||||
#else
|
||||
return 0.0;
|
||||
#endif
|
||||
}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:qi("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:qi("",`#define GLOBE_RADIUS 6371008.8
|
||||
uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
|
||||
);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);
|
||||
if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
|
||||
);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:qi(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:qi(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:qi(`in vec3 v_data;in float v_visibility;
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define mediump float radius
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define highp vec4 stroke_color
|
||||
#pragma mapbox: define mediump float stroke_width
|
||||
#pragma mapbox: define lowp float stroke_opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize mediump float radius
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize highp vec4 stroke_color
|
||||
#pragma mapbox: initialize mediump float stroke_width
|
||||
#pragma mapbox: initialize lowp float stroke_opacity
|
||||
vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define mediump float radius
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define highp vec4 stroke_color
|
||||
#pragma mapbox: define mediump float stroke_width
|
||||
#pragma mapbox: define lowp float stroke_opacity
|
||||
void main(void) {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize mediump float radius
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize highp vec4 stroke_color
|
||||
#pragma mapbox: initialize mediump float stroke_width
|
||||
#pragma mapbox: initialize lowp float stroke_opacity
|
||||
vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
|
||||
#ifdef GLOBE
|
||||
vec3 center_vector=projectToSphere(circle_center);
|
||||
#endif
|
||||
float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
|
||||
#ifdef GLOBE
|
||||
vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
|
||||
#else
|
||||
vec4 projected_center=projectTileWithElevation(circle_center,ele);
|
||||
#endif
|
||||
corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
|
||||
#ifdef GLOBE
|
||||
vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
|
||||
#else
|
||||
gl_Position=projectTileWithElevation(corner_position,ele);
|
||||
#endif
|
||||
} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:qi(eu,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:qi(`uniform highp float u_intensity;in vec2 v_extrude;
|
||||
#pragma mapbox: define highp float weight
|
||||
#define GAUSS_COEF 0.3989422804014327
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp float weight
|
||||
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;
|
||||
#pragma mapbox: define highp float weight
|
||||
#pragma mapbox: define mediump float radius
|
||||
const highp float ZERO=1.0/255.0/16.0;
|
||||
#define GAUSS_COEF 0.3989422804014327
|
||||
void main(void) {
|
||||
#pragma mapbox: initialize highp float weight
|
||||
#pragma mapbox: initialize mediump float radius
|
||||
vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);
|
||||
#ifdef GLOBE
|
||||
vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
|
||||
#else
|
||||
gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
|
||||
#endif
|
||||
}`),heatmapTexture:qi(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(0.0);
|
||||
#endif
|
||||
}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:qi("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:qi("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:qi("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:qi(eu,`in vec2 a_pos;void main() {
|
||||
#ifdef GLOBE
|
||||
gl_Position=projectTileFor3D(a_pos,0.0);
|
||||
#else
|
||||
gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
|
||||
#endif
|
||||
}`),fill:qi(`#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
fragColor=color*opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:qi(`in vec2 v_pos;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 outline_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 outline_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 outline_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 outline_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
}`),fillOutlinePattern:qi(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
}`),fillPattern:qi(`#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
vec2 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=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:qi(`in vec4 v_color;void main() {fragColor=v_color;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
|
||||
#ifdef TERRAIN3D
|
||||
in vec2 a_centroid;
|
||||
#endif
|
||||
out vec4 v_color;
|
||||
#pragma mapbox: define highp float base
|
||||
#pragma mapbox: define highp float height
|
||||
#pragma mapbox: define highp vec4 color
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp float base
|
||||
#pragma mapbox: initialize highp float height
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
vec3 normal=a_normal_ed.xyz;
|
||||
#ifdef TERRAIN3D
|
||||
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
|
||||
#else
|
||||
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
|
||||
#endif
|
||||
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
|
||||
#ifdef GLOBE
|
||||
vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
|
||||
#else
|
||||
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
|
||||
#endif
|
||||
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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
|
||||
#ifdef GLOBE
|
||||
mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
|
||||
#endif
|
||||
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;}`),fillExtrusionPattern:qi(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
|
||||
#pragma mapbox: define lowp float base
|
||||
#pragma mapbox: define lowp float height
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float base
|
||||
#pragma mapbox: initialize lowp float height
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
|
||||
#ifdef TERRAIN3D
|
||||
in vec2 a_centroid;
|
||||
#endif
|
||||
#ifdef GLOBE
|
||||
out vec3 v_sphere_pos;
|
||||
#endif
|
||||
out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
|
||||
#pragma mapbox: define lowp float base
|
||||
#pragma mapbox: define lowp float height
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float base
|
||||
#pragma mapbox: initialize lowp float height
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
vec2 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;
|
||||
#ifdef TERRAIN3D
|
||||
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
|
||||
#else
|
||||
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
|
||||
#endif
|
||||
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
|
||||
#ifdef GLOBE
|
||||
vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
|
||||
#else
|
||||
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
|
||||
#endif
|
||||
vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
|
||||
? a_pos
|
||||
: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:qi(`#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/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));fragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:qi(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
|
||||
#define PI 3.141592653589793
|
||||
void main() {vec4 pixel=texture(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:qi(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
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);fragColor=color*(alpha*opacity);
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`
|
||||
#define scale 0.015873016
|
||||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define mediump float gapwidth
|
||||
#pragma mapbox: define lowp float offset
|
||||
#pragma mapbox: define mediump float width
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump float gapwidth
|
||||
#pragma mapbox: initialize lowp float offset
|
||||
#pragma mapbox: initialize mediump float width
|
||||
float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
#ifdef TERRAIN3D
|
||||
v_gamma_scale=1.0;
|
||||
#else
|
||||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||||
#endif
|
||||
v_width2=vec2(outset,inset);}`),lineGradient:qi(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`
|
||||
#define scale 0.015873016
|
||||
in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define mediump float gapwidth
|
||||
#pragma mapbox: define lowp float offset
|
||||
#pragma mapbox: define mediump float width
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump float gapwidth
|
||||
#pragma mapbox: initialize lowp float offset
|
||||
#pragma mapbox: initialize mediump float width
|
||||
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
#ifdef TERRAIN3D
|
||||
v_gamma_scale=1.0;
|
||||
#else
|
||||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||||
#endif
|
||||
v_width2=vec2(outset,inset);}`),linePattern:qi(`#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`
|
||||
#define scale 0.015873016
|
||||
#define LINE_DISTANCE_SCALE 2.0
|
||||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float offset
|
||||
#pragma mapbox: define mediump float gapwidth
|
||||
#pragma mapbox: define mediump float width
|
||||
#pragma mapbox: define lowp float floorwidth
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float offset
|
||||
#pragma mapbox: initialize mediump float gapwidth
|
||||
#pragma mapbox: initialize mediump float width
|
||||
#pragma mapbox: initialize lowp float floorwidth
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
#ifdef TERRAIN3D
|
||||
v_gamma_scale=1.0;
|
||||
#else
|
||||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||||
#endif
|
||||
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:qi(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define mediump float width
|
||||
#pragma mapbox: define lowp float floorwidth
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump float width
|
||||
#pragma mapbox: initialize lowp float floorwidth
|
||||
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 sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`
|
||||
#define scale 0.015873016
|
||||
#define LINE_DISTANCE_SCALE 2.0
|
||||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_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;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define mediump float gapwidth
|
||||
#pragma mapbox: define lowp float offset
|
||||
#pragma mapbox: define mediump float width
|
||||
#pragma mapbox: define lowp float floorwidth
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump float gapwidth
|
||||
#pragma mapbox: initialize lowp float offset
|
||||
#pragma mapbox: initialize mediump float width
|
||||
#pragma mapbox: initialize lowp float floorwidth
|
||||
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
#ifdef TERRAIN3D
|
||||
v_gamma_scale=1.0;
|
||||
#else
|
||||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||||
#endif
|
||||
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);}`),raster:qi(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
|
||||
#ifdef GLOBE
|
||||
if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
|
||||
#endif
|
||||
v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:qi(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||||
#ifdef GLOBE
|
||||
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||||
#endif
|
||||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:qi(`#define SDF_PX 8.0
|
||||
uniform 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;in vec2 v_data0;in vec3 v_data1;
|
||||
#pragma mapbox: define highp vec4 fill_color
|
||||
#pragma mapbox: define highp vec4 halo_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float halo_width
|
||||
#pragma mapbox: define lowp float halo_blur
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 fill_color
|
||||
#pragma mapbox: initialize highp vec4 halo_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float halo_width
|
||||
#pragma mapbox: initialize lowp float halo_blur
|
||||
float 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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;
|
||||
#pragma mapbox: define highp vec4 fill_color
|
||||
#pragma mapbox: define highp vec4 halo_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float halo_width
|
||||
#pragma mapbox: define lowp float halo_blur
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 fill_color
|
||||
#pragma mapbox: initialize highp vec4 halo_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float halo_width
|
||||
#pragma mapbox: initialize lowp float halo_blur
|
||||
vec2 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;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||||
#ifdef GLOBE
|
||||
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||||
#endif
|
||||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:qi(`#define SDF_PX 8.0
|
||||
#define SDF 1.0
|
||||
#define ICON 0.0
|
||||
uniform 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;in vec4 v_data0;in vec4 v_data1;
|
||||
#pragma mapbox: define highp vec4 fill_color
|
||||
#pragma mapbox: define highp vec4 halo_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float halo_width
|
||||
#pragma mapbox: define lowp float halo_blur
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 fill_color
|
||||
#pragma mapbox: initialize highp vec4 halo_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float halo_width
|
||||
#pragma mapbox: initialize lowp float halo_blur
|
||||
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
return;}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=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;
|
||||
#pragma mapbox: define highp vec4 fill_color
|
||||
#pragma mapbox: define highp vec4 halo_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float halo_width
|
||||
#pragma mapbox: define lowp float halo_blur
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 fill_color
|
||||
#pragma mapbox: initialize highp vec4 halo_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float halo_width
|
||||
#pragma mapbox: initialize lowp float halo_blur
|
||||
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||||
#ifdef GLOBE
|
||||
if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||||
#endif
|
||||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));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);}`),terrain:qi("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:qi("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:qi("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:qi("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:qi(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3Line truncated
|
||||
);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:qi("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function qi(I,a){const c=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,_=a.match(/in ([\w]+) ([\w]+)/g),M=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),T=a.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),z=T?T.concat(M):M,q={};return{fragmentSource:I=I.replace(c,(te,ae,be,ke,Te)=>(q[Te]=!0,ae==="define"?`
|
||||
#ifndef HAS_UNIFORM_u_${Te}
|
||||
in ${be} ${ke} ${Te};
|
||||
#else
|
||||
uniform ${be} ${ke} u_${Te};
|
||||
#endif
|
||||
`:`
|
||||
#ifdef HAS_UNIFORM_u_${Te}
|
||||
${be} ${ke} ${Te} = u_${Te};
|
||||
#endif
|
||||
`)),vertexSource:a=a.replace(c,(te,ae,be,ke,Te)=>{const $e=ke==="float"?"vec2":"vec4",Xe=Te.match(/color/)?"color":$e;return q[Te]?ae==="define"?`
|
||||
#ifndef HAS_UNIFORM_u_${Te}
|
||||
uniform lowp float u_${Te}_t;
|
||||
in ${be} ${$e} a_${Te};
|
||||
out ${be} ${ke} ${Te};
|
||||
#else
|
||||
uniform ${be} ${ke} u_${Te};
|
||||
#endif
|
||||
`:Xe==="vec4"?`
|
||||
#ifndef HAS_UNIFORM_u_${Te}
|
||||
${Te} = a_${Te};
|
||||
#else
|
||||
${be} ${ke} ${Te} = u_${Te};
|
||||
#endif
|
||||
`:`
|
||||
#ifndef HAS_UNIFORM_u_${Te}
|
||||
${Te} = unpack_mix_${Xe}(a_${Te}, u_${Te}_t);
|
||||
#else
|
||||
${be} ${ke} ${Te} = u_${Te};
|
||||
#endif
|
||||
`:ae==="define"?`
|
||||
#ifndef HAS_UNIFORM_u_${Te}
|
||||
uniform lowp float u_${Te}_t;
|
||||
in ${be} ${$e} a_${Te};
|
||||
#else
|
||||
uniform ${be} ${ke} u_${Te};
|
||||
#endif
|
||||
`:Xe==="vec4"?`
|
||||
#ifndef HAS_UNIFORM_u_${Te}
|
||||
${be} ${ke} ${Te} = a_${Te};
|
||||
#else
|
||||
${be} ${ke} ${Te} = u_${Te};
|
||||
#endif
|
||||
`:`
|
||||
#ifndef HAS_UNIFORM_u_${Te}
|
||||
${be} ${ke} ${Te} = unpack_mix_${Xe}(a_${Te}, u_${Te}_t);
|
||||
#else
|
||||
${be} ${ke} ${Te} = u_${Te};
|
||||
#endif
|
||||
`}),staticAttributes:_,staticUniforms:z}}class Aa{constructor(a,c,_){this.vertexBuffer=a,this.indexBuffer=c,this.segments=_}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var Cs=o.aC([{name:"a_pos",type:"Int16",components:2}]);const xi="#define PROJECTION_MERCATOR",uA="mercator";class Ja{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return uA}get shaderDefine(){return xi}get shaderPreludeCode(){return ii.projectionMercator}get vertexShaderPreludeCode(){return ii.projectionMercator.vertexSource}get subdivisionGranularity(){return o.aD.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(a){}getMeshFromTileID(a,c,_,M,T){if(this._cachedMesh)return this._cachedMesh;const z=new o.aE;z.emplaceBack(0,0),z.emplaceBack(o.Z,0),z.emplaceBack(0,o.Z),z.emplaceBack(o.Z,o.Z);const q=a.createVertexBuffer(z,Cs.members),te=o.aF.simpleSegment(0,0,4,2),ae=new o.aG;ae.emplaceBack(1,0,2),ae.emplaceBack(1,2,3);const be=a.createIndexBuffer(ae);return this._cachedMesh=new Aa(q,be,te),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(a){}}function oi(I,a){const c=o.ad(a.lat,-85.051129,o.aI);return new o.P(o.U(a.lng)*I,o.S(c)*I)}function to(I,a){return new o.$(a.x/I,a.y/I).toLngLat()}function $o(I){return I.cameraToCenterDistance*Math.min(.85*Math.tan(o.ac(90-I.pitch)),Math.tan(o.ac(89.25-I.pitch)))}function Qo(I,a){const c=I.canonical,_=a/o.aH(c.z),M=c.x+Math.pow(2,c.z)*I.wrap,T=o.as(new Float64Array(16));return o.L(T,T,[M*_,c.y*_,0]),o.M(T,T,[_/o.Z,_/o.Z,1]),T}function js(I,a,c,_,M){const T=o.$.fromLngLat(I,a),z=M*o.aJ(1,I.lat),q=z*Math.cos(o.ac(c)),te=Math.sqrt(z*z-q*q),ae=te*Math.sin(o.ac(-_)),be=te*Math.cos(o.ac(-_));return new o.$(T.x+ae,T.y+be,T.z+q)}class Es{constructor(a=0,c=0,_=0,M=0){if(isNaN(a)||a<0||isNaN(c)||c<0||isNaN(_)||_<0||isNaN(M)||M<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=a,this.bottom=c,this.left=_,this.right=M}interpolate(a,c,_){return c.top!=null&&a.top!=null&&(this.top=o.B.number(a.top,c.top,_)),c.bottom!=null&&a.bottom!=null&&(this.bottom=o.B.number(a.bottom,c.bottom,_)),c.left!=null&&a.left!=null&&(this.left=o.B.number(a.left,c.left,_)),c.right!=null&&a.right!=null&&(this.right=o.B.number(a.right,c.right,_)),this}getCenter(a,c){const _=o.ad((this.left+a-this.right)/2,0,a),M=o.ad((this.top+c-this.bottom)/2,0,c);return new o.P(_,M)}equals(a){return this.top===a.top&&this.bottom===a.bottom&&this.left===a.left&&this.right===a.right}clone(){return new Es(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Xs(I,a){if(!I.renderWorldCopies||I.lngRange)return;const c=a.lng-I.center.lng;a.lng+=c>180?-360:c<-180?360:0}function Js(I){return Math.max(0,Math.floor(I))}class Au{constructor(a,c,_,M,T,z){this._callbacks=a,this._tileSize=512,this._renderWorldCopies=z===void 0||!!z,this._minZoom=c||0,this._maxZoom=_||22,this._minPitch=M??0,this._maxPitch=T??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new o.Q(0,0),this._elevation=0,this._zoom=0,this._tileZoom=Js(this._zoom),this._scale=o.aH(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Es,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(a,c,_){this._latRange=a.latRange,this._lngRange=a.lngRange,this._width=a.width,this._height=a.height,this._center=a.center,this._elevation=a.elevation,this._minElevationForCurrentTile=a.minElevationForCurrentTile,this._zoom=a.zoom,this._tileZoom=Js(this._zoom),this._scale=o.aH(this._zoom),this._bearingInRadians=a.bearingInRadians,this._fovInRadians=a.fovInRadians,this._pitchInRadians=a.pitchInRadians,this._rollInRadians=a.rollInRadians,this._unmodified=a.unmodified,this._edgeInsets=new Es(a.padding.top,a.padding.bottom,a.padding.left,a.padding.right),this._minZoom=a.minZoom,this._maxZoom=a.maxZoom,this._minPitch=a.minPitch,this._maxPitch=a.maxPitch,this._renderWorldCopies=a.renderWorldCopies,this._cameraToCenterDistance=a.cameraToCenterDistance,this._nearZ=a.nearZ,this._farZ=a.farZ,this._autoCalculateNearFarZ=!_&&a.autoCalculateNearFarZ,c&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(a){this._minElevationForCurrentTile=a}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadia
Line truncated
|
||||
`),Rt=Et.concat(ii.prelude.vertexSource,q.vertexSource,c.vertexSource).join(`
|
||||
`);Ki(ae)||(kt=function(Zt){return Zt.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(kt),Rt=function(Zt){return Zt.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Rt));const Ut=ae.createShader(ae.FRAGMENT_SHADER);if(ae.isContextLost())return void(this.failedToCreate=!0);if(ae.shaderSource(Ut,kt),ae.compileShader(Ut),!ae.getShaderParameter(Ut,ae.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ae.getShaderInfoLog(Ut)}`);ae.attachShader(this.program,Ut);const It=ae.createShader(ae.VERTEX_SHADER);if(ae.isContextLost())return void(this.failedToCreate=!0);if(ae.shaderSource(It,Rt),ae.compileShader(It),!ae.getShaderParameter(It,ae.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ae.getShaderInfoLog(It)}`);ae.attachShader(this.program,It),this.attributes={};const rn={};this.numAttributes=Te.length;for(let Zt=0;Zt<this.numAttributes;Zt++)Te[Zt]&&(ae.bindAttribLocation(this.program,Zt,Te[Zt]),this.attributes[Te[Zt]]=Zt);if(ae.linkProgram(this.program),!ae.getProgramParameter(this.program,ae.LINK_STATUS))throw new Error(`Program failed to link: ${ae.getProgramInfoLog(this.program)}`);ae.deleteShader(It),ae.deleteShader(Ut);for(let Zt=0;Zt<vt.length;Zt++){const Mn=vt[Zt];if(Mn&&!rn[Mn]){const En=ae.getUniformLocation(this.program,Mn);En&&(rn[Mn]=En)}}this.fixedUniforms=M(a,rn),this.terrainUniforms=((Zt,Mn)=>({u_depth:new o.bE(Zt,Mn.u_depth),u_terrain:new o.bE(Zt,Mn.u_terrain),u_terrain_dim:new o.b7(Zt,Mn.u_terrain_dim),u_terrain_matrix:new o.bG(Zt,Mn.u_terrain_matrix),u_terrain_unpack:new o.bH(Zt,Mn.u_terrain_unpack),u_terrain_exaggeration:new o.b7(Zt,Mn.u_terrain_exaggeration)}))(a,rn),this.projectionUniforms=((Zt,Mn)=>({u_projection_matrix:new o.bG(Zt,Mn.u_projection_matrix),u_projection_tile_mercator_coords:new o.bH(Zt,Mn.u_projection_tile_mercator_coords),u_projection_clipping_plane:new o.bH(Zt,Mn.u_projection_clipping_plane),u_projection_transition:new o.b7(Zt,Mn.u_projection_transition),u_projection_fallback_matrix:new o.bG(Zt,Mn.u_projection_fallback_matrix)}))(a,rn),this.binderUniforms=_?_.getUniforms(a,rn):[]}draw(a,c,_,M,T,z,q,te,ae,be,ke,Te,$e,Xe,mt,ut,ft,vt,Et){const kt=a.gl;if(this.failedToCreate)return;if(a.program.set(this.program),a.setDepthMode(_),a.setStencilMode(M),a.setColorMode(T),a.setCullFace(z),te){a.activeTexture.set(kt.TEXTURE2),kt.bindTexture(kt.TEXTURE_2D,te.depthTexture),a.activeTexture.set(kt.TEXTURE3),kt.bindTexture(kt.TEXTURE_2D,te.texture);for(const Ut in this.terrainUniforms)this.terrainUniforms[Ut].set(te[Ut])}if(ae)for(const Ut in ae)this.projectionUniforms[Nd[Ut]].set(ae[Ut]);if(q)for(const Ut in this.fixedUniforms)this.fixedUniforms[Ut].set(q[Ut]);ut&&ut.setUniforms(a,this.binderUniforms,Xe,{zoom:mt});let Rt=0;switch(c){case kt.LINES:Rt=2;break;case kt.TRIANGLES:Rt=3;break;case kt.LINE_STRIP:Rt=1}for(const Ut of $e.get()){const It=Ut.vaos||(Ut.vaos={});(It[be]||(It[be]=new Cc)).bind(a,this,ke,ut?ut.getPaintVertexBuffers():[],Te,Ut.vertexOffset,ft,vt,Et),kt.drawElements(c,Ut.primitiveLength*Rt,kt.UNSIGNED_SHORT,Ut.primitiveOffset*Rt*2)}}}function Gd(I,a,c){const _=1/o.av(c,1,a.transform.tileZoom),M=Math.pow(2,c.tileID.overscaledZ),T=c.tileSize*Math.pow(2,a.transform.tileZoom)/M,z=T*(c.tileID.canonical.x+c.tileID.wrap*M),q=T*c.tileID.canonical.y;return{u_image:0,u_texsize:c.imageAtlasTexture.size,u_scale:[_,I.fromScale,I.toScale],u_fade:I.t,u_pixel_coord_upper:[z>>16,q>>16],u_pixel_coord_lower:[65535&z,65535&q]}}const _p=(I,a,c,_)=>{const M=I.style.light,T=M.properties.get("position"),z=[T.x,T.y,T.z],q=o.bK();M.properties.get("anchor")==="viewport"&&o.bL(q,I.transform.bearingInRadians),o.bM(z,z,q);const te=I.transform.transformLightDirection(z),ae=M.properties.get("color");return{u_lightpos:z,u_lightpos_globe:te,u_lightintensity:M.properties.get("intensity"),u_lightcolor:[ae.r,ae.g,ae.b],u_vertical_gradient:+a,u_opacity:c,u_fill_translate:_}},dd=(I,a,c,_,M,T,z)=>o.e(_p(I,a,c,_),Gd(T,I,z),{u_height_factor:-Math.pow(2,M.overscaledZ)/z.tileSize/8}),_c=(I,a,c,_)=>o.e(Gd(a,I,c),{u_fill_translate:_}),Gs=(I,a)=>({u_world:I,u_fill_translate:a}),Lf=(I,a,c,_,M)=>o.e(_c(I,a,c,M),{u_world:_}),$h=(I,a,c,_,M)=>{const T=I.transform;let z,q,te=0;if(c.paint.get("circle-pitch-alignment")==="map"){const ae=o.av(a,1,T.zoom);z=!0,q=[ae,ae],te=ae/(o.Z*Math.pow(2,a.tileID.overscaledZ))*2*Math.PI*M}else z=!1,q=T.pixelsToGLUnits;return{u_camera_to_center_distance:T.cameraToCenterDistance,u_scale_with_map:+(c.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+z,u_device_pixel_ratio:I.pixelRatio,u_extrude_scale:q,u_globe_extrude_scale:te,u_translate:_}},jc=I=>({u_pixel_extrude_scale:[1/I.width,1/I.height]}),Hh=I=>({u_viewport_size:[I.width,I.height]}),hd=(I,a=1)=>({u_color:I,u_overlay:0,u_overlay_scale:a}),Zh=(I,a,c,_)=>{const M=o.av(I,1,a)/(o.Z*Math.pow(2,I.tileID.overscaledZ))*2*Math.PI*_;return{u_extrude_scale:o.a
Line truncated
|
||||
uniform mat4 u_projection_matrix;
|
||||
${$e.shaderPreludeCode.vertexSource}`,define:$e.shaderDefine},defaultProjectionData:mt},ft=Te.renderingMode?Te.renderingMode:"2d";if(z.renderPass==="offscreen"){const vt=Te.prerender;vt&&(z.setCustomLayerDefaults(),ke.setColorMode(z.colorModeForRenderPass()),vt.call(Te,ke.gl,ut),ke.setDirty(),z.setBaseState())}else if(z.renderPass==="translucent"){z.setCustomLayerDefaults(),ke.setColorMode(z.colorModeForRenderPass()),ke.setStencilMode(Vi.disabled);const vt=ft==="3d"?z.getDepthModeFor3D():z.getDepthModeForSublayer(0,qr.ReadOnly);ke.setDepthMode(vt),Te.render(ke.gl,ut),ke.setDirty(),z.setBaseState(),ke.bindFramebuffer.set(null)}}(a,0,_,T))}saveTileTexture(a){const c=this._tileTextures[a.size[0]];c?c.push(a):this._tileTextures[a.size[0]]=[a]}getTileTexture(a){const c=this._tileTextures[a];return c&&c.length>0?c.pop():null}isPatternMissing(a){if(!a)return!1;if(!a.from||!a.to)return!0;const c=this.imageManager.getPattern(a.from.toString()),_=this.imageManager.getPattern(a.to.toString());return!c||!_}useProgram(a,c,_=!1){this.cache=this.cache||{};const M=!!this.style.map.terrain,T=this.style.projection,z=a+(c?c.cacheKey:"")+`/${_?uA:T.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(M?"/terrain":"");return this.cache[z]||(this.cache[z]=new Wd(this.context,ii[a],c,fd[a],this._showOverdrawInspector,M,_?ii.projectionMercator:T.shaderPreludeCode,_?xi:T.shaderDefine)),this.cache[z]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const a=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(a.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new oe(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:a,drawingBufferHeight:c}=this.context.gl;return this.width!==a||this.height!==c}}function Zd(I,a){let c,_=!1,M=null,T=null;const z=()=>{M=null,_&&(I.apply(T,c),M=setTimeout(z,a),_=!1)};return(...q)=>(_=!0,T=this,c=q,M||z(),M)}class nu{constructor(a){this._getCurrentHash=()=>{const c=window.location.hash.replace("#","");if(this._hashName){let _;return c.split("&").map(M=>M.split("=")).forEach(M=>{M[0]===this._hashName&&(_=M)}),(_&&_[1]||"").split("/")}return c.split("/")},this._onHashChange=()=>{const c=this._getCurrentHash();if(!this._isValidHash(c))return!1;const _=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(c[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+c[2],+c[1]],zoom:+c[0],bearing:_,pitch:+(c[4]||0)}),!0},this._updateHashUnthrottled=()=>{const c=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,c)},this._removeHash=()=>{const c=this._getCurrentHash();if(c.length===0)return;const _=c.join("/");let M=_;M.split("&").length>0&&(M=M.split("&")[0]),this._hashName&&(M=`${this._hashName}=${_}`);let T=window.location.hash.replace(M,"");T.startsWith("#&")?T=T.slice(0,1)+T.slice(2):T==="#"&&(T="");let z=window.location.href.replace(/(#.+)?$/,T);z=z.replace("&&","&"),window.history.replaceState(window.history.state,null,z)},this._updateHash=Zd(this._updateHashUnthrottled,300),this._hashName=a&&encodeURIComponent(a)}addTo(a){return this._map=a,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(a){const c=this._map.getCenter(),_=Math.round(100*this._map.getZoom())/100,M=Math.ceil((_*Math.LN2+Math.log(512/360/.5))/Math.LN10),T=Math.pow(10,M),z=Math.round(c.lng*T)/T,q=Math.round(c.lat*T)/T,te=this._map.getBearing(),ae=this._map.getPitch();let be="";if(be+=a?`/${z}/${q}/${_}`:`${_}/${q}/${z}`,(te||ae)&&(be+="/"+Math.round(10*te)/10),ae&&(be+=`/${Math.round(ae)}`),this._hashName){const ke=this._hashName;let Te=!1;const $e=window.location.hash.slice(1).split("&").map(Xe=>{const mt=Xe.split("=")[0];return mt===ke?(Te=!0,`${mt}=${be}`):Xe}).filter(Xe=>Xe);return Te||$e.push(`${ke}=${be}`),`#${$e.join("&")}`}return`#${be}`}_isValidHash(a){if(a.length<3||a.some(isNaN))return!1;try{new o.Q(+a[2],+a[1])}catch{return!1}const c=+a[0],_=+(a[3]||0),M=+(a[4]||0);return c>=this._map.getMinZoom()&&c<=this._map.getMaxZoom()&&_>=-180&&_<=180&&M>=this._map.getMinPitch()&&M<=this._map.getMaxPitch()}}const Yu={linearity:.3,easing:o.c8(0,0,.3,1)},qu=o.e({deceleration:2500,maxSpeed:1400},Y
Line truncated
|
||||
${e} <span></span>
|
||||
`,qs().s[12]++,this._textEl=this._container.querySelector("span"),qs().s[13]++,this.updateZoomLevel()}addEventListeners(){qs().f[4]++,qs().s[14]++,this._map.on("render",()=>(qs().f[5]++,qs().s[15]++,this.updateZoomLevel())),qs().s[16]++,this._map.on("zoomIn",()=>(qs().f[6]++,qs().s[17]++,this.updateZoomLevel())),qs().s[18]++,this._map.on("zoomOut",()=>(qs().f[7]++,qs().s[19]++,this.updateZoomLevel()))}onRemove(){qs().f[8]++,qs().s[20]++,this._container.parentNode.removeChild(this._container),qs().s[21]++,this._map=void 0}}function YE(n,e,t){const r={id:[e,t,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":n,"circle-radius":2},filter:["==","$type","Point"]};return t&&(r["source-layer"]=t),r}function qE(n,e,t,r){const i={id:[t,r,"polygon"].join("_"),source:t,type:"fill",paint:{"fill-color":n,"fill-antialias":!0,"fill-outline-color":n},filter:["==","$type","Polygon"]};return r&&(i["source-layer"]=r),i}function VE(n,e,t){const r={id:[e,t,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":n},filter:["==","$type","LineString"]};return t&&(r["source-layer"]=t),r}function y$(n,e){const t=[],r=[],i=[];function s(l){return{circle:e(l,.8),line:e(l,.6),polygon:e(l,.3),polygonOutline:e(l,.6),default:e(l,1)}}return Object.keys(n).forEach(l=>{const o=n[l];if(!o||o.length===0){const f=s(l);r.push(YE(f.circle,l)),i.push(VE(f.line,l)),t.push(qE(f.polygon,f.polygonOutline,l))}else o.forEach(f=>{const y=s(f);r.push(YE(y.circle,l,f)),i.push(VE(y.line,l,f)),t.push(qE(y.polygon,y.polygonOutline,l,f))})}),t.concat(i).concat(r)}function v$(n,e,t){t=Object.assign({backgroundColor:"#fff"},t);const r={id:"background",type:"background",paint:{"background-color":t.backgroundColor}},i={};return Object.keys(n.sources).forEach(s=>{const l=n.sources[s];(l.type==="vector"||l.type==="geojson")&&(i[s]=l)}),Object.assign(n,{layers:[r].concat(e),sources:i})}const Y3={polygonLayer:qE,lineLayer:VE,circleLayer:YE,generateInspectStyle:v$,generateColoredLayers:y$};function go(){var n="/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",e="aec0f701e803624fae461cc89b5fc887ff556587",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",statementMap:{0:{start:{line:4,column:2},end:{line:8,column:3}},1:{start:{line:5,column:4},end:{line:5,column:33}},2:{start:{line:6,column:9},end:{line:8,column:3}},3:{start:{line:7,column:4},end:{line:7,column:30}},4:{start:{line:9,column:2},end:{line:13,column:3}},5:{start:{line:10,column:4},end:{line:10,column:28}},6:{start:{line:12,column:4},end:{line:12,column:23}},7:{start:{line:14,column:2},end:{line:14,column:29}},8:{start:{line:15,column:2},end:{line:15,column:11}},9:{start:{line:18,column:2},end:{line:18,column:84}},10:{start:{line:18,column:72},end:{line:18,column:84}},11:{start:{line:19,column:24},end:{line:19,column:51}},12:{start:{line:20,column:16},end:{line:20,column:52}},13:{start:{line:21,column:2},end:{line:23,column:3}},14:{start:{line:22,column:4},end:{line:22,column:104}},15:{start:{line:24,column:2},end:{line:26,column:3}},16:{start:{line:25,column:4},end:{line:25,column:96}},17:{start:{line:27,column:2},end:{line:29,column:3}},18:{start:{line:28,column:4},end:{line:28,column:94}},19:{start:{line:30,column:2},end:{line:30,column:14}}},fnMap:{0:{name:"changeLayer",decl:{start:{line:3,column:9},end:{line:3,column:20}},loc:{start:{line:3,column:31},end:{line:16,column:1}},line:3},1:{name:"colorHighlightedLayer",decl:{start:{line:17,column:16},end:{line:17,column:37}},loc:{start:{line:17,column:45},end:{line:31,column:1}},line:17}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:8,column:3}},type:"if",locations:[{start:{line:4,column:2},end:{line:8,column:3}},{start:{line:6,column:9},end:{line:8,column:3}}],line:4},1:{loc:{start:{line:6,column:9},end:{line:8,column:3}},type:"if",locations:[{start:{line:6,column:9},end:{line:8,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},2:{loc:{start:{line:9,column:2},end:{line:13,column:3}},type:"if",locations:[{start:{line:9,column:2},end:{line:13,column:3}},{start:{line:11,column:9},end:{line:13,column:3}}],line:9},3:{loc:{start:{line:18,column:2},end:{line:18,column:84}},type:"if",locations:[{start:{line:18,column:2},end:{line:18,column:84}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},4:{loc:{start:{line:18,column:6},end:{line:18,column:70}},type:"binary-expr",locations:[{start:{line:18,column:6},end:{line:18,column:12}},{start:{line:18,column:16},end:{line:18,column:43}},{start:{line:18,column:47},end:{line:18,column:70}}],line:18},5:{loc:{start:{line:19,column:24},end:{line:19,column:51}},type:"binary-expr",locations:[{start:{line:19,column:24},end:{line:19,column:45}},{start:{line:19,column:49},end:{line:19,column:51}}],line:19},6:{loc:{start:{line:21,column:2},end:{line:23,column:3}},type:"if",locations:[{start:{line:21,column:2},end:{line:23,column:3}},{s
Line truncated
|
||||
${this._localize("errorNoResults")}</div>`;this._renderMessage(e)}_renderMessage(e){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(e)}_localize(e){const t=I$.language(this.options.language.split(",")[0]);return this.options.language&&(uv!=null&&uv[e][t])?uv[e][t]:uv[e].en}_fitBoundsForMarkers(){if(this._typeahead.data.length<1)return;const e=this._typeahead.data.filter(t=>typeof t!="string").slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){const r=tp({},{padding:100},this.options.flyTo),i=new this._maplibregl.LngLatBounds;for(const s of e)i.extend(s.geometry.coordinates);this._map.fitBounds(i,r)}return e.length>0&&this._maplibregl&&this._handleResultMarkers(e),this}setInput(e){return this._inputEl.value=e,this._typeahead.selected=null,this._typeahead.clear(),e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e),this}setProximity(e){return this.options.proximity=e,this}getProximity(){return this.options.proximity}setRenderFunction(e){return e&&typeof e=="function"&&(this._typeahead.render=e),this}getRenderFunction(){return this._typeahead.render}setLanguage(e){return this.options.language=e||this.options.language||navigator.language,this}getLanguage(){return this.options.language}getZoom(){return this.options.zoom}setZoom(e){return this.options.zoom=e,this}getFlyTo(){return this.options.flyTo}setFlyTo(e){return this.options.flyTo=e,this}getPlaceholder(){return this.options.placeholder}setPlaceholder(e){return this.placeholder=e||this.options.placeholder||this._localize("placeholder"),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this}getBbox(){return this.options.bbox}setBbox(e){return this.options.bbox=e,this}getCountries(){return this.options.countries}setCountries(e){return this.options.countries=e,this}getTypes(){return this.options.types}setTypes(e){return this.options.types=e,this}getMinLength(){return this.options.minLength}setMinLength(e){return this.options.minLength=e,this._typeahead&&(this._typeahead.options.minLength=e),this}getLimit(){return this.options.limit}setLimit(e){return this.options.limit=e,this._typeahead&&(this._typeahead.options.limit=e),this}getFilter(){return this.options.filter}setFilter(e){return this.options.filter=e,this}setGeocoderApi(e){return this.geocoderApi=e,this}getGeocoderApi(){return this.geocoderApi}_handleMarker(e){if(!this._map)return;this._removeMarker();const r=tp({},{color:"#4668F2"},this.options.marker);this.mapMarker=new this._maplibregl.Marker(r);let i;if(this.options.popup){const l=tp({},{},this.options.popup);i=new this._maplibregl.Popup(l).setHTML(this.options.popupRender(e))}return e.center?(this.mapMarker.setLngLat(e.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(i)):e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&(this.mapMarker.setLngLat(e.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(i)),this}_removeMarker(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)}_handleResultMarkers(e){if(!this._map)return;this._removeResultMarkers();let r=tp({},{color:"#4668F2"},this.options.showResultMarkers);for(const i of e){let s;if(this.options.showResultMarkers){this.options.showResultMarkers&&this.options.showResultMarkers.element&&(s=this.options.showResultMarkers.element.cloneNode(!0),r=tp(r,{element:s}));const l=new this._maplibregl.Marker(tp({},r,{element:s}));let o;if(this.options.popup){const y=tp({},{},this.options.popup);o=new this._maplibregl.Popup(y).setHTML(this.options.popupRender(i))}i.center?(l.setLngLat(i.center).addTo(this._map),this.options.popup&&l.setPopup(o)):i.geometry&&i.geometry.type&&i.geometry.type==="Point"&&i.geometry.coordinates&&(l.setLngLat(i.geometry.coordinates).addTo(this._map),this.options.popup&&l.setPopup(o)),this.resultMarkers.push(l)}}return this}_removeResultMarkers(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(e){e.remove()}),this.resultMarkers=[])}on(e,t){return this._eventEmitter.on(e,t),this}once(e){return new Promise(t=>{this._eventEmitter.once(e,t)})}off(e,t){return this._eventEmitter.removeListener(e,t),this}}function Sn(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",e="300acb3537cd75ba7433c8df32ce2e40c6bb2cf5",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",statementMap:{0:{start:{line:21,column:2},end:{line:21,column:36}},1:{start:{line:22,column:2},end:{line:22,column:19}},2:{start:{line:25,column:26},end:{line:31,column:3}},3:{start:{line:32,column:16},end:{line:32,column:55}},4:{start:{line:33,column:2},end:{line:35,column:3}},5:{start:{line:34,column:4},end:{line:34,column:30}},6:{start:{line:36,column:18},end:{line:36,column:20}},7:{start:{line:37,column:2},eLine truncated
|
||||
`);o(U,j,N)?(FC(A6),H1=null,u6=void 0,Dp.set(P,100)):(Dp.set(P,Dp.get(P)+1,!0),y=!1)}}y&&(clearInterval(s),s=void 0)}return function(y){const x=PL(y);if(!x)return;const B=x.families;for(let O=0,P=B.length;O<P;++O){const U=B[O],j=x.style+`
|
||||
`+x.weight+`
|
||||
`+U;Dp.get(j)===void 0&&(Dp.set(j,100,!0),o(x.style,x.weight,U)||(Dp.set(j,0,!0),s===void 0&&(s=setInterval(f,32))))}}}(),wZ=function(){let n;return function(e){let t=A6[e];if(t==null){if(BL){const r=PL(e),i=DL(e,"Žg");t=(isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=e,document.body.appendChild(n),t=n.offsetHeight,document.body.removeChild(n);A6[e]=t}return t}}();function DL(n,e){return H1||(H1=Fu(1,1)),n!=u6&&(H1.font=n,u6=H1.font),H1.measureText(e)}function A2(n,e){return DL(n,e).width}function hI(n,e,t){if(e in t)return t[e];const r=e.split(`
|
||||
`).reduce((i,s)=>Math.max(i,A2(n,s)),0);return t[e]=r,r}function SZ(n,e){const t=[],r=[],i=[];let s=0,l=0,o=0,f=0;for(let y=0,x=e.length;y<=x;y+=2){const B=e[y];if(B===`
|
||||
`||y===x){s=Math.max(s,l),i.push(l),l=0,o+=f,f=0;continue}const O=e[y+1]||n.font,P=A2(O,B);t.push(P),l+=P;const U=wZ(O);r.push(U),f=Math.max(f,U)}return{width:s,height:o,widths:t,heights:r,lineWidths:i}}function EZ(n,e,t,r,i,s,l,o,f,y,x){n.save(),t!==1&&(n.globalAlpha===void 0?n.globalAlpha=B=>B.globalAlpha*=t:n.globalAlpha*=t),e&&n.transform.apply(n,e),r.contextInstructions?(n.translate(f,y),n.scale(x[0],x[1]),BZ(r,n)):x[0]<0||x[1]<0?(n.translate(f,y),n.scale(x[0],x[1]),n.drawImage(r,i,s,l,o,0,0,l,o)):n.drawImage(r,i,s,l,o,f,y,l*x[0],o*x[1]),n.restore()}function BZ(n,e){const t=n.contextInstructions;for(let r=0,i=t.length;r<i;r+=2)Array.isArray(t[r+1])?e[t[r]].apply(e,t[r+1]):e[t[r]]=t[r+1]}function fI(n){return n[0]>0&&n[1]>0}function OZ(n,e,t){return t===void 0&&(t=[0,0]),t[0]=n[0]*e+.5|0,t[1]=n[1]*e+.5|0,t}function ud(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}class xx{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=ud(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new xx({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return yo()}getImage(e){return yo()}getHitDetectionImage(){return yo()}getPixelRatio(e){return 1}getImageState(){return yo()}getImageSize(){return yo()}getOrigin(){return yo()}getSize(){return yo()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=ud(e)}listenImageChange(e){yo()}load(){yo()}unlistenImageChange(e){yo()}ready(){return Promise.resolve()}}class Mx extends xx{constructor(e){super({opacity:1,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius=e.radius,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?fi.LOADING:fi.LOADED,this.imageState_===fi.LOADING&&this.ready().then(()=>this.imageState_=fi.LOADED),this.render()}clone(){const e=this.getScale(),t=new Mx({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_,t=this.getDisplacement(),r=this.getScaleArray();return[e[0]/2-t[0]/r[0],e[1]/2+t[1]/r[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){var s,l;const t=(s=this.fill_)==null?void 0:s.getKey(),r=`${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}`+Object.values(this.renderOptions_).join(",");let i=(l=Bf.get(r,null,null))==null?void 0:l.getImage(1);if(!i){const o=this.renderOptions_,f=Math.ceil(o.size*e),y=Fu(f,f);this.draw_(o,y,e),i=y.canvas,Bf.set(r,null,null,new TL(i,void 0,null,fi.LOADED,null))}return i}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,r){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let i=this.radius,s=this.radius2_===void 0?i:this.radius2_;if(i<s){const ne=i;i=s,s=ne}const l=this.radius2_===void 0?this.points_:this.points_*2,o=2*Math.PI/l,f=s*Math.sin(o),y=Math.sqrt(s*s-f*f),x=i-y,B=Math.sqrt(f*f+x*x),O=B/f;if(e==="miter"&&O<=r)return O*t;const P=t/2/O,U=t/2*(x/B),N=Math.sqrt((i+P)*(i+P)+U*U)-i;if(this.radius2_===void 0||e==="bevel")return N*2;con
Line truncated
|
||||
`,""),n.push(e,""),n}class aX{constructor(e,t,r,i,s){this.overlaps=r,this.pixelRatio=t,this.resolution=e,this.alignAndScaleFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=gh(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=s?new YB:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,t,r,i){const s=e+t+r+i;if(this.labels_[s])return this.labels_[s];const l=i?this.strokeStates[i]:null,o=r?this.fillStates[r]:null,f=this.textStates[t],y=this.pixelRatio,x=[f.scale[0]*y,f.scale[1]*y],B=f.justify?h2[f.justify]:h4(Array.isArray(e)?e[0]:e,f.textAlign||vC),O=i&&l.lineWidth?l.lineWidth:0,P=Array.isArray(e)?e:String(e).split(`
|
||||
`).reduce(sX,[]),{width:U,height:j,widths:N,heights:Y,lineWidths:H}=SZ(f,P),se=U+O,re=[],V=(se+2)*x[0],ne=(j+O)*x[1],G={width:V<0?Math.floor(V):Math.ceil(V),height:ne<0?Math.floor(ne):Math.ceil(ne),contextInstructions:re};(x[0]!=1||x[1]!=1)&&re.push("scale",x),i&&(re.push("strokeStyle",l.strokeStyle),re.push("lineWidth",O),re.push("lineCap",l.lineCap),re.push("lineJoin",l.lineJoin),re.push("miterLimit",l.miterLimit),re.push("setLineDash",[l.lineDash]),re.push("lineDashOffset",l.lineDashOffset)),r&&re.push("fillStyle",o.fillStyle),re.push("textBaseline","middle"),re.push("textAlign","center");const oe=.5-B;let he=B*se+oe*O;const fe=[],Ee=[];let me=0,Se=0,Ke=0,xe=0,at;for(let Ze=0,Je=P.length;Ze<Je;Ze+=2){const Ne=P[Ze];if(Ne===`
|
||||
`){Se+=me,me=0,he=B*se+oe*O,++xe;continue}const we=P[Ze+1]||f.font;we!==at&&(i&&fe.push("font",we),r&&Ee.push("font",we),at=we),me=Math.max(me,Y[Ke]);const De=[Ne,he+oe*N[Ke]+B*(N[Ke]-H[xe]),.5*(O+me)+Se];he+=N[Ke],i&&fe.push("strokeText",De),r&&Ee.push("fillText",De),++Ke}return Array.prototype.push.apply(re,fe),Array.prototype.push.apply(re,Ee),this.labels_[s]=G,G}replayTextBackground_(e,t,r,i,s,l,o){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,r),e.lineTo.apply(e,i),e.lineTo.apply(e,s),e.lineTo.apply(e,t),l&&(this.alignAndScaleFill_=l[2],e.fillStyle=l[1],this.fill_(e)),o&&(this.setStrokeStyle_(e,o),e.stroke())}calculateImageOrLabelDimensions_(e,t,r,i,s,l,o,f,y,x,B,O,P,U,j,N){o*=O[0],f*=O[1];let Y=r-o,H=i-f;const se=s+y>e?e-y:s,re=l+x>t?t-x:l,V=U[3]+se*O[0]+U[1],ne=U[0]+re*O[1]+U[2],G=Y-U[3],oe=H-U[0];(j||B!==0)&&(v0[0]=G,C0[0]=G,v0[1]=oe,Em[1]=oe,Em[0]=G+V,Bm[0]=Em[0],Bm[1]=oe+ne,C0[1]=Bm[1]);let he;return B!==0?(he=em(gh(),r,i,1,1,B,-r,-i),wA(he,v0),wA(he,Em),wA(he,Bm),wA(he,C0),Um(Math.min(v0[0],Em[0],Bm[0],C0[0]),Math.min(v0[1],Em[1],Bm[1],C0[1]),Math.max(v0[0],Em[0],Bm[0],C0[0]),Math.max(v0[1],Em[1],Bm[1],C0[1]),C1)):Um(Math.min(G,G+V),Math.min(oe,oe+ne),Math.max(G,G+V),Math.max(oe,oe+ne),C1),P&&(Y=Math.round(Y),H=Math.round(H)),{drawImageX:Y,drawImageY:H,drawImageW:se,drawImageH:re,originX:y,originY:x,declutterBox:{minX:C1[0],minY:C1[1],maxX:C1[2],maxY:C1[3],value:N},canvasTransform:he,scale:O}}replayImageOrLabel_(e,t,r,i,s,l,o){const f=!!(l||o),y=i.declutterBox,x=o?o[2]*i.scale[0]/2:0;return y.minX-x<=t[0]&&y.maxX+x>=0&&y.minY-x<=t[1]&&y.maxY+x>=0&&(f&&this.replayTextBackground_(e,v0,Em,Bm,C0,l,o),EZ(e,i.canvasTransform,s,r,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0}fill_(e){const t=this.alignAndScaleFill_;if(t){const r=wA(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;e.save(),e.translate(r[0]%i,r[1]%i),t!==1&&e.scale(t,t),e.rotate(this.viewRotation_)}e.fill(),t&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6])}drawLabelWithPointPlacement_(e,t,r,i){const s=this.textStates[t],l=this.createLabel(e,t,i,r),o=this.strokeStates[r],f=this.pixelRatio,y=h4(Array.isArray(e)?e[0]:e,s.textAlign||vC),x=h2[s.textBaseline||u2],B=o&&o.lineWidth?o.lineWidth:0,O=l.width/f-2*s.scale[0],P=y*O+2*(.5-y)*B,U=x*l.height/f+2*(.5-x)*B;return{label:l,anchorX:P,anchorY:U}}execute_(e,t,r,i,s,l,o,f){const y=this.zIndexContext_;let x;this.pixelCoordinates_&&Q0(r,this.renderedTransform_)?x=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),x=z0(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),qH(this.renderedTransform_,r));let B=0;const O=i.length;let P=0,U,j,N,Y,H,se,re,V,ne,G,oe,he,fe,Ee=0,me=0;const Se=this.coordinateCache_,Ke=this.viewRotation_,xe=Math.round(Math.atan2(-r[1],r[0])*1e12)/1e12,at={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:Ke},Ze=this.instructions!=i||this.overlaps?0:200;let Je,Ne,we,De;for(;B<O;){const He=i[B];switch(He[0]){case Qi.BEGIN_GEOMETRY:Je=He[1],De=He[3],Je.getGeometry()?o!==void 0&&!Du(o,De.getExtent())?B=He[2]+1:++B:B=He[2],y&&(y.zIndex=He[4]);break;case Qi.BEGIN_PATH:Ee>Ze&&(this.fill_(e),Ee=0),me>Ze&&(e.stroke(),me=0),!Ee&&!me&&(e.beginPath(),H=NaN,se=NaN),++B;break;case Qi.CIRCLE:P=He[1];const Yt=x[P],yt=x[P+1],Ft=x[P+2],Pt=x[P+3],Ue=Ft-Yt,Pe=Pt-yt,Be=Math.sqrt(Ue*Ue+Pe*Pe);e.moveTo(Yt+Be,yt),e.arc(Yt,yt,Be,0,2*Math.PI,!0),++B;break;case Qi.CLOSE_PATH:e.closePath(),++B;break;case Qi.CUSTOM:P=He[1],U=He[2];const it=He[3],_t=He[4],pt=He[5];at.geometry=it,at.feature=Je,B in Se||(Se[B]=[]);const Lt=Se[B];pt?pt(x,P,U,2,Lt):(Lt[0]=x[P],Lt[1]=x[P+1],Lt.length=2),y&&(y.zIndex=He[6]),_t(Lt,at),++B;break;case Qi.DRAW_IMAGE:P=He[1],U=He[2],ne=He[3],j=He[4],N=He[5];let nn=He[6];const Kt=He[7],vn=He[8],Gn=He[9],tn=He[10];let dr=He[11];const Pn=He[12];let pn=He[13];Y=He[14]||"declutter";const $n=He[15];if(!ne&&He.length>=20){G=He[19],oe=He[20],he=He[21],fe=He[22];const Gt=this.drawLabelWithPointPlacement_(G,oe,he,fe);ne=Gt.label,He[3]=ne;const zt=He[23];j=(Gt.anchorX-zt)*this.pixelRatio,He[4]=j;const on=He[24];N=(Gt.anchorY-on)*this.pixelRatio,He[5]=N,nn=ne.height,He[6]=nn,pn=ne.width,He[13]=pn}let lr;He.length>25&&(lr=He[25]);let vr,Zn,Ge;He.length>17?(vr=He[16],Zn=He[17],Ge=He[18]):(vr=Sg,Zn=null,Ge=null),tn&&xe?dr+=Ke:!tn&&!xe&&(dr-=Ke);let ce=0;for(;P<U;P+=2){if(lr&&lr[ce++]<pn/this.pixelRatio)continue;const Gt=this.calculateImageOrLabelDimensions_(ne.width,ne.height,x[P],x[P+1],pn,nn,j,N,vn,Gn,dr,Pn,s,vr,!!Zn||!!Ge,Je),zt=[e,t,ne,Gt,Kt,Zn,Ge];if(f){let on,jt,Dn;if($n){const Jn=U-P;if(!$n[Jn]){$n[Jn]={args:zt,declutterMode:Y};continue}const un=$n[Jn];on=un.args,jt=un.declutterMode,delete $n[Jn],Dn=MI(on)}let rr,Br;if(on&&(jt!=="declutter"||!f.collides(Dn))&&(rr=!0),(Y!=="declutter"||!f.collides(Gt.declutterBox))&&(Br=!0),jt==="declutter"&&Y==="declutter"){const Jn=r
Line truncated
|
||||
`),i=ZJ.slice(0,Math.round(e/.1));for(let s=0,l=r.length;s<l;++s)s>0&&(t+=`
|
||||
`),t+=r[s].split("").join(i);return t}return n}let _4;function CU(){return _4||(_4=Bx(1,1).getContext("2d")),_4}function cg(n,e){return CU().measureText(n).width+(n.length-1)*e}const QI={};function g6(n,e,t,r){if(n.indexOf(`
|
||||
`)!==-1){const l=n.split(`
|
||||
`),o=[];for(let f=0,y=l.length;f<y;++f)o.push(g6(l[f],e,t,r));return o.join(`
|
||||
`)}const i=t+","+e+","+n+","+r;let s=QI[i];if(!s){const l=n.split(" ");if(l.length>1){const o=CU();o.font=e;const y=o.measureText("M").width*t;let x="";const B=[];for(let O=0,P=l.length;O<P;++O){const U=l[O],j=x+(x?" ":"")+U;cg(j,r)<=y?x=j:(x&&B.push(x),x=U)}x&&B.push(x);for(let O=0,P=B.length;O<P&&P>1;++O){const U=B[O];if(cg(U,r)<y*.35){const j=O>0?cg(B[O-1],r):1/0,N=O<P-1?cg(B[O+1],r):1/0;B.splice(O,1),P-=1,j<N?(B[O-1]+=" "+U,O-=1):B[O]=U+" "+B[O]}}for(let O=0,P=B.length-1;O<P;++O){const U=B[O],j=B[O+1];if(cg(U,r)>y*.7&&cg(j,r)<y*.6){const N=U.split(" "),Y=N.pop();cg(Y,r)<y*.2&&(B[O]=N.join(" "),B[O+1]=Y+" "+j),P-=1}}s=B.join(`
|
||||
`)}else s=n;s=m6(s,r),QI[i]=s}return s}const XJ=/font-family: ?([^;]*);/,JJ=/("|')/g;let tb;function eee(n){if(!tb){tb={};const e=document.styleSheets;for(let t=0,r=e.length;t<r;++t){const i=e[t];try{const s=i.rules||i.cssRules;if(s)for(let l=0,o=s.length;l<o;++l){const f=s[l];if(f.type==5){const y=f.cssText.match(XJ);tb[y[1].replace(JJ,"")]=!0}}}catch{}}}return n in tb}const b4={};function tee(n,e="https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css"){const t=n.toString();if(t in b4)return b4[t];const r=[];for(let i=0,s=n.length;i<s;++i){n[i]=n[i].replace("Arial Unicode MS","Arial");const l=n[i],o=$E(l,1);RL(o);const f=o.split(" ");r.push([f.slice(3).join(" ").replace(/"/g,""),f[1],f[0]])}for(let i=0,s=r.length;i<s;++i){const l=r[i],o=l[0];if(!eee(o)&&Dp.get(`${l[2]}
|
||||
${l[1]}
|
||||
${o}`)!==100){const f=e.replace("{font-family}",o.replace(/ /g,"-").toLowerCase()).replace("{Font+Family}",o.replace(/ /g,"+")).replace("{fontweight}",l[1]).replace("{-fontstyle}",l[2].replace("normal","").replace(/(.+)/,"-$1")).replace("{fontstyle}",l[2]);if(!document.querySelector('link[href="'+f+'"]')){const y=document.createElement("link");y.href=f,y.rel="stylesheet",document.head.appendChild(y)}}}return b4[t]=n,n}const nee={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},ree={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},iee=function(n,e){const t=ox(n,e);if(t.result==="error")throw new Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));return t.value},y6={},v2={zoom:0};let nb,x4;function Si(n,e,t,r,i,s,l){const o=n.id;s||(s={},console.warn("No functionCache provided to getValue()")),s[o]||(s[o]={});const f=s[o];if(!f[t]){let y=(n[e]||y6)[t];const x=Hq[`${e}_${n.type}`][t];y===void 0&&(y=x.default);let B=Ly(y);if(!B&&Fy(y)&&(y=lB(y,x),B=!0),B){const O=iee(y,x);f[t]=O.evaluate.bind(O)}else x.type=="color"&&(y=wl.parse(y)),f[t]=function(){return y}}return v2.zoom=r,f[t](v2,i,l)}function YI(n,e,t,r,i){return Si(n,"layout",`${r}-allow-overlap`,e,t,i)?Si(n,"layout",`${r}-ignore-placement`,e,t,i)?"none":"obstacle":"declutter"}function oee(n,e,t,r,i){return i||console.warn("No filterCache provided to evaluateFilter()"),n in i||(i[n]=vq(e).filter),v2.zoom=r,i[n](v2,t)}function w0(n,e){if(n){if(n.a===0||e===0)return;const t=n.a;return e=e===void 0?1:e,t===0?"transparent":"rgba("+Math.round(n.r*255/t)+","+Math.round(n.g*255/t)+","+Math.round(n.b*255/t)+","+t*e+")"}return n}const see=/\{[^{}}]*\}/g;function M4(n,e){return n.replace(see,function(t){return e[t.slice(1,-1)]||""})}const aee={};function lee(n,e,t,r=Jp,i=void 0,s=void 0,l=void 0,o=void 0){if(typeof e=="string"&&(e=JSON.parse(e)),e.version!=8)throw new Error("glStyle version 8 required.");aee[VJ(e,n)]=Array.from(arguments);let f,y,x;s&&wy(()=>s).then(async G=>{let oe;if(typeof Image<"u"){const he=new Image;if(typeof G=="string")he.crossOrigin="anonymous",he.src=G;else{let fe;G instanceof Request?fe=await fetch(G):G instanceof Response&&(fe=G);const Ee=await fe.blob();oe=URL.createObjectURL(Ee),he.src=oe}he.addEventListener("load",function fe(){he.removeEventListener("load",fe),f=he,y=[he.width,he.height],n.changed(),oe&&URL.revokeObjectURL(oe)}),he.addEventListener("error",function fe(){URL.revokeObjectURL(oe),he.removeEventListener("error",fe)})}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){const he=self;he.postMessage({action:"loadImage",src:G}),he.addEventListener("message",function(Ee){Ee.data.action==="imageLoaded"&&Ee.data.src===G&&(f=Ee.data.image,y=[f.width,f.height])})}});const B=N6(e.layers),O={},P=[],U={},j={},N=gU(e),Y=$J(e);let H;for(let G=0,oe=B.length;G<oe;++G){const he=B[G],fe=he.id;if(typeof t=="string"&&he.source==t||Array.isArray(t)&&t.indexOf(fe)!==-1){const Ee=he["source-layer"];if(H){if(he.source!==H)throw new Error(`Layer "${fe}" does not use source "${H}`)}else{H=he.source;const Se=e.sources[H];if(!Se)throw new Error(`Source "${H}" is not defined`);const Ke=Se.type;if(Ke!=="vector"&&Ke!=="geojson")throw new Error(`Source "${H}" is not of type "vector" or "geojson", but "${Ke}"`)}let me=O[Ee];me||(me=[],O[Ee]=me),me.push({layer:he,index:G}),P.push(fe)}}const se=new T0,re=new Pm,V=[],ne=function(G,oe,he){const fe=G.getProperties(),Ee=O[fe.layer];if(!Ee)return;let me=r.indexOf(oe);me==-1&&(me=AO(oe,r));const Se=nee[G.getGeometry().getType()],Ke={id:G.getId(),properties:fe,type:Se},xe=n.get("mapbox-featurestate")[G.getId()];let at=-1;for(let Ze=0,Je=Ee.length;Ze<Je;++Ze){const Ne=Ee[Ze],we=Ne.layer,De=we.id;if(he!==void 0&&he!==De)continue;const He=we.layout||y6,bt=we.paint||y6;if(He.visibility==="none"||"minzoom"in we&&me<we.minzoom||"maxzoom"in we&&me>=we.maxzoom)continue;const Yt=we.filter;if(!Yt||oee(De,Yt,Ke,me,Y)){let yt,Ft,Pt,Ue,Pe,Be;const it=Ne.index;if(Se==3&&(we.type=="fill"||we.type=="fill-extrusion"))if(Ft=Si(we,"paint",we.type+"-opacity",me,Ke,N,xe),we.type+"-pattern"in bt){const lr=Si(we,"paint",we.type+"-pattern",me,Ke,N,xe);if(lr){const vr=typeof lr=="string"?M4(lr,fe):lr.toString();if(f&&i&&i[vr]){++at,Be=V[at],(!Be||!Be.getFill()||Be.getStroke()||Be.getText())&&(Be=new Wh({fill:new Pm}),V[at]=Be),Pt=Be.getFill(),Be.setZIndex(it);const Zn=vr+"."+Ft;let Ge=j[Zn];if(!Ge){const ce=i[vr],pe=Bx(ce.width,ce.height),nt=pe.getContext("2d");nt.globalAlpha=Ft,nt.drawImage(f,ce.x,ce.y,ce.width,ce.height,0,0,ce.width,ce.height),Ge=nt.createPattern(pe,"repeat"),j[Zn]=Ge}Pt.setColor(Ge)}}}else yt=w0(Si(we,"paint",we.type+"-color",me,Ke,N,xe),Ft),we.type+"-outline-color"in bt&&(Pe=w0(Si(we,"paint",we.type+"-outline-color",me,Ke,N,xe),Ft)),Pe||(Pe=yt),(yt||Pe)&&(++at,Be=V[at],(!Be||yt&&!Be.getFill()||!yt&&Be.getFill()||Pe&&!Be.getStroke()||!Pe&&Be.getStroke()||Be.getText())Line truncated
|
||||
`)return Zn.push(`
|
||||
`,""),Zn;if(Se==2)return Zn.push(m6(wt,pn),nt),Zn;wt=g6(wt,nt,$n,pn).split(`
|
||||
`);for(let Ht=0,sn=wt.length;Ht<sn;++Ht)Ht>0&&Zn.push(`
|
||||
`,""),Zn.push(wt[Ht],nt);return Zn},[]):Gn=M4(vr,fe).trim(),Ft=Si(we,"paint","text-opacity",me,Ke,N,xe)}if(Gn&&Ft&&!vn){_t||(++at,Be=V[at],(!Be||!Be.getText()||Be.getFill()||Be.getStroke())&&(Be=new Wh,V[at]=Be),Be.setImage(void 0),Be.setGeometry(void 0));const lr=YI(we,me,Ke,"text",N);Be.getText()||Be.setText(pt),pt=Be.getText(),(!pt||"getDeclutterMode"in pt&&pt.getDeclutterMode()!==lr)&&(pt=new wx({padding:[2,2,2,2],declutterMode:lr}),Be.setText(pt));const vr=Si(we,"layout","text-transform",me,Ke,N,xe);vr=="uppercase"?Gn=Array.isArray(Gn)?Gn.map((Qe,rt)=>rt%2?Qe:Qe.toUpperCase()):Gn.toUpperCase():vr=="lowercase"&&(Gn=Array.isArray(Gn)?Gn.map((Qe,rt)=>rt%2?Qe:Qe.toLowerCase()):Gn.toLowerCase());const Zn=Array.isArray(Gn)?Gn:Se==2?m6(Gn,pn):g6(Gn,tn,$n,pn);if(pt.setText(Zn),pt.setFont(tn),pt.setRotation(C4(Si(we,"layout","text-rotate",me,Ke,N,xe))),typeof pt.setKeepUpright=="function"){const Qe=Si(we,"layout","text-keep-upright",me,Ke,N,xe);pt.setKeepUpright(Qe)}const Ge=Si(we,"layout","text-anchor",me,Ke,N,xe),ce=_t||Se==1?"point":Si(we,"layout","symbol-placement",me,Ke,N,xe);let pe;if(ce==="line-center"?(pt.setPlacement("line"),pe="center"):pt.setPlacement(ce),ce==="line"&&typeof pt.setRepeat=="function"){const Qe=Si(we,"layout","symbol-spacing",me,Ke,N,xe);pt.setRepeat(Qe*2)}pt.setOverflow(ce==="point");let nt=Si(we,"paint","text-halo-width",me,Ke,N,xe);const wt=Si(we,"layout","text-offset",me,Ke,N,xe),Ht=Si(we,"paint","text-translate",me,Ke,N,xe);let sn=0,Hn=0;if(ce=="point"){pe="center",Ge.indexOf("left")!==-1?(pe="left",Hn=nt):Ge.indexOf("right")!==-1&&(pe="right",Hn=-nt);const Qe=Si(we,"layout","text-rotation-alignment",me,Ke,N,xe);pt.setRotateWithView(Qe=="map")}else pt.setMaxAngle(C4(Si(we,"layout","text-max-angle",me,Ke,N,xe))*Gn.length/Zn.length),pt.setRotateWithView(!1);pt.setTextAlign(pe);let Ve="middle";Ge.indexOf("bottom")==0?(Ve="bottom",sn=-nt-.5*(dr-1)*Pn):Ge.indexOf("top")==0&&(Ve="top",sn=nt+.5*(dr-1)*Pn),pt.setTextBaseline(Ve);const J=Si(we,"layout","text-justify",me,Ke,N,xe);pt.setJustify(J==="auto"?void 0:J),pt.setOffsetX(wt[0]*Pn+Hn+Ht[0]),pt.setOffsetY(wt[1]*Pn+sn+Ht[1]),re.setColor(w0(Si(we,"paint","text-color",me,Ke,N,xe),Ft)),pt.setFill(re);const ve=w0(Si(we,"paint","text-halo-color",me,Ke,N,xe),Ft);if(ve&&nt>0){se.setColor(ve),nt*=2;const Qe=.5*Pn;se.setWidth(nt<=Qe?nt:Qe),pt.setStroke(se)}else pt.setStroke(void 0);const p=Si(we,"layout","text-padding",me,Ke,N,xe),Fe=pt.getPadding();p!==Fe[0]&&(Fe[0]=p,Fe[1]=p,Fe[2]=p,Fe[3]=p),Be.setZIndex(it)}}}if(at>-1)return V.length=at+1,V};return n.setStyle(ne),n.set("mapbox-source",H),n.set("mapbox-layers",P),n.set("mapbox-featurestate",n.get("mapbox-featurestate")||{}),ne}class _U{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=cx,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let r=t.dataProjection?ya(t.dataProjection):this.readProjection(e);t.extent&&r&&r.getUnits()==="tile-pixels"&&(r=ya(r),r.setWorldExtent(t.extent)),t={dataProjection:r,featureProjection:t.featureProjection}}return this.adaptOptions(t)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return yo()}readFeature(e,t){return yo()}readFeatures(e,t){return yo()}readGeometry(e,t){return yo()}readProjection(e){return yo()}writeFeature(e,t){return yo()}writeFeatures(e,t){return yo()}writeGeometry(e,t){return yo()}}function Ox(n,e,t){const r=t?ya(t.featureProjection):null,i=t?ya(t.dataProjection):null;let s=n;if(r&&i&&!Rg(r,i)){e&&(s=n.clone());const l=e?r:i,o=e?i:r;l.getUnits()==="tile-pixels"?s.transform(l,o):s.applyTransform(cC(l,o))}if(e&&t&&t.decimals!==void 0){const l=Math.pow(10,t.decimals),o=function(f){for(let y=0,x=f.length;y<x;++y)f[y]=Math.round(f[y]*l)/l;return f};s===n&&(s=n.clone()),s.applyTransform(o)}return s}const uee={Point:jg,LineString:zg,Polygon:jm,MultiPoint:WC,MultiLineString:fC,MultiPolygon:pC};function Aee(n,e,t){return Array.isArray(e[0])?(rL(n,0,e,t)||(n=n.slice(),t6(n,0,e,t)),n):(MB(n,0,e,t)||(n=n.slice(),r2(n,0,e,t)),n)}function bU(n,e){var s;const t=n.geometry;if(!t)return[];if(Array.isArray(t))return t.map(l=>bU({...n,geometry:l})).flat();const r=t.type==="MultiPolygon"?"Polygon":t.type;if(r==="GeometryCollection"||r==="Circle")throw new Error("Unsupported geometry type: "+r);const i=t.layout.length;return Ox(new ld(r,r==="Polygon"?Aee(t.flatCoordinates,t.ends,i):t.flatCoordinates,(s=t.ends)==null?void 0:s.flat(),i,n.properties||{},n.id).enableSimplifyTransformed(),!1,e)}function cO(n,e){if(!n)return null;if(Array.isArray(n)){const r=n.map(i=>cO(i,e));return new a2(r)}const t=uee[n.type];return Ox(new t(n.flatCoordinates,n.layout||"XY",n.ends),!1,e)}class cee extends _U{constructor(){super()}getType(){return"json"}readFeature(e,t){return this.readFeatureFromObject(rb(e),this.getReadOptions(e,t))}readFeatures(e,t){return this.readFeaturesFromObject(rb(e),this.getReadOptions(e,t
Line truncated
|
||||
`),"binary").toString("base64"):URL.createObjectURL(new Blob(r,{type:"text/javascript"})));return i.addEventListener("message",e),i}function Cte(n,e){const t=KU(n.operation);let r=!1;return{postMessage:function(i){setTimeout(function(){r||e({data:{buffer:t(i),meta:i.meta}})},0)},terminate:function(){r=!0}}}class _te extends DC{constructor(e){super(),this.imageOps_=!!e.imageOps;let t;e.threads===0?t=0:this.imageOps_?t=1:t=e.threads||1;const r=new Array(t);if(t)for(let i=0;i<t;++i)r[i]=vte(e,this.onWorkerMessage_.bind(this,i));else r[0]=Cte(e,this.onWorkerMessage_.bind(this,0));this.workers_=r,this.queue_=[],this.maxQueueLength_=e.queue||1/0,this.running_=0,this.dataLookup_={},this.job_=null}process(e,t,r){this.enqueue_({inputs:e,meta:t,callback:r}),this.dispatch_()}enqueue_(e){for(this.queue_.push(e);this.queue_.length>this.maxQueueLength_;)this.queue_.shift().callback(null,null)}dispatch_(){if(this.running_||this.queue_.length===0)return;const e=this.queue_.shift();this.job_=e;const t=e.inputs[0].width,r=e.inputs[0].height,i=e.inputs.map(function(f){return f.data.buffer}),s=this.workers_.length;if(this.running_=s,s===1){this.workers_[0].postMessage({buffers:i,meta:e.meta,imageOps:this.imageOps_,width:t,height:r},i);return}const l=e.inputs[0].data.length,o=4*Math.ceil(l/4/s);for(let f=0;f<s;++f){const y=f*o,x=[];for(let B=0,O=i.length;B<O;++B)x.push(i[B].slice(y,y+o));this.workers_[f].postMessage({buffers:x,meta:e.meta,imageOps:this.imageOps_,width:t,height:r},x)}}onWorkerMessage_(e,t){this.disposed||(this.dataLookup_[e]=t.data,--this.running_,this.running_===0&&this.resolveJob_())}resolveJob_(){const e=this.job_,t=this.workers_.length;let r,i;if(t===1)r=new Uint8ClampedArray(this.dataLookup_[0].buffer),i=this.dataLookup_[0].meta;else{const s=e.inputs[0].data.length;r=new Uint8ClampedArray(s),i=new Array(t);const l=4*Math.ceil(s/4/t);for(let o=0;o<t;++o){const f=this.dataLookup_[o].buffer,y=o*l;r.set(new Uint8ClampedArray(f),y),i[o]=this.dataLookup_[o].meta}}this.job_=null,this.dataLookup_={},e.callback(null,new ImageData(r,e.inputs[0].width,e.inputs[0].height),i),this.dispatch_()}disposeInternal(){for(let e=0;e<this.workers_.length;++e)this.workers_[e].terminate();this.workers_.length=0}}const n9={BEFOREOPERATIONS:"beforeoperations",AFTEROPERATIONS:"afteroperations"};class r9 extends gp{constructor(e,t,r){super(e),this.extent=t.extent,this.resolution=t.viewState.resolution/t.pixelRatio,this.data=r}}class RU extends IU{constructor(e){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=e.operationType!==void 0?e.operationType:"pixel",this.threads_=e.threads!==void 0?e.threads:1,this.layers_=Mte(e.sources);const t=this.changed.bind(this);for(let r=0,i=this.layers_.length;r<i;++r)this.layers_[r].addEventListener(lo.CHANGE,t);this.useResolutions_=e.resolutions!==null,this.tileQueue_=new lU(function(){return 1},this.processSources_.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:gh(),declutter:null,extent:null,index:0,layerIndex:0,layerStatesArray:xte(this.layers_),pixelRatio:1,pixelToCoordinateTransform:gh(),postRenderFunctions:[],size:[0,0],tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:Wo(this),renderTargets:{}},this.setAttributions(function(r){var s;const i=[];for(let l=0,o=e.sources.length;l<o;++l){const f=e.sources[l],y=f instanceof jy?f:f.getSource();if(!y)continue;const x=(s=y.getAttributions())==null?void 0:s(r);typeof x=="string"?i.push(x):x!==void 0&&i.push(...x)}return i}),e.operation!==void 0&&this.setOperation(e.operation,e.lib)}setOperation(e,t){this.processor_&&this.processor_.dispose(),this.processor_=new _te({operation:e,imageOps:this.operationType_==="image",queue:1,lib:t,threads:this.threads_}),this.changed()}updateFrameState_(e,t,r){const i=Object.assign({},this.frameState_);i.viewState=Object.assign({},i.viewState);const s=Kf(e);i.size[0]=Math.ceil(Ls(e)/t),i.size[1]=Math.ceil(aA(e)/t),i.extent=[s[0]-i.size[0]*t/2,s[1]-i.size[1]*t/2,s[0]+i.size[0]*t/2,s[1]+i.size[1]*t/2],i.time=Date.now();const l=i.viewState;return l.center=s,l.projection=r,l.resolution=t,i}allSourcesReady_(){let e=!0,t;for(let r=0,i=this.layers_.length;r<i;++r)if(t=this.layers_[r].getSource(),!t||t.getState()!=="ready"){e=!1;break}return e}getImage(e,t,r,i){if(!this.allSourcesReady_())return null;this.tileQueue_.loadMoreTiles(16,16),t=this.findNearestResolution(t);const s=this.updateFrameState_(e,t,i);if(this.requestedFrameState_=s,this.renderedImageCanvas_){const l=this.renderedImageCanvas_.getResolution(),o=this.renderedImageCanvas_.getExtent();(t!==l||!zm(s.extent,o))&&(this.renderedImageCanvas_=null)}return(!this.renderedImageCanvas_||this.getRevision()!==this.renderedRevision_)&&this.processSources_(),s.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const e=this.re
Line truncated
|
||||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(DU(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,r){}}class Rte extends Tx{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Dte,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:aU,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!Rg(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||Rg(t,e)))return this.tileGrid;const r=Wo(e);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=kU(e)),this.tileGridForProjection[r]}createTile_(e,t,r,i,s,l){const o=[e,t,r],f=this.getTileCoordForTileUrlFunction(o,s),y=f?this.tileUrlFunction(f,i,s):void 0,x=new this.tileClass(o,y!==void 0?Lr.IDLE:Lr.EMPTY,y!==void 0?y:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return x.key=l,x.addEventListener(lo.CHANGE,this.handleTileChange.bind(this)),x}getTile(e,t,r,i,s){const l=this.getProjection();if(!l||!s||Rg(l,s))return this.getTileInternal(e,t,r,i,l||s);const o=[e,t,r],f=this.getKey(),y=this.getTileGridForProjection(l),x=this.getTileGridForProjection(s),B=this.getTileCoordForTileUrlFunction(o,s),O=new EU(l,y,s,x,o,B,this.getTilePixelRatio(i),this.getGutter(),(P,U,j,N)=>this.getTileInternal(P,U,j,N,l),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return O.key=f,O}getTileInternal(e,t,r,i,s){const l=this.getKey();return this.createTile_(e,t,r,i,s,l)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,t){const r=ya(e);if(r){const i=Wo(r);i in this.tileGridForProjection||(this.tileGridForProjection[i]=t)}}}function Dte(n,e){n.getImage().src=e}class FU extends Rte{constructor(e){if(super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:ya("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:"loading",tileLoadFunction:e.tileLoadFunction,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,zDirection:e.zDirection}),this.tileJSON_=null,this.tileSize_=e.tileSize,e.url)if(e.jsonp)Ste(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",e.url),t.send()}else if(e.tileJSON)this.handleTileJSONResponse(e.tileJSON);else throw new Error("Either `url` or `tileJSON` options must be provided")}onXHRLoad_(e){const t=e.target;if(!t.status||t.status>=200&&t.status<300){let r;try{r=JSON.parse(t.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(r)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const t=ya("EPSG:4326"),r=this.getProjection();let i;if(e.bounds!==void 0){const y=jC(t,r);i=nH(e.bounds,y)}const s=kx(r),l=e.minzoom||0,o=e.maxzoom||22,f=hO({extent:s,maxZoom:o,minZoom:l,tileSize:this.tileSize_});if(this.tileGrid=f,this.tileUrlFunction=DU(e.tiles,f),e.attribution&&!this.getAttributions()){const y=i!==void 0?i:s;this.setAttributions(function(x){return Du(y,x.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}}class LU extends Tx{constructor(e){const t=e.projection||"EPSG:3857",r=e.extent||kx(t),i=e.tileGrid||hO({extent:r,maxResolution:e.maxResolution,maxZoom:e.maxZoom!==void 0?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,projection:t,state:e.state,tileGrid:i,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:UU,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX===void 0?!0:e.wrapX,transition:e.transition,zDirection:e.zDirection===void 0?1:e.zDirection}),this.format_=e.format?e.format:null,this.tileKeysBySourceTileUrl_={},this.sourceTiles_={},this.overlaps_=e.overlaps==null?!0:e.overlaps,this.tileClass=e.tileClass?e.tileClass:pU,this.tileGrids_={}}getOverlaps(){return this.overlaps_}getSourceTiles(e,t,r){if(r.getState()===Lr.IDLE){r.setState(Lr.LOADING);const i=r.wr
Line truncated
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/var a9;function Jte(){return a9||(a9=1,function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",l=0;l<arguments.length;l++){var o=arguments[l];o&&(s=i(s,r(o)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var l="";for(var o in s)e.call(s,o)&&s[o]&&(l=i(l,o));return l}function i(s,l){return l?s?s+" "+l:s+l:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()}(T4)),T4.exports}var ene=Jte();const tm=fl(ene);function Cg(){var n="/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",e="e73e8fb606fcd7318a8222b2e50c576ed3ad8702",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",statementMap:{0:{start:{line:6,column:22},end:{line:10,column:5}},1:{start:{line:11,column:4},end:{line:11,column:154}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:12,column:3}},line:5}},branchMap:{0:{loc:{start:{line:11,column:11},end:{line:11,column:153}},type:"cond-expr",locations:[{start:{line:11,column:52},end:{line:11,column:92}},{start:{line:11,column:111},end:{line:11,column:153}}],line:11}},s:{0:0,1:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx"],names:[],mappings:"AAeoC;AAfpC,OAAO,WAAW;AAClB,SAAQ,iBAAiB,qBAAoB;AAO7C,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK,MAAM;AAAA,IAChB;AACA,WAAO,KAAK,MAAM,cAAc,oBAAC,iBAAc,OAAO,WAAU,IAAK,oBAAC,mBAAgB,OAAO,WAAW;AAAA,EAC1G;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e73e8fb606fcd7318a8222b2e50c576ed3ad8702"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var l=s[n];return Cg=function(){return l},l}Cg();class tne extends Xn.Component{render(){Cg().f[0]++;const e=(Cg().s[0]++,{width:20,height:20,...this.props.style});return Cg().s[1]++,this.props.isCollapsed?(Cg().b[0][0]++,ue.jsx(HV,{style:e})):(Cg().b[0][1]++,ue.jsx($V,{style:e}))}}function iy(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",e="b04bfec534013c327fd210571832bbd2813a944a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:32,column:9}},1:{start:{line:11,column:25},end:{line:11,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:33,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:11,column:17},end:{line:11,column:18}},loc:{start:{line:11,column:25},end:{line:11,column:72}},line:11}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx"],names:[],mappings:"AAcM,SAIE,KAJF;AAdN,OAAO,WAAW;AAClB,OAAO,eAAe;AAUtB,qBAAqB,uBAAuB,MAAM,UAA+B;AAAA,EAC/E,SAAS;AACP,WAAO,oBAAC,QAAG,WAAU,6BACnB;AAAA,MAAC;AAAA;AAAA,QAAI,WAAU;AAAA,QACb,eAAa,sBAAoB,KAAK,MAAM,aAAa;AAAA,QACzD,SAAS,QAAM,KAAK,MAAM,eAAe,CAAC,KAAK,MAAM,QAAQ;AAAA,QAE7D;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,iBAAe,KAAK,MAAM,eAAe;AAAA,cACzC,iBAAe,KAAK,MAAM;AAAA,cAEzB,eAAK,MAAM;AAAA;AAAA,UACd;AAAA,UACA,oBAAC,UAAK,WAAU,kBAAiB;AAAA,UACjC;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,QAAQ,IAAI,OAAO,GAAG;AAAA,cAC/B,aAAa,KAAK,MAAM;AAAA;AAAA,UAC1B;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b04bfec534013c327fd210571832bbd2813a944a"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var l=s[n];return iy=function(){return l},l}iy();class nne extends Xn.Component{render(){return iy().f[0]++,iy().s[0]++,ue.jsx("li",{className:"maputnik-layer-list-group",children:ue.jsxs("div",{className:"maputnik-layer-list-group-header","data-wd-key":"layer-list-group:"+this.props["data-wd-key"],onClick:e=>(iy().f[1]++,iy().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:[ue.jsx("button",{className:"maputnik-layer-list-group-title","aria-controls":this.props["aria-controls"],"aria-expanded":this.props.isActive,children:this.props.title}),ue.jsx("span",{className:"maputnik-space"}),ue.jsx(tne,{style:{height:14,width:14},isCollapsed:this.props.isActive})]})})}}function xC(){return xC=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},xC.apply(null,arguments)}function rne(n){if(Array.isArray(n))return n}function ine(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,s,l,o=[],f=!0,y=!1;try{if(s=(t=t.call(n)).next,e!==0)for(;!(f=(r=s.call(t)).done)&&(o.push(r.value),o.length!==e);f=!Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $U(n,e){return rne(n)||ine(n,e)||VU(n,e)||one()}function Ty(n){"@babel/helpers - typeof";return Ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ty(n)}function sne(n,e){if(Ty(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(Ty(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function HU(n){var e=sne(n,"string");return Ty(e)=="symbol"?e:e+""}function Oa(n,e,t){return(e=HU(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function P4(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(t).filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.forEach(function(i){Oa(n,i,t[i])})}return n}function ZC(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function ane(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,HU(r.key),r)}}function XC(n,e,t){return e&&ane(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function us(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function fO(n,e){if(e&&(Ty(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return us(n)}function MC(n){return MC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},MC(n)}function w6(n,e){return w6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},w6(n,e)}function pO(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&w6(n,e)}var K4,l9;function lne(){if(l9)return K4;l9=1;var n=function(e,t,r,i,s,l,o,f){if(!e){var y;if(t===void 0)y=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var x=[r,i,s,l,o,f],B=0;y=new Error(t.replace(/%s/g,function(){return x[B++]})),y.name="Invariant Violation"}throw y.framesToPop=1,y}};return K4=n,K4}var une=lne();const Wg=fl(une);function Ane(n){if(Array.isArray(n))return M6(n)}function cne(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function dne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hne(n){return Ane(n)||cne(n)||VU(n)||dne()}var fne=function(){function n(){ZC(this,n),Oa(this,"refs",{})}return XC(n,[{key:"add",value:function(t,r){this.refs[t]||(this.refs[t]=[]),this.refs[t].push(r)}},{key:"remove",value:function(t,r){var i=this.getIndex(t,r);i!==-1&&this.refs[t].splice(i,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var t=this;return this.refs[this.active.collection].find(function(r){var i=r.node;return i.sortableInfo.index==t.active.index})}},{key:"getIndex",value:function(t,r){return this.refs[t].indexOf(r)}},{key:"getOrderedRefs",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.active.collection;return this.refs[t].sort(pne)}}]),n}();function pne(n,e){var t=n.node.sortableInfo.index,r=e.node.sortableInfo.index;return t-r}function ZU(n,e){return Object.keys(n).reduce(function(t,r){return e.indexOf(r)===-1&&(t[r]=n[r]),t},{})}var E1={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},XU=function(){if(typeof window>"u"||typeof document>"u")return"";var n=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],e=(Array.prototype.slice.call(n).join("").match(/-(moz|webkit|ms)-/)||n.OLink===""&&["","o"])[1];switch(e){case"ms":return"ms";default:return e&&e.length?e[0].toUpperCase()+e.substr(1):""}}();function ab(n,e){Object.keys(e).forEach(function(t){n.style[t]=e[t]})}function lb(n,e){n.style["".concat(XU,"Transform")]=e==null?"":"translate3d(".concat(e.x,"px,").concat(e.y,"px,0)")}function R4(n,e){n.style["".concat(XU,"TransitionDuration")]=e==null?"":"".concat(e,"ms")}function Tv(n,e){for(;n;){if(e(n))return n;n=n.parentNode}return null}function u9(n,e,t){return Math.max(n,Math.min(t,e))}function oy(n){return n.substr(-2)==="px"?parseFloat(n):0}function mne(n){var e=window.getComputedStyle(n);return{bottom:oy(e.marginBottom),left:oy(e.marginLeft),right:oy(e.marginRight),top:oy(e.marginTop)}}function mO(n,e){var t=e.displayName||e.name;return t?"".concat(n,"(").concat(t,")"):n}function D4(n,e){var t=n.getBoundingClientRect();return{top:t.top+e.top,left:t.left+e.left}}function mv(n){return n.touches&&n.touches.length?{x:n.touches[0].pageX,y:n.touches[0].pageY}:n.changedTouches&&n.changedTouches.length?{x:n.changedTouches[0].pageX,y:n.changedTouches[0].pageY}:{x:n.pageX,y:n.pageY}}function gne(n){return n.touches&&n.touches.length||n.changedTouches&&n.changedTouches.length}function Eb(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{left:0,top:0};if(n){var r={left:t.left+n.offsetLeft,top:t.top+n.offsetTop};return n.parentNode===e?r:Eb(n.parentNode,e,r)}}function yne(n,e,t){return n<t&&n>e?n-1:n>t&&n<e?n+1:n}function A9(n){var e=n.lockOffset,t=n.width,r=n.height,i=e,s=e,l="px";if(typeof e=="string"){var o=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(e);Wg(o!==null,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',e),i=parseFloat(e),s=parseFloat(e),l=o[1]}return Wg(isFinite(i)&&isFinite(s),"lockOffset value should be a finite. Given %s",e),l==="%"&&(i=i*t/100,s=s*r/100),{x:i,y:s}}function vne(n){var e=n.height,t=n.width,r=n.lockOffset,i=Array.isArray(r)?r:[r,r];Wg(i.length===2,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var s=$U(i,2),l=s[0],o=s[1];return[A9({height:e,lockOffset:l,width:t}),A9({height:e,lockOffset:o,width:t})]}function Cne(n){var e=window.getComputedStyle(n),t=/(auto|scroll)/,r=["overflow","overflowX","overflowY"];return r.find(function(i){return t.test(e[i])})}function JU(n){return n instanceof HTMLElement?Cne(n)?n:JU(n.parentNode):null}function _ne(n){var e=window.getComputedStyle(n);return e.display==="grid"?{x:oy(e.gridColumnGap),y:oy(e.gridRowGap)}:{x:0,y:0}}var hg={TAB:9,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40},_g={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function bne(n){var e="input, textarea, select, canvas, [contenteditable]",t=n.querySelectorAll(e),r=n.cloneNode(!0),i=hne(r.querySelectorAll(e));return i.forEach(function(s,l){if(s.type!=="file"&&(s.value=t[l].value),s.type==="radio"&&s.name&&(s.name="__sortableClone__".concat(s.name)),s.tagName===_g.Canvas&&t[l].width>0&&t[l].height>0){var o=s.getContext("2d");o.drawImage(t[l],0,0)}}),r}function xne(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return t=e=function(i){pO(s,i);function s(){var l,o;ZC(this,s);for(var f=arguments.length,y=new Array(f),x=0;x<f;x++)y[x]=arguments[x];return o=fO(this,(l=MC(s)).call.apply(l,[this].concat(y))),Oa(us(us(o)),"wrappedInstance",ci.createRef()),o}return XC(s,[{key:"componentDidMount",value:function(){var o=ax.findDOMNode(this);o.sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return Wg(r.with
Line truncated
|
||||
* tabbable 6.2.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*/var iz=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],b2=iz.join(","),oz=typeof Element>"u",Gg=oz?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,x2=!oz&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n==null?void 0:n.ownerDocument},M2=function n(e,t){var r;t===void 0&&(t=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=i===""||i==="true",l=s||t&&e&&n(e.parentNode);return l},Dne=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},sz=function(e,t,r){if(M2(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(b2));return t&&Gg.call(e,b2)&&i.unshift(e),i=i.filter(r),i},az=function n(e,t,r){for(var i=[],s=Array.from(e);s.length;){var l=s.shift();if(!M2(l,!1))if(l.tagName==="SLOT"){var o=l.assignedElements(),f=o.length?o:l.children,y=n(f,!0,r);r.flatten?i.push.apply(i,y):i.push({scopeParent:l,candidates:y})}else{var x=Gg.call(l,b2);x&&r.filter(l)&&(t||!e.includes(l))&&i.push(l);var B=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),O=!M2(B,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(B&&O){var P=n(B===!0?l.children:B.children,!0,r);r.flatten?i.push.apply(i,P):i.push({scopeParent:l,candidates:P})}else s.unshift.apply(s,l.children)}}return i},lz=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},B0=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Dne(e))&&!lz(e)?0:e.tabIndex},Fne=function(e,t){var r=B0(e);return r<0&&t&&!lz(e)?0:r},Lne=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},uz=function(e){return e.tagName==="INPUT"},Une=function(e){return uz(e)&&e.type==="hidden"},zne=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},jne=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},Nne=function(e){if(!e.name)return!0;var t=e.form||x2(e),r=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=jne(i,e.form);return!s||s===e},Wne=function(e){return uz(e)&&e.type==="radio"},Gne=function(e){return Wne(e)&&!Nne(e)},Qne=function(e){var t,r=e&&x2(e),i=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var l,o,f;for(s=!!((l=i)!==null&&l!==void 0&&(o=l.ownerDocument)!==null&&o!==void 0&&o.contains(i)||e!=null&&(f=e.ownerDocument)!==null&&f!==void 0&&f.contains(e));!s&&i;){var y,x,B;r=x2(i),i=(y=r)===null||y===void 0?void 0:y.host,s=!!((x=i)!==null&&x!==void 0&&(B=x.ownerDocument)!==null&&B!==void 0&&B.contains(i))}}return s},d9=function(e){var t=e.getBoundingClientRect(),r=t.width,i=t.height;return r===0&&i===0},Yne=function(e,t){var r=t.displayCheck,i=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Gg.call(e,"details>summary:first-of-type"),l=s?e.parentElement:e;if(Gg.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var o=e;e;){var f=e.parentElement,y=x2(e);if(f&&!f.shadowRoot&&i(f)===!0)return d9(e);e.assignedSlot?e=e.assignedSlot:!f&&y!==e.ownerDocument?e=y.host:e=f}e=o}if(Qne(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return d9(e);return!1},qne=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var i=t.children.item(r);if(i.tagName==="LEGEND")return Gg.call(t,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},w2=function(e,t){return!(t.disabled||M2(t)||Une(t)||Yne(t,e)||zne(t)||qne(t))},E6=function(e,t){return!(Gne(t)||B0(t)<0||!w2(e,t))},Vne=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},$ne=function n(e){var t=[],r=[];return e.forEach(function(i,s){var l=!!i.scopeParent,o=l?i.scopeParent:i,f=Fne(o,l),y=l?n(i.candidates):o;f===0?l?t.push.apply(t,y):t.push(o):r.push({documentOrder:s,tabIndex:f,item:i,isScope:l,content:y})}),r.sort(Lne).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.pusLine truncated
|
||||
* focus-trap 7.5.4
|
||||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||||
*/function h9(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function f9(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?h9(Object(t),!0).forEach(function(r){Xne(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):h9(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Xne(n,e,t){return e=ere(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Jne(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ere(n){var e=Jne(n,"string");return typeof e=="symbol"?e:String(e)}var p9={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r.pause()}var i=e.indexOf(t);i===-1||e.splice(i,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},tre=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},nre=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},Hv=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},rre=function(e){return Hv(e)&&!e.shiftKey},ire=function(e){return Hv(e)&&e.shiftKey},m9=function(e){return setTimeout(e,0)},g9=function(e,t){var r=-1;return e.every(function(i,s){return t(i)?(r=s,!1):!0}),r},gv=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},ub=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},ore=[],sre=function(e,t){var r=(t==null?void 0:t.document)||document,i=(t==null?void 0:t.trapStack)||ore,s=f9({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:rre,isKeyBackward:ire},t),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,f=function(me,Se,Ke){return me&&me[Se]!==void 0?me[Se]:s[Ke||Se]},y=function(me,Se){var Ke=typeof(Se==null?void 0:Se.composedPath)=="function"?Se.composedPath():void 0;return l.containerGroups.findIndex(function(xe){var at=xe.container,Ze=xe.tabbableNodes;return at.contains(me)||(Ke==null?void 0:Ke.includes(at))||Ze.find(function(Je){return Je===me})})},x=function(me){var Se=s[me];if(typeof Se=="function"){for(var Ke=arguments.length,xe=new Array(Ke>1?Ke-1:0),at=1;at<Ke;at++)xe[at-1]=arguments[at];Se=Se.apply(void 0,xe)}if(Se===!0&&(Se=void 0),!Se){if(Se===void 0||Se===!1)return Se;throw new Error("`".concat(me,"` was specified but was not a node, or did not return a node"))}var Ze=Se;if(typeof Se=="string"&&(Ze=r.querySelector(Se),!Ze))throw new Error("`".concat(me,"` as selector refers to no known node"));return Ze},B=function(){var me=x("initialFocus");if(me===!1)return!1;if(me===void 0||!Bb(me,s.tabbableOptions))if(y(r.activeElement)>=0)me=r.activeElement;else{var Se=l.tabbableGroups[0],Ke=Se&&Se.firstTabbableNode;me=Ke||x("fallbackFocus")}if(!me)throw new Error("Your focus-trap needs to have at least one focusable element");return me},O=function(){if(l.containerGroups=l.containers.map(function(me){var Se=Az(me,s.tabbableOptions),Ke=cz(me,s.tabbableOptions),xe=Se.length>0?Se[0]:void 0,at=Se.length>0?Se[Se.length-1]:void 0,Ze=Ke.find(function(we){return yg(we)}),Je=Ke.slice().reverse().find(function(we){return yg(we)}),Ne=!!Se.find(function(we){return B0(we)>0});return{container:me,tabbableNodes:Se,focusableNodes:Ke,posTabIndexesFound:Ne,firstTabbableNode:xe,lastTabbableNode:at,firstDomTabbableNode:Ze,lastDomTabbableNode:Je,nextTabbableNode:function(De){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,bt=Se.indexOf(De);return bt<0?He?Ke.slice(Ke.indexOf(De)+1).find(function(Yt){return yg(Yt)}):Ke.slice(0,Ke.indexOf(De)).reverse().find(function(Yt){return yg(Yt)}):Se[bt+(He?1:-1)]}}}),l.tabbableGroups=l.containerGroups.filter(function(me){return me.tabbableNodes.length>0}),l.tabbableGroups.length<=0&&!x("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(l.containerGroups.find(function(me){return me.posTabIndexesFound})&&l.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},P=function Ee(me){var Se=me.activeElemeLine truncated
|
||||
|
||||
The URL must include:
|
||||
|
||||
- \`{fontstack}\` - When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the text-font property of a symbol layer.
|
||||
|
||||
- \`{range}\` - When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.
|
||||
|
||||
This property is required if any layer uses the \`text-field\` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).`,example:"https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"A style's `layers` property lists all the layers available in that style. The type of layer is specified by the `type` property, and must be one of `background`, `fill`, `line`, `symbol`, `raster`, `circle`, `fill-extrusion`, `heatmap`, `hillshade`.\n\nExcept for layers of the `background` type, each layer needs to refer to a source. Layers take the data that they get from a source, optionally filter features, and then define how those features are styled.",example:[{id:"coastline",source:"maplibre","source-layer":"countries",type:"line",paint:{"line-color":"#198EC8"}}]}},gre={"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},yre=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],vre={type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},Cre={type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayLine truncated
|
||||
|
||||
* In categorical functions, when the feature value does not match any of the stop domain values.
|
||||
|
||||
* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.
|
||||
|
||||
* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a \`circle-color\` property but the feature property value is not a string or not a valid color).
|
||||
|
||||
* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.
|
||||
|
||||
If no default is provided, the style property's default is used in these circumstances.`}},function_stop:Lre,expression:Ure,expression_name:zre,light:jre,sky:Nre,terrain:Wre,projection:Gre,paint:Qre,paint_fill:Yre,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",android:"7.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:qre,paint_circle:Vre,paint_heatmap:$re,paint_symbol:Hre,paint_raster:Zre,paint_hillshade:Xre,paint_background:Jre,transition:eie,"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constaLine truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Rie=Fx(function n(e){var t=this,r=e.expanded,i=r===void 0?[]:r,s=e.allowMultipleExpanded,l=s===void 0?!1:s,o=e.allowZeroExpanded,f=o===void 0?!1:o;Dx(this,n),Kl(this,"expanded",void 0),Kl(this,"allowMultipleExpanded",void 0),Kl(this,"allowZeroExpanded",void 0),Kl(this,"toggleExpanded",function(y){if(t.isItemDisabled(y))return t;var x=t.isItemExpanded(y);return x?t.augment({expanded:t.expanded.filter(function(B){return B!==y})}):t.augment({expanded:t.allowMultipleExpanded?[].concat(Bie(t.expanded),[y]):[y]})}),Kl(this,"isItemDisabled",function(y){var x=t.isItemExpanded(y),B=t.expanded.length===1;return!!(x&&!t.allowZeroExpanded&&B)}),Kl(this,"isItemExpanded",function(y){return t.expanded.indexOf(y)!==-1}),Kl(this,"getPanelAttributes",function(y,x){var B=x??t.isItemExpanded(y);return{role:t.allowMultipleExpanded?void 0:"region","aria-hidden":t.allowMultipleExpanded?!B:void 0,"aria-labelledby":t.getButtonId(y),id:t.getPanelId(y),hidden:B?void 0:!0}}),Kl(this,"getHeadingAttributes",function(){return{role:"heading"}}),Kl(this,"getButtonAttributes",function(y,x){var B=x??t.isItemExpanded(y),O=t.isItemDisabled(y);return{id:t.getButtonId(y),"aria-disabled":O,"aria-expanded":B,"aria-controls":t.getPanelId(y),role:"button",tabIndex:0}}),Kl(this,"getPanelId",function(y){return"accordion__panel-".concat(y)}),Kl(this,"getButtonId",function(y){return"accordion__heading-".concat(y)}),Kl(this,"augment",function(y){return new n(B6({expanded:t.expanded,allowMultipleExpanded:t.allowMultipleExpanded,allowZeroExpanded:t.allowZeroExpanded},y))}),this.expanded=i,this.allowMultipleExpanded=l,this.allowZeroExpanded=f}),xz=ci.createContext(null),Mz=function(n){vO(t,n);var e=CO(t);function t(){var r;Dx(this,t);for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s)),Kl(sp(r),"state",new Rie({expanded:r.props.preExpanded,allowMultipleExpanded:r.props.allowMultipleExpanded,allowZeroExpanded:r.props.allowZeroExpanded})),Kl(sp(r),"toggleExpanded",function(o){r.setState(function(f){return f.toggleExpanded(o)},function(){r.props.onChange&&r.props.onChange(r.state.expanded)})}),Kl(sp(r),"isItemDisabled",function(o){return r.state.isItemDisabled(o)}),Kl(sp(r),"isItemExpanded",function(o){return r.state.isItemExpanded(o)}),Kl(sp(r),"getPanelAttributes",function(o,f){return r.state.getPanelAttributes(o,f)}),Kl(sp(r),"getHeadingAttributes",function(){return r.state.getHeadingAttributes()}),Kl(sp(r),"getButtonAttributes",function(o,f){return r.state.getButtonAttributes(o,f)}),r}return Fx(t,[{key:"render",value:function(){var i=this.state,s=i.allowZeroExpanded,l=i.allowMultipleExpanded;return ci.createElement(xz.Provider,{value:{allowMultipleExpanded:l,allowZeroExpanded:s,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),t}(ci.PureComponent);Kl(Mz,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var wz=function(n){vO(t,n);var e=CO(t);function t(){var r;Dx(this,t);for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s)),Kl(sp(r),"renderChildren",function(o){return o?r.props.children(o):null}),r}return Fx(t,[{key:"render",value:function(){return ci.createElement(xz.Consumer,null,this.renderChildren)}}]),t}(ci.PureComponent),Die=["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"],Fie=function(e){var t=e.className,r=t===void 0?"accordion":t,i=e.allowMultipleExpanded,s=e.allowZeroExpanded,l=e.onChange,o=e.preExpanded,f=Lx(e,Die);return ci.createElement(Mz,{preExpanded:o,allowMultipleExpanded:i,allowZeroExpanded:s,onChange:l},ci.createElement("div",nm({"data-accordion-component":"Accordion",className:r},f)))},k6;(function(n){n.Accordion="Accordion",n.AccordionItem="AccordionItem",n.AccordionItemButton="AccordionItemButton",n.AccordionItemHeading="AccordionItemHeading",n.AccordionItemPanel="AccordionItemPanel"})(k6||(k6={}));var Sz=k6,r5=0;function Lie(){var n=r5;return r5=r5+1,"raa-".concat(n)}var Uie=ci.useId||Lie,zie=/[\u0009\u000a\u000c\u000d\u0020]/g;function wC(n){return n===""||zie.test(n)?(console.error('uuid must be a valid HTML5 id but was given "'.concat(n,'", ASCII whitespaces are forbidden')),!1):!0}var Ez=ci.createContext(null),jie=function(e){var t=e.children,r=e.uuid,i=e.accordionContext,s=e.dangerouslySetExpanded,l=function(){i.toggleExpanded(r)},o=function(y){var x=s??y.isItemExpanded(r),B=y.isItemDisabled(r),O=y.getPanelAttributes(r,s),P=y.getHeadingAttributes(r),U=y.getButtonAttributes(r,s);return ci.createElement(Ez.Provider,{value:{uuid:r,expanded:x,disabled:B,toggleExpanded:l,panelAttributes:O,headingAttributes:P,buttonAttributes:U}},t)};return ci.createElement(wz,nu
Line truncated
|
||||
|
||||
From the WAI-ARIA spec (https://www.w3.org/TR/wai-aria-practices-1.1/#accordion):
|
||||
|
||||
“The button element is the only element inside the heading element. That is, if there are other visually persistent elements, they are not included inside the heading element.”
|
||||
|
||||
`,Iz=function(n){vO(t,n);var e=CO(t);function t(){var r;Dx(this,t);for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s)),Kl(sp(r),"ref",void 0),Kl(sp(r),"setRef",function(o){r.ref=o}),r}return Fx(t,[{key:"componentDidUpdate",value:function(){t.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){t.VALIDATE(this.ref)}},{key:"render",value:function(){return ci.createElement("div",nm({"data-accordion-component":"AccordionItemHeading"},this.props,{ref:this.setRef}))}}],[{key:"VALIDATE",value:function(i){if(i===void 0)throw new Error("ref is undefined");if(!(i.childElementCount===1&&i.firstElementChild&&i.firstElementChild.getAttribute("data-accordion-component")==="AccordionItemButton"))throw new Error(Xie)}}]),t}(ci.PureComponent);Kl(Iz,"defaultProps",Zie);var kz=function(e){return ci.createElement(Ux,null,function(t){var r=t.headingAttributes;return e.id&&wC(e.id),ci.createElement(Iz,nm({},e,r))})};kz.displayName=Sz.AccordionItemHeading;var Jie=["className","region","id"],eoe=function(e){var t=e.className,r=t===void 0?"accordion__panel":t,i=e.region,s=e.id,l=Lx(e,Jie),o=function(y){var x=y.panelAttributes;s&&wC(s);var B=B6(B6({},x),{},{"aria-labelledby":i?x["aria-labelledby"]:void 0});return ci.createElement("div",nm({"data-accordion-component":"AccordionItemPanel",className:r},l,B,{role:i?"region":void 0}))};return ci.createElement(Ux,null,o)},Ob={exports:{}},toe=Ob.exports,N9;function jx(){return N9||(N9=1,function(n,e){(function(t,r){n.exports=r()})(toe,function(){var t=navigator.userAgent,r=navigator.platform,i=/gecko\/\d/i.test(t),s=/MSIE \d/.test(t),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),f=s||l||o,y=f&&(s?document.documentMode||6:+(o||l)[1]),x=!o&&/WebKit\//.test(t),B=x&&/Qt\/\d+\.\d+/.test(t),O=!o&&/Chrome\/(\d+)/.exec(t),P=O&&+O[1],U=/Opera\//.test(t),j=/Apple Computer/.test(navigator.vendor),N=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),Y=/PhantomJS/.test(t),H=j&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),se=/Android/.test(t),re=H||se||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),V=H||/Mac/.test(r),ne=/\bCrOS\b/.test(t),G=/win/i.test(r),oe=U&&t.match(/Version\/(\d*\.\d*)/);oe&&(oe=Number(oe[1])),oe&&oe>=15&&(U=!1,x=!0);var he=V&&(B||U&&(oe==null||oe<12.11)),fe=i||f&&y>=9;function Ee(A){return new RegExp("(^|\\s)"+A+"(?:$|\\s)\\s*")}var me=function(A,g){var S=A.className,E=Ee(g).exec(S);if(E){var R=S.slice(E.index+E[0].length);A.className=S.slice(0,E.index)+(R?E[1]+R:"")}};function Se(A){for(var g=A.childNodes.length;g>0;--g)A.removeChild(A.firstChild);return A}function Ke(A,g){return Se(A).appendChild(g)}function xe(A,g,S,E){var R=document.createElement(A);if(S&&(R.className=S),E&&(R.style.cssText=E),typeof g=="string")R.appendChild(document.createTextNode(g));else if(g)for(var Z=0;Z<g.length;++Z)R.appendChild(g[Z]);return R}function at(A,g,S,E){var R=xe(A,g,S,E);return R.setAttribute("role","presentation"),R}var Ze;document.createRange?Ze=function(A,g,S,E){var R=document.createRange();return R.setEnd(E||A,S),R.setStart(A,g),R}:Ze=function(A,g,S){var E=document.body.createTextRange();try{E.moveToElementText(A.parentNode)}catch{return E}return E.collapse(!0),E.moveEnd("character",S),E.moveStart("character",g),E};function Je(A,g){if(g.nodeType==3&&(g=g.parentNode),A.contains)return A.contains(g);do if(g.nodeType==11&&(g=g.host),g==A)return!0;while(g=g.parentNode)}function Ne(A){var g=A.ownerDocument||A,S;try{S=A.activeElement}catch{S=g.body||null}for(;S&&S.shadowRoot&&S.shadowRoot.activeElement;)S=S.shadowRoot.activeElement;return S}function we(A,g){var S=A.className;Ee(g).test(S)||(A.className+=(S?" ":"")+g)}function De(A,g){for(var S=A.split(" "),E=0;E<S.length;E++)S[E]&&!Ee(S[E]).test(g)&&(g+=" "+S[E]);return g}var He=function(A){A.select()};H?He=function(A){A.selectionStart=0,A.selectionEnd=A.value.length}:f&&(He=function(A){try{A.select()}catch{}});function bt(A){return A.display.wrapper.ownerDocument}function Yt(A){return yt(A.display.wrapper)}function yt(A){return A.getRootNode?A.getRootNode():A.ownerDocument}function Ft(A){return bt(A).defaultView}function Pt(A){var g=Array.prototype.slice.call(arguments,1);return function(){return A.apply(null,g)}}function Ue(A,g,S){g||(g={});for(var E in A)A.hasOwnProperty(E)&&(S!==!1||!g.hasOwnProperty(E))&&(g[E]=A[E]);return g}function Pe(A,g,S,E,R){g==null&&(g=A.search(/[^\s\u00a0]/),g==-1&&(g=A.length));for(var Z=E||0,Ae=R||0;;){var Ce=A.indexOf(" ",Z);if(Ce<0||Ce>=g)return Ae+(g-Z);Ae+=Ce-Z,Ae+=S-Ae%S,Z=Ce+1}}var Be=function(){this.id=null,this.f=null,this.time=0,this.handler=Pt(this.onTimeout,this)};Be.prototype.onTimeout=function(A){A.id=0,A.time<=+new Date?A.f():setTimeout(A.handler,A.time-+new Date)},Be.prototype.set=function(A,g){this.f=g;var S=+new Date+A;(!this.id||S<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,A),this.time=S)};function it(A,g){for(var S=0;S<A.length;++S)if(A[S]==g)return S;return-1}var
Line truncated
|
||||
|
||||
b`.split(/\n/).length!=3?function(A){for(var g=0,S=[],E=A.length;g<=E;){var R=A.indexOf(`
|
||||
`,g);R==-1&&(R=A.length);var Z=A.slice(g,A.charAt(R-1)=="\r"?R-1:R),Ae=Z.indexOf("\r");Ae!=-1?(S.push(Z.slice(0,Ae)),g+=Ae+1):(S.push(Z),g=R+1)}return S}:function(A){return A.split(/\r\n?|\n/)},Or=window.getSelection?function(A){try{return A.selectionStart!=A.selectionEnd}catch{return!1}}:function(A){var g;try{g=A.ownerDocument.selection.createRange()}catch{}return!g||g.parentElement()!=A?!1:g.compareEndPoints("StartToEnd",g)!=0},ka=function(){var A=xe("div");return"oncopy"in A?!0:(A.setAttribute("oncopy","return;"),typeof A.oncopy=="function")}(),Wi=null;function Bi(A){if(Wi!=null)return Wi;var g=Ke(A,xe("span","x")),S=g.getBoundingClientRect(),E=Ze(g,0,1).getBoundingClientRect();return Wi=Math.abs(S.left-E.left)>1}var eo={},ws={};function ko(A,g){arguments.length>2&&(g.dependencies=Array.prototype.slice.call(arguments,2)),eo[A]=g}function Hi(A,g){ws[A]=g}function Sl(A){if(typeof A=="string"&&ws.hasOwnProperty(A))A=ws[A];else if(A&&typeof A.name=="string"&&ws.hasOwnProperty(A.name)){var g=ws[A.name];typeof g=="string"&&(g={name:g}),A=lr(g,A),A.name=g.name}else{if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(A))return Sl("application/xml");if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(A))return Sl("application/json")}return typeof A=="string"?{name:A}:A||{name:"null"}}function Go(A,g){g=Sl(g);var S=eo[g.name];if(!S)return Go(A,"text/plain");var E=S(A,g);if(Za.hasOwnProperty(g.name)){var R=Za[g.name];for(var Z in R)R.hasOwnProperty(Z)&&(E.hasOwnProperty(Z)&&(E["_"+Z]=E[Z]),E[Z]=R[Z])}if(E.name=g.name,g.helperType&&(E.helperType=g.helperType),g.modeProps)for(var Ae in g.modeProps)E[Ae]=g.modeProps[Ae];return E}var Za={};function Xa(A,g){var S=Za.hasOwnProperty(A)?Za[A]:Za[A]={};Ue(g,S)}function Yi(A,g){if(g===!0)return g;if(A.copyState)return A.copyState(g);var S={};for(var E in g){var R=g[E];R instanceof Array&&(R=R.concat([])),S[E]=R}return S}function Lu(A,g){for(var S;A.innerMode&&(S=A.innerMode(g),!(!S||S.mode==A));)g=S.state,A=S.mode;return S||{mode:A,state:g}}function Jl(A,g,S){return A.startState?A.startState(g,S):!0}var wo=function(A,g,S){this.pos=this.start=0,this.string=A,this.tabSize=g||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=S};wo.prototype.eol=function(){return this.pos>=this.string.length},wo.prototype.sol=function(){return this.pos==this.lineStart},wo.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},wo.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},wo.prototype.eat=function(A){var g=this.string.charAt(this.pos),S;if(typeof A=="string"?S=g==A:S=g&&(A.test?A.test(g):A(g)),S)return++this.pos,g},wo.prototype.eatWhile=function(A){for(var g=this.pos;this.eat(A););return this.pos>g},wo.prototype.eatSpace=function(){for(var A=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>A},wo.prototype.skipToEnd=function(){this.pos=this.string.length},wo.prototype.skipTo=function(A){var g=this.string.indexOf(A,this.pos);if(g>-1)return this.pos=g,!0},wo.prototype.backUp=function(A){this.pos-=A},wo.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},wo.prototype.indentation=function(){return Pe(this.string,null,this.tabSize)-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},wo.prototype.match=function(A,g,S){if(typeof A=="string"){var E=function(Ae){return S?Ae.toLowerCase():Ae},R=this.string.substr(this.pos,A.length);if(E(R)==E(A))return g!==!1&&(this.pos+=A.length),!0}else{var Z=this.string.slice(this.pos).match(A);return Z&&Z.index>0?null:(Z&&g!==!1&&(this.pos+=Z[0].length),Z)}},wo.prototype.current=function(){return this.string.slice(this.start,this.pos)},wo.prototype.hideFirstChars=function(A,g){this.lineStart+=A;try{return g()}finally{this.lineStart-=A}},wo.prototype.lookAhead=function(A){var g=this.lineOracle;return g&&g.lookAhead(A)},wo.prototype.baseToken=function(){var A=this.lineOracle;return A&&A.baseToken(this.pos)};function wr(A,g){if(g-=A.first,g<0||g>=A.size)throw new Error("There is no line "+(g+A.first)+" in the document.");for(var S=A;!S.lines;)for(var E=0;;++E){var R=S.children[E],Z=R.chunkSize();if(g<Z){S=R;break}g-=Z}return S.lines[g]}function Ta(A,g,S){var E=[],R=g.line;return A.iter(g.line,S.line+1,function(Z){var Ae=Z.text;R==S.line&&(Ae=Ae.slice(0,S.ch)),R==g.line&&(Ae=Ae.slice(g.ch)),E.push(Ae),++R}),E}function Ss(A,g,S){var E=[];return A.iter(g,S,function(R){E.push(R.text)}),E}function Zs(A,g){var S=g-A.height;if(S)for(var E=A;E;E=E.parent)E.height+=S}function Ye(A){if(A.parent==null)return null;for(var g=A.parent,S=it(g.lines,A),E=g.parent;E;g=E,E=E.parent)for(var R=0;E.children[R]!=g;++R)S+=E.children[R].chunkSize();return S+g.first}function xt(A,g){var S=A.first;e:do{for(var E=0;E<A.child
Line truncated
|
||||
`?(Fn=gt.appendChild(xe("span",Xt[0]=="\r"?"␍":"","cm-invalidchar")),Fn.setAttribute("cm-text",Xt[0]),A.col+=1):(Fn=A.cm.options.specialCharPlaceholder(Xt[0]),Fn.setAttribute("cm-text",Xt[0]),f&&y<9?gt.appendChild(xe("span",[Fn])):gt.appendChild(Fn),A.col+=1);A.map.push(A.pos,A.pos+1,Fn),A.pos++}}if(A.trailingSpace=Ce.charCodeAt(g.length-1)==32,S||E||R||je||Z||Ae){var gr=S||"";E&&(gr+=E),R&&(gr+=R);var yr=xe("span",[gt],gr,Z);if(Ae)for(var Rr in Ae)Ae.hasOwnProperty(Rr)&&Rr!="style"&&Rr!="class"&&yr.setAttribute(Rr,Ae[Rr]);return A.content.appendChild(yr)}A.content.appendChild(gt)}}function cd(A,g){if(A.length>1&&!/ /.test(A))return A;for(var S=g,E="",R=0;R<A.length;R++){var Z=A.charAt(R);Z==" "&&S&&(R==A.length-1||A.charCodeAt(R+1)==32)&&(Z=" "),E+=Z,S=Z==" "}return E}function Fo(A,g){return function(S,E,R,Z,Ae,Ce,Ie){R=R?R+" cm-force-border":"cm-force-border";for(var je=S.pos,gt=je+E.length;;){for(var Mt=void 0,Xt=0;Xt<g.length&&(Mt=g[Xt],!(Mt.to>je&&Mt.from<=je));Xt++);if(Mt.to>=gt)return A(S,E,R,Z,Ae,Ce,Ie);A(S,E.slice(0,Mt.to-je),R,Z,null,Ce,Ie),Z=null,E=E.slice(Mt.to-je),je=Mt.to}}}function Cc(A,g,S,E){var R=!E&&S.widgetNode;R&&A.map.push(A.pos,A.pos+g,R),!E&&A.cm.display.input.needsContentAttribute&&(R||(R=A.content.appendChild(document.createElement("span"))),R.setAttribute("cm-marker",S.id)),R&&(A.cm.display.input.setUneditable(R),A.content.appendChild(R)),A.pos+=g,A.trailingSpace=!1}function yh(A,g,S){var E=A.markedSpans,R=A.text,Z=0;if(!E){for(var Ae=1;Ae<S.length;Ae+=2)g.addToken(g,R.slice(Z,Z=S[Ae]),gl(S[Ae+1],g.cm.options));return}for(var Ce=R.length,Ie=0,je=1,gt="",Mt,Xt,Qt=0,xn,Fn,Ar,tr,gr;;){if(Qt==Ie){xn=Fn=Ar=Xt="",gr=null,tr=null,Qt=1/0;for(var yr=[],Rr=void 0,ti=0;ti<E.length;++ti){var jr=E[ti],Ji=jr.marker;if(Ji.type=="bookmark"&&jr.from==Ie&&Ji.widgetNode)yr.push(Ji);else if(jr.from<=Ie&&(jr.to==null||jr.to>Ie||Ji.collapsed&&jr.to==Ie&&jr.from==Ie)){if(jr.to!=null&&jr.to!=Ie&&Qt>jr.to&&(Qt=jr.to,Fn=""),Ji.className&&(xn+=" "+Ji.className),Ji.css&&(Xt=(Xt?Xt+";":"")+Ji.css),Ji.startStyle&&jr.from==Ie&&(Ar+=" "+Ji.startStyle),Ji.endStyle&&jr.to==Qt&&(Rr||(Rr=[])).push(Ji.endStyle,jr.to),Ji.title&&((gr||(gr={})).title=Ji.title),Ji.attributes)for(var Bo in Ji.attributes)(gr||(gr={}))[Bo]=Ji.attributes[Bo];Ji.collapsed&&(!tr||st(tr.marker,Ji)<0)&&(tr=jr)}else jr.from>Ie&&Qt>jr.from&&(Qt=jr.from)}if(Rr)for(var Na=0;Na<Rr.length;Na+=2)Rr[Na+1]==Qt&&(Fn+=" "+Rr[Na]);if(!tr||tr.from==Ie)for(var na=0;na<yr.length;++na)Cc(g,0,yr[na]);if(tr&&(tr.from||0)==Ie){if(Cc(g,(tr.to==null?Ce+1:tr.to)-Ie,tr.marker,tr.from==null),tr.to==null)return;tr.to==Ie&&(tr=!1)}}if(Ie>=Ce)break;for(var fa=Math.min(Ce,Qt);;){if(gt){var Wa=Ie+gt.length;if(!tr){var Ga=Wa>fa?gt.slice(0,fa-Ie):gt;g.addToken(g,Ga,Mt?Mt+xn:xn,Ar,Ie+Ga.length==Qt?Fn:"",Xt,gr)}if(Wa>=fa){gt=gt.slice(fa-Ie),Ie=fa;break}Ie=Wa,Ar=""}gt=R.slice(Z,Z=S[je++]),Mt=gl(S[je++],g.cm.options)}}}function Nd(A,g,S){this.line=g,this.rest=pi(g),this.size=this.rest?Ye(dr(this.rest))-S+1:1,this.node=this.text=null,this.hidden=zr(A,g)}function zu(A,g,S){for(var E=[],R,Z=g;Z<S;Z=R){var Ae=new Nd(A.doc,wr(A.doc,Z),Z);R=Z+Ae.size,E.push(Ae)}return E}var Wd=null;function Gd(A){Wd?Wd.ops.push(A):A.ownsGroup=Wd={ops:[A],delayedCallbacks:[]}}function _p(A){var g=A.delayedCallbacks,S=0;do{for(;S<g.length;S++)g[S].call(null);for(var E=0;E<A.ops.length;E++){var R=A.ops[E];if(R.cursorActivityHandlers)for(;R.cursorActivityCalled<R.cursorActivityHandlers.length;)R.cursorActivityHandlers[R.cursorActivityCalled++].call(null,R.cm)}}while(S<g.length)}function dd(A,g){var S=A.ownsGroup;if(S)try{_p(S)}finally{Wd=null,g(S)}}var _c=null;function Gs(A,g){var S=Qe(A,g);if(S.length){var E=Array.prototype.slice.call(arguments,2),R;Wd?R=Wd.delayedCallbacks:_c?R=_c:(R=_c=[],setTimeout(Lf,0));for(var Z=function(Ce){R.push(function(){return S[Ce].apply(null,E)})},Ae=0;Ae<S.length;++Ae)Z(Ae)}}function Lf(){var A=_c;_c=null;for(var g=0;g<A.length;++g)A[g]()}function $h(A,g,S,E){for(var R=0;R<g.changes.length;R++){var Z=g.changes[R];Z=="text"?Zh(A,g):Z=="gutter"?ZA(A,g,S,E):Z=="class"?vh(A,g):Z=="widget"&&Xh(A,g,E)}g.changes=null}function jc(A){return A.node==A.text&&(A.node=xe("div",null,null,"position: relative"),A.text.parentNode&&A.text.parentNode.replaceChild(A.node,A.text),A.node.appendChild(A.text),f&&y<8&&(A.node.style.zIndex=2)),A.node}function Hh(A,g){var S=g.bgClass?g.bgClass+" "+(g.line.bgClass||""):g.line.bgClass;if(S&&(S+=" CodeMirror-linebackground"),g.background)S?g.background.className=S:(g.background.parentNode.removeChild(g.background),g.background=null);else if(S){var E=jc(g);g.background=E.insertBefore(xe("div",null,S),E.firstChild),A.display.input.setUneditable(g.background)}}function hd(A,g){var S=A.display.externalMeasured;return S&&S.line==g.line?(A.display.externalMeasured=null,g.measure=S.measure,S.built):Ad(A,g)}function Zh(A,g){var S=g.text.className,E=hd(A,g);g.text==g.node&&(g.node=E.pre),g.text.parentNode.replaceChild(E.pre,g.text),g.text=E.pre,E.bgClass
Line truncated
|
||||
top: `+Rr+"px; width: "+(ti??Ie-yr)+`px;
|
||||
height: `+(jr-Rr)+"px"))}function Mt(yr,Rr,ti){var jr=wr(R,yr),Ji=jr.text.length,Bo,Na;function na(Ga,Wl){return In(A,fn(yr,Ga),"div",jr,Wl)}function fa(Ga,Wl,Qa){var pa=Jo(A,jr,null,Ga),as=Wl=="ltr"==(Qa=="after")?"left":"right",Ci=Qa=="after"?pa.begin:pa.end-(/\s/.test(jr.text.charAt(pa.end-1))?2:1);return na(Ci,as)[as]}var Wa=ve(jr,R.direction);return sn(Wa,Rr||0,ti??Ji,function(Ga,Wl,Qa,pa){var as=Qa=="ltr",Ci=na(Ga,as?"left":"right"),ls=na(Wl-1,as?"right":"left"),ra=Rr==null&&Ga==0,Ys=ti==null&&Wl==Ji,xs=pa==0,Bu=!Wa||pa==Wa.length-1;if(ls.top-Ci.top<=3){var Ko=(je?ra:Ys)&&xs,Pc=(je?Ys:ra)&&Bu,Ou=Ko?Ce:(as?Ci:ls).left,zA=Pc?Ie:(as?ls:Ci).right;gt(Ou,Ci.top,zA-Ou,Ci.bottom)}else{var CA,Ya,Ol,Qf;as?(CA=je&&ra&&xs?Ce:Ci.left,Ya=je?Ie:fa(Ga,Qa,"before"),Ol=je?Ce:fa(Wl,Qa,"after"),Qf=je&&Ys&&Bu?Ie:ls.right):(CA=je?fa(Ga,Qa,"before"):Ce,Ya=!je&&ra&&xs?Ie:Ci.right,Ol=!je&&Ys&&Bu?Ce:ls.left,Qf=je?fa(Wl,Qa,"after"):Ie),gt(CA,Ci.top,Ya-CA,Ci.bottom),Ci.bottom<ls.top&>(Ce,Ci.bottom,null,ls.top),gt(Ol,ls.top,Qf-Ol,ls.bottom)}(!Bo||Yc(Ci,Bo)<0)&&(Bo=Ci),Yc(ls,Bo)<0&&(Bo=ls),(!Na||Yc(Ci,Na)<0)&&(Na=Ci),Yc(ls,Na)<0&&(Na=ls)}),{start:Bo,end:Na}}var Xt=g.from(),Qt=g.to();if(Xt.line==Qt.line)Mt(Xt.line,Xt.ch,Qt.ch);else{var xn=wr(R,Xt.line),Fn=wr(R,Qt.line),Ar=Ir(xn)==Ir(Fn),tr=Mt(Xt.line,Xt.ch,Ar?xn.text.length+1:null).end,gr=Mt(Qt.line,Ar?0:null,Qt.ch).start;Ar&&(tr.top<gr.top-2?(gt(tr.right,tr.top,null,tr.bottom),gt(Ce,gr.top,gr.left,gr.bottom)):gt(tr.right,tr.top,gr.left-tr.right,tr.bottom)),tr.bottom<gr.top&>(Ce,tr.bottom,null,gr.top)}S.appendChild(Z)}function gu(A){if(A.state.focused){var g=A.display;clearInterval(g.blinker);var S=!0;g.cursorDiv.style.visibility="",A.options.cursorBlinkRate>0?g.blinker=setInterval(function(){A.hasFocus()||cs(A),g.cursorDiv.style.visibility=(S=!S)?"":"hidden"},A.options.cursorBlinkRate):A.options.cursorBlinkRate<0&&(g.cursorDiv.style.visibility="hidden")}}function nc(A){A.hasFocus()||(A.display.input.focus(),A.state.focused||vd(A))}function qc(A){A.state.delayingBlurEvent=!0,setTimeout(function(){A.state.delayingBlurEvent&&(A.state.delayingBlurEvent=!1,A.state.focused&&cs(A))},100)}function vd(A,g){A.state.delayingBlurEvent&&!A.state.draggingText&&(A.state.delayingBlurEvent=!1),A.options.readOnly!="nocursor"&&(A.state.focused||(ct(A,"focus",A,g),A.state.focused=!0,we(A.display.wrapper,"CodeMirror-focused"),!A.curOp&&A.display.selForContextMenu!=A.doc.sel&&(A.display.input.reset(),x&&setTimeout(function(){return A.display.input.reset(!0)},20)),A.display.input.receivedFocus()),gu(A))}function cs(A,g){A.state.delayingBlurEvent||(A.state.focused&&(ct(A,"blur",A,g),A.state.focused=!1,me(A.display.wrapper,"CodeMirror-focused")),clearInterval(A.display.blinker),setTimeout(function(){A.state.focused||(A.display.shift=!1)},150))}function Cd(A){for(var g=A.display,S=g.lineDiv.offsetTop,E=Math.max(0,g.scroller.getBoundingClientRect().top),R=g.lineDiv.getBoundingClientRect().top,Z=0,Ae=0;Ae<g.view.length;Ae++){var Ce=g.view[Ae],Ie=A.options.lineWrapping,je=void 0,gt=0;if(!Ce.hidden){if(R+=Ce.line.height,f&&y<8){var Mt=Ce.node.offsetTop+Ce.node.offsetHeight;je=Mt-S,S=Mt}else{var Xt=Ce.node.getBoundingClientRect();je=Xt.bottom-Xt.top,!Ie&&Ce.text.firstChild&&(gt=Ce.text.firstChild.getBoundingClientRect().right-Xt.left-1)}var Qt=Ce.line.height-je;if((Qt>.005||Qt<-.005)&&(R<E&&(Z-=Qt),Zs(Ce.line,je),dA(Ce.line),Ce.rest))for(var xn=0;xn<Ce.rest.length;xn++)dA(Ce.rest[xn]);if(gt>A.display.sizerWidth){var Fn=Math.ceil(gt/AA(A.display));Fn>A.display.maxLineLength&&(A.display.maxLineLength=Fn,A.display.maxLine=Ce.line,A.display.maxLineChanged=!0)}}}Math.abs(Z)>2&&(g.scroller.scrollTop+=Z)}function dA(A){if(A.widgets)for(var g=0;g<A.widgets.length;++g){var S=A.widgets[g],E=S.node.parentNode;E&&(S.height=E.offsetHeight)}}function yu(A,g,S){var E=S&&S.top!=null?Math.max(0,S.top):A.scroller.scrollTop;E=Math.floor(E-Wc(A));var R=S&&S.bottom!=null?S.bottom:E+A.wrapper.clientHeight,Z=xt(g,E),Ae=xt(g,R);if(S&&S.ensure){var Ce=S.ensure.from.line,Ie=S.ensure.to.line;Ce<Z?(Z=Ce,Ae=xt(g,Zi(wr(g,Ce))+A.wrapper.clientHeight)):Math.min(Ie,g.lastLine())>=Ae&&(Z=xt(g,Zi(wr(g,Ie))-A.wrapper.clientHeight),Ae=Ie)}return{from:Z,to:Math.max(Ae,Z+1)}}function Hd(A,g){if(!dt(A,"scrollCursorIntoView")){var S=A.display,E=S.sizer.getBoundingClientRect(),R=null,Z=S.wrapper.ownerDocument;if(g.top+E.top<0?R=!0:g.bottom+E.top>(Z.defaultView.innerHeight||Z.documentElement.clientHeight)&&(R=!1),R!=null&&!Y){var Ae=xe("div","",null,`position: absolute;
|
||||
top: `+(g.top-S.viewOffset-Wc(A.display))+`px;
|
||||
height: `+(g.bottom-g.top+fu(A)+S.barHeight)+`px;
|
||||
left: `+g.left+"px; width: "+Math.max(2,g.right-g.left)+"px;");A.display.lineSpace.appendChild(Ae),Ae.scrollIntoView(R),A.display.lineSpace.removeChild(Ae)}}}function wh(A,g,S,E){E==null&&(E=0);var R;!A.options.lineWrapping&&g==S&&(S=g.sticky=="before"?fn(g.line,g.ch+1,"before"):g,g=g.ch?fn(g.line,g.sticky=="before"?g.ch-1:g.ch,"after"):g);for(var Z=0;Z<5;Z++){var Ae=!1,Ce=an(A,g),Ie=!S||S==g?Ce:an(A,S);R={left:Math.min(Ce.left,Ie.left),top:Math.min(Ce.top,Ie.top)-E,right:Math.max(Ce.left,Ie.left),bottom:Math.max(Ce.bottom,Ie.bottom)+E};var je=rc(A,R),gt=A.doc.scrollTop,Mt=A.doc.scrollLeft;if(je.scrollTop!=null&&(oc(A,je.scrollTop),Math.abs(A.doc.scrollTop-gt)>1&&(Ae=!0)),je.scrollLeft!=null&&(nl(A,je.scrollLeft),Math.abs(A.doc.scrollLeft-Mt)>1&&(Ae=!0)),!Ae)break}return R}function IA(A,g){var S=rc(A,g);S.scrollTop!=null&&oc(A,S.scrollTop),S.scrollLeft!=null&&nl(A,S.scrollLeft)}function rc(A,g){var S=A.display,E=Ka(A.display);g.top<0&&(g.top=0);var R=A.curOp&&A.curOp.scrollTop!=null?A.curOp.scrollTop:S.scroller.scrollTop,Z=BA(A),Ae={};g.bottom-g.top>Z&&(g.bottom=g.top+Z);var Ce=A.doc.height+Ch(S),Ie=g.top<E,je=g.bottom>Ce-E;if(g.top<R)Ae.scrollTop=Ie?0:g.top;else if(g.bottom>R+Z){var gt=Math.min(g.top,(je?Ce:g.bottom)-Z);gt!=R&&(Ae.scrollTop=gt)}var Mt=A.options.fixedGutter?0:S.gutters.offsetWidth,Xt=A.curOp&&A.curOp.scrollLeft!=null?A.curOp.scrollLeft:S.scroller.scrollLeft-Mt,Qt=XA(A)-S.gutters.offsetWidth,xn=g.right-g.left>Qt;return xn&&(g.right=g.left+Qt),g.left<10?Ae.scrollLeft=0:g.left<Xt?Ae.scrollLeft=Math.max(0,g.left+Mt-(xn?0:10)):g.right>Qt+Xt-3&&(Ae.scrollLeft=g.right+(xn?0:10)-Qt),Ae}function ic(A,g){g!=null&&(Ul(A),A.curOp.scrollTop=(A.curOp.scrollTop==null?A.doc.scrollTop:A.curOp.scrollTop)+g)}function ms(A){Ul(A);var g=A.getCursor();A.curOp.scrollToPos={from:g,to:g,margin:A.options.cursorScrollMargin}}function ao(A,g,S){(g!=null||S!=null)&&Ul(A),g!=null&&(A.curOp.scrollLeft=g),S!=null&&(A.curOp.scrollTop=S)}function _d(A,g){Ul(A),A.curOp.scrollToPos=g}function Ul(A){var g=A.curOp.scrollToPos;if(g){A.curOp.scrollToPos=null;var S=Dr(A,g.from),E=Dr(A,g.to);Vc(A,S,E,g.margin)}}function Vc(A,g,S,E){var R=rc(A,{left:Math.min(g.left,S.left),top:Math.min(g.top,S.top)-E,right:Math.max(g.right,S.right),bottom:Math.max(g.bottom,S.bottom)+E});ao(A,R.scrollLeft,R.scrollTop)}function oc(A,g){Math.abs(A.doc.scrollTop-g)<2||(i||gs(A,{top:g}),bd(A,g,!0),i&&gs(A),zl(A,100))}function bd(A,g,S){g=Math.max(0,Math.min(A.display.scroller.scrollHeight-A.display.scroller.clientHeight,g)),!(A.display.scroller.scrollTop==g&&!S)&&(A.doc.scrollTop=g,A.display.scrollbars.setScrollTop(g),A.display.scroller.scrollTop!=g&&(A.display.scroller.scrollTop=g))}function nl(A,g,S,E){g=Math.max(0,Math.min(g,A.display.scroller.scrollWidth-A.display.scroller.clientWidth)),!((S?g==A.doc.scrollLeft:Math.abs(A.doc.scrollLeft-g)<2)&&!E)&&(A.doc.scrollLeft=g,nf(A),A.display.scroller.scrollLeft!=g&&(A.display.scroller.scrollLeft=g),A.display.scrollbars.setScrollLeft(g))}function vu(A){var g=A.display,S=g.gutters.offsetWidth,E=Math.round(A.doc.height+Ch(A.display));return{clientHeight:g.scroller.clientHeight,viewHeight:g.wrapper.clientHeight,scrollWidth:g.scroller.scrollWidth,clientWidth:g.scroller.clientWidth,viewWidth:g.wrapper.clientWidth,barLeft:A.options.fixedGutter?S:0,docHeight:E,scrollHeight:E+fu(A)+g.barHeight,nativeBarWidth:g.nativeBarWidth,gutterWidth:S}}var rl=function(A,g,S){this.cm=S;var E=this.vert=xe("div",[xe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),R=this.horiz=xe("div",[xe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");E.tabIndex=R.tabIndex=-1,A(E),A(R),Fe(E,"scroll",function(){E.clientHeight&&g(E.scrollTop,"vertical")}),Fe(R,"scroll",function(){R.clientWidth&&g(R.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,f&&y<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};rl.prototype.update=function(A){var g=A.scrollWidth>A.clientWidth+1,S=A.scrollHeight>A.clientHeight+1,E=A.nativeBarWidth;if(S){this.vert.style.display="block",this.vert.style.bottom=g?E+"px":"0";var R=A.viewHeight-(g?E:0);this.vert.firstChild.style.height=Math.max(0,A.scrollHeight-A.clientHeight+R)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(g){this.horiz.style.display="block",this.horiz.style.right=S?E+"px":"0",this.horiz.style.left=A.barLeft+"px";var Z=A.viewWidth-A.barLeft-(S?E:0);this.horiz.firstChild.style.width=Math.max(0,A.scrollWidth-A.clientWidth+Z)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&A.clientHeight>0&&(E==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:S?E:0,bottom:g?E:0}},rl.prototype.setScrollLeft=function(A){this.horiz.scrollLeft!=A&&(this.horiz.scrollLeft=A),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},rl.prototype.setScrollTop=function(A){this.vert.scrollTop!=A&&(this.vert.scrollTop=A),thi
Line truncated
|
||||
`},setDirection:ta(function(A){A!="rtl"&&(A="ltr"),A!=this.direction&&(this.direction=A,this.iter(function(g){return g.order=null}),this.cm&&Kr(this.cm))})}),Zt.prototype.eachLine=Zt.prototype.iter;var Mn=0;function En(A){var g=this;if(zn(g),!(dt(g,A)||EA(g.display,A))){on(A),f&&(Mn=+new Date);var S=cA(g,A,!0),E=A.dataTransfer.files;if(!(!S||g.isReadOnly()))if(E&&E.length&&window.FileReader&&window.File)for(var R=E.length,Z=Array(R),Ae=0,Ce=function(){++Ae==R&&gi(g,function(){S=ii(g.doc,S);var Qt={from:S,to:S,text:g.doc.splitLines(Z.filter(function(xn){return xn!=null}).join(g.doc.lineSeparator())),origin:"paste"};I(g.doc,Qt),xu(g.doc,Ma(ii(g.doc,S),ii(g.doc,Ra(Qt))))})()},Ie=function(Qt,xn){if(g.options.allowDropFileTypes&&it(g.options.allowDropFileTypes,Qt.type)==-1){Ce();return}var Fn=new FileReader;Fn.onerror=function(){return Ce()},Fn.onload=function(){var Ar=Fn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ar)){Ce();return}Z[xn]=Ar,Ce()},Fn.readAsText(Qt)},je=0;je<E.length;je++)Ie(E[je],je);else{if(g.state.draggingText&&g.doc.sel.contains(S)>-1){g.state.draggingText(A),setTimeout(function(){return g.display.input.focus()},20);return}try{var gt=A.dataTransfer.getData("Text");if(gt){var Mt;if(g.state.draggingText&&!g.state.draggingText.copy&&(Mt=g.listSelections()),Qs(g.doc,Ma(S,S)),Mt)for(var Xt=0;Xt<Mt.length;++Xt)z(g.doc,"",Mt[Xt].anchor,Mt[Xt].head,"drag");g.replaceSelection(gt,"around","paste"),g.display.input.focus()}}catch{}}}}function bn(A,g){if(f&&(!A.state.draggingText||+new Date-Mn<100)){rr(g);return}if(!(dt(A,g)||EA(A.display,g))&&(g.dataTransfer.setData("Text",A.getSelection()),g.dataTransfer.effectAllowed="copyMove",g.dataTransfer.setDragImage&&!j)){var S=xe("img",null,null,"position: fixed; left: 0; top: 0;");S.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",U&&(S.width=S.height=1,A.display.wrapper.appendChild(S),S._top=S.offsetTop),g.dataTransfer.setDragImage(S,0,0),U&&S.parentNode.removeChild(S)}}function On(A,g){var S=cA(A,g);if(S){var E=document.createDocumentFragment();Qc(A,S,E),A.display.dragCursor||(A.display.dragCursor=xe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),A.display.lineSpace.insertBefore(A.display.dragCursor,A.display.cursorDiv)),Ke(A.display.dragCursor,E)}}function zn(A){A.display.dragCursor&&(A.display.lineSpace.removeChild(A.display.dragCursor),A.display.dragCursor=null)}function Ln(A){if(document.getElementsByClassName){for(var g=document.getElementsByClassName("CodeMirror"),S=[],E=0;E<g.length;E++){var R=g[E].CodeMirror;R&&S.push(R)}S.length&&S[0].operation(function(){for(var Z=0;Z<S.length;Z++)A(S[Z])})}}var Tr=!1;function Zr(){Tr||(Xi(),Tr=!0)}function Xi(){var A;Fe(window,"resize",function(){A==null&&(A=setTimeout(function(){A=null,Ln(_o)},100))}),Fe(window,"blur",function(){return Ln(cs)})}function _o(A){var g=A.display;g.cachedCharWidth=g.cachedTextHeight=g.cachedPaddingH=null,g.scrollbarsClipped=!1,A.setSize()}for(var ki={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},os=0;os<10;os++)ki[os+48]=ki[os+96]=String(os);for(var Yo=65;Yo<=90;Yo++)ki[Yo]=String.fromCharCode(Yo);for(var Ao=1;Ao<=12;Ao++)ki[Ao+111]=ki[Ao+63235]="F"+Ao;var po={};po.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},po.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},po.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-KLine truncated
|
||||
`,"start")},toggleOverwrite:function(A){return A.toggleOverwrite()}};function Ua(A,g){var S=wr(A.doc,g),E=Ir(S);return E!=S&&(g=Ye(E)),mA(!0,A,E,g,1)}function gA(A,g){var S=wr(A.doc,g),E=Pr(S);return E!=S&&(g=Ye(E)),mA(!0,A,S,g,-1)}function hs(A,g){var S=Ua(A,g.line),E=wr(A.doc,S.line),R=ve(E,A.doc.direction);if(!R||R[0].level==0){var Z=Math.max(S.ch,E.text.search(/\S/)),Ae=g.line==S.line&&g.ch<=Z&&g.ch;return fn(S.line,Ae?0:Z,S.sticky)}return S}function zo(A,g,S){if(typeof g=="string"&&(g=lu[g],!g))return!1;A.display.input.ensurePolled();var E=A.display.shift,R=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),S&&(A.display.shift=!1),R=g(A)!=pt}finally{A.display.shift=E,A.state.suppressEdits=!1}return R}function za(A,g,S){for(var E=0;E<A.state.keyMaps.length;E++){var R=es(g,A.state.keyMaps[E],S,A);if(R)return R}return A.options.extraKeys&&es(g,A.options.extraKeys,S,A)||es(g,A.options.keyMap,S,A)}var ja=new Be;function yA(A,g,S,E){var R=A.state.keySeq;if(R){if(wa(g))return"handled";if(/\'$/.test(g)?A.state.keySeq=null:ja.set(50,function(){A.state.keySeq==R&&(A.state.keySeq=null,A.display.input.reset())}),zf(A,R+" "+g,S,E))return!0}return zf(A,g,S,E)}function zf(A,g,S,E){var R=za(A,g,E);return R=="multi"&&(A.state.keySeq=g),R=="handled"&&Gs(A,"keyHandled",A,g,S),(R=="handled"||R=="multi")&&(on(S),gu(A)),!!R}function Eh(A,g){var S=wu(g,!0);return S?g.shiftKey&&!A.state.keySeq?yA(A,"Shift-"+S,g,function(E){return zo(A,E,!0)})||yA(A,S,g,function(E){if(typeof E=="string"?/^go[A-Z]/.test(E):E.motion)return zo(A,E)}):yA(A,S,g,function(E){return zo(A,E)}):!1}function jf(A,g,S){return yA(A,"'"+S+"'",g,function(E){return zo(A,E,!0)})}var Bh=null;function cc(A){var g=this;if(!(A.target&&A.target!=g.display.input.getField())&&(g.curOp.focus=Ne(Yt(g)),!dt(g,A))){f&&y<11&&A.keyCode==27&&(A.returnValue=!1);var S=A.keyCode;g.display.shift=S==16||A.shiftKey;var E=Eh(g,A);U&&(Bh=E?S:null,!E&&S==88&&!ka&&(V?A.metaKey:A.ctrlKey)&&g.replaceSelection("",null,"cut")),i&&!V&&!E&&S==46&&A.shiftKey&&!A.ctrlKey&&document.execCommand&&document.execCommand("cut"),S==18&&!/\bCodeMirror-crosshair\b/.test(g.display.lineDiv.className)&&Ts(g)}}function Ts(A){var g=A.display.lineDiv;we(g,"CodeMirror-crosshair");function S(E){(E.keyCode==18||!E.altKey)&&(me(g,"CodeMirror-crosshair"),rt(document,"keyup",S),rt(document,"mouseover",S))}Fe(document,"keyup",S),Fe(document,"mouseover",S)}function Su(A){A.keyCode==16&&(this.doc.sel.shift=!1),dt(this,A)}function Jd(A){var g=this;if(!(A.target&&A.target!=g.display.input.getField())&&!(EA(g.display,A)||dt(g,A)||A.ctrlKey&&!A.altKey||V&&A.metaKey)){var S=A.keyCode,E=A.charCode;if(U&&S==Bh){Bh=null,on(A);return}if(!(U&&(!A.which||A.which<10)&&Eh(g,A))){var R=String.fromCharCode(E??S);R!="\b"&&(jf(g,A,R)||g.display.input.onKeyPress(A))}}}var af=400,kc=function(A,g,S){this.time=A,this.pos=g,this.button=S};kc.prototype.compare=function(A,g,S){return this.time+af>A&&ur(g,this.pos)==0&&S==this.button};var FA,ll;function xp(A,g){var S=+new Date;return ll&&ll.compare(S,A,g)?(FA=ll=null,"triple"):FA&&FA.compare(S,A,g)?(ll=new kc(S,A,g),FA=null,"double"):(FA=new kc(S,A,g),ll=null,"single")}function Oh(A){var g=this,S=g.display;if(!(dt(g,A)||S.activeTouch&&S.input.supportsTouch())){if(S.input.ensurePolled(),S.shift=A.shiftKey,EA(S,A)){x||(S.scroller.draggable=!1,setTimeout(function(){return S.scroller.draggable=!0},100));return}if(!ed(g,A)){var E=cA(g,A),R=Jn(A),Z=E?xp(E,R):"single";Ft(g).focus(),R==1&&g.state.selectingText&&g.state.selectingText(A),!(E&&lm(g,R,E,Z,A))&&(R==1?E?Ih(g,E,Z,A):Br(A)==S.scroller&&on(A):R==2?(E&&Oc(g.doc,E),setTimeout(function(){return S.input.focus()},20)):R==3&&(fe?g.display.input.onContextMenu(A):qc(g)))}}}function lm(A,g,S,E,R){var Z="Click";return E=="double"?Z="Double"+Z:E=="triple"&&(Z="Triple"+Z),Z=(g==1?"Left":g==2?"Middle":"Right")+Z,yA(A,DA(Z,R),R,function(Ae){if(typeof Ae=="string"&&(Ae=lu[Ae]),!Ae)return!1;var Ce=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),Ce=Ae(A,S)!=pt}finally{A.state.suppressEdits=!1}return Ce})}function Ed(A,g,S){var E=A.getOption("configureMouse"),R=E?E(A,g,S):{};if(R.unit==null){var Z=ne?S.shiftKey&&S.metaKey:S.altKey;R.unit=Z?"rectangle":g=="single"?"char":g=="double"?"word":"line"}return(R.extend==null||A.doc.extend)&&(R.extend=A.doc.extend||S.shiftKey),R.addNew==null&&(R.addNew=V?S.metaKey:S.ctrlKey),R.moveOnDrag==null&&(R.moveOnDrag=!(V?S.altKey:S.ctrlKey)),R}function Ih(A,g,S,E){f?setTimeout(Pt(nc,A),0):A.curOp.focus=Ne(Yt(A));var R=Ed(A,S,E),Z=A.doc.sel,Ae;A.options.dragDrop&&un&&!A.isReadOnly()&&S=="single"&&(Ae=Z.contains(g))>-1&&(ur((Ae=Z.ranges[Ae]).from(),g)<0||g.xRel>0)&&(ur(Ae.to(),g)>0||g.xRel<0)?Mp(A,E,g,R):wp(A,E,g,R)}function Mp(A,g,S,E){var R=A.display,Z=!1,Ae=gi(A,function(je){x&&(R.scroller.draggable=!1),A.state.draggingText=!1,A.state.delayingBlurEvent&&(A.hasFocus()?A.state.delayingBlurEvent=!1:qc(A)),rt(R.wrapper.ownerDocument,"mouseup",Ae),rt(R.wrapper.ownerDocument,"mousemove",Ce),rt(R.scroller,"dragstart",Ie),rt(R.scro
Line truncated
|
||||
`)==g){if(E.ranges.length%vA.text.length==0){je=[];for(var gt=0;gt<vA.text.length;gt++)je.push(Z.splitLines(vA.text[gt]))}}else Ie.length==E.ranges.length&&A.options.pasteLinesPerSelection&&(je=Pn(Ie,function(tr){return[tr]}));for(var Mt=A.curOp.updateInput,Xt=E.ranges.length-1;Xt>=0;Xt--){var Qt=E.ranges[Xt],xn=Qt.from(),Fn=Qt.to();Qt.empty()&&(S&&S>0?xn=fn(xn.line,xn.ch-S):A.state.overwrite&&!Ce?Fn=fn(Fn.line,Math.min(wr(Z,Fn.line).text.length,Fn.ch+dr(Ie).length)):Ce&&vA&&vA.lineWise&&vA.text.join(`
|
||||
`)==Ie.join(`
|
||||
`)&&(xn=Fn=fn(xn.line,0)));var Ar={from:xn,to:Fn,text:je?je[Xt%je.length]:Ie,origin:R||(Ce?"paste":A.state.cutIncoming>Ae?"cut":"+input")};I(A.doc,Ar),Gs(A,"inputRead",A,Ar)}g&&!Ce&&df(A,g),ms(A),A.curOp.updateInput<2&&(A.curOp.updateInput=Mt),A.curOp.typing=!0,A.state.pasteIncoming=A.state.cutIncoming=-1}function dc(A,g){var S=A.clipboardData&&A.clipboardData.getData("Text");if(S)return A.preventDefault(),!g.isReadOnly()&&!g.options.disableInput&&g.hasFocus()&&_s(g,function(){return Sp(g,S,0,null,"paste")}),!0}function df(A,g){if(!(!A.options.electricChars||!A.options.smartIndent))for(var S=A.doc.sel,E=S.ranges.length-1;E>=0;E--){var R=S.ranges[E];if(!(R.head.ch>100||E&&S.ranges[E-1].head.line==R.head.line)){var Z=A.getModeAt(R.head),Ae=!1;if(Z.electricChars){for(var Ce=0;Ce<Z.electricChars.length;Ce++)if(g.indexOf(Z.electricChars.charAt(Ce))>-1){Ae=Bl(A,R.head.line,"smart");break}}else Z.electricInput&&Z.electricInput.test(wr(A.doc,R.head.line).text.slice(0,R.head.ch))&&(Ae=Bl(A,R.head.line,"smart"));Ae&&Gs(A,"electricInput",A,R.head.line)}}}function hf(A){for(var g=[],S=[],E=0;E<A.doc.sel.ranges.length;E++){var R=A.doc.sel.ranges[E].head.line,Z={anchor:fn(R,0),head:fn(R+1,0)};S.push(Z),g.push(A.getRange(Z.anchor,Z.head))}return{text:g,ranges:S}}function ff(A,g,S,E){A.setAttribute("autocorrect",S?"on":"off"),A.setAttribute("autocapitalize",E?"on":"off"),A.setAttribute("spellcheck",!!g)}function kh(){var A=xe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),g=xe("div",[A],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return x?A.style.width="1000px":A.setAttribute("wrap","off"),H&&(A.style.border="1px solid black"),g}function Tc(A){var g=A.optionHandlers,S=A.helpers={};A.prototype={constructor:A,focus:function(){Ft(this).focus(),this.display.input.focus()},setOption:function(E,R){var Z=this.options,Ae=Z[E];Z[E]==R&&E!="mode"||(Z[E]=R,g.hasOwnProperty(E)&&gi(this,g[E])(this,R,Ae),ct(this,"optionChange",this,E))},getOption:function(E){return this.options[E]},getDoc:function(){return this.doc},addKeyMap:function(E,R){this.state.keyMaps[R?"push":"unshift"](_l(E))},removeKeyMap:function(E){for(var R=this.state.keyMaps,Z=0;Z<R.length;++Z)if(R[Z]==E||R[Z].name==E)return R.splice(Z,1),!0},addOverlay:Gr(function(E,R){var Z=E.token?E:A.getMode(this.options,E);if(Z.startState)throw new Error("Overlays may not be stateful.");pn(this.state.overlays,{mode:Z,modeSpec:E,opaque:R&&R.opaque,priority:R&&R.priority||0},function(Ae){return Ae.priority}),this.state.modeGen++,Ll(this)}),removeOverlay:Gr(function(E){for(var R=this.state.overlays,Z=0;Z<R.length;++Z){var Ae=R[Z].modeSpec;if(Ae==E||typeof E=="string"&&Ae.name==E){R.splice(Z,1),this.state.modeGen++,Ll(this);return}}}),indentLine:Gr(function(E,R,Z){typeof R!="string"&&typeof R!="number"&&(R==null?R=this.options.smartIndent?"smart":"prev":R=R?"add":"subtract"),Cn(this.doc,E)&&Bl(this,E,R,Z)}),indentSelection:Gr(function(E){for(var R=this.doc.sel.ranges,Z=-1,Ae=0;Ae<R.length;Ae++){var Ce=R[Ae];if(Ce.empty())Ce.head.line>Z&&(Bl(this,Ce.head.line,E,!0),Z=Ce.head.line,Ae==this.doc.sel.primIndex&&ms(this));else{var Ie=Ce.from(),je=Ce.to(),gt=Math.max(Z,Ie.line);Z=Math.min(this.lastLine(),je.line-(je.ch?0:1))+1;for(var Mt=gt;Mt<Z;++Mt)Bl(this,Mt,E);var Xt=this.doc.sel.ranges;Ie.ch==0&&R.length==Xt.length&&Xt[Ae].from().ch>0&&Cl(this.doc,Ae,new So(Ie,Xt[Ae].to()),Lt)}}}),getTokenAt:function(E,R){return Es(this,E,R)},getLineTokens:function(E,R){return Es(this,fn(E),R,!0)},getTokenTypeAt:function(E){E=ii(this.doc,E);var R=Ja(this,wr(this.doc,E.line)),Z=0,Ae=(R.length-1)/2,Ce=E.ch,Ie;if(Ce==0)Ie=R[2];else for(;;){var je=Z+Ae>>1;if((je?R[je*2-1]:0)>=Ce)Ae=je;else if(R[je*2+1]<Ce)Z=je+1;else{Ie=R[je*2+2];break}}var gt=Ie?Ie.indexOf("overlay "):-1;return gt<0?Ie:gt==0?null:Ie.slice(0,gt-1)},getModeAt:function(E){var R=this.doc.mode;return R.innerMode?A.innerMode(R,this.getTokenAt(E).state).mode:R},getHelper:function(E,R){return this.getHelpers(E,R)[0]},getHelpers:function(E,R){var Z=[];if(!S.hasOwnProperty(R))return Z;var Ae=S[R],Ce=this.getModeAt(E);if(typeof Ce[R]=="string")Ae[Ce[R]]&&Z.push(Ae[Ce[R]]);else if(Ce[R])for(var Ie=0;Ie<Ce[R].length;Ie++){var je=Ae[Ce[R][Ie]];je&&Z.push(je)}else Ce.helperType&&Ae[Ce.helperType]?Z.push(Ae[Ce.helperType]):Ae[Ce.name]&&Z.push(Ae[Ce.name]);for(var gt=0;gt<Ae._global.length;gt++){var Mt=Ae._global[gt];Mt.pred(Ce,this)&&it(Z,Mt.val)==-1&&Z.push(Mt.val)}return Z},getStateAfter:function(E,R){var Z=this.doc;return E=eu(Z,E??Z.first+Z.size-1),oi(this,E+1,R).state},cursorCoords:function(E,R){var Z,Ae=this.doc.sel.primary();return E==null?Z=Ae.head:typeof E=="object"?Z=ii(this.doc,E):Z=E?Ae.from():Ae.to(),an(this,Z,R||"page")},charCoords:function(E,R){return In(this,ii(this.doc,E),R||"page")},coordsChar:function(E,R){return E=Jt(this,E,R||"page"),Po(this,E.left,E.top)},lineAtHeight:function(E,R){return E=Jt(this,{top:E,left:0},R||"page").top,xt(t
Line truncated
|
||||
`,Ar=Ge(Fn,Qt)?"w":Xt&&Fn==`
|
||||
`?"n":!Xt||/\s/.test(Fn)?null:"p";if(Xt&&!xn&&!Ar&&(Ar="s"),Mt&&Mt!=Ar){S<0&&(S=1,gt(),g.sticky="after");break}if(Ar&&(Mt=Ar),S>0&&!gt(!xn))break}var tr=Ac(A,g,Z,Ae,!0);return Di(Z,tr)&&(tr.hitSide=!0),tr}function Th(A,g,S,E){var R=A.doc,Z=g.left,Ae;if(E=="page"){var Ce=Math.min(A.display.wrapper.clientHeight,Ft(A).innerHeight||R(A).documentElement.clientHeight),Ie=Math.max(Ce-.5*Ka(A.display),3);Ae=(S>0?g.bottom:g.top)+S*Ie}else E=="line"&&(Ae=S>0?g.bottom+3:g.top-3);for(var je;je=Po(A,Z,Ae),!!je.outside;){if(S<0?Ae<=0:Ae>=R.height){je.hitSide=!0;break}Ae+=S*5}return je}var bo=function(A){this.cm=A,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};bo.prototype.init=function(A){var g=this,S=this,E=S.cm,R=S.div=A.lineDiv;R.contentEditable=!0,ff(R,E.options.spellcheck,E.options.autocorrect,E.options.autocapitalize);function Z(Ce){for(var Ie=Ce.target;Ie;Ie=Ie.parentNode){if(Ie==R)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ie.className))break}return!1}Fe(R,"paste",function(Ce){!Z(Ce)||dt(E,Ce)||dc(Ce,E)||y<=11&&setTimeout(gi(E,function(){return g.updateFromDOM()}),20)}),Fe(R,"compositionstart",function(Ce){g.composing={data:Ce.data,done:!1}}),Fe(R,"compositionupdate",function(Ce){g.composing||(g.composing={data:Ce.data,done:!1})}),Fe(R,"compositionend",function(Ce){g.composing&&(Ce.data!=g.composing.data&&g.readFromDOMSoon(),g.composing.done=!0)}),Fe(R,"touchstart",function(){return S.forceCompositionEnd()}),Fe(R,"input",function(){g.composing||g.readFromDOMSoon()});function Ae(Ce){if(!(!Z(Ce)||dt(E,Ce))){if(E.somethingSelected())th({lineWise:!1,text:E.getSelections()}),Ce.type=="cut"&&E.replaceSelection("",null,"cut");else if(E.options.lineWiseCopyCut){var Ie=hf(E);th({lineWise:!0,text:Ie.text}),Ce.type=="cut"&&E.operation(function(){E.setSelections(Ie.ranges,0,Lt),E.replaceSelection("",null,"cut")})}else return;if(Ce.clipboardData){Ce.clipboardData.clearData();var je=vA.text.join(`
|
||||
`);if(Ce.clipboardData.setData("Text",je),Ce.clipboardData.getData("Text")==je){Ce.preventDefault();return}}var gt=kh(),Mt=gt.firstChild;ff(Mt),E.display.lineSpace.insertBefore(gt,E.display.lineSpace.firstChild),Mt.value=vA.text.join(`
|
||||
`);var Xt=Ne(yt(R));He(Mt),setTimeout(function(){E.display.lineSpace.removeChild(gt),Xt.focus(),Xt==R&&S.showPrimarySelection()},50)}}Fe(R,"copy",Ae),Fe(R,"cut",Ae)},bo.prototype.screenReaderLabelChanged=function(A){A?this.div.setAttribute("aria-label",A):this.div.removeAttribute("aria-label")},bo.prototype.prepareSelection=function(){var A=Gc(this.cm,!1);return A.focus=Ne(yt(this.div))==this.div,A},bo.prototype.showSelection=function(A,g){!A||!this.cm.display.view.length||((A.focus||g)&&this.showPrimarySelection(),this.showMultipleSelections(A))},bo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},bo.prototype.showPrimarySelection=function(){var A=this.getSelection(),g=this.cm,S=g.doc.sel.primary(),E=S.from(),R=S.to();if(g.display.viewTo==g.display.viewFrom||E.line>=g.display.viewTo||R.line<g.display.viewFrom){A.removeAllRanges();return}var Z=bl(g,A.anchorNode,A.anchorOffset),Ae=bl(g,A.focusNode,A.focusOffset);if(!(Z&&!Z.bad&&Ae&&!Ae.bad&&ur(ua(Z,Ae),E)==0&&ur(rs(Z,Ae),R)==0)){var Ce=g.display.view,Ie=E.line>=g.display.viewFrom&&UA(g,E)||{node:Ce[0].measure.map[2],offset:0},je=R.line<g.display.viewTo&&UA(g,R);if(!je){var gt=Ce[Ce.length-1].measure,Mt=gt.maps?gt.maps[gt.maps.length-1]:gt.map;je={node:Mt[Mt.length-1],offset:Mt[Mt.length-2]-Mt[Mt.length-3]}}if(!Ie||!je){A.removeAllRanges();return}var Xt=A.rangeCount&&A.getRangeAt(0),Qt;try{Qt=Ze(Ie.node,Ie.offset,je.offset,je.node)}catch{}Qt&&(!i&&g.state.focused?(A.collapse(Ie.node,Ie.offset),Qt.collapsed||(A.removeAllRanges(),A.addRange(Qt))):(A.removeAllRanges(),A.addRange(Qt)),Xt&&A.anchorNode==null?A.addRange(Xt):i&&this.startGracePeriod()),this.rememberSelection()}},bo.prototype.startGracePeriod=function(){var A=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){A.gracePeriod=!1,A.selectionChanged()&&A.cm.operation(function(){return A.cm.curOp.selectionChanged=!0})},20)},bo.prototype.showMultipleSelections=function(A){Ke(this.cm.display.cursorDiv,A.cursors),Ke(this.cm.display.selectionDiv,A.selection)},bo.prototype.rememberSelection=function(){var A=this.getSelection();this.lastAnchorNode=A.anchorNode,this.lastAnchorOffset=A.anchorOffset,this.lastFocusNode=A.focusNode,this.lastFocusOffset=A.focusOffset},bo.prototype.selectionInEditor=function(){var A=this.getSelection();if(!A.rangeCount)return!1;var g=A.getRangeAt(0).commonAncestorContainer;return Je(this.div,g)},bo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Ne(yt(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},bo.prototype.blur=function(){this.div.blur()},bo.prototype.getField=function(){return this.div},bo.prototype.supportsTouch=function(){return!0},bo.prototype.receivedFocus=function(){var A=this,g=this;this.selectionInEditor()?setTimeout(function(){return A.pollSelection()},20):_s(this.cm,function(){return g.cm.curOp.selectionChanged=!0});function S(){g.cm.state.focused&&(g.pollSelection(),g.polling.set(g.cm.options.pollInterval,S))}this.polling.set(this.cm.options.pollInterval,S)},bo.prototype.selectionChanged=function(){var A=this.getSelection();return A.anchorNode!=this.lastAnchorNode||A.anchorOffset!=this.lastAnchorOffset||A.focusNode!=this.lastFocusNode||A.focusOffset!=this.lastFocusOffset},bo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var A=this.getSelection(),g=this.cm;if(se&&O&&this.cm.display.gutterSpecs.length&&Ep(A.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var S=bl(g,A.anchorNode,A.anchorOffset),E=bl(g,A.focusNode,A.focusOffset);S&&E&&_s(g,function(){ha(g.doc,Ma(S,E),Lt),(S.bad||E.bad)&&(g.curOp.selectionChanged=!0)})}}},bo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var A=this.cm,g=A.display,S=A.doc.sel.primary(),E=S.from(),R=S.to();if(E.ch==0&&E.line>A.firstLine()&&(E=fn(E.line-1,wr(A.doc,E.line-1).length)),R.ch==wr(A.doc,R.line).text.length&&R.line<A.lastLine()&&(R=fn(R.line+1,0)),E.line<g.viewFrom||R.line>g.viewTo-1)return!1;var Z,Ae,Ce;E.line==g.viewFrom||(Z=Fl(A,E.line))==0?(Ae=Ye(g.view[0].line),Ce=g.view[0].node):(Ae=Ye(g.view[Z].line),Ce=g.view[Z-1].node.nextSibling);var Ie=Fl(A,R.line),je,gt;if(Ie==g.view.length-1?(je=g.viewTo-1,gt=g.lineDiv.lastChild):(je=Ye(g.view[Ie+1].line)-1,gt=g.view[Ie+1].node.previousSibling),!Ce)return!1;for(var Mt=A.doc.splitLines(Ym(A,Ce,gt,Ae,je)),Xt=Ta(A.doc,fn(Ae,0),fn(je,wr(A.doc,je).text.length));Mt.length>1&&Xt.length>1;)if(dr(Mt)==dr(Xt))Mt.pop(),Xt.pop(),je--;else if(Mt[0]==Xt[0])Mt.shift(),Xt.shift(),Ae++;else break;for(var Qt=0,xn=0,Fn=Mt[0],Ar=Xt[0],tr=Math.min(Fn.length,Ar.length);Qt<tr&&Fn.charCodeAt(Qt)==Ar.charCodeAt(Qt);)++Qt;for(var gr=dr(Mt),yr=dr(Xt),Rr=Math.min(gr.length-(Mt.length==1?Qt:0),yr.length-(Xt.
Line truncated
|
||||
`),He(R))}else return;Ae.type=="cut"&&(E.state.cutIncoming=+new Date)}}Fe(R,"cut",Z),Fe(R,"copy",Z),Fe(A.scroller,"paste",function(Ae){if(!(EA(A,Ae)||dt(E,Ae))){if(!R.dispatchEvent){E.state.pasteIncoming=+new Date,S.focus();return}var Ce=new Event("paste");Ce.clipboardData=Ae.clipboardData,R.dispatchEvent(Ce)}}),Fe(A.lineSpace,"selectstart",function(Ae){EA(A,Ae)||on(Ae)}),Fe(R,"compositionstart",function(){var Ae=E.getCursor("from");S.composing&&S.composing.range.clear(),S.composing={start:Ae,range:E.markText(Ae,E.getCursor("to"),{className:"CodeMirror-composing"})}}),Fe(R,"compositionend",function(){S.composing&&(S.poll(),S.composing.range.clear(),S.composing=null)})},Ea.prototype.createField=function(A){this.wrapper=kh(),this.textarea=this.wrapper.firstChild;var g=this.cm.options;ff(this.textarea,g.spellcheck,g.autocorrect,g.autocapitalize)},Ea.prototype.screenReaderLabelChanged=function(A){A?this.textarea.setAttribute("aria-label",A):this.textarea.removeAttribute("aria-label")},Ea.prototype.prepareSelection=function(){var A=this.cm,g=A.display,S=A.doc,E=Gc(A);if(A.options.moveInputWithCursor){var R=an(A,S.sel.primary().head,"div"),Z=g.wrapper.getBoundingClientRect(),Ae=g.lineDiv.getBoundingClientRect();E.teTop=Math.max(0,Math.min(g.wrapper.clientHeight-10,R.top+Ae.top-Z.top)),E.teLeft=Math.max(0,Math.min(g.wrapper.clientWidth-10,R.left+Ae.left-Z.left))}return E},Ea.prototype.showSelection=function(A){var g=this.cm,S=g.display;Ke(S.cursorDiv,A.cursors),Ke(S.selectionDiv,A.selection),A.teTop!=null&&(this.wrapper.style.top=A.teTop+"px",this.wrapper.style.left=A.teLeft+"px")},Ea.prototype.reset=function(A){if(!(this.contextMenuPending||this.composing&&A)){var g=this.cm;if(this.resetting=!0,g.somethingSelected()){this.prevInput="";var S=g.getSelection();this.textarea.value=S,g.state.focused&&He(this.textarea),f&&y>=9&&(this.hasSelection=S)}else A||(this.prevInput=this.textarea.value="",f&&y>=9&&(this.hasSelection=null));this.resetting=!1}},Ea.prototype.getField=function(){return this.textarea},Ea.prototype.supportsTouch=function(){return!1},Ea.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!re||Ne(yt(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},Ea.prototype.blur=function(){this.textarea.blur()},Ea.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ea.prototype.receivedFocus=function(){this.slowPoll()},Ea.prototype.slowPoll=function(){var A=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){A.poll(),A.cm.state.focused&&A.slowPoll()})},Ea.prototype.fastPoll=function(){var A=!1,g=this;g.pollingFast=!0;function S(){var E=g.poll();!E&&!A?(A=!0,g.polling.set(60,S)):(g.pollingFast=!1,g.slowPoll())}g.polling.set(20,S)},Ea.prototype.poll=function(){var A=this,g=this.cm,S=this.textarea,E=this.prevInput;if(this.contextMenuPending||this.resetting||!g.state.focused||Or(S)&&!E&&!this.composing||g.isReadOnly()||g.options.disableInput||g.state.keySeq)return!1;var R=S.value;if(R==E&&!g.somethingSelected())return!1;if(f&&y>=9&&this.hasSelection===R||V&&/[\uf700-\uf7ff]/.test(R))return g.display.input.reset(),!1;if(g.doc.sel==g.display.selForContextMenu){var Z=R.charCodeAt(0);if(Z==8203&&!E&&(E=""),Z==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ae=0,Ce=Math.min(E.length,R.length);Ae<Ce&&E.charCodeAt(Ae)==R.charCodeAt(Ae);)++Ae;return _s(g,function(){Sp(g,R.slice(Ae),E.length-Ae,null,A.composing?"*compose":null),R.length>1e3||R.indexOf(`
|
||||
`)>-1?S.value=A.prevInput="":A.prevInput=R,A.composing&&(A.composing.range.clear(),A.composing.range=g.markText(A.composing.start,g.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ea.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ea.prototype.onKeyPress=function(){f&&y>=9&&(this.hasSelection=null),this.fastPoll()},Ea.prototype.onContextMenu=function(A){var g=this,S=g.cm,E=S.display,R=g.textarea;g.contextMenuPending&&g.contextMenuPending();var Z=cA(S,A),Ae=E.scroller.scrollTop;if(!Z||U)return;var Ce=S.options.resetSelectionOnContextMenu;Ce&&S.doc.sel.contains(Z)==-1&&gi(S,ha)(S.doc,Ma(Z),Lt);var Ie=R.style.cssText,je=g.wrapper.style.cssText,gt=g.wrapper.offsetParent.getBoundingClientRect();g.wrapper.style.cssText="position: static",R.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||||
top: `+(A.clientY-gt.top-5)+"px; left: "+(A.clientX-gt.left-5)+`px;
|
||||
z-index: 1000; background: `+(f?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Mt;x&&(Mt=R.ownerDocument.defaultView.scrollY),E.input.focus(),x&&R.ownerDocument.defaultView.scrollTo(null,Mt),E.input.reset(),S.somethingSelected()||(R.value=g.prevInput=" "),g.contextMenuPending=Qt,E.selForContextMenu=S.doc.sel,clearTimeout(E.detectingSelectAll);function Xt(){if(R.selectionStart!=null){var Fn=S.somethingSelected(),Ar=""+(Fn?R.value:"");R.value="⇚",R.value=Ar,g.prevInput=Fn?"":"",R.selectionStart=1,R.selectionEnd=Ar.length,E.selForContextMenu=S.doc.sel}}function Qt(){if(g.contextMenuPending==Qt&&(g.contextMenuPending=!1,g.wrapper.style.cssText=je,R.style.cssText=Ie,f&&y<9&&E.scrollbars.setScrollTop(E.scroller.scrollTop=Ae),R.selectionStart!=null)){(!f||f&&y<9)&&Xt();var Fn=0,Ar=function(){E.selForContextMenu==S.doc.sel&&R.selectionStart==0&&R.selectionEnd>0&&g.prevInput==""?gi(S,jl)(S):Fn++<10?E.detectingSelectAll=setTimeout(Ar,500):(E.selForContextMenu=null,E.input.reset())};E.detectingSelectAll=setTimeout(Ar,200)}}if(f&&y>=9&&Xt(),fe){rr(A);var xn=function(){rt(window,"mouseup",xn),setTimeout(Qt,20)};Fe(window,"mouseup",xn)}else setTimeout(Qt,50)},Ea.prototype.readOnlyChanged=function(A){A||this.reset(),this.textarea.disabled=A=="nocursor",this.textarea.readOnly=!!A},Ea.prototype.setUneditable=function(){},Ea.prototype.needsContentAttribute=!1;function cm(A,g){if(g=g?Ue(g):{},g.value=A.value,!g.tabindex&&A.tabIndex&&(g.tabindex=A.tabIndex),!g.placeholder&&A.placeholder&&(g.placeholder=A.placeholder),g.autofocus==null){var S=Ne(yt(A));g.autofocus=S==A||A.getAttribute("autofocus")!=null&&S==document.body}function E(){A.value=Ce.getValue()}var R;if(A.form&&(Fe(A.form,"submit",E),!g.leaveSubmitMethodAlone)){var Z=A.form;R=Z.submit;try{var Ae=Z.submit=function(){E(),Z.submit=R,Z.submit(),Z.submit=Ae}}catch{}}g.finishInit=function(Ie){Ie.save=E,Ie.getTextArea=function(){return A},Ie.toTextArea=function(){Ie.toTextArea=isNaN,E(),A.parentNode.removeChild(Ie.getWrapperElement()),A.style.display="",A.form&&(rt(A.form,"submit",E),!g.leaveSubmitMethodAlone&&typeof A.form.submit=="function"&&(A.form.submit=R))}},A.style.display="none";var Ce=Ho(function(Ie){return A.parentNode.insertBefore(Ie,A.nextSibling)},g);return Ce}function Ph(A){A.off=rt,A.on=Fe,A.wheelEventPixels=lc,A.Doc=Zt,A.splitLines=ri,A.countColumn=Pe,A.findColumn=vn,A.isWordChar=Zn,A.Pass=pt,A.signal=ct,A.Line=Pa,A.changeEnd=Ra,A.scrollbarModel=$c,A.Pos=fn,A.cmpPos=ur,A.modes=eo,A.mimeModes=ws,A.resolveMode=Sl,A.getMode=Go,A.modeExtensions=Za,A.extendMode=Xa,A.copyState=Yi,A.startState=Jl,A.innerMode=Lu,A.commands=lu,A.keyMap=po,A.keyName=wu,A.isModifierKey=wa,A.lookupKey=es,A.normalizeKeyMap=ss,A.StringStream=wo,A.SharedTextMarker=Et,A.TextMarker=ft,A.LineWidget=$e,A.e_preventDefault=on,A.e_stopPropagation=jt,A.e_stop=rr,A.addClass=we,A.contains=Je,A.rmClass=me,A.keyNames=ki}Nl(Ho),Tc(Ho);var uu="iter insert remove copy getEditor constructor".split(" ");for(var Gf in Zt.prototype)Zt.prototype.hasOwnProperty(Gf)&&it(uu,Gf)<0&&(Ho.prototype[Gf]=function(A){return function(){return A.apply(this.doc,arguments)}}(Zt.prototype[Gf]));return zt(Zt),Ho.inputStyles={textarea:Ea,contenteditable:bo},Ho.defineMode=function(A){!Ho.defaults.mode&&A!="null"&&(Ho.defaults.mode=A),ko.apply(this,arguments)},Ho.defineMIME=Hi,Ho.defineMode("null",function(){return{token:function(A){return A.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(A,g){Ho.prototype[A]=g},Ho.defineDocExtension=function(A,g){Zt.prototype[A]=g},Ho.fromTextArea=cm,Ph(Ho),Ho.version="5.65.18",Ho})}(Ob)),Ob.exports}var noe=jx();const cp=fl(noe);var W9={exports:{}},G9;function roe(){return G9||(G9=1,function(n,e){(function(t){t(jx())})(function(t){t.defineMode("javascript",function(r,i){var s=r.indentUnit,l=i.statementIndent,o=i.jsonld,f=i.json||o,y=i.trackScope!==!1,x=i.typescript,B=i.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function Ye(vo){return{type:vo,style:"keyword"}}var xt=Ye("keyword a"),Cn=Ye("keyword b"),Qn=Ye("keyword c"),fn=Ye("keyword d"),ur=Ye("operator"),Di={type:"atom",style:"atom"};return{if:Ye("if"),while:xt,with:xt,else:Cn,do:Cn,try:Cn,finally:Cn,return:fn,break:fn,continue:fn,new:Ye("new"),delete:Qn,void:Qn,throw:Qn,debugger:Ye("debugger"),var:Ye("var"),const:Ye("var"),let:Ye("var"),function:Ye("function"),catch:Ye("catch"),for:Ye("for"),switch:Ye("switch"),case:Ye("case"),default:Ye("default"),in:ur,typeof:ur,instanceof:ur,true:Di,false:Di,null:Di,undefined:Di,NaN:Di,Infinity:Di,this:Ye("this"),class:Ye("class"),super:Ye("atom"),yield:Qn,export:Ye("export"),import:Ye("import"),extends:Qn,await:Qn}}(),P=/[+\-*&%=<>!?|~^@]/,U=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function j(Ye){for(var xt=!1,Cn,Qn=!1;(Cn=Ye.next())!=null;){if(!xt){if(Cn=="/"&&!Qn)return;Cn=="["?Qn=!0:Qn&&Cn=="]"&&(Qn=!1)}xt=!xt&&Cn=="\\"}}var N,Y;function H(Ye,xt,Cn){return N=Ye,Y=Cn,xt}fun
Line truncated
|
||||
${B}`),j].join(`
|
||||
${o}`)}return y}(n,"",0)}var Pv={exports:{}},aoe=Pv.exports,$9;function loe(){return $9||($9=1,function(n,e){(function(t,r){r(e)})(aoe,function(t){const r={isWhiteSpace:function(we){return we===" "||we===" "||we==="\uFEFF"||we>=" "&&we<="\r"||we===" "||we>=" "&&we<=" "||we==="\u2028"||we==="\u2029"||we===" "||we===" "||we===" "},isWhiteSpaceJSON:function(we){return we===" "||we===" "||we===`
|
||||
`||we==="\r"},isLineTerminator:function(we){return we===`
|
||||
`||we==="\r"||we==="\u2028"||we==="\u2029"},isLineTerminatorJSON:function(we){return we===`
|
||||
`||we==="\r"},isIdentifierStart:function(we){return we==="$"||we==="_"||we>="A"&&we<="Z"||we>="a"&&we<="z"||we>=""&&r.NonAsciiIdentifierStart.test(we)},isIdentifierPart:function(we){return we==="$"||we==="_"||we>="A"&&we<="Z"||we>="a"&&we<="z"||we>="0"&&we<="9"||we>=""&&r.NonAsciiIdentifierPart.test(we)},NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\uLine truncated
|
||||
`,r:"\r",t:" ",v:"\v","/":"/"},y=Object.hasOwn,x={};function B(Ne,we){(typeof Ne!="string"||!(Ne instanceof String))&&(Ne=String(Ne));const De=we.mode==="json5",He=we.ignoreBOM,bt=we.ignoreComments||we.mode==="cjson"||De,Yt=we.ignoreTrailingCommas||De,yt=we.ignoreProtoKey,Ft=we.ignorePrototypeKeys,Pt=we.allowSingleQuotedStrings||De,Ue=we.allowDuplicateObjectKeys,Pe=we.reviver,Be=we.tokenize,it=we.rawTokens,_t=we.tokenLocations,pt=we.tokenPaths,Lt=De?r.isLineTerminator:r.isLineTerminatorJSON,nn=De?r.isWhiteSpace:r.isWhiteSpaceJSON,Kt=Ne.length;let vn=0,Gn=0,tn=0;const dr=[];let Pn,pn,$n;if(Be){let Qe=null,rt,ct;Pn=function(){if(Qe!==null)throw Error("internal error, token overlap");rt=vn+1,ct=tn-Gn+1,Qe=tn},pn=function(dt,qt){if(Qe!==tn){const Gt={type:dt};it&&(Gt.raw=Ne.substr(Qe,tn-Qe)),qt!==void 0&&(Gt.value=qt),_t&&(Gt.location={start:{column:ct,line:rt,offset:Qe}}),pt&&(Gt.path=$n.slice()),dr.push(Gt)}return Qe=null,qt},pt&&($n=[])}function lr(){let Qe;return tn<Kt?Qe=`Unexpected token ${JSON.stringify(Ne[tn])}`:Qe="Unexpected end of input",Qe}function vr(Qe){const rt=tn-Gn+1;++vn;const ct=Ee(Qe,Ne,tn,vn,rt),dt=SyntaxError(ct.message);return dt.reason=Qe,dt.excerpt=ct.excerpt,dt.pointer=ct.pointer,dt.location={start:{column:rt,line:vn,offset:tn}},dt}function Zn(Qe){throw Qe||(Qe=lr()),vr(Qe)}function Ge(Qe){Qe==="\r"&&Ne[tn]===`
|
||||
`&&++tn,Gn=tn,++vn}function ce(){if(tn<Kt){Pn==null||Pn();const Qe=Ne[tn++];if(Qe==='"'||Qe==="'"&&Pt){const rt=p(Qe);return pn==null||pn("literal",rt),rt}if(Qe==="{")return pn==null||pn("symbol","{"),Hn();if(Qe==="[")return pn==null||pn("symbol","["),Ve();if(Qe==="-"||Qe==="."||l(Qe)||De&&(Qe==="+"||Qe==="I"||Qe==="N")){const rt=J();return pn==null||pn("literal",rt),rt}if(Qe==="n")return sn("null"),pn==null||pn("literal",null),null;if(Qe==="t")return sn("true"),pn==null||pn("literal",!0),!0;if(Qe==="f")return sn("false"),pn==null||pn("literal",!1),!1;--tn,pn==null||pn();return}}function pe(){let Qe;if(tn<Kt){Pn==null||Pn();const rt=Ne[tn++];if(rt==='"'||rt==="'"&&Pt){const ct=p(rt);return pn==null||pn("literal",ct),ct}if(rt==="{")return pn==null||pn("symbol","{"),Hn();if(rt==="[")return pn==null||pn("symbol","["),Ve();if(rt==="."||l(rt)){const ct=J();return pn==null||pn("literal",ct),ct}if(De&&r.isIdentifierStart(rt)||rt==="\\"&&Ne[tn]==="u"){const ct=tn-1;if(Qe=ve(),Qe===void 0){tn=ct,pn==null||pn();return}return pn==null||pn("literal",Qe),Qe}--tn,pn==null||pn();return}}function nt(){o(Ne)&&(Pn==null||Pn(),++tn,pn==null||pn("bom"))}function wt(){let Qe;function rt(){Qe||(Qe=!0,--tn,Pn(),++tn)}function ct(){Qe&&(Qe=!1,pn("whitespace"))}for(;tn<Kt;){const dt=Ne[tn++];if(Lt(dt))Pn&&rt(),Ge(dt);else if(nn(dt))Pn&&rt();else if(dt==="/"&&bt&&(Ne[tn]==="/"||Ne[tn]==="*"))Pn&&(--tn,ct(),Pn(),++tn),Ht(Ne[tn++]==="*"),pn==null||pn("comment");else{--tn;break}}pn&&ct()}function Ht(Qe){for(;tn<Kt;){const rt=Ne[tn++];if(Lt(rt)){if(!Qe){--tn;return}Ge(rt)}else if(rt==="*"&&Qe&&Ne[tn]==="/"){++tn;return}}Qe&&Zn("Unclosed multiline comment")}function sn(Qe){const rt=tn;for(let ct=1,dt=Qe.length;ct<dt;++ct)(tn>=Kt||Qe[ct]!==Ne[tn])&&(tn=rt-1,Zn()),++tn}function Hn(){let Qe={},rt=!1;for(;tn<Kt;){wt();const ct=pe();Ue===!1&&y(Qe,ct)&&Zn(`Duplicate key: "${ct}"`),wt(),Pn==null||Pn();let dt=Ne[tn++];if(pn==null||pn("symbol",dt),dt==="}"&&ct===void 0)return!Yt&&rt&&(--tn,Zn("Trailing comma in object")),Qe;if(dt===":"&&ct!==void 0){wt(),$n==null||$n.push(ct);let qt=ce();if($n==null||$n.pop(),qt===void 0&&Zn(`No value found for key "${ct}"`),typeof ct!="string"&&(!De||typeof ct!="number")&&Zn(`Wrong key type: "${ct}"`),Ft&&(ct in x||x[ct]!=null)||yt&&ct==="__proto__"||(Pe&&(qt=Pe(ct,qt)),qt!==void 0&&(rt=!0,ct==="__proto__"?Qe=Object.assign(JSON.parse(`{"__proto__":${JSON.stringify(qt)}}`),Qe):Qe[ct]=qt)),wt(),Pn==null||Pn(),dt=Ne[tn++],pn==null||pn("symbol",dt),dt!==","){if(dt==="}")return Qe;Zn()}}else--tn,Zn()}Zn()}function Ve(){const Qe=[];for(;tn<Kt;){wt(),$n==null||$n.push(Qe.length);let rt=ce();$n==null||$n.pop(),wt(),Pn==null||Pn();const ct=Ne[tn++];if(pn==null||pn("symbol",ct),rt!==void 0&&(Pe&&(rt=Pe(String(Qe.length),rt)),rt===void 0?(++Qe.length,rt=!0):Qe.push(rt)),ct===",")rt===void 0&&Zn("Elisions are not supported");else{if(ct==="]")return!Yt&&rt===void 0&&Qe.length&&(--tn,Zn("Trailing comma in array")),Qe;--tn,Zn()}}}function J(){--tn;let Qe=tn,rt=Ne[tn++];const ct=function(dt){const qt=Ne.substr(Qe,tn-Qe);let Gt;if(dt?Gt=Number.parseInt(qt.replace(/^0o?/,""),8):Gt=Number(qt),Number.isNaN(Gt))--tn,Zn(`Bad numeric literal - "${Ne.substr(Qe,tn-Qe+1)}"`);else if(!De&&!qt.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i))--tn,Zn(`Non-json numeric literal - "${Ne.substr(Qe,tn-Qe+1)}"`);else return Gt};if((rt==="-"||rt==="+"&&De)&&(rt=Ne[tn++]),rt==="N"&&De)return sn("NaN"),Number.NaN;if(rt==="I"&&De)return sn("Infinity"),ct();if(rt>="1"&&rt<="9"){for(;tn<Kt&&l(Ne[tn]);)++tn;rt=Ne[tn++]}if(rt==="0"){rt=Ne[tn++];const dt=rt==="o"||rt==="O"||s(rt),qt=rt==="x"||rt==="X";if(De&&(dt||qt)){for(;tn<Kt&&(qt?i:s)(Ne[tn]);)++tn;let Gt=1;return Ne[Qe]==="-"?(Gt=-1,++Qe):Ne[Qe]==="+"&&++Qe,Gt*ct(dt)}}if(rt==="."){for(;tn<Kt&&l(Ne[tn]);)++tn;rt=Ne[tn++]}if(rt==="e"||rt==="E"){for(rt=Ne[tn++],(rt==="-"||rt==="+")&&++tn;tn<Kt&&l(Ne[tn]);)++tn;rt=Ne[tn++]}return--tn,ct()}function ve(){--tn;let Qe="";for(;tn<Kt;){let rt=Ne[tn++];if(rt==="\\"&&Ne[tn]==="u"&&i(Ne[tn+1])&&i(Ne[tn+2])&&i(Ne[tn+3])&&i(Ne[tn+4])&&(rt=String.fromCharCode(Number.parseInt(Ne.substr(tn+1,4),16)),tn+=5),Qe.length)if(r.isIdentifierPart(rt))Qe+=rt;else return--tn,Qe;else if(r.isIdentifierStart(rt))Qe+=rt;else return}Zn()}function p(Qe){let rt="";for(;tn<Kt;){let ct=Ne[tn++];if(ct===Qe)return rt;if(ct==="\\")if(tn>=Kt&&Zn(),ct=Ne[tn++],f[ct]&&(De||ct!=="v"&&(ct!=="'"||Pt)))rt+=f[ct];else if(De&&Lt(ct))Ge(ct);else if(ct==="u"||ct==="x"&&De){const dt=ct==="u"?4:2;for(let qt=0;qt<dt;++qt)tn>=Kt&&Zn(),i(Ne[tn])||Zn("Bad escape sequence"),tn++;rt+=String.fromCharCode(Number.parseInt(Ne.substr(tn-dt,dt),16))}else if(De&&s(ct)){let dt;ct<"4"&&s(Ne[tn])&&s(Ne[tn+1])?dt=3:s(Ne[tn])?dt=2:dt=1,tn+=dt-1,rt+=String.fromCharCode(Number.parseInt(Ne.substr(tn-dt,dt),8))}else De?rt+=ct:(--tn,Zn());else Lt(ct)?Zn():(!De&&ct.charCodeAt(0)<32&&(--tn,Zn("Unexpected control character")),rt+=ct)}Zn()}He&&nt(),wt();let Fe=ce();if(Fe!==void 0||tn<Kt){if(wt(),tn>=Kt)return Pe&&(Fe=Pe("
Line truncated
|
||||
${yt}
|
||||
${Pt}
|
||||
${Ne}`):Ft=`Parse error in JSON input:
|
||||
${yt}
|
||||
${Ne}`,{message:Ft,excerpt:yt,pointer:Pt}}function me(Ne,we){let De=G(we);const He=oe(Ne,De)||he(Ne,De)||fe(Ne,De);let bt,Yt,yt;He?(bt=He.offset,Yt=He.line,yt=He.column,De=He.reason):bt=0,we.reason=De;const Ft=Ee(De,Ne,bt,Yt,yt);return we.message=Ft.message,we.excerpt=Ft.excerpt,Ft.pointer&&(we.pointer=Ft.pointer,we.location={start:{column:yt,line:Yt,offset:bt}}),we}function Se(Ne,we){try{return JSON.parse(Ne,we)}catch(De){const He=me(Ne,De);if(De.location)throw He;return O(Ne,we)}}const Ke=typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor),xe=typeof process<"u"&&process.version.startsWith("v4.");function at(Ne){return Ne.ignoreBOM||Ne.ignoreComments||Ne.ignoreTrailingCommas||Ne.allowSingleQuotedStrings||Ne.allowDuplicateObjectKeys===!1||Ne.ignoreProtoKey||Ne.ignorePrototypeKeys||Ne.mode==="cjson"||Ne.mode==="json5"||Ke||xe}function Ze(Ne){if(typeof Ne=="function")return Ne;if(Ne)return Ne.reviver}function Je(Ne,we){return we||(we={}),at(we)?O(Ne,we):Se(Ne,Ze(we))}t.parse=Je,t.tokenize=P,t.pathToPointer=j,t.pointerToPath=Y,t.parseNative=Se,t.parseCustom=O,t.getErrorTexts=Ee,Object.defineProperty(t,"__esModule",{value:!0})})}(Pv,Pv.exports)),Pv.exports}var uoe=loe(),Ib={exports:{}},Aoe=Ib.exports,H9;function coe(){return H9||(H9=1,function(n,e){(function(t,r){n.exports=r()})(Aoe,function(){var t=typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function r(Pe,Be){return Be={exports:{}},Pe(Be,Be.exports),Be.exports}var i=r(function(Pe){function Be(){var it=0,_t=1,pt=2,Lt=3,nn=4,Kt=5,vn=6,Gn=7,tn=8,dr=9,Pn=10,pn=11,$n=12,lr=13,vr=14,Zn=15,Ge=16,ce=17,pe=0,nt=1,wt=2,Ht=3,sn=4;function Hn(p,Fe){return 55296<=p.charCodeAt(Fe)&&p.charCodeAt(Fe)<=56319&&56320<=p.charCodeAt(Fe+1)&&p.charCodeAt(Fe+1)<=57343}function Ve(p,Fe){Fe===void 0&&(Fe=0);var Qe=p.charCodeAt(Fe);if(55296<=Qe&&Qe<=56319&&Fe<p.length-1){var rt=Qe,ct=p.charCodeAt(Fe+1);return 56320<=ct&&ct<=57343?(rt-55296)*1024+(ct-56320)+65536:rt}if(56320<=Qe&&Qe<=57343&&Fe>=1){var rt=p.charCodeAt(Fe-1),ct=Qe;return 55296<=rt&&rt<=56319?(rt-55296)*1024+(ct-56320)+65536:ct}return Qe}function J(p,Fe,Qe){var rt=[p].concat(Fe).concat([Qe]),ct=rt[rt.length-2],dt=Qe,qt=rt.lastIndexOf(vr);if(qt>1&&rt.slice(1,qt).every(function(on){return on==Lt})&&[Lt,lr,ce].indexOf(p)==-1)return wt;var Gt=rt.lastIndexOf(nn);if(Gt>0&&rt.slice(1,Gt).every(function(on){return on==nn})&&[$n,nn].indexOf(ct)==-1)return rt.filter(function(on){return on==nn}).length%2==1?Ht:sn;if(ct==it&&dt==_t)return pe;if(ct==pt||ct==it||ct==_t)return dt==vr&&Fe.every(function(on){return on==Lt})?wt:nt;if(dt==pt||dt==it||dt==_t)return nt;if(ct==vn&&(dt==vn||dt==Gn||dt==dr||dt==Pn))return pe;if((ct==dr||ct==Gn)&&(dt==Gn||dt==tn))return pe;if((ct==Pn||ct==tn)&&dt==tn)return pe;if(dt==Lt||dt==Zn)return pe;if(dt==Kt)return pe;if(ct==$n)return pe;var zt=rt.indexOf(Lt)!=-1?rt.lastIndexOf(Lt)-1:rt.length-2;return[lr,ce].indexOf(rt[zt])!=-1&&rt.slice(zt+1,-1).every(function(on){return on==Lt})&&dt==vr||ct==Zn&&[Ge,ce].indexOf(dt)!=-1?pe:Fe.indexOf(nn)!=-1?wt:ct==nn&&dt==nn?pe:nt}this.nextBreak=function(p,Fe){if(Fe===void 0&&(Fe=0),Fe<0)return 0;if(Fe>=p.length-1)return p.length;for(var Qe=ve(Ve(p,Fe)),rt=[],ct=Fe+1;ct<p.length;ct++)if(!Hn(p,ct-1)){var dt=ve(Ve(p,ct));if(J(Qe,rt,dt))return ct;rt.push(dt)}return p.length},this.splitGraphemes=function(p){for(var Fe=[],Qe=0,rt;(rt=this.nextBreak(p,Qe))<p.length;)Fe.push(p.slice(Qe,rt)),Qe=rt;return Qe<p.length&&Fe.push(p.slice(Qe)),Fe},this.iterateGraphemes=function(p){var Fe=0,Qe={next:(function(){var rt,ct;return(ct=this.nextBreak(p,Fe))<p.length?(rt=p.slice(Fe,ct),Fe=ct,{value:rt,done:!1}):Fe<p.length?(rt=p.slice(Fe),Fe=p.length,{value:rt,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Qe[Symbol.iterator]=function(){return Qe}),Qe},this.countGraphemes=function(p){for(var Fe=0,Qe=0,rt;(rt=this.nextBreak(p,Qe))<p.length;)Qe=rt,Fe++;return Qe<p.length&&Fe++,Fe};function ve(p){return 1536<=p&&p<=1541||p==1757||p==1807||p==2274||p==3406||p==69821||70082<=p&&p<=70083||p==72250||72326<=p&&p<=72329||p==73030?$n:p==13?it:p==10?_t:0<=p&&p<=9||11<=p&&p<=12||14<=p&&p<=31||127<=p&&p<=159||p==173||p==1564||p==6158||p==8203||8206<=p&&p<=8207||p==8232||p==8233||8234<=p&&p<=8238||8288<=p&&p<=8292||p==8293||8294<=p&&p<=8303||55296<=p&&p<=57343||p==65279||65520<=p&&p<=65528||65529<=p&&p<=65531||113824<=p&&p<=113827||119155<=p&&p<=119162||p==917504||p==917505||917506<=p&&p<=917535||917632<=p&&p<=917759||918e3<=p&&p<=921599?pt:768<=p&&p<=879||1155<=p&&p<=1159||1160<=p&&p<=1161||1425<=p&&p<=1469||p==1471||1473<=p&&p<=1474||1476<=p&&p<=1477||p==1479||1552<=p&&p<=1562||1611<=p&&p<=1631||p==1648||1750<=p&&p<=1756||1759<=p&&p<=1764||1767<=p&&p<=1768||1770<=p&&p<=1773||p==1809||1840<=p&&p<=1866||1958<=p&&p<=1968||2027<=p&&p<=2035||2070<=p&&p<=2073||2075<=p&&p<=2083||2085<=p&&p<=2087||2089<=p&&p<=2093||2137<=p&&p<=2139||2260<=p&&p<=2273||2275<=p&&p<=2306||p==2362||p==2364||2369<=p&&p<=23
Line truncated
|
||||
`)}var tn={extraLines:2,tabSize:4},dr=function(pn,$n,lr,vr){vr=Kt({},tn,vr);var Zn=pn.split(/\r\n?|\n|\f/),Ge=Math.max(1,$n-vr.extraLines)-1,ce=Math.min($n+vr.extraLines,Zn.length),pe=String(ce).length,nt=Gn(Zn,Ge,$n,pe,vr),wt=vn(Zn[$n-1].substring(0,lr-1),$n,pe,vr),Ht=pt(" ",wt.length)+"^",sn=Gn(Zn,$n,ce,pe,vr);return[nt,Ht,sn].filter(Boolean).join(`
|
||||
`)};return dr})}),y=new Error().stack,x=function(Pe){var Be=Object.create(SyntaxError.prototype);return Object.assign(Be,Pe,{name:"SyntaxError"}),Object.defineProperty(Be,"stack",{get:function(){return y?y.replace(/^(.+\n){1,3}/,String(Be)+`
|
||||
`):""}}),Be},B=function(Pe,Be,it,_t,pt){throw x({message:_t?Pe+`
|
||||
`+f(Be,_t,pt):Pe,rawMessage:Pe,source:it,line:_t,column:pt})},O={unexpectedEnd:function(){return"Unexpected end of input"},unexpectedToken:function(Be){for(var it=arguments.length,_t=Array(it>1?it-1:0),pt=1;pt<it;pt++)_t[pt-1]=arguments[pt];return"Unexpected token <"+Be+"> at "+_t.filter(Boolean).join(":")}},P={unexpectedSymbol:function(Be){for(var it=arguments.length,_t=Array(it>1?it-1:0),pt=1;pt<it;pt++)_t[pt-1]=arguments[pt];return"Unexpected symbol <"+Be+"> at "+_t.filter(Boolean).join(":")}},U={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10},j={"{":U.LEFT_BRACE,"}":U.RIGHT_BRACE,"[":U.LEFT_BRACKET,"]":U.RIGHT_BRACKET,":":U.COLON,",":U.COMMA},N={true:U.TRUE,false:U.FALSE,null:U.NULL},Y={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2},H={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},se={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function re(Pe){return Pe>="1"&&Pe<="9"}function V(Pe){return Pe>="0"&&Pe<="9"}function ne(Pe){return V(Pe)||Pe>="a"&&Pe<="f"||Pe>="A"&&Pe<="F"}function G(Pe){return Pe==="e"||Pe==="E"}function oe(Pe,Be,it,_t){var pt=Pe.charAt(Be);if(pt==="\r")Be++,it++,_t=1,Pe.charAt(Be)===`
|
||||
`&&Be++;else if(pt===`
|
||||
`)Be++,it++,_t=1;else if(pt===" "||pt===" ")Be++,_t++;else return null;return{index:Be,line:it,column:_t}}function he(Pe,Be,it,_t){var pt=Pe.charAt(Be);return pt in j?{type:j[pt],line:it,column:_t+1,index:Be+1,value:null}:null}function fe(Pe,Be,it,_t){for(var pt in N)if(N.hasOwnProperty(pt)&&Pe.substr(Be,pt.length)===pt)return{type:N[pt],line:it,column:_t+pt.length,index:Be+pt.length,value:pt};return null}function Ee(Pe,Be,it,_t){for(var pt=Be,Lt=Y._START_;Be<Pe.length;){var nn=Pe.charAt(Be);switch(Lt){case Y._START_:{if(nn==='"')Be++,Lt=Y.START_QUOTE_OR_CHAR;else return null;break}case Y.START_QUOTE_OR_CHAR:{if(nn==="\\")Be++,Lt=Y.ESCAPE;else{if(nn==='"')return Be++,{type:U.STRING,line:it,column:_t+Be-pt,index:Be,value:Pe.slice(pt,Be)};Be++}break}case Y.ESCAPE:{if(nn in H){if(Be++,nn==="u")for(var Kt=0;Kt<4;Kt++){var vn=Pe.charAt(Be);if(vn&&ne(vn))Be++;else return null}Lt=Y.START_QUOTE_OR_CHAR}else return null;break}}}}function me(Pe,Be,it,_t){var pt=Be,Lt=Be,nn=se._START_;e:for(;Be<Pe.length;){var Kt=Pe.charAt(Be);switch(nn){case se._START_:{if(Kt==="-")nn=se.MINUS;else if(Kt==="0")Lt=Be+1,nn=se.ZERO;else if(re(Kt))Lt=Be+1,nn=se.DIGIT;else return null;break}case se.MINUS:{if(Kt==="0")Lt=Be+1,nn=se.ZERO;else if(re(Kt))Lt=Be+1,nn=se.DIGIT;else return null;break}case se.ZERO:{if(Kt===".")nn=se.POINT;else if(G(Kt))nn=se.EXP;else break e;break}case se.DIGIT:{if(V(Kt))Lt=Be+1;else if(Kt===".")nn=se.POINT;else if(G(Kt))nn=se.EXP;else break e;break}case se.POINT:{if(V(Kt))Lt=Be+1,nn=se.DIGIT_FRACTION;else break e;break}case se.DIGIT_FRACTION:{if(V(Kt))Lt=Be+1;else if(G(Kt))nn=se.EXP;else break e;break}case se.EXP:{if(Kt==="+"||Kt==="-")nn=se.EXP_DIGIT_OR_SIGN;else if(V(Kt))Lt=Be+1,nn=se.EXP_DIGIT_OR_SIGN;else break e;break}case se.EXP_DIGIT_OR_SIGN:{if(V(Kt))Lt=Be+1;else break e;break}}Be++}return Lt>0?{type:U.NUMBER,line:it,column:_t+Lt-pt,index:Lt,value:Pe.slice(pt,Lt)}:null}var Se=function(Be,it){for(var _t=1,pt=1,Lt=0,nn=[];Lt<Be.length;){var Kt=[Be,Lt,_t,pt],vn=oe.apply(void 0,Kt);if(vn){Lt=vn.index,_t=vn.line,pt=vn.column;continue}var Gn=he.apply(void 0,Kt)||fe.apply(void 0,Kt)||Ee.apply(void 0,Kt)||me.apply(void 0,Kt);if(Gn){var tn={type:Gn.type,value:Gn.value,loc:o(_t,pt,Lt,Gn.line,Gn.column,Gn.index,it.source)};nn.push(tn),Lt=Gn.index,_t=Gn.line,pt=Gn.column}else B(P.unexpectedSymbol(l(Be,Lt,Lt+1),it.source,_t,pt),Be,it.source,_t,pt)}return nn},Ke={_START_:0,OPEN_OBJECT:1,PROPERTY:2,COMMA:3},xe={_START_:0,KEY:1,COLON:2},at={_START_:0,OPEN_ARRAY:1,VALUE:2,COMMA:3},Ze={loc:!0,source:null};function Je(Pe,Be,it){var _t=Be.length>0?Be[Be.length-1].loc.end:{line:1,column:1};B(O.unexpectedEnd(),Pe,it.source,_t.line,_t.column)}function Ne(Pe){for(var Be=0,it=0;it<4;it++)Be=Be*16+parseInt(Pe[it],16);return String.fromCharCode(Be)}var we={b:"\b",f:"\f",n:`
|
||||
`,r:"\r",t:" "},De=['"',"\\","/"];function He(Pe){for(var Be="",it=0;it<Pe.length;it++){var _t=Pe.charAt(it);if(_t==="\\"){it++;var pt=Pe.charAt(it);if(pt==="u")Be+=Ne(Pe.substr(it+1,4)),it+=4;else if(De.indexOf(pt)!==-1)Be+=pt;else if(pt in we)Be+=we[pt];else break}else Be+=_t}return Be}function bt(Pe,Be,it,_t){for(var pt=void 0,Lt={type:"Object",children:[]},nn=Ke._START_;it<Be.length;){var Kt=Be[it];switch(nn){case Ke._START_:{if(Kt.type===U.LEFT_BRACE)pt=Kt,nn=Ke.OPEN_OBJECT,it++;else return null;break}case Ke.OPEN_OBJECT:{if(Kt.type===U.RIGHT_BRACE)return _t.loc&&(Lt.loc=o(pt.loc.start.line,pt.loc.start.column,pt.loc.start.offset,Kt.loc.end.line,Kt.loc.end.column,Kt.loc.end.offset,_t.source)),{value:Lt,index:it+1};var vn=Yt(Pe,Be,it,_t);Lt.children.push(vn.value),nn=Ke.PROPERTY,it=vn.index;break}case Ke.PROPERTY:{if(Kt.type===U.RIGHT_BRACE)return _t.loc&&(Lt.loc=o(pt.loc.start.line,pt.loc.start.column,pt.loc.start.offset,Kt.loc.end.line,Kt.loc.end.column,Kt.loc.end.offset,_t.source)),{value:Lt,index:it+1};Kt.type===U.COMMA?(nn=Ke.COMMA,it++):B(O.unexpectedToken(l(Pe,Kt.loc.start.offset,Kt.loc.end.offset),_t.source,Kt.loc.start.line,Kt.loc.start.column),Pe,_t.source,Kt.loc.start.line,Kt.loc.start.column);break}case Ke.COMMA:{var Gn=Yt(Pe,Be,it,_t);Gn?(it=Gn.index,Lt.children.push(Gn.value),nn=Ke.PROPERTY):B(O.unexpectedToken(l(Pe,Kt.loc.start.offset,Kt.loc.end.offset),_t.source,Kt.loc.start.line,Kt.loc.start.column),Pe,_t.source,Kt.loc.start.line,Kt.loc.start.column);break}}}Je(Pe,Be,_t)}function Yt(Pe,Be,it,_t){for(var pt=void 0,Lt={type:"Property",key:null,value:null},nn=xe._START_;it<Be.length;){var Kt=Be[it];switch(nn){case xe._START_:{if(Kt.type===U.STRING){var vn={type:"Identifier",value:He(Pe.slice(Kt.loc.start.offset+1,Kt.loc.end.offset-1)),raw:Kt.value};_t.loc&&(vn.loc=Kt.loc),pt=Kt,Lt.key=vn,nn=xe.KEY,it++}else return null;break}case xe.KEY:{Kt.type===U.COLON?(nn=xe.COLON,it++):B(O.unexpectedToken(l(Pe,Kt.loc.start.offset,Kt.loc.end.offset),_t.source,Kt.loc.start.line,Kt.loc.start.column),Pe,_t.source,Kt.loc.start.line,Kt.loc.start.column);break}case xe.COLON:{var Gn=Pt(Pe,Be,it,_t);return Lt.value=Gn.value,_t.loc&&(Lt.loc=o(pt.loc.start.line,pt.loc.start.column,pt.loc.start.offset,Gn.value.loc.end.line,Gn.value.loc.end.column,Gn.value.loc.end.offset,_t.source)),{value:Lt,index:Gn.index}}}}}function yt(Pe,Be,it,_t){for(var pt=void 0,Lt={type:"Array",children:[]},nn=at._START_,Kt=void 0;it<Be.length;)switch(Kt=Be[it],nn){case at._START_:{if(Kt.type===U.LEFT_BRACKET)pt=Kt,nn=at.OPEN_ARRAY,it++;else return null;break}case at.OPEN_ARRAY:{if(Kt.type===U.RIGHT_BRACKET)return _t.loc&&(Lt.loc=o(pt.loc.start.line,pt.loc.start.column,pt.loc.start.offset,Kt.loc.end.line,Kt.loc.end.column,Kt.loc.end.offset,_t.source)),{value:Lt,index:it+1};var vn=Pt(Pe,Be,it,_t);it=vn.index,Lt.children.push(vn.value),nn=at.VALUE;break}case at.VALUE:{if(Kt.type===U.RIGHT_BRACKET)return _t.loc&&(Lt.loc=o(pt.loc.start.line,pt.loc.start.column,pt.loc.start.offset,Kt.loc.end.line,Kt.loc.end.column,Kt.loc.end.offset,_t.source)),{value:Lt,index:it+1};Kt.type===U.COMMA?(nn=at.COMMA,it++):B(O.unexpectedToken(l(Pe,Kt.loc.start.offset,Kt.loc.end.offset),_t.source,Kt.loc.start.line,Kt.loc.start.column),Pe,_t.source,Kt.loc.start.line,Kt.loc.start.column);break}case at.COMMA:{var Gn=Pt(Pe,Be,it,_t);it=Gn.index,Lt.children.push(Gn.value),nn=at.VALUE;break}}Je(Pe,Be,_t)}function Ft(Pe,Be,it,_t){var pt=Be[it],Lt=null;switch(pt.type){case U.STRING:{Lt=He(Pe.slice(pt.loc.start.offset+1,pt.loc.end.offset-1));break}case U.NUMBER:{Lt=Number(pt.value);break}case U.TRUE:{Lt=!0;break}case U.FALSE:{Lt=!1;break}case U.NULL:{Lt=null;break}default:return null}var nn={type:"Literal",value:Lt,raw:pt.value};return _t.loc&&(nn.loc=pt.loc),{value:nn,index:it+1}}function Pt(Pe,Be,it,_t){var pt=Be[it],Lt=Ft.apply(void 0,arguments)||bt.apply(void 0,arguments)||yt.apply(void 0,arguments);if(Lt)return Lt;B(O.unexpectedToken(l(Pe,pt.loc.start.offset,pt.loc.end.offset),_t.source,pt.loc.start.line,pt.loc.start.column),Pe,_t.source,pt.loc.start.line,pt.loc.start.column)}var Ue=function(Pe,Be){Be=Object.assign({},Ze,Be);var it=Se(Pe,Be);it.length===0&&Je(Pe,it,Be);var _t=Pt(Pe,it,0,Be);if(_t.index===it.length)return _t.value;var pt=it[_t.index];B(O.unexpectedToken(l(Pe,pt.loc.start.offset,pt.loc.end.offset),Be.source,pt.loc.start.line,pt.loc.start.column),Pe,Be.source,pt.loc.start.line,pt.loc.start.column)};return Ue})}(Ib)),Ib.exports}var doe=coe();const hoe=fl(doe);function hr(){var n="/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",e="89c156e637b20b434cfb214df7fad7d710253070",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",statementMap:{0:{start:{line:5,column:0},end:{line:10,column:3}},1:{start:{line:6,column:2},end:{line:9,column:4}},2:{start:{line:12,column:16},end:{line:12,column:18}},3:{start:{line:13,column:2},end:{line:30,column:3}},4:{start:{line:14,column:4},end:{line:14,column:16}}
Line truncated
|
||||
rgba(`+re.r+","+re.g+","+re.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:re.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+re.r+","+re.g+","+re.b+`, 0) 0%,
|
||||
rgba(`+re.r+","+re.g+","+re.b+", 1) 100%)"},pointer:{left:0,top:re.a*100+"%"}},overwrite:n({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return r.default.createElement("div",{style:V.alpha},r.default.createElement("div",{style:V.checkboard},r.default.createElement(y.default,{renderers:this.props.renderers})),r.default.createElement("div",{style:V.gradient}),r.default.createElement("div",{style:V.container,ref:function(G){return se.container=G},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.default.createElement("div",{style:V.pointer},this.props.pointer?r.default.createElement(this.props.pointer,this.props):r.default.createElement("div",{style:V.slider}))))}}]),Y}(t.PureComponent||t.Component);return K1.default=j,K1}var D1={},bK;function Kae(){if(bK)return D1;bK=1,Object.defineProperty(D1,"__esModule",{value:!0}),D1.EditableInput=void 0;var n=function(){function H(se,re){for(var V=0;V<re.length;V++){var ne=re[V];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(se,ne.key,ne)}}return function(se,re,V){return re&&H(se.prototype,re),V&&H(se,V),se}}(),e=Ia(),t=s(e),r=Cp(),i=s(r);function s(H){return H&&H.__esModule?H:{default:H}}function l(H,se,re){return se in H?Object.defineProperty(H,se,{value:re,enumerable:!0,configurable:!0,writable:!0}):H[se]=re,H}function o(H,se){if(!(H instanceof se))throw new TypeError("Cannot call a class as a function")}function f(H,se){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return se&&(typeof se=="object"||typeof se=="function")?se:H}function y(H,se){if(typeof se!="function"&&se!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof se);H.prototype=Object.create(se&&se.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),se&&(Object.setPrototypeOf?Object.setPrototypeOf(H,se):H.__proto__=se)}var x=1,B=38,O=40,P=[B,O],U=function(se){return P.indexOf(se)>-1},j=function(se){return Number(String(se).replace(/%/g,""))},N=1,Y=D1.EditableInput=function(H){y(se,H);function se(re){o(this,se);var V=f(this,(se.__proto__||Object.getPrototypeOf(se)).call(this));return V.handleBlur=function(){V.state.blurValue&&V.setState({value:V.state.blurValue,blurValue:null})},V.handleChange=function(ne){V.setUpdatedValue(ne.target.value,ne)},V.handleKeyDown=function(ne){var G=j(ne.target.value);if(!isNaN(G)&&U(ne.keyCode)){var oe=V.getArrowOffset(),he=ne.keyCode===B?G+oe:G-oe;V.setUpdatedValue(he,ne)}},V.handleDrag=function(ne){if(V.props.dragLabel){var G=Math.round(V.props.value+ne.movementX);G>=0&&G<=V.props.dragMax&&V.props.onChange&&V.props.onChange(V.getValueObjectWithLabel(G),ne)}},V.handleMouseDown=function(ne){V.props.dragLabel&&(ne.preventDefault(),V.handleDrag(ne),window.addEventListener("mousemove",V.handleDrag),window.addEventListener("mouseup",V.handleMouseUp))},V.handleMouseUp=function(){V.unbindEventListeners()},V.unbindEventListeners=function(){window.removeEventListener("mousemove",V.handleDrag),window.removeEventListener("mouseup",V.handleMouseUp)},V.state={value:String(re.value).toUpperCase(),blurValue:String(re.value).toUpperCase()},V.inputId="rc-editable-input-"+N++,V}return n(se,[{key:"componentDidUpdate",value:function(V,ne){this.props.value!==this.state.value&&(V.value!==this.props.value||ne.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(V){return l({},this.props.label,V)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||x}},{key:"setUpdatedValue",value:function(V,ne){var G=this.props.label?this.getValueObjectWithLabel(V):V;this.props.onChange&&this.props.onChange(G,ne),this.setState({value:V})}},{key:"render",value:function(){var V=this,ne=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return t.default.createElement("div",{style:ne.wrap},t.default.createElement("input",{id:this.inputId,style:ne.input,ref:function(oe){return V.input=oe},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?t.default.createElement("label",{htmlFor:this.inputId,style:ne.label,onMouseDown:this.handleMouseDown},this.props.label):null)}
Line truncated
|
||||
.hue-horizontal {
|
||||
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
||||
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
||||
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
}
|
||||
|
||||
.hue-vertical {
|
||||
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
||||
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
||||
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
}
|
||||
`),t.default.createElement("div",{style:se.pointer},this.props.pointer?t.default.createElement(this.props.pointer,this.props):t.default.createElement("div",{style:se.slider}))))}}]),U}(e.PureComponent||e.Component);return F1.default=O,F1}var L1={},wK;function Fae(){if(wK)return L1;wK=1,Object.defineProperty(L1,"__esModule",{value:!0}),L1.Raised=void 0;var n=Ia(),e=f(n),t=mp(),r=f(t),i=Cp(),s=f(i),l=mj(),o=f(l);function f(x){return x&&x.__esModule?x:{default:x}}var y=L1.Raised=function(B){var O=B.zDepth,P=B.radius,U=B.background,j=B.children,N=B.styles,Y=N===void 0?{}:N,H=(0,s.default)((0,o.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+O+"px "+O*4+"px rgba(0,0,0,.24)",borderRadius:P,background:U}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},Y),{"zDepth-1":O===1});return e.default.createElement("div",{style:H.wrap},e.default.createElement("div",{style:H.bg}),e.default.createElement("div",{style:H.content},j))};return y.propTypes={background:r.default.string,zDepth:r.default.oneOf([0,1,2,3,4,5]),radius:r.default.number,styles:r.default.object},y.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},L1.default=y,L1}var U1={},fS,SK;function Lae(){if(SK)return fS;SK=1;var n=vp(),e=function(){return n.Date.now()};return fS=e,fS}var pS,EK;function Uae(){if(EK)return pS;EK=1;var n=/\s/;function e(t){for(var r=t.length;r--&&n.test(t.charAt(r)););return r}return pS=e,pS}var mS,BK;function zae(){if(BK)return mS;BK=1;var n=Uae(),e=/^\s+/;function t(r){return r&&r.slice(0,n(r)+1).replace(e,"")}return mS=t,mS}var gS,OK;function jae(){if(OK)return gS;OK=1;var n=zae(),e=Ff(),t=Zx(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,o=parseInt;function f(y){if(typeof y=="number")return y;if(t(y))return r;if(e(y)){var x=typeof y.valueOf=="function"?y.valueOf():y;y=e(x)?x+"":x}if(typeof y!="string")return y===0?y:+y;y=n(y);var B=s.test(y);return B||l.test(y)?o(y.slice(2),B?2:8):i.test(y)?r:+y}return gS=f,gS}var yS,IK;function gj(){if(IK)return yS;IK=1;var n=Ff(),e=Lae(),t=jae(),r="Expected a function",i=Math.max,s=Math.min;function l(o,f,y){var x,B,O,P,U,j,N=0,Y=!1,H=!1,se=!0;if(typeof o!="function")throw new TypeError(r);f=t(f)||0,n(y)&&(Y=!!y.leading,H="maxWait"in y,O=H?i(t(y.maxWait)||0,f):O,se="trailing"in y?!!y.trailing:se);function re(Se){var Ke=x,xe=B;return x=B=void 0,N=Se,P=o.apply(xe,Ke),P}function V(Se){return N=Se,U=setTimeout(oe,f),Y?re(Se):P}function ne(Se){var Ke=Se-j,xe=Se-N,at=f-Ke;return H?s(at,O-xe):at}function G(Se){var Ke=Se-j,xe=Se-N;return j===void 0||Ke>=f||Ke<0||H&&xe>=O}function oe(){var Se=e();if(G(Se))return he(Se);U=setTimeout(oe,ne(Se))}function he(Se){return U=void 0,se&&x?re(Se):(x=B=void 0,P)}function fe(){U!==void 0&&clearTimeout(U),N=0,x=j=B=U=void 0}function Ee(){return U===void 0?P:he(e())}function me(){var Se=e(),Ke=G(Se);if(x=arguments,B=this,j=Se,Ke){if(U===void 0)return V(j);if(H)return clearTimeout(U),U=setTimeout(oe,f),re(j)}return U===void 0&&(U=setTimeout(oe,f)),P}return me.cancel=fe,me.flush=Ee,me}return yS=l,yS}var vS,kK;function Nae(){if(kK)return vS;kK=1;var n=gj(),e=Ff(),t="Expected a function";function r(i,s,l){var o=!0,f=!0;if(typeof i!="function")throw new TypeError(t);return e(l)&&(o="leading"in l?!!l.leading:o,f="trailing"in l?!!l.trailing:f),n(i,s,{leading:o,maxWait:s,trailing:f})}return vS=r,vS}var fb={},TK;function Wae(){return TK||(TK=1,Object.defineProperty(fb,"__esModule",{value:!0}),fb.calculateChange=function(e,t,r){var i=r.getBoundingClientRect(),s=i.width,l=i.height,o=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,f=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,y=o-(r.getBoundingClientRect().left+window.pageXOffset),x=f-(r.getBoundingClientRect().top+window.pageYOffset);y<0?y=0:y>s&&(y=s),x<0?x=0:x>l&&(x=l);var B=y/s,O=1-x/l;return{h:t.h,s:B,v:O,a:t.a,source:"hsv"}}),fb}var PK;function Gae(){if(PK)return U1;PK=1,Object.defineProperty(U1,"__esModule",{value:!0}),U1.Saturation=void 0;var n=function(){function j(N,Y){for(var H=0;H<Y.length;H++){var se=Y[H];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(N,se.key,se)}}return function(N,Y,H){return Y&&j(N.prototype,Y),H&&j(N,H),N}}(),e=Ia(),t=x(e),r=Cp(),i=x(r),s=Nae(),l=x(s),o=Wae(),f=y(o);function y(j){if(j&&j.__esModule)return j;var N={};if(j!=null)for(var Y in j)Object.prototype.hasOwnProperty.call(j,Y)&&(N[Y]=j[Y]);return N.default=j,N}function x(j)
Line truncated
|
||||
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:re,white:V,black:ne,pointer:G,circle:oe}},{custom:!!this.props.style});return t.default.createElement("div",{style:he.color,ref:function(Ee){return H.container=Ee},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},t.default.createElement("style",null,`
|
||||
.saturation-white {
|
||||
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
||||
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
||||
}
|
||||
.saturation-black {
|
||||
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
||||
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
||||
}
|
||||
`),t.default.createElement("div",{style:he.white,className:"saturation-white"},t.default.createElement("div",{style:he.black,className:"saturation-black"}),t.default.createElement("div",{style:he.pointer},this.props.pointer?t.default.createElement(this.props.pointer,this.props):t.default.createElement("div",{style:he.circle}))))}}]),N}(e.PureComponent||e.Component);return U1.default=U,U1}var z1={},Dd={},CS,KK;function Qae(){if(KK)return CS;KK=1;var n=sj(),e=oj(),t=Gz(),r=Vh();function i(s,l){var o=r(s)?n:e;return o(s,t(l))}return CS=i,CS}var _S,RK;function Yae(){return RK||(RK=1,_S=Qae()),_S}var kb={exports:{}},qae=kb.exports,DK;function Vae(){return DK||(DK=1,function(n,e){(function(t,r){n.exports=r()})(qae,function(){function t(Ue){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},t(Ue)}var r=/^\s+/,i=/\s+$/;function s(Ue,Pe){if(Ue=Ue||"",Pe=Pe||{},Ue instanceof s)return Ue;if(!(this instanceof s))return new s(Ue,Pe);var Be=l(Ue);this._originalInput=Ue,this._r=Be.r,this._g=Be.g,this._b=Be.b,this._a=Be.a,this._roundA=Math.round(100*this._a)/100,this._format=Pe.format||Be.format,this._gradientType=Pe.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=Be.ok}s.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Pe=this.toRgb();return(Pe.r*299+Pe.g*587+Pe.b*114)/1e3},getLuminance:function(){var Pe=this.toRgb(),Be,it,_t,pt,Lt,nn;return Be=Pe.r/255,it=Pe.g/255,_t=Pe.b/255,Be<=.03928?pt=Be/12.92:pt=Math.pow((Be+.055)/1.055,2.4),it<=.03928?Lt=it/12.92:Lt=Math.pow((it+.055)/1.055,2.4),_t<=.03928?nn=_t/12.92:nn=Math.pow((_t+.055)/1.055,2.4),.2126*pt+.7152*Lt+.0722*nn},setAlpha:function(Pe){return this._a=Ke(Pe),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var Pe=x(this._r,this._g,this._b);return{h:Pe.h*360,s:Pe.s,v:Pe.v,a:this._a}},toHsvString:function(){var Pe=x(this._r,this._g,this._b),Be=Math.round(Pe.h*360),it=Math.round(Pe.s*100),_t=Math.round(Pe.v*100);return this._a==1?"hsv("+Be+", "+it+"%, "+_t+"%)":"hsva("+Be+", "+it+"%, "+_t+"%, "+this._roundA+")"},toHsl:function(){var Pe=f(this._r,this._g,this._b);return{h:Pe.h*360,s:Pe.s,l:Pe.l,a:this._a}},toHslString:function(){var Pe=f(this._r,this._g,this._b),Be=Math.round(Pe.h*360),it=Math.round(Pe.s*100),_t=Math.round(Pe.l*100);return this._a==1?"hsl("+Be+", "+it+"%, "+_t+"%)":"hsla("+Be+", "+it+"%, "+_t+"%, "+this._roundA+")"},toHex:function(Pe){return O(this._r,this._g,this._b,Pe)},toHexString:function(Pe){return"#"+this.toHex(Pe)},toHex8:function(Pe){return P(this._r,this._g,this._b,this._a,Pe)},toHex8String:function(Pe){return"#"+this.toHex8(Pe)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(xe(this._r,255)*100)+"%",g:Math.round(xe(this._g,255)*100)+"%",b:Math.round(xe(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(xe(this._r,255)*100)+"%, "+Math.round(xe(this._g,255)*100)+"%, "+Math.round(xe(this._b,255)*100)+"%)":"rgba("+Math.round(xe(this._r,255)*100)+"%, "+Math.round(xe(this._g,255)*100)+"%, "+Math.round(xe(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:me[O(this._r,this._g,this._b,!0)]||!1},toFilter:function(Pe){var Be="#"+U(this._r,this._g,this._b,this._a),it=Be,_t=this._gradientType?"GradientType = 1, ":"";if(Pe){var pt=s(Pe);it="#"+U(pt._r,pt._g,pt._b,pt._a)}return"progid:DXImageTransform.Microsoft.gradient("+_t+"startColorstr="+Be+",endColorstr="+it+")"},toString:function(Pe){var Be=!!Pe;Pe=Pe||this._format;var it=!1,_t=this._a<1&&this._a>=0,pt=!Be&&_t&&(Pe==="hex"||Pe==="hex6"||Pe==="hex3"||Pe==="hex4"||Pe==="hex8"||Pe==="name");return pt?Pe==="name"&&this._a===0?this.toName():this.toRgbString():(Pe==="rgb"&&(it=this.toRgbString()),Pe==="prgb"&&(it=this.toPercentageRgbString()),(Pe==="hex"||Pe==="hex6")&&(it=this.toHexString()),Pe==="hex3"&&(it=this.toHexString(!0)),Pe==="hex4"&&(it=this.toHex8String(!0)),Pe==="hex8"&&(it=this.toHex8String()),Pe==="name"&&(it=this.toName()),Pe==="hsl"&&(it=this.toHslString()),Pe==="hsv"&&(it=this.toHsvString()),it||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Pe,Be){var it=Pe.apply(nu
Line truncated
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>${t}</title>
|
||||
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
|
||||
<script src="https://unpkg.com/maplibre-gl@${AR}/dist/maplibre-gl.js"><\/script>
|
||||
<link href="https://unpkg.com/maplibre-gl@${AR}/dist/maplibre-gl.css" rel="stylesheet" />
|
||||
<style>
|
||||
body { margin: 0; padding: 0; }
|
||||
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<script>
|
||||
const map = new maplibregl.Map({
|
||||
container: 'map',
|
||||
style: ${e},
|
||||
});
|
||||
map.addControl(new maplibregl.NavigationControl());
|
||||
<\/script>
|
||||
</body>
|
||||
</html>
|
||||
`),i=(Qr().s[9]++,new Blob([r],{type:"text/html;charset=utf-8"})),s=(Qr().s[10]++,this.exportName());Qr().s[11]++,uR.saveAs(i,s+".html")}async saveStyle(){Qr().f[3]++;const e=(Qr().s[12]++,this.tokenizedStyle());if(Qr().s[13]++,cR)Qr().b[2][1]++;else{Qr().b[2][0]++;const i=(Qr().s[14]++,new Blob([e],{type:"application/json;charset=utf-8"})),s=(Qr().s[15]++,this.exportName());Qr().s[16]++,uR.saveAs(i,s+".json"),Qr().s[17]++;return}let t=(Qr().s[18]++,this.props.fileHandle);if(Qr().s[19]++,t==null)if(Qr().b[3][0]++,Qr().s[20]++,t=await this.createFileHandle(),Qr().s[21]++,this.props.onSetFileHandle(t),Qr().s[22]++,t==null){Qr().b[4][0]++,Qr().s[23]++;return}else Qr().b[4][1]++;else Qr().b[3][1]++;const r=(Qr().s[24]++,await t.createWritable());Qr().s[25]++,await r.write(e),Qr().s[26]++,await r.close(),Qr().s[27]++,this.props.onOpenToggle()}async saveStyleAs(){Qr().f[4]++;const e=(Qr().s[28]++,this.tokenizedStyle()),t=(Qr().s[29]++,await this.createFileHandle());if(Qr().s[30]++,this.props.onSetFileHandle(t),Qr().s[31]++,t==null){Qr().b[5][0]++,Qr().s[32]++;return}else Qr().b[5][1]++;const r=(Qr().s[33]++,await t.createWritable());Qr().s[34]++,await r.write(e),Qr().s[35]++,await r.close(),Qr().s[36]++,this.props.onOpenToggle()}async createFileHandle(){Qr().f[5]++;const e=(Qr().s[37]++,{types:[{description:"json",accept:{"application/json":[".json"]}}],suggestedName:this.exportName()}),t=(Qr().s[38]++,await window.showSaveFilePicker(e));return Qr().s[39]++,this.props.onSetFileHandle(t),Qr().s[40]++,t}changeMetadataProperty(e,t){Qr().f[6]++;const r=(Qr().s[41]++,{...this.props.mapStyle,metadata:{...this.props.mapStyle.metadata,[e]:t}});Qr().s[42]++,this.props.onStyleChanged(r)}render(){Qr().f[7]++;const e=(Qr().s[43]++,this.props.t),t=(Qr().s[44]++,Rj(e));return Qr().s[45]++,ue.jsx(Y0,{"data-wd-key":"modal:export",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Save Style"),className:"maputnik-export-modal",children:ue.jsxs("section",{className:"maputnik-modal-section",children:[ue.jsx("h1",{children:e("Save Style")}),ue.jsx("p",{children:e("Save the JSON style to your computer.")}),ue.jsxs("div",{children:[ue.jsx(Np,{label:t.maputnik.maptiler_access_token.label,fieldSpec:t.maputnik.maptiler_access_token,value:(Qr().b[6][0]++,this.props.mapStyle.metadata||(Qr().b[6][1]++,{}))["maputnik:openmaptiles_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:openmaptiles_access_token")}),ue.jsx(Np,{label:t.maputnik.thunderforest_access_token.label,fieldSpec:t.maputnik.thunderforest_access_token,value:(Qr().b[7][0]++,this.props.mapStyle.metadata||(Qr().b[7][1]++,{}))["maputnik:thunderforest_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:thunderforest_access_token")}),ue.jsx(Np,{label:t.maputnik.stadia_access_token.label,fieldSpec:t.maputnik.stadia_access_token,value:(Qr().b[8][0]++,this.props.mapStyle.metadata||(Qr().b[8][1]++,{}))["maputnik:stadia_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:stadia_access_token")})]}),ue.jsxs("div",{className:"maputnik-modal-export-buttons",children:[ue.jsxs(Ha,{onClick:this.saveStyle.bind(this),children:[ue.jsx(WE,{}),e("Save")]}),(Qr().b[9][0]++,cR&&(Qr().b[9][1]++,ue.jsxs(Ha,{onClick:this.saveStyleAs.bind(this),children:[ue.jsx(WE,{}),e("Save as")]}))),ue.jsxs(Ha,{onClick:this.createHtml.bind(this),children:[ue.jsx(VV,{}),e("Create HTML")]})]})]})})}}const Xue=(Qr().s[46]++,zs()(Zue));function L2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",e="950dd35e62562a3439b74678b95f406e749c6958",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:139}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx"],names:[],mappings:"AAWM;AAXN,OAAO,WAAW;AAClB,OAAO,uBAA2E;AAClF,OAAO,cAAc;AAMrB,qBAAqB,0BAA0B,MAAM,UAAkC;AAAA,EACrF,SAAS;AACP,WAAO,oBAAC,YAAS,OAAO,KAAK,MAAM,OACjC,8BAAC,qBAAmB,GAAG,KAAK,OAAO,GACrC;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"950dd35e62562a3439b74678b95f406e749c6958"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var l=s[n];return L2=function(){return l},l}L2();class Uj extends Xn.Component{render(){return L2().f[0]++,L2().s[0]++,ue.jsx(EC,{label:this.props.label,children:ue.jsx(xj,{...this.props})})}}function U2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",e="a27c35e986d22656fa80c276efb67df518853ac2",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:132}}},fnMap:{0:{name:"(anonymous_0)",decl:{s
Line truncated
|
||||
`)>=0)return!1;return!0}function Ht(Ve,J){var ve;if(Ve.indent===" ")ve=" ";else if(typeof Ve.indent=="number"&&Ve.indent>0)ve=oe.call(Array(Ve.indent+1)," ");else return null;return{base:ve,prev:oe.call(Array(J+1),ve)}}function sn(Ve,J){if(Ve.length===0)return"";var ve=`
|
||||
`+J.prev+J.base;return ve+oe.call(Ve,","+ve)+`
|
||||
`+J.prev}function Hn(Ve,J){var ve=Ft(Ve),p=[];if(ve){p.length=Ve.length;for(var Fe=0;Fe<Ve.length;Fe++)p[Fe]=Kt(Ve,Fe)?J(Ve[Fe],Ve):""}var Qe=typeof me=="function"?me(Ve):[],rt;if(Ke){rt={};for(var ct=0;ct<Qe.length;ct++)rt["$"+Qe[ct]]=Qe[ct]}for(var dt in Ve)Kt(Ve,dt)&&(ve&&String(Number(dt))===dt&&dt<Ve.length||Ke&&rt["$"+dt]instanceof Symbol||(ne.call(/[^\w$]/,dt)?p.push(J(dt,Ve)+": "+J(Ve[dt],Ve)):p.push(dt+": "+J(Ve[dt],Ve))));if(typeof me=="function")for(var qt=0;qt<Qe.length;qt++)at.call(Ve,Qe[qt])&&p.push("["+J(Qe[qt])+"]: "+J(Ve[Qe[qt]],Ve));return p}return OS}var IS,yR;function KAe(){if(yR)return IS;yR=1;var n=e3(),e=qy(),t=function(o,f,y){for(var x=o,B;(B=x.next)!=null;x=B)if(B.key===f)return x.next=B.next,y||(B.next=o.next,o.next=B),B},r=function(o,f){if(o){var y=t(o,f);return y&&y.value}},i=function(o,f,y){var x=t(o,f);x?x.value=y:o.next={key:f,next:o.next,value:y}},s=function(o,f){return o?!!t(o,f):!1},l=function(o,f){if(o)return t(o,f,!0)};return IS=function(){var f,y={assert:function(x){if(!y.has(x))throw new e("Side channel does not contain "+n(x))},delete:function(x){var B=f&&f.next,O=l(f,x);return O&&B&&B===O&&(f=void 0),!!O},get:function(x){return r(f,x)},has:function(x){return s(f,x)},set:function(x,B){f||(f={next:void 0}),i(f,x,B)}};return y},IS}var kS,vR;function Gj(){return vR||(vR=1,kS=Object),kS}var TS,CR;function RAe(){return CR||(CR=1,TS=Error),TS}var PS,_R;function DAe(){return _R||(_R=1,PS=EvalError),PS}var KS,bR;function FAe(){return bR||(bR=1,KS=RangeError),KS}var RS,xR;function LAe(){return xR||(xR=1,RS=ReferenceError),RS}var DS,MR;function UAe(){return MR||(MR=1,DS=SyntaxError),DS}var FS,wR;function zAe(){return wR||(wR=1,FS=URIError),FS}var LS,SR;function jAe(){return SR||(SR=1,LS=Math.abs),LS}var US,ER;function NAe(){return ER||(ER=1,US=Math.floor),US}var zS,BR;function WAe(){return BR||(BR=1,zS=Math.max),zS}var jS,OR;function GAe(){return OR||(OR=1,jS=Math.min),jS}var NS,IR;function QAe(){return IR||(IR=1,NS=Math.pow),NS}var WS,kR;function YAe(){return kR||(kR=1,WS=Math.round),WS}var GS,TR;function qAe(){return TR||(TR=1,GS=Number.isNaN||function(e){return e!==e}),GS}var QS,PR;function VAe(){if(PR)return QS;PR=1;var n=qAe();return QS=function(t){return n(t)||t===0?t:t<0?-1:1},QS}var YS,KR;function $Ae(){return KR||(KR=1,YS=Object.getOwnPropertyDescriptor),YS}var qS,RR;function Qj(){if(RR)return qS;RR=1;var n=$Ae();if(n)try{n([],"length")}catch{n=null}return qS=n,qS}var VS,DR;function HAe(){if(DR)return VS;DR=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return VS=n,VS}var $S,FR;function ZAe(){return FR||(FR=1,$S=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var l=Object.getOwnPropertySymbols(e);if(l.length!==1||l[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0}),$S}var HS,LR;function XAe(){if(LR)return HS;LR=1;var n=typeof Symbol<"u"&&Symbol,e=ZAe();return HS=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},HS}var ZS,UR;function Yj(){return UR||(UR=1,ZS=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ZS}var XS,zR;function qj(){if(zR)return XS;zR=1;var n=Gj();return XS=n.getPrototypeOf||null,XS}var JS,jR;function JAe(){if(jR)return JS;jR=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,r="[object Function]",i=function(f,y){for(var x=[],B=0;B<f.length;B+=1)x[B]=f[B];for(var O=0;O<y.length;O+=1)x[O+f.length]=y[O];return x},s=function(f,y){for(var x=[],B=y,O=0;B<f.length;B+=1,O+=1)x[O]=f[B];return x},l=function(o,f){for(var y="",x=0;x<o.length;x+=1)y+=o[x],x+1<o.length&&(y+=f);return y};return JS=function(f){var y=this;if(typeof y!="function"||e.apply(y)!==r)throw new TypeError(n+y);for(var x=s(arguments,1),B,O=function(){if(this instanceof B){var Y=y.apply(this,i(x,arguments));return Object(Y)===Y?Y:this}return y.apply(f,i(x,arguments))},P=t(0,y.length-x.length),U=[],j=0;j<P;j++)U[j]="$"+j;if(B=Function("binder","return function ("+l(U,",")+"){ return binder.apply(this,arguments); }")(O),y.prototype){var N=function(){};N.prototype=y.prototype,B.prototype=new N,N.prototype=null}return B},JS}var eE,NR;function t3(){if(NR)return eE;NR=1;var n=JAe();return eE=Function.prototype.bind||n,eE}var tE,WR;function qO(){return WR||(WR=1,tE=Function.prototype.call),tE}var nE,GR;function Vj(){retu
Line truncated
|
||||
`," "],l=["{","}","|","\\","^","`"].concat(s),o=["'"].concat(l),f=["%","/","?",";","#"].concat(o),y=["/","?","#"],x=255,B=/^[+a-z0-9A-Z_-]{0,63}$/,O=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,P={javascript:!0,"javascript:":!0},U={javascript:!0,"javascript:":!0},j={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=uce();function Y(V,ne,G){if(V&&typeof V=="object"&&V instanceof e)return V;var oe=new e;return oe.parse(V,ne,G),oe}e.prototype.parse=function(V,ne,G){if(typeof V!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof V);var oe=V.indexOf("?"),he=oe!==-1&&oe<V.indexOf("#")?"?":"#",fe=V.split(he),Ee=/\\/g;fe[0]=fe[0].replace(Ee,"/"),V=fe.join(he);var me=V;if(me=me.trim(),!G&&V.split("#").length===1){var Se=i.exec(me);if(Se)return this.path=me,this.href=me,this.pathname=Se[1],Se[2]?(this.search=Se[2],ne?this.query=N.parse(this.search.substr(1)):this.query=this.search.substr(1)):ne&&(this.search="",this.query={}),this}var Ke=t.exec(me);if(Ke){Ke=Ke[0];var xe=Ke.toLowerCase();this.protocol=xe,me=me.substr(Ke.length)}if(G||Ke||me.match(/^\/\/[^@/]+@[^@/]+/)){var at=me.substr(0,2)==="//";at&&!(Ke&&U[Ke])&&(me=me.substr(2),this.slashes=!0)}if(!U[Ke]&&(at||Ke&&!j[Ke])){for(var Ze=-1,Je=0;Je<y.length;Je++){var Ne=me.indexOf(y[Je]);Ne!==-1&&(Ze===-1||Ne<Ze)&&(Ze=Ne)}var we,De;Ze===-1?De=me.lastIndexOf("@"):De=me.lastIndexOf("@",Ze),De!==-1&&(we=me.slice(0,De),me=me.slice(De+1),this.auth=decodeURIComponent(we)),Ze=-1;for(var Je=0;Je<f.length;Je++){var Ne=me.indexOf(f[Je]);Ne!==-1&&(Ze===-1||Ne<Ze)&&(Ze=Ne)}Ze===-1&&(Ze=me.length),this.host=me.slice(0,Ze),me=me.slice(Ze),this.parseHost(),this.hostname=this.hostname||"";var He=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!He)for(var bt=this.hostname.split(/\./),Je=0,Yt=bt.length;Je<Yt;Je++){var yt=bt[Je];if(yt&&!yt.match(B)){for(var Ft="",Pt=0,Ue=yt.length;Pt<Ue;Pt++)yt.charCodeAt(Pt)>127?Ft+="x":Ft+=yt[Pt];if(!Ft.match(B)){var Pe=bt.slice(0,Je),Be=bt.slice(Je+1),it=yt.match(O);it&&(Pe.push(it[1]),Be.unshift(it[2])),Be.length&&(me="/"+Be.join(".")+me),this.hostname=Pe.join(".");break}}}this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),He||(this.hostname=n.toASCII(this.hostname));var _t=this.port?":"+this.port:"",pt=this.hostname||"";this.host=pt+_t,this.href+=this.host,He&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),me[0]!=="/"&&(me="/"+me))}if(!P[xe])for(var Je=0,Yt=o.length;Je<Yt;Je++){var Lt=o[Je];if(me.indexOf(Lt)!==-1){var nn=encodeURIComponent(Lt);nn===Lt&&(nn=escape(Lt)),me=me.split(Lt).join(nn)}}var Kt=me.indexOf("#");Kt!==-1&&(this.hash=me.substr(Kt),me=me.slice(0,Kt));var vn=me.indexOf("?");if(vn!==-1?(this.search=me.substr(vn),this.query=me.substr(vn+1),ne&&(this.query=N.parse(this.query)),me=me.slice(0,vn)):ne&&(this.search="",this.query={}),me&&(this.pathname=me),j[xe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _t=this.pathname||"",Gn=this.search||"";this.path=_t+Gn}return this.href=this.format(),this};function H(V){return typeof V=="string"&&(V=Y(V)),V instanceof e?V.format():e.prototype.format.call(V)}e.prototype.format=function(){var V=this.auth||"";V&&(V=encodeURIComponent(V),V=V.replace(/%3A/i,":"),V+="@");var ne=this.protocol||"",G=this.pathname||"",oe=this.hash||"",he=!1,fe="";this.host?he=V+this.host:this.hostname&&(he=V+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(he+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(fe=N.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var Ee=this.search||fe&&"?"+fe||"";return ne&&ne.substr(-1)!==":"&&(ne+=":"),this.slashes||(!ne||j[ne])&&he!==!1?(he="//"+(he||""),G&&G.charAt(0)!=="/"&&(G="/"+G)):he||(he=""),oe&&oe.charAt(0)!=="#"&&(oe="#"+oe),Ee&&Ee.charAt(0)!=="?"&&(Ee="?"+Ee),G=G.replace(/[?#]/g,function(me){return encodeURIComponent(me)}),Ee=Ee.replace("#","%23"),ne+he+G+Ee+oe};function se(V,ne){return Y(V,!1,!0).resolve(ne)}e.prototype.resolve=function(V){return this.resolveObject(Y(V,!1,!0)).format()};function re(V,ne){return V?Y(V,!1,!0).resolveObject(ne):ne}return e.prototype.resolveObject=function(V){if(typeof V=="string"){var ne=new e;ne.parse(V,!1,!0),V=ne}for(var G=new e,oe=Object.keys(this),he=0;he<oe.length;he++){var fe=oe[he];G[fe]=this[fe]}if(G.hash=V.hash,V.href==="")return G.href=G.format(),G;if(V.slashes&&!V.protocol){for(var Ee=Object.keys(V),me=0;me<Ee.length;me++){var Se=Ee[me];Se!=="protocol"&&(G[Se]=V[Se])}return j[G.protocol]&&G.hostname&&!G.pathname&&(G.pathname="/",G.path=G.pathname),G.href=G.format(),G}if(V.protocol&&V.protocol!==G.protocol){if(!j[V.protocol]){for(var Ke=Object.keys(V),xe=0;xe<Ke.length;xe++){var at=Ke[xe];G[at]=V[at]}return G.href=G.format(),G}if(G.protocol=V.protocol,!V.host&&!U[V.protocol]){for(var Yt=(V.pathname||"").split("/");Yt.length&&!(V.host=Yt.shift()););V.host||(V.host=""),V.hostname
Line truncated
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */var P6=function(n,e){return P6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])},P6(n,e)};function iN(n,e){P6(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Cce(n){var e=typeof Symbol=="function"&&n[Symbol.iterator],t=0;return e?e.call(n):{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}function _ce(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),i,s=[],l;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){l={error:o}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(l)throw l.error}}return s}function bce(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(_ce(arguments[e]));return n}var oN=function(){function n(e,t){this.target=t,this.type=e}return n}(),xce=function(n){iN(e,n);function e(t,r){var i=n.call(this,"error",r)||this;return i.message=t.message,i.error=t,i}return e}(oN),Mce=function(n){iN(e,n);function e(t,r,i){t===void 0&&(t=1e3),r===void 0&&(r="");var s=n.call(this,"close",i)||this;return s.wasClean=!0,s.code=t,s.reason=r,s}return e}(oN);/*!
|
||||
* Reconnecting WebSocket
|
||||
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
||||
* https://github.com/pladaria/reconnecting-websocket
|
||||
* License MIT
|
||||
*/var wce=function(){if(typeof WebSocket<"u")return WebSocket},Sce=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},mg={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},Ece=function(){function n(e,t,r){var i=this;r===void 0&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(s){i._debug("open event");var l=i._options.minUptime,o=l===void 0?mg.minUptime:l;clearTimeout(i._connectTimeout),i._uptimeTimeout=setTimeout(function(){return i._acceptOpen()},o),i._ws.binaryType=i._binaryType,i._messageQueue.forEach(function(f){return i._ws.send(f)}),i._messageQueue=[],i.onopen&&i.onopen(s),i._listeners.open.forEach(function(f){return i._callEventListener(s,f)})},this._handleMessage=function(s){i._debug("message event"),i.onmessage&&i.onmessage(s),i._listeners.message.forEach(function(l){return i._callEventListener(s,l)})},this._handleError=function(s){i._debug("error event",s.message),i._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),i.onerror&&i.onerror(s),i._debug("exec error listeners"),i._listeners.error.forEach(function(l){return i._callEventListener(s,l)}),i._connect()},this._handleClose=function(s){i._debug("close event"),i._clearTimeouts(),i._shouldReconnect&&i._connect(),i.onclose&&i.onclose(s),i._listeners.close.forEach(function(l){return i._callEventListener(s,l)})},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,r){return typeof r=="string"?t+=r.length:r instanceof Blob?t+=r.size:t+=r.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=t===void 0?mg.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,r,i=this._listeners[e.type];if(i)try{for(var s=Cce(i),l=s.next();!l.done;l=s.next()){var o=l.value;this._callEventListener(e,o)}}catch(f){t={error:f}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListeneLine truncated
|
||||
//# sourceMappingURL=index-CKBjFUTc.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"mappings":"2+CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASa,IAAIA,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,cAAc,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,SAAS,SAASC,EAAEC,GAAE,CAAC,OAAUA,KAAP,MAAqB,OAAOA,IAAlB,SAA2B,MAAKA,GAAEF,GAAGE,GAAEF,CAAC,GAAGE,GAAE,YAAY,EAAqB,OAAOA,IAApB,WAAsBA,GAAE,KAAI,CAC1e,IAAIC,EAAE,CAAC,UAAU,UAAU,CAAO,QAAE,EAAE,mBAAmB,UAAU,CAAC,EAAE,oBAAoB,UAAU,CAAC,EAAE,gBAAgB,UAAU,CAAC,GAAGC,EAAE,OAAO,OAAOC,EAAE,CAAC,EAAE,SAASC,EAAEJ,GAAEK,GAAEC,GAAE,CAAC,KAAK,MAAMN,GAAE,KAAK,QAAQK,GAAE,KAAK,KAAKF,EAAE,KAAK,QAAQG,IAAGL,CAAC,CAACG,EAAE,UAAU,iBAAiB,CAAC,EACpQA,EAAE,UAAU,SAAS,SAASJ,GAAEK,GAAE,CAAI,GAAW,OAAOL,IAAlB,UAAkC,OAAOA,IAApB,YAA6BA,IAAN,KAAc,YAAM,uHAAuH,EAAE,KAAK,QAAQ,gBAAgB,KAAKA,GAAEK,GAAE,UAAU,CAAC,EAAED,EAAE,UAAU,YAAY,SAASJ,GAAE,CAAC,KAAK,QAAQ,mBAAmB,KAAKA,GAAE,aAAa,CAAC,EAAE,SAASO,GAAG,CAAC,CAACA,EAAE,UAAUH,EAAE,UAAU,SAASI,EAAER,GAAEK,GAAEC,GAAE,CAAC,KAAK,MAAMN,GAAE,KAAK,QAAQK,GAAE,KAAK,KAAKF,EAAE,KAAK,QAAQG,IAAGL,CAAC,CAAC,IAAIQ,GAAED,EAAE,UAAU,IAAID,EACrfE,GAAE,YAAYD,EAAEN,EAAEO,GAAEL,EAAE,SAAS,EAAEK,GAAE,qBAAqB,GAAG,IAAIC,GAAE,MAAM,QAAQC,EAAE,OAAO,UAAU,eAAeC,GAAE,CAAC,QAAQ,MAAMC,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,EAAE,EACxK,SAASC,GAAEd,GAAEK,GAAEC,GAAE,CAAC,IAAIS,GAAEC,GAAE,GAAGC,GAAE,KAAKC,GAAE,KAAK,GAASb,IAAN,KAAY,IAAAU,MAAcV,GAAE,MAAX,SAAiBa,GAAEb,GAAE,KAAcA,GAAE,MAAX,SAAiBY,GAAE,GAAGZ,GAAE,KAAKA,GAAIM,EAAA,KAAKN,GAAEU,EAAC,GAAG,CAACF,EAAE,eAAeE,EAAC,IAAIC,GAAED,EAAC,EAAEV,GAAEU,EAAC,GAAO,IAAAI,GAAE,UAAU,OAAO,EAAK,GAAIA,KAAJ,EAAMH,GAAE,SAASV,WAAU,EAAEa,GAAE,CAAC,QAAQC,GAAE,MAAMD,EAAC,EAAEE,GAAE,EAAEA,GAAEF,GAAEE,KAAMD,GAAAC,EAAC,EAAE,UAAUA,GAAE,CAAC,EAAEL,GAAE,SAASI,EAAA,CAAE,GAAGpB,IAAGA,GAAE,aAAiB,IAAAe,MAAKI,GAAEnB,GAAE,aAAamB,GAAWH,GAAED,EAAC,IAAZ,SAAgBC,GAAED,EAAC,EAAEI,GAAEJ,EAAC,GAAG,MAAM,CAAC,SAAS5B,EAAE,KAAKa,GAAE,IAAIiB,GAAE,IAAIC,GAAE,MAAMF,GAAE,OAAOJ,GAAE,OAAO,CAAC,CAC7a,SAASU,GAAEtB,GAAEK,GAAE,CAAC,MAAM,CAAC,SAASlB,EAAE,KAAKa,GAAE,KAAK,IAAIK,GAAE,IAAIL,GAAE,IAAI,MAAMA,GAAE,MAAM,OAAOA,GAAE,MAAM,CAAC,CAAC,SAASuB,GAAEvB,GAAE,CAAC,OAAiB,OAAOA,IAAlB,UAA4BA,KAAP,MAAUA,GAAE,WAAWb,CAAC,CAAC,SAASqC,GAAOxB,GAAE,CAAC,IAAIK,GAAE,CAAC,IAAI,KAAK,IAAI,IAAI,EAAE,MAAM,IAAIL,GAAE,QAAQ,QAAQ,SAASA,GAAE,CAAC,OAAOK,GAAEL,EAAC,EAAE,CAAC,CAAC,IAAIyB,GAAE,OAAO,SAASC,GAAE1B,GAAEK,GAAE,CAAC,OAAiB,OAAOL,IAAlB,UAA4BA,KAAP,MAAgBA,GAAE,KAAR,KAAYwB,GAAO,GAAGxB,GAAE,GAAG,EAAEK,GAAE,SAAS,EAAE,CAAC,CAC/W,SAASsB,GAAE3B,GAAEK,GAAEC,GAAES,GAAEC,GAAE,CAAC,IAAIC,GAAE,OAAOjB,IAAmBiB,KAAd,aAA6BA,KAAZ,aAAgBjB,GAAA,MAAK,IAAIkB,GAAE,GAAM,GAAOlB,KAAP,KAAWkB,GAAA,eAAeD,GAAE,CAAC,IAAK,SAAS,IAAK,SAAWC,GAAA,GAAG,MAAM,IAAK,SAAS,OAAOlB,GAAE,SAAS,CAAC,KAAKb,EAAE,KAAKC,EAAI8B,GAAA,GAAE,CAAE,GAAGA,GAAS,OAAAA,GAAElB,GAAEgB,GAAEA,GAAEE,EAAC,EAAElB,GAAOe,KAAL,GAAO,IAAIW,GAAER,GAAE,CAAC,EAAEH,GAAEL,GAAEM,EAAC,GAAGV,GAAE,GAASN,IAAN,OAAUM,GAAEN,GAAE,QAAQyB,GAAE,KAAK,EAAE,KAAKE,GAAEX,GAAEX,GAAEC,GAAE,GAAG,SAASN,GAAE,CAAQA,SAAA,CAAE,GAASgB,IAAN,OAAUO,GAAEP,EAAC,IAAIA,GAAEM,GAAEN,GAAEV,IAAG,CAACU,GAAE,KAAKE,IAAGA,GAAE,MAAMF,GAAE,IAAI,IAAI,GAAGA,GAAE,KAAK,QAAQS,GAAE,KAAK,EAAE,KAAKzB,EAAC,GAAGK,GAAE,KAAKW,EAAC,GAAG,EAA4B,GAAxBE,GAAA,EAAIH,GAAKA,KAAL,GAAO,IAAIA,GAAE,IAAOL,GAAEV,EAAC,EAAE,QAAQmB,GAAE,EAAEA,GAAEnB,GAAE,OAAOmB,KAAI,CAACF,GACrfjB,GAAEmB,EAAC,EAAE,IAAIC,GAAEL,GAAEW,GAAET,GAAEE,EAAC,EAAED,IAAGS,GAAEV,GAAEZ,GAAEC,GAAEc,GAAEJ,EAAC,UAAUI,GAAErB,EAAEC,EAAC,EAAe,OAAOoB,IAApB,WAAsB,IAAIpB,GAAEoB,GAAE,KAAKpB,EAAC,EAAEmB,GAAE,EAAE,EAAEF,GAAEjB,GAAE,KAAK,GAAG,MAAQiB,MAAE,MAAMG,GAAEL,GAAEW,GAAET,GAAEE,IAAG,EAAED,IAAGS,GAAEV,GAAEZ,GAAEC,GAAEc,GAAEJ,EAAC,UAAqBC,KAAX,SAAmB,MAAAZ,GAAE,OAAOL,EAAC,EAAE,MAAM,mDAAuEK,KAApB,kBAAsB,qBAAqB,OAAO,KAAKL,EAAC,EAAE,KAAK,IAAI,EAAE,IAAIK,IAAG,2EAA2E,EAAS,OAAAa,EAAC,CACzZ,SAASU,GAAE5B,GAAEK,GAAEC,GAAE,CAAI,GAAMN,IAAN,KAAe,OAAAA,GAAM,IAAAe,GAAE,GAAGC,GAAE,EAAE,OAAAW,GAAE3B,GAAEe,GAAE,GAAG,GAAG,SAASf,GAAE,CAAC,OAAOK,GAAE,KAAKC,GAAEN,GAAEgB,IAAG,EAAE,EAASD,EAAC,CAAC,SAASc,GAAE7B,GAAE,CAAI,GAAKA,GAAE,UAAP,GAAe,CAAC,IAAIK,GAAEL,GAAE,QAAQK,GAAEA,GAAE,EAAIA,GAAA,KAAK,SAASA,GAAE,EAAQL,GAAE,UAAN,GAAoBA,GAAE,UAAP,MAAiBA,GAAA,QAAQ,EAAEA,GAAE,QAAQK,GAAC,EAAE,SAASA,GAAE,EAAQL,GAAE,UAAN,GAAoBA,GAAE,UAAP,MAAiBA,GAAA,QAAQ,EAAEA,GAAE,QAAQK,GAAA,CAAE,EAAOL,GAAE,UAAP,KAAiBA,GAAE,QAAQ,EAAEA,GAAE,QAAQK,GAAA,CAAG,GAAOL,GAAE,UAAN,EAAc,OAAOA,GAAE,QAAQ,QAAQ,MAAMA,GAAE,OAAQ,CAC5Z,IAAI8B,GAAE,CAAC,QAAQ,IAAI,EAAEC,GAAE,CAAC,WAAW,IAAI,EAAEC,GAAE,CAAC,uBAAuBF,GAAE,wBAAwBC,GAAE,kBAAkBnB,EAAC,EAAE,SAASqB,IAAG,CAAC,MAAM,MAAM,0DAA0D,CAAE,CACzM,OAAAC,GAAA,SAAiB,CAAC,IAAIN,GAAE,QAAQ,SAAS5B,GAAEK,GAAEC,GAAE,CAACsB,GAAE5B,GAAE,UAAU,CAAGK,GAAA,MAAM,KAAK,SAAS,GAAGC,EAAC,CAAC,EAAE,MAAM,SAASN,GAAE,CAAC,IAAIK,GAAE,EAAE,OAAAuB,GAAE5B,GAAE,UAAU,CAACK,IAAA,CAAI,EAASA,EAAC,EAAE,QAAQ,SAASL,GAAE,CAAQ,OAAA4B,GAAE5B,GAAE,SAASA,GAAE,CAAQA,SAAE,IAAG,CAAC,CAAC,EAAE,KAAK,SAASA,GAAE,CAAC,GAAG,CAACuB,GAAEvB,EAALine truncated
|
||||
{"version":3,"mappings":"mhDAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASa,IAAIA,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,cAAc,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,SAAS,SAASC,EAAEC,GAAE,CAAC,OAAUA,KAAP,MAAqB,OAAOA,IAAlB,SAA2B,MAAKA,GAAEF,GAAGE,GAAEF,CAAC,GAAGE,GAAE,YAAY,EAAqB,OAAOA,IAApB,WAAsBA,GAAE,KAAI,CAC1e,IAAIC,EAAE,CAAC,UAAU,UAAU,CAAO,QAAE,EAAE,mBAAmB,UAAU,CAAC,EAAE,oBAAoB,UAAU,CAAC,EAAE,gBAAgB,UAAU,CAAC,GAAGC,EAAE,OAAO,OAAOC,EAAE,CAAC,EAAE,SAASC,EAAEJ,GAAEK,GAAEC,GAAE,CAAC,KAAK,MAAMN,GAAE,KAAK,QAAQK,GAAE,KAAK,KAAKF,EAAE,KAAK,QAAQG,IAAGL,CAAC,CAACG,EAAE,UAAU,iBAAiB,CAAC,EACpQA,EAAE,UAAU,SAAS,SAASJ,GAAEK,GAAE,CAAI,GAAW,OAAOL,IAAlB,UAAkC,OAAOA,IAApB,YAA6BA,IAAN,KAAc,YAAM,uHAAuH,EAAE,KAAK,QAAQ,gBAAgB,KAAKA,GAAEK,GAAE,UAAU,CAAC,EAAED,EAAE,UAAU,YAAY,SAASJ,GAAE,CAAC,KAAK,QAAQ,mBAAmB,KAAKA,GAAE,aAAa,CAAC,EAAE,SAASO,GAAG,CAAC,CAACA,EAAE,UAAUH,EAAE,UAAU,SAASI,EAAER,GAAEK,GAAEC,GAAE,CAAC,KAAK,MAAMN,GAAE,KAAK,QAAQK,GAAE,KAAK,KAAKF,EAAE,KAAK,QAAQG,IAAGL,CAAC,CAAC,IAAIQ,GAAED,EAAE,UAAU,IAAID,EACrfE,GAAE,YAAYD,EAAEN,EAAEO,GAAEL,EAAE,SAAS,EAAEK,GAAE,qBAAqB,GAAG,IAAIC,GAAE,MAAM,QAAQC,EAAE,OAAO,UAAU,eAAeC,GAAE,CAAC,QAAQ,MAAMC,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,EAAE,EACxK,SAASC,GAAEd,GAAEK,GAAEC,GAAE,CAAC,IAAIS,GAAEC,GAAE,GAAGC,GAAE,KAAKC,GAAE,KAAK,GAASb,IAAN,KAAY,IAAAU,MAAcV,GAAE,MAAX,SAAiBa,GAAEb,GAAE,KAAcA,GAAE,MAAX,SAAiBY,GAAE,GAAGZ,GAAE,KAAKA,GAAIM,EAAA,KAAKN,GAAEU,EAAC,GAAG,CAACF,EAAE,eAAeE,EAAC,IAAIC,GAAED,EAAC,EAAEV,GAAEU,EAAC,GAAO,IAAAI,GAAE,UAAU,OAAO,EAAK,GAAIA,KAAJ,EAAMH,GAAE,SAASV,WAAU,EAAEa,GAAE,CAAC,QAAQC,GAAE,MAAMD,EAAC,EAAEE,GAAE,EAAEA,GAAEF,GAAEE,KAAMD,GAAAC,EAAC,EAAE,UAAUA,GAAE,CAAC,EAAEL,GAAE,SAASI,EAAA,CAAE,GAAGpB,IAAGA,GAAE,aAAiB,IAAAe,MAAKI,GAAEnB,GAAE,aAAamB,GAAWH,GAAED,EAAC,IAAZ,SAAgBC,GAAED,EAAC,EAAEI,GAAEJ,EAAC,GAAG,MAAM,CAAC,SAAS5B,EAAE,KAAKa,GAAE,IAAIiB,GAAE,IAAIC,GAAE,MAAMF,GAAE,OAAOJ,GAAE,OAAO,CAAC,CAC7a,SAASU,GAAEtB,GAAEK,GAAE,CAAC,MAAM,CAAC,SAASlB,EAAE,KAAKa,GAAE,KAAK,IAAIK,GAAE,IAAIL,GAAE,IAAI,MAAMA,GAAE,MAAM,OAAOA,GAAE,MAAM,CAAC,CAAC,SAASuB,GAAEvB,GAAE,CAAC,OAAiB,OAAOA,IAAlB,UAA4BA,KAAP,MAAUA,GAAE,WAAWb,CAAC,CAAC,SAASqC,GAAOxB,GAAE,CAAC,IAAIK,GAAE,CAAC,IAAI,KAAK,IAAI,IAAI,EAAE,MAAM,IAAIL,GAAE,QAAQ,QAAQ,SAASA,GAAE,CAAC,OAAOK,GAAEL,EAAC,EAAE,CAAC,CAAC,IAAIyB,GAAE,OAAO,SAASC,GAAE1B,GAAEK,GAAE,CAAC,OAAiB,OAAOL,IAAlB,UAA4BA,KAAP,MAAgBA,GAAE,KAAR,KAAYwB,GAAO,GAAGxB,GAAE,GAAG,EAAEK,GAAE,SAAS,EAAE,CAAC,CAC/W,SAASsB,GAAE3B,GAAEK,GAAEC,GAAES,GAAEC,GAAE,CAAC,IAAIC,GAAE,OAAOjB,IAAmBiB,KAAd,aAA6BA,KAAZ,aAAgBjB,GAAA,MAAK,IAAIkB,GAAE,GAAM,GAAOlB,KAAP,KAAWkB,GAAA,eAAeD,GAAE,CAAC,IAAK,SAAS,IAAK,SAAWC,GAAA,GAAG,MAAM,IAAK,SAAS,OAAOlB,GAAE,SAAS,CAAC,KAAKb,EAAE,KAAKC,EAAI8B,GAAA,GAAE,CAAE,GAAGA,GAAS,OAAAA,GAAElB,GAAEgB,GAAEA,GAAEE,EAAC,EAAElB,GAAOe,KAAL,GAAO,IAAIW,GAAER,GAAE,CAAC,EAAEH,GAAEL,GAAEM,EAAC,GAAGV,GAAE,GAASN,IAAN,OAAUM,GAAEN,GAAE,QAAQyB,GAAE,KAAK,EAAE,KAAKE,GAAEX,GAAEX,GAAEC,GAAE,GAAG,SAASN,GAAE,CAAQA,SAAA,CAAE,GAASgB,IAAN,OAAUO,GAAEP,EAAC,IAAIA,GAAEM,GAAEN,GAAEV,IAAG,CAACU,GAAE,KAAKE,IAAGA,GAAE,MAAMF,GAAE,IAAI,IAAI,GAAGA,GAAE,KAAK,QAAQS,GAAE,KAAK,EAAE,KAAKzB,EAAC,GAAGK,GAAE,KAAKW,EAAC,GAAG,EAA4B,GAAxBE,GAAA,EAAIH,GAAKA,KAAL,GAAO,IAAIA,GAAE,IAAOL,GAAEV,EAAC,EAAE,QAAQmB,GAAE,EAAEA,GAAEnB,GAAE,OAAOmB,KAAI,CAACF,GACrfjB,GAAEmB,EAAC,EAAE,IAAIC,GAAEL,GAAEW,GAAET,GAAEE,EAAC,EAAED,IAAGS,GAAEV,GAAEZ,GAAEC,GAAEc,GAAEJ,EAAC,UAAUI,GAAErB,EAAEC,EAAC,EAAe,OAAOoB,IAApB,WAAsB,IAAIpB,GAAEoB,GAAE,KAAKpB,EAAC,EAAEmB,GAAE,EAAE,EAAEF,GAAEjB,GAAE,KAAK,GAAG,MAAQiB,MAAE,MAAMG,GAAEL,GAAEW,GAAET,GAAEE,IAAG,EAAED,IAAGS,GAAEV,GAAEZ,GAAEC,GAAEc,GAAEJ,EAAC,UAAqBC,KAAX,SAAmB,MAAAZ,GAAE,OAAOL,EAAC,EAAE,MAAM,mDAAuEK,KAApB,kBAAsB,qBAAqB,OAAO,KAAKL,EAAC,EAAE,KAAK,IAAI,EAAE,IAAIK,IAAG,2EAA2E,EAAS,OAAAa,EAAC,CACzZ,SAASU,GAAE5B,GAAEK,GAAEC,GAAE,CAAI,GAAMN,IAAN,KAAe,OAAAA,GAAM,IAAAe,GAAE,GAAGC,GAAE,EAAE,OAAAW,GAAE3B,GAAEe,GAAE,GAAG,GAAG,SAASf,GAAE,CAAC,OAAOK,GAAE,KAAKC,GAAEN,GAAEgB,IAAG,EAAE,EAASD,EAAC,CAAC,SAASc,GAAE7B,GAAE,CAAI,GAAKA,GAAE,UAAP,GAAe,CAAC,IAAIK,GAAEL,GAAE,QAAQK,GAAEA,GAAE,EAAIA,GAAA,KAAK,SAASA,GAAE,EAAQL,GAAE,UAAN,GAAoBA,GAAE,UAAP,MAAiBA,GAAA,QAAQ,EAAEA,GAAE,QAAQK,GAAC,EAAE,SAASA,GAAE,EAAQL,GAAE,UAAN,GAAoBA,GAAE,UAAP,MAAiBA,GAAA,QAAQ,EAAEA,GAAE,QAAQK,GAAA,CAAE,EAAOL,GAAE,UAAP,KAAiBA,GAAE,QAAQ,EAAEA,GAAE,QAAQK,GAAA,CAAG,GAAOL,GAAE,UAAN,EAAc,OAAOA,GAAE,QAAQ,QAAQ,MAAMA,GAAE,OAAQ,CAC5Z,IAAI8B,GAAE,CAAC,QAAQ,IAAI,EAAEC,GAAE,CAAC,WAAW,IAAI,EAAEC,GAAE,CAAC,uBAAuBF,GAAE,wBAAwBC,GAAE,kBAAkBnB,EAAC,EAAE,SAASqB,IAAG,CAAC,MAAM,MAAM,0DAA0D,CAAE,CACzM,OAAAC,GAAA,SAAiB,CAAC,IAAIN,GAAE,QAAQ,SAAS5B,GAAEK,GAAEC,GAAE,CAACsB,GAAE5B,GAAE,UAAU,CAAGK,GAAA,MAAM,KAAK,SAAS,GAAGC,EAAC,CAAC,EAAE,MAAM,SAASN,GAAE,CAAC,IAAIK,GAAE,EAAE,OAAAuB,GAAE5B,GAAE,UAAU,CAACK,IAAA,CAAI,EAASA,EAAC,EAAE,QAAQ,SAASL,GAAE,CAAQ,OAAA4B,GAAE5B,GAAE,SAASA,GAAE,CAAQA,SAAE,IAAG,CAAC,CAAC,EAAE,KAAK,SAASA,GAAE,CAAC,GAAG,CAACuB,GAAEvB,EAALine truncated
|
||||
@@ -1,997 +0,0 @@
|
||||
var _Q=Object.defineProperty;var bQ=(n,e,t)=>e in n?_Q(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Pn=(n,e,t)=>bQ(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function Al(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function GB(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var o4={exports:{}},Ov={},s4={exports:{}},vs={},M7;function xQ(){if(M7)return vs;M7=1;/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),B=Symbol.iterator;function O(Fe){return Fe===null||typeof Fe!="object"?null:(Fe=B&&Fe[B]||Fe["@@iterator"],typeof Fe=="function"?Fe:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,j={};function N(Fe,He,bt){this.props=Fe,this.context=He,this.refs=j,this.updater=bt||T}N.prototype.isReactComponent={},N.prototype.setState=function(Fe,He){if(typeof Fe!="object"&&typeof Fe!="function"&&Fe!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Fe,He,"setState")},N.prototype.forceUpdate=function(Fe){this.updater.enqueueForceUpdate(this,Fe,"forceUpdate")};function q(){}q.prototype=N.prototype;function H(Fe,He,bt){this.props=Fe,this.context=He,this.refs=j,this.updater=bt||T}var oe=H.prototype=new q;oe.constructor=H,F(oe,N.prototype),oe.isPureReactComponent=!0;var ne=Array.isArray,$=Object.prototype.hasOwnProperty,te={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function ie(Fe,He,bt){var Yt,gt={},Lt=null,Kt=null;if(He!=null)for(Yt in He.ref!==void 0&&(Kt=He.ref),He.key!==void 0&&(Lt=""+He.key),He)$.call(He,Yt)&&!G.hasOwnProperty(Yt)&&(gt[Yt]=He[Yt]);var Ue=arguments.length-2;if(Ue===1)gt.children=bt;else if(1<Ue){for(var Pe=Array(Ue),Be=0;Be<Ue;Be++)Pe[Be]=arguments[Be+2];gt.children=Pe}if(Fe&&Fe.defaultProps)for(Yt in Ue=Fe.defaultProps,Ue)gt[Yt]===void 0&&(gt[Yt]=Ue[Yt]);return{$$typeof:n,type:Fe,key:Lt,ref:Kt,props:gt,_owner:te.current}}function he(Fe,He){return{$$typeof:n,type:Fe.type,key:He,ref:Fe.ref,props:Fe.props,_owner:Fe._owner}}function pe(Fe){return typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===n}function Ee(Fe){var He={"=":"=0",":":"=2"};return"$"+Fe.replace(/[=:]/g,function(bt){return He[bt]})}var me=/\/+/g;function Se(Fe,He){return typeof Fe=="object"&&Fe!==null&&Fe.key!=null?Ee(""+Fe.key):He.toString(36)}function De(Fe,He,bt,Yt,gt){var Lt=typeof Fe;(Lt==="undefined"||Lt==="boolean")&&(Fe=null);var Kt=!1;if(Fe===null)Kt=!0;else switch(Lt){case"string":case"number":Kt=!0;break;case"object":switch(Fe.$$typeof){case n:case e:Kt=!0}}if(Kt)return Kt=Fe,gt=gt(Kt),Fe=Yt===""?"."+Se(Kt,0):Yt,ne(gt)?(bt="",Fe!=null&&(bt=Fe.replace(me,"$&/")+"/"),De(gt,He,bt,"",function(Be){return Be})):gt!=null&&(pe(gt)&&(gt=he(gt,bt+(!gt.key||Kt&&Kt.key===gt.key?"":(""+gt.key).replace(me,"$&/")+"/")+Fe)),He.push(gt)),1;if(Kt=0,Yt=Yt===""?".":Yt+":",ne(Fe))for(var Ue=0;Ue<Fe.length;Ue++){Lt=Fe[Ue];var Pe=Yt+Se(Lt,Ue);Kt+=De(Lt,He,bt,Pe,gt)}else if(Pe=O(Fe),typeof Pe=="function")for(Fe=Pe.call(Fe),Ue=0;!(Lt=Fe.next()).done;)Lt=Lt.value,Pe=Yt+Se(Lt,Ue++),Kt+=De(Lt,He,bt,Pe,gt);else if(Lt==="object")throw He=String(Fe),Error("Objects are not valid as a React child (found: "+(He==="[object Object]"?"object with keys {"+Object.keys(Fe).join(", ")+"}":He)+"). If you meant to render a collection of children, use an array instead.");return Kt}function be(Fe,He,bt){if(Fe==null)return Fe;var Yt=[],gt=0;return De(Fe,Yt,"","",function(Lt){return He.call(bt,Lt,gt++)}),Yt}function at(Fe){if(Fe._status===-1){var He=Fe._result;He=He(),He.then(function(bt){(Fe._status===0||Fe._status===-1)&&(Fe._status=1,Fe._result=bt)},function(bt){(Fe._status===0||Fe._status===-1)&&(Fe._status=2,Fe._result=bt)}),Fe._status===-1&&(Fe._status=0,Fe._result=He)}if(Fe._status===1)return Fe._result.default;throw Fe._result}var Ze={current:null},Je={transition:null},We={ReactCurrentDispatcher:Ze,ReactCurrentBatchConfig:Je,ReactCurrentOwner:te};function Me(){throw Error("act(...) is not supported in production builds of React.")}return vs.Children={map:be,forEach:function(Fe,He,bt){be(Fe,function(){He.apply(this,arguments)},bt)},count:function(Fe){var He=0;return be(Fe,function(){He++}),He},toArray:function(Fe){return be(Fe,function(He){return He})||[]},only:function(Fe){if(!pe(Fe))throw Error("React.Children.only expected to receive a single React element child.");return Fe}},vs.Component=N,vs.Fragment=t,vs.Profiler=i,vs.PureComponent=H,vs.StrictMode=r,vs.Suspense=f,vs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=We,vs.act=Me,vs.cloneElement=function(Fe,He,bt){if(Fe==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+Fe+".");var Yt=F({},Fe.props),gt=Fe.key,Lt=Fe.ref,Kt=Fe._owner;if(He!=null){if(He.ref!==void 0&&(Lt=He.ref,Kt=te.current),He.key!==void 0&&(gt=""+He.key),Fe.type&&Fe.type.defaultProps)var Ue=Fe.type.defaultProps;for(Pe in He)$.call(He,Pe)&&!G.hasOwnProperty(Pe)&&(Yt[Pe]=He[Pe]===void 0&&Ue!==void 0?Ue[Pe]:He[Pe])}var Pe=arguments.lengthLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var E7;function wQ(){if(E7)return Ov;E7=1;var n=ja(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(o,f,y){var x,B={},O=null,T=null;y!==void 0&&(O=""+y),f.key!==void 0&&(O=""+f.key),f.ref!==void 0&&(T=f.ref);for(x in f)r.call(f,x)&&!s.hasOwnProperty(x)&&(B[x]=f[x]);if(o&&o.defaultProps)for(x in f=o.defaultProps,f)B[x]===void 0&&(B[x]=f[x]);return{$$typeof:e,type:o,key:O,ref:T,props:B,_owner:i.current}}return Ov.Fragment=t,Ov.jsx=a,Ov.jsxs=a,Ov}var B7;function MQ(){return B7||(B7=1,o4.exports=wQ()),o4.exports}var ue=MQ(),ui=ja();const nr=Al(ui);var eL={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},C6=nr.createContext&&nr.createContext(eL),SQ=["attr","size","title"];function EQ(n,e){if(n==null)return{};var t=BQ(n,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function BQ(n,e){if(n==null)return{};var t={};for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){if(e.indexOf(r)>=0)continue;t[r]=n[r]}return t}function p2(){return p2=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},p2.apply(this,arguments)}function O7(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function m2(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?O7(Object(t),!0).forEach(function(r){OQ(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):O7(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function OQ(n,e,t){return e=IQ(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function IQ(n){var e=kQ(n,"string");return typeof e=="symbol"?e:e+""}function kQ(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function tL(n){return n&&n.map((e,t)=>nr.createElement(e.tag,m2({key:t},e.attr),tL(e.child)))}function Hl(n){return e=>nr.createElement(TQ,p2({attr:m2({},n.attr)},e),tL(n.child))}function TQ(n){var e=t=>{var{attr:r,size:i,title:s}=n,a=EQ(n,SQ),o=i||t.size||"1em",f;return t.className&&(f=t.className),n.className&&(f=(f?f+" ":"")+n.className),nr.createElement("svg",p2({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,a,{className:f,style:m2(m2({color:n.color||t.color},t.style),n.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),s&&nr.createElement("title",null,s),n.children)};return C6!==void 0?nr.createElement(C6.Consumer,null,t=>e(t)):e(eL)}var ab={},a4={exports:{}},hh={},l4={exports:{}},u4={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var I7;function PQ(){return I7||(I7=1,function(n){function e(Je,We){var Me=Je.length;Je.push(We);e:for(;0<Me;){var Fe=Me-1>>>1,He=Je[Fe];if(0<i(He,We))Je[Fe]=We,Je[Me]=He,Me=Fe;else break e}}function t(Je){return Je.length===0?null:Je[0]}function r(Je){if(Je.length===0)return null;var We=Je[0],Me=Je.pop();if(Me!==We){Je[0]=Me;e:for(var Fe=0,He=Je.length,bt=He>>>1;Fe<bt;){var Yt=2*(Fe+1)-1,gt=Je[Yt],Lt=Yt+1,Kt=Je[Lt];if(0>i(gt,Me))Lt<He&&0>i(Kt,gt)?(Je[Fe]=Kt,Je[Lt]=Me,Fe=Lt):(Je[Fe]=gt,Je[Yt]=Me,Fe=Yt);else if(Lt<He&&0>i(Kt,Me))Je[Fe]=Kt,Je[Lt]=Me,Fe=Lt;else break e}}return We}function i(Je,We){var Me=Je.sortIndex-We.sortIndex;return Me!==0?Me:Je.id-We.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();n.unstable_now=function(){return a.now()-o}}var f=[],y=[],x=1,B=null,O=3,T=!1,F=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function oe(Je){for(var We=t(y);We!==null;){if(We.callback===null)r(y);else if(We.startTime<=Je)r(y),We.sortIndex=We.expirationTime,e(f,We);else break;We=t(y)}}function ne(Je){if(j=!1,oe(Je),!F)if(t(f)!==null)F=!0,at($);else{var We=t(y);We!==null&&Ze(ne,We.startTime-Je)}}function $(Je,We){F=!1,j&&(j=!1,q(ie),ie=-1),T=!0;var Me=O;try{for(oe(We),B=t(f);B!==null&&(!(B.expirationTime>We)||Je&&!Ee());){var Fe=B.callback;if(typeof Fe=="function"){B.callback=null,O=B.priorityLevel;var He=Fe(B.expirationTime<=We);We=n.unstable_now(),typeof He=="function"?B.callback=He:B===t(f)&&r(f),oe(We)}else r(f);B=t(f)}if(B!==null)var bt=!0;else{var Yt=t(y);Yt!==null&&Ze(ne,Yt.startTime-We),bt=!1}return bt}finally{B=null,O=Me,T=!1}}var te=!1,G=null,ie=-1,he=5,pe=-1;function Ee(){return!(n.unstable_now()-pe<he)}function me(){if(G!==null){var Je=n.unstable_now();pe=Je;var We=!0;try{We=G(!0,Je)}finally{We?Se():(te=!1,G=null)}}else te=!1}var Se;if(typeof H=="function")Se=function(){H(me)};else if(typeof MessageChannel<"u"){var De=new MessageChannel,be=De.port2;De.port1.onmessage=me,Se=function(){be.postMessage(null)}}else Se=function(){N(me,0)};function at(Je){G=Je,te||(te=!0,Se())}function Ze(Je,We){ie=N(function(){Je(n.unstable_now())},We)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Je){Je.callback=null},n.unstable_continueExecution=function(){F||T||(F=!0,at($))},n.unstable_forceFrameRate=function(Je){0>Je||125<Je?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<Je?Math.floor(1e3/Je):5},n.unstable_getCurrentPriorityLevel=function(){return O},n.unstable_getFirstCallbackNode=function(){return t(f)},n.unstable_next=function(Je){switch(O){case 1:case 2:case 3:var We=3;break;default:We=O}var Me=O;O=We;try{return Je()}finally{O=Me}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(Je,We){switch(Je){case 1:case 2:case 3:case 4:case 5:break;default:Je=3}var Me=O;O=Je;try{return We()}finally{O=Me}},n.unstable_scheduleCallback=function(Je,We,Me){var Fe=n.unstable_now();switch(typeof Me=="object"&&Me!==null?(Me=Me.delay,Me=typeof Me=="number"&&0<Me?Fe+Me:Fe):Me=Fe,Je){case 1:var He=-1;break;case 2:He=250;break;case 5:He=1073741823;break;case 4:He=1e4;break;default:He=5e3}return He=Me+He,Je={id:x++,callback:We,priorityLevel:Je,startTime:Me,expirationTime:He,sortIndex:-1},Me>Fe?(Je.sortIndex=Me,e(y,Je),t(f)===null&&Je===t(y)&&(j?(q(ie),ie=-1):j=!0,Ze(ne,Me-Fe))):(Je.sortIndex=He,e(f,Je),F||T||(F=!0,at($))),Je},n.unstable_shouldYield=Ee,n.unstable_wrapCallback=function(Je){var We=O;return function(){var Me=O;O=We;try{return Je.apply(this,arguments)}finally{O=Me}}}}(u4)),u4}var k7;function KQ(){return k7||(k7=1,l4.exports=PQ()),l4.exports}/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var T7;function DQ(){if(T7)return hh;T7=1;var n=ja(),e=KQ();function t(m){for(var C="https://reactjs.org/docs/error-decoder.html?invariant="+m,R=1;R<arguments.length;R++)C+="&args[]="+encodeURIComponent(arguments[R]);return"Minified React error #"+m+"; visit "+C+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(m,C){a(m,C),a(m+"Capture",C)}function a(m,C){for(i[m]=C,m=0;m<C.length;m++)r.add(C[m])}var o=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,x={},B={};function O(m){return f.call(B,m)?!0:f.call(x,m)?!1:y.test(m)?B[m]=!0:(x[m]=!0,!1)}function T(m,C,R,Q){if(R!==null&&R.type===0)return!1;switch(typeof C){case"function":case"symbol":return!0;case"boolean":return Q?!1:R!==null?!R.acceptsBooleans:(m=m.toLowerCase().slice(0,5),m!=="data-"&&m!=="aria-");default:return!1}}function F(m,C,R,Q){if(C===null||typeof C>"u"||T(m,C,R,Q))return!0;if(Q)return!1;if(R!==null)switch(R.type){case 3:return!C;case 4:return C===!1;case 5:return isNaN(C);case 6:return isNaN(C)||1>C}return!1}function j(m,C,R,Q,le,ge,tt){this.acceptsBooleans=C===2||C===3||C===4,this.attributeName=Q,this.attributeNamespace=le,this.mustUseProperty=R,this.propertyName=m,this.type=C,this.sanitizeURL=ge,this.removeEmptyString=tt}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(m){N[m]=new j(m,0,!1,m,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(m){var C=m[0];N[C]=new j(C,1,!1,m[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(m){N[m]=new j(m,2,!1,m.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(m){N[m]=new j(m,2,!1,m,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(m){N[m]=new j(m,3,!1,m.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(m){N[m]=new j(m,3,!0,m,null,!1,!1)}),["capture","download"].forEach(function(m){N[m]=new j(m,4,!1,m,null,!1,!1)}),["cols","rows","size","span"].forEach(function(m){N[m]=new j(m,6,!1,m,null,!1,!1)}),["rowSpan","start"].forEach(function(m){N[m]=new j(m,5,!1,m.toLowerCase(),null,!1,!1)});var q=/[\-:]([a-z])/g;function H(m){return m[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(m){var C=m.replace(q,H);N[C]=new j(C,1,!1,m,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(m){var C=m.replace(q,H);N[C]=new j(C,1,!1,m,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(m){var C=m.replace(q,H);N[C]=new j(C,1,!1,m,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(m){N[m]=new j(m,1,!1,m.toLowerCase(),null,!1,!1)}),N.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(m){N[m]=new j(m,1,!1,m.toLowerCase(),null,!0,!0)});function oe(m,C,R,Q){var le=N.hasOwnProperty(C)?N[C]:null;(le!==null?le.type!==0:Q||!(2<C.length)||C[0]!=="o"&&C[0]!=="O"||C[1]!=="
Line truncated
|
||||
`+Fe+m}var bt=!1;function Yt(m,C){if(!m||bt)return"";bt=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(C)if(C=function(){throw Error()},Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[])}catch(xn){var Q=xn}Reflect.construct(m,[],C)}else{try{C.call()}catch(xn){Q=xn}m.call(C.prototype)}else{try{throw Error()}catch(xn){Q=xn}m()}}catch(xn){if(xn&&Q&&typeof xn.stack=="string"){for(var le=xn.stack.split(`
|
||||
`),ge=Q.stack.split(`
|
||||
`),tt=le.length-1,It=ge.length-1;1<=tt&&0<=It&&le[tt]!==ge[It];)It--;for(;1<=tt&&0<=It;tt--,It--)if(le[tt]!==ge[It]){if(tt!==1||It!==1)do if(tt--,It--,0>It||le[tt]!==ge[It]){var Wt=`
|
||||
`+le[tt].replace(" at new "," at ");return m.displayName&&Wt.includes("<anonymous>")&&(Wt=Wt.replace("<anonymous>",m.displayName)),Wt}while(1<=tt&&0<=It);break}}}finally{bt=!1,Error.prepareStackTrace=R}return(m=m?m.displayName||m.name:"")?He(m):""}function gt(m){switch(m.tag){case 5:return He(m.type);case 16:return He("Lazy");case 13:return He("Suspense");case 19:return He("SuspenseList");case 0:case 2:case 15:return m=Yt(m.type,!1),m;case 11:return m=Yt(m.type.render,!1),m;case 1:return m=Yt(m.type,!0),m;default:return""}}function Lt(m){if(m==null)return null;if(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case G:return"Fragment";case te:return"Portal";case he:return"Profiler";case ie:return"StrictMode";case Se:return"Suspense";case De:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case Ee:return(m.displayName||"Context")+".Consumer";case pe:return(m._context.displayName||"Context")+".Provider";case me:var C=m.render;return m=m.displayName,m||(m=C.displayName||C.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case be:return C=m.displayName||null,C!==null?C:Lt(m.type)||"Memo";case at:C=m._payload,m=m._init;try{return Lt(m(C))}catch{}}return null}function Kt(m){var C=m.type;switch(m.tag){case 24:return"Cache";case 9:return(C.displayName||"Context")+".Consumer";case 10:return(C._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return m=C.render,m=m.displayName||m.name||"",C.displayName||(m!==""?"ForwardRef("+m+")":"ForwardRef");case 7:return"Fragment";case 5:return C;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Lt(C);case 8:return C===ie?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C}return null}function Ue(m){switch(typeof m){case"boolean":case"number":case"string":case"undefined":return m;case"object":return m;default:return""}}function Pe(m){var C=m.type;return(m=m.nodeName)&&m.toLowerCase()==="input"&&(C==="checkbox"||C==="radio")}function Be(m){var C=Pe(m)?"checked":"value",R=Object.getOwnPropertyDescriptor(m.constructor.prototype,C),Q=""+m[C];if(!m.hasOwnProperty(C)&&typeof R<"u"&&typeof R.get=="function"&&typeof R.set=="function"){var le=R.get,ge=R.set;return Object.defineProperty(m,C,{configurable:!0,get:function(){return le.call(this)},set:function(tt){Q=""+tt,ge.call(this,tt)}}),Object.defineProperty(m,C,{enumerable:R.enumerable}),{getValue:function(){return Q},setValue:function(tt){Q=""+tt},stopTracking:function(){m._valueTracker=null,delete m[C]}}}}function it(m){m._valueTracker||(m._valueTracker=Be(m))}function _t(m){if(!m)return!1;var C=m._valueTracker;if(!C)return!0;var R=C.getValue(),Q="";return m&&(Q=Pe(m)?m.checked?"true":"false":m.value),m=Q,m!==R?(C.setValue(m),!0):!1}function ft(m){if(m=m||(typeof document<"u"?document:void 0),typeof m>"u")return null;try{return m.activeElement||m.body}catch{return m.body}}function Ut(m,C){var R=C.checked;return Me({},C,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:R??m._wrapperState.initialChecked})}function rn(m,C){var R=C.defaultValue==null?"":C.defaultValue,Q=C.checked!=null?C.checked:C.defaultChecked;R=Ue(C.value!=null?C.value:R),m._wrapperState={initialChecked:Q,initialValue:R,controlled:C.type==="checkbox"||C.type==="radio"?C.checked!=null:C.value!=null}}function Dt(m,C){C=C.checked,C!=null&&oe(m,"checked",C,!1)}function _n(m,C){Dt(m,C);var R=Ue(C.value),Q=C.type;if(R!=null)Q==="number"?(R===0&&m.value===""||m.value!=R)&&(m.value=""+R):m.value!==""+R&&(m.value=""+R);else if(Q==="submit"||Q==="reset"){m.removeAttribute("value");return}C.hasOwnProperty("value")?tn(m,C.type,R):C.hasOwnProperty("defaultValue")&&tn(m,C.type,Ue(C.defaultValue)),C.checked==null&&C.defaultChecked!=null&&(m.defaultChecked=!!C.defaultChecked)}function qn(m,C,R){if(C.hasOwnProperty("value")||C.hasOwnProperty("defaultValue")){var Q=C.type;if(!(Q!=="submit"&&Q!=="reset"||C.value!==void 0&&C.value!==null))return;C=""+m._wrapperState.initialValue,R||C===m.value||(m.value=C),m.defaultValue=C}R=m.name,R!==""&&(m.name=""),m.defaultChecked=!!m._wrapperState.initialChecked,R!==""&&(m.name=R)}function tn(m,C,R){(C!=="number"||ft(m.ownerDocument)!==m)&&(R==null?m.defaultValue=""+m._wrapperState.initialValue:m.defaultValue!==""+R&&(m.defaultValue=""+R))}var rr=Array.isArray;function Dn(m,C,R,Q){if(m=m.options,C){C={};for(var le=0;le<R.length;le++)C["$"+R[le]]=!0;for(R=0;R<m.length;R++)le=C.hasOwnProperty("$"+m[R].value),m[R].selected!==le&&(m[R].selected=le),le&&Q&&(m[R].defaultSelected=!0)}else{for(R=""+Ue(R),C=null,le=0;le<m.length;le++){if(m[le].value===R){m[le].selected=!0,Q&&(m[le].defaultSelected=!0);return}C!==null||m[le].disabled||(C=m[le])}C!==null&&(C.selecte
Line truncated
|
||||
`).replace(fA,"")}function nd(m,C,R){if(C=Bd(C),Bd(m)!==C&&R)throw Error(t(425))}function Tc(){}var DA=null,dl=null;function pA(m,C){return m==="textarea"||m==="noscript"||typeof C.children=="string"||typeof C.children=="number"||typeof C.dangerouslySetInnerHTML=="object"&&C.dangerouslySetInnerHTML!==null&&C.dangerouslySetInnerHTML.__html!=null}var hl=typeof setTimeout=="function"?setTimeout:void 0,Ac=typeof clearTimeout=="function"?clearTimeout:void 0,$u=typeof Promise=="function"?Promise:void 0,Od=typeof queueMicrotask=="function"?queueMicrotask:typeof $u<"u"?function(m){return $u.resolve(null).then(m).catch(rd)}:hl;function rd(m){setTimeout(function(){throw m})}function RA(m,C){var R=C,Q=0;do{var le=R.nextSibling;if(m.removeChild(R),le&&le.nodeType===8)if(R=le.data,R==="/$"){if(Q===0){m.removeChild(le),Di(C);return}Q--}else R!=="$"&&R!=="$?"&&R!=="$!"||Q++;R=le}while(R);Di(C)}function cc(m){for(;m!=null;m=m.nextSibling){var C=m.nodeType;if(C===1||C===3)break;if(C===8){if(C=m.data,C==="$"||C==="$!"||C==="$?")break;if(C==="/$")return null}}return m}function Vu(m){m=m.previousSibling;for(var C=0;m;){if(m.nodeType===8){var R=m.data;if(R==="$"||R==="$!"||R==="$?"){if(C===0)return m;C--}else R==="/$"&&C++}m=m.previousSibling}return null}var Hu=Math.random().toString(36).slice(2),FA="__reactFiber$"+Hu,Pc="__reactProps$"+Hu,wu="__reactContainer$"+Hu,Rh="__reactEvents$"+Hu,ot="__reactListeners$"+Hu,LA="__reactHandles$"+Hu;function ko(m){var C=m[FA];if(C)return C;for(var R=m.parentNode;R;){if(C=R[wu]||R[FA]){if(R=C.alternate,C.child!==null||R!==null&&R.child!==null)for(m=Vu(m);m!==null;){if(R=m[FA])return R;m=Vu(m)}return C}m=R,R=m.parentNode}return null}function mi(m){return m=m[FA]||m[wu],!m||m.tag!==5&&m.tag!==6&&m.tag!==13&&m.tag!==3?null:m}function ii(m){if(m.tag===5||m.tag===6)return m.stateNode;throw Error(t(33))}function os(m){return m[Pc]||null}var mA=[],eh=-1;function ka(m){return{current:m}}function zs(m){0>eh||(m.current=mA[eh],mA[eh]=null,eh--)}function Es(m,C){eh++,mA[eh]=m.current,m.current=C}var Kc={},ia=ka(Kc),Aa=ka(!1),hr=Kc;function Id(m,C){var R=m.type.contextTypes;if(!R)return Kc;var Q=m.stateNode;if(Q&&Q.__reactInternalMemoizedUnmaskedChildContext===C)return Q.__reactInternalMemoizedMaskedChildContext;var le={},ge;for(ge in R)le[ge]=C[ge];return Q&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=C,m.__reactInternalMemoizedMaskedChildContext=le),le}function ya(m){return m=m.childContextTypes,m!=null}function kd(){zs(Aa),zs(ia)}function Td(m,C,R){if(ia.current!==Kc)throw Error(t(168));Es(ia,C),Es(Aa,R)}function dc(m,C,R){var Q=m.stateNode;if(C=C.childContextTypes,typeof Q.getChildContext!="function")return R;Q=Q.getChildContext();for(var le in Q)if(!(le in C))throw Error(t(108,Kt(m)||"Unknown",le));return Me({},R,Q)}function ru(m){return m=(m=m.stateNode)&&m.__reactInternalMemoizedMergedChildContext||Kc,hr=ia.current,Es(ia,m),Es(Aa,Aa.current),!0}function Ji(m,C,R){var Q=m.stateNode;if(!Q)throw Error(t(169));R?(m=dc(m,C,hr),Q.__reactInternalMemoizedMergedChildContext=m,zs(Aa),zs(ia),Es(ia,m)):zs(Aa),Es(Aa,R)}var fl=null,Fh=!1,Dc=!1;function UA(m){fl===null?fl=[m]:fl.push(m)}function Rc(m){Fh=!0,UA(m)}function zA(){if(!Dc&&fl!==null){Dc=!0;var m=0,C=Rr;try{var R=fl;for(Rr=1;m<R.length;m++){var Q=R[m];do Q=Q(!0);while(Q!==null)}fl=null,Fh=!1}catch(le){throw fl!==null&&(fl=fl.slice(m+1)),Ea(Zl,zA),le}finally{Rr=C,Dc=!1}}return null}var hc=[],bs=0,Fo=null,iu=0,Qa=[],qa=0,Nl=null,Lo=1,Mu="";function fc(m,C){hc[bs++]=iu,hc[bs++]=Fo,Fo=m,iu=C}function th(m,C,R){Qa[qa++]=Lo,Qa[qa++]=Mu,Qa[qa++]=Nl,Nl=m;var Q=Lo;m=Mu;var le=32-vn(Q)-1;Q&=~(1<<le),R+=1;var ge=32-vn(C)+le;if(30<ge){var tt=le-le%5;ge=(Q&(1<<tt)-1).toString(32),Q>>=tt,le-=tt,Lo=1<<32-vn(C)+le|R<<le|Q,Mu=ge+m}else Lo=1<<ge|R<<le|Q,Mu=m}function jA(m){m.return!==null&&(fc(m,1),th(m,1,0))}function pc(m){for(;m===Fo;)Fo=hc[--bs],hc[bs]=null,iu=hc[--bs],hc[bs]=null;for(;m===Nl;)Nl=Qa[--qa],Qa[qa]=null,Mu=Qa[--qa],Qa[qa]=null,Lo=Qa[--qa],Qa[qa]=null}var Ta=null,xs=null,fs=!1,Pr=null;function Hr(m,C){var R=xA(5,null,null,0);R.elementType="DELETED",R.stateNode=C,R.return=m,C=m.deletions,C===null?(m.deletions=[R],m.flags|=16):C.push(R)}function NA(m,C){switch(m.tag){case 5:var R=m.type;return C=C.nodeType!==1||R.toLowerCase()!==C.nodeName.toLowerCase()?null:C,C!==null?(m.stateNode=C,Ta=m,xs=cc(C.firstChild),!0):!1;case 6:return C=m.pendingProps===""||C.nodeType!==3?null:C,C!==null?(m.stateNode=C,Ta=m,xs=null,!0):!1;case 13:return C=C.nodeType!==8?null:C,C!==null?(R=Nl!==null?{id:Lo,overflow:Mu}:null,m.memoizedState={dehydrated:C,treeContext:R,retryLane:1073741824},R=xA(18,null,null,0),R.stateNode=C,R.return=m,m.child=R,Ta=m,xs=null,!0):!1;default:return!1}}function Su(m){return(m.mode&1)!==0&&(m.flags&128)===0}function pl(m){if(fs){var C=xs;if(C){var R=C;if(!NA(m,C)){if(Su(m))throw Error(t(418));C=cc(R.nextSibling);var Q=Ta;C&&NA(m,C)?Hr(Q,R):(m.flags=m.flags&-4097|2,fs=!1,Ta=m)}}else{if(Su(m))throw Error(t(418));m.flags=m.flags&-4097|
Line truncated
|
||||
Error generating stack: `+ge.message+`
|
||||
`+ge.stack}return{value:m,source:C,stack:le,digest:null}}function ah(m,C,R){return{value:m,source:null,stack:R??null,digest:C??null}}function Rd(m,C){try{console.error(C.value)}catch(R){setTimeout(function(){throw R})}}var _f=typeof WeakMap=="function"?WeakMap:Map;function lh(m,C,R){R=l(-1,R),R.tag=3,R.payload={element:null};var Q=C.value;return R.callback=function(){t0||(t0=!0,lp=Q),Rd(m,C)},R}function bf(m,C,R){R=l(-1,R),R.tag=3;var Q=m.type.getDerivedStateFromError;if(typeof Q=="function"){var le=C.value;R.payload=function(){return Q(le)},R.callback=function(){Rd(m,C)}}var ge=m.stateNode;return ge!==null&&typeof ge.componentDidCatch=="function"&&(R.callback=function(){Rd(m,C),typeof Q!="function"&&(Nh===null?Nh=new Set([this]):Nh.add(this));var tt=C.stack;this.componentDidCatch(C.value,{componentStack:tt!==null?tt:""})}),R}function ip(m,C,R){var Q=m.pingCache;if(Q===null){Q=m.pingCache=new _f;var le=new Set;Q.set(C,le)}else le=Q.get(C),le===void 0&&(le=new Set,Q.set(C,le));le.has(R)||(le.add(R),m=mv.bind(null,m,C,R),C.then(m,m))}function Cm(m){do{var C;if((C=m.tag===13)&&(C=m.memoizedState,C=C!==null?C.dehydrated!==null:!0),C)return m;m=m.return}while(m!==null);return null}function Fd(m,C,R,Q,le){return m.mode&1?(m.flags|=65536,m.lanes=le,m):(m===C?m.flags|=65536:(m.flags|=128,R.flags|=131072,R.flags&=-52805,R.tag===1&&(R.alternate===null?R.tag=17:(C=l(-1,1),C.tag=2,c(R,C,1))),R.lanes|=1),m)}var xf=ne.ReactCurrentOwner,Ol=!1;function cu(m,C,R,Q){C.child=m===null?Fc(C,null,R,Q):js(C,m.child,R,Q)}function Rp(m,C,R,Q,le){R=R.render;var ge=C.ref;return su(C,le),Q=pr(m,C,R,Q,ge,le),R=Ti(),m!==null&&!Ol?(C.updateQueue=m.updateQueue,C.flags&=-2053,m.lanes&=~le,Iu(m,C,le)):(fs&&R&&jA(C),C.flags|=1,cu(m,C,Q,le),C.child)}function Fp(m,C,R,Q,le){if(m===null){var ge=R.type;return typeof ge=="function"&&!qh(ge)&&ge.defaultProps===void 0&&R.compare===null&&R.defaultProps===void 0?(C.tag=15,C.type=ge,qo(m,C,ge,Q,le)):(m=l0(R.type,null,Q,C,C.mode,le),m.ref=C.ref,m.return=C,C.child=m)}if(ge=m.child,!(m.lanes&le)){var tt=ge.memoizedProps;if(R=R.compare,R=R!==null?R:Fr,R(tt,Q)&&m.ref===C.ref)return Iu(m,C,le)}return C.flags|=1,m=_c(ge,Q),m.ref=C.ref,m.return=C,C.child=m}function qo(m,C,R,Q,le){if(m!==null){var ge=m.memoizedProps;if(Fr(ge,Q)&&m.ref===C.ref)if(Ol=!1,C.pendingProps=Q=ge,(m.lanes&le)!==0)m.flags&131072&&(Ol=!0);else return C.lanes=m.lanes,Iu(m,C,le)}return uh(m,C,R,Q,le)}function Uh(m,C,R){var Q=C.pendingProps,le=Q.children,ge=m!==null?m.memoizedState:null;if(Q.mode==="hidden")if(!(C.mode&1))C.memoizedState={baseLanes:0,cachePool:null,transitions:null},Es(ku,Bs),Bs|=R;else{if(!(R&1073741824))return m=ge!==null?ge.baseLanes|R:R,C.lanes=C.childLanes=1073741824,C.memoizedState={baseLanes:m,cachePool:null,transitions:null},C.updateQueue=null,Es(ku,Bs),Bs|=m,null;C.memoizedState={baseLanes:0,cachePool:null,transitions:null},Q=ge!==null?ge.baseLanes:R,Es(ku,Bs),Bs|=Q}else ge!==null?(Q=ge.baseLanes|R,C.memoizedState=null):Q=R,Es(ku,Bs),Bs|=Q;return cu(m,C,le,R),C.child}function du(m,C){var R=C.ref;(m===null&&R!==null||m!==null&&m.ref!==R)&&(C.flags|=512,C.flags|=2097152)}function uh(m,C,R,Q,le){var ge=ya(R)?hr:ia.current;return ge=Id(C,ge),su(C,le),R=pr(m,C,R,Q,ge,le),Q=Ti(),m!==null&&!Ol?(C.updateQueue=m.updateQueue,C.flags&=-2053,m.lanes&=~le,Iu(m,C,le)):(fs&&Q&&jA(C),C.flags|=1,cu(m,C,R,le),C.child)}function Ju(m,C,R,Q,le){if(ya(R)){var ge=!0;ru(C)}else ge=!1;if(su(C,le),C.stateNode===null)Lp(m,C),ih(C,R,Q),oh(C,R,Q,le),Q=!0;else if(m===null){var tt=C.stateNode,It=C.memoizedProps;tt.props=It;var Wt=tt.context,xn=R.contextType;typeof xn=="object"&&xn!==null?xn=au(xn):(xn=ya(R)?hr:ia.current,xn=Id(C,xn));var Ar=R.getDerivedStateFromProps,Cr=typeof Ar=="function"||typeof tt.getSnapshotBeforeUpdate=="function";Cr||typeof tt.UNSAFE_componentWillReceiveProps!="function"&&typeof tt.componentWillReceiveProps!="function"||(It!==Q||Wt!==xn)&&Lh(C,tt,Q,xn),Sl=!1;var ir=C.memoizedState;tt.state=ir,P(C,Q,tt,le),Wt=C.memoizedState,It!==Q||ir!==Wt||Aa.current||Sl?(typeof Ar=="function"&&(Cf(C,R,Ar,Q),Wt=C.memoizedState),(It=Sl||rp(C,R,It,Q,ir,Wt,xn))?(Cr||typeof tt.UNSAFE_componentWillMount!="function"&&typeof tt.componentWillMount!="function"||(typeof tt.componentWillMount=="function"&&tt.componentWillMount(),typeof tt.UNSAFE_componentWillMount=="function"&&tt.UNSAFE_componentWillMount()),typeof tt.componentDidMount=="function"&&(C.flags|=4194308)):(typeof tt.componentDidMount=="function"&&(C.flags|=4194308),C.memoizedProps=Q,C.memoizedState=Wt),tt.props=Q,tt.state=Wt,tt.context=xn,Q=It):(typeof tt.componentDidMount=="function"&&(C.flags|=4194308),Q=!1)}else{tt=C.stateNode,I(m,C),It=C.memoizedProps,xn=C.type===C.elementType?It:ml(C.type,It),tt.props=xn,Cr=C.pendingProps,ir=tt.context,Wt=R.contextType,typeof Wt=="object"&&Wt!==null?Wt=au(Wt):(Wt=ya(R)?hr:ia.current,Wt=Id(C,Wt));var qr=R.getDerivedStateFromProps;(Ar=typeof qr=="function"||typeof tt.getSnapshotBeforeUpdate=="function")||typeof tt.UNSAFE_componentWillReceiveProps!
Line truncated
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/var cI;function rY(){return cI||(cI=1,function(n){const e=tY(),t=nY(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=o,n.SlowBuffer=H,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=s(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const Qe=new Uint8Array(1),ce={foo:function(){return 42}};return Object.setPrototypeOf(ce,Uint8Array.prototype),Object.setPrototypeOf(Qe,ce),Qe.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(Qe){if(Qe>i)throw new RangeError('The value "'+Qe+'" is invalid for option "size"');const ce=new Uint8Array(Qe);return Object.setPrototypeOf(ce,o.prototype),ce}function o(Qe,ce,fe){if(typeof Qe=="number"){if(typeof ce=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(Qe)}return f(Qe,ce,fe)}o.poolSize=8192;function f(Qe,ce,fe){if(typeof Qe=="string")return O(Qe,ce);if(ArrayBuffer.isView(Qe))return F(Qe);if(Qe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Qe);if(pn(Qe,ArrayBuffer)||Qe&&pn(Qe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pn(Qe,SharedArrayBuffer)||Qe&&pn(Qe.buffer,SharedArrayBuffer)))return j(Qe,ce,fe);if(typeof Qe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const nt=Qe.valueOf&&Qe.valueOf();if(nt!=null&&nt!==Qe)return o.from(nt,ce,fe);const St=N(Qe);if(St)return St;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Qe[Symbol.toPrimitive]=="function")return o.from(Qe[Symbol.toPrimitive]("string"),ce,fe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Qe)}o.from=function(Qe,ce,fe){return f(Qe,ce,fe)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function y(Qe){if(typeof Qe!="number")throw new TypeError('"size" argument must be of type number');if(Qe<0)throw new RangeError('The value "'+Qe+'" is invalid for option "size"')}function x(Qe,ce,fe){return y(Qe),Qe<=0?a(Qe):ce!==void 0?typeof fe=="string"?a(Qe).fill(ce,fe):a(Qe).fill(ce):a(Qe)}o.alloc=function(Qe,ce,fe){return x(Qe,ce,fe)};function B(Qe){return y(Qe),a(Qe<0?0:q(Qe)|0)}o.allocUnsafe=function(Qe){return B(Qe)},o.allocUnsafeSlow=function(Qe){return B(Qe)};function O(Qe,ce){if((typeof ce!="string"||ce==="")&&(ce="utf8"),!o.isEncoding(ce))throw new TypeError("Unknown encoding: "+ce);const fe=oe(Qe,ce)|0;let nt=a(fe);const St=nt.write(Qe,ce);return St!==fe&&(nt=nt.slice(0,St)),nt}function T(Qe){const ce=Qe.length<0?0:q(Qe.length)|0,fe=a(ce);for(let nt=0;nt<ce;nt+=1)fe[nt]=Qe[nt]&255;return fe}function F(Qe){if(pn(Qe,Uint8Array)){const ce=new Uint8Array(Qe);return j(ce.buffer,ce.byteOffset,ce.byteLength)}return T(Qe)}function j(Qe,ce,fe){if(ce<0||Qe.byteLength<ce)throw new RangeError('"offset" is outside of buffer bounds');if(Qe.byteLength<ce+(fe||0))throw new RangeError('"length" is outside of buffer bounds');let nt;return ce===void 0&&fe===void 0?nt=new Uint8Array(Qe):fe===void 0?nt=new Uint8Array(Qe,ce):nt=new Uint8Array(Qe,ce,fe),Object.setPrototypeOf(nt,o.prototype),nt}function N(Qe){if(o.isBuffer(Qe)){const ce=q(Qe.length)|0,fe=a(ce);return fe.length===0||Qe.copy(fe,0,0,ce),fe}if(Qe.length!==void 0)return typeof Qe.length!="number"||Zn(Qe.length)?a(0):T(Qe);if(Qe.type==="Buffer"&&Array.isArray(Qe.data))return T(Qe.data)}function q(Qe){if(Qe>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return Qe|0}function H(Qe){return+Qe!=Qe&&(Qe=0),o.alloc(+Qe)}o.isBuffer=function(ce){return ce!=null&&ce._isBuffer===!0&&ce!==o.prototype},o.compare=function(ce,fe){if(pn(ce,Uint8Array)&&(ce=o.from(ce,ce.offset,ce.byteLength)),pn(fe,Uint8Array)&&(fe=o.from(fe,fe.offset,fe.byteLength)),!o.isBuffer(ce)||!o.isBuffer(fe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ce===fe)return 0;let nt=ce.length,St=fe.length;for(let Ht=0,sn=Math.min(nt,St);Ht<sn;++Ht)if(ce[Ht]!==fe[Ht]){nt=ce[Ht],St=fe[Ht];break}return nt<St?-1:St<nt?1:0},o.isEncoding=function(ce){switch(String(ce).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(ce,fe){if(!Array.isArray(ce))throw new TypeError('"list" argument must be an Array of BuLine truncated
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/var uY=Gv.exports,hI;function AY(){return hI||(hI=1,function(n,e){(function(){var t,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",o="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",y=500,x="__lodash_placeholder__",B=1,O=2,T=4,F=1,j=2,N=1,q=2,H=4,oe=8,ne=16,$=32,te=64,G=128,ie=256,he=512,pe=30,Ee="...",me=800,Se=16,De=1,be=2,at=3,Ze=1/0,Je=9007199254740991,We=17976931348623157e292,Me=NaN,Fe=4294967295,He=Fe-1,bt=Fe>>>1,Yt=[["ary",G],["bind",N],["bindKey",q],["curry",oe],["curryRight",ne],["flip",he],["partial",$],["partialRight",te],["rearg",ie]],gt="[object Arguments]",Lt="[object Array]",Kt="[object AsyncFunction]",Ue="[object Boolean]",Pe="[object Date]",Be="[object DOMException]",it="[object Error]",_t="[object Function]",ft="[object GeneratorFunction]",Ut="[object Map]",rn="[object Number]",Dt="[object Null]",_n="[object Object]",qn="[object Promise]",tn="[object Proxy]",rr="[object RegExp]",Dn="[object Set]",pn="[object String]",Zn="[object Symbol]",dr="[object Undefined]",vr="[object WeakMap]",Jn="[object WeakSet]",Qe="[object ArrayBuffer]",ce="[object DataView]",fe="[object Float32Array]",nt="[object Float64Array]",St="[object Int8Array]",Ht="[object Int16Array]",sn="[object Int32Array]",tr="[object Uint8Array]",Oe="[object Uint8ClampedArray]",se="[object Uint16Array]",ve="[object Uint32Array]",p=/\b__p \+= '';/g,Ne=/\b(__p \+=) '' \+/g,Ye=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rt=/&(?:amp|lt|gt|quot|#39);/g,ct=/[&<>"']/g,dt=RegExp(rt.source),qt=RegExp(ct.source),Gt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,xt=/<%=([\s\S]+?)%>/g,Tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,On=/^\w*$/,gr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Er=/[\\^$.*+?()[\]{}|]/g,on=RegExp(Er.source),Rn=/^\s+/,er=/\s/,Xr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ur=/\{\n\/\* \[wrapped with (.+)\] \*/,Dr=/,? & /,ur=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,go=/[()=,{}\[\]\/\s]/,Sa=/\\(\\)?/g,Yi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ci=/\w*$/,oo=/^[-+]0x[0-9a-f]+$/i,Ro=/^0b[01]+$/i,Pi=/^\[object .+?Constructor\]$/,Na=/^0o[0-7]+$/i,Ea=/^(?:0|[1-9]\d*)$/,rs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,aa=/($^)/,cl=/['\n\r\u2028\u2029\\]/g,Ao="\\ud800-\\udfff",Uu="\\u0300-\\u036f",Zl="\\ufe20-\\ufe2f",so="\\u20d0-\\u20ff",Tr=Uu+Zl+so,tl="\\u2700-\\u27bf",Os="a-z\\xdf-\\xf6\\xf8-\\xff",ea="\\xac\\xb1\\xd7\\xf7",qe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wt="\\u2000-\\u206f",vn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yn="A-Z\\xc0-\\xd6\\xd8-\\xde",hn="\\ufe0e\\ufe0f",or=ea+qe+wt+vn,Ki="['’]",yo="["+Ao+"]",_s="["+or+"]",Fs="["+Tr+"]",OA="\\d+",ei="["+tl+"]",Mi="["+Os+"]",nl="[^"+Ao+or+OA+tl+Os+Yn+"]",Ai="\\ud83c[\\udffb-\\udfff]",la="(?:"+Fs+"|"+Ai+")",rc="[^"+Ao+"]",Ba="(?:\\ud83c[\\udde6-\\uddff]){2}",Rr="[\\ud800-\\udbff][\\udc00-\\udfff]",$i="["+Yn+"]",vo="\\u200d",yu="(?:"+Mi+"|"+nl+")",Mo="(?:"+$i+"|"+nl+")",Gs="(?:"+Ki+"(?:d|ll|m|re|s|t|ve))?",Qs="(?:"+Ki+"(?:D|LL|M|RE|S|T|VE))?",zu=la+"?",bl="["+hn+"]?",co="(?:"+vo+"(?:"+[rc,Ba,Rr].join("|")+")"+bl+zu+")*",Oo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Oa=bl+zu+co,Ss="(?:"+[ei,Ba,Rr].join("|")+")"+Oa,Ia="(?:"+[rc+Fs+"?",Fs,Ba,Rr,yo].join("|")+")",ta=RegExp(Ki,"g"),IA=RegExp(Fs,"g"),ho=RegExp(Ai+"(?="+Ai+")|"+Ia+Oa,"g"),Xl=RegExp([$i+"?"+Mi+"+"+Gs+"(?="+[_s,$i,"$"].join("|")+")",Mo+"+"+Qs+"(?="+[_s,$i+yu,"$"].join("|")+")",$i+"?"+yu+"+"+Gs,$i+"+"+Qs,Zo,Oo,OA,Ss].join("|"),"g"),zi=RegExp("["+vo+Ao+Tr+hn+"]"),Yr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Vi=-1,ao={};ao[fe]=ao[nt]=ao[St]=ao[Ht]=ao[sn]=ao[tr]=ao[Oe]=ao[se]=ao[ve]=!0,ao[gt]=ao[Lt]=ao[Qe]=ao[Ue]=ao[ce]=ao[Pe]=ao[it]=ao[_t]=ao[Ut]=ao[rn]=ao[_n]=ao[rr]=ao[Dn]=ao[pn]=ao[vr]=!1;var Di={};Di[gt]=Di[Lt]=Di[Qe]=Di[ce]=Di[Ue]=Di[Pe]=Di[fe]=Di[nt]=Di[St]=Di[Ht]=Di[sn]=Di[Ut]=Di[rn]=Di[_n]=Di[rr]=Di[Dn]=Di[pn]=Di[Zn]=Di[tr]=Di[Oe]=Di[se]=Di[ve]=!0,Di[it]=Di[_t]=Di[vr]=!1;var J={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",Line truncated
|
||||
/* [wrapped with `+k+`] */
|
||||
`)}function g(b){return Eo(b)||ud(b)||!!(Kh&&b&&b[Kh])}function E(b,k){var V=typeof b;return k=k??Je,!!k&&(V=="number"||V!="symbol"&&Ea.test(b))&&b>-1&&b%1==0&&b<k}function S(b,k,V){if(!Pl(V))return!1;var ye=typeof k;return(ye=="number"?Nc(V)&&E(k,V.length):ye=="string"&&k in V)?ch(V[k],b):!1}function D(b,k){if(Eo(b))return!1;var V=typeof b;return V=="number"||V=="symbol"||V=="boolean"||b==null||Ad(b)?!0:On.test(b)||!Tn.test(b)||k!=null&&b in is(k)}function Z(b){var k=typeof b;return k=="string"||k=="number"||k=="symbol"||k=="boolean"?b!=="__proto__":b===null}function Ae(b){var k=Ld(b),V=ot[k];if(typeof V!="function"||!(k in ii.prototype))return!1;if(b===V)return!0;var ye=Ef(V);return!!ye&&b===ye[0]}function Ce(b){return!!wd&&wd in b}var Te=Qu?dh:i4;function je(b){var k=b&&b.constructor,V=typeof k=="function"&&k.prototype||zl;return b===V}function yt(b){return b===b&&!Pl(b)}function Mt(b,k){return function(V){return V==null?!1:V[b]===k&&(k!==t||b in is(V))}}function en(b){var k=_r(b,function(ye){return V.size===y&&V.clear(),ye}),V=k.cache;return k}function Qt(b,k){var V=b[1],ye=k[1],Ve=V|ye,ht=Ve<(N|q|G),Pt=ye==G&&V==oe||ye==G&&V==ie&&b[7].length<=k[8]||ye==(G|ie)&&k[7].length<=k[8]&&V==oe;if(!(ht||Pt))return b;ye&N&&(b[2]=k[2],Ve|=V&N?0:H);var Vt=k[3];if(Vt){var an=b[3];b[3]=an?gc(an,Vt,k[4]):Vt,b[4]=an?ua(b[3],x):k[4]}return Vt=k[5],Vt&&(an=b[5],b[5]=an?yc(an,Vt,k[6]):Vt,b[6]=an?ua(b[5],x):k[6]),Vt=k[7],Vt&&(b[7]=Vt),ye&G&&(b[8]=b[8]==null?k[8]:Us(b[8],k[8])),b[9]==null&&(b[9]=k[9]),b[0]=k[0],b[1]=Ve,b}function wn(b){var k=[];if(b!=null)for(var V in is(b))k.push(V);return k}function Ln(b){return tu.call(b)}function sr(b,k,V){return k=Oi(k===t?b.length-1:k,0),function(){for(var ye=arguments,Ve=-1,ht=Oi(ye.length-k,0),Pt=ln(ht);++Ve<ht;)Pt[Ve]=ye[k+Ve];Ve=-1;for(var Vt=ln(k+1);++Ve<k;)Vt[Ve]=ye[Ve];return Vt[k]=V(Pt),qs(b,this,Vt)}}function Vn(b,k){return k.length<2?b:Bu(b,Si(k,0,-1))}function wr(b,k){for(var V=b.length,ye=Us(k.length,V),Ve=Ca(b);ye--;){var ht=k[ye];b[ye]=E(ht,V)?Ve[ht]:t}return b}function yr(b,k){if(!(k==="constructor"&&typeof b[k]=="function")&&k!="__proto__")return b[k]}var Or=jo(Ti),ni=kc||function(b,k){return Br.setTimeout(b,k)},zr=jo(Gi);function Zi(b,k,V){var ye=k+"";return zr(b,A(ye,ba(Da(ye),V)))}function jo(b){var k=0,V=0;return function(){var ye=fA(),Ve=Se-(ye-V);if(V=ye,Ve>0){if(++k>=me)return arguments[0]}else k=0;return b.apply(t,arguments)}}function $a(b,k){var V=-1,ye=b.length,Ve=ye-1;for(k=k===t?ye:k;++V<k;){var ht=Mn(V,Ve),Pt=b[ht];b[ht]=b[V],b[V]=Pt}return b.length=k,b}var oa=en(function(b){var k=[];return b.charCodeAt(0)===46&&k.push(""),b.replace(gr,function(V,ye,Ve,ht){k.push(Ve?ht.replace(Sa,"$1"):ye||V)}),k});function _a(b){if(typeof b=="string"||Ad(b))return b;var k=b+"";return k=="0"&&1/b==-1/0?"-0":k}function Va(b){if(b!=null){try{return lo.call(b)}catch{}try{return b+""}catch{}}return""}function ba(b,k){return ga(Yt,function(V){var ye="_."+V[0];k&V[1]&&!Vd(b,ye)&&b.push(ye)}),b.sort()}function hu(b){if(b instanceof ii)return b.clone();var k=new mi(b.__wrapped__,b.__chain__);return k.__actions__=Ca(b.__actions__),k.__index__=b.__index__,k.__values__=b.__values__,k}function Ra(b,k,V){(V?S(b,k,V):k===t)?k=1:k=Oi(Ko(k),0);var ye=b==null?0:b.length;if(!ye||k<1)return[];for(var Ve=0,ht=0,Pt=ln(PA(ye/k));Ve<ye;)Pt[ht++]=Si(b,Ve,Ve+=k);return Pt}function Fa(b){for(var k=-1,V=b==null?0:b.length,ye=0,Ve=[];++k<V;){var ht=b[k];ht&&(Ve[ye++]=ht)}return Ve}function ls(){var b=arguments.length;if(!b)return[];for(var k=ln(b-1),V=arguments[0],ye=b;ye--;)k[ye-1]=arguments[ye];return kA(Eo(V)?Ca(V):[V],js(k,1))}var vi=In(function(b,k){return Ql(b)?mc(b,js(k,1,Ql,!0)):[]}),ms=In(function(b,k){var V=qA(k);return Ql(V)&&(V=t),Ql(b)?mc(b,js(k,1,Ql,!0),xi(V,2)):[]}),Ns=In(function(b,k){var V=qA(k);return Ql(V)&&(V=t),Ql(b)?mc(b,js(k,1,Ql,!0),t,V):[]});function da(b,k,V){var ye=b==null?0:b.length;return ye?(k=V||k===t?1:Ko(k),Si(b,k<0?0:k,ye)):[]}function Bs(b,k,V){var ye=b==null?0:b.length;return ye?(k=V||k===t?1:Ko(k),k=ye-k,Si(b,0,k<0?0:k)):[]}function ku(b,k){return b&&b.length?uu(b,xi(k,3),!0,!0):[]}function _o(b,k){return b&&b.length?uu(b,xi(k,3),!0):[]}function zh(b,k,V,ye){var Ve=b==null?0:b.length;return Ve?(V&&typeof V!="number"&&S(b,k,V)&&(V=0,ye=Ve),Kd(b,k,V,ye)):[]}function Gl(b,k,V){var ye=b==null?0:b.length;if(!ye)return-1;var Ve=V==null?0:Ko(V);return Ve<0&&(Ve=Oi(ye+Ve,0)),ic(b,xi(k,3),Ve)}function eA(b,k,V){var ye=b==null?0:b.length;if(!ye)return-1;var Ve=ye-1;return V!==t&&(Ve=Ko(V),Ve=V<0?Oi(ye+Ve,0):Us(Ve,ye-1)),ic(b,xi(k,3),Ve,!0)}function Cc(b){var k=b==null?0:b.length;return k?js(b,1):[]}function yl(b){var k=b==null?0:b.length;return k?js(b,Ze):[]}function Il(b,k){var V=b==null?0:b.length;return V?(k=k===t?1:Ko(k),js(b,k)):[]}function Bf(b){for(var k=-1,V=b==null?0:b.length,ye={};++k<V;){var Ve=b[k];ye[Ve[0]]=Ve[1]}return ye}function Of(b){return b&&b.length?b[0]:t}function jh(b,k,V){var ye=b==null?0:b.length;if(!ye)return-1;var Ve=V==null?0:Ko(V);return Ve<0&&(
Line truncated
|
||||
`;b.replace($r,function(to,Ms,Is,Xh,Wd,Jh){return Is||(Is=Xh),mr+=b.slice(Hn,Jh).replace(cl,cA),Ms&&(Vt=!0,mr+=`' +
|
||||
__e(`+Ms+`) +
|
||||
'`),Wd&&(an=!0,mr+=`';
|
||||
`+Wd+`;
|
||||
__p += '`),Is&&(mr+=`' +
|
||||
((__t = (`+Is+`)) == null ? '' : __t) +
|
||||
'`),Hn=Jh+to.length,to}),mr+=`';
|
||||
`;var eo=Io.call(k,"variable")&&k.variable;if(!eo)mr=`with (obj) {
|
||||
`+mr+`
|
||||
}
|
||||
`;else if(go.test(eo))throw new Bi(o);mr=(an?mr.replace(p,""):mr).replace(Ne,"$1").replace(Ye,"$1;"),mr="function("+(eo||"obj")+`) {
|
||||
`+(eo?"":`obj || (obj = {});
|
||||
`)+"var __t, __p = ''"+(Vt?", __e = _.escape":"")+(an?`, __j = Array.prototype.join;
|
||||
function print() { __p += __j.call(arguments, '') }
|
||||
`:`;
|
||||
`)+mr+`return __p
|
||||
}`;var us=ob(function(){return fo(ht,wi+"return "+mr).apply(t,Pt)});if(us.source=mr,f0(us))throw us;return us}function dp(b){return v(b).toLowerCase()}function nb(b){return v(b).toUpperCase()}function rb(b,k,V){if(b=v(b),b&&(V||k===t))return Sh(b);if(!b||!(k=Jo(k)))return b;var ye=_u(b),Ve=_u(k),ht=AA(ye,Ve),Pt=Hc(ye,Ve)+1;return Ka(ye,ht,Pt).join("")}function $3(b,k,V){if(b=v(b),b&&(V||k===t))return b.slice(0,kh(b)+1);if(!b||!(k=Jo(k)))return b;var ye=_u(b),Ve=Hc(ye,_u(k))+1;return Ka(ye,0,Ve).join("")}function V3(b,k,V){if(b=v(b),b&&(V||k===t))return b.replace(Rn,"");if(!b||!(k=Jo(k)))return b;var ye=_u(b),Ve=AA(ye,_u(k));return Ka(ye,Ve).join("")}function H3(b,k){var V=pe,ye=Ee;if(Pl(k)){var Ve="separator"in k?k.separator:Ve;V="length"in k?Ko(k.length):V,ye="omission"in k?Jo(k.omission):ye}b=v(b);var ht=b.length;if(Zc(b)){var Pt=_u(b);ht=Pt.length}if(V>=ht)return b;var Vt=V-bd(ye);if(Vt<1)return ye;var an=Pt?Ka(Pt,0,Vt).join(""):b.slice(0,Vt);if(Ve===t)return an+ye;if(Pt&&(Vt+=an.length-Vt),bv(Ve)){if(b.slice(Vt).search(Ve)){var Hn,Xn=an;for(Ve.global||(Ve=TA(Ve.source,v(Ci.exec(Ve))+"g")),Ve.lastIndex=0;Hn=Ve.exec(Xn);)var mr=Hn.index;an=an.slice(0,mr===t?Vt:mr)}}else if(b.indexOf(Jo(Ve),Vt)!=Vt){var $r=an.lastIndexOf(Ve);$r>-1&&(an=an.slice(0,$r))}return an+ye}function Z3(b){return b=v(b),b&&dt.test(b)?b.replace(rt,gf):b}var X3=ih(function(b,k,V){return b+(V?" ":"")+k.toUpperCase()}),Ev=rp("toUpperCase");function ib(b,k,V){return b=v(b),k=V?t:k,k===t?pf(b)?Th(b):yd(b):b.match(k)||[]}var ob=In(function(b,k){try{return qs(b,t,k)}catch(V){return f0(V)?V:new Bi(V)}}),Hh=zc(function(b,k){return ga(k,function(V){V=_a(V),Hr(b,V,ir(b[V],b))}),b});function x1(b){var k=b==null?0:b.length,V=xi();return b=k?Ls(b,function(ye){if(typeof ye[1]!="function")throw new Gu(a);return[V(ye[0]),ye[1]]}):[],In(function(ye){for(var Ve=-1;++Ve<k;){var ht=b[Ve];if(qs(ht[0],this,ye))return qs(ht[1],this,ye)}})}function sb(b){return ou(pl(b,B))}function Bv(b){return function(){return b}}function J3(b,k){return b==null||b!==b?k:b}var e4=ah(),VA=ah(!0);function Za(b){return b}function hp(b){return xe(typeof b=="function"?b:pl(b,B))}function Zh(b){return pt(pl(b,B))}function km(b,k){return ut(b,pl(k,B))}var Rf=In(function(b,k){return function(V){return Sl(V,b,k)}}),QG=In(function(b,k){return function(V){return Sl(b,V,k)}});function t4(b,k,V){var ye=fn(k),Ve=Lc(k,ye);V==null&&!(Pl(k)&&(Ve.length||!ye.length))&&(V=k,k=b,b=this,Ve=Lc(k,fn(k)));var ht=!(Pl(V)&&"chain"in V)||!!V.chain,Pt=dh(b);return ga(Ve,function(Vt){var an=k[Vt];b[Vt]=an,Pt&&(b.prototype[Vt]=function(){var Hn=this.__chain__;if(ht||Hn){var Xn=b(this.__wrapped__),mr=Xn.__actions__=Ca(this.__actions__);return mr.push({func:an,args:arguments,thisArg:b}),Xn.__chain__=Hn,Xn}return an.apply(b,kA([this.value()],arguments))})}),b}function qG(){return Br._===this&&(Br._=jl),this}function n4(){}function YG(b){return b=Ko(b),In(function(k){return Bt(k,b)})}var $G=bf(Ls),VG=bf(Vc),HG=bf(Bc);function x7(b){return D(b)?df(_a(b)):Tt(b)}function ZG(b){return function(k){return b==null?t:Bu(b,k)}}var XG=Fd(),JG=Fd(!0);function r4(){return[]}function i4(){return!1}function eQ(){return{}}function tQ(){return""}function nQ(){return!0}function rQ(b,k){if(b=Ko(b),b<1||b>Je)return[];var V=Fe,ye=Us(b,Fe);k=xi(k),b-=Fe;for(var Ve=ff(ye,k);++V<b;)k(V);return Ve}function iQ(b){return Eo(b)?Ls(b,_a):Ad(b)?[b]:Ca(oa(v(b)))}function oQ(b){var k=++xd;return v(b)+k}var sQ=lh(function(b,k){return b+k},0),aQ=cu("ceil"),lQ=lh(function(b,k){return b/k},1),uQ=cu("floor");function AQ(b){return b&&b.length?id(b,Za,su):t}function cQ(b,k){return b&&b.length?id(b,xi(k,2),su):t}function dQ(b){return vd(b,Za)}function hQ(b,k){return vd(b,xi(k,2))}function fQ(b){return b&&b.length?id(b,Za,$e):t}function pQ(b,k){return b&&b.length?id(b,xi(k,2),$e):t}var mQ=lh(function(b,k){return b*k},1),gQ=cu("round"),yQ=lh(function(b,k){return b-k},0);function vQ(b){return b&&b.length?wh(b,Za):0}function CQ(b,k){return b&&b.length?wh(b,xi(k,2)):0}return ot.after=xn,ot.ary=Ar,ot.assign=M,ot.assignIn=K,ot.assignInWith=U,ot.assignWith=W,ot.at=X,ot.before=Cr,ot.bind=ir,ot.bindAll=Hh,ot.bindKey=qr,ot.castArray=h0,ot.chain=qh,ot.chunk=Ra,ot.compact=Fa,ot.concat=ls,ot.cond=x1,ot.conforms=sb,ot.constant=Bv,ot.countBy=c0,ot.create=re,ot.curry=oi,ot.curryRight=ai,ot.debounce=vl,ot.defaults=de,ot.defaultsDeep=_e,ot.defer=cn,ot.delay=Xt,ot.difference=vi,ot.differenceBy=ms,ot.differenceWith=Ns,ot.drop=da,ot.dropRight=Bs,ot.dropRightWhile=ku,ot.dropWhile=_o,ot.fill=zh,ot.filter=Sm,ot.flatMap=dg,ot.flatMapDeep=p1,ot.flatMapDepth=hg,ot.flatten=Cc,ot.flattenDeep=yl,ot.flattenDepth=Il,ot.flip=dn,ot.flow=e4,ot.flowRight=VA,ot.fromPairs=Bf,ot.functions=Nt,ot.functionsIn=Et,ot.groupBy=Pf,ot.initial=t0,ot.intersection=lp,ot.intersectionBy=Nh,ot.intersectionWith=n0,ot.invert=An,ot.invertBy=zn,ot.invokeMap=Kf,ot.iteratee=hp,ot.keyBy=Bm,ot.keys=fn,ot.keysIn=jn,ot.map=Gp,ot.mapKeys=Wn,ot.mapValues=cr,ot.matches=Zh,ot.matchesProperty=km,ot.memoize=_r,ot.m
Line truncated
|
||||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(B[1])} }\`.`)];const O=[];return n.layerType==="symbol"&&(o==="text-field"&&i&&!i.glyphs&&O.push(new Sr(t,a,'use of "text-field" requires a style "glyphs" property')),o==="text-font"&&u_(qg(a))&&Ru(a.type)==="identity"&&O.push(new Sr(t,a,'"text-font" does not support identity functions'))),O.concat(r({key:n.key,value:a,valueSpec:x,style:i,styleSpec:s,expressionContext:"property",propertyType:e,propertyKey:o}))}function kU(n){return IU(n,"paint")}function TU(n){return IU(n,"layout")}function PU(n){let e=[];const t=n.value,r=n.key,i=n.style,s=n.styleSpec;!t.type&&!t.ref&&e.push(new Sr(r,t,'either "type" or "ref" is required'));let a=Ru(t.type);const o=Ru(t.ref);if(t.id){const f=Ru(t.id);for(let y=0;y<n.arrayIndex;y++){const x=i.layers[y];Ru(x.id)===f&&e.push(new Sr(r,t.id,`duplicate layer id "${t.id}", previously used at line ${x.id.__line__}`))}}if("ref"in t){["type","source","source-layer","filter","layout"].forEach(y=>{y in t&&e.push(new Sr(r,t[y],`"${y}" is prohibited for ref layers`))});let f;i.layers.forEach(y=>{Ru(y.id)===o&&(f=y)}),f?f.ref?e.push(new Sr(r,t.ref,"ref cannot reference another ref layer")):a=Ru(f.type):e.push(new Sr(r,t.ref,`ref layer "${o}" not found`))}else if(a!=="background")if(!t.source)e.push(new Sr(r,t,'missing required property "source"'));else{const f=i.sources&&i.sources[t.source],y=f&&Ru(f.type);f?y==="vector"&&a==="raster"?e.push(new Sr(r,t.source,`layer "${t.id}" requires a raster source`)):y!=="raster-dem"&&a==="hillshade"?e.push(new Sr(r,t.source,`layer "${t.id}" requires a raster-dem source`)):y==="raster"&&a!=="raster"?e.push(new Sr(r,t.source,`layer "${t.id}" requires a vector source`)):y==="vector"&&!t["source-layer"]?e.push(new Sr(r,t,`layer "${t.id}" must specify a "source-layer"`)):y==="raster-dem"&&a!=="hillshade"?e.push(new Sr(r,t.source,"raster-dem source can only be used with layer type 'hillshade'.")):a==="line"&&t.paint&&t.paint["line-gradient"]&&(y!=="geojson"||!f.lineMetrics)&&e.push(new Sr(r,t,`layer "${t.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new Sr(r,t.source,`source "${t.source}" not found`))}return e=e.concat(Gf({key:r,value:t,valueSpec:s.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*"(){return[]},type(){return n.validateSpec({key:`${r}.type`,value:t.type,valueSpec:s.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:t,objectKey:"type"})},filter:m8,layout(f){return Gf({layer:t,key:f.key,value:f.value,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*"(y){return TU(jy({layerType:a},y))}}})},paint(f){return Gf({layer:t,key:f.key,value:f.value,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*"(y){return kU(jy({layerType:a},y))}}})}}})),e}function Yg(n){const e=n.value,t=n.key,r=Ks(e);return r!=="string"?[new Sr(t,e,`string expected, ${r} found`)]:[]}function MH(n){var e;const t=(e=n.sourceName)!==null&&e!==void 0?e:"",r=n.value,i=n.styleSpec,s=i.source_raster_dem,a=n.style;let o=[];const f=Ks(r);if(r===void 0)return o;if(f!=="object")return o.push(new Sr("source_raster_dem",r,`object expected, ${f} found`)),o;const x=Ru(r.encoding)==="custom",B=["redFactor","greenFactor","blueFactor","baseShift"],O=n.value.encoding?`"${n.value.encoding}"`:"Default";for(const T in r)!x&&B.includes(T)?o.push(new Sr(T,r[T],`In "${t}": "${T}" is only valid when "encoding" is set to "custom". ${O} encoding found`)):s[T]?o=o.concat(n.validateSpec({key:T,value:r[T],valueSpec:s[T],validateSpec:n.validateSpec,style:a,styleSpec:i})):o.push(new Sr(T,r[T],`unknown property "${T}"`));return o}const LI={promoteId:SH};function KU(n){const e=n.value,t=n.key,r=n.styleSpec,i=n.style,s=n.validateSpec;if(!e.type)return[new Sr(t,e,'"type" is required')];const a=Ru(e.type);let o;switch(a){case"vector":case"raster":return o=Gf({key:t,value:e,valueSpec:r[`source_${a.replace("-","_")}`],style:n.style,styleSpec:r,objectElementValidators:LI,validateSpec:s}),o;case"raster-dem":return o=MH({sourceName:t,value:e,style:n.style,styleSpec:r,validateSpec:s}),o;case"geojson":if(o=Gf({key:t,value:e,valueSpec:r.source_geojson,style:i,styleSpec:r,validateSpec:s,objectElementValidators:LI}),e.cluster)for(const f in e.clusterProperties){const[y,x]=e.clusterProperties[f],B=typeof y=="string"?[y,["accumulated"],["get",f]]:y;o.push(...Ny({key:`${t}.${f}.map`,value:x,validateSpec:s,expressionContext:"cluster-map"})),o.push(...Ny({key:`${t}.${f}.reduce`,value:B,validateSpec:s,expressionContext:"cluster-reduce"}))}return o;case"video":return Gf({key:t,value:e,valueSpec:r.source_video,style:i,validateSpec:s,styleSpec:r});case"image":return Gf({key:t,value:e,valueSpec:r.source_image,style:i,validateSpec:s,styleSpec:r});case"canvas":return[new Sr(t,null,"Please use runtime APIs to add canvas sources,Line truncated
|
||||
${B}`),j].join(`
|
||||
${o}`)}return y}(n,"",0)}function zI(n,e){const t={};for(const r in e)n[r]!==void 0&&(t[r]=n[r]);for(const r in n)t[r]===void 0&&(t[r]=n[r]);return t}function jU(n,e=2){return n=zI(n,Ps.$root),n.layers&&(n.layers=n.layers.map(t=>zI(t,Ps.layer))),RH(n,{indent:e})}function O4(n,e){for(const t in n)t.indexOf("layout")===0&&e(n[t],t)}function jI(n,e){for(const t in n)t.indexOf("paint")===0&&e(n[t],t)}function N6(n,e){return typeof e=="string"&&e[0]==="@"?N6(n,n.constants[e]):e}function FH(n){return Array.isArray(n.stops)}function Tv(n,e,t){n[t]=n[e],delete n[e]}function LH(n){n.version=8,bH(n,i=>{i.type==="video"&&i.url!==void 0&&Tv(i,"url","urls"),i.type==="video"&&i.coordinates.forEach(s=>s.reverse())}),fC(n,i=>{O4(i,s=>{s["symbol-min-distance"]!==void 0&&Tv(s,"symbol-min-distance","symbol-spacing")}),jI(i,s=>{s["background-image"]!==void 0&&Tv(s,"background-image","background-pattern"),s["line-image"]!==void 0&&Tv(s,"line-image","line-pattern"),s["fill-image"]!==void 0&&Tv(s,"fill-image","fill-pattern")})}),h8(n,{paint:!0,layout:!0},i=>{const s=N6(n,i.value);FH(s)&&s.stops.forEach(a=>{a[1]=N6(n,a[1])}),i.set(s)}),delete n.constants,fC(n,i=>{O4(i,s=>{delete s["text-max-size"],delete s["icon-max-size"]}),jI(i,s=>{s["text-size"]&&(i.layout||(i.layout={}),i.layout["text-size"]=s["text-size"],delete s["text-size"]),s["icon-size"]&&(i.layout||(i.layout={}),i.layout["icon-size"]=s["icon-size"],delete s["icon-size"])})});function e(i){function s(a){return a.split(",").map(o=>o.trim())}if(Array.isArray(i))return i;if(typeof i=="string")return s(i);if(typeof i=="object")return i.stops.forEach(a=>{a[1]=s(a[1])}),i;throw new Error("unexpected font value")}fC(n,i=>{O4(i,s=>{s["text-font"]&&(s["text-font"]=e(s["text-font"]))})});let t=0;for(let i=n.layers.length-1;i>=0;i--)if(n.layers[i].type!=="symbol"){t=i+1;break}const r=n.layers.splice(t);return r.reverse(),n.layers=n.layers.concat(r),n}function UH(n){const e=[];return fC(n,t=>{t.filter&&(t.filter=hC(t.filter))}),h8(n,{paint:!0,layout:!0},({path:t,value:r,reference:i,set:s})=>{c_(r)||(typeof r=="object"&&!Array.isArray(r)?(s(MU(r,i)),e.push(t.join("."))):i.tokens&&typeof r=="string"&&s(SU(r)))}),n}function zH(n){return JSON.parse(jH(JSON.stringify(n)))}function jH(n){return n.replace(/"hsla?\((.+?)\)"/gi,(e,t)=>{const r=t.match(/^(.+?)\s*,\s*(.+?)\s*,\s*(.+?)(?:\s*,\s*(.+))?$/i);if(r){let[i,s,a,o]=r.slice(1);return[s,a]=[s,a].map(f=>f.endsWith("%")?f:`${parseFloat(f)*100}%`),`"hsl${typeof o=="string"?"a":""}(${[i,s,a,o].filter(Boolean).join(",")})"`}return e})}function NH(n){let e=!1;if(n.version===7&&(n=LH(n),e=!0),n.version===8&&(e=!!UH(n),e=!0),h8(n,{paint:!0,layout:!0},({value:t,reference:r,set:i})=>{r.type==="color"&&i(zH(t))}),!e)throw new Error(`Cannot migrate from ${n.version}`);return n}const WH={StyleExpression:wU,StylePropertyFunction:zx,ZoomConstantExpression:U6,ZoomDependentExpression:z6,createExpression:l8,createPropertyExpression:u8,isExpression:c_,isExpressionFilter:jx,isZoomExpression:cH,normalizePropertyExpression:dH},GH={convertFunction:MU,createFunction:a8,isFunction:u_};var Nx=o_();const QH=Al(Nx);var r2={exports:{}};/**
|
||||
* MapLibre GL JS
|
||||
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.1.0/LICENSE.txt
|
||||
*/var qH=r2.exports,NI;function YH(){return NI||(NI=1,function(n,e){(function(t,r){n.exports=r()})(qH,function(){var t={},r={};function i(a,o,f){if(r[a]=f,a==="index"){var y="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",x={};return r.shared(x),r.index(t,x),typeof window<"u"&&t.setWorkerUrl(window.URL.createObjectURL(new Blob([y],{type:"text/javascript"}))),t}}i("shared",["exports"],function(a){function o(d,u,h,v){return new(h||(h=Promise))(function(M,K){function U(re){try{X(v.next(re))}catch(de){K(de)}}function W(re){try{X(v.throw(re))}catch(de){K(de)}}function X(re){var de;re.done?M(re.value):(de=re.value,de instanceof h?de:new h(function(_e){_e(de)})).then(U,W)}X((v=v.apply(d,u||[])).next())})}function f(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var y,x;function B(){if(x)return y;function d(u,h){this.x=u,this.y=h}return x=1,y=d,d.prototype={clone:function(){return new d(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,h){return this.clone()._rotateAround(u,h)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var h=u.x-this.x,v=u.y-this.y;return h*h+v*v},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,h){return Math.atan2(this.x*h-this.y*u,this.x*u+this.y*h)},_matMult:function(u){var h=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=h,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var h=Math.cos(u),v=Math.sin(u),M=v*this.x+h*this.y;return this.x=h*this.x-v*this.y,this.y=M,this},_rotateAround:function(u,h){var v=Math.cos(u),M=Math.sin(u),K=h.y+M*(this.x-h.x)+v*(this.y-h.y);return this.x=h.x+v*(this.x-h.x)-M*(this.y-h.y),this.y=K,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},d.convert=function(u){return u instanceof d?u:Array.isArray(u)?new d(u[0],u[1]):u},y}typeof SuppressedError=="function"&&SuppressedError;var O,T,F=f(B()),j=function(){if(T)return O;function d(u,h,v,M){this.cx=3*u,this.bx=3*(v-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*h,this.by=3*(M-h)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=h,this.p2x=v,this.p2y=M}return T=1,O=d,d.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,h){if(h===void 0&&(h=1e-6),u<0)return 0;if(u>1)return 1;for(var v=u,M=0;M<8;M++){var K=this.sampleCurveX(v)-u;if(Math.abs(K)<h)return v;var U=this.sampleCurveDerivativeX(v);if(Math.abs(U)<1e-6)break;v-=K/U}var W=0,X=1;for(v=u,M=0;M<20&&(K=this.sampleCurveX(v),!(Math.abs(K-u)<h));M++)u>K?W=v:X=v,v=.5*(X-W)+W;return v},solve:function(u,h){return this.sampleCurveY(this.solveCurveX(u,h))}},O}(),N=f(j);let q,H;function oe(){return q==null&&(q=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),q}function ne(){if(H==null&&(H=!1,oe())){const u=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(u){for(let v=0;v<5*5;v++){const M=4*v;u.fillStyle=`rgb(${M},${M+1},${M+2})`,u.fillRect(v%5,Math.floor(v/5),1,1)}const h=u.getImageData(0,0,5,5).data;for(let v=0;v<5*5*4;v++)if(v%4!=3&&h[v]!==v){H=!0;break}}}return H||!1}var $,te=1e-6,G=typeof Float32Array<"u"?Float32Array:Array;function ie(){var d=new G(9);return G!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[5]=0,d[6]=0,d[7]=0),d[0]=1,d[4]=1,d[8]=1,d}function he(d){return d[0]=1,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=1,d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1,d}function pe(){var d=new G(3);return G!=Float32Array&&(d[0]=0,d[1]=0,d[2]=0),d}function Ee(d,u,h){var v=new G(3);return v[0]=d,v[1]=u,v[2]=h,v}function me(d,u,hLine truncated
|
||||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(_e[1])} }\`.`)];const Re=[];return d.layerType==="symbol"&&(W==="text-field"&&M&&!M.glyphs&&Re.push(new xt(h,U,'use of "text-field" requires a style "glyphs" property')),W==="text-font"&&Io(Us(U))&&Oi(U.type)==="identity"&&Re.push(new xt(h,U,'"text-font" does not support identity functions'))),Re.concat(v({key:d.key,value:U,valueSpec:de,style:M,styleSpec:K,expressionContext:"property",propertyType:u,propertyKey:W}))}function $u(d){return Ac(d,"paint")}function Od(d){return Ac(d,"layout")}function rd(d){let u=[];const h=d.value,v=d.key,M=d.style,K=d.styleSpec;h.type||h.ref||u.push(new xt(v,h,'either "type" or "ref" is required'));let U=Oi(h.type);const W=Oi(h.ref);if(h.id){const X=Oi(h.id);for(let re=0;re<d.arrayIndex;re++){const de=M.layers[re];Oi(de.id)===X&&u.push(new xt(v,h.id,`duplicate layer id "${h.id}", previously used at line ${de.id.__line__}`))}}if("ref"in h){let X;["type","source","source-layer","filter","layout"].forEach(re=>{re in h&&u.push(new xt(v,h[re],`"${re}" is prohibited for ref layers`))}),M.layers.forEach(re=>{Oi(re.id)===W&&(X=re)}),X?X.ref?u.push(new xt(v,h.ref,"ref cannot reference another ref layer")):U=Oi(X.type):u.push(new xt(v,h.ref,`ref layer "${W}" not found`))}else if(U!=="background")if(h.source){const X=M.sources&&M.sources[h.source],re=X&&Oi(X.type);X?re==="vector"&&U==="raster"?u.push(new xt(v,h.source,`layer "${h.id}" requires a raster source`)):re!=="raster-dem"&&U==="hillshade"?u.push(new xt(v,h.source,`layer "${h.id}" requires a raster-dem source`)):re==="raster"&&U!=="raster"?u.push(new xt(v,h.source,`layer "${h.id}" requires a vector source`)):re!=="vector"||h["source-layer"]?re==="raster-dem"&&U!=="hillshade"?u.push(new xt(v,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):U!=="line"||!h.paint||!h.paint["line-gradient"]||re==="geojson"&&X.lineMetrics||u.push(new xt(v,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):u.push(new xt(v,h,`layer "${h.id}" must specify a "source-layer"`)):u.push(new xt(v,h.source,`source "${h.source}" not found`))}else u.push(new xt(v,h,'missing required property "source"'));return u=u.concat(fA({key:v,value:h,valueSpec:K.layer,style:d.style,styleSpec:d.styleSpec,validateSpec:d.validateSpec,objectElementValidators:{"*":()=>[],type:()=>d.validateSpec({key:`${v}.type`,value:h.type,valueSpec:K.layer.type,style:d.style,styleSpec:d.styleSpec,validateSpec:d.validateSpec,object:h,objectKey:"type"}),filter:pA,layout:X=>fA({layer:h,key:X.key,value:X.value,style:X.style,styleSpec:X.styleSpec,validateSpec:X.validateSpec,objectElementValidators:{"*":re=>Od(Tn({layerType:U},re))}}),paint:X=>fA({layer:h,key:X.key,value:X.value,style:X.style,styleSpec:X.styleSpec,validateSpec:X.validateSpec,objectElementValidators:{"*":re=>$u(Tn({layerType:U},re))}})}})),u}function RA(d){const u=d.value,h=d.key,v=lo(u);return v!=="string"?[new xt(h,u,`string expected, ${v} found`)]:[]}const cc={promoteId:function({key:d,value:u}){if(lo(u)==="string")return RA({key:d,value:u});{const h=[];for(const v in u)h.push(...RA({key:`${d}.${v}`,value:u[v]}));return h}}};function Vu(d){const u=d.value,h=d.key,v=d.styleSpec,M=d.style,K=d.validateSpec;if(!u.type)return[new xt(h,u,'"type" is required')];const U=Oi(u.type);let W;switch(U){case"vector":case"raster":return W=fA({key:h,value:u,valueSpec:v[`source_${U.replace("-","_")}`],style:d.style,styleSpec:v,objectElementValidators:cc,validateSpec:K}),W;case"raster-dem":return W=function(X){var re;const de=(re=X.sourceName)!==null&&re!==void 0?re:"",_e=X.value,Re=X.styleSpec,ze=Re.source_raster_dem,Ge=X.style;let et=[];const At=lo(_e);if(_e===void 0)return et;if(At!=="object")return et.push(new xt("source_raster_dem",_e,`object expected, ${At} found`)),et;const Ct=Oi(_e.encoding)==="custom",Nt=["redFactor","greenFactor","blueFactor","baseShift"],Et=X.value.encoding?`"${X.value.encoding}"`:"Default";for(const Le in _e)!Ct&&Nt.includes(Le)?et.push(new xt(Le,_e[Le],`In "${de}": "${Le}" is only valid when "encoding" is set to "custom". ${Et} encoding found`)):ze[Le]?et=et.concat(X.validateSpec({key:Le,value:_e[Le],valueSpec:ze[Le],validateSpec:X.validateSpec,style:Ge,styleSpec:Re})):et.push(new xt(Le,_e[Le],`unknown property "${Le}"`));return et}({sourceName:h,value:u,style:d.style,styleSpec:v,validateSpec:K}),W;case"geojson":if(W=fA({key:h,value:u,valueSpec:v.source_geojson,style:M,styleSpec:v,validateSpec:K,objectElementValidators:cc}),u.cluster)for(const X in u.clusterProperties){const[re,de]=u.clusterProperties[X],_e=typeof re=="string"?[re,["accumulated"],["get",X]]:re;W.push(...DA({key:`${h}.${X}.map`,value:de,validateSpec:K,expressionContext:"cluster-map"})),W.push(...DA({key:`${h}.${X}.reduce`,value:_e,validateSpec:K,expressionContext:"cluster-reduce"}))}return W;case"video":return fA({key:h,value:u,valueSpec:v.source_video,style:M,validateSpec:K,Line truncated
|
||||
precision mediump float;
|
||||
#else
|
||||
#if !defined(lowp)
|
||||
#define lowp
|
||||
#endif
|
||||
#if !defined(mediump)
|
||||
#define mediump
|
||||
#endif
|
||||
#if !defined(highp)
|
||||
#define highp
|
||||
#endif
|
||||
#endif
|
||||
out highp vec4 fragColor;`,`#ifdef GL_ES
|
||||
precision highp float;
|
||||
#else
|
||||
#if !defined(lowp)
|
||||
#define lowp
|
||||
#endif
|
||||
#if !defined(mediump)
|
||||
#define mediump
|
||||
#endif
|
||||
#if !defined(highp)
|
||||
#define highp
|
||||
#endif
|
||||
#endif
|
||||
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
|
||||
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c
|
||||
);}
|
||||
#ifdef TERRAIN3D
|
||||
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
|
||||
#endif
|
||||
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
|
||||
#ifdef TERRAIN3D
|
||||
highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
|
||||
#else
|
||||
return 1.0;
|
||||
#endif
|
||||
}float calculate_visibility(vec4 pos) {
|
||||
#ifdef TERRAIN3D
|
||||
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
|
||||
#else
|
||||
return 1.0;
|
||||
#endif
|
||||
}float ele(vec2 pos) {
|
||||
#ifdef TERRAIN3D
|
||||
vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
|
||||
#else
|
||||
return 0.0;
|
||||
#endif
|
||||
}float get_elevation(vec2 pos) {
|
||||
#ifdef TERRAIN3D
|
||||
#ifdef GLOBE
|
||||
if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
|
||||
#endif
|
||||
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
|
||||
#else
|
||||
return 0.0;
|
||||
#endif
|
||||
}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:Mi("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:Mi("",`#define GLOBE_RADIUS 6371008.8
|
||||
uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
|
||||
);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);
|
||||
if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
|
||||
);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:Mi(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:Mi(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Mi(`in vec3 v_data;in float v_visibility;
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define mediump float radius
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define highp vec4 stroke_color
|
||||
#pragma mapbox: define mediump float stroke_width
|
||||
#pragma mapbox: define lowp float stroke_opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize mediump float radius
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize highp vec4 stroke_color
|
||||
#pragma mapbox: initialize mediump float stroke_width
|
||||
#pragma mapbox: initialize lowp float stroke_opacity
|
||||
vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define mediump float radius
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define highp vec4 stroke_color
|
||||
#pragma mapbox: define mediump float stroke_width
|
||||
#pragma mapbox: define lowp float stroke_opacity
|
||||
void main(void) {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize mediump float radius
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize highp vec4 stroke_color
|
||||
#pragma mapbox: initialize mediump float stroke_width
|
||||
#pragma mapbox: initialize lowp float stroke_opacity
|
||||
vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
|
||||
#ifdef GLOBE
|
||||
vec3 center_vector=projectToSphere(circle_center);
|
||||
#endif
|
||||
float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
|
||||
#ifdef GLOBE
|
||||
vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
|
||||
#else
|
||||
vec4 projected_center=projectTileWithElevation(circle_center,ele);
|
||||
#endif
|
||||
corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
|
||||
#ifdef GLOBE
|
||||
vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
|
||||
#else
|
||||
gl_Position=projectTileWithElevation(corner_position,ele);
|
||||
#endif
|
||||
} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Mi(OA,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:Mi(`uniform highp float u_intensity;in vec2 v_extrude;
|
||||
#pragma mapbox: define highp float weight
|
||||
#define GAUSS_COEF 0.3989422804014327
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp float weight
|
||||
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;
|
||||
#pragma mapbox: define highp float weight
|
||||
#pragma mapbox: define mediump float radius
|
||||
const highp float ZERO=1.0/255.0/16.0;
|
||||
#define GAUSS_COEF 0.3989422804014327
|
||||
void main(void) {
|
||||
#pragma mapbox: initialize highp float weight
|
||||
#pragma mapbox: initialize mediump float radius
|
||||
vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);
|
||||
#ifdef GLOBE
|
||||
vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
|
||||
#else
|
||||
gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
|
||||
#endif
|
||||
}`),heatmapTexture:Mi(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(0.0);
|
||||
#endif
|
||||
}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Mi("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Mi("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Mi("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:Mi(OA,`in vec2 a_pos;void main() {
|
||||
#ifdef GLOBE
|
||||
gl_Position=projectTileFor3D(a_pos,0.0);
|
||||
#else
|
||||
gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
|
||||
#endif
|
||||
}`),fill:Mi(`#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
fragColor=color*opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:Mi(`in vec2 v_pos;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 outline_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 outline_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 outline_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 outline_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
}`),fillOutlinePattern:Mi(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
}`),fillPattern:Mi(`#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
vec2 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=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Mi(`in vec4 v_color;void main() {fragColor=v_color;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
|
||||
#ifdef TERRAIN3D
|
||||
in vec2 a_centroid;
|
||||
#endif
|
||||
out vec4 v_color;
|
||||
#pragma mapbox: define highp float base
|
||||
#pragma mapbox: define highp float height
|
||||
#pragma mapbox: define highp vec4 color
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp float base
|
||||
#pragma mapbox: initialize highp float height
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
vec3 normal=a_normal_ed.xyz;
|
||||
#ifdef TERRAIN3D
|
||||
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
|
||||
#else
|
||||
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
|
||||
#endif
|
||||
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
|
||||
#ifdef GLOBE
|
||||
vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
|
||||
#else
|
||||
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
|
||||
#endif
|
||||
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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
|
||||
#ifdef GLOBE
|
||||
mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
|
||||
#endif
|
||||
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;}`),fillExtrusionPattern:Mi(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
|
||||
#pragma mapbox: define lowp float base
|
||||
#pragma mapbox: define lowp float height
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float base
|
||||
#pragma mapbox: initialize lowp float height
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
|
||||
#ifdef TERRAIN3D
|
||||
in vec2 a_centroid;
|
||||
#endif
|
||||
#ifdef GLOBE
|
||||
out vec3 v_sphere_pos;
|
||||
#endif
|
||||
out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
|
||||
#pragma mapbox: define lowp float base
|
||||
#pragma mapbox: define lowp float height
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float base
|
||||
#pragma mapbox: initialize lowp float height
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
vec2 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;
|
||||
#ifdef TERRAIN3D
|
||||
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
|
||||
#else
|
||||
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
|
||||
#endif
|
||||
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
|
||||
#ifdef GLOBE
|
||||
vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
|
||||
#else
|
||||
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
|
||||
#endif
|
||||
vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
|
||||
? a_pos
|
||||
: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Mi(`#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/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));fragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Mi(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
|
||||
#define PI 3.141592653589793
|
||||
void main() {vec4 pixel=texture(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:Mi(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
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);fragColor=color*(alpha*opacity);
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`
|
||||
#define scale 0.015873016
|
||||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define mediump float gapwidth
|
||||
#pragma mapbox: define lowp float offset
|
||||
#pragma mapbox: define mediump float width
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump float gapwidth
|
||||
#pragma mapbox: initialize lowp float offset
|
||||
#pragma mapbox: initialize mediump float width
|
||||
float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
#ifdef TERRAIN3D
|
||||
v_gamma_scale=1.0;
|
||||
#else
|
||||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||||
#endif
|
||||
v_width2=vec2(outset,inset);}`),lineGradient:Mi(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`
|
||||
#define scale 0.015873016
|
||||
in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define mediump float gapwidth
|
||||
#pragma mapbox: define lowp float offset
|
||||
#pragma mapbox: define mediump float width
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump float gapwidth
|
||||
#pragma mapbox: initialize lowp float offset
|
||||
#pragma mapbox: initialize mediump float width
|
||||
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
#ifdef TERRAIN3D
|
||||
v_gamma_scale=1.0;
|
||||
#else
|
||||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||||
#endif
|
||||
v_width2=vec2(outset,inset);}`),linePattern:Mi(`#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`
|
||||
#define scale 0.015873016
|
||||
#define LINE_DISTANCE_SCALE 2.0
|
||||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float offset
|
||||
#pragma mapbox: define mediump float gapwidth
|
||||
#pragma mapbox: define mediump float width
|
||||
#pragma mapbox: define lowp float floorwidth
|
||||
#pragma mapbox: define lowp vec4 pattern_from
|
||||
#pragma mapbox: define lowp vec4 pattern_to
|
||||
#pragma mapbox: define lowp float pixel_ratio_from
|
||||
#pragma mapbox: define lowp float pixel_ratio_to
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float offset
|
||||
#pragma mapbox: initialize mediump float gapwidth
|
||||
#pragma mapbox: initialize mediump float width
|
||||
#pragma mapbox: initialize lowp float floorwidth
|
||||
#pragma mapbox: initialize mediump vec4 pattern_from
|
||||
#pragma mapbox: initialize mediump vec4 pattern_to
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_from
|
||||
#pragma mapbox: initialize lowp float pixel_ratio_to
|
||||
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
#ifdef TERRAIN3D
|
||||
v_gamma_scale=1.0;
|
||||
#else
|
||||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||||
#endif
|
||||
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Mi(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
|
||||
#ifdef GLOBE
|
||||
in float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define mediump float width
|
||||
#pragma mapbox: define lowp float floorwidth
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump float width
|
||||
#pragma mapbox: initialize lowp float floorwidth
|
||||
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 sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
|
||||
#ifdef GLOBE
|
||||
if (v_depth > 1.0) {discard;}
|
||||
#endif
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`
|
||||
#define scale 0.015873016
|
||||
#define LINE_DISTANCE_SCALE 2.0
|
||||
in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_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;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
|
||||
#ifdef GLOBE
|
||||
out float v_depth;
|
||||
#endif
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float blur
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define mediump float gapwidth
|
||||
#pragma mapbox: define lowp float offset
|
||||
#pragma mapbox: define mediump float width
|
||||
#pragma mapbox: define lowp float floorwidth
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float blur
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize mediump float gapwidth
|
||||
#pragma mapbox: initialize lowp float offset
|
||||
#pragma mapbox: initialize mediump float width
|
||||
#pragma mapbox: initialize lowp float floorwidth
|
||||
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
|
||||
#ifdef GLOBE
|
||||
v_depth=gl_Position.z/gl_Position.w;
|
||||
#endif
|
||||
#ifdef TERRAIN3D
|
||||
v_gamma_scale=1.0;
|
||||
#else
|
||||
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
|
||||
#endif
|
||||
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);}`),raster:Mi(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
|
||||
#ifdef GLOBE
|
||||
if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
|
||||
#endif
|
||||
v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:Mi(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;
|
||||
#pragma mapbox: define lowp float opacity
|
||||
void main() {
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||||
#ifdef GLOBE
|
||||
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||||
#endif
|
||||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Mi(`#define SDF_PX 8.0
|
||||
uniform 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;in vec2 v_data0;in vec3 v_data1;
|
||||
#pragma mapbox: define highp vec4 fill_color
|
||||
#pragma mapbox: define highp vec4 halo_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float halo_width
|
||||
#pragma mapbox: define lowp float halo_blur
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 fill_color
|
||||
#pragma mapbox: initialize highp vec4 halo_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float halo_width
|
||||
#pragma mapbox: initialize lowp float halo_blur
|
||||
float 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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;
|
||||
#pragma mapbox: define highp vec4 fill_color
|
||||
#pragma mapbox: define highp vec4 halo_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float halo_width
|
||||
#pragma mapbox: define lowp float halo_blur
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 fill_color
|
||||
#pragma mapbox: initialize highp vec4 halo_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float halo_width
|
||||
#pragma mapbox: initialize lowp float halo_blur
|
||||
vec2 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;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||||
#ifdef GLOBE
|
||||
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||||
#endif
|
||||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Mi(`#define SDF_PX 8.0
|
||||
#define SDF 1.0
|
||||
#define ICON 0.0
|
||||
uniform 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;in vec4 v_data0;in vec4 v_data1;
|
||||
#pragma mapbox: define highp vec4 fill_color
|
||||
#pragma mapbox: define highp vec4 halo_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float halo_width
|
||||
#pragma mapbox: define lowp float halo_blur
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 fill_color
|
||||
#pragma mapbox: initialize highp vec4 halo_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float halo_width
|
||||
#pragma mapbox: initialize lowp float halo_blur
|
||||
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
return;}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=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor=vec4(1.0);
|
||||
#endif
|
||||
}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;
|
||||
#pragma mapbox: define highp vec4 fill_color
|
||||
#pragma mapbox: define highp vec4 halo_color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
#pragma mapbox: define lowp float halo_width
|
||||
#pragma mapbox: define lowp float halo_blur
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 fill_color
|
||||
#pragma mapbox: initialize highp vec4 halo_color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
#pragma mapbox: initialize lowp float halo_width
|
||||
#pragma mapbox: initialize lowp float halo_blur
|
||||
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
||||
camera_to_anchor_distance/u_camera_to_center_distance :
|
||||
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
|
||||
#ifdef GLOBE
|
||||
if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
|
||||
#endif
|
||||
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));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);}`),terrain:Mi("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Mi("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Mi("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:Mi("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:Mi(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3Line truncated
|
||||
);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:Mi("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Mi(I,l){const c=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,_=l.match(/in ([\w]+) ([\w]+)/g),w=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),P=l.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),z=P?P.concat(w):w,Y={};return{fragmentSource:I=I.replace(c,(ee,ae,xe,ke,Ke)=>(Y[Ke]=!0,ae==="define"?`
|
||||
#ifndef HAS_UNIFORM_u_${Ke}
|
||||
in ${xe} ${ke} ${Ke};
|
||||
#else
|
||||
uniform ${xe} ${ke} u_${Ke};
|
||||
#endif
|
||||
`:`
|
||||
#ifdef HAS_UNIFORM_u_${Ke}
|
||||
${xe} ${ke} ${Ke} = u_${Ke};
|
||||
#endif
|
||||
`)),vertexSource:l=l.replace(c,(ee,ae,xe,ke,Ke)=>{const $e=ke==="float"?"vec2":"vec4",Xe=Ke.match(/color/)?"color":$e;return Y[Ke]?ae==="define"?`
|
||||
#ifndef HAS_UNIFORM_u_${Ke}
|
||||
uniform lowp float u_${Ke}_t;
|
||||
in ${xe} ${$e} a_${Ke};
|
||||
out ${xe} ${ke} ${Ke};
|
||||
#else
|
||||
uniform ${xe} ${ke} u_${Ke};
|
||||
#endif
|
||||
`:Xe==="vec4"?`
|
||||
#ifndef HAS_UNIFORM_u_${Ke}
|
||||
${Ke} = a_${Ke};
|
||||
#else
|
||||
${xe} ${ke} ${Ke} = u_${Ke};
|
||||
#endif
|
||||
`:`
|
||||
#ifndef HAS_UNIFORM_u_${Ke}
|
||||
${Ke} = unpack_mix_${Xe}(a_${Ke}, u_${Ke}_t);
|
||||
#else
|
||||
${xe} ${ke} ${Ke} = u_${Ke};
|
||||
#endif
|
||||
`:ae==="define"?`
|
||||
#ifndef HAS_UNIFORM_u_${Ke}
|
||||
uniform lowp float u_${Ke}_t;
|
||||
in ${xe} ${$e} a_${Ke};
|
||||
#else
|
||||
uniform ${xe} ${ke} u_${Ke};
|
||||
#endif
|
||||
`:Xe==="vec4"?`
|
||||
#ifndef HAS_UNIFORM_u_${Ke}
|
||||
${xe} ${ke} ${Ke} = a_${Ke};
|
||||
#else
|
||||
${xe} ${ke} ${Ke} = u_${Ke};
|
||||
#endif
|
||||
`:`
|
||||
#ifndef HAS_UNIFORM_u_${Ke}
|
||||
${xe} ${ke} ${Ke} = unpack_mix_${Xe}(a_${Ke}, u_${Ke}_t);
|
||||
#else
|
||||
${xe} ${ke} ${Ke} = u_${Ke};
|
||||
#endif
|
||||
`}),staticAttributes:_,staticUniforms:z}}class nl{constructor(l,c,_){this.vertexBuffer=l,this.indexBuffer=c,this.segments=_}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var Ai=o.aA([{name:"a_pos",type:"Int16",components:2}]);const la="#define PROJECTION_MERCATOR",rc="mercator";class Ba{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return rc}get shaderDefine(){return la}get shaderPreludeCode(){return ei.projectionMercator}get vertexShaderPreludeCode(){return ei.projectionMercator.vertexSource}get subdivisionGranularity(){return o.aB.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(l){}getMeshFromTileID(l,c,_,w,P){if(this._cachedMesh)return this._cachedMesh;const z=new o.aC;z.emplaceBack(0,0),z.emplaceBack(o.X,0),z.emplaceBack(0,o.X),z.emplaceBack(o.X,o.X);const Y=l.createVertexBuffer(z,Ai.members),ee=o.aD.simpleSegment(0,0,4,2),ae=new o.aE;ae.emplaceBack(1,0,2),ae.emplaceBack(1,2,3);const xe=l.createIndexBuffer(ae);return this._cachedMesh=new nl(Y,xe,ee),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(l){}}function Rr(I,l){const c=o.ab(l.lat,-85.051129,o.aF);return new o.P(o.O(l.lng)*I,o.Q(c)*I)}function $i(I,l){return new o.Y(l.x/I,l.y/I).toLngLat()}function vo(I){return I.cameraToCenterDistance*Math.min(.85*Math.tan(o.aa(90-I.pitch)),Math.tan(o.aa(89.25-I.pitch)))}function yu(I,l){const c=I.canonical,_=l/o.aG(c.z),w=c.x+Math.pow(2,c.z)*I.wrap,P=o.aq(new Float64Array(16));return o.J(P,P,[w*_,c.y*_,0]),o.K(P,P,[_/o.X,_/o.X,1]),P}function Mo(I,l,c,_,w){const P=o.Y.fromLngLat(I,l),z=w*o.aH(1,I.lat),Y=z*Math.cos(o.aa(c)),ee=Math.sqrt(z*z-Y*Y),ae=ee*Math.sin(o.aa(-_)),xe=ee*Math.cos(o.aa(-_));return new o.Y(P.x+ae,P.y+xe,P.z+Y)}class Gs{constructor(l=0,c=0,_=0,w=0){if(isNaN(l)||l<0||isNaN(c)||c<0||isNaN(_)||_<0||isNaN(w)||w<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=c,this.left=_,this.right=w}interpolate(l,c,_){return c.top!=null&&l.top!=null&&(this.top=o.y.number(l.top,c.top,_)),c.bottom!=null&&l.bottom!=null&&(this.bottom=o.y.number(l.bottom,c.bottom,_)),c.left!=null&&l.left!=null&&(this.left=o.y.number(l.left,c.left,_)),c.right!=null&&l.right!=null&&(this.right=o.y.number(l.right,c.right,_)),this}getCenter(l,c){const _=o.ab((this.left+l-this.right)/2,0,l),w=o.ab((this.top+c-this.bottom)/2,0,c);return new o.P(_,w)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new Gs(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Qs(I,l){if(!I.renderWorldCopies||I.lngRange)return;const c=l.lng-I.center.lng;l.lng+=c>180?-360:c<-180?360:0}function zu(I){return Math.max(0,Math.floor(I))}class bl{constructor(l,c,_,w,P,z){this._callbacks=l,this._tileSize=512,this._renderWorldCopies=z===void 0||!!z,this._minZoom=c||0,this._maxZoom=_||22,this._minPitch=w??0,this._maxPitch=P??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new o.N(0,0),this._elevation=0,this._zoom=0,this._tileZoom=zu(this._zoom),this._scale=o.aG(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Gs,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(l,c,_){this._latRange=l.latRange,this._lngRange=l.lngRange,this._width=l.width,this._height=l.height,this._center=l.center,this._elevation=l.elevation,this._minElevationForCurrentTile=l.minElevationForCurrentTile,this._zoom=l.zoom,this._tileZoom=zu(this._zoom),this._scale=o.aG(this._zoom),this._bearingInRadians=l.bearingInRadians,this._fovInRadians=l.fovInRadians,this._pitchInRadians=l.pitchInRadians,this._rollInRadians=l.rollInRadians,this._unmodified=l.unmodified,this._edgeInsets=new Gs(l.padding.top,l.padding.bottom,l.padding.left,l.padding.right),this._minZoom=l.minZoom,this._maxZoom=l.maxZoom,this._minPitch=l.minPitch,this._maxPitch=l.maxPitch,this._renderWorldCopies=l.renderWorldCopies,this._cameraToCenterDistance=l.cameraToCenterDistance,this._nearZ=l.nearZ,this._farZ=l.farZ,this._autoCalculateNearFarZ=!_&&l.autoCalculateNearFarZ,c&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(l){this._minElevationForCurrentTile=l}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadia
Line truncated
|
||||
`),Rt=Bt.concat(ei.prelude.vertexSource,Y.vertexSource,c.vertexSource).join(`
|
||||
`);Di(ae)||(kt=function(Zt){return Zt.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(kt),Rt=function(Zt){return Zt.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Rt));const zt=ae.createShader(ae.FRAGMENT_SHADER);if(ae.isContextLost())return void(this.failedToCreate=!0);if(ae.shaderSource(zt,kt),ae.compileShader(zt),!ae.getShaderParameter(zt,ae.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ae.getShaderInfoLog(zt)}`);ae.attachShader(this.program,zt);const Tt=ae.createShader(ae.VERTEX_SHADER);if(ae.isContextLost())return void(this.failedToCreate=!0);if(ae.shaderSource(Tt,Rt),ae.compileShader(Tt),!ae.getShaderParameter(Tt,ae.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ae.getShaderInfoLog(Tt)}`);ae.attachShader(this.program,Tt),this.attributes={};const nn={};this.numAttributes=Ke.length;for(let Zt=0;Zt<this.numAttributes;Zt++)Ke[Zt]&&(ae.bindAttribLocation(this.program,Zt,Ke[Zt]),this.attributes[Ke[Zt]]=Zt);if(ae.linkProgram(this.program),!ae.getProgramParameter(this.program,ae.LINK_STATUS))throw new Error(`Program failed to link: ${ae.getProgramInfoLog(this.program)}`);ae.deleteShader(Tt),ae.deleteShader(zt);for(let Zt=0;Zt<vt.length;Zt++){const Mn=vt[Zt];if(Mn&&!nn[Mn]){const Bn=ae.getUniformLocation(this.program,Mn);Bn&&(nn[Mn]=Bn)}}this.fixedUniforms=w(l,nn),this.terrainUniforms=((Zt,Mn)=>({u_depth:new o.bC(Zt,Mn.u_depth),u_terrain:new o.bC(Zt,Mn.u_terrain),u_terrain_dim:new o.b5(Zt,Mn.u_terrain_dim),u_terrain_matrix:new o.bD(Zt,Mn.u_terrain_matrix),u_terrain_unpack:new o.bE(Zt,Mn.u_terrain_unpack),u_terrain_exaggeration:new o.b5(Zt,Mn.u_terrain_exaggeration)}))(l,nn),this.projectionUniforms=((Zt,Mn)=>({u_projection_matrix:new o.bD(Zt,Mn.u_projection_matrix),u_projection_tile_mercator_coords:new o.bE(Zt,Mn.u_projection_tile_mercator_coords),u_projection_clipping_plane:new o.bE(Zt,Mn.u_projection_clipping_plane),u_projection_transition:new o.b5(Zt,Mn.u_projection_transition),u_projection_fallback_matrix:new o.bD(Zt,Mn.u_projection_fallback_matrix)}))(l,nn),this.binderUniforms=_?_.getUniforms(l,nn):[]}draw(l,c,_,w,P,z,Y,ee,ae,xe,ke,Ke,$e,Xe,pt,ut,mt,vt,Bt){const kt=l.gl;if(this.failedToCreate)return;if(l.program.set(this.program),l.setDepthMode(_),l.setStencilMode(w),l.setColorMode(P),l.setCullFace(z),ee){l.activeTexture.set(kt.TEXTURE2),kt.bindTexture(kt.TEXTURE_2D,ee.depthTexture),l.activeTexture.set(kt.TEXTURE3),kt.bindTexture(kt.TEXTURE_2D,ee.texture);for(const zt in this.terrainUniforms)this.terrainUniforms[zt].set(ee[zt])}if(ae)for(const zt in ae)this.projectionUniforms[Hd[zt]].set(ae[zt]);if(Y)for(const zt in this.fixedUniforms)this.fixedUniforms[zt].set(Y[zt]);ut&&ut.setUniforms(l,this.binderUniforms,Xe,{zoom:pt});let Rt=0;switch(c){case kt.LINES:Rt=2;break;case kt.TRIANGLES:Rt=3;break;case kt.LINE_STRIP:Rt=1}for(const zt of $e.get()){const Tt=zt.vaos||(zt.vaos={});(Tt[xe]||(Tt[xe]=new kA)).bind(l,this,ke,ut?ut.getPaintVertexBuffers():[],Ke,zt.vertexOffset,mt,vt,Bt),kt.drawElements(c,zt.primitiveLength*Rt,kt.UNSIGNED_SHORT,zt.primitiveOffset*Rt*2)}}}function ep(I,l,c){const _=1/o.at(c,1,l.transform.tileZoom),w=Math.pow(2,c.tileID.overscaledZ),P=c.tileSize*Math.pow(2,l.transform.tileZoom)/w,z=P*(c.tileID.canonical.x+c.tileID.wrap*w),Y=P*c.tileID.canonical.y;return{u_image:0,u_texsize:c.imageAtlasTexture.size,u_scale:[_,I.fromScale,I.toScale],u_fade:I.t,u_pixel_coord_upper:[z>>16,Y>>16],u_pixel_coord_lower:[65535&z,65535&Y]}}const yd=(I,l,c,_)=>{const w=I.style.light,P=w.properties.get("position"),z=[P.x,P.y,P.z],Y=o.bI();w.properties.get("anchor")==="viewport"&&o.bJ(Y,I.transform.bearingInRadians),o.bK(z,z,Y);const ee=I.transform.transformLightDirection(z),ae=w.properties.get("color");return{u_lightpos:z,u_lightpos_globe:ee,u_lightintensity:w.properties.get("intensity"),u_lightcolor:[ae.r,ae.g,ae.b],u_vertical_gradient:+l,u_opacity:c,u_fill_translate:_}},Kp=(I,l,c,_,w,P,z)=>o.e(yd(I,l,c,_),ep(P,I,z),{u_height_factor:-Math.pow(2,w.overscaledZ)/z.tileSize/8}),ic=(I,l,c,_)=>o.e(ep(l,I,c),{u_fill_translate:_}),na=(I,l)=>({u_world:I,u_fill_translate:l}),cf=(I,l,c,_,w)=>o.e(ic(I,l,c,w),{u_world:_}),xh=(I,l,c,_,w)=>{const P=I.transform;let z,Y,ee=0;if(c.paint.get("circle-pitch-alignment")==="map"){const ae=o.at(l,1,P.zoom);z=!0,Y=[ae,ae],ee=ae/(o.X*Math.pow(2,l.tileID.overscaledZ))*2*Math.PI*w}else z=!1,Y=P.pixelsToGLUnits;return{u_camera_to_center_distance:P.cameraToCenterDistance,u_scale_with_map:+(c.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+z,u_device_pixel_ratio:I.pixelRatio,u_extrude_scale:Y,u_globe_extrude_scale:ee,u_translate:_}},vd=I=>({u_pixel_extrude_scale:[1/I.width,1/I.height]}),df=I=>({u_viewport_size:[I.width,I.height]}),Cd=(I,l=1)=>({u_color:I,u_overlay:0,u_overlay_scale:l}),hf=(I,l,c,_)=>{const w=o.at(I,1,l)/(o.X*Math.pow(2,I.tileID.overscaledZ))*2*Math.PI*_;return{u_extrude_scale:o.a
Line truncated
|
||||
uniform mat4 u_projection_matrix;
|
||||
${$e.shaderPreludeCode.vertexSource}`,define:$e.shaderDefine},defaultProjectionData:pt},mt=Ke.renderingMode?Ke.renderingMode:"2d";if(z.renderPass==="offscreen"){const vt=Ke.prerender;vt&&(z.setCustomLayerDefaults(),ke.setColorMode(z.colorModeForRenderPass()),vt.call(Ke,ke.gl,ut),ke.setDirty(),z.setBaseState())}else if(z.renderPass==="translucent"){z.setCustomLayerDefaults(),ke.setColorMode(z.colorModeForRenderPass()),ke.setStencilMode(Vi.disabled);const vt=mt==="3d"?z.getDepthModeFor3D():z.getDepthModeForSublayer(0,Yr.ReadOnly);ke.setDepthMode(vt),Ke.render(ke.gl,ut),ke.setDirty(),z.setBaseState(),ke.bindFramebuffer.set(null)}}(l,0,_,P))}saveTileTexture(l){const c=this._tileTextures[l.size[0]];c?c.push(l):this._tileTextures[l.size[0]]=[l]}getTileTexture(l){const c=this._tileTextures[l];return c&&c.length>0?c.pop():null}isPatternMissing(l){if(!l)return!1;if(!l.from||!l.to)return!0;const c=this.imageManager.getPattern(l.from.toString()),_=this.imageManager.getPattern(l.to.toString());return!c||!_}useProgram(l,c,_=!1){this.cache=this.cache||{};const w=!!this.style.map.terrain,P=this.style.projection,z=l+(c?c.cacheKey:"")+`/${_?rc:P.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(w?"/terrain":"");return this.cache[z]||(this.cache[z]=new Oc(this.context,ei[l],c,Zd[l],this._showOverdrawInspector,w,_?ei.projectionMercator:P.shaderPreludeCode,_?la:P.shaderDefine)),this.cache[z]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new ie(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:l,drawingBufferHeight:c}=this.context.gl;return this.width!==l||this.height!==c}}function RA(I,l){let c,_=!1,w=null,P=null;const z=()=>{w=null,_&&(I.apply(P,c),w=setTimeout(z,l),_=!1)};return(...Y)=>(_=!0,P=this,c=Y,w||z(),w)}class cc{constructor(l){this._getCurrentHash=()=>{const c=window.location.hash.replace("#","");if(this._hashName){let _;return c.split("&").map(w=>w.split("=")).forEach(w=>{w[0]===this._hashName&&(_=w)}),(_&&_[1]||"").split("/")}return c.split("/")},this._onHashChange=()=>{const c=this._getCurrentHash();if(!this._isValidHash(c))return!1;const _=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(c[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+c[2],+c[1]],zoom:+c[0],bearing:_,pitch:+(c[4]||0)}),!0},this._updateHashUnthrottled=()=>{const c=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,c)},this._removeHash=()=>{const c=this._getCurrentHash();if(c.length===0)return;const _=c.join("/");let w=_;w.split("&").length>0&&(w=w.split("&")[0]),this._hashName&&(w=`${this._hashName}=${_}`);let P=window.location.hash.replace(w,"");P.startsWith("#&")?P=P.slice(0,1)+P.slice(2):P==="#"&&(P="");let z=window.location.href.replace(/(#.+)?$/,P);z=z.replace("&&","&"),window.history.replaceState(window.history.state,null,z)},this._updateHash=RA(this._updateHashUnthrottled,300),this._hashName=l&&encodeURIComponent(l)}addTo(l){return this._map=l,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(l){const c=this._map.getCenter(),_=Math.round(100*this._map.getZoom())/100,w=Math.ceil((_*Math.LN2+Math.log(512/360/.5))/Math.LN10),P=Math.pow(10,w),z=Math.round(c.lng*P)/P,Y=Math.round(c.lat*P)/P,ee=this._map.getBearing(),ae=this._map.getPitch();let xe="";if(xe+=l?`/${z}/${Y}/${_}`:`${_}/${Y}/${z}`,(ee||ae)&&(xe+="/"+Math.round(10*ee)/10),ae&&(xe+=`/${Math.round(ae)}`),this._hashName){const ke=this._hashName;let Ke=!1;const $e=window.location.hash.slice(1).split("&").map(Xe=>{const pt=Xe.split("=")[0];return pt===ke?(Ke=!0,`${pt}=${xe}`):Xe}).filter(Xe=>Xe);return Ke||$e.push(`${ke}=${xe}`),`#${$e.join("&")}`}return`#${xe}`}_isValidHash(l){if(l.length<3||l.some(isNaN))return!1;try{new o.N(+l[2],+l[1])}catch{return!1}const c=+l[0],_=+(l[3]||0),w=+(l[4]||0);return c>=this._map.getMinZoom()&&c<=this._map.getMaxZoom()&&_>=0&&_<=180&&w>=this._map.getMinPitch()&&w<=this._map.getMaxPitch()}}const Vu={linearity:.3,easing:o.c6(0,0,.3,1)},Hu=o.e({deceleration:2500,maxSpeed:1400},Vu),
Line truncated
|
||||
${e} <span></span>
|
||||
`,Hs().s[12]++,this._textEl=this._container.querySelector("span"),Hs().s[13]++,this.updateZoomLevel()}addEventListeners(){Hs().f[4]++,Hs().s[14]++,this._map.on("render",()=>(Hs().f[5]++,Hs().s[15]++,this.updateZoomLevel())),Hs().s[16]++,this._map.on("zoomIn",()=>(Hs().f[6]++,Hs().s[17]++,this.updateZoomLevel())),Hs().s[18]++,this._map.on("zoomOut",()=>(Hs().f[7]++,Hs().s[19]++,this.updateZoomLevel()))}onRemove(){Hs().f[8]++,Hs().s[20]++,this._container.parentNode.removeChild(this._container),Hs().s[21]++,this._map=void 0}}function V6(n,e,t){const r={id:[e,t,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":n,"circle-radius":2},filter:["==","$type","Point"]};return t&&(r["source-layer"]=t),r}function H6(n,e,t,r){const i={id:[t,r,"polygon"].join("_"),source:t,type:"fill",paint:{"fill-color":n,"fill-antialias":!0,"fill-outline-color":n},filter:["==","$type","Polygon"]};return r&&(i["source-layer"]=r),i}function Z6(n,e,t){const r={id:[e,t,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":n},filter:["==","$type","LineString"]};return t&&(r["source-layer"]=t),r}function AX(n,e){const t=[],r=[],i=[];function s(a){return{circle:e(a,.8),line:e(a,.6),polygon:e(a,.3),polygonOutline:e(a,.6),default:e(a,1)}}return Object.keys(n).forEach(a=>{const o=n[a];if(!o||o.length===0){const f=s(a);r.push(V6(f.circle,a)),i.push(Z6(f.line,a)),t.push(H6(f.polygon,f.polygonOutline,a))}else o.forEach(f=>{const y=s(f);r.push(V6(y.circle,a,f)),i.push(Z6(y.line,a,f)),t.push(H6(y.polygon,y.polygonOutline,a,f))})}),t.concat(i).concat(r)}function cX(n,e,t){t=Object.assign({backgroundColor:"#fff"},t);const r={id:"background",type:"background",paint:{"background-color":t.backgroundColor}},i={};return Object.keys(n.sources).forEach(s=>{const a=n.sources[s];(a.type==="vector"||a.type==="geojson")&&(i[s]=a)}),Object.assign(n,{layers:[r].concat(e),sources:i})}const D4={polygonLayer:H6,lineLayer:Z6,circleLayer:V6,generateInspectStyle:cX,generateColoredLayers:AX};function xo(){var n="/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",e="aec0f701e803624fae461cc89b5fc887ff556587",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",statementMap:{0:{start:{line:4,column:2},end:{line:8,column:3}},1:{start:{line:5,column:4},end:{line:5,column:33}},2:{start:{line:6,column:9},end:{line:8,column:3}},3:{start:{line:7,column:4},end:{line:7,column:30}},4:{start:{line:9,column:2},end:{line:13,column:3}},5:{start:{line:10,column:4},end:{line:10,column:28}},6:{start:{line:12,column:4},end:{line:12,column:23}},7:{start:{line:14,column:2},end:{line:14,column:29}},8:{start:{line:15,column:2},end:{line:15,column:11}},9:{start:{line:18,column:2},end:{line:18,column:84}},10:{start:{line:18,column:72},end:{line:18,column:84}},11:{start:{line:19,column:24},end:{line:19,column:51}},12:{start:{line:20,column:16},end:{line:20,column:52}},13:{start:{line:21,column:2},end:{line:23,column:3}},14:{start:{line:22,column:4},end:{line:22,column:104}},15:{start:{line:24,column:2},end:{line:26,column:3}},16:{start:{line:25,column:4},end:{line:25,column:96}},17:{start:{line:27,column:2},end:{line:29,column:3}},18:{start:{line:28,column:4},end:{line:28,column:94}},19:{start:{line:30,column:2},end:{line:30,column:14}}},fnMap:{0:{name:"changeLayer",decl:{start:{line:3,column:9},end:{line:3,column:20}},loc:{start:{line:3,column:31},end:{line:16,column:1}},line:3},1:{name:"colorHighlightedLayer",decl:{start:{line:17,column:16},end:{line:17,column:37}},loc:{start:{line:17,column:45},end:{line:31,column:1}},line:17}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:8,column:3}},type:"if",locations:[{start:{line:4,column:2},end:{line:8,column:3}},{start:{line:6,column:9},end:{line:8,column:3}}],line:4},1:{loc:{start:{line:6,column:9},end:{line:8,column:3}},type:"if",locations:[{start:{line:6,column:9},end:{line:8,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},2:{loc:{start:{line:9,column:2},end:{line:13,column:3}},type:"if",locations:[{start:{line:9,column:2},end:{line:13,column:3}},{start:{line:11,column:9},end:{line:13,column:3}}],line:9},3:{loc:{start:{line:18,column:2},end:{line:18,column:84}},type:"if",locations:[{start:{line:18,column:2},end:{line:18,column:84}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},4:{loc:{start:{line:18,column:6},end:{line:18,column:70}},type:"binary-expr",locations:[{start:{line:18,column:6},end:{line:18,column:12}},{start:{line:18,column:16},end:{line:18,column:43}},{start:{line:18,column:47},end:{line:18,column:70}}],line:18},5:{loc:{start:{line:19,column:24},end:{line:19,column:51}},type:"binary-expr",locations:[{start:{line:19,column:24},end:{line:19,column:45}},{start:{line:19,column:49},end:{line:19,column:51}}],line:19},6:{loc:{start:{line:21,column:2},end:{line:23,column:3}},type:"if",locations:[{start:{line:21,column:2},end:{line:23,column:3}},{s
Line truncated
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */function F4(n,e,t,r){return new(t||(t=Promise))(function(i,s){function a(y){try{f(r.next(y))}catch(x){s(x)}}function o(y){try{f(r.throw(y))}catch(x){s(x)}}function f(y){y.done?i(y.value):new t(function(x){x(y.value)}).then(a,o)}f((r=r.apply(n,e||[])).next())})}var yb=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function Wx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var L4,e9;function ZU(){if(e9)return L4;e9=1,L4=e;var n=Object.prototype.hasOwnProperty;function e(){for(var t={},r=0;r<arguments.length;r++){var i=arguments[r];for(var s in i)n.call(i,s)&&(t[s]=i[s])}return t}return L4}var U4={exports:{}},t9;function hX(){return t9||(t9=1,function(n,e){(function(){var t={};n.exports=t,t.simpleFilter=function(r,i){return i.filter(function(s){return t.test(r,s)})},t.test=function(r,i){return t.match(r,i)!==null},t.match=function(r,i,s){s=s||{};var a=0,o=[],f=i.length,y=0,x=0,B=s.pre||"",O=s.post||"",T=s.caseSensitive&&i||i.toLowerCase(),F;r=s.caseSensitive&&r||r.toLowerCase();for(var j=0;j<f;j++)F=i[j],T[j]===r[a]?(F=B+F+O,a+=1,x+=1+x):x=0,y+=x,o[o.length]=F;return a===r.length?(y=T===r?1/0:y,{rendered:o.join(""),score:y}):null},t.filter=function(r,i,s){return!i||i.length===0?[]:typeof r!="string"?i:(s=s||{},i.reduce(function(a,o,f,y){var x=o;s.extract&&(x=s.extract(o));var B=t.match(r,x,s);return B!=null&&(a[a.length]={string:B.rendered,score:B.score,index:f,original:o}),a},[]).sort(function(a,o){var f=o.score-a.score;return f||a.index-o.index}))}})()}(U4)),U4.exports}var z4,n9;function fX(){if(n9)return z4;n9=1;var n=function(e){return this.component=e,this.items=[],this.active=e.options.noInitialSelection?-1:0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,e.el.parentNode.insertBefore(this.wrapper,e.el.nextSibling),this};return n.prototype.show=function(){this.element.style.display="block"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.add=function(e){this.items.push(e)},n.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},n.prototype.isEmpty=function(){return!this.items.length},n.prototype.isVisible=function(){return this.element.style.display==="block"},n.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var e=0;e<this.items.length;e++)this.drawItem(this.items[e],this.active===e);this.show()},n.prototype.drawItem=function(e,t){var r=document.createElement("li"),i=document.createElement("a");t&&(r.className+=" active"),i.innerHTML=e.string,r.appendChild(i),this.element.appendChild(r),r.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),r.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,e)}).bind(this))},n.prototype.handleMouseUp=function(e){this.selectingListItem=!1,this.component.value(e.original),this.clear(),this.draw()},n.prototype.move=function(e){this.active=e,this.draw()},n.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},n.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},n.prototype.drawError=function(e){var t=document.createElement("li");t.innerHTML=e,this.element.appendChild(t),this.show()},z4=n,z4}var j4,r9;function pX(){if(r9)return j4;r9=1;var n=ZU(),e=hX(),t=fX(),r=function(i,s,a){return a=a||{},this.options=n({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},a),this.el=i,this.data=s||[],this.list=new t(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(o){this.handleKeyUp(o.keyCode,o)}).bind(this),!1),this.el.addEventListener("keydown",(function(o){this.handleKeyDown(o)}).bind(this)),this.el.addEventListener("focus",(function(){this.handleFocus()}).bind(this)),this.el.addEventListener("blur",(function(){this.handleBlur()}).bind(this)),this.el.addEventListener("paste",(function(o){this.handlePaste(o)}).bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};return r.prototype.handleKeyUp=function(i,s){if(!(i===40||i===38||i===27||i===9)){if(i===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),s.stopPropagation());return}this.handleInputChange(this.el.value)}},r.prototype.handleKeyDown=function(i){switch(i.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&i.preventDefault(),this.value(this.list.active>=0?this.list.items[this.list.activeLine truncated
|
||||
`);o(F,j,N)?(f_(eB),ly=null,J6=void 0,Yp.set(T,100)):(Yp.set(T,Yp.get(T)+1,!0),y=!1)}}y&&(clearInterval(s),s=void 0)}return function(y){const x=uz(y);if(!x)return;const B=x.families;for(let O=0,T=B.length;O<T;++O){const F=B[O],j=x.style+`
|
||||
`+x.weight+`
|
||||
`+F;Yp.get(j)===void 0&&(Yp.set(j,100,!0),o(x.style,x.weight,F)||(Yp.set(j,0,!0),s===void 0&&(s=setInterval(f,32))))}}}(),lJ=function(){let n;return function(e){let t=eB[e];if(t==null){if(rz){const r=uz(e),i=dz(e,"Žg");t=(isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=e,document.body.appendChild(n),t=n.offsetHeight,document.body.removeChild(n);eB[e]=t}return t}}();function dz(n,e){return ly||(ly=Lu(1,1)),n!=J6&&(ly.font=n,J6=ly.font),ly.measureText(e)}function R2(n,e){return dz(n,e).width}function y9(n,e,t){if(e in t)return t[e];const r=e.split(`
|
||||
`).reduce((i,s)=>Math.max(i,R2(n,s)),0);return t[e]=r,r}function uJ(n,e){const t=[],r=[],i=[];let s=0,a=0,o=0,f=0;for(let y=0,x=e.length;y<=x;y+=2){const B=e[y];if(B===`
|
||||
`||y===x){s=Math.max(s,a),i.push(a),a=0,o+=f,f=0;continue}const O=e[y+1]||n.font,T=R2(O,B);t.push(T),a+=T;const F=lJ(O);r.push(F),f=Math.max(f,F)}return{width:s,height:o,widths:t,heights:r,lineWidths:i}}function AJ(n,e,t,r,i,s,a,o,f,y,x){n.save(),t!==1&&(n.globalAlpha===void 0?n.globalAlpha=B=>B.globalAlpha*=t:n.globalAlpha*=t),e&&n.transform.apply(n,e),r.contextInstructions?(n.translate(f,y),n.scale(x[0],x[1]),cJ(r,n)):x[0]<0||x[1]<0?(n.translate(f,y),n.scale(x[0],x[1]),n.drawImage(r,i,s,a,o,0,0,a,o)):n.drawImage(r,i,s,a,o,f,y,a*x[0],o*x[1]),n.restore()}function cJ(n,e){const t=n.contextInstructions;for(let r=0,i=t.length;r<i;r+=2)Array.isArray(t[r+1])?e[t[r]].apply(e,t[r+1]):e[t[r]]=t[r+1]}function v9(n){return n[0]>0&&n[1]>0}function dJ(n,e,t){return t===void 0&&(t=[0,0]),t[0]=n[0]*e+.5|0,t[1]=n[1]*e+.5|0,t}function md(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}class Yx{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=md(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Yx({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return wo()}getImage(e){return wo()}getHitDetectionImage(){return wo()}getPixelRatio(e){return 1}getImageState(){return wo()}getImageSize(){return wo()}getOrigin(){return wo()}getSize(){return wo()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=md(e)}listenImageChange(e){wo()}load(){wo()}unlistenImageChange(e){wo()}ready(){return Promise.resolve()}}class $x extends Yx{constructor(e){super({opacity:1,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius=e.radius,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?hi.LOADING:hi.LOADED,this.imageState_===hi.LOADING&&this.ready().then(()=>this.imageState_=hi.LOADED),this.render()}clone(){const e=this.getScale(),t=new $x({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_,t=this.getDisplacement(),r=this.getScaleArray();return[e[0]/2-t[0]/r[0],e[1]/2+t[1]/r[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){var s,a;const t=(s=this.fill_)==null?void 0:s.getKey(),r=`${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}`+Object.values(this.renderOptions_).join(",");let i=(a=Qf.get(r,null,null))==null?void 0:a.getImage(1);if(!i){const o=this.renderOptions_,f=Math.ceil(o.size*e),y=Lu(f,f);this.draw_(o,y,e),i=y.canvas,Qf.set(r,null,null,new lz(i,void 0,null,hi.LOADED,null))}return i}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,r){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let i=this.radius,s=this.radius2_===void 0?i:this.radius2_;if(i<s){const te=i;i=s,s=te}const a=this.radius2_===void 0?this.points_:this.points_*2,o=2*Math.PI/a,f=s*Math.sin(o),y=Math.sqrt(s*s-f*f),x=i-y,B=Math.sqrt(f*f+x*x),O=B/f;if(e==="miter"&&O<=r)return O*t;const T=t/2/O,F=t/2*(x/B),N=Math.sqrt((i+T)*(i+T)+F*F)-i;if(this.radius2_===void 0||e==="bevel")return N*2;con
Line truncated
|
||||
`,""),n.push(e,""),n}class Zee{constructor(e,t,r,i,s){this.overlaps=r,this.pixelRatio=t,this.resolution=e,this.alignAndScaleFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=_h(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=s?new Y8:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,t,r,i){const s=e+t+r+i;if(this.labels_[s])return this.labels_[s];const a=i?this.strokeStates[i]:null,o=r?this.fillStates[r]:null,f=this.textStates[t],y=this.pixelRatio,x=[f.scale[0]*y,f.scale[1]*y],B=f.justify?q2[f.justify]:n5(Array.isArray(e)?e[0]:e,f.textAlign||UC),O=i&&a.lineWidth?a.lineWidth:0,T=Array.isArray(e)?e:String(e).split(`
|
||||
`).reduce(Hee,[]),{width:F,height:j,widths:N,heights:q,lineWidths:H}=uJ(f,T),oe=F+O,ne=[],$=(oe+2)*x[0],te=(j+O)*x[1],G={width:$<0?Math.floor($):Math.ceil($),height:te<0?Math.floor(te):Math.ceil(te),contextInstructions:ne};(x[0]!=1||x[1]!=1)&&ne.push("scale",x),i&&(ne.push("strokeStyle",a.strokeStyle),ne.push("lineWidth",O),ne.push("lineCap",a.lineCap),ne.push("lineJoin",a.lineJoin),ne.push("miterLimit",a.miterLimit),ne.push("setLineDash",[a.lineDash]),ne.push("lineDashOffset",a.lineDashOffset)),r&&ne.push("fillStyle",o.fillStyle),ne.push("textBaseline","middle"),ne.push("textAlign","center");const ie=.5-B;let he=B*oe+ie*O;const pe=[],Ee=[];let me=0,Se=0,De=0,be=0,at;for(let Ze=0,Je=T.length;Ze<Je;Ze+=2){const We=T[Ze];if(We===`
|
||||
`){Se+=me,me=0,he=B*oe+ie*O,++be;continue}const Me=T[Ze+1]||f.font;Me!==at&&(i&&pe.push("font",Me),r&&Ee.push("font",Me),at=Me),me=Math.max(me,q[De]);const Fe=[We,he+ie*N[De]+B*(N[De]-H[be]),.5*(O+me)+Se];he+=N[De],i&&pe.push("strokeText",Fe),r&&Ee.push("fillText",Fe),++De}return Array.prototype.push.apply(ne,pe),Array.prototype.push.apply(ne,Ee),this.labels_[s]=G,G}replayTextBackground_(e,t,r,i,s,a,o){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,r),e.lineTo.apply(e,i),e.lineTo.apply(e,s),e.lineTo.apply(e,t),a&&(this.alignAndScaleFill_=a[2],e.fillStyle=a[1],this.fill_(e)),o&&(this.setStrokeStyle_(e,o),e.stroke())}calculateImageOrLabelDimensions_(e,t,r,i,s,a,o,f,y,x,B,O,T,F,j,N){o*=O[0],f*=O[1];let q=r-o,H=i-f;const oe=s+y>e?e-y:s,ne=a+x>t?t-x:a,$=F[3]+oe*O[0]+F[1],te=F[0]+ne*O[1]+F[2],G=q-F[3],ie=H-F[0];(j||B!==0)&&(w0[0]=G,M0[0]=G,w0[1]=ie,Pm[1]=ie,Pm[0]=G+$,Km[0]=Pm[0],Km[1]=ie+te,M0[1]=Km[1]);let he;return B!==0?(he=dm(_h(),r,i,1,1,B,-r,-i),EA(he,w0),EA(he,Pm),EA(he,Km),EA(he,M0),Vm(Math.min(w0[0],Pm[0],Km[0],M0[0]),Math.min(w0[1],Pm[1],Km[1],M0[1]),Math.max(w0[0],Pm[0],Km[0],M0[0]),Math.max(w0[1],Pm[1],Km[1],M0[1]),T1)):Vm(Math.min(G,G+$),Math.min(ie,ie+te),Math.max(G,G+$),Math.max(ie,ie+te),T1),T&&(q=Math.round(q),H=Math.round(H)),{drawImageX:q,drawImageY:H,drawImageW:oe,drawImageH:ne,originX:y,originY:x,declutterBox:{minX:T1[0],minY:T1[1],maxX:T1[2],maxY:T1[3],value:N},canvasTransform:he,scale:O}}replayImageOrLabel_(e,t,r,i,s,a,o){const f=!!(a||o),y=i.declutterBox,x=o?o[2]*i.scale[0]/2:0;return y.minX-x<=t[0]&&y.maxX+x>=0&&y.minY-x<=t[1]&&y.maxY+x>=0&&(f&&this.replayTextBackground_(e,w0,Pm,Km,M0,a,o),AJ(e,i.canvasTransform,s,r,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0}fill_(e){const t=this.alignAndScaleFill_;if(t){const r=EA(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;e.save(),e.translate(r[0]%i,r[1]%i),t!==1&&e.scale(t,t),e.rotate(this.viewRotation_)}e.fill(),t&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6])}drawLabelWithPointPlacement_(e,t,r,i){const s=this.textStates[t],a=this.createLabel(e,t,i,r),o=this.strokeStates[r],f=this.pixelRatio,y=n5(Array.isArray(e)?e[0]:e,s.textAlign||UC),x=q2[s.textBaseline||D2],B=o&&o.lineWidth?o.lineWidth:0,O=a.width/f-2*s.scale[0],T=y*O+2*(.5-y)*B,F=x*a.height/f+2*(.5-x)*B;return{label:a,anchorX:T,anchorY:F}}execute_(e,t,r,i,s,a,o,f){const y=this.zIndexContext_;let x;this.pixelCoordinates_&&H0(r,this.renderedTransform_)?x=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),x=G0(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),lee(this.renderedTransform_,r));let B=0;const O=i.length;let T=0,F,j,N,q,H,oe,ne,$,te,G,ie,he,pe,Ee=0,me=0;const Se=this.coordinateCache_,De=this.viewRotation_,be=Math.round(Math.atan2(-r[1],r[0])*1e12)/1e12,at={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:De},Ze=this.instructions!=i||this.overlaps?0:200;let Je,We,Me,Fe;for(;B<O;){const He=i[B];switch(He[0]){case qi.BEGIN_GEOMETRY:Je=He[1],Fe=He[3],Je.getGeometry()?o!==void 0&&!Fu(o,Fe.getExtent())?B=He[2]+1:++B:B=He[2],y&&(y.zIndex=He[4]);break;case qi.BEGIN_PATH:Ee>Ze&&(this.fill_(e),Ee=0),me>Ze&&(e.stroke(),me=0),!Ee&&!me&&(e.beginPath(),H=NaN,oe=NaN),++B;break;case qi.CIRCLE:T=He[1];const Yt=x[T],gt=x[T+1],Lt=x[T+2],Kt=x[T+3],Ue=Lt-Yt,Pe=Kt-gt,Be=Math.sqrt(Ue*Ue+Pe*Pe);e.moveTo(Yt+Be,gt),e.arc(Yt,gt,Be,0,2*Math.PI,!0),++B;break;case qi.CLOSE_PATH:e.closePath(),++B;break;case qi.CUSTOM:T=He[1],F=He[2];const it=He[3],_t=He[4],ft=He[5];at.geometry=it,at.feature=Je,B in Se||(Se[B]=[]);const Ut=Se[B];ft?ft(x,T,F,2,Ut):(Ut[0]=x[T],Ut[1]=x[T+1],Ut.length=2),y&&(y.zIndex=He[6]),_t(Ut,at),++B;break;case qi.DRAW_IMAGE:T=He[1],F=He[2],te=He[3],j=He[4],N=He[5];let rn=He[6];const Dt=He[7],_n=He[8],qn=He[9],tn=He[10];let rr=He[11];const Dn=He[12];let pn=He[13];q=He[14]||"declutter";const Zn=He[15];if(!te&&He.length>=20){G=He[19],ie=He[20],he=He[21],pe=He[22];const Gt=this.drawLabelWithPointPlacement_(G,ie,he,pe);te=Gt.label,He[3]=te;const jt=He[23];j=(Gt.anchorX-jt)*this.pixelRatio,He[4]=j;const xt=He[24];N=(Gt.anchorY-xt)*this.pixelRatio,He[5]=N,rn=te.height,He[6]=rn,pn=te.width,He[13]=pn}let dr;He.length>25&&(dr=He[25]);let vr,Jn,Qe;He.length>17?(vr=He[16],Jn=He[17],Qe=He[18]):(vr=Pg,Jn=null,Qe=null),tn&&be?rr+=De:!tn&&!be&&(rr-=De);let ce=0;for(;T<F;T+=2){if(dr&&dr[ce++]<pn/this.pixelRatio)continue;const Gt=this.calculateImageOrLabelDimensions_(te.width,te.height,x[T],x[T+1],pn,rn,j,N,_n,qn,rr,Dn,s,vr,!!Jn||!!Qe,Je),jt=[e,t,te,Gt,Dt,Jn,Qe];if(f){let xt,Tn,On;if(Zn){const on=F-T;if(!Zn[on]){Zn[on]={args:jt,declutterMode:q};continue}const Rn=Zn[on];xt=Rn.args,Tn=Rn.declutterMode,delete Zn[on],On=Q9(xt)}let gr,Er;if(xt&&(Tn!=="declutter"||!f.collides(On))&&(gr=!0),(q!=="declutter"||!f.collides(Gt.declutterBox))&&(Er=!0),Tn==="declutter"&&q==="declutter"){const on=
Line truncated
|
||||
`),"binary").toString("base64"):URL.createObjectURL(new Blob(r,{type:"text/javascript"})));return i.addEventListener("message",e),i}function Gre(n,e){const t=Rj(n.operation);let r=!1;return{postMessage:function(i){setTimeout(function(){r||e({data:{buffer:t(i),meta:i.meta}})},0)},terminate:function(){r=!0}}}class Qre extends h_{constructor(e){super(),this.imageOps_=!!e.imageOps;let t;e.threads===0?t=0:this.imageOps_?t=1:t=e.threads||1;const r=new Array(t);if(t)for(let i=0;i<t;++i)r[i]=Wre(e,this.onWorkerMessage_.bind(this,i));else r[0]=Gre(e,this.onWorkerMessage_.bind(this,0));this.workers_=r,this.queue_=[],this.maxQueueLength_=e.queue||1/0,this.running_=0,this.dataLookup_={},this.job_=null}process(e,t,r){this.enqueue_({inputs:e,meta:t,callback:r}),this.dispatch_()}enqueue_(e){for(this.queue_.push(e);this.queue_.length>this.maxQueueLength_;)this.queue_.shift().callback(null,null)}dispatch_(){if(this.running_||this.queue_.length===0)return;const e=this.queue_.shift();this.job_=e;const t=e.inputs[0].width,r=e.inputs[0].height,i=e.inputs.map(function(f){return f.data.buffer}),s=this.workers_.length;if(this.running_=s,s===1){this.workers_[0].postMessage({buffers:i,meta:e.meta,imageOps:this.imageOps_,width:t,height:r},i);return}const a=e.inputs[0].data.length,o=4*Math.ceil(a/4/s);for(let f=0;f<s;++f){const y=f*o,x=[];for(let B=0,O=i.length;B<O;++B)x.push(i[B].slice(y,y+o));this.workers_[f].postMessage({buffers:x,meta:e.meta,imageOps:this.imageOps_,width:t,height:r},x)}}onWorkerMessage_(e,t){this.disposed||(this.dataLookup_[e]=t.data,--this.running_,this.running_===0&&this.resolveJob_())}resolveJob_(){const e=this.job_,t=this.workers_.length;let r,i;if(t===1)r=new Uint8ClampedArray(this.dataLookup_[0].buffer),i=this.dataLookup_[0].meta;else{const s=e.inputs[0].data.length;r=new Uint8ClampedArray(s),i=new Array(t);const a=4*Math.ceil(s/4/t);for(let o=0;o<t;++o){const f=this.dataLookup_[o].buffer,y=o*a;r.set(new Uint8ClampedArray(f),y),i[o]=this.dataLookup_[o].meta}}this.job_=null,this.dataLookup_={},e.callback(null,new ImageData(r,e.inputs[0].width,e.inputs[0].height),i),this.dispatch_()}disposeInternal(){for(let e=0;e<this.workers_.length;++e)this.workers_[e].terminate();this.workers_.length=0}}const pk={BEFOREOPERATIONS:"beforeoperations",AFTEROPERATIONS:"afteroperations"};class mk extends Ip{constructor(e,t,r){super(e),this.extent=t.extent,this.resolution=t.viewState.resolution/t.pixelRatio,this.data=r}}class Fj extends Tj{constructor(e){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=e.operationType!==void 0?e.operationType:"pixel",this.threads_=e.threads!==void 0?e.threads:1,this.layers_=$re(e.sources);const t=this.changed.bind(this);for(let r=0,i=this.layers_.length;r<i;++r)this.layers_[r].addEventListener(uo.CHANGE,t);this.useResolutions_=e.resolutions!==null,this.tileQueue_=new pj(function(){return 1},this.processSources_.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:_h(),declutter:null,extent:null,index:0,layerIndex:0,layerStatesArray:Yre(this.layers_),pixelRatio:1,pixelToCoordinateTransform:_h(),postRenderFunctions:[],size:[0,0],tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:Qo(this),renderTargets:{}},this.setAttributions(function(r){var s;const i=[];for(let a=0,o=e.sources.length;a<o;++a){const f=e.sources[a],y=f instanceof sv?f:f.getSource();if(!y)continue;const x=(s=y.getAttributions())==null?void 0:s(r);typeof x=="string"?i.push(x):x!==void 0&&i.push(...x)}return i}),e.operation!==void 0&&this.setOperation(e.operation,e.lib)}setOperation(e,t){this.processor_&&this.processor_.dispose(),this.processor_=new Qre({operation:e,imageOps:this.operationType_==="image",queue:1,lib:t,threads:this.threads_}),this.changed()}updateFrameState_(e,t,r){const i=Object.assign({},this.frameState_);i.viewState=Object.assign({},i.viewState);const s=Hf(e);i.size[0]=Math.ceil(Rs(e)/t),i.size[1]=Math.ceil(lA(e)/t),i.extent=[s[0]-i.size[0]*t/2,s[1]-i.size[1]*t/2,s[0]+i.size[0]*t/2,s[1]+i.size[1]*t/2],i.time=Date.now();const a=i.viewState;return a.center=s,a.projection=r,a.resolution=t,i}allSourcesReady_(){let e=!0,t;for(let r=0,i=this.layers_.length;r<i;++r)if(t=this.layers_[r].getSource(),!t||t.getState()!=="ready"){e=!1;break}return e}getImage(e,t,r,i){if(!this.allSourcesReady_())return null;this.tileQueue_.loadMoreTiles(16,16),t=this.findNearestResolution(t);const s=this.updateFrameState_(e,t,i);if(this.requestedFrameState_=s,this.renderedImageCanvas_){const a=this.renderedImageCanvas_.getResolution(),o=this.renderedImageCanvas_.getExtent();(t!==a||!Hm(s.extent,o))&&(this.renderedImageCanvas_=null)}return(!this.renderedImageCanvas_||this.getRevision()!==this.renderedRevision_)&&this.processSources_(),s.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const e=this.re
Line truncated
|
||||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(Lj(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,r){}}class oie extends d3{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:sie,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:fj,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!Wg(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||Wg(t,e)))return this.tileGrid;const r=Qo(e);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Pj(e)),this.tileGridForProjection[r]}createTile_(e,t,r,i,s,a){const o=[e,t,r],f=this.getTileCoordForTileUrlFunction(o,s),y=f?this.tileUrlFunction(f,i,s):void 0,x=new this.tileClass(o,y!==void 0?Nr.IDLE:Nr.EMPTY,y!==void 0?y:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return x.key=a,x.addEventListener(uo.CHANGE,this.handleTileChange.bind(this)),x}getTile(e,t,r,i,s){const a=this.getProjection();if(!a||!s||Wg(a,s))return this.getTileInternal(e,t,r,i,a||s);const o=[e,t,r],f=this.getKey(),y=this.getTileGridForProjection(a),x=this.getTileGridForProjection(s),B=this.getTileCoordForTileUrlFunction(o,s),O=new Oj(a,y,s,x,o,B,this.getTilePixelRatio(i),this.getGutter(),(T,F,j,N)=>this.getTileInternal(T,F,j,N,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return O.key=f,O}getTileInternal(e,t,r,i,s){const a=this.getKey();return this.createTile_(e,t,r,i,s,a)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,t){const r=Ma(e);if(r){const i=Qo(r);i in this.tileGridForProjection||(this.tileGridForProjection[i]=t)}}}function sie(n,e){n.getImage().src=e}class Uj extends oie{constructor(e){if(super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:Ma("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:"loading",tileLoadFunction:e.tileLoadFunction,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,zDirection:e.zDirection}),this.tileJSON_=null,this.tileSize_=e.tileSize,e.url)if(e.jsonp)Hre(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",e.url),t.send()}else if(e.tileJSON)this.handleTileJSONResponse(e.tileJSON);else throw new Error("Either `url` or `tileJSON` options must be provided")}onXHRLoad_(e){const t=e.target;if(!t.status||t.status>=200&&t.status<300){let r;try{r=JSON.parse(t.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(r)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const t=Ma("EPSG:4326"),r=this.getProjection();let i;if(e.bounds!==void 0){const y=v_(t,r);i=vJ(e.bounds,y)}const s=c3(r),a=e.minzoom||0,o=e.maxzoom||22,f=cO({extent:s,maxZoom:o,minZoom:a,tileSize:this.tileSize_});if(this.tileGrid=f,this.tileUrlFunction=Lj(e.tiles,f),e.attribution&&!this.getAttributions()){const y=i!==void 0?i:s;this.setAttributions(function(x){return Fu(y,x.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const aie={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},gk={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class lie extends Ij{constructor(e,t){super(e,t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=_h(),this.tileClipContexts_=null}drawTile(e,t,r,i,s,a,o,f){this.updateExecutorGroup_(e,t.pixelRatio,t.viewState.projection),this.tileImageNeedsRender_(e)&&this.renderTileImage_(e,t),super.drawTile(e,t,r,i,s,a,o,f)}getTile(e,t,r,i){const s=this.getOrCreateTile(e,t,r,i);if(!s)return null;const o=i.viewState.resolution,f=i.viewHints;return(!(f[Yl.ANIMATING]||f[Yl.INTERACTING])||!s.wantedResolution)&&(s.wantedResolution=o),s}prepareFrame(e){const t=th
Line truncated
|
||||
This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
|
||||
and paste the contents of this message in the report.
|
||||
Thank you!
|
||||
Filter Expression:
|
||||
${JSON.stringify(t,null,2)}
|
||||
`)}const i=hN[`filter_${e}`],s=EB(r,i);let a=null;if(s.result==="error")throw new Error(s.value.map(x=>`${x.key}: ${x.message}`).join(", "));a=(x,B,O)=>s.value.evaluate(x,B,{},O);let o=null,f=null;if(r!==t){const x=EB(t,i);if(x.result==="error")throw new Error(x.value.map(B=>`${B.key}: ${B.message}`).join(", "));o=(B,O,T,F,j)=>x.value.evaluate(B,O,{},T,void 0,void 0,F,j),f=!v3(x.value.expression)}a=a;const y=gN(r);return{filter:a,dynamicFilter:o||void 0,needGeometry:y,needFeature:!!f}}function Poe(n){if(!Ky(n))return n;let e=BB(n);return mN(e),e=pN(e),e}function pN(n){if(!Array.isArray(n))return n;const e=Roe(n);return e===!0?e:e.map(t=>pN(t))}function mN(n){let e=!1;const t=[];if(n[0]==="case"){for(let r=1;r<n.length-1;r+=2)e=e||Ky(n[r]),t.push(n[r+1]);t.push(n[n.length-1])}else if(n[0]==="match"){e=e||Ky(n[1]);for(let r=2;r<n.length-1;r+=2)t.push(n[r+1]);t.push(n[n.length-1])}else if(n[0]==="step"){e=e||Ky(n[1]);for(let r=1;r<n.length-1;r+=2)t.push(n[r+1])}e&&(n.length=0,n.push("any",...t));for(let r=1;r<n.length;r++)mN(n[r])}function Ky(n){if(!Array.isArray(n))return!1;if(Koe(n[0]))return!0;for(let e=1;e<n.length;e++){const t=n[e];if(Ky(t))return!0}return!1}function Koe(n){return n==="pitch"||n==="distance-from-center"}const Doe=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function Roe(n){if(Doe.has(n[0]))for(let e=1;e<n.length;e++){const t=n[e];if(Ky(t))return!0}return n}function Foe(n,e){return n<e?-1:n>e?1:0}function gN(n){if(!Array.isArray(n))return!1;if(n[0]==="within")return!0;for(let e=1;e<n.length;e++)if(gN(n[e]))return!0;return!1}function ox(n){if(!n)return!0;const e=n[0];return n.length<=1?e!=="any":e==="=="?M5(n[1],n[2],"=="):e==="!="?Rb(M5(n[1],n[2],"==")):e==="<"||e===">"||e==="<="||e===">="?M5(n[1],n[2],e):e==="any"?Loe(n.slice(1)):e==="all"?["all"].concat(n.slice(1).map(ox)):e==="none"?["all"].concat(n.slice(1).map(ox).map(Rb)):e==="in"?Ok(n[1],n.slice(2)):e==="!in"?Rb(Ok(n[1],n.slice(2))):e==="has"?Ik(n[1]):e==="!has"?Rb(Ik(n[1])):e==="within"?n:!0}function M5(n,e,t){switch(n){case"$type":return[`filter-type-${t}`,e];case"$id":return[`filter-id-${t}`,e];default:return[`filter-${t}`,n,e]}}function Loe(n){return["any"].concat(n.map(ox))}function Ok(n,e){if(e.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(t=>typeof t!=typeof e[0])?["filter-in-large",n,["literal",e.sort(Foe)]]:["filter-in-small",n,["literal",e]]}}function Ik(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function Rb(n){return["!",n]}var Uoe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function zoe(n,e){const t={};for(const r in n)r!=="ref"&&(t[r]=n[r]);return Uoe.forEach(r=>{r in e&&(t[r]=e[r])}),t}function yN(n){n=n.slice();const e=Object.create(null);for(let t=0;t<n.length;t++)e[n[t].id]=n[t];for(let t=0;t<n.length;t++)"ref"in n[t]&&(n[t]=zoe(n[t],e[n[t].ref]));return n}var kk={thin:100,hairline:100,"ultra-light":200,"extra-light":200,light:300,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,"extra-bold":800,"ultra-bold":800,heavy:900,black:900,"heavy-black":900,fat:900,poster:900,"ultra-black":950,"extra-black":950},Lv=" ",Tk=/(italic|oblique)$/i,Pk={},joe=function(n,e,t){var r=Pk[n];if(!r){Array.isArray(n)||(n=[n]);for(var i=400,s="normal",a=[],o,f,y=0,x=n.length;y<x;++y){var B=n[y],O=B.split(" "),T=O[O.length-1].toLowerCase();T=="normal"||T=="italic"||T=="oblique"?(s=f?s:T,f=!0,O.pop(),T=O[O.length-1].toLowerCase()):Tk.test(T)&&(T=T.replace(Tk,""),s=f?s:O[O.length-1].replace(T,""),f=!0);for(var F in kk){var j=O.length>1?O[O.length-2].toLowerCase():"";if(T==F||T==F.replace("-","")||j+"-"+T==F){i=o?i:kk[F],O.pop(),j&&F.startsWith(j)&&O.pop();break}}!o&&typeof T=="number"&&(i=T,o=!0);var N=O.join(Lv).replace("Klokantech Noto Sans","Noto Sans");N.indexOf(Lv)!==-1&&(N='"'+N+'"'),a.push(N)}r=Pk[n]=[s,i,a]}return r[0]+Lv+r[1]+Lv+e+"px"+(t?"/"+t:"")+Lv+r[2]},OB=Nj(joe);const vN="https://api.mapbox.com";function FO(n){const e="mapbox://";return n.indexOf(e)!==0?"":n.slice(e.length)}function Noe(n,e,t){const r=FO(n);if(!r)return decodeURI(new URL(n,t).href);const i="sprites/";if(r.indexOf(i)!==0)throw new Error(`unexpected sprites url: ${n}`);const s=r.slice(i.length);return`${vN}/styles/v1/${s}/sprite?access_token=${e}`}function sx(n,e){const t=FO(n);if(!t)return decodeURI(new URL(n,location.href).href);const r="styles/";if(t.indexOf(r)!==0)throw new Error(`unexpected style url: ${n}`);const i=t.slice(r.length);return`${vN}/styles/v1/${i}?&access_token=${e}`}const Woe=["a","b","c","d"];function a2(n,e,t,r){const i=new URL(n,r),s=FO(n);if(!s)return e?(i.searchParams.has(t)||i.searchParams.set(t,e),[decodeURI(i.href)]):[decodeURI(i.href)];if(s==="mapbox.satellite"){const a=window.devicePixelRatio>=1.5?"@2x":"";return[`https://api.mapbox.com/v4/${s}/{
Line truncated
|
||||
`),i=$oe.slice(0,Math.round(e/.1));for(let s=0,a=r.length;s<a;++s)s>0&&(t+=`
|
||||
`),t+=r[s].split("").join(i);return t}return n}let E5;function xN(){return E5||(E5=C3(1,1).getContext("2d")),E5}function _g(n,e){return xN().measureText(n).width+(n.length-1)*e}const Uk={};function kB(n,e,t,r){if(n.indexOf(`
|
||||
`)!==-1){const a=n.split(`
|
||||
`),o=[];for(let f=0,y=a.length;f<y;++f)o.push(kB(a[f],e,t,r));return o.join(`
|
||||
`)}const i=t+","+e+","+n+","+r;let s=Uk[i];if(!s){const a=n.split(" ");if(a.length>1){const o=xN();o.font=e;const y=o.measureText("M").width*t;let x="";const B=[];for(let O=0,T=a.length;O<T;++O){const F=a[O],j=x+(x?" ":"")+F;_g(j,r)<=y?x=j:(x&&B.push(x),x=F)}x&&B.push(x);for(let O=0,T=B.length;O<T&&T>1;++O){const F=B[O];if(_g(F,r)<y*.35){const j=O>0?_g(B[O-1],r):1/0,N=O<T-1?_g(B[O+1],r):1/0;B.splice(O,1),T-=1,j<N?(B[O-1]+=" "+F,O-=1):B[O]=F+" "+B[O]}}for(let O=0,T=B.length-1;O<T;++O){const F=B[O],j=B[O+1];if(_g(F,r)>y*.7&&_g(j,r)<y*.6){const N=F.split(" "),q=N.pop();_g(q,r)<y*.2&&(B[O]=N.join(" "),B[O+1]=q+" "+j),T-=1}}s=B.join(`
|
||||
`)}else s=n;s=IB(s,r),Uk[i]=s}return s}const Voe=/font-family: ?([^;]*);/,Hoe=/("|')/g;let Fb;function Zoe(n){if(!Fb){Fb={};const e=document.styleSheets;for(let t=0,r=e.length;t<r;++t){const i=e[t];try{const s=i.rules||i.cssRules;if(s)for(let a=0,o=s.length;a<o;++a){const f=s[a];if(f.type==5){const y=f.cssText.match(Voe);Fb[y[1].replace(Hoe,"")]=!0}}}catch{}}}return n in Fb}const B5={};function Xoe(n,e="https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css"){const t=n.toString();if(t in B5)return B5[t];const r=[];for(let i=0,s=n.length;i<s;++i){n[i]=n[i].replace("Arial Unicode MS","Arial");const a=n[i],o=OB(a,1);cz(o);const f=o.split(" ");r.push([f.slice(3).join(" ").replace(/"/g,""),f[1],f[0]])}for(let i=0,s=r.length;i<s;++i){const a=r[i],o=a[0];if(!Zoe(o)&&Yp.get(`${a[2]}
|
||||
${a[1]}
|
||||
${o}`)!==100){const f=e.replace("{font-family}",o.replace(/ /g,"-").toLowerCase()).replace("{Font+Family}",o.replace(/ /g,"+")).replace("{fontweight}",a[1]).replace("{-fontstyle}",a[2].replace("normal","").replace(/(.+)/,"-$1")).replace("{fontstyle}",a[2]);if(!document.querySelector('link[href="'+f+'"]')){const y=document.createElement("link");y.href=f,y.rel="stylesheet",document.head.appendChild(y)}}}return B5[t]=n,n}const Joe={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},ese={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},tse=function(n,e){const t=Boe(n,e);if(t.result==="error")throw new Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));return t.value},TB={},ax={zoom:0};let Lb,O5;function _i(n,e,t,r,i,s,a){const o=n.id;s||(s={},console.warn("No functionCache provided to getValue()")),s[o]||(s[o]={});const f=s[o];if(!f[t]){let y=(n[e]||TB)[t];const x=hN[`${e}_${n.type}`][t];y===void 0&&(y=x.default);let B=Eoe(y);if(!B&&dN(y)&&(y=cie(y,x),B=!0),B){const O=tse(y,x);f[t]=O.evaluate.bind(O)}else x.type=="color"&&(y=uf.parse(y)),f[t]=function(){return y}}return ax.zoom=r,f[t](ax,i,a)}function zk(n,e,t,r,i){return _i(n,"layout",`${r}-allow-overlap`,e,t,i)?_i(n,"layout",`${r}-ignore-placement`,e,t,i)?"none":"obstacle":"declutter"}function nse(n,e,t,r,i){return i||console.warn("No filterCache provided to evaluateFilter()"),n in i||(i[n]=Toe(e).filter),ax.zoom=r,i[n](ax,t)}function I0(n,e){if(n){if(n.a===0||e===0)return;const t=n.a;return e=e===void 0?1:e,t===0?"transparent":"rgba("+Math.round(n.r*255/t)+","+Math.round(n.g*255/t)+","+Math.round(n.b*255/t)+","+t*e+")"}return n}const rse=/\{[^{}}]*\}/g;function I5(n,e){return n.replace(rse,function(t){return e[t.slice(1,-1)]||""})}const ise={};function ose(n,e,t,r=cm,i=void 0,s=void 0,a=void 0,o=void 0){if(typeof e=="string"&&(e=JSON.parse(e)),e.version!=8)throw new Error("glStyle version 8 required.");ise[Qoe(e,n)]=Array.from(arguments);let f,y,x;if(s){if(typeof Image<"u"){const G=new Image;let ie;Qy(()=>s).then(he=>{he instanceof Request?fetch(he).then(pe=>pe.blob()).then(pe=>{ie=URL.createObjectURL(pe),G.src=ie}).catch(()=>{}):(G.crossOrigin="anonymous",G.src=he,ie&&URL.revokeObjectURL(ie))}),G.onload=function(){f=G,y=[G.width,G.height],n.changed(),G.onload=null}}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){const G=self;G.postMessage({action:"loadImage",src:s}),G.addEventListener("message",function(he){he.data.action==="imageLoaded"&&he.data.src===s&&(f=he.data.image,y=[f.width,f.height])})}}const B=yN(e.layers),O={},T=[],F={},j={},N=CN(e),q=qoe(e);let H;for(let G=0,ie=B.length;G<ie;++G){const he=B[G],pe=he.id;if(typeof t=="string"&&he.source==t||Array.isArray(t)&&t.indexOf(pe)!==-1){const Ee=he["source-layer"];if(H){if(he.source!==H)throw new Error(`Layer "${pe}" does not use source "${H}`)}else{H=he.source;const Se=e.sources[H];if(!Se)throw new Error(`Source "${H}" is not defined`);const De=Se.type;if(De!=="vector"&&De!=="geojson")throw new Error(`Source "${H}" is not of type "vector" or "geojson", but "${De}"`)}let me=O[Ee];me||(me=[],O[Ee]=me),me.push({layer:he,index:G}),T.push(pe)}}const oe=new R0,ne=new jm,$=[],te=function(G,ie,he){const pe=G.getProperties(),Ee=O[pe.layer];if(!Ee)return;let me=r.indexOf(ie);me==-1&&(me=UO(ie,r));const Se=Joe[G.getGeometry().getType()],De={id:G.getId(),properties:pe,type:Se},be=n.get("mapbox-featurestate")[G.getId()];let at=-1;for(let Ze=0,Je=Ee.length;Ze<Je;++Ze){const We=Ee[Ze],Me=We.layer,Fe=Me.id;if(he!==void 0&&he!==Fe)continue;const He=Me.layout||TB,bt=Me.paint||TB;if(He.visibility==="none"||"minzoom"in Me&&me<Me.minzoom||"maxzoom"in Me&&me>=Me.maxzoom)continue;const Yt=Me.filter;if(!Yt||nse(Fe,Yt,De,me,q)){let gt,Lt,Kt,Ue,Pe,Be;const it=We.index;if(Se==3&&(Me.type=="fill"||Me.type=="fill-extrusion"))if(Lt=_i(Me,"paint",Me.type+"-opacity",me,De,N,be),Me.type+"-pattern"in bt){const dr=_i(Me,"paint",Me.type+"-pattern",me,De,N,be);if(dr){const vr=typeof dr=="string"?I5(dr,pe):dr.toString();if(f&&i&&i[vr]){++at,Be=$[at],(!Be||!Be.getFill()||Be.getStroke()||Be.getText())&&(Be=new nf({fill:new jm}),$[at]=Be),Kt=Be.getFill(),Be.setZIndex(it);const Jn=vr+"."+Lt;let Qe=j[Jn];if(!Qe){const ce=i[vr],fe=C3(ce.width,ce.height),nt=fe.getContext("2d");nt.globalAlpha=Lt,nt.drawImage(f,ce.x,ce.y,ce.width,ce.height,0,0,ce.width,ce.height),Qe=nt.createPattern(fe,"repeat"),j[Jn]=Qe}Kt.setColor(Qe)}}}else gt=I0(_i(Me,"paint",Me.type+"-color",me,De,N,be),Lt),Me.type+"-outline-color"in bt&&(Pe=I0(_i(Me,"paint",Me.type+"-outline-color",me,De,N,be),Lt)),Pe||(Pe=gt),(gt||Pe)&&(++at,Be=$[at],(!Be||gt&&!Be.getFill()||!gt&&Be.getFill()||Pe&&!Be.getStroke()||!Pe&&Be.getStroke()||Be.getText())&&(Be=new nf({fill:gt?new jm:void 0,stroke:Pe?new R0:void 0}),$[at]=Be),gt&&(Kt=Be.getFill(),Kt.setColor(gt)),Pe&&(Ue=Be.getStroke(),Ue.setColor(Pe),Ue.setWidth(.5)),Be.setZIndex(it));if(Se!=1&&Me.tLine truncated
|
||||
`)return Jn.push(`
|
||||
`,""),Jn;if(Se==2)return Jn.push(IB(St,pn),nt),Jn;St=kB(St,nt,Zn,pn).split(`
|
||||
`);for(let Ht=0,sn=St.length;Ht<sn;++Ht)Ht>0&&Jn.push(`
|
||||
`,""),Jn.push(St[Ht],nt);return Jn},[]):qn=I5(vr,pe).trim(),Lt=_i(Me,"paint","text-opacity",me,De,N,be)}if(qn&&Lt&&!_n){_t||(++at,Be=$[at],(!Be||!Be.getText()||Be.getFill()||Be.getStroke())&&(Be=new nf,$[at]=Be),Be.setImage(void 0),Be.setGeometry(void 0));const dr=zk(Me,me,De,"text",N);Be.getText()||Be.setText(ft),ft=Be.getText(),(!ft||"getDeclutterMode"in ft&&ft.getDeclutterMode()!==dr)&&(ft=new s3({padding:[2,2,2,2],declutterMode:dr}),Be.setText(ft));const vr=_i(Me,"layout","text-transform",me,De,N,be);vr=="uppercase"?qn=Array.isArray(qn)?qn.map((Ye,rt)=>rt%2?Ye:Ye.toUpperCase()):qn.toUpperCase():vr=="lowercase"&&(qn=Array.isArray(qn)?qn.map((Ye,rt)=>rt%2?Ye:Ye.toLowerCase()):qn.toLowerCase());const Jn=Array.isArray(qn)?qn:Se==2?IB(qn,pn):kB(qn,tn,Zn,pn);if(ft.setText(Jn),ft.setFont(tn),ft.setRotation(S5(_i(Me,"layout","text-rotate",me,De,N,be))),typeof ft.setKeepUpright=="function"){const Ye=_i(Me,"layout","text-keep-upright",me,De,N,be);ft.setKeepUpright(Ye)}const Qe=_i(Me,"layout","text-anchor",me,De,N,be),ce=_t||Se==1?"point":_i(Me,"layout","symbol-placement",me,De,N,be);let fe;if(ce==="line-center"?(ft.setPlacement("line"),fe="center"):ft.setPlacement(ce),ce==="line"&&typeof ft.setRepeat=="function"){const Ye=_i(Me,"layout","symbol-spacing",me,De,N,be);ft.setRepeat(Ye*2)}ft.setOverflow(ce==="point");let nt=_i(Me,"paint","text-halo-width",me,De,N,be);const St=_i(Me,"layout","text-offset",me,De,N,be),Ht=_i(Me,"paint","text-translate",me,De,N,be);let sn=0,tr=0;if(ce=="point"){fe="center",Qe.indexOf("left")!==-1?(fe="left",tr=nt):Qe.indexOf("right")!==-1&&(fe="right",tr=-nt);const Ye=_i(Me,"layout","text-rotation-alignment",me,De,N,be);ft.setRotateWithView(Ye=="map")}else ft.setMaxAngle(S5(_i(Me,"layout","text-max-angle",me,De,N,be))*qn.length/Jn.length),ft.setRotateWithView(!1);ft.setTextAlign(fe);let Oe="middle";Qe.indexOf("bottom")==0?(Oe="bottom",sn=-nt-.5*(rr-1)*Dn):Qe.indexOf("top")==0&&(Oe="top",sn=nt+.5*(rr-1)*Dn),ft.setTextBaseline(Oe);const se=_i(Me,"layout","text-justify",me,De,N,be);ft.setJustify(se==="auto"?void 0:se),ft.setOffsetX(St[0]*Dn+tr+Ht[0]),ft.setOffsetY(St[1]*Dn+sn+Ht[1]),ne.setColor(I0(_i(Me,"paint","text-color",me,De,N,be),Lt)),ft.setFill(ne);const ve=I0(_i(Me,"paint","text-halo-color",me,De,N,be),Lt);if(ve&&nt>0){oe.setColor(ve),nt*=2;const Ye=.5*Dn;oe.setWidth(nt<=Ye?nt:Ye),ft.setStroke(oe)}else ft.setStroke(void 0);const p=_i(Me,"layout","text-padding",me,De,N,be),Ne=ft.getPadding();p!==Ne[0]&&(Ne[0]=p,Ne[1]=p,Ne[2]=p,Ne[3]=p),Be.setZIndex(it)}}}if(at>-1)return $.length=at+1,$};return n.setStyle(te),n.set("mapbox-source",H),n.set("mapbox-layers",T),n.set("mapbox-featurestate",n.get("mapbox-featurestate")||{}),te}function sse(n,e){const t=n[0],r=t.width,i=t.height,s=t.data,a=new Uint8ClampedArray(s.length),o=e.resolution*2,f=r-1,y=i-1,x=[0,0,0,0],B=2*Math.PI,O=Math.PI/2,T=Math.PI*e.sunEl/180,F=Math.PI*e.sunAz/180,j=Math.cos(T),N=Math.sin(T),q=e.highlightColor,H=e.shadowColor,oe=e.accentColor,ne=e.encoding;let $,te,G,ie,he,pe,Ee,me,Se,De,be,at,Ze,Je,We,Me,Fe,He,bt,Yt,gt,Lt;function Kt(Ue,Pe="mapbox"){if(Pe==="mapbox")return(Ue[0]*256*256+Ue[1]*256+Ue[2])*.1-1e4;if(Pe==="terrarium")return Ue[0]*256+Ue[1]+Ue[2]/256-32768}for(te=0;te<=y;++te)for(he=te===0?0:te-1,pe=te===y?y:te+1,$=0;$<=f;++$)G=$===0?0:$-1,ie=$===f?f:$+1,Ee=(te*r+G)*4,x[0]=s[Ee],x[1]=s[Ee+1],x[2]=s[Ee+2],x[3]=s[Ee+3],me=e.vert*Kt(x,ne),Ee=(te*r+ie)*4,x[0]=s[Ee],x[1]=s[Ee+1],x[2]=s[Ee+2],x[3]=s[Ee+3],Se=e.vert*Kt(x,ne),De=(Se-me)/o,Ee=(he*r+$)*4,x[0]=s[Ee],x[1]=s[Ee+1],x[2]=s[Ee+2],x[3]=s[Ee+3],me=e.vert*Kt(x,ne),Ee=(pe*r+$)*4,x[0]=s[Ee],x[1]=s[Ee+1],x[2]=s[Ee+2],x[3]=s[Ee+3],Se=e.vert*Kt(x,ne),be=(Se-me)/o,Ze=Math.atan2(be,-De),Ze<0?Ze=O-Ze:Ze>O?Ze=B-Ze+O:Ze=O-Ze,at=Math.atan(Math.sqrt(De*De+be*be)),Lt=N*Math.cos(at)+j*Math.sin(at)*Math.cos(F-Ze),Je=Math.cos(at),We=255*Lt,bt=Math.min(Math.max(2*e.sunEl,0),1),Yt=1.875-e.opacity*1.75,gt=e.opacity!==.5?O*((Math.pow(Yt,at)-1)/(Math.pow(Yt,O)-1)):at,Fe={r:(1-Je)*oe.r*bt*255,g:(1-Je)*oe.g*bt*255,b:(1-Je)*oe.b*bt*255,a:(1-Je)*oe.a*bt*255},Me=Math.abs(((Ze+F)/Math.PI+.5)%2-1),He={r:(q.r*(1-Me)+H.r*Me)*We,g:(q.g*(1-Me)+H.g*Me)*We,b:(q.b*(1-Me)+H.b*Me)*We,a:(q.a*(1-Me)+H.a*Me)*We},Ee=(te*r+$)*4,a[Ee]=Fe.r*(1-Me)+He.r,a[Ee+1]=Fe.g*(1-Me)+He.g,a[Ee+2]=Fe.b*(1-Me)+He.b,a[Ee+3]=s[Ee+3]*e.opacity*bt*Math.sin(gt);return new ImageData(a,r,i)}function ase(n,e=512){return n.getExtent()?cO({extent:n.getExtent(),tileSize:e,maxZoom:22}).getResolutions():cm}function wN(n,e){return e.accessToken||(e=Object.assign({},e),new URL(n).searchParams.forEach((r,i)=>{e.accessToken=r,e.accessTokenParam=i})),e}function lse(n,e,t="",r={},i=void 0){let s,a,o,f,y=!0;return typeof t!="string"&&!Array.isArray(t)?(o=t,f=o.source||o.layers,r=o):f=t,typeof r=="string"?(s=r,o={}):(s=r.styleUrl,o=r),o.updateSource===!1&&(y=!1),i||(i=o.resolutions),!s&&typeof e=="string"&&!e.trim().startsWith("{")&&(s=e),s&&(s=s.startsWith("data:")?location.href:sx(s,o.accessToken),o=wN(s,o)),new Promise(function(x,B){_N(e,o)
Line truncated
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/var Gk;function bse(){return Gk||(Gk=1,function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",a=0;a<arguments.length;a++){var o=arguments[a];o&&(s=i(s,r(o)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var o in s)e.call(s,o)&&s[o]&&(a=i(a,o));return a}function i(s,a){return a?s?s+" "+a:s+a:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()}(k5)),k5.exports}var xse=bse();const hm=Al(xse);function Og(){var n="/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",e="e73e8fb606fcd7318a8222b2e50c576ed3ad8702",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",statementMap:{0:{start:{line:6,column:22},end:{line:10,column:5}},1:{start:{line:11,column:4},end:{line:11,column:154}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:12,column:3}},line:5}},branchMap:{0:{loc:{start:{line:11,column:11},end:{line:11,column:153}},type:"cond-expr",locations:[{start:{line:11,column:52},end:{line:11,column:92}},{start:{line:11,column:111},end:{line:11,column:153}}],line:11}},s:{0:0,1:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx"],names:[],mappings:"AAeoC;AAfpC,OAAO,WAAW;AAClB,SAAQ,iBAAiB,qBAAoB;AAO7C,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK,MAAM;AAAA,IAChB;AACA,WAAO,KAAK,MAAM,cAAc,oBAAC,iBAAc,OAAO,WAAU,IAAK,oBAAC,mBAAgB,OAAO,WAAW;AAAA,EAC1G;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e73e8fb606fcd7318a8222b2e50c576ed3ad8702"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Og=function(){return a},a}Og();class wse extends nr.Component{render(){Og().f[0]++;const e=(Og().s[0]++,{width:20,height:20,...this.props.style});return Og().s[1]++,this.props.isCollapsed?(Og().b[0][0]++,ue.jsx(NZ,{style:e})):(Og().b[0][1]++,ue.jsx(jZ,{style:e}))}}function Cy(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",e="b04bfec534013c327fd210571832bbd2813a944a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:32,column:9}},1:{start:{line:11,column:25},end:{line:11,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:33,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:11,column:17},end:{line:11,column:18}},loc:{start:{line:11,column:25},end:{line:11,column:72}},line:11}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx"],names:[],mappings:"AAcM,SAIE,KAJF;AAdN,OAAO,WAAW;AAClB,OAAO,eAAe;AAUtB,qBAAqB,uBAAuB,MAAM,UAA+B;AAAA,EAC/E,SAAS;AACP,WAAO,oBAAC,QAAG,WAAU,6BACnB;AAAA,MAAC;AAAA;AAAA,QAAI,WAAU;AAAA,QACb,eAAa,sBAAoB,KAAK,MAAM,aAAa;AAAA,QACzD,SAAS,QAAM,KAAK,MAAM,eAAe,CAAC,KAAK,MAAM,QAAQ;AAAA,QAE7D;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,iBAAe,KAAK,MAAM,eAAe;AAAA,cACzC,iBAAe,KAAK,MAAM;AAAA,cAEzB,eAAK,MAAM;AAAA;AAAA,UACd;AAAA,UACA,oBAAC,UAAK,WAAU,kBAAiB;AAAA,UACjC;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,QAAQ,IAAI,OAAO,GAAG;AAAA,cAC/B,aAAa,KAAK,MAAM;AAAA;AAAA,UAC1B;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b04bfec534013c327fd210571832bbd2813a944a"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Cy=function(){return a},a}Cy();class Mse extends nr.Component{render(){return Cy().f[0]++,Cy().s[0]++,ue.jsx("li",{className:"maputnik-layer-list-group",children:ue.jsxs("div",{className:"maputnik-layer-list-group-header","data-wd-key":"layer-list-group:"+this.props["data-wd-key"],onClick:e=>(Cy().f[1]++,Cy().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:[ue.jsx("button",{className:"maputnik-layer-list-group-title","aria-controls":this.props["aria-controls"],"aria-expanded":this.props.isActive,children:this.props.title}),ue.jsx("span",{className:"maputnik-space"}),ue.jsx(wse,{style:{height:14,width:14},isCollapsed:this.props.isActive})]})})}}function XC(){return XC=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},XC.apply(null,arguments)}function Sse(n){if(Array.isArray(n))return n}function Ese(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,s,a,o=[],f=!0,y=!1;try{if(s=(t=t.call(n)).next,e!==0)for(;!(f=(r=s.call(t)).done)&&(o.push(r.value),o.length!==e);f=!Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PN(n,e){return Sse(n)||Ese(n,e)||TN(n,e)||Bse()}function Zy(n){"@babel/helpers - typeof";return Zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zy(n)}function Ose(n,e){if(Zy(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(Zy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function KN(n){var e=Ose(n,"string");return Zy(e)=="symbol"?e:e+""}function za(n,e,t){return(e=KN(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function T5(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(t).filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.forEach(function(i){za(n,i,t[i])})}return n}function B_(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Ise(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,KN(r.key),r)}}function O_(n,e,t){return e&&Ise(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function gs(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function zO(n,e){if(e&&(Zy(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gs(n)}function JC(n){return JC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},JC(n)}function KB(n,e){return KB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},KB(n,e)}function jO(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&KB(n,e)}var P5,Qk;function kse(){if(Qk)return P5;Qk=1;var n=function(e,t,r,i,s,a,o,f){if(!e){var y;if(t===void 0)y=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var x=[r,i,s,a,o,f],B=0;y=new Error(t.replace(/%s/g,function(){return x[B++]})),y.name="Invariant Violation"}throw y.framesToPop=1,y}};return P5=n,P5}var Tse=kse();const Xg=Al(Tse);function Pse(n){if(Array.isArray(n))return PB(n)}function Kse(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function Dse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rse(n){return Pse(n)||Kse(n)||TN(n)||Dse()}var Fse=function(){function n(){B_(this,n),za(this,"refs",{})}return O_(n,[{key:"add",value:function(t,r){this.refs[t]||(this.refs[t]=[]),this.refs[t].push(r)}},{key:"remove",value:function(t,r){var i=this.getIndex(t,r);i!==-1&&this.refs[t].splice(i,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var t=this;return this.refs[this.active.collection].find(function(r){var i=r.node;return i.sortableInfo.index==t.active.index})}},{key:"getIndex",value:function(t,r){return this.refs[t].indexOf(r)}},{key:"getOrderedRefs",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.active.collection;return this.refs[t].sort(Lse)}}]),n}();function Lse(n,e){var t=n.node.sortableInfo.index,r=e.node.sortableInfo.index;return t-r}function DN(n,e){return Object.keys(n).reduce(function(t,r){return e.indexOf(r)===-1&&(t[r]=n[r]),t},{})}var U1={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},RN=function(){if(typeof window>"u"||typeof document>"u")return"";var n=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],e=(Array.prototype.slice.call(n).join("").match(/-(moz|webkit|ms)-/)||n.OLink===""&&["","o"])[1];switch(e){case"ms":return"ms";default:return e&&e.length?e[0].toUpperCase()+e.substr(1):""}}();function Ub(n,e){Object.keys(e).forEach(function(t){n.style[t]=e[t]})}function zb(n,e){n.style["".concat(RN,"Transform")]=e==null?"":"translate3d(".concat(e.x,"px,").concat(e.y,"px,0)")}function K5(n,e){n.style["".concat(RN,"TransitionDuration")]=e==null?"":"".concat(e,"ms")}function nC(n,e){for(;n;){if(e(n))return n;n=n.parentNode}return null}function qk(n,e,t){return Math.max(n,Math.min(t,e))}function _y(n){return n.substr(-2)==="px"?parseFloat(n):0}function Use(n){var e=window.getComputedStyle(n);return{bottom:_y(e.marginBottom),left:_y(e.marginLeft),right:_y(e.marginRight),top:_y(e.marginTop)}}function NO(n,e){var t=e.displayName||e.name;return t?"".concat(n,"(").concat(t,")"):n}function D5(n,e){var t=n.getBoundingClientRect();return{top:t.top+e.top,left:t.left+e.left}}function Uv(n){return n.touches&&n.touches.length?{x:n.touches[0].pageX,y:n.touches[0].pageY}:n.changedTouches&&n.changedTouches.length?{x:n.changedTouches[0].pageX,y:n.changedTouches[0].pageY}:{x:n.pageX,y:n.pageY}}function zse(n){return n.touches&&n.touches.length||n.changedTouches&&n.changedTouches.length}function l2(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{left:0,top:0};if(n){var r={left:t.left+n.offsetLeft,top:t.top+n.offsetTop};return n.parentNode===e?r:l2(n.parentNode,e,r)}}function jse(n,e,t){return n<t&&n>e?n-1:n>t&&n<e?n+1:n}function Yk(n){var e=n.lockOffset,t=n.width,r=n.height,i=e,s=e,a="px";if(typeof e=="string"){var o=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(e);Xg(o!==null,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',e),i=parseFloat(e),s=parseFloat(e),a=o[1]}return Xg(isFinite(i)&&isFinite(s),"lockOffset value should be a finite. Given %s",e),a==="%"&&(i=i*t/100,s=s*r/100),{x:i,y:s}}function Nse(n){var e=n.height,t=n.width,r=n.lockOffset,i=Array.isArray(r)?r:[r,r];Xg(i.length===2,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var s=PN(i,2),a=s[0],o=s[1];return[Yk({height:e,lockOffset:a,width:t}),Yk({height:e,lockOffset:o,width:t})]}function Wse(n){var e=window.getComputedStyle(n),t=/(auto|scroll)/,r=["overflow","overflowX","overflowY"];return r.find(function(i){return t.test(e[i])})}function FN(n){return n instanceof HTMLElement?Wse(n)?n:FN(n.parentNode):null}function Gse(n){var e=window.getComputedStyle(n);return e.display==="grid"?{x:_y(e.gridColumnGap),y:_y(e.gridRowGap)}:{x:0,y:0}}var bg={TAB:9,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40},Ig={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function Qse(n){var e="input, textarea, select, canvas, [contenteditable]",t=n.querySelectorAll(e),r=n.cloneNode(!0),i=Rse(r.querySelectorAll(e));return i.forEach(function(s,a){if(s.type!=="file"&&(s.value=t[a].value),s.type==="radio"&&s.name&&(s.name="__sortableClone__".concat(s.name)),s.tagName===Ig.Canvas&&t[a].width>0&&t[a].height>0){var o=s.getContext("2d");o.drawImage(t[a],0,0)}}),r}function qse(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return t=e=function(i){jO(s,i);function s(){var a,o;B_(this,s);for(var f=arguments.length,y=new Array(f),x=0;x<f;x++)y[x]=arguments[x];return o=zO(this,(a=JC(s)).call.apply(a,[this].concat(y))),za(gs(gs(o)),"wrappedInstance",ui.createRef()),o}return O_(s,[{key:"componentDidMount",value:function(){var o=Nx.findDOMNode(this);o.sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return Xg(r.with
Line truncated
|
||||
* tabbable 6.2.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*/var NN=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ux=NN.join(","),WN=typeof Element>"u",Jg=WN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ax=!WN&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n==null?void 0:n.ownerDocument},cx=function n(e,t){var r;t===void 0&&(t=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=i===""||i==="true",a=s||t&&e&&n(e.parentNode);return a},oae=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},GN=function(e,t,r){if(cx(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(ux));return t&&Jg.call(e,ux)&&i.unshift(e),i=i.filter(r),i},QN=function n(e,t,r){for(var i=[],s=Array.from(e);s.length;){var a=s.shift();if(!cx(a,!1))if(a.tagName==="SLOT"){var o=a.assignedElements(),f=o.length?o:a.children,y=n(f,!0,r);r.flatten?i.push.apply(i,y):i.push({scopeParent:a,candidates:y})}else{var x=Jg.call(a,ux);x&&r.filter(a)&&(t||!e.includes(a))&&i.push(a);var B=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),O=!cx(B,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(B&&O){var T=n(B===!0?a.children:B.children,!0,r);r.flatten?i.push.apply(i,T):i.push({scopeParent:a,candidates:T})}else s.unshift.apply(s,a.children)}}return i},qN=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},P0=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||oae(e))&&!qN(e)?0:e.tabIndex},sae=function(e,t){var r=P0(e);return r<0&&t&&!qN(e)?0:r},aae=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},YN=function(e){return e.tagName==="INPUT"},lae=function(e){return YN(e)&&e.type==="hidden"},uae=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},Aae=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},cae=function(e){if(!e.name)return!0;var t=e.form||Ax(e),r=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var s=Aae(i,e.form);return!s||s===e},dae=function(e){return YN(e)&&e.type==="radio"},hae=function(e){return dae(e)&&!cae(e)},fae=function(e){var t,r=e&&Ax(e),i=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var a,o,f;for(s=!!((a=i)!==null&&a!==void 0&&(o=a.ownerDocument)!==null&&o!==void 0&&o.contains(i)||e!=null&&(f=e.ownerDocument)!==null&&f!==void 0&&f.contains(e));!s&&i;){var y,x,B;r=Ax(i),i=(y=r)===null||y===void 0?void 0:y.host,s=!!((x=i)!==null&&x!==void 0&&(B=x.ownerDocument)!==null&&B!==void 0&&B.contains(i))}}return s},Vk=function(e){var t=e.getBoundingClientRect(),r=t.width,i=t.height;return r===0&&i===0},pae=function(e,t){var r=t.displayCheck,i=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Jg.call(e,"details>summary:first-of-type"),a=s?e.parentElement:e;if(Jg.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var o=e;e;){var f=e.parentElement,y=Ax(e);if(f&&!f.shadowRoot&&i(f)===!0)return Vk(e);e.assignedSlot?e=e.assignedSlot:!f&&y!==e.ownerDocument?e=y.host:e=f}e=o}if(fae(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Vk(e);return!1},mae=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var i=t.children.item(r);if(i.tagName==="LEGEND")return Jg.call(t,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},dx=function(e,t){return!(t.disabled||cx(t)||lae(t)||pae(t,e)||uae(t)||mae(t))},RB=function(e,t){return!(hae(t)||P0(t)<0||!dx(e,t))},gae=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},yae=function n(e){var t=[],r=[];return e.forEach(function(i,s){var a=!!i.scopeParent,o=a?i.scopeParent:i,f=sae(o,a),y=a?n(i.candidates):o;f===0?a?t.push.apply(t,y):t.push(o):r.push({documentOrder:s,tabIndex:f,item:i,isScope:a,content:y})}),r.sort(aae).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.pusLine truncated
|
||||
* focus-trap 7.5.4
|
||||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||||
*/function Hk(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Zk(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Hk(Object(t),!0).forEach(function(r){_ae(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Hk(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function _ae(n,e,t){return e=xae(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function bae(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function xae(n){var e=bae(n,"string");return typeof e=="symbol"?e:String(e)}var Xk={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r.pause()}var i=e.indexOf(t);i===-1||e.splice(i,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},wae=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Mae=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},xC=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Sae=function(e){return xC(e)&&!e.shiftKey},Eae=function(e){return xC(e)&&e.shiftKey},Jk=function(e){return setTimeout(e,0)},eT=function(e,t){var r=-1;return e.every(function(i,s){return t(i)?(r=s,!1):!0}),r},zv=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},jb=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Bae=[],Oae=function(e,t){var r=(t==null?void 0:t.document)||document,i=(t==null?void 0:t.trapStack)||Bae,s=Zk({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Sae,isKeyBackward:Eae},t),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,f=function(me,Se,De){return me&&me[Se]!==void 0?me[Se]:s[De||Se]},y=function(me,Se){var De=typeof(Se==null?void 0:Se.composedPath)=="function"?Se.composedPath():void 0;return a.containerGroups.findIndex(function(be){var at=be.container,Ze=be.tabbableNodes;return at.contains(me)||(De==null?void 0:De.includes(at))||Ze.find(function(Je){return Je===me})})},x=function(me){var Se=s[me];if(typeof Se=="function"){for(var De=arguments.length,be=new Array(De>1?De-1:0),at=1;at<De;at++)be[at-1]=arguments[at];Se=Se.apply(void 0,be)}if(Se===!0&&(Se=void 0),!Se){if(Se===void 0||Se===!1)return Se;throw new Error("`".concat(me,"` was specified but was not a node, or did not return a node"))}var Ze=Se;if(typeof Se=="string"&&(Ze=r.querySelector(Se),!Ze))throw new Error("`".concat(me,"` as selector refers to no known node"));return Ze},B=function(){var me=x("initialFocus");if(me===!1)return!1;if(me===void 0||!u2(me,s.tabbableOptions))if(y(r.activeElement)>=0)me=r.activeElement;else{var Se=a.tabbableGroups[0],De=Se&&Se.firstTabbableNode;me=De||x("fallbackFocus")}if(!me)throw new Error("Your focus-trap needs to have at least one focusable element");return me},O=function(){if(a.containerGroups=a.containers.map(function(me){var Se=$N(me,s.tabbableOptions),De=VN(me,s.tabbableOptions),be=Se.length>0?Se[0]:void 0,at=Se.length>0?Se[Se.length-1]:void 0,Ze=De.find(function(Me){return Eg(Me)}),Je=De.slice().reverse().find(function(Me){return Eg(Me)}),We=!!Se.find(function(Me){return P0(Me)>0});return{container:me,tabbableNodes:Se,focusableNodes:De,posTabIndexesFound:We,firstTabbableNode:be,lastTabbableNode:at,firstDomTabbableNode:Ze,lastDomTabbableNode:Je,nextTabbableNode:function(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,bt=Se.indexOf(Fe);return bt<0?He?De.slice(De.indexOf(Fe)+1).find(function(Yt){return Eg(Yt)}):De.slice(0,De.indexOf(Fe)).reverse().find(function(Yt){return Eg(Yt)}):Se[bt+(He?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(me){return me.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!x("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(me){return me.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},T=function Ee(me){var Se=me.activeElemeLine truncated
|
||||
|
||||
The URL must include:
|
||||
|
||||
- \`{fontstack}\` - When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the text-font property of a symbol layer.
|
||||
|
||||
- \`{range}\` - When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.
|
||||
|
||||
This property is required if any layer uses the \`text-field\` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).`,example:"https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"A style's `layers` property lists all the layers available in that style. The type of layer is specified by the `type` property, and must be one of `background`, `fill`, `line`, `symbol`, `raster`, `circle`, `fill-extrusion`, `heatmap`, `hillshade`.\n\nExcept for layers of the `background` type, each layer needs to refer to a source. Layers take the data that they get from a source, optionally filter features, and then define how those features are styled.",example:[{id:"coastline",source:"maplibre","source-layer":"countries",type:"line",paint:{"line-color":"#198EC8"}}]}},zae={"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},jae=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Nae={type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},Wae={type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayLine truncated
|
||||
|
||||
* In categorical functions, when the feature value does not match any of the stop domain values.
|
||||
|
||||
* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.
|
||||
|
||||
* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a \`circle-color\` property but the feature property value is not a string or not a valid color).
|
||||
|
||||
* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.
|
||||
|
||||
If no default is provided, the style property's default is used in these circumstances.`}},function_stop:ale,expression:lle,expression_name:ule,light:Ale,sky:cle,terrain:dle,projection:hle,paint:fle,paint_fill:ple,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",android:"7.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:mle,paint_circle:gle,paint_heatmap:yle,paint_symbol:vle,paint_raster:Cle,paint_hillshade:_le,paint_background:ble,transition:xle,"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constaLine truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var iue=M3(function n(e){var t=this,r=e.expanded,i=r===void 0?[]:r,s=e.allowMultipleExpanded,a=s===void 0?!1:s,o=e.allowZeroExpanded,f=o===void 0?!1:o;w3(this,n),Rl(this,"expanded",void 0),Rl(this,"allowMultipleExpanded",void 0),Rl(this,"allowZeroExpanded",void 0),Rl(this,"toggleExpanded",function(y){if(t.isItemDisabled(y))return t;var x=t.isItemExpanded(y);return x?t.augment({expanded:t.expanded.filter(function(B){return B!==y})}):t.augment({expanded:t.allowMultipleExpanded?[].concat(Zle(t.expanded),[y]):[y]})}),Rl(this,"isItemDisabled",function(y){var x=t.isItemExpanded(y),B=t.expanded.length===1;return!!(x&&!t.allowZeroExpanded&&B)}),Rl(this,"isItemExpanded",function(y){return t.expanded.indexOf(y)!==-1}),Rl(this,"getPanelAttributes",function(y,x){var B=x??t.isItemExpanded(y);return{role:t.allowMultipleExpanded?void 0:"region","aria-hidden":t.allowMultipleExpanded?!B:void 0,"aria-labelledby":t.getButtonId(y),id:t.getPanelId(y),hidden:B?void 0:!0}}),Rl(this,"getHeadingAttributes",function(){return{role:"heading"}}),Rl(this,"getButtonAttributes",function(y,x){var B=x??t.isItemExpanded(y),O=t.isItemDisabled(y);return{id:t.getButtonId(y),"aria-disabled":O,"aria-expanded":B,"aria-controls":t.getPanelId(y),role:"button",tabIndex:0}}),Rl(this,"getPanelId",function(y){return"accordion__panel-".concat(y)}),Rl(this,"getButtonId",function(y){return"accordion__heading-".concat(y)}),Rl(this,"augment",function(y){return new n(FB({expanded:t.expanded,allowMultipleExpanded:t.allowMultipleExpanded,allowZeroExpanded:t.allowZeroExpanded},y))}),this.expanded=i,this.allowMultipleExpanded=a,this.allowZeroExpanded=f}),aW=ui.createContext(null),lW=function(n){QO(t,n);var e=qO(t);function t(){var r;w3(this,t);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return r=e.call.apply(e,[this].concat(s)),Rl(_p(r),"state",new iue({expanded:r.props.preExpanded,allowMultipleExpanded:r.props.allowMultipleExpanded,allowZeroExpanded:r.props.allowZeroExpanded})),Rl(_p(r),"toggleExpanded",function(o){r.setState(function(f){return f.toggleExpanded(o)},function(){r.props.onChange&&r.props.onChange(r.state.expanded)})}),Rl(_p(r),"isItemDisabled",function(o){return r.state.isItemDisabled(o)}),Rl(_p(r),"isItemExpanded",function(o){return r.state.isItemExpanded(o)}),Rl(_p(r),"getPanelAttributes",function(o,f){return r.state.getPanelAttributes(o,f)}),Rl(_p(r),"getHeadingAttributes",function(){return r.state.getHeadingAttributes()}),Rl(_p(r),"getButtonAttributes",function(o,f){return r.state.getButtonAttributes(o,f)}),r}return M3(t,[{key:"render",value:function(){var i=this.state,s=i.allowZeroExpanded,a=i.allowMultipleExpanded;return ui.createElement(aW.Provider,{value:{allowMultipleExpanded:a,allowZeroExpanded:s,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),t}(ui.PureComponent);Rl(lW,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var uW=function(n){QO(t,n);var e=qO(t);function t(){var r;w3(this,t);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return r=e.call.apply(e,[this].concat(s)),Rl(_p(r),"renderChildren",function(o){return o?r.props.children(o):null}),r}return M3(t,[{key:"render",value:function(){return ui.createElement(aW.Consumer,null,this.renderChildren)}}]),t}(ui.PureComponent),oue=["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"],sue=function(e){var t=e.className,r=t===void 0?"accordion":t,i=e.allowMultipleExpanded,s=e.allowZeroExpanded,a=e.onChange,o=e.preExpanded,f=S3(e,oue);return ui.createElement(lW,{preExpanded:o,allowMultipleExpanded:i,allowZeroExpanded:s,onChange:a},ui.createElement("div",fm({"data-accordion-component":"Accordion",className:r},f)))},zB;(function(n){n.Accordion="Accordion",n.AccordionItem="AccordionItem",n.AccordionItemButton="AccordionItemButton",n.AccordionItemHeading="AccordionItemHeading",n.AccordionItemPanel="AccordionItemPanel"})(zB||(zB={}));var AW=zB,nw=0;function aue(){var n=nw;return nw=nw+1,"raa-".concat(n)}var lue=ui.useId||aue,uue=/[\u0009\u000a\u000c\u000d\u0020]/g;function e_(n){return n===""||uue.test(n)?(console.error('uuid must be a valid HTML5 id but was given "'.concat(n,'", ASCII whitespaces are forbidden')),!1):!0}var cW=ui.createContext(null),Aue=function(e){var t=e.children,r=e.uuid,i=e.accordionContext,s=e.dangerouslySetExpanded,a=function(){i.toggleExpanded(r)},o=function(y){var x=s??y.isItemExpanded(r),B=y.isItemDisabled(r),O=y.getPanelAttributes(r,s),T=y.getHeadingAttributes(r),F=y.getButtonAttributes(r,s);return ui.createElement(cW.Provider,{value:{uuid:r,expanded:x,disabled:B,toggleExpanded:a,panelAttributes:O,headingAttributes:T,buttonAttributes:F}},t)};return ui.createElement(uW,nu
Line truncated
|
||||
|
||||
From the WAI-ARIA spec (https://www.w3.org/TR/wai-aria-practices-1.1/#accordion):
|
||||
|
||||
“The button element is the only element inside the heading element. That is, if there are other visually persistent elements, they are not included inside the heading element.”
|
||||
|
||||
`,fW=function(n){QO(t,n);var e=qO(t);function t(){var r;w3(this,t);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return r=e.call.apply(e,[this].concat(s)),Rl(_p(r),"ref",void 0),Rl(_p(r),"setRef",function(o){r.ref=o}),r}return M3(t,[{key:"componentDidUpdate",value:function(){t.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){t.VALIDATE(this.ref)}},{key:"render",value:function(){return ui.createElement("div",fm({"data-accordion-component":"AccordionItemHeading"},this.props,{ref:this.setRef}))}}],[{key:"VALIDATE",value:function(i){if(i===void 0)throw new Error("ref is undefined");if(!(i.childElementCount===1&&i.firstElementChild&&i.firstElementChild.getAttribute("data-accordion-component")==="AccordionItemButton"))throw new Error(_ue)}}]),t}(ui.PureComponent);Rl(fW,"defaultProps",Cue);var pW=function(e){return ui.createElement(E3,null,function(t){var r=t.headingAttributes;return e.id&&e_(e.id),ui.createElement(fW,fm({},e,r))})};pW.displayName=AW.AccordionItemHeading;var bue=["className","region","id"],xue=function(e){var t=e.className,r=t===void 0?"accordion__panel":t,i=e.region,s=e.id,a=S3(e,bue),o=function(y){var x=y.panelAttributes;s&&e_(s);var B=FB(FB({},x),{},{"aria-labelledby":i?x["aria-labelledby"]:void 0});return ui.createElement("div",fm({"data-accordion-component":"AccordionItemPanel",className:r},a,B,{role:i?"region":void 0}))};return ui.createElement(E3,null,o)},A2={exports:{}},wue=A2.exports,MT;function O3(){return MT||(MT=1,function(n,e){(function(t,r){n.exports=r()})(wue,function(){var t=navigator.userAgent,r=navigator.platform,i=/gecko\/\d/i.test(t),s=/MSIE \d/.test(t),a=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),f=s||a||o,y=f&&(s?document.documentMode||6:+(o||a)[1]),x=!o&&/WebKit\//.test(t),B=x&&/Qt\/\d+\.\d+/.test(t),O=!o&&/Chrome\/(\d+)/.exec(t),T=O&&+O[1],F=/Opera\//.test(t),j=/Apple Computer/.test(navigator.vendor),N=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),q=/PhantomJS/.test(t),H=j&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),oe=/Android/.test(t),ne=H||oe||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),$=H||/Mac/.test(r),te=/\bCrOS\b/.test(t),G=/win/i.test(r),ie=F&&t.match(/Version\/(\d*\.\d*)/);ie&&(ie=Number(ie[1])),ie&&ie>=15&&(F=!1,x=!0);var he=$&&(B||F&&(ie==null||ie<12.11)),pe=i||f&&y>=9;function Ee(A){return new RegExp("(^|\\s)"+A+"(?:$|\\s)\\s*")}var me=function(A,g){var E=A.className,S=Ee(g).exec(E);if(S){var D=E.slice(S.index+S[0].length);A.className=E.slice(0,S.index)+(D?S[1]+D:"")}};function Se(A){for(var g=A.childNodes.length;g>0;--g)A.removeChild(A.firstChild);return A}function De(A,g){return Se(A).appendChild(g)}function be(A,g,E,S){var D=document.createElement(A);if(E&&(D.className=E),S&&(D.style.cssText=S),typeof g=="string")D.appendChild(document.createTextNode(g));else if(g)for(var Z=0;Z<g.length;++Z)D.appendChild(g[Z]);return D}function at(A,g,E,S){var D=be(A,g,E,S);return D.setAttribute("role","presentation"),D}var Ze;document.createRange?Ze=function(A,g,E,S){var D=document.createRange();return D.setEnd(S||A,E),D.setStart(A,g),D}:Ze=function(A,g,E){var S=document.body.createTextRange();try{S.moveToElementText(A.parentNode)}catch{return S}return S.collapse(!0),S.moveEnd("character",E),S.moveStart("character",g),S};function Je(A,g){if(g.nodeType==3&&(g=g.parentNode),A.contains)return A.contains(g);do if(g.nodeType==11&&(g=g.host),g==A)return!0;while(g=g.parentNode)}function We(A){var g=A.ownerDocument||A,E;try{E=A.activeElement}catch{E=g.body||null}for(;E&&E.shadowRoot&&E.shadowRoot.activeElement;)E=E.shadowRoot.activeElement;return E}function Me(A,g){var E=A.className;Ee(g).test(E)||(A.className+=(E?" ":"")+g)}function Fe(A,g){for(var E=A.split(" "),S=0;S<E.length;S++)E[S]&&!Ee(E[S]).test(g)&&(g+=" "+E[S]);return g}var He=function(A){A.select()};H?He=function(A){A.selectionStart=0,A.selectionEnd=A.value.length}:f&&(He=function(A){try{A.select()}catch{}});function bt(A){return A.display.wrapper.ownerDocument}function Yt(A){return gt(A.display.wrapper)}function gt(A){return A.getRootNode?A.getRootNode():A.ownerDocument}function Lt(A){return bt(A).defaultView}function Kt(A){var g=Array.prototype.slice.call(arguments,1);return function(){return A.apply(null,g)}}function Ue(A,g,E){g||(g={});for(var S in A)A.hasOwnProperty(S)&&(E!==!1||!g.hasOwnProperty(S))&&(g[S]=A[S]);return g}function Pe(A,g,E,S,D){g==null&&(g=A.search(/[^\s\u00a0]/),g==-1&&(g=A.length));for(var Z=S||0,Ae=D||0;;){var Ce=A.indexOf(" ",Z);if(Ce<0||Ce>=g)return Ae+(g-Z);Ae+=Ce-Z,Ae+=E-Ae%E,Z=Ce+1}}var Be=function(){this.id=null,this.f=null,this.time=0,this.handler=Kt(this.onTimeout,this)};Be.prototype.onTimeout=function(A){A.id=0,A.time<=+new Date?A.f():setTimeout(A.handler,A.time-+new Date)},Be.prototype.set=function(A,g){this.f=g;var E=+new Date+A;(!this.id||E<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,A),this.time=E)};function it(A,g){for(var E=0;E<A.length;++E)if(A[E]==g)return E;return-1}var
Line truncated
|
||||
|
||||
b`.split(/\n/).length!=3?function(A){for(var g=0,E=[],S=A.length;g<=S;){var D=A.indexOf(`
|
||||
`,g);D==-1&&(D=A.length);var Z=A.slice(g,A.charAt(D-1)=="\r"?D-1:D),Ae=Z.indexOf("\r");Ae!=-1?(E.push(Z.slice(0,Ae)),g+=Ae+1):(E.push(Z),g=D+1)}return E}:function(A){return A.split(/\r\n?|\n/)},go=window.getSelection?function(A){try{return A.selectionStart!=A.selectionEnd}catch{return!1}}:function(A){var g;try{g=A.ownerDocument.selection.createRange()}catch{}return!g||g.parentElement()!=A?!1:g.compareEndPoints("StartToEnd",g)!=0},Sa=function(){var A=be("div");return"oncopy"in A?!0:(A.setAttribute("oncopy","return;"),typeof A.oncopy=="function")}(),Yi=null;function Ci(A){if(Yi!=null)return Yi;var g=De(A,be("span","x")),E=g.getBoundingClientRect(),S=Ze(g,0,1).getBoundingClientRect();return Yi=Math.abs(E.left-S.left)>1}var oo={},Ro={};function Pi(A,g){arguments.length>2&&(g.dependencies=Array.prototype.slice.call(arguments,2)),oo[A]=g}function Na(A,g){Ro[A]=g}function Ea(A){if(typeof A=="string"&&Ro.hasOwnProperty(A))A=Ro[A];else if(A&&typeof A.name=="string"&&Ro.hasOwnProperty(A.name)){var g=Ro[A.name];typeof g=="string"&&(g={name:g}),A=dr(g,A),A.name=g.name}else{if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(A))return Ea("application/xml");if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(A))return Ea("application/json")}return typeof A=="string"?{name:A}:A||{name:"null"}}function rs(A,g){g=Ea(g);var E=oo[g.name];if(!E)return rs(A,"text/plain");var S=E(A,g);if(aa.hasOwnProperty(g.name)){var D=aa[g.name];for(var Z in D)D.hasOwnProperty(Z)&&(S.hasOwnProperty(Z)&&(S["_"+Z]=S[Z]),S[Z]=D[Z])}if(S.name=g.name,g.helperType&&(S.helperType=g.helperType),g.modeProps)for(var Ae in g.modeProps)S[Ae]=g.modeProps[Ae];return S}var aa={};function cl(A,g){var E=aa.hasOwnProperty(A)?aa[A]:aa[A]={};Ue(g,E)}function Ao(A,g){if(g===!0)return g;if(A.copyState)return A.copyState(g);var E={};for(var S in g){var D=g[S];D instanceof Array&&(D=D.concat([])),E[S]=D}return E}function Uu(A,g){for(var E;A.innerMode&&(E=A.innerMode(g),!(!E||E.mode==A));)g=E.state,A=E.mode;return E||{mode:A,state:g}}function Zl(A,g,E){return A.startState?A.startState(g,E):!0}var so=function(A,g,E){this.pos=this.start=0,this.string=A,this.tabSize=g||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=E};so.prototype.eol=function(){return this.pos>=this.string.length},so.prototype.sol=function(){return this.pos==this.lineStart},so.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},so.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},so.prototype.eat=function(A){var g=this.string.charAt(this.pos),E;if(typeof A=="string"?E=g==A:E=g&&(A.test?A.test(g):A(g)),E)return++this.pos,g},so.prototype.eatWhile=function(A){for(var g=this.pos;this.eat(A););return this.pos>g},so.prototype.eatSpace=function(){for(var A=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>A},so.prototype.skipToEnd=function(){this.pos=this.string.length},so.prototype.skipTo=function(A){var g=this.string.indexOf(A,this.pos);if(g>-1)return this.pos=g,!0},so.prototype.backUp=function(A){this.pos-=A},so.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},so.prototype.indentation=function(){return Pe(this.string,null,this.tabSize)-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},so.prototype.match=function(A,g,E){if(typeof A=="string"){var S=function(Ae){return E?Ae.toLowerCase():Ae},D=this.string.substr(this.pos,A.length);if(S(D)==S(A))return g!==!1&&(this.pos+=A.length),!0}else{var Z=this.string.slice(this.pos).match(A);return Z&&Z.index>0?null:(Z&&g!==!1&&(this.pos+=Z[0].length),Z)}},so.prototype.current=function(){return this.string.slice(this.start,this.pos)},so.prototype.hideFirstChars=function(A,g){this.lineStart+=A;try{return g()}finally{this.lineStart-=A}},so.prototype.lookAhead=function(A){var g=this.lineOracle;return g&&g.lookAhead(A)},so.prototype.baseToken=function(){var A=this.lineOracle;return A&&A.baseToken(this.pos)};function Tr(A,g){if(g-=A.first,g<0||g>=A.size)throw new Error("There is no line "+(g+A.first)+" in the document.");for(var E=A;!E.lines;)for(var S=0;;++S){var D=E.children[S],Z=D.chunkSize();if(g<Z){E=D;break}g-=Z}return E.lines[g]}function tl(A,g,E){var S=[],D=g.line;return A.iter(g.line,E.line+1,function(Z){var Ae=Z.text;D==E.line&&(Ae=Ae.slice(0,E.ch)),D==g.line&&(Ae=Ae.slice(g.ch)),S.push(Ae),++D}),S}function Os(A,g,E){var S=[];return A.iter(g,E,function(D){S.push(D.text)}),S}function ea(A,g){var E=g-A.height;if(E)for(var S=A;S;S=S.parent)S.height+=E}function qe(A){if(A.parent==null)return null;for(var g=A.parent,E=it(g.lines,A),S=g.parent;S;g=S,S=S.parent)for(var D=0;S.children[D]!=g;++D)E+=S.children[D].chunkSize();return E+g.first}function wt(A,g){var E=A.first;e:do{for(var S=0;S<A.child
Line truncated
|
||||
`?(Ln=yt.appendChild(be("span",en[0]=="\r"?"␍":"","cm-invalidchar")),Ln.setAttribute("cm-text",en[0]),A.col+=1):(Ln=A.cm.options.specialCharPlaceholder(en[0]),Ln.setAttribute("cm-text",en[0]),f&&y<9?yt.appendChild(be("span",[Ln])):yt.appendChild(Ln),A.col+=1);A.map.push(A.pos,A.pos+1,Ln),A.pos++}}if(A.trailingSpace=Ce.charCodeAt(g.length-1)==32,E||S||D||je||Z||Ae){var wr=E||"";S&&(wr+=S),D&&(wr+=D);var yr=be("span",[yt],wr,Z);if(Ae)for(var Or in Ae)Ae.hasOwnProperty(Or)&&Or!="style"&&Or!="class"&&yr.setAttribute(Or,Ae[Or]);return A.content.appendChild(yr)}A.content.appendChild(yt)}}function Cu(A,g){if(A.length>1&&!/ /.test(A))return A;for(var E=g,S="",D=0;D<A.length;D++){var Z=A.charAt(D);Z==" "&&E&&(D==A.length-1||A.charCodeAt(D+1)==32)&&(Z=" "),S+=Z,E=Z==" "}return S}function Ls(A,g){return function(E,S,D,Z,Ae,Ce,Te){D=D?D+" cm-force-border":"cm-force-border";for(var je=E.pos,yt=je+S.length;;){for(var Mt=void 0,en=0;en<g.length&&(Mt=g[en],!(Mt.to>je&&Mt.from<=je));en++);if(Mt.to>=yt)return A(E,S,D,Z,Ae,Ce,Te);A(E,S.slice(0,Mt.to-je),D,Z,null,Ce,Te),Z=null,S=S.slice(Mt.to-je),je=Mt.to}}}function kA(A,g,E,S){var D=!S&&E.widgetNode;D&&A.map.push(A.pos,A.pos+g,D),!S&&A.cm.display.input.needsContentAttribute&&(D||(D=A.content.appendChild(document.createElement("span"))),D.setAttribute("cm-marker",E.id)),D&&(A.cm.display.input.setUneditable(D),A.content.appendChild(D)),A.pos+=g,A.trailingSpace=!1}function gd(A,g,E){var S=A.markedSpans,D=A.text,Z=0;if(!S){for(var Ae=1;Ae<E.length;Ae+=2)g.addToken(g,D.slice(Z,Z=E[Ae]),xl(E[Ae+1],g.cm.options));return}for(var Ce=D.length,Te=0,je=1,yt="",Mt,en,Qt=0,wn,Ln,sr,Vn,wr;;){if(Qt==Te){wn=Ln=sr=en="",wr=null,Vn=null,Qt=1/0;for(var yr=[],Or=void 0,ni=0;ni<S.length;++ni){var zr=S[ni],Zi=zr.marker;if(Zi.type=="bookmark"&&zr.from==Te&&Zi.widgetNode)yr.push(Zi);else if(zr.from<=Te&&(zr.to==null||zr.to>Te||Zi.collapsed&&zr.to==Te&&zr.from==Te)){if(zr.to!=null&&zr.to!=Te&&Qt>zr.to&&(Qt=zr.to,Ln=""),Zi.className&&(wn+=" "+Zi.className),Zi.css&&(en=(en?en+";":"")+Zi.css),Zi.startStyle&&zr.from==Te&&(sr+=" "+Zi.startStyle),Zi.endStyle&&zr.to==Qt&&(Or||(Or=[])).push(Zi.endStyle,zr.to),Zi.title&&((wr||(wr={})).title=Zi.title),Zi.attributes)for(var jo in Zi.attributes)(wr||(wr={}))[jo]=Zi.attributes[jo];Zi.collapsed&&(!Vn||st(Vn.marker,Zi)<0)&&(Vn=zr)}else zr.from>Te&&Qt>zr.from&&(Qt=zr.from)}if(Or)for(var $a=0;$a<Or.length;$a+=2)Or[$a+1]==Qt&&(Ln+=" "+Or[$a]);if(!Vn||Vn.from==Te)for(var oa=0;oa<yr.length;++oa)kA(g,0,yr[oa]);if(Vn&&(Vn.from||0)==Te){if(kA(g,(Vn.to==null?Ce+1:Vn.to)-Te,Vn.marker,Vn.from==null),Vn.to==null)return;Vn.to==Te&&(Vn=!1)}}if(Te>=Ce)break;for(var _a=Math.min(Ce,Qt);;){if(yt){var Va=Te+yt.length;if(!Vn){var ba=Va>_a?yt.slice(0,_a-Te):yt;g.addToken(g,ba,Mt?Mt+wn:wn,sr,Te+ba.length==Qt?Ln:"",en,wr)}if(Va>=_a){yt=yt.slice(_a-Te),Te=_a;break}Te=Va,sr=""}yt=D.slice(Z,Z=E[je++]),Mt=xl(E[je++],g.cm.options)}}}function Hd(A,g,E){this.line=g,this.rest=ji(g),this.size=this.rest?qe(rr(this.rest))-E+1:1,this.node=this.text=null,this.hidden=Wr(A,g)}function Bc(A,g,E){for(var S=[],D,Z=g;Z<E;Z=D){var Ae=new Hd(A.doc,Tr(A.doc,Z),Z);D=Z+Ae.size,S.push(Ae)}return S}var Oc=null;function ep(A){Oc?Oc.ops.push(A):A.ownsGroup=Oc={ops:[A],delayedCallbacks:[]}}function yd(A){var g=A.delayedCallbacks,E=0;do{for(;E<g.length;E++)g[E].call(null);for(var S=0;S<A.ops.length;S++){var D=A.ops[S];if(D.cursorActivityHandlers)for(;D.cursorActivityCalled<D.cursorActivityHandlers.length;)D.cursorActivityHandlers[D.cursorActivityCalled++].call(null,D.cm)}}while(E<g.length)}function Kp(A,g){var E=A.ownsGroup;if(E)try{yd(E)}finally{Oc=null,g(E)}}var ic=null;function na(A,g){var E=Ye(A,g);if(E.length){var S=Array.prototype.slice.call(arguments,2),D;Oc?D=Oc.delayedCallbacks:ic?D=ic:(D=ic=[],setTimeout(cf,0));for(var Z=function(Ce){D.push(function(){return E[Ce].apply(null,S)})},Ae=0;Ae<E.length;++Ae)Z(Ae)}}function cf(){var A=ic;ic=null;for(var g=0;g<A.length;++g)A[g]()}function xh(A,g,E,S){for(var D=0;D<g.changes.length;D++){var Z=g.changes[D];Z=="text"?hf(A,g):Z=="gutter"?wh(A,g,E,S):Z=="class"?oc(A,g):Z=="widget"&&ff(A,g,S)}g.changes=null}function vd(A){return A.node==A.text&&(A.node=be("div",null,null,"position: relative"),A.text.parentNode&&A.text.parentNode.replaceChild(A.node,A.text),A.node.appendChild(A.text),f&&y<8&&(A.node.style.zIndex=2)),A.node}function df(A,g){var E=g.bgClass?g.bgClass+" "+(g.line.bgClass||""):g.line.bgClass;if(E&&(E+=" CodeMirror-linebackground"),g.background)E?g.background.className=E:(g.background.parentNode.removeChild(g.background),g.background=null);else if(E){var S=vd(g);g.background=S.insertBefore(be("div",null,E),S.firstChild),A.display.input.setUneditable(g.background)}}function Cd(A,g){var E=A.display.externalMeasured;return E&&E.line==g.line?(A.display.externalMeasured=null,g.measure=E.measure,E.built):Vc(A,g)}function hf(A,g){var E=g.text.className,S=Cd(A,g);g.text==g.node&&(g.node=S.pre),g.text.parentNode.replaceChild(S.pre,g.text),g.text=S.pre,S.bgClass
Line truncated
|
||||
top: `+Or+"px; width: "+(ni??Te-yr)+`px;
|
||||
height: `+(zr-Or)+"px"))}function Mt(yr,Or,ni){var zr=Tr(D,yr),Zi=zr.text.length,jo,$a;function oa(ba,hu){return En(A,hn(yr,ba),"div",zr,hu)}function _a(ba,hu,Ra){var Fa=is(A,zr,null,ba),ls=hu=="ltr"==(Ra=="after")?"left":"right",vi=Ra=="after"?Fa.begin:Fa.end-(/\s/.test(zr.text.charAt(Fa.end-1))?2:1);return oa(vi,ls)[ls]}var Va=ve(zr,D.direction);return sn(Va,Or||0,ni??Zi,function(ba,hu,Ra,Fa){var ls=Ra=="ltr",vi=oa(ba,ls?"left":"right"),ms=oa(hu-1,ls?"right":"left"),Ns=Or==null&&ba==0,da=ni==null&&hu==Zi,Bs=Fa==0,ku=!Va||Fa==Va.length-1;if(ms.top-vi.top<=3){var _o=(je?Ns:da)&&Bs,zh=(je?da:Ns)&&ku,Gl=_o?Ce:(ls?vi:ms).left,eA=zh?Te:(ls?ms:vi).right;yt(Gl,vi.top,eA-Gl,vi.bottom)}else{var Cc,yl,Il,Bf;ls?(Cc=je&&Ns&&Bs?Ce:vi.left,yl=je?Te:_a(ba,Ra,"before"),Il=je?Ce:_a(hu,Ra,"after"),Bf=je&&da&&ku?Te:ms.right):(Cc=je?_a(ba,Ra,"before"):Ce,yl=!je&&Ns&&Bs?Te:vi.right,Il=!je&&da&&ku?Ce:ms.left,Bf=je?_a(hu,Ra,"after"):Te),yt(Cc,vi.top,yl-Cc,vi.bottom),vi.bottom<ms.top&&yt(Ce,vi.bottom,null,ms.top),yt(Il,ms.top,Bf-Il,ms.bottom)}(!jo||ac(vi,jo)<0)&&(jo=vi),ac(ms,jo)<0&&(jo=ms),(!$a||ac(vi,$a)<0)&&($a=vi),ac(ms,$a)<0&&($a=ms)}),{start:jo,end:$a}}var en=g.from(),Qt=g.to();if(en.line==Qt.line)Mt(en.line,en.ch,Qt.ch);else{var wn=Tr(D,en.line),Ln=Tr(D,Qt.line),sr=Br(wn)==Br(Ln),Vn=Mt(en.line,en.ch,sr?wn.text.length+1:null).end,wr=Mt(Qt.line,sr?0:null,Qt.ch).start;sr&&(Vn.top<wr.top-2?(yt(Vn.right,Vn.top,null,Vn.bottom),yt(Ce,wr.top,wr.left,wr.bottom)):yt(Vn.right,Vn.top,wr.left-Vn.right,Vn.bottom)),Vn.bottom<wr.top&&yt(Ce,Vn.bottom,null,wr.top)}E.appendChild(Z)}function qu(A){if(A.state.focused){var g=A.display;clearInterval(g.blinker);var E=!0;g.cursorDiv.style.visibility="",A.options.cursorBlinkRate>0?g.blinker=setInterval(function(){A.hasFocus()||hs(A),g.cursorDiv.style.visibility=(E=!E)?"":"hidden"},A.options.cursorBlinkRate):A.options.cursorBlinkRate<0&&(g.cursorDiv.style.visibility="hidden")}}function ed(A){A.hasFocus()||(A.display.input.focus(),A.state.focused||Dh(A))}function lc(A){A.state.delayingBlurEvent=!0,setTimeout(function(){A.state.delayingBlurEvent&&(A.state.delayingBlurEvent=!1,A.state.focused&&hs(A))},100)}function Dh(A,g){A.state.delayingBlurEvent&&!A.state.draggingText&&(A.state.delayingBlurEvent=!1),A.options.readOnly!="nocursor"&&(A.state.focused||(ct(A,"focus",A,g),A.state.focused=!0,Me(A.display.wrapper,"CodeMirror-focused"),!A.curOp&&A.display.selForContextMenu!=A.doc.sel&&(A.display.input.reset(),x&&setTimeout(function(){return A.display.input.reset(!0)},20)),A.display.input.receivedFocus()),qu(A))}function hs(A,g){A.state.delayingBlurEvent||(A.state.focused&&(ct(A,"blur",A,g),A.state.focused=!1,me(A.display.wrapper,"CodeMirror-focused")),clearInterval(A.display.blinker),setTimeout(function(){A.state.focused||(A.display.shift=!1)},150))}function kc(A){for(var g=A.display,E=g.lineDiv.offsetTop,S=Math.max(0,g.scroller.getBoundingClientRect().top),D=g.lineDiv.getBoundingClientRect().top,Z=0,Ae=0;Ae<g.view.length;Ae++){var Ce=g.view[Ae],Te=A.options.lineWrapping,je=void 0,yt=0;if(!Ce.hidden){if(D+=Ce.line.height,f&&y<8){var Mt=Ce.node.offsetTop+Ce.node.offsetHeight;je=Mt-E,E=Mt}else{var en=Ce.node.getBoundingClientRect();je=en.bottom-en.top,!Te&&Ce.text.firstChild&&(yt=Ce.text.firstChild.getBoundingClientRect().right-en.left-1)}var Qt=Ce.line.height-je;if((Qt>.005||Qt<-.005)&&(D<S&&(Z-=Qt),ea(Ce.line,je),PA(Ce.line),Ce.rest))for(var wn=0;wn<Ce.rest.length;wn++)PA(Ce.rest[wn]);if(yt>A.display.sizerWidth){var Ln=Math.ceil(yt/Qu(A.display));Ln>A.display.maxLineLength&&(A.display.maxLineLength=Ln,A.display.maxLine=Ce.line,A.display.maxLineChanged=!0)}}}Math.abs(Z)>2&&(g.scroller.scrollTop+=Z)}function PA(A){if(A.widgets)for(var g=0;g<A.widgets.length;++g){var E=A.widgets[g],S=E.node.parentNode;S&&(E.height=S.offsetHeight)}}function Yu(A,g,E){var S=E&&E.top!=null?Math.max(0,E.top):A.scroller.scrollTop;S=Math.floor(S-Hc(A));var D=E&&E.bottom!=null?E.bottom:S+A.wrapper.clientHeight,Z=wt(g,S),Ae=wt(g,D);if(E&&E.ensure){var Ce=E.ensure.from.line,Te=E.ensure.to.line;Ce<Z?(Z=Ce,Ae=wt(g,Ri(Tr(g,Ce))+A.wrapper.clientHeight)):Math.min(Te,g.lastLine())>=Ae&&(Z=wt(g,Ri(Tr(g,Te))-A.wrapper.clientHeight),Ae=Te)}return{from:Z,to:Math.max(Ae,Z+1)}}function Jd(A,g){if(!dt(A,"scrollCursorIntoView")){var E=A.display,S=E.sizer.getBoundingClientRect(),D=null,Z=E.wrapper.ownerDocument;if(g.top+S.top<0?D=!0:g.bottom+S.top>(Z.defaultView.innerHeight||Z.documentElement.clientHeight)&&(D=!1),D!=null&&!q){var Ae=be("div","",null,`position: absolute;
|
||||
top: `+(g.top-E.viewOffset-Hc(A.display))+`px;
|
||||
height: `+(g.bottom-g.top+Wu(A)+E.barHeight)+`px;
|
||||
left: `+g.left+"px; width: "+Math.max(2,g.right-g.left)+"px;");A.display.lineSpace.appendChild(Ae),Ae.scrollIntoView(D),A.display.lineSpace.removeChild(Ae)}}}function Ed(A,g,E,S){S==null&&(S=0);var D;!A.options.lineWrapping&&g==E&&(E=g.sticky=="before"?hn(g.line,g.ch+1,"before"):g,g=g.ch?hn(g.line,g.sticky=="before"?g.ch-1:g.ch,"after"):g);for(var Z=0;Z<5;Z++){var Ae=!1,Ce=ln(A,g),Te=!E||E==g?Ce:ln(A,E);D={left:Math.min(Ce.left,Te.left),top:Math.min(Ce.top,Te.top)-S,right:Math.max(Ce.left,Te.left),bottom:Math.max(Ce.bottom,Te.bottom)+S};var je=td(A,D),yt=A.doc.scrollTop,Mt=A.doc.scrollLeft;if(je.scrollTop!=null&&(Tc(A,je.scrollTop),Math.abs(A.doc.scrollTop-yt)>1&&(Ae=!0)),je.scrollLeft!=null&&(dl(A,je.scrollLeft),Math.abs(A.doc.scrollLeft-Mt)>1&&(Ae=!0)),!Ae)break}return D}function uc(A,g){var E=td(A,g);E.scrollTop!=null&&Tc(A,E.scrollTop),E.scrollLeft!=null&&dl(A,E.scrollLeft)}function td(A,g){var E=A.display,S=zl(A.display);g.top<0&&(g.top=0);var D=A.curOp&&A.curOp.scrollTop!=null?A.curOp.scrollTop:E.scroller.scrollTop,Z=Ul(A),Ae={};g.bottom-g.top>Z&&(g.bottom=g.top+Z);var Ce=A.doc.height+Bh(E),Te=g.top<S,je=g.bottom>Ce-S;if(g.top<D)Ae.scrollTop=Te?0:g.top;else if(g.bottom>D+Z){var yt=Math.min(g.top,(je?Ce:g.bottom)-Z);yt!=D&&(Ae.scrollTop=yt)}var Mt=A.options.fixedGutter?0:E.gutters.offsetWidth,en=A.curOp&&A.curOp.scrollLeft!=null?A.curOp.scrollLeft:E.scroller.scrollLeft-Mt,Qt=cA(A)-E.gutters.offsetWidth,wn=g.right-g.left>Qt;return wn&&(g.right=g.left+Qt),g.left<10?Ae.scrollLeft=0:g.left<en?Ae.scrollLeft=Math.max(0,g.left+Mt-(wn?0:10)):g.right>Qt+en-3&&(Ae.scrollLeft=g.right+(wn?0:10)-Qt),Ae}function KA(A,g){g!=null&&(Bd(A),A.curOp.scrollTop=(A.curOp.scrollTop==null?A.doc.scrollTop:A.curOp.scrollTop)+g)}function Oi(A){Bd(A);var g=A.getCursor();A.curOp.scrollToPos={from:g,to:g,margin:A.options.cursorScrollMargin}}function Us(A,g,E){(g!=null||E!=null)&&Bd(A),g!=null&&(A.curOp.scrollLeft=g),E!=null&&(A.curOp.scrollTop=E)}function fA(A,g){Bd(A),A.curOp.scrollToPos=g}function Bd(A){var g=A.curOp.scrollToPos;if(g){A.curOp.scrollToPos=null;var E=Fr(A,g.from),S=Fr(A,g.to);nd(A,E,S,g.margin)}}function nd(A,g,E,S){var D=td(A,{left:Math.min(g.left,E.left),top:Math.min(g.top,E.top)-S,right:Math.max(g.right,E.right),bottom:Math.max(g.bottom,E.bottom)+S});Us(A,D.scrollLeft,D.scrollTop)}function Tc(A,g){Math.abs(A.doc.scrollTop-g)<2||(i||hr(A,{top:g}),DA(A,g,!0),i&&hr(A),mA(A,100))}function DA(A,g,E){g=Math.max(0,Math.min(A.display.scroller.scrollHeight-A.display.scroller.clientHeight,g)),!(A.display.scroller.scrollTop==g&&!E)&&(A.doc.scrollTop=g,A.display.scrollbars.setScrollTop(g),A.display.scroller.scrollTop!=g&&(A.display.scroller.scrollTop=g))}function dl(A,g,E,S){g=Math.max(0,Math.min(g,A.display.scroller.scrollWidth-A.display.scroller.clientWidth)),!((E?g==A.doc.scrollLeft:Math.abs(A.doc.scrollLeft-g)<2)&&!S)&&(A.doc.scrollLeft=g,Td(A),A.display.scroller.scrollLeft!=g&&(A.display.scroller.scrollLeft=g),A.display.scrollbars.setScrollLeft(g))}function pA(A){var g=A.display,E=g.gutters.offsetWidth,S=Math.round(A.doc.height+Bh(A.display));return{clientHeight:g.scroller.clientHeight,viewHeight:g.wrapper.clientHeight,scrollWidth:g.scroller.scrollWidth,clientWidth:g.scroller.clientWidth,viewWidth:g.wrapper.clientWidth,barLeft:A.options.fixedGutter?E:0,docHeight:S,scrollHeight:S+Wu(A)+g.barHeight,nativeBarWidth:g.nativeBarWidth,gutterWidth:E}}var hl=function(A,g,E){this.cm=E;var S=this.vert=be("div",[be("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),D=this.horiz=be("div",[be("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");S.tabIndex=D.tabIndex=-1,A(S),A(D),Ne(S,"scroll",function(){S.clientHeight&&g(S.scrollTop,"vertical")}),Ne(D,"scroll",function(){D.clientWidth&&g(D.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,f&&y<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};hl.prototype.update=function(A){var g=A.scrollWidth>A.clientWidth+1,E=A.scrollHeight>A.clientHeight+1,S=A.nativeBarWidth;if(E){this.vert.style.display="block",this.vert.style.bottom=g?S+"px":"0";var D=A.viewHeight-(g?S:0);this.vert.firstChild.style.height=Math.max(0,A.scrollHeight-A.clientHeight+D)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(g){this.horiz.style.display="block",this.horiz.style.right=E?S+"px":"0",this.horiz.style.left=A.barLeft+"px";var Z=A.viewWidth-A.barLeft-(E?S:0);this.horiz.firstChild.style.width=Math.max(0,A.scrollWidth-A.clientWidth+Z)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&A.clientHeight>0&&(S==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:E?S:0,bottom:g?S:0}},hl.prototype.setScrollLeft=function(A){this.horiz.scrollLeft!=A&&(this.horiz.scrollLeft=A),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},hl.prototype.setScrollTop=function(A){this.vert.scrollTop!=A&&(this.vert.scrollTop=A),thi
Line truncated
|
||||
`},setDirection:os(function(A){A!="rtl"&&(A="ltr"),A!=this.direction&&(this.direction=A,this.iter(function(g){return g.order=null}),this.cm&&Hr(this.cm))})}),Zt.prototype.eachLine=Zt.prototype.iter;var Mn=0;function Bn(A){var g=this;if(Nn(g),!(dt(g,A)||AA(g.display,A))){xt(A),f&&(Mn=+new Date);var E=tu(g,A,!0),S=A.dataTransfer.files;if(!(!E||g.isReadOnly()))if(S&&S.length&&window.FileReader&&window.File)for(var D=S.length,Z=Array(D),Ae=0,Ce=function(){++Ae==D&&mi(g,function(){E=ei(g.doc,E);var Qt={from:E,to:E,text:g.doc.splitLines(Z.filter(function(wn){return wn!=null}).join(g.doc.lineSeparator())),origin:"paste"};I(g.doc,Qt),Bu(g.doc,Qa(ei(g.doc,E),ei(g.doc,qa(Qt))))})()},Te=function(Qt,wn){if(g.options.allowDropFileTypes&&it(g.options.allowDropFileTypes,Qt.type)==-1){Ce();return}var Ln=new FileReader;Ln.onerror=function(){return Ce()},Ln.onload=function(){var sr=Ln.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(sr)){Ce();return}Z[wn]=sr,Ce()},Ln.readAsText(Qt)},je=0;je<S.length;je++)Te(S[je],je);else{if(g.state.draggingText&&g.doc.sel.contains(E)>-1){g.state.draggingText(A),setTimeout(function(){return g.display.input.focus()},20);return}try{var yt=A.dataTransfer.getData("Text");if(yt){var Mt;if(g.state.draggingText&&!g.state.draggingText.copy&&(Mt=g.listSelections()),$s(g.doc,Qa(E,E)),Mt)for(var en=0;en<Mt.length;++en)z(g.doc,"",Mt[en].anchor,Mt[en].head,"drag");g.replaceSelection(yt,"around","paste"),g.display.input.focus()}}catch{}}}}function yn(A,g){if(f&&(!A.state.draggingText||+new Date-Mn<100)){gr(g);return}if(!(dt(A,g)||AA(A.display,g))&&(g.dataTransfer.setData("Text",A.getSelection()),g.dataTransfer.effectAllowed="copyMove",g.dataTransfer.setDragImage&&!j)){var E=be("img",null,null,"position: fixed; left: 0; top: 0;");E.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",F&&(E.width=E.height=1,A.display.wrapper.appendChild(E),E._top=E.offsetTop),g.dataTransfer.setDragImage(E,0,0),F&&E.parentNode.removeChild(E)}}function In(A,g){var E=tu(A,g);if(E){var S=document.createDocumentFragment();Sd(A,E,S),A.display.dragCursor||(A.display.dragCursor=be("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),A.display.lineSpace.insertBefore(A.display.dragCursor,A.display.cursorDiv)),De(A.display.dragCursor,S)}}function Nn(A){A.display.dragCursor&&(A.display.lineSpace.removeChild(A.display.dragCursor),A.display.dragCursor=null)}function Fn(A){if(document.getElementsByClassName){for(var g=document.getElementsByClassName("CodeMirror"),E=[],S=0;S<g.length;S++){var D=g[S].CodeMirror;D&&E.push(D)}E.length&&E[0].operation(function(){for(var Z=0;Z<E.length;Z++)A(E[Z])})}}var pr=!1;function Ti(){pr||(Gi(),pr=!0)}function Gi(){var A;Ne(window,"resize",function(){A==null&&(A=setTimeout(function(){A=null,Fn(Uo)},100))}),Ne(window,"blur",function(){return Fn(hs)})}function Uo(A){var g=A.display;g.cachedCharWidth=g.cachedTextHeight=g.cachedPaddingH=null,g.scrollbarsClipped=!1,A.setSize()}for(var Si={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ps=0;ps<10;ps++)Si[ps+48]=Si[ps+96]=String(ps);for(var To=65;To<=90;To++)Si[To]=String.fromCharCode(To);for(var Po=1;Po<=12;Po++)Si[Po+111]=Si[Po+63235]="F"+Po;var Co={};Co.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Co.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Co.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-KLine truncated
|
||||
`,"start")},toggleOverwrite:function(A){return A.toggleOverwrite()}};function Ka(A,g){var E=Tr(A.doc,g),S=Br(E);return S!=E&&(g=qe(S)),QA(!0,A,S,g,1)}function Au(A,g){var E=Tr(A.doc,g),S=xr(E);return S!=E&&(g=qe(S)),QA(!0,A,E,g,-1)}function ss(A,g){var E=Ka(A,g.line),S=Tr(A.doc,E.line),D=ve(S,A.doc.direction);if(!D||D[0].level==0){var Z=Math.max(E.ch,S.text.search(/\S/)),Ae=g.line==E.line&&g.ch<=Z&&g.ch;return hn(E.line,Ae?0:Z,E.sticky)}return E}function as(A,g,E){if(typeof g=="string"&&(g=Bl[g],!g))return!1;A.display.input.ensurePolled();var S=A.display.shift,D=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),E&&(A.display.shift=!1),D=g(A)!=ft}finally{A.display.shift=S,A.state.suppressEdits=!1}return D}function Ou(A,g,E){for(var S=0;S<A.state.keyMaps.length;S++){var D=es(g,A.state.keyMaps[S],E,A);if(D)return D}return A.options.extraKeys&&es(g,A.options.extraKeys,E,A)||es(g,A.options.keyMap,E,A)}var Vs=new Be;function nh(A,g,E,S){var D=A.state.keySeq;if(D){if(ol(g))return"handled";if(/\'$/.test(g)?A.state.keySeq=null:Vs.set(50,function(){A.state.keySeq==D&&(A.state.keySeq=null,A.display.input.reset())}),vf(A,D+" "+g,E,S))return!0}return vf(A,g,E,S)}function vf(A,g,E,S){var D=Ou(A,g,S);return D=="multi"&&(A.state.keySeq=g),D=="handled"&&na(A,"keyHandled",A,g,E),(D=="handled"||D=="multi")&&(xt(E),qu(A)),!!D}function rh(A,g){var E=uu(g,!0);return E?g.shiftKey&&!A.state.keySeq?nh(A,"Shift-"+E,g,function(S){return as(A,S,!0)})||nh(A,E,g,function(S){if(typeof S=="string"?/^go[A-Z]/.test(S):S.motion)return as(A,S)}):nh(A,E,g,function(S){return as(A,S)}):!1}function Dp(A,g,E){return nh(A,"'"+E+"'",g,function(S){return as(A,S,!0)})}var gc=null;function yc(A){var g=this;if(!(A.target&&A.target!=g.display.input.getField())&&(g.curOp.focus=We(Yt(g)),!dt(g,A))){f&&y<11&&A.keyCode==27&&(A.returnValue=!1);var E=A.keyCode;g.display.shift=E==16||A.shiftKey;var S=rh(g,A);F&&(gc=S?E:null,!S&&E==88&&!Sa&&($?A.metaKey:A.ctrlKey)&&g.replaceSelection("",null,"cut")),i&&!$&&!S&&E==46&&A.shiftKey&&!A.ctrlKey&&document.execCommand&&document.execCommand("cut"),E==18&&!/\bCodeMirror-crosshair\b/.test(g.display.lineDiv.className)&&Ca(g)}}function Ca(A){var g=A.display.lineDiv;Me(g,"CodeMirror-crosshair");function E(S){(S.keyCode==18||!S.altKey)&&(me(g,"CodeMirror-crosshair"),rt(document,"keyup",E),rt(document,"mouseover",E))}Ne(document,"keyup",E),Ne(document,"mouseover",E)}function Xu(A){A.keyCode==16&&(this.doc.sel.shift=!1),dt(this,A)}function od(A){var g=this;if(!(A.target&&A.target!=g.display.input.getField())&&!(AA(g.display,A)||dt(g,A)||A.ctrlKey&&!A.altKey||$&&A.metaKey)){var E=A.keyCode,S=A.charCode;if(F&&E==gc){gc=null,xt(A);return}if(!(F&&(!A.which||A.which<10)&&rh(g,A))){var D=String.fromCharCode(S??E);D!="\b"&&(Dp(g,A,D)||g.display.input.onKeyPress(A))}}}var tp=400,sd=function(A,g,E){this.time=A,this.pos=g,this.button=E};sd.prototype.compare=function(A,g,E){return this.time+tp>A&&or(g,this.pos)==0&&E==this.button};var bA,ml;function Cf(A,g){var E=+new Date;return ml&&ml.compare(E,A,g)?(bA=ml=null,"triple"):bA&&bA.compare(E,A,g)?(ml=new sd(E,A,g),bA=null,"double"):(bA=new sd(E,A,g),ml=null,"single")}function np(A){var g=this,E=g.display;if(!(dt(g,A)||E.activeTouch&&E.input.supportsTouch())){if(E.input.ensurePolled(),E.shift=A.shiftKey,AA(E,A)){x||(E.scroller.draggable=!1,setTimeout(function(){return E.scroller.draggable=!0},100));return}if(!lh(g,A)){var S=tu(g,A),D=on(A),Z=S?Cf(S,D):"single";Lt(g).focus(),D==1&&g.state.selectingText&&g.state.selectingText(A),!(S&&rp(g,D,S,Z,A))&&(D==1?S?Lh(g,S,Z,A):Er(A)==E.scroller&&xt(A):D==2?(S&&Fc(g.doc,S),setTimeout(function(){return E.input.focus()},20)):D==3&&(pe?g.display.input.onContextMenu(A):lc(g)))}}}function rp(A,g,E,S,D){var Z="Click";return S=="double"?Z="Double"+Z:S=="triple"&&(Z="Triple"+Z),Z=(g==1?"Left":g==2?"Middle":"Right")+Z,nh(A,CA(Z,D),D,function(Ae){if(typeof Ae=="string"&&(Ae=Bl[Ae]),!Ae)return!1;var Ce=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),Ce=Ae(A,E)!=ft}finally{A.state.suppressEdits=!1}return Ce})}function ih(A,g,E){var S=A.getOption("configureMouse"),D=S?S(A,g,E):{};if(D.unit==null){var Z=te?E.shiftKey&&E.metaKey:E.altKey;D.unit=Z?"rectangle":g=="single"?"char":g=="double"?"word":"line"}return(D.extend==null||A.doc.extend)&&(D.extend=A.doc.extend||E.shiftKey),D.addNew==null&&(D.addNew=$?E.metaKey:E.ctrlKey),D.moveOnDrag==null&&(D.moveOnDrag=!($?E.altKey:E.ctrlKey)),D}function Lh(A,g,E,S){f?setTimeout(Kt(ed,A),0):A.curOp.focus=We(Yt(A));var D=ih(A,E,S),Z=A.doc.sel,Ae;A.options.dragDrop&&Rn&&!A.isReadOnly()&&E=="single"&&(Ae=Z.contains(g))>-1&&(or((Ae=Z.ranges[Ae]).from(),g)<0||g.xRel>0)&&(or(Ae.to(),g)>0||g.xRel<0)?oh(A,S,g,D):ah(A,S,g,D)}function oh(A,g,E,S){var D=A.display,Z=!1,Ae=mi(A,function(je){x&&(D.scroller.draggable=!1),A.state.draggingText=!1,A.state.delayingBlurEvent&&(A.hasFocus()?A.state.delayingBlurEvent=!1:lc(A)),rt(D.wrapper.ownerDocument,"mouseup",Ae),rt(D.wrapper.ownerDocument,"mousemove",Ce),rt(D.scroller,"dragstart",Te),rt(D.scro
Line truncated
|
||||
`)==g){if(S.ranges.length%Ju.text.length==0){je=[];for(var yt=0;yt<Ju.text.length;yt++)je.push(Z.splitLines(Ju.text[yt]))}}else Te.length==S.ranges.length&&A.options.pasteLinesPerSelection&&(je=Dn(Te,function(Vn){return[Vn]}));for(var Mt=A.curOp.updateInput,en=S.ranges.length-1;en>=0;en--){var Qt=S.ranges[en],wn=Qt.from(),Ln=Qt.to();Qt.empty()&&(E&&E>0?wn=hn(wn.line,wn.ch-E):A.state.overwrite&&!Ce?Ln=hn(Ln.line,Math.min(Tr(Z,Ln.line).text.length,Ln.ch+rr(Te).length)):Ce&&Ju&&Ju.lineWise&&Ju.text.join(`
|
||||
`)==Te.join(`
|
||||
`)&&(wn=Ln=hn(wn.line,0)));var sr={from:wn,to:Ln,text:je?je[en%je.length]:Te,origin:D||(Ce?"paste":A.state.cutIncoming>Ae?"cut":"+input")};I(A.doc,sr),na(A,"inputRead",A,sr)}g&&!Ce&&Mf(A,g),Oi(A),A.curOp.updateInput<2&&(A.curOp.updateInput=Mt),A.curOp.typing=!0,A.state.pasteIncoming=A.state.cutIncoming=-1}function zc(A,g){var E=A.clipboardData&&A.clipboardData.getData("Text");if(E)return A.preventDefault(),!g.isReadOnly()&&!g.options.disableInput&&g.hasFocus()&&ko(g,function(){return op(g,E,0,null,"paste")}),!0}function Mf(A,g){if(!(!A.options.electricChars||!A.options.smartIndent))for(var E=A.doc.sel,S=E.ranges.length-1;S>=0;S--){var D=E.ranges[S];if(!(D.head.ch>100||S&&E.ranges[S-1].head.line==D.head.line)){var Z=A.getModeAt(D.head),Ae=!1;if(Z.electricChars){for(var Ce=0;Ce<Z.electricChars.length;Ce++)if(g.indexOf(Z.electricChars.charAt(Ce))>-1){Ae=uh(A,D.head.line,"smart");break}}else Z.electricInput&&Z.electricInput.test(Tr(A.doc,D.head.line).text.slice(0,D.head.ch))&&(Ae=uh(A,D.head.line,"smart"));Ae&&na(A,"electricInput",A,D.head.line)}}}function Sf(A){for(var g=[],E=[],S=0;S<A.doc.sel.ranges.length;S++){var D=A.doc.sel.ranges[S].head.line,Z={anchor:hn(D,0),head:hn(D+1,0)};E.push(Z),g.push(A.getRange(Z.anchor,Z.head))}return{text:g,ranges:E}}function Ef(A,g,E,S){A.setAttribute("autocorrect",E?"on":"off"),A.setAttribute("autocapitalize",S?"on":"off"),A.setAttribute("spellcheck",!!g)}function Ld(){var A=be("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),g=be("div",[A],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return x?A.style.width="1000px":A.setAttribute("wrap","off"),H&&(A.style.border="1px solid black"),g}function jc(A){var g=A.optionHandlers,E=A.helpers={};A.prototype={constructor:A,focus:function(){Lt(this).focus(),this.display.input.focus()},setOption:function(S,D){var Z=this.options,Ae=Z[S];Z[S]==D&&S!="mode"||(Z[S]=D,g.hasOwnProperty(S)&&mi(this,g[S])(this,D,Ae),ct(this,"optionChange",this,S))},getOption:function(S){return this.options[S]},getDoc:function(){return this.doc},addKeyMap:function(S,D){this.state.keyMaps[D?"push":"unshift"](Pa(S))},removeKeyMap:function(S){for(var D=this.state.keyMaps,Z=0;Z<D.length;++Z)if(D[Z]==S||D[Z].name==S)return D.splice(Z,1),!0},addOverlay:ii(function(S,D){var Z=S.token?S:A.getMode(this.options,S);if(Z.startState)throw new Error("Overlays may not be stateful.");pn(this.state.overlays,{mode:Z,modeSpec:S,opaque:D&&D.opaque,priority:D&&D.priority||0},function(Ae){return Ae.priority}),this.state.modeGen++,jl(this)}),removeOverlay:ii(function(S){for(var D=this.state.overlays,Z=0;Z<D.length;++Z){var Ae=D[Z].modeSpec;if(Ae==S||typeof S=="string"&&Ae.name==S){D.splice(Z,1),this.state.modeGen++,jl(this);return}}}),indentLine:ii(function(S,D,Z){typeof D!="string"&&typeof D!="number"&&(D==null?D=this.options.smartIndent?"smart":"prev":D=D?"add":"subtract"),vn(this.doc,S)&&uh(this,S,D,Z)}),indentSelection:ii(function(S){for(var D=this.doc.sel.ranges,Z=-1,Ae=0;Ae<D.length;Ae++){var Ce=D[Ae];if(Ce.empty())Ce.head.line>Z&&(uh(this,Ce.head.line,S,!0),Z=Ce.head.line,Ae==this.doc.sel.primIndex&&Oi(this));else{var Te=Ce.from(),je=Ce.to(),yt=Math.max(Z,Te.line);Z=Math.min(this.lastLine(),je.line-(je.ch?0:1))+1;for(var Mt=yt;Mt<Z;++Mt)uh(this,Mt,S);var en=this.doc.sel.ranges;Te.ch==0&&D.length==en.length&&en[Ae].from().ch>0&&Ya(this.doc,Ae,new Fo(Te,en[Ae].to()),Ut)}}}),getTokenAt:function(S,D){return Gs(this,S,D)},getLineTokens:function(S,D){return Gs(this,hn(S),D,!0)},getTokenTypeAt:function(S){S=ei(this.doc,S);var D=Ba(this,Tr(this.doc,S.line)),Z=0,Ae=(D.length-1)/2,Ce=S.ch,Te;if(Ce==0)Te=D[2];else for(;;){var je=Z+Ae>>1;if((je?D[je*2-1]:0)>=Ce)Ae=je;else if(D[je*2+1]<Ce)Z=je+1;else{Te=D[je*2+2];break}}var yt=Te?Te.indexOf("overlay "):-1;return yt<0?Te:yt==0?null:Te.slice(0,yt-1)},getModeAt:function(S){var D=this.doc.mode;return D.innerMode?A.innerMode(D,this.getTokenAt(S).state).mode:D},getHelper:function(S,D){return this.getHelpers(S,D)[0]},getHelpers:function(S,D){var Z=[];if(!E.hasOwnProperty(D))return Z;var Ae=E[D],Ce=this.getModeAt(S);if(typeof Ce[D]=="string")Ae[Ce[D]]&&Z.push(Ae[Ce[D]]);else if(Ce[D])for(var Te=0;Te<Ce[D].length;Te++){var je=Ae[Ce[D][Te]];je&&Z.push(je)}else Ce.helperType&&Ae[Ce.helperType]?Z.push(Ae[Ce.helperType]):Ae[Ce.name]&&Z.push(Ae[Ce.name]);for(var yt=0;yt<Ae._global.length;yt++){var Mt=Ae._global[yt];Mt.pred(Ce,this)&&it(Z,Mt.val)==-1&&Z.push(Mt.val)}return Z},getStateAfter:function(S,D){var Z=this.doc;return S=OA(Z,S??Z.first+Z.size-1),Rr(this,S+1,D).state},cursorCoords:function(S,D){var Z,Ae=this.doc.sel.primary();return S==null?Z=Ae.head:typeof S=="object"?Z=ei(this.doc,S):Z=S?Ae.from():Ae.to(),ln(this,Z,D||"page")},charCoords:function(S,D){return En(this,ei(this.doc,S),D||"page")},coordsChar:function(S,D){return S=Jt(this,S,D||"page"),fo(this,S.left,S.top)},lineAtHeight:function(S,D){return S=Jt(this,{top:S,left:0},D||"page").top,wt(t
Line truncated
|
||||
`,sr=Qe(Ln,Qt)?"w":en&&Ln==`
|
||||
`?"n":!en||/\s/.test(Ln)?null:"p";if(en&&!wn&&!sr&&(sr="s"),Mt&&Mt!=sr){E<0&&(E=1,yt(),g.sticky="after");break}if(sr&&(Mt=sr),E>0&&!yt(!wn))break}var Vn=Uc(A,g,Z,Ae,!0);return Ki(Z,Vn)&&(Vn.hitSide=!0),Vn}function vc(A,g,E,S){var D=A.doc,Z=g.left,Ae;if(S=="page"){var Ce=Math.min(A.display.wrapper.clientHeight,Lt(A).innerHeight||D(A).documentElement.clientHeight),Te=Math.max(Ce-.5*zl(A.display),3);Ae=(E>0?g.bottom:g.top)+E*Te}else S=="line"&&(Ae=E>0?g.bottom+3:g.top-3);for(var je;je=fo(A,Z,Ae),!!je.outside;){if(E<0?Ae<=0:Ae>=D.height){je.hitSide=!0;break}Ae+=E*5}return je}var zo=function(A){this.cm=A,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};zo.prototype.init=function(A){var g=this,E=this,S=E.cm,D=E.div=A.lineDiv;D.contentEditable=!0,Ef(D,S.options.spellcheck,S.options.autocorrect,S.options.autocapitalize);function Z(Ce){for(var Te=Ce.target;Te;Te=Te.parentNode){if(Te==D)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Te.className))break}return!1}Ne(D,"paste",function(Ce){!Z(Ce)||dt(S,Ce)||zc(Ce,S)||y<=11&&setTimeout(mi(S,function(){return g.updateFromDOM()}),20)}),Ne(D,"compositionstart",function(Ce){g.composing={data:Ce.data,done:!1}}),Ne(D,"compositionupdate",function(Ce){g.composing||(g.composing={data:Ce.data,done:!1})}),Ne(D,"compositionend",function(Ce){g.composing&&(Ce.data!=g.composing.data&&g.readFromDOMSoon(),g.composing.done=!0)}),Ne(D,"touchstart",function(){return E.forceCompositionEnd()}),Ne(D,"input",function(){g.composing||g.readFromDOMSoon()});function Ae(Ce){if(!(!Z(Ce)||dt(S,Ce))){if(S.somethingSelected())wf({lineWise:!1,text:S.getSelections()}),Ce.type=="cut"&&S.replaceSelection("",null,"cut");else if(S.options.lineWiseCopyCut){var Te=Sf(S);wf({lineWise:!0,text:Te.text}),Ce.type=="cut"&&S.operation(function(){S.setSelections(Te.ranges,0,Ut),S.replaceSelection("",null,"cut")})}else return;if(Ce.clipboardData){Ce.clipboardData.clearData();var je=Ju.text.join(`
|
||||
`);if(Ce.clipboardData.setData("Text",je),Ce.clipboardData.getData("Text")==je){Ce.preventDefault();return}}var yt=Ld(),Mt=yt.firstChild;Ef(Mt),S.display.lineSpace.insertBefore(yt,S.display.lineSpace.firstChild),Mt.value=Ju.text.join(`
|
||||
`);var en=We(gt(D));He(Mt),setTimeout(function(){S.display.lineSpace.removeChild(yt),en.focus(),en==D&&E.showPrimarySelection()},50)}}Ne(D,"copy",Ae),Ne(D,"cut",Ae)},zo.prototype.screenReaderLabelChanged=function(A){A?this.div.setAttribute("aria-label",A):this.div.removeAttribute("aria-label")},zo.prototype.prepareSelection=function(){var A=Jc(this.cm,!1);return A.focus=We(gt(this.div))==this.div,A},zo.prototype.showSelection=function(A,g){!A||!this.cm.display.view.length||((A.focus||g)&&this.showPrimarySelection(),this.showMultipleSelections(A))},zo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},zo.prototype.showPrimarySelection=function(){var A=this.getSelection(),g=this.cm,E=g.doc.sel.primary(),S=E.from(),D=E.to();if(g.display.viewTo==g.display.viewFrom||S.line>=g.display.viewTo||D.line<g.display.viewFrom){A.removeAllRanges();return}var Z=gl(g,A.anchorNode,A.anchorOffset),Ae=gl(g,A.focusNode,A.focusOffset);if(!(Z&&!Z.bad&&Ae&&!Ae.bad&&or(Fs(Z,Ae),S)==0&&or(_s(Z,Ae),D)==0)){var Ce=g.display.view,Te=S.line>=g.display.viewFrom&&Ud(g,S)||{node:Ce[0].measure.map[2],offset:0},je=D.line<g.display.viewTo&&Ud(g,D);if(!je){var yt=Ce[Ce.length-1].measure,Mt=yt.maps?yt.maps[yt.maps.length-1]:yt.map;je={node:Mt[Mt.length-1],offset:Mt[Mt.length-2]-Mt[Mt.length-3]}}if(!Te||!je){A.removeAllRanges();return}var en=A.rangeCount&&A.getRangeAt(0),Qt;try{Qt=Ze(Te.node,Te.offset,je.offset,je.node)}catch{}Qt&&(!i&&g.state.focused?(A.collapse(Te.node,Te.offset),Qt.collapsed||(A.removeAllRanges(),A.addRange(Qt))):(A.removeAllRanges(),A.addRange(Qt)),en&&A.anchorNode==null?A.addRange(en):i&&this.startGracePeriod()),this.rememberSelection()}},zo.prototype.startGracePeriod=function(){var A=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){A.gracePeriod=!1,A.selectionChanged()&&A.cm.operation(function(){return A.cm.curOp.selectionChanged=!0})},20)},zo.prototype.showMultipleSelections=function(A){De(this.cm.display.cursorDiv,A.cursors),De(this.cm.display.selectionDiv,A.selection)},zo.prototype.rememberSelection=function(){var A=this.getSelection();this.lastAnchorNode=A.anchorNode,this.lastAnchorOffset=A.anchorOffset,this.lastFocusNode=A.focusNode,this.lastFocusOffset=A.focusOffset},zo.prototype.selectionInEditor=function(){var A=this.getSelection();if(!A.rangeCount)return!1;var g=A.getRangeAt(0).commonAncestorContainer;return Je(this.div,g)},zo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||We(gt(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},zo.prototype.blur=function(){this.div.blur()},zo.prototype.getField=function(){return this.div},zo.prototype.supportsTouch=function(){return!0},zo.prototype.receivedFocus=function(){var A=this,g=this;this.selectionInEditor()?setTimeout(function(){return A.pollSelection()},20):ko(this.cm,function(){return g.cm.curOp.selectionChanged=!0});function E(){g.cm.state.focused&&(g.pollSelection(),g.polling.set(g.cm.options.pollInterval,E))}this.polling.set(this.cm.options.pollInterval,E)},zo.prototype.selectionChanged=function(){var A=this.getSelection();return A.anchorNode!=this.lastAnchorNode||A.anchorOffset!=this.lastAnchorOffset||A.focusNode!=this.lastFocusNode||A.focusOffset!=this.lastFocusOffset},zo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var A=this.getSelection(),g=this.cm;if(oe&&O&&this.cm.display.gutterSpecs.length&&Lp(A.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var E=gl(g,A.anchorNode,A.anchorOffset),S=gl(g,A.focusNode,A.focusOffset);E&&S&&ko(g,function(){va(g.doc,Qa(E,S),Ut),(E.bad||S.bad)&&(g.curOp.selectionChanged=!0)})}}},zo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var A=this.cm,g=A.display,E=A.doc.sel.primary(),S=E.from(),D=E.to();if(S.ch==0&&S.line>A.firstLine()&&(S=hn(S.line-1,Tr(A.doc,S.line-1).length)),D.ch==Tr(A.doc,D.line).text.length&&D.line<A.lastLine()&&(D=hn(D.line+1,0)),S.line<g.viewFrom||D.line>g.viewTo-1)return!1;var Z,Ae,Ce;S.line==g.viewFrom||(Z=dA(A,S.line))==0?(Ae=qe(g.view[0].line),Ce=g.view[0].node):(Ae=qe(g.view[Z].line),Ce=g.view[Z-1].node.nextSibling);var Te=dA(A,D.line),je,yt;if(Te==g.view.length-1?(je=g.viewTo-1,yt=g.lineDiv.lastChild):(je=qe(g.view[Te+1].line)-1,yt=g.view[Te+1].node.previousSibling),!Ce)return!1;for(var Mt=A.doc.splitLines(e0(A,Ce,yt,Ae,je)),en=tl(A.doc,hn(Ae,0),hn(je,Tr(A.doc,je).text.length));Mt.length>1&&en.length>1;)if(rr(Mt)==rr(en))Mt.pop(),en.pop(),je--;else if(Mt[0]==en[0])Mt.shift(),en.shift(),Ae++;else break;for(var Qt=0,wn=0,Ln=Mt[0],sr=en[0],Vn=Math.min(Ln.length,sr.length);Qt<Vn&&Ln.charCodeAt(Qt)==sr.charCodeAt(Qt);)++Qt;for(var wr=rr(Mt),yr=rr(en),Or=Math.min(wr.length-(Mt.length==1?Qt:0),yr.length-(en.
Line truncated
|
||||
`),He(D))}else return;Ae.type=="cut"&&(S.state.cutIncoming=+new Date)}}Ne(D,"cut",Z),Ne(D,"copy",Z),Ne(A.scroller,"paste",function(Ae){if(!(AA(A,Ae)||dt(S,Ae))){if(!D.dispatchEvent){S.state.pasteIncoming=+new Date,E.focus();return}var Ce=new Event("paste");Ce.clipboardData=Ae.clipboardData,D.dispatchEvent(Ce)}}),Ne(A.lineSpace,"selectstart",function(Ae){AA(A,Ae)||xt(Ae)}),Ne(D,"compositionstart",function(){var Ae=S.getCursor("from");E.composing&&E.composing.range.clear(),E.composing={start:Ae,range:S.markText(Ae,S.getCursor("to"),{className:"CodeMirror-composing"})}}),Ne(D,"compositionend",function(){E.composing&&(E.poll(),E.composing.range.clear(),E.composing=null)})},Da.prototype.createField=function(A){this.wrapper=Ld(),this.textarea=this.wrapper.firstChild;var g=this.cm.options;Ef(this.textarea,g.spellcheck,g.autocorrect,g.autocapitalize)},Da.prototype.screenReaderLabelChanged=function(A){A?this.textarea.setAttribute("aria-label",A):this.textarea.removeAttribute("aria-label")},Da.prototype.prepareSelection=function(){var A=this.cm,g=A.display,E=A.doc,S=Jc(A);if(A.options.moveInputWithCursor){var D=ln(A,E.sel.primary().head,"div"),Z=g.wrapper.getBoundingClientRect(),Ae=g.lineDiv.getBoundingClientRect();S.teTop=Math.max(0,Math.min(g.wrapper.clientHeight-10,D.top+Ae.top-Z.top)),S.teLeft=Math.max(0,Math.min(g.wrapper.clientWidth-10,D.left+Ae.left-Z.left))}return S},Da.prototype.showSelection=function(A){var g=this.cm,E=g.display;De(E.cursorDiv,A.cursors),De(E.selectionDiv,A.selection),A.teTop!=null&&(this.wrapper.style.top=A.teTop+"px",this.wrapper.style.left=A.teLeft+"px")},Da.prototype.reset=function(A){if(!(this.contextMenuPending||this.composing&&A)){var g=this.cm;if(this.resetting=!0,g.somethingSelected()){this.prevInput="";var E=g.getSelection();this.textarea.value=E,g.state.focused&&He(this.textarea),f&&y>=9&&(this.hasSelection=E)}else A||(this.prevInput=this.textarea.value="",f&&y>=9&&(this.hasSelection=null));this.resetting=!1}},Da.prototype.getField=function(){return this.textarea},Da.prototype.supportsTouch=function(){return!1},Da.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||We(gt(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},Da.prototype.blur=function(){this.textarea.blur()},Da.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Da.prototype.receivedFocus=function(){this.slowPoll()},Da.prototype.slowPoll=function(){var A=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){A.poll(),A.cm.state.focused&&A.slowPoll()})},Da.prototype.fastPoll=function(){var A=!1,g=this;g.pollingFast=!0;function E(){var S=g.poll();!S&&!A?(A=!0,g.polling.set(60,E)):(g.pollingFast=!1,g.slowPoll())}g.polling.set(20,E)},Da.prototype.poll=function(){var A=this,g=this.cm,E=this.textarea,S=this.prevInput;if(this.contextMenuPending||this.resetting||!g.state.focused||go(E)&&!S&&!this.composing||g.isReadOnly()||g.options.disableInput||g.state.keySeq)return!1;var D=E.value;if(D==S&&!g.somethingSelected())return!1;if(f&&y>=9&&this.hasSelection===D||$&&/[\uf700-\uf7ff]/.test(D))return g.display.input.reset(),!1;if(g.doc.sel==g.display.selForContextMenu){var Z=D.charCodeAt(0);if(Z==8203&&!S&&(S=""),Z==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ae=0,Ce=Math.min(S.length,D.length);Ae<Ce&&S.charCodeAt(Ae)==D.charCodeAt(Ae);)++Ae;return ko(g,function(){op(g,D.slice(Ae),S.length-Ae,null,A.composing?"*compose":null),D.length>1e3||D.indexOf(`
|
||||
`)>-1?E.value=A.prevInput="":A.prevInput=D,A.composing&&(A.composing.range.clear(),A.composing.range=g.markText(A.composing.start,g.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Da.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Da.prototype.onKeyPress=function(){f&&y>=9&&(this.hasSelection=null),this.fastPoll()},Da.prototype.onContextMenu=function(A){var g=this,E=g.cm,S=E.display,D=g.textarea;g.contextMenuPending&&g.contextMenuPending();var Z=tu(E,A),Ae=S.scroller.scrollTop;if(!Z||F)return;var Ce=E.options.resetSelectionOnContextMenu;Ce&&E.doc.sel.contains(Z)==-1&&mi(E,va)(E.doc,Qa(Z),Ut);var Te=D.style.cssText,je=g.wrapper.style.cssText,yt=g.wrapper.offsetParent.getBoundingClientRect();g.wrapper.style.cssText="position: static",D.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||||
top: `+(A.clientY-yt.top-5)+"px; left: "+(A.clientX-yt.left-5)+`px;
|
||||
z-index: 1000; background: `+(f?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Mt;x&&(Mt=D.ownerDocument.defaultView.scrollY),S.input.focus(),x&&D.ownerDocument.defaultView.scrollTo(null,Mt),S.input.reset(),E.somethingSelected()||(D.value=g.prevInput=" "),g.contextMenuPending=Qt,S.selForContextMenu=E.doc.sel,clearTimeout(S.detectingSelectAll);function en(){if(D.selectionStart!=null){var Ln=E.somethingSelected(),sr=""+(Ln?D.value:"");D.value="⇚",D.value=sr,g.prevInput=Ln?"":"",D.selectionStart=1,D.selectionEnd=sr.length,S.selForContextMenu=E.doc.sel}}function Qt(){if(g.contextMenuPending==Qt&&(g.contextMenuPending=!1,g.wrapper.style.cssText=je,D.style.cssText=Te,f&&y<9&&S.scrollbars.setScrollTop(S.scroller.scrollTop=Ae),D.selectionStart!=null)){(!f||f&&y<9)&&en();var Ln=0,sr=function(){S.selForContextMenu==E.doc.sel&&D.selectionStart==0&&D.selectionEnd>0&&g.prevInput==""?mi(E,Sl)(E):Ln++<10?S.detectingSelectAll=setTimeout(sr,500):(S.selForContextMenu=null,S.input.reset())};S.detectingSelectAll=setTimeout(sr,200)}}if(f&&y>=9&&en(),pe){gr(A);var wn=function(){rt(window,"mouseup",wn),setTimeout(Qt,20)};Ne(window,"mouseup",wn)}else setTimeout(Qt,50)},Da.prototype.readOnlyChanged=function(A){A||this.reset(),this.textarea.disabled=A=="nocursor",this.textarea.readOnly=!!A},Da.prototype.setUneditable=function(){},Da.prototype.needsContentAttribute=!1;function sp(A,g){if(g=g?Ue(g):{},g.value=A.value,!g.tabindex&&A.tabIndex&&(g.tabindex=A.tabIndex),!g.placeholder&&A.placeholder&&(g.placeholder=A.placeholder),g.autofocus==null){var E=We(gt(A));g.autofocus=E==A||A.getAttribute("autofocus")!=null&&E==document.body}function S(){A.value=Ce.getValue()}var D;if(A.form&&(Ne(A.form,"submit",S),!g.leaveSubmitMethodAlone)){var Z=A.form;D=Z.submit;try{var Ae=Z.submit=function(){S(),Z.submit=D,Z.submit(),Z.submit=Ae}}catch{}}g.finishInit=function(Te){Te.save=S,Te.getTextArea=function(){return A},Te.toTextArea=function(){Te.toTextArea=isNaN,S(),A.parentNode.removeChild(Te.getWrapperElement()),A.style.display="",A.form&&(rt(A.form,"submit",S),!g.leaveSubmitMethodAlone&&typeof A.form.submit=="function"&&(A.form.submit=D))}},A.style.display="none";var Ce=qo(function(Te){return A.parentNode.insertBefore(Te,A.nextSibling)},g);return Ce}function ap(A){A.off=rt,A.on=Ne,A.wheelEventPixels=zA,A.Doc=Zt,A.splitLines=ur,A.countColumn=Pe,A.findColumn=_n,A.isWordChar=Jn,A.Pass=ft,A.signal=ct,A.Line=Wa,A.changeEnd=qa,A.scrollbarModel=rd,A.Pos=hn,A.cmpPos=or,A.modes=oo,A.mimeModes=Ro,A.resolveMode=Ea,A.getMode=rs,A.modeExtensions=aa,A.extendMode=cl,A.copyState=Ao,A.startState=Zl,A.innerMode=Uu,A.commands=Bl,A.keyMap=Co,A.keyName=uu,A.isModifierKey=ol,A.lookupKey=es,A.normalizeKeyMap=Jo,A.StringStream=so,A.SharedTextMarker=Bt,A.TextMarker=mt,A.LineWidget=$e,A.e_preventDefault=xt,A.e_stopPropagation=Tn,A.e_stop=gr,A.addClass=Me,A.contains=Je,A.rmClass=me,A.keyNames=Si}cu(qo),jc(qo);var Wl="iter insert remove copy getEditor constructor".split(" ");for(var Ah in Zt.prototype)Zt.prototype.hasOwnProperty(Ah)&&it(Wl,Ah)<0&&(qo.prototype[Ah]=function(A){return function(){return A.apply(this.doc,arguments)}}(Zt.prototype[Ah]));return jt(Zt),qo.inputStyles={textarea:Da,contenteditable:zo},qo.defineMode=function(A){!qo.defaults.mode&&A!="null"&&(qo.defaults.mode=A),Pi.apply(this,arguments)},qo.defineMIME=Na,qo.defineMode("null",function(){return{token:function(A){return A.skipToEnd()}}}),qo.defineMIME("text/plain","null"),qo.defineExtension=function(A,g){qo.prototype[A]=g},qo.defineDocExtension=function(A,g){Zt.prototype[A]=g},qo.fromTextArea=sp,ap(qo),qo.version="5.65.18",qo})}(A2)),A2.exports}var Mue=O3();const Mp=Al(Mue);var ST={exports:{}},ET;function Sue(){return ET||(ET=1,function(n,e){(function(t){t(O3())})(function(t){t.defineMode("javascript",function(r,i){var s=r.indentUnit,a=i.statementIndent,o=i.jsonld,f=i.json||o,y=i.trackScope!==!1,x=i.typescript,B=i.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function qe(yo){return{type:yo,style:"keyword"}}var wt=qe("keyword a"),vn=qe("keyword b"),Yn=qe("keyword c"),hn=qe("keyword d"),or=qe("operator"),Ki={type:"atom",style:"atom"};return{if:qe("if"),while:wt,with:wt,else:vn,do:vn,try:vn,finally:vn,return:hn,break:hn,continue:hn,new:qe("new"),delete:Yn,void:Yn,throw:Yn,debugger:qe("debugger"),var:qe("var"),const:qe("var"),let:qe("var"),function:qe("function"),catch:qe("catch"),for:qe("for"),switch:qe("switch"),case:qe("case"),default:qe("default"),in:or,typeof:or,instanceof:or,true:Ki,false:Ki,null:Ki,undefined:Ki,NaN:Ki,Infinity:Ki,this:qe("this"),class:qe("class"),super:qe("atom"),yield:Yn,export:qe("export"),import:qe("import"),extends:Yn,await:Yn}}(),T=/[+\-*&%=<>!?|~^@]/,F=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function j(qe){for(var wt=!1,vn,Yn=!1;(vn=qe.next())!=null;){if(!wt){if(vn=="/"&&!Yn)return;vn=="["?Yn=!0:Yn&&vn=="]"&&(Yn=!1)}wt=!wt&&vn=="\\"}}var N,q;function H(qe,wt,vn){return N=qe,q=vn,wt}fun
Line truncated
|
||||
${B}`),j].join(`
|
||||
${o}`)}return y}(n,"",0)}var rC={exports:{}},Iue=rC.exports,TT;function kue(){return TT||(TT=1,function(n,e){(function(t,r){r(e)})(Iue,function(t){const r={isWhiteSpace:function(Me){return Me===" "||Me===" "||Me==="\uFEFF"||Me>=" "&&Me<="\r"||Me===" "||Me>=" "&&Me<=" "||Me==="\u2028"||Me==="\u2029"||Me===" "||Me===" "||Me===" "},isWhiteSpaceJSON:function(Me){return Me===" "||Me===" "||Me===`
|
||||
`||Me==="\r"},isLineTerminator:function(Me){return Me===`
|
||||
`||Me==="\r"||Me==="\u2028"||Me==="\u2029"},isLineTerminatorJSON:function(Me){return Me===`
|
||||
`||Me==="\r"},isIdentifierStart:function(Me){return Me==="$"||Me==="_"||Me>="A"&&Me<="Z"||Me>="a"&&Me<="z"||Me>=""&&r.NonAsciiIdentifierStart.test(Me)},isIdentifierPart:function(Me){return Me==="$"||Me==="_"||Me>="A"&&Me<="Z"||Me>="a"&&Me<="z"||Me>="0"&&Me<="9"||Me>=""&&r.NonAsciiIdentifierPart.test(Me)},NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\uLine truncated
|
||||
`,r:"\r",t:" ",v:"\v","/":"/"},y=Object.hasOwn,x={};function B(We,Me){(typeof We!="string"||!(We instanceof String))&&(We=String(We));const Fe=Me.mode==="json5",He=Me.ignoreBOM,bt=Me.ignoreComments||Me.mode==="cjson"||Fe,Yt=Me.ignoreTrailingCommas||Fe,gt=Me.ignoreProtoKey,Lt=Me.ignorePrototypeKeys,Kt=Me.allowSingleQuotedStrings||Fe,Ue=Me.allowDuplicateObjectKeys,Pe=Me.reviver,Be=Me.tokenize,it=Me.rawTokens,_t=Me.tokenLocations,ft=Me.tokenPaths,Ut=Fe?r.isLineTerminator:r.isLineTerminatorJSON,rn=Fe?r.isWhiteSpace:r.isWhiteSpaceJSON,Dt=We.length;let _n=0,qn=0,tn=0;const rr=[];let Dn,pn,Zn;if(Be){let Ye=null,rt,ct;Dn=function(){if(Ye!==null)throw Error("internal error, token overlap");rt=_n+1,ct=tn-qn+1,Ye=tn},pn=function(dt,qt){if(Ye!==tn){const Gt={type:dt};it&&(Gt.raw=We.substr(Ye,tn-Ye)),qt!==void 0&&(Gt.value=qt),_t&&(Gt.location={start:{column:ct,line:rt,offset:Ye}}),ft&&(Gt.path=Zn.slice()),rr.push(Gt)}return Ye=null,qt},ft&&(Zn=[])}function dr(){let Ye;return tn<Dt?Ye=`Unexpected token ${JSON.stringify(We[tn])}`:Ye="Unexpected end of input",Ye}function vr(Ye){const rt=tn-qn+1;++_n;const ct=Ee(Ye,We,tn,_n,rt),dt=SyntaxError(ct.message);return dt.reason=Ye,dt.excerpt=ct.excerpt,dt.pointer=ct.pointer,dt.location={start:{column:rt,line:_n,offset:tn}},dt}function Jn(Ye){throw Ye||(Ye=dr()),vr(Ye)}function Qe(Ye){Ye==="\r"&&We[tn]===`
|
||||
`&&++tn,qn=tn,++_n}function ce(){if(tn<Dt){Dn==null||Dn();const Ye=We[tn++];if(Ye==='"'||Ye==="'"&&Kt){const rt=p(Ye);return pn==null||pn("literal",rt),rt}if(Ye==="{")return pn==null||pn("symbol","{"),tr();if(Ye==="[")return pn==null||pn("symbol","["),Oe();if(Ye==="-"||Ye==="."||a(Ye)||Fe&&(Ye==="+"||Ye==="I"||Ye==="N")){const rt=se();return pn==null||pn("literal",rt),rt}if(Ye==="n")return sn("null"),pn==null||pn("literal",null),null;if(Ye==="t")return sn("true"),pn==null||pn("literal",!0),!0;if(Ye==="f")return sn("false"),pn==null||pn("literal",!1),!1;--tn,pn==null||pn();return}}function fe(){let Ye;if(tn<Dt){Dn==null||Dn();const rt=We[tn++];if(rt==='"'||rt==="'"&&Kt){const ct=p(rt);return pn==null||pn("literal",ct),ct}if(rt==="{")return pn==null||pn("symbol","{"),tr();if(rt==="[")return pn==null||pn("symbol","["),Oe();if(rt==="."||a(rt)){const ct=se();return pn==null||pn("literal",ct),ct}if(Fe&&r.isIdentifierStart(rt)||rt==="\\"&&We[tn]==="u"){const ct=tn-1;if(Ye=ve(),Ye===void 0){tn=ct,pn==null||pn();return}return pn==null||pn("literal",Ye),Ye}--tn,pn==null||pn();return}}function nt(){o(We)&&(Dn==null||Dn(),++tn,pn==null||pn("bom"))}function St(){let Ye;function rt(){Ye||(Ye=!0,--tn,Dn(),++tn)}function ct(){Ye&&(Ye=!1,pn("whitespace"))}for(;tn<Dt;){const dt=We[tn++];if(Ut(dt))Dn&&rt(),Qe(dt);else if(rn(dt))Dn&&rt();else if(dt==="/"&&bt&&(We[tn]==="/"||We[tn]==="*"))Dn&&(--tn,ct(),Dn(),++tn),Ht(We[tn++]==="*"),pn==null||pn("comment");else{--tn;break}}pn&&ct()}function Ht(Ye){for(;tn<Dt;){const rt=We[tn++];if(Ut(rt)){if(!Ye){--tn;return}Qe(rt)}else if(rt==="*"&&Ye&&We[tn]==="/"){++tn;return}}Ye&&Jn("Unclosed multiline comment")}function sn(Ye){const rt=tn;for(let ct=1,dt=Ye.length;ct<dt;++ct)(tn>=Dt||Ye[ct]!==We[tn])&&(tn=rt-1,Jn()),++tn}function tr(){let Ye={},rt=!1;for(;tn<Dt;){St();const ct=fe();Ue===!1&&y(Ye,ct)&&Jn(`Duplicate key: "${ct}"`),St(),Dn==null||Dn();let dt=We[tn++];if(pn==null||pn("symbol",dt),dt==="}"&&ct===void 0)return!Yt&&rt&&(--tn,Jn("Trailing comma in object")),Ye;if(dt===":"&&ct!==void 0){St(),Zn==null||Zn.push(ct);let qt=ce();if(Zn==null||Zn.pop(),qt===void 0&&Jn(`No value found for key "${ct}"`),typeof ct!="string"&&(!Fe||typeof ct!="number")&&Jn(`Wrong key type: "${ct}"`),Lt&&(ct in x||x[ct]!=null)||gt&&ct==="__proto__"||(Pe&&(qt=Pe(ct,qt)),qt!==void 0&&(rt=!0,ct==="__proto__"?Ye=Object.assign(JSON.parse(`{"__proto__":${JSON.stringify(qt)}}`),Ye):Ye[ct]=qt)),St(),Dn==null||Dn(),dt=We[tn++],pn==null||pn("symbol",dt),dt!==","){if(dt==="}")return Ye;Jn()}}else--tn,Jn()}Jn()}function Oe(){const Ye=[];for(;tn<Dt;){St(),Zn==null||Zn.push(Ye.length);let rt=ce();Zn==null||Zn.pop(),St(),Dn==null||Dn();const ct=We[tn++];if(pn==null||pn("symbol",ct),rt!==void 0&&(Pe&&(rt=Pe(String(Ye.length),rt)),rt===void 0?(++Ye.length,rt=!0):Ye.push(rt)),ct===",")rt===void 0&&Jn("Elisions are not supported");else{if(ct==="]")return!Yt&&rt===void 0&&Ye.length&&(--tn,Jn("Trailing comma in array")),Ye;--tn,Jn()}}}function se(){--tn;let Ye=tn,rt=We[tn++];const ct=function(dt){const qt=We.substr(Ye,tn-Ye);let Gt;if(dt?Gt=Number.parseInt(qt.replace(/^0o?/,""),8):Gt=Number(qt),Number.isNaN(Gt))--tn,Jn(`Bad numeric literal - "${We.substr(Ye,tn-Ye+1)}"`);else if(!Fe&&!qt.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i))--tn,Jn(`Non-json numeric literal - "${We.substr(Ye,tn-Ye+1)}"`);else return Gt};if((rt==="-"||rt==="+"&&Fe)&&(rt=We[tn++]),rt==="N"&&Fe)return sn("NaN"),Number.NaN;if(rt==="I"&&Fe)return sn("Infinity"),ct();if(rt>="1"&&rt<="9"){for(;tn<Dt&&a(We[tn]);)++tn;rt=We[tn++]}if(rt==="0"){rt=We[tn++];const dt=rt==="o"||rt==="O"||s(rt),qt=rt==="x"||rt==="X";if(Fe&&(dt||qt)){for(;tn<Dt&&(qt?i:s)(We[tn]);)++tn;let Gt=1;return We[Ye]==="-"?(Gt=-1,++Ye):We[Ye]==="+"&&++Ye,Gt*ct(dt)}}if(rt==="."){for(;tn<Dt&&a(We[tn]);)++tn;rt=We[tn++]}if(rt==="e"||rt==="E"){for(rt=We[tn++],(rt==="-"||rt==="+")&&++tn;tn<Dt&&a(We[tn]);)++tn;rt=We[tn++]}return--tn,ct()}function ve(){--tn;let Ye="";for(;tn<Dt;){let rt=We[tn++];if(rt==="\\"&&We[tn]==="u"&&i(We[tn+1])&&i(We[tn+2])&&i(We[tn+3])&&i(We[tn+4])&&(rt=String.fromCharCode(Number.parseInt(We.substr(tn+1,4),16)),tn+=5),Ye.length)if(r.isIdentifierPart(rt))Ye+=rt;else return--tn,Ye;else if(r.isIdentifierStart(rt))Ye+=rt;else return}Jn()}function p(Ye){let rt="";for(;tn<Dt;){let ct=We[tn++];if(ct===Ye)return rt;if(ct==="\\")if(tn>=Dt&&Jn(),ct=We[tn++],f[ct]&&(Fe||ct!=="v"&&(ct!=="'"||Kt)))rt+=f[ct];else if(Fe&&Ut(ct))Qe(ct);else if(ct==="u"||ct==="x"&&Fe){const dt=ct==="u"?4:2;for(let qt=0;qt<dt;++qt)tn>=Dt&&Jn(),i(We[tn])||Jn("Bad escape sequence"),tn++;rt+=String.fromCharCode(Number.parseInt(We.substr(tn-dt,dt),16))}else if(Fe&&s(ct)){let dt;ct<"4"&&s(We[tn])&&s(We[tn+1])?dt=3:s(We[tn])?dt=2:dt=1,tn+=dt-1,rt+=String.fromCharCode(Number.parseInt(We.substr(tn-dt,dt),8))}else Fe?rt+=ct:(--tn,Jn());else Ut(ct)?Jn():(!Fe&&ct.charCodeAt(0)<32&&(--tn,Jn("Unexpected control character")),rt+=ct)}Jn()}He&&nt(),St();let Ne=ce();if(Ne!==void 0||tn<Dt){if(St(),tn>=Dt)return Pe&&(Ne=P
Line truncated
|
||||
${gt}
|
||||
${Kt}
|
||||
${We}`):Lt=`Parse error in JSON input:
|
||||
${gt}
|
||||
${We}`,{message:Lt,excerpt:gt,pointer:Kt}}function me(We,Me){let Fe=G(Me);const He=ie(We,Fe)||he(We,Fe)||pe(We,Fe);let bt,Yt,gt;He?(bt=He.offset,Yt=He.line,gt=He.column,Fe=He.reason):bt=0,Me.reason=Fe;const Lt=Ee(Fe,We,bt,Yt,gt);return Me.message=Lt.message,Me.excerpt=Lt.excerpt,Lt.pointer&&(Me.pointer=Lt.pointer,Me.location={start:{column:gt,line:Yt,offset:bt}}),Me}function Se(We,Me){try{return JSON.parse(We,Me)}catch(Fe){const He=me(We,Fe);if(Fe.location)throw He;return O(We,Me)}}const De=typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor),be=typeof process<"u"&&process.version.startsWith("v4.");function at(We){return We.ignoreBOM||We.ignoreComments||We.ignoreTrailingCommas||We.allowSingleQuotedStrings||We.allowDuplicateObjectKeys===!1||We.ignoreProtoKey||We.ignorePrototypeKeys||We.mode==="cjson"||We.mode==="json5"||De||be}function Ze(We){if(typeof We=="function")return We;if(We)return We.reviver}function Je(We,Me){return Me||(Me={}),at(Me)?O(We,Me):Se(We,Ze(Me))}t.parse=Je,t.tokenize=T,t.pathToPointer=j,t.pointerToPath=q,t.parseNative=Se,t.parseCustom=O,t.getErrorTexts=Ee,Object.defineProperty(t,"__esModule",{value:!0})})}(rC,rC.exports)),rC.exports}var Tue=kue(),c2={exports:{}},Pue=c2.exports,PT;function Kue(){return PT||(PT=1,function(n,e){(function(t,r){n.exports=r()})(Pue,function(){var t=typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function r(Pe,Be){return Be={exports:{}},Pe(Be,Be.exports),Be.exports}var i=r(function(Pe){function Be(){var it=0,_t=1,ft=2,Ut=3,rn=4,Dt=5,_n=6,qn=7,tn=8,rr=9,Dn=10,pn=11,Zn=12,dr=13,vr=14,Jn=15,Qe=16,ce=17,fe=0,nt=1,St=2,Ht=3,sn=4;function tr(p,Ne){return 55296<=p.charCodeAt(Ne)&&p.charCodeAt(Ne)<=56319&&56320<=p.charCodeAt(Ne+1)&&p.charCodeAt(Ne+1)<=57343}function Oe(p,Ne){Ne===void 0&&(Ne=0);var Ye=p.charCodeAt(Ne);if(55296<=Ye&&Ye<=56319&&Ne<p.length-1){var rt=Ye,ct=p.charCodeAt(Ne+1);return 56320<=ct&&ct<=57343?(rt-55296)*1024+(ct-56320)+65536:rt}if(56320<=Ye&&Ye<=57343&&Ne>=1){var rt=p.charCodeAt(Ne-1),ct=Ye;return 55296<=rt&&rt<=56319?(rt-55296)*1024+(ct-56320)+65536:ct}return Ye}function se(p,Ne,Ye){var rt=[p].concat(Ne).concat([Ye]),ct=rt[rt.length-2],dt=Ye,qt=rt.lastIndexOf(vr);if(qt>1&&rt.slice(1,qt).every(function(xt){return xt==Ut})&&[Ut,dr,ce].indexOf(p)==-1)return St;var Gt=rt.lastIndexOf(rn);if(Gt>0&&rt.slice(1,Gt).every(function(xt){return xt==rn})&&[Zn,rn].indexOf(ct)==-1)return rt.filter(function(xt){return xt==rn}).length%2==1?Ht:sn;if(ct==it&&dt==_t)return fe;if(ct==ft||ct==it||ct==_t)return dt==vr&&Ne.every(function(xt){return xt==Ut})?St:nt;if(dt==ft||dt==it||dt==_t)return nt;if(ct==_n&&(dt==_n||dt==qn||dt==rr||dt==Dn))return fe;if((ct==rr||ct==qn)&&(dt==qn||dt==tn))return fe;if((ct==Dn||ct==tn)&&dt==tn)return fe;if(dt==Ut||dt==Jn)return fe;if(dt==Dt)return fe;if(ct==Zn)return fe;var jt=rt.indexOf(Ut)!=-1?rt.lastIndexOf(Ut)-1:rt.length-2;return[dr,ce].indexOf(rt[jt])!=-1&&rt.slice(jt+1,-1).every(function(xt){return xt==Ut})&&dt==vr||ct==Jn&&[Qe,ce].indexOf(dt)!=-1?fe:Ne.indexOf(rn)!=-1?St:ct==rn&&dt==rn?fe:nt}this.nextBreak=function(p,Ne){if(Ne===void 0&&(Ne=0),Ne<0)return 0;if(Ne>=p.length-1)return p.length;for(var Ye=ve(Oe(p,Ne)),rt=[],ct=Ne+1;ct<p.length;ct++)if(!tr(p,ct-1)){var dt=ve(Oe(p,ct));if(se(Ye,rt,dt))return ct;rt.push(dt)}return p.length},this.splitGraphemes=function(p){for(var Ne=[],Ye=0,rt;(rt=this.nextBreak(p,Ye))<p.length;)Ne.push(p.slice(Ye,rt)),Ye=rt;return Ye<p.length&&Ne.push(p.slice(Ye)),Ne},this.iterateGraphemes=function(p){var Ne=0,Ye={next:(function(){var rt,ct;return(ct=this.nextBreak(p,Ne))<p.length?(rt=p.slice(Ne,ct),Ne=ct,{value:rt,done:!1}):Ne<p.length?(rt=p.slice(Ne),Ne=p.length,{value:rt,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Ye[Symbol.iterator]=function(){return Ye}),Ye},this.countGraphemes=function(p){for(var Ne=0,Ye=0,rt;(rt=this.nextBreak(p,Ye))<p.length;)Ye=rt,Ne++;return Ye<p.length&&Ne++,Ne};function ve(p){return 1536<=p&&p<=1541||p==1757||p==1807||p==2274||p==3406||p==69821||70082<=p&&p<=70083||p==72250||72326<=p&&p<=72329||p==73030?Zn:p==13?it:p==10?_t:0<=p&&p<=9||11<=p&&p<=12||14<=p&&p<=31||127<=p&&p<=159||p==173||p==1564||p==6158||p==8203||8206<=p&&p<=8207||p==8232||p==8233||8234<=p&&p<=8238||8288<=p&&p<=8292||p==8293||8294<=p&&p<=8303||55296<=p&&p<=57343||p==65279||65520<=p&&p<=65528||65529<=p&&p<=65531||113824<=p&&p<=113827||119155<=p&&p<=119162||p==917504||p==917505||917506<=p&&p<=917535||917632<=p&&p<=917759||918e3<=p&&p<=921599?ft:768<=p&&p<=879||1155<=p&&p<=1159||1160<=p&&p<=1161||1425<=p&&p<=1469||p==1471||1473<=p&&p<=1474||1476<=p&&p<=1477||p==1479||1552<=p&&p<=1562||1611<=p&&p<=1631||p==1648||1750<=p&&p<=1756||1759<=p&&p<=1764||1767<=p&&p<=1768||1770<=p&&p<=1773||p==1809||1840<=p&&p<=1866||1958<=p&&p<=1968||2027<=p&&p<=2035||2070<=p&&p<=2073||2075<=p&&p<=2083||2085<=p&&p<=2087||2089<=p&&p<=2093||2137<=p&&p<=2139||2260<=p&&p<=2273||2275<=p&&p<=2306||p==2362||p==2364||2369<=p&&p<=
Line truncated
|
||||
`)}var tn={extraLines:2,tabSize:4},rr=function(pn,Zn,dr,vr){vr=Dt({},tn,vr);var Jn=pn.split(/\r\n?|\n|\f/),Qe=Math.max(1,Zn-vr.extraLines)-1,ce=Math.min(Zn+vr.extraLines,Jn.length),fe=String(ce).length,nt=qn(Jn,Qe,Zn,fe,vr),St=_n(Jn[Zn-1].substring(0,dr-1),Zn,fe,vr),Ht=ft(" ",St.length)+"^",sn=qn(Jn,Zn,ce,fe,vr);return[nt,Ht,sn].filter(Boolean).join(`
|
||||
`)};return rr})}),y=new Error().stack,x=function(Pe){var Be=Object.create(SyntaxError.prototype);return Object.assign(Be,Pe,{name:"SyntaxError"}),Object.defineProperty(Be,"stack",{get:function(){return y?y.replace(/^(.+\n){1,3}/,String(Be)+`
|
||||
`):""}}),Be},B=function(Pe,Be,it,_t,ft){throw x({message:_t?Pe+`
|
||||
`+f(Be,_t,ft):Pe,rawMessage:Pe,source:it,line:_t,column:ft})},O={unexpectedEnd:function(){return"Unexpected end of input"},unexpectedToken:function(Be){for(var it=arguments.length,_t=Array(it>1?it-1:0),ft=1;ft<it;ft++)_t[ft-1]=arguments[ft];return"Unexpected token <"+Be+"> at "+_t.filter(Boolean).join(":")}},T={unexpectedSymbol:function(Be){for(var it=arguments.length,_t=Array(it>1?it-1:0),ft=1;ft<it;ft++)_t[ft-1]=arguments[ft];return"Unexpected symbol <"+Be+"> at "+_t.filter(Boolean).join(":")}},F={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10},j={"{":F.LEFT_BRACE,"}":F.RIGHT_BRACE,"[":F.LEFT_BRACKET,"]":F.RIGHT_BRACKET,":":F.COLON,",":F.COMMA},N={true:F.TRUE,false:F.FALSE,null:F.NULL},q={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2},H={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},oe={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function ne(Pe){return Pe>="1"&&Pe<="9"}function $(Pe){return Pe>="0"&&Pe<="9"}function te(Pe){return $(Pe)||Pe>="a"&&Pe<="f"||Pe>="A"&&Pe<="F"}function G(Pe){return Pe==="e"||Pe==="E"}function ie(Pe,Be,it,_t){var ft=Pe.charAt(Be);if(ft==="\r")Be++,it++,_t=1,Pe.charAt(Be)===`
|
||||
`&&Be++;else if(ft===`
|
||||
`)Be++,it++,_t=1;else if(ft===" "||ft===" ")Be++,_t++;else return null;return{index:Be,line:it,column:_t}}function he(Pe,Be,it,_t){var ft=Pe.charAt(Be);return ft in j?{type:j[ft],line:it,column:_t+1,index:Be+1,value:null}:null}function pe(Pe,Be,it,_t){for(var ft in N)if(N.hasOwnProperty(ft)&&Pe.substr(Be,ft.length)===ft)return{type:N[ft],line:it,column:_t+ft.length,index:Be+ft.length,value:ft};return null}function Ee(Pe,Be,it,_t){for(var ft=Be,Ut=q._START_;Be<Pe.length;){var rn=Pe.charAt(Be);switch(Ut){case q._START_:{if(rn==='"')Be++,Ut=q.START_QUOTE_OR_CHAR;else return null;break}case q.START_QUOTE_OR_CHAR:{if(rn==="\\")Be++,Ut=q.ESCAPE;else{if(rn==='"')return Be++,{type:F.STRING,line:it,column:_t+Be-ft,index:Be,value:Pe.slice(ft,Be)};Be++}break}case q.ESCAPE:{if(rn in H){if(Be++,rn==="u")for(var Dt=0;Dt<4;Dt++){var _n=Pe.charAt(Be);if(_n&&te(_n))Be++;else return null}Ut=q.START_QUOTE_OR_CHAR}else return null;break}}}}function me(Pe,Be,it,_t){var ft=Be,Ut=Be,rn=oe._START_;e:for(;Be<Pe.length;){var Dt=Pe.charAt(Be);switch(rn){case oe._START_:{if(Dt==="-")rn=oe.MINUS;else if(Dt==="0")Ut=Be+1,rn=oe.ZERO;else if(ne(Dt))Ut=Be+1,rn=oe.DIGIT;else return null;break}case oe.MINUS:{if(Dt==="0")Ut=Be+1,rn=oe.ZERO;else if(ne(Dt))Ut=Be+1,rn=oe.DIGIT;else return null;break}case oe.ZERO:{if(Dt===".")rn=oe.POINT;else if(G(Dt))rn=oe.EXP;else break e;break}case oe.DIGIT:{if($(Dt))Ut=Be+1;else if(Dt===".")rn=oe.POINT;else if(G(Dt))rn=oe.EXP;else break e;break}case oe.POINT:{if($(Dt))Ut=Be+1,rn=oe.DIGIT_FRACTION;else break e;break}case oe.DIGIT_FRACTION:{if($(Dt))Ut=Be+1;else if(G(Dt))rn=oe.EXP;else break e;break}case oe.EXP:{if(Dt==="+"||Dt==="-")rn=oe.EXP_DIGIT_OR_SIGN;else if($(Dt))Ut=Be+1,rn=oe.EXP_DIGIT_OR_SIGN;else break e;break}case oe.EXP_DIGIT_OR_SIGN:{if($(Dt))Ut=Be+1;else break e;break}}Be++}return Ut>0?{type:F.NUMBER,line:it,column:_t+Ut-ft,index:Ut,value:Pe.slice(ft,Ut)}:null}var Se=function(Be,it){for(var _t=1,ft=1,Ut=0,rn=[];Ut<Be.length;){var Dt=[Be,Ut,_t,ft],_n=ie.apply(void 0,Dt);if(_n){Ut=_n.index,_t=_n.line,ft=_n.column;continue}var qn=he.apply(void 0,Dt)||pe.apply(void 0,Dt)||Ee.apply(void 0,Dt)||me.apply(void 0,Dt);if(qn){var tn={type:qn.type,value:qn.value,loc:o(_t,ft,Ut,qn.line,qn.column,qn.index,it.source)};rn.push(tn),Ut=qn.index,_t=qn.line,ft=qn.column}else B(T.unexpectedSymbol(a(Be,Ut,Ut+1),it.source,_t,ft),Be,it.source,_t,ft)}return rn},De={_START_:0,OPEN_OBJECT:1,PROPERTY:2,COMMA:3},be={_START_:0,KEY:1,COLON:2},at={_START_:0,OPEN_ARRAY:1,VALUE:2,COMMA:3},Ze={loc:!0,source:null};function Je(Pe,Be,it){var _t=Be.length>0?Be[Be.length-1].loc.end:{line:1,column:1};B(O.unexpectedEnd(),Pe,it.source,_t.line,_t.column)}function We(Pe){for(var Be=0,it=0;it<4;it++)Be=Be*16+parseInt(Pe[it],16);return String.fromCharCode(Be)}var Me={b:"\b",f:"\f",n:`
|
||||
`,r:"\r",t:" "},Fe=['"',"\\","/"];function He(Pe){for(var Be="",it=0;it<Pe.length;it++){var _t=Pe.charAt(it);if(_t==="\\"){it++;var ft=Pe.charAt(it);if(ft==="u")Be+=We(Pe.substr(it+1,4)),it+=4;else if(Fe.indexOf(ft)!==-1)Be+=ft;else if(ft in Me)Be+=Me[ft];else break}else Be+=_t}return Be}function bt(Pe,Be,it,_t){for(var ft=void 0,Ut={type:"Object",children:[]},rn=De._START_;it<Be.length;){var Dt=Be[it];switch(rn){case De._START_:{if(Dt.type===F.LEFT_BRACE)ft=Dt,rn=De.OPEN_OBJECT,it++;else return null;break}case De.OPEN_OBJECT:{if(Dt.type===F.RIGHT_BRACE)return _t.loc&&(Ut.loc=o(ft.loc.start.line,ft.loc.start.column,ft.loc.start.offset,Dt.loc.end.line,Dt.loc.end.column,Dt.loc.end.offset,_t.source)),{value:Ut,index:it+1};var _n=Yt(Pe,Be,it,_t);Ut.children.push(_n.value),rn=De.PROPERTY,it=_n.index;break}case De.PROPERTY:{if(Dt.type===F.RIGHT_BRACE)return _t.loc&&(Ut.loc=o(ft.loc.start.line,ft.loc.start.column,ft.loc.start.offset,Dt.loc.end.line,Dt.loc.end.column,Dt.loc.end.offset,_t.source)),{value:Ut,index:it+1};Dt.type===F.COMMA?(rn=De.COMMA,it++):B(O.unexpectedToken(a(Pe,Dt.loc.start.offset,Dt.loc.end.offset),_t.source,Dt.loc.start.line,Dt.loc.start.column),Pe,_t.source,Dt.loc.start.line,Dt.loc.start.column);break}case De.COMMA:{var qn=Yt(Pe,Be,it,_t);qn?(it=qn.index,Ut.children.push(qn.value),rn=De.PROPERTY):B(O.unexpectedToken(a(Pe,Dt.loc.start.offset,Dt.loc.end.offset),_t.source,Dt.loc.start.line,Dt.loc.start.column),Pe,_t.source,Dt.loc.start.line,Dt.loc.start.column);break}}}Je(Pe,Be,_t)}function Yt(Pe,Be,it,_t){for(var ft=void 0,Ut={type:"Property",key:null,value:null},rn=be._START_;it<Be.length;){var Dt=Be[it];switch(rn){case be._START_:{if(Dt.type===F.STRING){var _n={type:"Identifier",value:He(Pe.slice(Dt.loc.start.offset+1,Dt.loc.end.offset-1)),raw:Dt.value};_t.loc&&(_n.loc=Dt.loc),ft=Dt,Ut.key=_n,rn=be.KEY,it++}else return null;break}case be.KEY:{Dt.type===F.COLON?(rn=be.COLON,it++):B(O.unexpectedToken(a(Pe,Dt.loc.start.offset,Dt.loc.end.offset),_t.source,Dt.loc.start.line,Dt.loc.start.column),Pe,_t.source,Dt.loc.start.line,Dt.loc.start.column);break}case be.COLON:{var qn=Kt(Pe,Be,it,_t);return Ut.value=qn.value,_t.loc&&(Ut.loc=o(ft.loc.start.line,ft.loc.start.column,ft.loc.start.offset,qn.value.loc.end.line,qn.value.loc.end.column,qn.value.loc.end.offset,_t.source)),{value:Ut,index:qn.index}}}}}function gt(Pe,Be,it,_t){for(var ft=void 0,Ut={type:"Array",children:[]},rn=at._START_,Dt=void 0;it<Be.length;)switch(Dt=Be[it],rn){case at._START_:{if(Dt.type===F.LEFT_BRACKET)ft=Dt,rn=at.OPEN_ARRAY,it++;else return null;break}case at.OPEN_ARRAY:{if(Dt.type===F.RIGHT_BRACKET)return _t.loc&&(Ut.loc=o(ft.loc.start.line,ft.loc.start.column,ft.loc.start.offset,Dt.loc.end.line,Dt.loc.end.column,Dt.loc.end.offset,_t.source)),{value:Ut,index:it+1};var _n=Kt(Pe,Be,it,_t);it=_n.index,Ut.children.push(_n.value),rn=at.VALUE;break}case at.VALUE:{if(Dt.type===F.RIGHT_BRACKET)return _t.loc&&(Ut.loc=o(ft.loc.start.line,ft.loc.start.column,ft.loc.start.offset,Dt.loc.end.line,Dt.loc.end.column,Dt.loc.end.offset,_t.source)),{value:Ut,index:it+1};Dt.type===F.COMMA?(rn=at.COMMA,it++):B(O.unexpectedToken(a(Pe,Dt.loc.start.offset,Dt.loc.end.offset),_t.source,Dt.loc.start.line,Dt.loc.start.column),Pe,_t.source,Dt.loc.start.line,Dt.loc.start.column);break}case at.COMMA:{var qn=Kt(Pe,Be,it,_t);it=qn.index,Ut.children.push(qn.value),rn=at.VALUE;break}}Je(Pe,Be,_t)}function Lt(Pe,Be,it,_t){var ft=Be[it],Ut=null;switch(ft.type){case F.STRING:{Ut=He(Pe.slice(ft.loc.start.offset+1,ft.loc.end.offset-1));break}case F.NUMBER:{Ut=Number(ft.value);break}case F.TRUE:{Ut=!0;break}case F.FALSE:{Ut=!1;break}case F.NULL:{Ut=null;break}default:return null}var rn={type:"Literal",value:Ut,raw:ft.value};return _t.loc&&(rn.loc=ft.loc),{value:rn,index:it+1}}function Kt(Pe,Be,it,_t){var ft=Be[it],Ut=Lt.apply(void 0,arguments)||bt.apply(void 0,arguments)||gt.apply(void 0,arguments);if(Ut)return Ut;B(O.unexpectedToken(a(Pe,ft.loc.start.offset,ft.loc.end.offset),_t.source,ft.loc.start.line,ft.loc.start.column),Pe,_t.source,ft.loc.start.line,ft.loc.start.column)}var Ue=function(Pe,Be){Be=Object.assign({},Ze,Be);var it=Se(Pe,Be);it.length===0&&Je(Pe,it,Be);var _t=Kt(Pe,it,0,Be);if(_t.index===it.length)return _t.value;var ft=it[_t.index];B(O.unexpectedToken(a(Pe,ft.loc.start.offset,ft.loc.end.offset),Be.source,ft.loc.start.line,ft.loc.start.column),Pe,Be.source,ft.loc.start.line,ft.loc.start.column)};return Ue})}(c2)),c2.exports}var Due=Kue();const Rue=Al(Due);function fr(){var n="/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",e="89c156e637b20b434cfb214df7fad7d710253070",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",statementMap:{0:{start:{line:5,column:0},end:{line:10,column:3}},1:{start:{line:6,column:2},end:{line:9,column:4}},2:{start:{line:12,column:16},end:{line:12,column:18}},3:{start:{line:13,column:2},end:{line:30,column:3}},4:{start:{line:14,column:4},end:{line:14,column:16}}
Line truncated
|
||||
rgba(`+ne.r+","+ne.g+","+ne.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:ne.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+ne.r+","+ne.g+","+ne.b+`, 0) 0%,
|
||||
rgba(`+ne.r+","+ne.g+","+ne.b+", 1) 100%)"},pointer:{left:0,top:ne.a*100+"%"}},overwrite:n({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return r.default.createElement("div",{style:$.alpha},r.default.createElement("div",{style:$.checkboard},r.default.createElement(y.default,{renderers:this.props.renderers})),r.default.createElement("div",{style:$.gradient}),r.default.createElement("div",{style:$.container,ref:function(G){return oe.container=G},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.default.createElement("div",{style:$.pointer},this.props.pointer?r.default.createElement(this.props.pointer,this.props):r.default.createElement("div",{style:$.slider}))))}}]),q}(t.PureComponent||t.Component);return q1.default=j,q1}var $1={},oR;function rde(){if(oR)return $1;oR=1,Object.defineProperty($1,"__esModule",{value:!0}),$1.EditableInput=void 0;var n=function(){function H(oe,ne){for(var $=0;$<ne.length;$++){var te=ne[$];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(oe,te.key,te)}}return function(oe,ne,$){return ne&&H(oe.prototype,ne),$&&H(oe,$),oe}}(),e=ja(),t=s(e),r=Pp(),i=s(r);function s(H){return H&&H.__esModule?H:{default:H}}function a(H,oe,ne){return oe in H?Object.defineProperty(H,oe,{value:ne,enumerable:!0,configurable:!0,writable:!0}):H[oe]=ne,H}function o(H,oe){if(!(H instanceof oe))throw new TypeError("Cannot call a class as a function")}function f(H,oe){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe&&(typeof oe=="object"||typeof oe=="function")?oe:H}function y(H,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof oe);H.prototype=Object.create(oe&&oe.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),oe&&(Object.setPrototypeOf?Object.setPrototypeOf(H,oe):H.__proto__=oe)}var x=1,B=38,O=40,T=[B,O],F=function(oe){return T.indexOf(oe)>-1},j=function(oe){return Number(String(oe).replace(/%/g,""))},N=1,q=$1.EditableInput=function(H){y(oe,H);function oe(ne){o(this,oe);var $=f(this,(oe.__proto__||Object.getPrototypeOf(oe)).call(this));return $.handleBlur=function(){$.state.blurValue&&$.setState({value:$.state.blurValue,blurValue:null})},$.handleChange=function(te){$.setUpdatedValue(te.target.value,te)},$.handleKeyDown=function(te){var G=j(te.target.value);if(!isNaN(G)&&F(te.keyCode)){var ie=$.getArrowOffset(),he=te.keyCode===B?G+ie:G-ie;$.setUpdatedValue(he,te)}},$.handleDrag=function(te){if($.props.dragLabel){var G=Math.round($.props.value+te.movementX);G>=0&&G<=$.props.dragMax&&$.props.onChange&&$.props.onChange($.getValueObjectWithLabel(G),te)}},$.handleMouseDown=function(te){$.props.dragLabel&&(te.preventDefault(),$.handleDrag(te),window.addEventListener("mousemove",$.handleDrag),window.addEventListener("mouseup",$.handleMouseUp))},$.handleMouseUp=function(){$.unbindEventListeners()},$.unbindEventListeners=function(){window.removeEventListener("mousemove",$.handleDrag),window.removeEventListener("mouseup",$.handleMouseUp)},$.state={value:String(ne.value).toUpperCase(),blurValue:String(ne.value).toUpperCase()},$.inputId="rc-editable-input-"+N++,$}return n(oe,[{key:"componentDidUpdate",value:function($,te){this.props.value!==this.state.value&&($.value!==this.props.value||te.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function($){return a({},this.props.label,$)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||x}},{key:"setUpdatedValue",value:function($,te){var G=this.props.label?this.getValueObjectWithLabel($):$;this.props.onChange&&this.props.onChange(G,te),this.setState({value:$})}},{key:"render",value:function(){var $=this,te=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return t.default.createElement("div",{style:te.wrap},t.default.createElement("input",{id:this.inputId,style:te.input,ref:function(ie){return $.input=ie},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?t.default.createElement("label",{htmlFor:this.inputId,style:te.label,onMouseDown:this.handleMouseDown},this.props.label):null)}
Line truncated
|
||||
.hue-horizontal {
|
||||
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
||||
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
||||
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
}
|
||||
|
||||
.hue-vertical {
|
||||
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
||||
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
||||
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
||||
}
|
||||
`),t.default.createElement("div",{style:oe.pointer},this.props.pointer?t.default.createElement(this.props.pointer,this.props):t.default.createElement("div",{style:oe.slider}))))}}]),F}(e.PureComponent||e.Component);return V1.default=O,V1}var H1={},lR;function sde(){if(lR)return H1;lR=1,Object.defineProperty(H1,"__esModule",{value:!0}),H1.Raised=void 0;var n=ja(),e=f(n),t=Op(),r=f(t),i=Pp(),s=f(i),a=eG(),o=f(a);function f(x){return x&&x.__esModule?x:{default:x}}var y=H1.Raised=function(B){var O=B.zDepth,T=B.radius,F=B.background,j=B.children,N=B.styles,q=N===void 0?{}:N,H=(0,s.default)((0,o.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+O+"px "+O*4+"px rgba(0,0,0,.24)",borderRadius:T,background:F}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},q),{"zDepth-1":O===1});return e.default.createElement("div",{style:H.wrap},e.default.createElement("div",{style:H.bg}),e.default.createElement("div",{style:H.content},j))};return y.propTypes={background:r.default.string,zDepth:r.default.oneOf([0,1,2,3,4,5]),radius:r.default.number,styles:r.default.object},y.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},H1.default=y,H1}var Z1={},hE,uR;function ade(){if(uR)return hE;uR=1;var n=Tp(),e=function(){return n.Date.now()};return hE=e,hE}var fE,AR;function lde(){if(AR)return fE;AR=1;var n=/\s/;function e(t){for(var r=t.length;r--&&n.test(t.charAt(r)););return r}return fE=e,fE}var pE,cR;function ude(){if(cR)return pE;cR=1;var n=lde(),e=/^\s+/;function t(r){return r&&r.slice(0,n(r)+1).replace(e,"")}return pE=t,pE}var mE,dR;function Ade(){if(dR)return mE;dR=1;var n=ude(),e=Jf(),t=U3(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt;function f(y){if(typeof y=="number")return y;if(t(y))return r;if(e(y)){var x=typeof y.valueOf=="function"?y.valueOf():y;y=e(x)?x+"":x}if(typeof y!="string")return y===0?y:+y;y=n(y);var B=s.test(y);return B||a.test(y)?o(y.slice(2),B?2:8):i.test(y)?r:+y}return mE=f,mE}var gE,hR;function tG(){if(hR)return gE;hR=1;var n=Jf(),e=ade(),t=Ade(),r="Expected a function",i=Math.max,s=Math.min;function a(o,f,y){var x,B,O,T,F,j,N=0,q=!1,H=!1,oe=!0;if(typeof o!="function")throw new TypeError(r);f=t(f)||0,n(y)&&(q=!!y.leading,H="maxWait"in y,O=H?i(t(y.maxWait)||0,f):O,oe="trailing"in y?!!y.trailing:oe);function ne(Se){var De=x,be=B;return x=B=void 0,N=Se,T=o.apply(be,De),T}function $(Se){return N=Se,F=setTimeout(ie,f),q?ne(Se):T}function te(Se){var De=Se-j,be=Se-N,at=f-De;return H?s(at,O-be):at}function G(Se){var De=Se-j,be=Se-N;return j===void 0||De>=f||De<0||H&&be>=O}function ie(){var Se=e();if(G(Se))return he(Se);F=setTimeout(ie,te(Se))}function he(Se){return F=void 0,oe&&x?ne(Se):(x=B=void 0,T)}function pe(){F!==void 0&&clearTimeout(F),N=0,x=j=B=F=void 0}function Ee(){return F===void 0?T:he(e())}function me(){var Se=e(),De=G(Se);if(x=arguments,B=this,j=Se,De){if(F===void 0)return $(j);if(H)return clearTimeout(F),F=setTimeout(ie,f),ne(j)}return F===void 0&&(F=setTimeout(ie,f)),T}return me.cancel=pe,me.flush=Ee,me}return gE=a,gE}var yE,fR;function cde(){if(fR)return yE;fR=1;var n=tG(),e=Jf(),t="Expected a function";function r(i,s,a){var o=!0,f=!0;if(typeof i!="function")throw new TypeError(t);return e(a)&&(o="leading"in a?!!a.leading:o,f="trailing"in a?!!a.trailing:f),n(i,s,{leading:o,maxWait:s,trailing:f})}return yE=r,yE}var qb={},pR;function dde(){return pR||(pR=1,Object.defineProperty(qb,"__esModule",{value:!0}),qb.calculateChange=function(e,t,r){var i=r.getBoundingClientRect(),s=i.width,a=i.height,o=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,f=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,y=o-(r.getBoundingClientRect().left+window.pageXOffset),x=f-(r.getBoundingClientRect().top+window.pageYOffset);y<0?y=0:y>s&&(y=s),x<0?x=0:x>a&&(x=a);var B=y/s,O=1-x/a;return{h:t.h,s:B,v:O,a:t.a,source:"hsv"}}),qb}var mR;function hde(){if(mR)return Z1;mR=1,Object.defineProperty(Z1,"__esModule",{value:!0}),Z1.Saturation=void 0;var n=function(){function j(N,q){for(var H=0;H<q.length;H++){var oe=q[H];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(N,oe.key,oe)}}return function(N,q,H){return q&&j(N.prototype,q),H&&j(N,H),N}}(),e=ja(),t=x(e),r=Pp(),i=x(r),s=cde(),a=x(s),o=dde(),f=y(o);function y(j){if(j&&j.__esModule)return j;var N={};if(j!=null)for(var q in j)Object.prototype.hasOwnProperty.call(j,q)&&(N[q]=j[q]);return N.default=j,N}function x(j)
Line truncated
|
||||
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:ne,white:$,black:te,pointer:G,circle:ie}},{custom:!!this.props.style});return t.default.createElement("div",{style:he.color,ref:function(Ee){return H.container=Ee},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},t.default.createElement("style",null,`
|
||||
.saturation-white {
|
||||
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
||||
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
||||
}
|
||||
.saturation-black {
|
||||
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
||||
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
||||
}
|
||||
`),t.default.createElement("div",{style:he.white,className:"saturation-white"},t.default.createElement("div",{style:he.black,className:"saturation-black"}),t.default.createElement("div",{style:he.pointer},this.props.pointer?t.default.createElement(this.props.pointer,this.props):t.default.createElement("div",{style:he.circle}))))}}]),N}(e.PureComponent||e.Component);return Z1.default=F,Z1}var X1={},Gd={},vE,gR;function fde(){if(gR)return vE;gR=1;var n=GW(),e=WW(),t=BW(),r=Af();function i(s,a){var o=r(s)?n:e;return o(s,t(a))}return vE=i,vE}var CE,yR;function pde(){return yR||(yR=1,CE=fde()),CE}var d2={exports:{}},mde=d2.exports,vR;function gde(){return vR||(vR=1,function(n,e){(function(t,r){n.exports=r()})(mde,function(){function t(Ue){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},t(Ue)}var r=/^\s+/,i=/\s+$/;function s(Ue,Pe){if(Ue=Ue||"",Pe=Pe||{},Ue instanceof s)return Ue;if(!(this instanceof s))return new s(Ue,Pe);var Be=a(Ue);this._originalInput=Ue,this._r=Be.r,this._g=Be.g,this._b=Be.b,this._a=Be.a,this._roundA=Math.round(100*this._a)/100,this._format=Pe.format||Be.format,this._gradientType=Pe.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=Be.ok}s.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Pe=this.toRgb();return(Pe.r*299+Pe.g*587+Pe.b*114)/1e3},getLuminance:function(){var Pe=this.toRgb(),Be,it,_t,ft,Ut,rn;return Be=Pe.r/255,it=Pe.g/255,_t=Pe.b/255,Be<=.03928?ft=Be/12.92:ft=Math.pow((Be+.055)/1.055,2.4),it<=.03928?Ut=it/12.92:Ut=Math.pow((it+.055)/1.055,2.4),_t<=.03928?rn=_t/12.92:rn=Math.pow((_t+.055)/1.055,2.4),.2126*ft+.7152*Ut+.0722*rn},setAlpha:function(Pe){return this._a=De(Pe),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var Pe=x(this._r,this._g,this._b);return{h:Pe.h*360,s:Pe.s,v:Pe.v,a:this._a}},toHsvString:function(){var Pe=x(this._r,this._g,this._b),Be=Math.round(Pe.h*360),it=Math.round(Pe.s*100),_t=Math.round(Pe.v*100);return this._a==1?"hsv("+Be+", "+it+"%, "+_t+"%)":"hsva("+Be+", "+it+"%, "+_t+"%, "+this._roundA+")"},toHsl:function(){var Pe=f(this._r,this._g,this._b);return{h:Pe.h*360,s:Pe.s,l:Pe.l,a:this._a}},toHslString:function(){var Pe=f(this._r,this._g,this._b),Be=Math.round(Pe.h*360),it=Math.round(Pe.s*100),_t=Math.round(Pe.l*100);return this._a==1?"hsl("+Be+", "+it+"%, "+_t+"%)":"hsla("+Be+", "+it+"%, "+_t+"%, "+this._roundA+")"},toHex:function(Pe){return O(this._r,this._g,this._b,Pe)},toHexString:function(Pe){return"#"+this.toHex(Pe)},toHex8:function(Pe){return T(this._r,this._g,this._b,this._a,Pe)},toHex8String:function(Pe){return"#"+this.toHex8(Pe)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(be(this._r,255)*100)+"%",g:Math.round(be(this._g,255)*100)+"%",b:Math.round(be(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(be(this._r,255)*100)+"%, "+Math.round(be(this._g,255)*100)+"%, "+Math.round(be(this._b,255)*100)+"%)":"rgba("+Math.round(be(this._r,255)*100)+"%, "+Math.round(be(this._g,255)*100)+"%, "+Math.round(be(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:me[O(this._r,this._g,this._b,!0)]||!1},toFilter:function(Pe){var Be="#"+F(this._r,this._g,this._b,this._a),it=Be,_t=this._gradientType?"GradientType = 1, ":"";if(Pe){var ft=s(Pe);it="#"+F(ft._r,ft._g,ft._b,ft._a)}return"progid:DXImageTransform.Microsoft.gradient("+_t+"startColorstr="+Be+",endColorstr="+it+")"},toString:function(Pe){var Be=!!Pe;Pe=Pe||this._format;var it=!1,_t=this._a<1&&this._a>=0,ft=!Be&&_t&&(Pe==="hex"||Pe==="hex6"||Pe==="hex3"||Pe==="hex4"||Pe==="hex8"||Pe==="name");return ft?Pe==="name"&&this._a===0?this.toName():this.toRgbString():(Pe==="rgb"&&(it=this.toRgbString()),Pe==="prgb"&&(it=this.toPercentageRgbString()),(Pe==="hex"||Pe==="hex6")&&(it=this.toHexString()),Pe==="hex3"&&(it=this.toHexString(!0)),Pe==="hex4"&&(it=this.toHex8String(!0)),Pe==="hex8"&&(it=this.toHex8String()),Pe==="name"&&(it=this.toName()),Pe==="hsl"&&(it=this.toHslString()),Pe==="hsv"&&(it=this.toHsvString()),it||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Pe,Be){var it=Pe.apply(nu
Line truncated
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>${t}</title>
|
||||
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
|
||||
<script src="https://unpkg.com/maplibre-gl@${YR}/dist/maplibre-gl.js"><\/script>
|
||||
<link href="https://unpkg.com/maplibre-gl@${YR}/dist/maplibre-gl.css" rel="stylesheet" />
|
||||
<style>
|
||||
body { margin: 0; padding: 0; }
|
||||
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<script>
|
||||
const map = new maplibregl.Map({
|
||||
container: 'map',
|
||||
style: ${e},
|
||||
});
|
||||
map.addControl(new maplibregl.NavigationControl());
|
||||
<\/script>
|
||||
</body>
|
||||
</html>
|
||||
`),i=(Qr().s[9]++,new Blob([r],{type:"text/html;charset=utf-8"})),s=(Qr().s[10]++,this.exportName());Qr().s[11]++,qR.saveAs(i,s+".html")}async saveStyle(){Qr().f[3]++;const e=(Qr().s[12]++,this.tokenizedStyle());if(Qr().s[13]++,$R)Qr().b[2][1]++;else{Qr().b[2][0]++;const i=(Qr().s[14]++,new Blob([e],{type:"application/json;charset=utf-8"})),s=(Qr().s[15]++,this.exportName());Qr().s[16]++,qR.saveAs(i,s+".json"),Qr().s[17]++;return}let t=(Qr().s[18]++,this.props.fileHandle);if(Qr().s[19]++,t==null)if(Qr().b[3][0]++,Qr().s[20]++,t=await this.createFileHandle(),Qr().s[21]++,this.props.onSetFileHandle(t),Qr().s[22]++,t==null){Qr().b[4][0]++,Qr().s[23]++;return}else Qr().b[4][1]++;else Qr().b[3][1]++;const r=(Qr().s[24]++,await t.createWritable());Qr().s[25]++,await r.write(e),Qr().s[26]++,await r.close(),Qr().s[27]++,this.props.onOpenToggle()}async saveStyleAs(){Qr().f[4]++;const e=(Qr().s[28]++,this.tokenizedStyle()),t=(Qr().s[29]++,await this.createFileHandle());if(Qr().s[30]++,this.props.onSetFileHandle(t),Qr().s[31]++,t==null){Qr().b[5][0]++,Qr().s[32]++;return}else Qr().b[5][1]++;const r=(Qr().s[33]++,await t.createWritable());Qr().s[34]++,await r.write(e),Qr().s[35]++,await r.close(),Qr().s[36]++,this.props.onOpenToggle()}async createFileHandle(){Qr().f[5]++;const e=(Qr().s[37]++,{types:[{description:"json",accept:{"application/json":[".json"]}}],suggestedName:this.exportName()}),t=(Qr().s[38]++,await window.showSaveFilePicker(e));return Qr().s[39]++,this.props.onSetFileHandle(t),Qr().s[40]++,t}changeMetadataProperty(e,t){Qr().f[6]++;const r=(Qr().s[41]++,{...this.props.mapStyle,metadata:{...this.props.mapStyle.metadata,[e]:t}});Qr().s[42]++,this.props.onStyleChanged(r)}render(){Qr().f[7]++;const e=(Qr().s[43]++,this.props.t),t=(Qr().s[44]++,vG(e));return Qr().s[45]++,ue.jsx(X0,{"data-wd-key":"modal:export",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Save Style"),className:"maputnik-export-modal",children:ue.jsxs("section",{className:"maputnik-modal-section",children:[ue.jsx("h1",{children:e("Save Style")}),ue.jsx("p",{children:e("Save the JSON style to your computer.")}),ue.jsxs("div",{children:[ue.jsx(Jp,{label:t.maputnik.maptiler_access_token.label,fieldSpec:t.maputnik.maptiler_access_token,value:(Qr().b[6][0]++,this.props.mapStyle.metadata||(Qr().b[6][1]++,{}))["maputnik:openmaptiles_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:openmaptiles_access_token")}),ue.jsx(Jp,{label:t.maputnik.thunderforest_access_token.label,fieldSpec:t.maputnik.thunderforest_access_token,value:(Qr().b[7][0]++,this.props.mapStyle.metadata||(Qr().b[7][1]++,{}))["maputnik:thunderforest_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:thunderforest_access_token")}),ue.jsx(Jp,{label:t.maputnik.stadia_access_token.label,fieldSpec:t.maputnik.stadia_access_token,value:(Qr().b[8][0]++,this.props.mapStyle.metadata||(Qr().b[8][1]++,{}))["maputnik:stadia_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:stadia_access_token")})]}),ue.jsxs("div",{className:"maputnik-modal-export-buttons",children:[ue.jsxs(el,{onClick:this.saveStyle.bind(this),children:[ue.jsx(q6,{}),e("Save")]}),(Qr().b[9][0]++,$R&&(Qr().b[9][1]++,ue.jsxs(el,{onClick:this.saveStyleAs.bind(this),children:[ue.jsx(q6,{}),e("Save as")]}))),ue.jsxs(el,{onClick:this.createHtml.bind(this),children:[ue.jsx(zZ,{}),e("Create HTML")]})]})]})})}}const _fe=(Qr().s[46]++,Ws()(Cfe));function Mx(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",e="950dd35e62562a3439b74678b95f406e749c6958",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:139}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx"],names:[],mappings:"AAWM;AAXN,OAAO,WAAW;AAClB,OAAO,uBAA2E;AAClF,OAAO,cAAc;AAMrB,qBAAqB,0BAA0B,MAAM,UAAkC;AAAA,EACrF,SAAS;AACP,WAAO,oBAAC,YAAS,OAAO,KAAK,MAAM,OACjC,8BAAC,qBAAmB,GAAG,KAAK,OAAO,GACrC;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"950dd35e62562a3439b74678b95f406e749c6958"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Mx=function(){return a},a}Mx();class xG extends nr.Component{render(){return Mx().f[0]++,Mx().s[0]++,ue.jsx(n_,{label:this.props.label,children:ue.jsx(aG,{...this.props})})}}function Sx(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",e="a27c35e986d22656fa80c276efb67df518853ac2",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:132}}},fnMap:{0:{name:"(anonymous_0)",decl:{s
Line truncated
|
||||
`)>=0)return!1;return!0}function Ht(Oe,se){var ve;if(Oe.indent===" ")ve=" ";else if(typeof Oe.indent=="number"&&Oe.indent>0)ve=ie.call(Array(Oe.indent+1)," ");else return null;return{base:ve,prev:ie.call(Array(se+1),ve)}}function sn(Oe,se){if(Oe.length===0)return"";var ve=`
|
||||
`+se.prev+se.base;return ve+ie.call(Oe,","+ve)+`
|
||||
`+se.prev}function tr(Oe,se){var ve=Lt(Oe),p=[];if(ve){p.length=Oe.length;for(var Ne=0;Ne<Oe.length;Ne++)p[Ne]=Dt(Oe,Ne)?se(Oe[Ne],Oe):""}var Ye=typeof me=="function"?me(Oe):[],rt;if(De){rt={};for(var ct=0;ct<Ye.length;ct++)rt["$"+Ye[ct]]=Ye[ct]}for(var dt in Oe)Dt(Oe,dt)&&(ve&&String(Number(dt))===dt&&dt<Oe.length||De&&rt["$"+dt]instanceof Symbol||(te.call(/[^\w$]/,dt)?p.push(se(dt,Oe)+": "+se(Oe[dt],Oe)):p.push(dt+": "+se(Oe[dt],Oe))));if(typeof me=="function")for(var qt=0;qt<Ye.length;qt++)at.call(Oe,Ye[qt])&&p.push("["+se(Ye[qt])+"]: "+se(Oe[Ye[qt]],Oe));return p}return BE}var OE,tF;function rpe(){if(tF)return OE;tF=1;var n=N3(),e=pv(),t=function(o,f,y){for(var x=o,B;(B=x.next)!=null;x=B)if(B.key===f)return x.next=B.next,y||(B.next=o.next,o.next=B),B},r=function(o,f){if(o){var y=t(o,f);return y&&y.value}},i=function(o,f,y){var x=t(o,f);x?x.value=y:o.next={key:f,next:o.next,value:y}},s=function(o,f){return o?!!t(o,f):!1},a=function(o,f){if(o)return t(o,f,!0)};return OE=function(){var f,y={assert:function(x){if(!y.has(x))throw new e("Side channel does not contain "+n(x))},delete:function(x){var B=f&&f.next,O=a(f,x);return O&&B&&B===O&&(f=void 0),!!O},get:function(x){return r(f,x)},has:function(x){return s(f,x)},set:function(x,B){f||(f={next:void 0}),i(f,x,B)}};return y},OE}var IE,nF;function BG(){return nF||(nF=1,IE=Object),IE}var kE,rF;function ipe(){return rF||(rF=1,kE=Error),kE}var TE,iF;function ope(){return iF||(iF=1,TE=EvalError),TE}var PE,oF;function spe(){return oF||(oF=1,PE=RangeError),PE}var KE,sF;function ape(){return sF||(sF=1,KE=ReferenceError),KE}var DE,aF;function lpe(){return aF||(aF=1,DE=SyntaxError),DE}var RE,lF;function upe(){return lF||(lF=1,RE=URIError),RE}var FE,uF;function Ape(){return uF||(uF=1,FE=Math.abs),FE}var LE,AF;function cpe(){return AF||(AF=1,LE=Math.floor),LE}var UE,cF;function dpe(){return cF||(cF=1,UE=Math.max),UE}var zE,dF;function hpe(){return dF||(dF=1,zE=Math.min),zE}var jE,hF;function fpe(){return hF||(hF=1,jE=Math.pow),jE}var NE,fF;function ppe(){return fF||(fF=1,NE=Math.round),NE}var WE,pF;function mpe(){return pF||(pF=1,WE=Number.isNaN||function(e){return e!==e}),WE}var GE,mF;function gpe(){if(mF)return GE;mF=1;var n=mpe();return GE=function(t){return n(t)||t===0?t:t<0?-1:1},GE}var QE,gF;function ype(){return gF||(gF=1,QE=Object.getOwnPropertyDescriptor),QE}var qE,yF;function OG(){if(yF)return qE;yF=1;var n=ype();if(n)try{n([],"length")}catch{n=null}return qE=n,qE}var YE,vF;function vpe(){if(vF)return YE;vF=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return YE=n,YE}var $E,CF;function Cpe(){return CF||(CF=1,$E=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0}),$E}var VE,_F;function _pe(){if(_F)return VE;_F=1;var n=typeof Symbol<"u"&&Symbol,e=Cpe();return VE=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},VE}var HE,bF;function IG(){return bF||(bF=1,HE=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),HE}var ZE,xF;function kG(){if(xF)return ZE;xF=1;var n=BG();return ZE=n.getPrototypeOf||null,ZE}var XE,wF;function bpe(){if(wF)return XE;wF=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,r="[object Function]",i=function(f,y){for(var x=[],B=0;B<f.length;B+=1)x[B]=f[B];for(var O=0;O<y.length;O+=1)x[O+f.length]=y[O];return x},s=function(f,y){for(var x=[],B=y,O=0;B<f.length;B+=1,O+=1)x[O]=f[B];return x},a=function(o,f){for(var y="",x=0;x<o.length;x+=1)y+=o[x],x+1<o.length&&(y+=f);return y};return XE=function(f){var y=this;if(typeof y!="function"||e.apply(y)!==r)throw new TypeError(n+y);for(var x=s(arguments,1),B,O=function(){if(this instanceof B){var q=y.apply(this,i(x,arguments));return Object(q)===q?q:this}return y.apply(f,i(x,arguments))},T=t(0,y.length-x.length),F=[],j=0;j<T;j++)F[j]="$"+j;if(B=Function("binder","return function ("+a(F,",")+"){ return binder.apply(this,arguments); }")(O),y.prototype){var N=function(){};N.prototype=y.prototype,B.prototype=new N,N.prototype=null}return B},XE}var JE,MF;function W3(){if(MF)return JE;MF=1;var n=bpe();return JE=Function.prototype.bind||n,JE}var e6,SF;function v7(){return SF||(SF=1,e6=Function.prototype.call),e6}var t6,EF;function T
Line truncated
|
||||
`," "],a=["{","}","|","\\","^","`"].concat(s),o=["'"].concat(a),f=["%","/","?",";","#"].concat(o),y=["/","?","#"],x=255,B=/^[+a-z0-9A-Z_-]{0,63}$/,O=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,T={javascript:!0,"javascript:":!0},F={javascript:!0,"javascript:":!0},j={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=Tpe();function q($,te,G){if($&&typeof $=="object"&&$ instanceof e)return $;var ie=new e;return ie.parse($,te,G),ie}e.prototype.parse=function($,te,G){if(typeof $!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof $);var ie=$.indexOf("?"),he=ie!==-1&&ie<$.indexOf("#")?"?":"#",pe=$.split(he),Ee=/\\/g;pe[0]=pe[0].replace(Ee,"/"),$=pe.join(he);var me=$;if(me=me.trim(),!G&&$.split("#").length===1){var Se=i.exec(me);if(Se)return this.path=me,this.href=me,this.pathname=Se[1],Se[2]?(this.search=Se[2],te?this.query=N.parse(this.search.substr(1)):this.query=this.search.substr(1)):te&&(this.search="",this.query={}),this}var De=t.exec(me);if(De){De=De[0];var be=De.toLowerCase();this.protocol=be,me=me.substr(De.length)}if(G||De||me.match(/^\/\/[^@/]+@[^@/]+/)){var at=me.substr(0,2)==="//";at&&!(De&&F[De])&&(me=me.substr(2),this.slashes=!0)}if(!F[De]&&(at||De&&!j[De])){for(var Ze=-1,Je=0;Je<y.length;Je++){var We=me.indexOf(y[Je]);We!==-1&&(Ze===-1||We<Ze)&&(Ze=We)}var Me,Fe;Ze===-1?Fe=me.lastIndexOf("@"):Fe=me.lastIndexOf("@",Ze),Fe!==-1&&(Me=me.slice(0,Fe),me=me.slice(Fe+1),this.auth=decodeURIComponent(Me)),Ze=-1;for(var Je=0;Je<f.length;Je++){var We=me.indexOf(f[Je]);We!==-1&&(Ze===-1||We<Ze)&&(Ze=We)}Ze===-1&&(Ze=me.length),this.host=me.slice(0,Ze),me=me.slice(Ze),this.parseHost(),this.hostname=this.hostname||"";var He=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!He)for(var bt=this.hostname.split(/\./),Je=0,Yt=bt.length;Je<Yt;Je++){var gt=bt[Je];if(gt&&!gt.match(B)){for(var Lt="",Kt=0,Ue=gt.length;Kt<Ue;Kt++)gt.charCodeAt(Kt)>127?Lt+="x":Lt+=gt[Kt];if(!Lt.match(B)){var Pe=bt.slice(0,Je),Be=bt.slice(Je+1),it=gt.match(O);it&&(Pe.push(it[1]),Be.unshift(it[2])),Be.length&&(me="/"+Be.join(".")+me),this.hostname=Pe.join(".");break}}}this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),He||(this.hostname=n.toASCII(this.hostname));var _t=this.port?":"+this.port:"",ft=this.hostname||"";this.host=ft+_t,this.href+=this.host,He&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),me[0]!=="/"&&(me="/"+me))}if(!T[be])for(var Je=0,Yt=o.length;Je<Yt;Je++){var Ut=o[Je];if(me.indexOf(Ut)!==-1){var rn=encodeURIComponent(Ut);rn===Ut&&(rn=escape(Ut)),me=me.split(Ut).join(rn)}}var Dt=me.indexOf("#");Dt!==-1&&(this.hash=me.substr(Dt),me=me.slice(0,Dt));var _n=me.indexOf("?");if(_n!==-1?(this.search=me.substr(_n),this.query=me.substr(_n+1),te&&(this.query=N.parse(this.query)),me=me.slice(0,_n)):te&&(this.search="",this.query={}),me&&(this.pathname=me),j[be]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _t=this.pathname||"",qn=this.search||"";this.path=_t+qn}return this.href=this.format(),this};function H($){return typeof $=="string"&&($=q($)),$ instanceof e?$.format():e.prototype.format.call($)}e.prototype.format=function(){var $=this.auth||"";$&&($=encodeURIComponent($),$=$.replace(/%3A/i,":"),$+="@");var te=this.protocol||"",G=this.pathname||"",ie=this.hash||"",he=!1,pe="";this.host?he=$+this.host:this.hostname&&(he=$+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(he+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(pe=N.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var Ee=this.search||pe&&"?"+pe||"";return te&&te.substr(-1)!==":"&&(te+=":"),this.slashes||(!te||j[te])&&he!==!1?(he="//"+(he||""),G&&G.charAt(0)!=="/"&&(G="/"+G)):he||(he=""),ie&&ie.charAt(0)!=="#"&&(ie="#"+ie),Ee&&Ee.charAt(0)!=="?"&&(Ee="?"+Ee),G=G.replace(/[?#]/g,function(me){return encodeURIComponent(me)}),Ee=Ee.replace("#","%23"),te+he+G+Ee+ie};function oe($,te){return q($,!1,!0).resolve(te)}e.prototype.resolve=function($){return this.resolveObject(q($,!1,!0)).format()};function ne($,te){return $?q($,!1,!0).resolveObject(te):te}return e.prototype.resolveObject=function($){if(typeof $=="string"){var te=new e;te.parse($,!1,!0),$=te}for(var G=new e,ie=Object.keys(this),he=0;he<ie.length;he++){var pe=ie[he];G[pe]=this[pe]}if(G.hash=$.hash,$.href==="")return G.href=G.format(),G;if($.slashes&&!$.protocol){for(var Ee=Object.keys($),me=0;me<Ee.length;me++){var Se=Ee[me];Se!=="protocol"&&(G[Se]=$[Se])}return j[G.protocol]&&G.hostname&&!G.pathname&&(G.pathname="/",G.path=G.pathname),G.href=G.format(),G}if($.protocol&&$.protocol!==G.protocol){if(!j[$.protocol]){for(var De=Object.keys($),be=0;be<De.length;be++){var at=De[be];G[at]=$[at]}return G.href=G.format(),G}if(G.protocol=$.protocol,!$.host&&!F[$.protocol]){for(var Yt=($.pathname||"").split("/");Yt.length&&!($.host=Yt.shift()););$.host||($.host=""),$.hostname
Line truncated
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */var NB=function(n,e){return NB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])},NB(n,e)};function NG(n,e){NB(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Wpe(n){var e=typeof Symbol=="function"&&n[Symbol.iterator],t=0;return e?e.call(n):{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}function Gpe(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(a)throw a.error}}return s}function Qpe(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(Gpe(arguments[e]));return n}var WG=function(){function n(e,t){this.target=t,this.type=e}return n}(),qpe=function(n){NG(e,n);function e(t,r){var i=n.call(this,"error",r)||this;return i.message=t.message,i.error=t,i}return e}(WG),Ype=function(n){NG(e,n);function e(t,r,i){t===void 0&&(t=1e3),r===void 0&&(r="");var s=n.call(this,"close",i)||this;return s.wasClean=!0,s.code=t,s.reason=r,s}return e}(WG);/*!
|
||||
* Reconnecting WebSocket
|
||||
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
||||
* https://github.com/pladaria/reconnecting-websocket
|
||||
* License MIT
|
||||
*/var $pe=function(){if(typeof WebSocket<"u")return WebSocket},Vpe=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},Mg={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},Hpe=function(){function n(e,t,r){var i=this;r===void 0&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(s){i._debug("open event");var a=i._options.minUptime,o=a===void 0?Mg.minUptime:a;clearTimeout(i._connectTimeout),i._uptimeTimeout=setTimeout(function(){return i._acceptOpen()},o),i._ws.binaryType=i._binaryType,i._messageQueue.forEach(function(f){return i._ws.send(f)}),i._messageQueue=[],i.onopen&&i.onopen(s),i._listeners.open.forEach(function(f){return i._callEventListener(s,f)})},this._handleMessage=function(s){i._debug("message event"),i.onmessage&&i.onmessage(s),i._listeners.message.forEach(function(a){return i._callEventListener(s,a)})},this._handleError=function(s){i._debug("error event",s.message),i._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),i.onerror&&i.onerror(s),i._debug("exec error listeners"),i._listeners.error.forEach(function(a){return i._callEventListener(s,a)}),i._connect()},this._handleClose=function(s){i._debug("close event"),i._clearTimeouts(),i._shouldReconnect&&i._connect(),i.onclose&&i.onclose(s),i._listeners.close.forEach(function(a){return i._callEventListener(s,a)})},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,r){return typeof r=="string"?t+=r.length:r instanceof Blob?t+=r.size:t+=r.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=t===void 0?Mg.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,r,i=this._listeners[e.type];if(i)try{for(var s=Wpe(i),a=s.next();!a.done;a=s.next()){var o=a.value;this._callEventListener(e,o)}}catch(f){t={error:f}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListeneLine truncated
|
||||
//# sourceMappingURL=index-Cb9Aytjl.js.map
|
||||
+1
-1
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="module" crossorigin src="/maputnik/assets/index-Cb9Aytjl.js"></script>
|
||||
<script type="module" crossorigin src="/maputnik/assets/index-CKBjFUTc.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/maputnik/assets/index-I32O4J7u.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in new issue
Block a user