@mapvx/web-components 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/KTX2Loader-CNSoekFo.cjs +1 -5
- package/dist/cjs/{base-floor-selector-CbSa9Qw2.cjs → base-floor-selector-6B_D7uUw.cjs} +2 -2
- package/dist/cjs/{class-map-DQkA5L7H.cjs → class-map-CfJw8pY6.cjs} +2 -2
- package/dist/cjs/{compact-floor-selector-C_LgJzzv.cjs → compact-floor-selector-CPK6sXBk.cjs} +2 -2
- package/dist/cjs/{consume-D1MFwxfA.cjs → consume-B4K_oiFc.cjs} +2 -2
- package/dist/cjs/{custom-map-CsX48Rua.cjs → custom-map-CfhrBuF7.cjs} +3 -3
- package/dist/cjs/floor-selector-rW48Tktb.cjs +15 -0
- package/dist/cjs/{geojson-layer-BWursA41.cjs → geojson-layer-wtQbiowp.cjs} +2 -2
- package/dist/cjs/{index-OWjqDH0W.cjs → index-BAYbrXBp.cjs} +2 -2
- package/dist/cjs/{index-D4uHh_zx.cjs → index-DAac9HVL.cjs} +2 -2
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/map-view-with-modal.cjs +1 -1
- package/dist/cjs/{qr-modal-DAjokbee.cjs → qr-modal-fSPvpyzj.cjs} +2 -2
- package/dist/cjs/{route-options-BW6OJ8pz.cjs → route-options-BjMH6A43.cjs} +2 -2
- package/dist/cjs/route-view-totems.cjs +1 -5
- package/dist/cjs/{sdk-controller-BcvviQ36.cjs → sdk-controller-5LmYQQhJ.cjs} +3 -3
- package/dist/es/assets/{compact-floor-selector-DM0rj7tE.js → compact-floor-selector-WL6DewCc.js} +2 -2
- package/dist/es/assets/{components-iq1KFC9T.js → components-BfTs1Lia.js} +9 -9
- package/dist/es/assets/{geojson-layer-BXJPA2B2.js → geojson-layer-CeMb7DTQ.js} +2 -2
- package/dist/es/assets/globe-viewport-CFdegSgy.js +4 -0
- package/dist/es/assets/{index-BV0wWAyE.js → index-D4Krpv5a.js} +2 -2
- package/dist/es/assets/{index-Bp1QRPSH.js → index-wdE7uK4l.js} +2 -6
- package/dist/es/assets/{map-view-with-modal-KAG4NGbk.js → map-view-with-modal-JYZY7d5R.js} +2 -2
- package/dist/es/assets/{route-view-totems-BHOMtYE0.js → route-view-totems-Dvggb-ZM.js} +4 -4
- package/dist/es/assets/{utils-BMph9fmy.js → utils-B4ksZYyJ.js} +3 -3
- package/dist/es/index.js +1 -1
- package/dist/es/route-view-totems.js +1 -1
- package/dist/iife/map-view-with-modal.js +2 -2
- package/dist/iife/route-view-totems.js +20 -20
- package/package.json +1 -1
- package/dist/cjs/floor-selector-DiJexma4.cjs +0 -15
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3dac4482-5950-5e92-9c7b-841ba519447f")}catch(e){}}();
|
|
1
3
|
import{i as t,a as e,V as n,M as a,f as i,b as r,c as o,P as s,s as u,d as c,l as g,e as h,t as m,g as f}from"./webgl-developer-tools-DVr-vTMm.js";const l=globalThis.loaders?.parseImageNode,d="undefined"!=typeof Image,p="undefined"!=typeof ImageBitmap,w=Boolean(l),y=!!t||w;function b(t){const e=function(t){if("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap)return"imagebitmap";if("undefined"!=typeof Image&&t instanceof Image)return"image";if(t&&"object"==typeof t&&t.data&&t.width&&t.height)return"data";return null}(t);if(!e)throw new Error("Not an image");return e}function M(t){switch(b(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),n=e.getContext("2d");if(!n)throw new Error("getImageData");return e.width=t.width,e.height=t.height,n.drawImage(t,0,0),n.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}const U=/^data:image\/svg\+xml/,I=/\.svg((\?|#).*)?$/;function v(t){return t&&(U.test(t)||I.test(t))}function j(t,e){if(v(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function P(t,e,n){const a=function(t,e){if(v(e)){let e=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(n){throw new Error(n.message)}return`data:image/svg+xml;base64,${btoa(e)}`}return j(t,e)}(t,n),i=self.URL||self.webkitURL,r="string"!=typeof a&&i.createObjectURL(a);try{return await async function(t,e){const n=new Image;if(n.src=t,e.image&&e.image.decode&&n.decode)return await n.decode(),n;return await new Promise((t,e)=>{try{n.onload=()=>t(n),n.onerror=t=>{const n=t instanceof Error?t.message:"error";e(new Error(n))}}catch(a){e(a)}})}(r||a,e)}finally{r&&i.revokeObjectURL(r)}}let x=!0;async function D(t,e,n){let a;if(v(n)){a=await P(t,e,n)}else a=j(t,n);const i=e&&e.imagebitmap;return await async function(t,e=null){!function(t){if(!t)return!0;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(e)&&x||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(n){console.warn(n),x=!1}return await createImageBitmap(t)}(a,i)}function T(t){return function(t,e,n=0){const a=(i=e,[...i].map(t=>t.charCodeAt(0)));var i;for(let r=0;r<a.length;++r)if(a[r]!==t[r+n])return!1;return!0}(t,"ftyp",4)&&96&t[8]?function(t){switch((e=t,n=8,a=12,String.fromCharCode(...e.slice(n,a))).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}var e,n,a}(t):null}const B=!1,E=!0;function L(t){const e=k(t);return function(t){const e=k(t),n=e.byteLength>=24&&2303741511===e.getUint32(0,B);if(!n)return null;return{mimeType:"image/png",width:e.getUint32(16,B),height:e.getUint32(20,B)}}(e)||function(t){const e=k(t),n=e.byteLength>=3&&65496===e.getUint16(0,B)&&255===e.getUint8(2);if(!n)return null;const{tableMarkers:a,sofMarkers:i}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let n=65504;n<65520;++n)t.add(n);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let r=2;for(;r+9<e.byteLength;){const t=e.getUint16(r,B);if(i.has(t))return{mimeType:"image/jpeg",height:e.getUint16(r+5,B),width:e.getUint16(r+7,B)};if(!a.has(t))return null;r+=2,r+=e.getUint16(r,B)}return null}(e)||function(t){const e=k(t),n=e.byteLength>=10&&1195984440===e.getUint32(0,B);if(!n)return null;return{mimeType:"image/gif",width:e.getUint16(6,E),height:e.getUint16(8,E)}}(e)||function(t){const e=k(t),n=e.byteLength>=14&&16973===e.getUint16(0,B)&&e.getUint32(2,E)===e.byteLength;if(!n)return null;return{mimeType:"image/bmp",width:e.getUint32(18,E),height:e.getUint32(22,E)}}(e)||function(t){const e=new Uint8Array(t instanceof DataView?t.buffer:t),n=T(e);if(!n)return null;return{mimeType:n.mimeType,width:0,height:0}}(e)}function k(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const V={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:"4.4.3",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],parse:async function(t,n,a){const i=((n=n||{}).image||{}).type||"auto",{url:r}=a||{};let o;switch(function(t){switch(t){case"auto":case"data":return function(){if(p)return"imagebitmap";if(d)return"image";if(y)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return p||d||y;case"imagebitmap":return p;case"image":return d;case"data":return y;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(i)){case"imagebitmap":o=await D(t,n,r);break;case"image":o=await P(t,n,r);break;case"data":o=await async function(t){const{mimeType:n}=L(t)||{},a=globalThis.loaders?.parseImageNode;return e(a),await a(t,n)}(t);break;default:e(!1)}return"data"===i&&(o=M(o)),o},tests:[t=>Boolean(L(new DataView(t)))],options:{image:{type:"auto",decode:!0}}},N=Math.PI/180,z=180/Math.PI,S=6370972,Z=256;function A(){const t=4018225162502676e-20,e=Math.PI/180*Z;return{unitsPerMeter:[t,t,t],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[e,e,t],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/e,1/e,24886.609375]}}class C extends n{constructor(t={}){const{longitude:e=0,zoom:n=0,nearZMultiplier:s=.5,farZMultiplier:u=1,resolution:c=10}=t;let{latitude:g=0,height:h,altitude:m=1.5,fovy:f}=t;g=Math.max(Math.min(g,a),-a),h=h||1,f?m=i(f):f=r(m);const l=Math.pow(2,n-R(g)),d=t.nearZ??s,p=t.farZ??(m+512*l/h)*u,w=(new o).lookAt({eye:[0,-m,0],up:[0,0,1]});w.rotateX(g*N),w.rotateZ(-e*N),w.scale(l/h),super({...t,height:h,viewMatrix:w,longitude:e,latitude:g,zoom:n,distanceScales:A(),fovy:f,focalDistance:m,near:d,far:p}),this.scale=l,this.latitude=g,this.longitude=e,this.fovy=f,this.resolution=c}get projectionMode(){return s.GLOBE}getDistanceScales(){return this.distanceScales}getBounds(t={}){const e={targetZ:t.z||0},n=this.unproject([0,this.height/2],e),a=this.unproject([this.width/2,0],e),i=this.unproject([this.width,this.height/2],e),r=this.unproject([this.width/2,this.height],e);return i[0]<this.longitude&&(i[0]+=360),n[0]>this.longitude&&(n[0]-=360),[Math.min(n[0],i[0],a[0],r[0]),Math.min(n[1],i[1],a[1],r[1]),Math.max(n[0],i[0],a[0],r[0]),Math.max(n[1],i[1],a[1],r[1])]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[a,i,r]=t,o=e?i:this.height-i,{pixelUnprojectionMatrix:s}=this;let h;if(Number.isFinite(r))h=F(s,[a,o,r,1]);else{const t=F(s,[a,o,-1,1]),e=F(s,[a,o,1,1]),i=((n||0)/S+1)*Z,r=u(c([],t,e)),m=u(t),f=u(e),l=4*((4*m*f-(r-m-f)**2)/16)/r,d=(Math.sqrt(m-l)-Math.sqrt(Math.max(0,i*i-l)))/Math.sqrt(r);h=g([],t,e,d)}const[m,f,l]=this.unprojectPosition(h);return Number.isFinite(r)?[m,f,l]:Number.isFinite(n)?[m,f,n]:[m,f]}projectPosition(t){const[e,n,a=0]=t,i=e*N,r=n*N,o=Math.cos(r),s=(a/S+1)*Z;return[Math.sin(i)*o*s,-Math.cos(i)*o*s,Math.sin(r)*s]}unprojectPosition(t){const[e,n,a]=t,i=h(t),r=Math.asin(a/i);return[Math.atan2(e,-n)*z,r*z,(i/Z-1)*S]}projectFlat(t){return t}unprojectFlat(t){return t}panByPosition([t,e,n],i,r){const o=.25/Math.pow(2,this.zoom-R(this.latitude)),s=t+o*(r[0]-i[0]);let u=e-o*(r[1]-i[1]);u=Math.max(Math.min(u,a),-a);const c={longitude:s,latitude:u,zoom:n-R(e)};return c.zoom+=R(c.latitude),c}}function R(t){const e=Math.PI*Math.cos(t*Math.PI/180);return Math.log2(e)}function F(t,e){const n=m([],e,t);return f(n,n,1/n[3]),n}C.displayName="GlobeViewport";export{C as G,V as I,Z as a,M as b,L as g,R as z};
|
|
2
4
|
//# sourceMappingURL=globe-viewport-CFdegSgy.js.map
|
|
5
|
+
|
|
6
|
+
//# debugId=3dac4482-5950-5e92-9c7b-841ba519447f
|