chore(deps): update dependency maplibre-gl to v6.16.0
CI / check (push) Successful in 17s
CI / deploy (push) Skipped
CI / check (pull_request) Successful in 16s
CI / deploy (pull_request) Skipped

This commit is contained in:
randy committed 2026-11-03 16:44:51 +00:00
1 parent 50ecc00aef
commit 9f7dd1076a
6 files changed
+121 -89

No files matched your search

+6 -2
View File
@@ -1,6 +1,10 @@
/**
* MapLibre GL JS
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.6.0/LICENSE.txt
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.16.0/LICENSE.txt
*/
import{B as e,Br as t,D as n,Dt as r,Ht as i,I as a,In as o,K as s,Mn as c,On as l,Ot as u,P as d,Pn as f,S as p,Sr as m,U as h,Vi as g,Vn as _,W as v,Wr as y,ar as b,bn as x,br as S,c as C,d as w,dt as T,g as E,hn as D,hr as O,ht as ee,i as k,kn as A,l as j,m as M,n as N,nn as P,o as F,on as I,p as L,pr as R,rn as z,sr as B,x as V,xt as H,yn as U,zn as W}from"./maplibre-gl-shared.mjs";var G=class{constructor(e,t){this.keyCache={},e&&this.replace(e,t)}replace(e,t){this._layerConfigs={},this._layers={},this.update(e,[],t)}update(e,t,n){for(let t of e){this._layerConfigs[t.id]=t;let e=this._layers[t.id]=p(t,n);e._featureFilter=U(e.filter,`layers[${t.id}].filter`,n),this.keyCache[t.id]&&delete this.keyCache[t.id]}for(let e of t)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};let r=x(Object.values(this._layerConfigs),this.keyCache);for(let e of r){let t=e.map(e=>this._layers[e.id]),n=t[0];if(n.isHidden())continue;let r=n.source||``,i=this.familiesBySource[r];i||=this.familiesBySource[r]={};let a=n.sourceLayer||`_geojsonTileLayer`,o=i[a];o||=i[a]=[],o.push(t)}}},K=class{constructor(e){let t={},n=[];for(let r in e){let i=e[r],a=t[r]={};for(let e in i){let t=i[+e];if(!t||t.bitmap.width===0||t.bitmap.height===0)continue;let r={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};n.push(r),a[e]={rect:r,metrics:t.metrics}}}let{w:i,h:o}=a(n),s=new r({width:i||1,height:o||1});for(let n in e){let i=e[n];for(let e in i){let a=i[+e];if(!a||a.bitmap.width===0||a.bitmap.height===0)continue;let o=t[n][e].rect;r.copy(a.bitmap,s,{x:0,y:0},{x:o.x+1,y:o.y+1},a.bitmap)}}this.image=s,this.positions=t}};I(`GlyphAtlas`,K);var q=class{constructor(e){this.tileID=new E(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId,this.inFlightDependencies=[]}async parse(e,r,a,o,c){this.data=e,this.collisionBoxArray=new i;let l=new w(Object.keys(e.layers).sort()),u=new C(this.tileID,this.promoteId);u.bucketLayerIDs=[];let f={},p={featureIndex:u,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:a,subdivisionGranularity:c},g=r.familiesBySource[this.source];for(let n in g){let r=e.layers[n];if(!r)continue;r.version===1&&t(`Vector tile source "${this.source}" layer "${n}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let i=l.encode(n),o=[];for(let e=0;e<r.length;e++){let t=r.feature(e),a=u.getId(t,n);o.push({feature:t,id:a,index:e,sourceLayerIndex:i})}for(let e of g[n]){let n=e[0];n.source!==this.source&&t(`layer.source = ${n.source} does not equal this.source = ${this.source}`),!n.isHidden(this.zoom,!0)&&(J(e,this.zoom,a),(f[n.id]=n.createBucket({index:u.bucketLayerIDs.length,layers:e,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:i,sourceID:this.source})).populate(o,p,this.tileID.canonical),u.bucketLayerIDs.push(e.map(e=>e.id)))}}let _=m(p.glyphDependencies,e=>Object.keys(e).map(Number));for(let e of this.inFlightDependencies)e?.abort();this.inFlightDependencies=[];let v=Promise.resolve({});if(Object.keys(_).length){let e=new AbortController;this.inFlightDependencies.push(e),v=o.sendAsync({type:`GG`,data:{stacks:_,source:this.source,tileID:this.tileID,type:`glyphs`}},e)}let y=Object.keys(p.iconDependencies),b=Promise.resolve({});if(y.length){let e=new AbortController;this.inFlightDependencies.push(e),b=o.sendAsync({type:`GI`,data:{icons:y,source:this.source,tileID:this.tileID,type:`icons`}},e)}let x=Object.keys(p.patternDependencies),S=Promise.resolve({});if(x.length){let e=new AbortController;this.inFlightDependencies.push(e),S=o.sendAsync({type:`GI`,data:{icons:x,source:this.source,tileID:this.tileID,type:`patterns`}},e)}let T=p.dashDependencies,E=Promise.resolve({});if(Object.keys(T).length){let e=new AbortController;this.inFlightDependencies.push(e),E=o.sendAsync({type:`GDA`,data:{dashes:T}},e)}let[D,O,k,A]=await Promise.all([v,b,S,E]),j=new K(D),M=new d(O,k);for(let e in f){let t=f[e];t instanceof n?(J(t.layers,this.zoom,a),N({bucket:t,glyphMap:D,glyphPositions:j.positions,imageMap:O,imagePositions:M.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:p.subdivisionGranularity})):t.hasDependencies&&(t instanceof ee||t instanceof s||t instanceof h)&&(J(t.layers,this.zoom,a),t.addFeatures(p,this.tileID.canonical,M.patternPositions,A))}return{buckets:Object.values(f).filter(e=>!e.isEmpty()),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:j.image,imageAtlas:M,dashPositions:A,glyphMap:thisLine truncated
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));function l(e,t){this.x=e,this.y=t}l.prototype={clone(){return new l(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,i=n*this.x+t*this.y;return this.x=r,this.y=i,this},_rotateAround(e,t){let n=Math.cos(e),r=Math.sin(e),i=t.x+n*(this.x-t.x)-r*(this.y-t.y),a=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=i,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:l},l.convert=function(e){if(e instanceof l)return e;if(Array.isArray(e))return new l(+e[0],+e[1]);if(e.x!==void 0&&e.y!==void 0)return new l(+e.x,+e.y);throw Error(`Expected [x, y] or {x, y} point format`)};function u(e,t,n,r){let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c;return function(e,t=1e-6){if(e<=0)return 0;if(e>=1)return 1;let n=e;for(let r=0;r<8;r++){let r=((o*n+a)*n+i)*n-e;if(Math.abs(r)<t)return((l*n+c)*n+s)*n;let u=(3*o*n+2*a)*n+i;if(Math.abs(u)<1e-6)break;n-=r/u}let r=0,u=1;n=e;for(let s=0;s<20;s++){let s=((o*n+a)*n+i)*n;if(Math.abs(s-e)<t)break;e>s?r=n:u=n,n=(r+u)*.5}return((l*n+c)*n+s)*n}}let d;function f(){return d??=typeof OffscreenCanvas<`u`&&!!new OffscreenCanvas(1,1).getContext(`2d`)&&typeof createImageBitmap==`function`,d}let p;function m(){if(p==null&&(p=!1,f())){let e=new OffscreenCanvas(5,5).getContext(`2d`,{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let n=t*4;e.fillStyle=`rgb(${n},${n+1},${n+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){p=!0;break}}}return p||!1}var h=typeof Float32Array<`u`?Float32Array:Array;function g(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function _(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,e}(function(){var e=g();return function(t,n,r,i,a,o){var s,c;for(n||=4,r||=0,c=i?Math.min(i*n+r,t.length):t.length,s=r;s<c;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}})();const v=8192;function y(e){return e instanceof Error?e:Error(typeof e==`string`?e:String(e))}function b(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function x(e,t,n,r){return u(e,t,n,r)}x(.25,.1,.25,1);function S(e,t,n){return Math.min(n,Math.max(t,e))}function C(e,t,n){let r=n-t,i=((e-t)%r+r)%r+t;return i===t?n:i}function w(e,...t){for(let n of t)for(let t in n)e[t]=n[t];return e}function T(e){return Math.log(e)/Math.LN2%1==0}function E(e,t,n){let r={};for(let i in e)r[i]=t.call(n||this,e[i],i,e);return r}function D(e,t,n){let r={};for(let i in e)t.call(n||this,e[i],i,e)&&(r[i]=e[i]);return r}function O(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!O(e[n],t[n]))return!1;return!0}if(typeof e==`object`&&e&&t!==null){if(typeof t!=`object`||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(Line truncated
/* @vite-ignore */
e);return}let t=await fetch(e,{credentials:`same-origin`});if(!t.ok)throw Error(`Failed to load ${e}: ${t.status}`);let n=await t.text();if(/^[ \t]*(import|export)\s/m.test(n)){let e=URL.createObjectURL(new Blob([n],{type:`text/javascript`}));try{await import(
/* @vite-ignore */
e)}finally{URL.revokeObjectURL(e)}}else globalThis.eval(n)}var dC=class{constructor(e){this.self=e,this.actor=new _o(e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=/* @__PURE__ */ new Map,this.importedScripts=/* @__PURE__ */ new Map,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=Xa,this.self.removeProtocol=Za,this.self.registerRTLTextPlugin=e=>{Zp.setMethods(e)},this.self.makeRequest=io,this.self.setProjectionHandler=tC,this.actor.registerMessageHandler(`LDT`,(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler(`RDT`,async(e,t)=>{this._getDEMWorkerSource(e,t.source).removeTile(t)}),this.actor.registerMessageHandler(`GCEZ`,async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterExpansionZoom(t)),this.actor.registerMessageHandler(`GCC`,async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterChildren(t)),this.actor.registerMessageHandler(`GCL`,async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterLeaves(t)),this.actor.registerMessageHandler(`LD`,(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler(`LT`,(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler(`RT`,(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler(`AT`,(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler(`RMT`,(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler(`RS`,async(e,t)=>{if(!this.workerSources[e]?.[t.type]?.[t.source])return;let n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],n.removeSource!==void 0&&n.removeSource(t)}),this.actor.registerMessageHandler(`RM`,async e=>{delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)}),this.actor.registerMessageHandler(`SR`,async(e,t)=>{this.referrer=t}),this.actor.registerMessageHandler(`PI`,async()=>{}),this.actor.registerMessageHandler(`SRPS`,(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler(`IS`,(e,t)=>this._importScript(t)),this.actor.registerMessageHandler(`SI`,(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler(`UL`,async(e,t)=>{this._getLayerIndex(e).update(t.layers,t.removedIds,this._getGlobalState(e))}),this.actor.registerMessageHandler(`UGS`,async(e,t)=>{let n=this._getGlobalState(e);for(let e in t)n[e]=t[e]}),this.actor.registerMessageHandler(`SL`,async(e,t)=>{this._getLayerIndex(e).replace(t,this._getGlobalState(e))})}async _importScript(e){let t=this.importedScripts.get(e);if(t)return t;let n=uC(e);this.importedScripts.set(e,n);try{await n}catch(t){throw this.importedScripts.delete(e),t}}_getGlobalState(e){let t=this.globalStates.get(e);return t||(t={},this.globalStates.set(e,t)),t}async _setImages(e,t){this.availableImages[e]=t;for(let n in this.workerSources[e]){let r=this.workerSources[e][n];for(let e in r)r[e].availableImages=t}}async _syncRTLPluginState(e,t){return await Zp.syncState(t,e=>this._importScript(e))}_getAvailableImages(e){let t=this.availableImages[e];return t||=[],t}_getLayerIndex(e){let t=this.layerIndexes[e];return t||=this.layerIndexes[e]=new AS,t}_getWorkerSource(e,t,n){if(this.workerSources[e]||={},this.workerSources[e][t]||={},!this.workerSources[e][t][n]){let r={sendAsync:(t,n)=>(t.targetMapId=e,this.actor.sendAsync(t,n))};switch(t){case`vector`:this.workerSources[e][t][n]=new JS(r,this._getLayerIndex(e),this._getAvailableImages(e));break;case`geojson`:this.workerSources[e][t][n]=new sC(r,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][n]=new this.externalWorkerSourceTypes[t](r,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][n]}_getDEMWorkerSource(e,t){return this.demWorkerSources[e]||={},this.demWorkerSources[e][t]||=new YS,this.demWorkerSources[e][t]}};te(self)&&(self.worker=new dC(self));export{dC as default};
//# sourceMappingURL=maplibre-gl-worker.mjs.map