diff --git a/geonode_mapstore_client/client/version.txt b/geonode_mapstore_client/client/version.txt index 59d675e59c..9d5dc6f378 100644 --- a/geonode_mapstore_client/client/version.txt +++ b/geonode_mapstore_client/client/version.txt @@ -1 +1 @@ -geonode-mapstore-client-v4.0.0-eede1e7a53956a606f0b86f2a35d41d6f874f611 \ No newline at end of file +geonode-mapstore-client-v4.0.0-926301145b5be63c67114089d696246e28f1ab1e \ No newline at end of file diff --git a/geonode_mapstore_client/static/mapstore/dist/js/0.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/0.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/0.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/0.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/10025.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/10025.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/10025.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/10025.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/10038.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/10038.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/10038.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/10038.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/10175.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/10175.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/10175.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/10175.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/10222.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/10222.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/10222.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/10222.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/10279.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/10279.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/10279.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/10279.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/10294.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/10294.127e6ba55a24dde58fd9.chunk.js similarity index 99% rename from geonode_mapstore_client/static/mapstore/dist/js/10294.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/10294.127e6ba55a24dde58fd9.chunk.js index 694efc992d..6da43f66bd 100644 --- a/geonode_mapstore_client/static/mapstore/dist/js/10294.d9401ba7a3b8a01b0d22.chunk.js +++ b/geonode_mapstore_client/static/mapstore/dist/js/10294.127e6ba55a24dde58fd9.chunk.js @@ -1,2 +1,2 @@ -/*! For license information please see 10294.d9401ba7a3b8a01b0d22.chunk.js.LICENSE.txt */ +/*! For license information please see 10294.127e6ba55a24dde58fd9.chunk.js.LICENSE.txt */ (self.webpackChunkgeonode_mapstore_client=self.webpackChunkgeonode_mapstore_client||[]).push([[10294],{210294:(A,I,g)=>{"use strict";g.r(I),g.d(I,{default:()=>D,zstd:()=>r});var B=g(888424),Q=g(885100),C=g(348764).Buffer;let E,i,e;const a={env:{emscripten_notify_memory_growth:function(A){e=new Uint8Array(i.exports.memory.buffer)}}},o="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0A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ADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQ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CAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgC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QaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIA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AABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ";var t=g(292521),s=g(791530);const r=new class{init(){return E||(E="undefined"!=typeof fetch?fetch("data:application/wasm;base64,"+o).then((A=>A.arrayBuffer())).then((A=>WebAssembly.instantiate(A,a))).then(this._init):WebAssembly.instantiate(C.from(o,"base64"),a).then(this._init),E)}_init(A){i=A.instance,a.env.emscripten_notify_memory_growth(0)}decode(A,I=0){if(!i)throw new Error("ZSTDDecoder: Await .init() before decoding.");const g=A.byteLength,B=i.exports.malloc(g);e.set(A,B),I=I||Number(i.exports.ZSTD_findDecompressedSize(B,g));const Q=i.exports.malloc(I),C=i.exports.ZSTD_decompress(Q,I,B,g),E=e.slice(Q,Q+C);return i.exports.free(B),i.exports.free(Q),E}};class D extends t.Z{constructor(A){super(),this.planarConfiguration=void 0!==A.PlanarConfiguration?A.PlanarConfiguration:1,this.samplesPerPixel=void 0!==A.SamplesPerPixel?A.SamplesPerPixel:1,this.addCompression=A.LercParameters[s.L5.AddCompression]}decodeBlock(A){switch(this.addCompression){case s.Qb.None:break;case s.Qb.Deflate:A=(0,B.rr)(new Uint8Array(A)).buffer;break;case s.Qb.Zstandard:A=r.decode(new Uint8Array(A)).buffer;break;default:throw new Error(`Unsupported LERC additional compression method identifier: ${this.addCompression}`)}return Q.decode(A,{returnPixelInterleavedDims:1===this.planarConfiguration}).pixels[0].buffer}}},885100:(A,I)=>{var g,B,Q,C,E,i,e,a,o,t,s,r,D;B={defaultNoDataValue:-34027999387901484e22,decode:function(A,I){var g=(I=I||{}).encodedMaskData||null===I.encodedMaskData,e=i(A,I.inputOffset||0,g),a=null!==I.noDataValue?I.noDataValue:B.defaultNoDataValue,o=Q(e,I.pixelType||Float32Array,I.encodedMaskData,a,I.returnMask),t={width:e.width,height:e.height,pixelData:o.resultPixels,minValue:o.minValue,maxValue:e.pixels.maxValue,noDataValue:a};return o.resultMask&&(t.maskData=o.resultMask),I.returnEncodedMask&&e.mask&&(t.encodedMaskData=e.mask.bitset?e.mask.bitset:null),I.returnFileInfo&&(t.fileInfo=C(e),I.computeUsedBitDepths&&(t.fileInfo.bitDepths=E(e))),t}},Q=function(A,I,g,B,Q){var C,E,i,a=0,o=A.pixels.numBlocksX,t=A.pixels.numBlocksY,s=Math.floor(A.width/o),r=Math.floor(A.height/t),D=2*A.maxZError,n=Number.MAX_VALUE;g=g||(A.mask?A.mask.bitset:null),E=new I(A.width*A.height),Q&&g&&(i=new Uint8Array(A.width*A.height));for(var w,h,f=new Float32Array(s*r),G=0;G<=t;G++){var y=G!==t?r:A.height%t;if(0!==y)for(var l=0;l<=o;l++){var F=l!==o?s:A.width%o;if(0!==F){var k,c,U,S,d=G*A.width*r+l*s,R=A.width-F,M=A.pixels.blocks[a];if(M.encoding<2?(0===M.encoding?k=M.rawData:(e(M.stuffedData,M.bitsPerPixel,M.numValidPixels,M.offset,D,f,A.pixels.maxValue),k=f),c=0):U=2===M.encoding?0:M.offset,g)for(h=0;h>3],S<<=7&d),w=0;w>3]),128&S?(i&&(i[d]=1),n=n>(C=M.encoding<2?k[c++]:U)?C:n,E[d++]=C):(i&&(i[d]=0),E[d++]=B),S<<=1;d+=R}else if(M.encoding<2)for(h=0;h(C=k[c++])?C:n,E[d++]=C;d+=R}else for(n=n>U?U:n,h=0;h0){var E=new Uint8Array(Math.ceil(B.width*B.height/8)),i=(C=new DataView(A,I,B.mask.numBytes)).getInt16(0,!0),e=2,a=0;do{if(i>0)for(;i--;)E[a++]=C.getUint8(e++);else{var o=C.getUint8(e++);for(i=-i;i--;)E[a++]=o}i=C.getInt16(e,!0),e+=2}while(e0?1:0),D=s+(B.height%s>0?1:0);B.pixels.blocks=new Array(r*D);for(var n=0,w=0;w3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==l&&2!==l){if(l>>=6,y.offsetType=l,2===l)y.offset=C.getInt8(1),f++;else if(1===l)y.offset=C.getInt16(1,!0),f+=2;else{if(0!==l)throw"Invalid block offset type";y.offset=C.getFloat32(1,!0),f+=4}if(1===y.encoding)if(l=C.getUint8(f),f++,y.bitsPerPixel=63&l,l>>=6,y.numValidPixelsType=l,2===l)y.numValidPixels=C.getUint8(f),f++;else if(1===l)y.numValidPixels=C.getUint16(f,!0),f+=2;else{if(0!==l)throw"Invalid valid pixel count type";y.numValidPixels=C.getUint32(f,!0),f+=4}}var F;if(I+=f,3!==y.encoding)if(0===y.encoding){var k=(B.pixels.numBytes-1)/4;if(k!==Math.floor(k))throw"uncompressed block has invalid length";F=new ArrayBuffer(4*k),new Uint8Array(F).set(new Uint8Array(A,I,4*k));var c=new Float32Array(F);y.rawData=c,I+=4*k}else if(1===y.encoding){var U=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),S=Math.ceil(U/4);F=new ArrayBuffer(4*S),new Uint8Array(F).set(new Uint8Array(A,I,U)),y.stuffedData=new Uint32Array(F),I+=U}}else I++}return B.eofOffset=I,B},e=function(A,I,g,B,Q,C,E){var i,e,a,o=(1<=I)e=a>>>s-I&o,s-=I;else{var n=I-s;e=(a&o)<>>(s=32-n)}C[i]=e=g?(a=o>>>n-g&r,n-=g):(a=(o&r)<<(t=g-n)&r,a+=(o=A[D++])>>>(n=32-t)),I[e]=Q[a];else for(s=Math.ceil((i-C)/E),e=0;e=g?(a=o>>>n-g&r,n-=g):(a=(o&r)<<(t=g-n)&r,a+=(o=A[D++])>>>(n=32-t)),I[e]=a=g?(a=o>>>n&s,D-=g,n+=g):(a=o>>>n&s,D=32-(t=g-D),a|=((o=A[r++])&(1<=g?(a=o>>>n&s,D-=g,n+=g):(a=o>>>n&s,D=32-(t=g-D),a|=((o=A[r++])&(1<=359?359:Q;Q-=E;do{I+=A[C++]<<8,g+=I+=A[C++]}while(--E);I=(65535&I)+(I>>>16),g=(65535&g)+(g>>>16)}return 1&B&&(g+=I+=A[C]<<8),((g=(65535&g)+(g>>>16))<<16|(I=(65535&I)+(I>>>16)))>>>0},readHeaderInfo:function(A,I){var g=I.ptr,B=new Uint8Array(A,g,6),Q={};if(Q.fileIdentifierString=String.fromCharCode.apply(null,B),0!==Q.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+Q.fileIdentifierString;g+=6;var C,E=new DataView(A,g,8),i=E.getInt32(0,!0);if(Q.fileVersion=i,g+=4,i>=3&&(Q.checksum=E.getUint32(4,!0),g+=4),E=new DataView(A,g,12),Q.height=E.getUint32(0,!0),Q.width=E.getUint32(4,!0),g+=8,i>=4?(Q.numDims=E.getUint32(8,!0),g+=4):Q.numDims=1,E=new DataView(A,g,40),Q.numValidPixel=E.getUint32(0,!0),Q.microBlockSize=E.getInt32(4,!0),Q.blobSize=E.getInt32(8,!0),Q.imageType=E.getInt32(12,!0),Q.maxZError=E.getFloat64(16,!0),Q.zMin=E.getFloat64(24,!0),Q.zMax=E.getFloat64(32,!0),g+=40,I.headerInfo=Q,I.ptr=g,i>=3&&(C=i>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(A,g-C,Q.blobSize-14))!==Q.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(A,I){var g=I.headerInfo,B=this.getDataTypeArray(g.imageType),Q=g.numDims*this.getDataTypeSize(g.imageType),C=this.readSubArray(A,I.ptr,B,Q),E=this.readSubArray(A,I.ptr+Q,B,Q);I.ptr+=2*Q;var i,e=!0;for(i=0;i0){g=new Uint8Array(Math.ceil(E/8));var o=(e=new DataView(A,Q,a.numBytes)).getInt16(0,!0),t=2,s=0,r=0;do{if(o>0)for(;o--;)g[s++]=e.getUint8(t++);else for(r=e.getUint8(t++),o=-o;o--;)g[s++]=r;o=e.getInt16(t,!0),t+=2}while(t>3],D<<=7&n):D=g[n>>3],128&D&&(B[n]=1);I.pixels.resultMask=B,a.bitset=g,Q+=a.numBytes}return I.ptr=Q,I.mask=a,!0},readDataOneSweep:function(A,I,B,Q){var C,E=I.ptr,i=I.headerInfo,e=i.numDims,a=i.width*i.height,o=i.imageType,t=i.numValidPixel*g.getDataTypeSize(o)*e,s=I.pixels.resultMask;if(B===Uint8Array)C=new Uint8Array(A,E,t);else{var r=new ArrayBuffer(t);new Uint8Array(r).set(new Uint8Array(A,E,t)),C=new B(r)}if(C.length===a*e)I.pixels.resultPixels=Q?g.swapDimensionOrder(C,a,e,B,!0):C;else{I.pixels.resultPixels=new B(a*e);var D=0,n=0,w=0,h=0;if(e>1){if(Q){for(n=0;n=e)return!1;var a=new Uint32Array(e-i);g.decodeBits(A,I,a);var o,t,s,r,D=[];for(o=i;o0&&(D[t].second=f<>>32-r,32-y>=r?32===(y+=r)&&(y=0,f=G[++l]):(y+=r-32,f=G[++l],D[t].second|=f>>>32-y));var F,k=0,c=new B;for(o=0;o=Q?Q:k;var U,S,d,R,M,L=[];for(o=i;o0)if(U=[r,t],r<=F)for(S=D[t].second<=0;R--)S>>>R&1?(M.right||(M.right=new B),M=M.right):(M.left||(M.left=new B),M=M.left),0!==R||M.val||(M.val=U[1]);return{decodeLut:L,numBitsLUTQick:F,numBitsLUT:k,tree:c,stuffedData:G,srcPtr:l,bitPos:y}},readHuffman:function(A,I,B,Q){var C,E,i,e,a,o,t,s,r,D=I.headerInfo.numDims,n=I.headerInfo.height,w=I.headerInfo.width,h=w*n,f=this.readHuffmanTree(A,I),G=f.decodeLut,y=f.tree,l=f.stuffedData,F=f.srcPtr,k=f.bitPos,c=f.numBitsLUTQick,U=f.numBitsLUT,S=0===I.headerInfo.imageType?128:0,d=I.pixels.resultMask,R=0;k>0&&(F++,k=0);var M,L=l[F],N=1===I.encodeMode,J=new B(h*D),u=J;if(D<2||N){for(M=0;M1&&(u=new B(J.buffer,h*M,h),R=0),I.headerInfo.numValidPixel===w*n)for(s=0,o=0;o>>32-c,32-k>>64-k-c),G[a])E=G[a][1],k+=G[a][0];else for(a=e=L<>>32-U,32-k>>64-k-U),C=y,r=0;r>>U-r-1&1?C.right:C.left).left&&!C.right){E=C.val,k=k+r+1;break}k>=32&&(k-=32,L=l[++F]),i=E-S,N?(i+=t>0?R:o>0?u[s-w]:R,i&=255,u[s]=i,R=i):u[s]=i}else for(s=0,o=0;o>>32-c,32-k>>64-k-c),G[a])E=G[a][1],k+=G[a][0];else for(a=e=L<>>32-U,32-k>>64-k-U),C=y,r=0;r>>U-r-1&1?C.right:C.left).left&&!C.right){E=C.val,k=k+r+1;break}k>=32&&(k-=32,L=l[++F]),i=E-S,N?(t>0&&d[s-1]?i+=R:o>0&&d[s-w]?i+=u[s-w]:i+=R,i&=255,u[s]=i,R=i):u[s]=i}}else for(s=0,o=0;o>>32-c,32-k>>64-k-c),G[a])E=G[a][1],k+=G[a][0];else for(a=e=L<>>32-U,32-k>>64-k-U),C=y,r=0;r>>U-r-1&1?C.right:C.left).left&&!C.right){E=C.val,k=k+r+1;break}k>=32&&(k-=32,L=l[++F]),i=E-S,u[s]=i}I.ptr=I.ptr+4*(F+1)+(k>0?4:0),I.pixels.resultPixels=J,D>1&&!Q&&(I.pixels.resultPixels=g.swapDimensionOrder(J,h,D,B))},decodeBits:function(g,B,Q,C,E){var i=B.headerInfo,e=i.fileVersion,a=0,o=g.byteLength-B.ptr>=5?5:g.byteLength-B.ptr,t=new DataView(g,B.ptr,o),s=t.getUint8(0);a++;var r=s>>6,D=0===r?4:3-r,n=(32&s)>0,w=31&s,h=0;if(1===D)h=t.getUint8(a),a++;else if(2===D)h=t.getUint16(a,!0),a+=2;else{if(4!==D)throw"Invalid valid pixel count type";h=t.getUint32(a,!0),a+=4}var f,G,y,l,F,k,c,U,S,d=2*i.maxZError,R=i.numDims>1?i.maxValues[E]:i.zMax;if(n){for(B.counter.lut++,U=t.getUint8(a),a++,l=Math.ceil((U-1)*w/8),F=Math.ceil(l/4),G=new ArrayBuffer(4*F),y=new Uint8Array(G),B.ptr+=a,y.set(new Uint8Array(g,B.ptr,l)),c=new Uint32Array(G),B.ptr+=l,S=0;U-1>>>S;)S++;l=Math.ceil(h*S/8),F=Math.ceil(l/4),G=new ArrayBuffer(4*F),(y=new Uint8Array(G)).set(new Uint8Array(g,B.ptr,l)),f=new Uint32Array(G),B.ptr+=l,k=e>=3?function(A,I,g,B,Q,C){var E,i=(1<=I?(s=E>>>r&i,t-=I,r+=I):(s=E>>>r&i,t=32-(o=I-t),s|=((E=A[e++])&(1<=I?(s=E>>>t-I&i,t-=I):(s=(E&i)<<(o=I-t)&i,s+=(E=A[e++])>>>(t=32-o)),r[a]=s=3?I(f,Q,S,h,k):A(f,Q,S,h,k)}else B.counter.bitstuffer++,S=w,B.ptr+=a,S>0&&(l=Math.ceil(h*S/8),F=Math.ceil(l/4),G=new ArrayBuffer(4*F),(y=new Uint8Array(G)).set(new Uint8Array(g,B.ptr,l)),f=new Uint32Array(G),B.ptr+=l,e>=3?null==C?function(A,I,g,B){var Q,C,E,i,e=(1<=g?(C=E>>>t&e,o-=g,t+=g):(C=E>>>t&e,o=32-(i=g-o),C|=((E=A[a++])&(1<=g?(C=E>>>o-g&e,o-=g):(C=(E&e)<<(i=g-o)&e,C+=(E=A[a++])>>>(o=32-i)),I[Q]=C}(f,Q,S,h):A(f,Q,S,h,!1,C,d,R))},readTiles:function(A,I,B,Q){var C=I.headerInfo,E=C.width,i=C.height,e=E*i,a=C.microBlockSize,o=C.imageType,t=g.getDataTypeSize(o),s=Math.ceil(E/a),r=Math.ceil(i/a);I.pixels.numBlocksY=r,I.pixels.numBlocksX=s,I.pixels.ptr=0;var D,n,w,h,f,G,y,l,F,k,c=0,U=0,S=0,d=0,R=0,M=0,L=0,N=0,J=0,u=0,q=0,m=0,Y=0,p=0,x=0,H=new B(a*a),K=i%a||a,V=E%a||a,b=C.numDims,O=I.pixels.resultMask,v=I.pixels.resultPixels,X=C.fileVersion>=5?14:15,P=C.zMax;for(S=0;S1?(k=v,u=S*E*a+d*a,v=new B(I.pixels.resultPixels.buffer,e*l*t,e),P=C.maxValues[l]):k=null,L=A.byteLength-I.ptr,n={},x=0,N=(D=new DataView(A,I.ptr,Math.min(10,L))).getUint8(0),x++,F=C.fileVersion>=5?4&N:0,J=N>>6&255,(N>>2&X)!=(d*a>>3&X))throw"integrity issue";if(F&&0===l)throw"integrity issue";if((f=3&N)>3)throw I.ptr+=x,"Invalid block encoding ("+f+")";if(2!==f)if(0===f){if(F)throw"integrity issue";if(I.counter.uncompressed++,I.ptr+=x,m=(m=R*M*t)<(Y=A.byteLength-I.ptr)?m:Y,w=new ArrayBuffer(m%t==0?m:m+t-m%t),new Uint8Array(w).set(new Uint8Array(A,I.ptr,m)),h=new B(w),p=0,O)for(c=0;c1&&!Q&&(I.pixels.resultPixels=g.swapDimensionOrder(I.pixels.resultPixels,e,b,B))},formatFileInfo:function(A){return{fileIdentifierString:A.headerInfo.fileIdentifierString,fileVersion:A.headerInfo.fileVersion,imageType:A.headerInfo.imageType,height:A.headerInfo.height,width:A.headerInfo.width,numValidPixel:A.headerInfo.numValidPixel,microBlockSize:A.headerInfo.microBlockSize,blobSize:A.headerInfo.blobSize,maxZError:A.headerInfo.maxZError,pixelType:g.getPixelType(A.headerInfo.imageType),eofOffset:A.eofOffset,mask:A.mask?{numBytes:A.mask.numBytes}:null,pixels:{numBlocksX:A.pixels.numBlocksX,numBlocksY:A.pixels.numBlocksY,maxValue:A.headerInfo.zMax,minValue:A.headerInfo.zMin,noDataValue:A.noDataValue}}},constructConstantSurface:function(A,I){var g=A.headerInfo.zMax,B=A.headerInfo.zMin,Q=A.headerInfo.maxValues,C=A.headerInfo.numDims,E=A.headerInfo.height*A.headerInfo.width,i=0,e=0,a=0,o=A.pixels.resultMask,t=A.pixels.resultPixels;if(o)if(C>1){if(I)for(i=0;i1&&B!==g)if(I)for(i=0;i=-128&&I<=127;break;case 1:g=I>=0&&I<=255;break;case 2:g=I>=-32768&&I<=32767;break;case 3:g=I>=0&&I<=65536;break;case 4:g=I>=-2147483648&&I<=2147483647;break;case 5:g=I>=0&&I<=4294967296;break;case 6:g=I>=-34027999387901484e22&&I<=34027999387901484e22;break;case 7:g=I>=-17976931348623157e292&&I<=17976931348623157e292;break;default:g=!1}return g},getDataTypeSize:function(A){var I=0;switch(A){case 0:case 1:I=1;break;case 2:case 3:I=2;break;case 4:case 5:case 6:I=4;break;case 7:I=8;break;default:I=A}return I},getDataTypeUsed:function(A,I){var g=A;switch(A){case 2:case 4:g=A-I;break;case 3:case 5:g=A-2*I;break;case 6:g=0===I?A:1===I?2:1;break;case 7:g=0===I?A:A-2*I+1;break;default:g=A}return g},getOnePixel:function(A,I,g,B){var Q=0;switch(g){case 0:Q=B.getInt8(I);break;case 1:Q=B.getUint8(I);break;case 2:Q=B.getInt16(I,!0);break;case 3:Q=B.getUint16(I,!0);break;case 4:Q=B.getInt32(I,!0);break;case 5:Q=B.getUInt32(I,!0);break;case 6:Q=B.getFloat32(I,!0);break;case 7:Q=B.getFloat64(I,!0);break;default:throw"the decoder does not understand this pixel type"}return Q},swapDimensionOrder:function(A,I,g,B,Q){var C=0,E=0,i=0,e=0,a=A;if(g>1)if(a=new B(I*g),Q)for(C=0;C5)throw"unsupported lerc version 2."+i;g.readMask(A,C),E.numValidPixel===E.width*E.height||C.pixels.resultMask||(C.pixels.resultMask=I.maskData);var a=E.width*E.height;C.pixels.resultPixels=new e(a*E.numDims),C.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var o,t=!I.returnPixelInterleavedDims;if(0!==E.numValidPixel)if(E.zMax===E.zMin)g.constructConstantSurface(C,t);else if(i>=4&&g.checkMinMaxRanges(A,C))g.constructConstantSurface(C,t);else{var s=new DataView(A,C.ptr,2),r=s.getUint8(0);if(C.ptr++,r)g.readDataOneSweep(A,C,e,t);else if(i>1&&E.imageType<=1&&Math.abs(E.maxZError-.5)<1e-5){var D=s.getUint8(1);if(C.ptr++,C.encodeMode=D,D>2||i<4&&D>1)throw"Invalid Huffman flag "+D;D?g.readHuffman(A,C,e,t):g.readTiles(A,C,e,t)}else g.readTiles(A,C,e,t)}C.eofOffset=C.ptr,I.inputOffset?(o=C.headerInfo.blobSize+I.inputOffset-C.ptr,Math.abs(o)>=1&&(C.eofOffset=I.inputOffset+C.headerInfo.blobSize)):(o=C.headerInfo.blobSize-C.ptr,Math.abs(o)>=1&&(C.eofOffset=C.headerInfo.blobSize));var n={width:E.width,height:E.height,pixelData:C.pixels.resultPixels,minValue:E.zMin,maxValue:E.zMax,validPixelCount:E.numValidPixel,dimCount:E.numDims,dimStats:{minValues:E.minValues,maxValues:E.maxValues},maskData:C.pixels.resultMask};if(C.pixels.resultMask&&g.isValidPixelValue(E.imageType,B)){var w=C.pixels.resultMask;for(Q=0;Q1&&(a&&f.push(a),l.fileInfo.mask&&l.fileInfo.mask.numBytes>0&&y++),w++,G.pixels.push(l.pixelData),G.statistics.push({minValue:l.minValue,maxValue:l.maxValue,noDataValue:l.noDataValue,dimStats:l.dimStats})}if(B>1&&y>1){for(n=G.width*G.height,G.bandMasks=f,(a=new Uint8Array(n)).set(f[0]),o=1;o{"use strict";i.d(t,{a:()=>s});var n=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var n,r,s;if(Array.isArray(t)){if((n=t.length)!=i.length)return!1;for(r=n;0!=r--;)if(!e(t[r],i[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(i,s[r]))return!1;for(r=n;0!=r--;){var a=s[r];if(!e(t[a],i[a]))return!1}return!0}return t!=t&&i!=i};const r="__googleMapsScriptId";class s{constructor({apiKey:e,channel:t,client:i,id:a=r,libraries:o=[],language:c,region:l,version:h,mapIds:u,nonce:p,retries:d=3,url:g="https://maps.googleapis.com/maps/api/js"}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.version=h,this.apiKey=e,this.channel=t,this.client=i,this.id=a||r,this.libraries=o,this.language=c,this.region=l,this.mapIds=u,this.nonce=p,this.retries=d,this.url=g,s.instance){if(!n(this.options,s.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(s.instance.options)}`);return s.instance}s.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url}}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+=`?callback=${this.CALLBACK}`,this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((i=>{i?t(i.error):e(window.google)}))}))}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id))return void this.callback();const e=this.createUrl(),t=document.createElement("script");t.id=this.id,t.type="text/javascript",t.src=e,t.onerror=this.loadErrorCallback.bind(this),t.defer=!0,t.async=!0,this.nonce&&(t.nonce=this.nonce),document.head.appendChild(t)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}},201910:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(923645),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,'.msgapi .mapillary-attribution-container {\n background-color: rgba(0, 0, 0, 0.5);\n font-size: 9px;\n font-weight: 300;\n position: absolute;\n bottom: 0;\n right: 0;\n height: 16px;\n line-height: initial;\n z-index: 10;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",\n "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",\n "Helvetica Neue", sans-serif;\n}\n\n.msgapi .mapillary-attribution-image-container {\n display: inline-block;\n color: white;\n text-decoration: none;\n margin-left: 8px;\n vertical-align: middle;\n height: 100%;\n}\n\n.msgapi .mapillary-attribution-image-container:hover,\n.msgapi .mapillary-attribution-image-container:active,\n.msgapi .mapillary-attribution-image-container:visited {\n color: white;\n}\n\n.msgapi .mapillary-attribution-compact .mapillary-attribution-image-container {\n margin-left: 4px;\n}\n\n.msgapi .mapillary-attribution-username {\n display: inline-block;\n vertical-align: middle;\n line-height: 16px;\n}\n\n.msgapi .mapillary-attribution-date {\n display: inline-block;\n vertical-align: middle;\n color: white;\n line-height: 16px;\n margin-right: 8px;\n margin-left: 4px;\n}\n\n.msgapi .mapillary-attribution-compact .mapillary-attribution-date {\n margin-right: 6px;\n}\n\n.msgapi .mapillary-attribution-icon-container {\n display: inline-block;\n margin-left: 8px;\n vertical-align: middle;\n height: 100%;\n}\n\n.msgapi .mapillary-attribution-compact .mapillary-attribution-icon-container {\n margin-left: 6px;\n}\n\n.msgapi .mapillary-attribution-image-container .mapillary-attribution-icon-container {\n margin-left: 2px;\n margin-right: 2px;\n}\n\n.msgapi .mapillary-attribution-logo {\n margin-top: 3px;\n width: 44px;\n height: 10px;\n background-size: contain;\n background-repeat: no-repeat;\n background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MSIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDYxIDE0Ij48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTIzLjk5NDgzMDMgMi44MTQ1MjI4NUwyMy45OTQ4MzAzIDExLjMxMzg1MyAyMi4zNzA4NjM3IDExLjMxMzg1MyAyMi4zNzA4NjM3IDYuODkyMjM2MTQgMjAuNTQzOTAxMiAxMS4zMTM4NTMgMTkuNjYwMjcyNCAxMS4zMTM4NTMgMTcuODMzMzA5OSA2Ljg5MjIzNjE0IDE3LjgzMzMwOTkgMTEuMzEzODUzIDE2LjIwOTM0MzMgMTEuMzEzODUzIDE2LjIwOTM0MzMgMi44MTQ1MjI4NSAxNy44ODEwNzM3IDIuODE0NTIyODUgMjAuMTAyMDg2OCA4LjE2OTU5MjExIDIyLjMyMzEgMi44MTQ1MjI4NSAyMy45OTQ4MzAzIDIuODE0NTIyODUgMjMuOTk0ODMwMyAyLjgxNDUyMjg1ek0zMS4wODE5NTg0IDQuNjY5MTQ1NDZMMzIuNTAyOTI5MiA0LjY2OTE0NTQ2IDMyLjUwMjkyOTIgNS4yMjE4NDc1NkMzMi41OTg0NTcyIDUuMDI1MzMwMjggMzIuNzg5NTEwMSA0Ljg1NzQ3NDI4IDMzLjA3NjA5MzkgNC43MTgyNzQ1MyAzMy4zNjI2Nzc3IDQuNTc5MDc0NzkgMzMuNjc3MTE5MSA0LjUwOTQ3NTk2IDM0LjAxOTQyNz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Tc5NDM5IDUuNjQ4NjQ1NTcgNS4yMTkxNzIgNS42MDAyMDM3NSA1LjM2MDQ5MDQgNS40Nzc0MTk0NCA1LjQ4MjEyNTU0IDUuMzMzOTgxMjQgNS41MjkzNzAwMSA0Ljk3ODAxNjMgNS42NDY2MTQ3OCA0LjMwMTYyOTQ0IDUuODY5Mzk3NDQgMy45MDY3MjM3NSA1Ljk5OTQ2ODE4IDMuNjI0OTE0NjkgNi4wOTIyODgxIDMuNDg3OTM1MjMgNi41MjE1MDI1NyAzLjg2ODQxNzc2IDYuNzAyMjQ2NzQgMy45NDc4OTUyNSA2Ljc0MDAwMTY3IDUuNjYwOTcxNTMgNy42NTQwNDM5MSA1LjgzNzcyMDU0IDcuNzM3NjQ1NTggNi4wMTQ0Njk1NCA3LjgyMTI0NzI0IDYuMTEyNzUyODEgOC4wNjI1Nzk0NSA2LjAwOTI1MzE2IDguMjMzNTUwMDQgNS44NjgwODA0IDguNDY2NzUyNjggNS42ODczNDc5NiA4Ljc2MjcyMDUyIDUuNjIxNzg2MiA4Ljg1ODgwODE1IDUuNTA4MTU4MzggOS4wMjUzNDE2MyA1LjI4NDk1MDc3IDkuMDgwODAyODYgNS4wOTc0ODk5NiA4Ljk4MjUxMDc2IDQuOTEwMDI5MTUgOC44ODQyMTg2Ni4zMTE1MjIyODkgNi40NjA4NjY4OS4yMDAxNDYwNjIgNi40MDA4MTIwNXoiLz48L2c+ICA8L3N2Zz4gIA==");\n}\n\n.msgapi .mapillary-attribution-compact .mapillary-attribution-logo {\n width: 11px;\n background-size: cover;\n}\n.msgapi .mapillary-bearing-indicator-container {\n bottom: 34px;\n height: 40px;\n pointer-events: none;\n position: absolute;\n right: 10px;\n width: 40px;\n z-index: 10;\n}\n\n.msgapi .mapillary-bearing-indicator-container.mapillary-bearing-compact {\n -webkit-transform: scale(0.6);\n transform: scale(0.6);\n bottom: 16px;\n right: 2px;\n}\n\n.msgapi .mapillary-bearing-indicator-background {\n position: absolute;\n top: 0;\n left: 0;\n width: 40px;\n height: 40px;\n opacity: 0.5;\n -webkit-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n}\n\n.msgapi .mapillary-bearing-indicator-background-circle {\n pointer-events: auto;\n position: absolute;\n top: 0;\n left: 0;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background-color: #000;\n}\n\n.msgapi .mapillary-bearing-indicator-background-arrow-container {\n position: absolute;\n left: 14px;\n top: -3.5px;\n height: 8px;\n width: 12px;\n overflow: hidden;\n}\n\n.msgapi .mapillary-bearing-indicator-background-arrow {\n position: absolute;\n width: 12px;\n height: 12px;\n left: 0;\n top: 2px;\n background-color: #000;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n border-radius: 2px;\n}\n\n.msgapi .mapillary-bearing-north-container {\n position: absolute;\n left: 16px;\n top: -1px;\n width: 8px;\n height: 21px;\n -webkit-transform-origin: 50% 100%;\n transform-origin: 50% 100%;\n}\n\n.msgapi .mapillary-bearing-north {\n position: absolute;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 4px solid white;\n}\n.msgapi .mapillary-cover-container {\n background-color: rgba(0, 0, 0, 0.5);\n bottom: 0;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 100;\n}\n\n.msgapi .mapillary-cover-background {\n background-position: center;\n background-size: cover;\n bottom: 0;\n left: 0;\n margin: -3px;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 0;\n}\n\n.msgapi .mapillary-cover-indicator {\n bottom: 0;\n left: 0;\n margin: -3px;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 0;\n background-color: rgba(0, 0, 0, 0.2);\n -webkit-transition: opacity 0.1s ease-in-out;\n transition: opacity 0.1s ease-in-out;\n cursor: pointer;\n}\n\n.msgapi .mapillary-cover-indicator:hover {\n opacity: 0;\n}\n\n.msgapi .mapillary-cover-button {\n background-color: rgba(0, 0, 0, 0.5);\n border-radius: 64px;\n width: 128px;\n height: 128px;\n left: 50%;\n top: 50%;\n letter-spacing: 1px;\n margin-left: -64px;\n margin-top: -64px;\n position: absolute;\n -webkit-transition: opacity 0.2s ease-in-out;\n transition: opacity 0.2s ease-in-out;\n z-index: 1;\n pointer-events: none;\n}\n\n.msgapi .mapillary-cover-compact .mapillary-cover-button {\n width: 72px;\n height: 72px;\n margin-left: -36px;\n margin-top: -36px;\n}\n\n.msgapi .mapillary-cover-button-icon {\n background-size: contain;\n background-repeat: no-repeat;\n background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiB2aWV3Qm94PSIwIDAgMTI4IDEyOCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik01Ny43NDc4MjExLDU2LjkzMTc4NDUgTDQwLjkxNDUzODEsNjQuNjM0MjkyIEMzOC40NjQ1MzU5LDY1Ljc1NDY0MzIgMzQuNzg1NzMyMiw2NS43NTMzNDM1IDMyLjc2MzkxMDMsNjQuNjMyOTkyMyBDMzAuNzczNzU4Niw2My41Mjk1MzczIDMxLjE4ODAwNCw2MS43Nzg4MjYxIDMzLjYyNTMzODIsNjAuNzE5NTYxMyBMNjAuMjgzOTk3MSw0OS4xNTIxMzAyIEM2Mi4yODU1NTAxLDQ4LjI4MjYyMzMgNjUuNTAwNzAzLDQ4LjI4MjYyMzMgNjcuNTE2MTkwOCw0OS4xNTIxMzAyIEw5NC4zNDIwNjgyLDYwLjcyNjA1OTkgQzk2Ljc5NDYwNCw2MS43ODQwMjUgOTcuMjM0MTg1Niw2My41MzYwMzU5IDk1LjI2MDUwMjMsNjQuNjM5NDkwOCBDOTMuMjU1MTQ4OSw2NS43NTk4NDIgODkuNTczODExNSw2NS43NTk4NDIgODcuMTA4NjA3Nyw2NC42MzgxOTExIEw3MC42MjEzMjk1LDU3LjE0MDMxMjIgTDcxLjc5NzkzNTgsNzcuMzkyODQ3MiBDNzEuODk1MjAzMSw3OS4wODYzOTEyIDY4LjU0MjcyMzIsODAuNSA2NC4zNDU5NjMsODAuNSBDNjAuMTQ5MjAyOSw4MC41IDU2Ljc3NzI2OTUsNzkuMDg2MzkxMiA1Ni44NTExOTI2LDc3LjM5Mjg0NzIgTDU3Ljc0NzgyMTEsNTYuOTMxNzg0NSBaIi8+PC9nPiAgPC9zdmc+ICA=");\n height: 100%;\n width: 100%;\n position: absolute;\n pointer-events: none;\n}\n\n.msgapi .mapillary-cover-compact .mapillary-cover-button-icon {\n width: 72px;\n height: 72px;\n}\n\n.msgapi .mapillary-cover-logo {\n background-size: contain;\n background-repeat: no-repeat;\n background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNTciIGhlaWdodD0iNTIiIHZpZXdCb3g9IjAgMCAxNTcgNTIiPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+ICA8cGF0aCBmaWxsPSIjMDAwIiBmaWxsLW9wYWNpdHk9Ii41IiBkPSJNODMuMjMwNCAxOS4wNjg2TDgzLjIzMDQgMjAuMjk1NkM4Mi44NDQ0IDE5LjkxNDYgODIuNDIzNCAxOS41ODI2IDgxLjk2MTQgMTkuMzQwNiA4MS4xMTI0IDE4Ljg5NTYgODAuMTkyNCAxOC42NzE2IDc5LjIyODQgMTguNjcxNiA3OC41MzQ0IDE4LjY3MTYgNzcuODY4NCAxOC43NzM2IDc3LjIzNjQgMTguOTgwNkw3NC4yMDI0IDE4Ljk4MDYgNjcuNDg3NCAxOC45Nzg2QzY3LjAyNzQgMTguODYzNiA2Ni41NDk0IDE4LjgwMzYgNjYuMDU2NCAxOC44MDM2IDY0LjIwMzQgMTguODAzNiA2Mi42OTU0IDE5LjM4MjYgNjEuNTQ0NCAyMC4zOTA2TDYxLjU0NDQgMTUuNDU3NiA1NC45MzA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42MDkgMjguNjAwMSAyMy4yNTEgMjkuMTgwMSAyMy4xMjIgMjkuMzY4MSAyMi44OTcgMjkuNjk0MSAyMi40NTYgMjkuODAzMSAyMi4wODUgMjkuNjEwMSAyMS43MTQgMjkuNDE4MSAxMi42MjMgMjQuNjY3MSAxMi40MDIgMjQuNTQ5MSIvPjwvZz4gIDwvc3ZnPiAg");\n bottom: 0px;\n height: 52px;\n left: 50%;\n margin-left: -73px;\n position: absolute;\n -webkit-transition: opacity 0.2s ease-in-out;\n transition: opacity 0.2s ease-in-out;\n width: 157px;\n z-index: 1;\n}\n\n.msgapi .mapillary-cover-compact .mapillary-cover-logo {\n width: 104px;\n height: 35px;\n margin-left: -49px;\n}\n\n.msgapi .mapillary-cover-done {\n visibility: hidden;\n opacity: 0;\n}\n\n.msgapi .mapillary-cover.mapillary-cover-loading .mapillary-cover-button,\n.msgapi .mapillary-cover.mapillary-cover-loading .mapillary-cover-logo {\n opacity: 0;\n}\n\n.msgapi .mapillary-cover-spinner {\n -webkit-animation: rotate 1s linear infinite;\n animation: rotate 1s linear infinite;\n background-repeat: no-repeat;\n background-size: 100%;\n background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NCIgaGVpZ2h0PSI4NCIgdmlld0JveD0iMCAwIDg0IDg0Ij48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHBhdGggZD0iTTQyLDg0IEM2NS4xOTYsODQgODQsNjUuMTk2IDg0LDQyIEM4NCwxOC44MDQgNjUuMTk2LDAgNDIsMCBDMTguODA0LDAgMCwxOC44MDQgMCw0MiBDMCw2NS4xOTYgMTguODA0LDg0IDQyLDg0Ii8+ICA8cGF0aCBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik00Miw4My45OTg1MTA0IEM0MC4zNDMxNDU4LDgzLjk5ODUxMDQgMzksODIuNjU1MzY0NiAzOSw4MC45OTg1MTA0IEMzOSw3OS4zNDE2NTYxIDQwLjM0MzE0NTgsNzcuOTk4NTEwNCA0Miw3Ny45OTg1MTA0IEM2MS44ODIyODg2LDc3Ljk5ODUxMDQgNzgsNjEuODgwNzk5IDc4LDQxLjk5ODUxMDQgQzc4LDIyLjIzNDkyOTQgNjIuMDY2MzMxNiw2LjE3MDg3ODA2IDQyLjMxODc2ODIsNS45OTk4ODk5NCBDNDAuNjYxOTc2LDUuOTg1NTQ0MjggMzkuMzMwNTEwMSw0LjYzMDgxOTQyIDM5LjM0NDg1NTgsMi45NzQwMjcyOCBDMzkuMzU5MjAxNCwxLjMxNzIzNTE0IDQwLjcxMzkyNjMsLTAuMDE0MjMwODE0NiA0Mi4zNzA3MTg0LDAuMDAwMTE0ODQyOTUyIEM2NS40MTA5MTU3LDAuMTk5NjEyODggODQsMTguOTQwODA5MSA4NCw0MS45OTg1MTA0IEM4NCw2NS4xOTQ1MDc1IDY1LjE5NTk5NzEsODMuOTk4NTEwNCA0Miw4My45OTg1MTA0IFoiLz48L2c+ICA8L3N2Zz4gIA==");\n height: 32px;\n left: 50%;\n margin-left: -16px;\n margin-top: -16px;\n position: absolute;\n top: 50%;\n width: 32px;\n z-index: 1;\n}\n\n@-webkit-keyframes rotate {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes rotate {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.msgapi .mapillary-direction-perspective {\n display: block;\n position: absolute;\n pointer-events: none;\n -webkit-transform-style: preserve-3d;\n transform-style: preserve-3d;\n z-index: 10;\n}\n\n.msgapi .mapillary-direction-circle,\n.msgapi .mapillary-direction-circle-sequence,\n.msgapi .mapillary-direction-circle-inactive,\n.msgapi .mapillary-direction-circle-highlight,\n.msgapi .mapillary-direction-circle-sequence-highlight {\n position: absolute;\n border-radius: 50%;\n}\n\n.msgapi .mapillary-direction-circle,\n.msgapi .mapillary-direction-circle-sequence,\n.msgapi .mapillary-direction-circle-highlight,\n.msgapi .mapillary-direction-circle-sequence-highlight {\n pointer-events: auto;\n}\n\n.msgapi .mapillary-direction-circle:hover,\n.msgapi .mapillary-direction-circle-sequence:hover,\n.msgapi .mapillary-direction-circle-highlight:hover,\n.msgapi .mapillary-direction-circle-sequence-highlight:hover {\n cursor: pointer;\n}\n\n.msgapi .mapillary-direction-circle,\n.msgapi .mapillary-direction-circle-sequence {\n background: rgba(0, 0, 0, 0);\n}\n\n.msgapi .mapillary-direction-circle-inactive {\n background: rgba(0, 0, 0, 0);\n z-index: -1;\n}\n\n.msgapi .mapillary-direction-circle-highlight,\n.msgapi .mapillary-direction-circle-sequence-highlight {\n background: rgba(0, 0, 0, 0.4);\n}\n\n.msgapi .mapillary-direction-arrow-step,\n.msgapi .mapillary-direction-arrow-spherical,\n.msgapi .mapillary-direction-arrow-inactive {\n position: absolute;\n top: 44%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 75%;\n height: 44.0775%;\n pointer-events: none;\n}\n\n.msgapi .mapillary-direction-arrow-step,\n.msgapi .mapillary-direction-arrow-inactive {\n background: url("data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgNTguNzciPgogICAgPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTk3LjQ0LDQzLjgyTDU2LjE4LDIuNTZhOC43NSw4Ljc1LDAsMCwwLTEyLjM3LDBoMEwyLjU2LDQzLjhBOC43NSw4Ljc1LDAsMCwwLDE0Ljk0LDU2LjE4bDM1LTM1TDg1LjA1LDU2LjJBOC43NSw4Ljc1LDAsMSwwLDk3LjQ0LDQzLjgyaDBaIi8+Cjwvc3ZnPg==");\n background-repeat: no-repeat;\n}\n\n.msgapi .mapillary-direction-arrow-inactive {\n opacity: 0.2;\n z-index: -1;\n}\n\n.msgapi .mapillary-direction-arrow-spherical {\n background: url("data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgNTguNzciPgogICAgPHBhdGggZmlsbD0iI0Y1REVCMyIgZD0iTTk3LjQ0LDQzLjgyTDU2LjE4LDIuNTZhOC43NSw4Ljc1LDAsMCwwLTEyLjM3LDBoMEwyLjU2LDQzLjhBOC43NSw4Ljc1LDAsMCwwLDE0Ljk0LDU2LjE4bDM1LTM1TDg1LjA1LDU2LjJBOC43NSw4Ljc1LDAsMSwwLDk3LjQ0LDQzLjgyaDBaIi8+Cjwvc3ZnPg==");\n background-repeat: no-repeat;\n}\n\n.msgapi .mapillary-direction-turn-circle,\n.msgapi .mapillary-direction-turn-circle-sequence,\n.msgapi .mapillary-direction-turn-circle-highlight,\n.msgapi .mapillary-direction-turn-circle-sequence-highlight {\n position: absolute;\n border-radius: 50%;\n pointer-events: auto;\n}\n\n.msgapi .mapillary-direction-turn-circle,\n.msgapi .mapillary-direction-turn-circle-sequence {\n background: rgba(0, 0, 0, 0);\n}\n\n.msgapi .mapillary-direction-turn-circle-highlight,\n.msgapi .mapillary-direction-turn-circle-sequence-highlight {\n background: rgba(0, 0, 0, 0.4);\n}\n\n.msgapi .mapillary-direction-turn-circle:hover,\n.msgapi .mapillary-direction-turn-circle-sequence:hover,\n.msgapi .mapillary-direction-turn-circle-highlight:hover,\n.msgapi .mapillary-direction-turn-circle-sequence-highlight:hover {\n cursor: pointer;\n}\n\n.msgapi .mapillary-direction-turn-left,\n.msgapi .mapillary-direction-turn-right,\n.msgapi .mapillary-direction-turn-around {\n position: absolute;\n top: 50%;\n pointer-events: none;\n -webkit-filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.8));\n filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.8));\n}\n\n.msgapi .mapillary-direction-turn-left,\n.msgapi .mapillary-direction-turn-right {\n width: 58.794%;\n height: 70%;\n}\n\n.msgapi .mapillary-direction-turn-around {\n left: 50%;\n width: 75%;\n height: 63.2475%;\n}\n\n.msgapi .mapillary-direction-turn-left {\n left: 45%;\n background: url("data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTE5LjA2Ij4KICAgIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05OS4yLDc2Qzk4LDY0LjkxLDk1LjA2LDU2LjYsODkuNTcsNTAsNzksMzcuMzgsNjAuMywzMi43MiwyNC40MiwzMi4zOUw0NC44OSwxMS45M0E3LDcsMCwwLDAsMzUsMmgwbC0zMywzM2E3LDcsMCwwLDAsMCw5Ljg4TDM1LDc3Ljg1YTcsNywwLDEsMCw5LjktOS45TDI0Ljc5LDQ3Ljg5QzU2LDQ4LjE4LDcxLDUxLjkzLDc3LjcyLDYwYzMuMjEsMy44OCw1LjE4LDkuNDIsNi4xMSwxNy43NywwLjg1LDcuNTkuODcsMTYuMjIsMC4zNCwzMy4zNmE3Ljc0LDcuNzQsMCwxLDAsMTUuNDYuNDhDMTAwLjE5LDkzLjcyLDEwMC4xNiw4NC42LDk5LjIsNzZaIi8+Cjwvc3ZnPg==");\n background-repeat: no-repeat;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.msgapi .mapillary-direction-turn-right {\n left: 55%;\n background: url("data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTE5LjA2Ij4KICAgIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05OS4yLDc2Qzk4LDY0LjkxLDk1LjA2LDU2LjYsODkuNTcsNTAsNzksMzcuMzgsNjAuMywzMi43MiwyNC40MiwzMi4zOUw0NC44OSwxMS45M0E3LDcsMCwwLDAsMzUsMmgwbC0zMywzM2E3LDcsMCwwLDAsMCw5Ljg4TDM1LDc3Ljg1YTcsNywwLDEsMCw5LjktOS45TDI0Ljc5LDQ3Ljg5QzU2LDQ4LjE4LDcxLDUxLjkzLDc3LjcyLDYwYzMuMjEsMy44OCw1LjE4LDkuNDIsNi4xMSwxNy43NywwLjg1LDcuNTkuODcsMTYuMjIsMC4zNCwzMy4zNmE3Ljc0LDcuNzQsMCwxLDAsMTUuNDYuNDhDMTAwLjE5LDkzLjcyLDEwMC4xNiw4NC42LDk5LjIsNzZaIi8+Cjwvc3ZnPg==");\n background-repeat: no-repeat;\n -webkit-transform: translate(-50%, -50%) scaleX(-1);\n transform: translate(-50%, -50%) scaleX(-1);\n}\n\n.msgapi .mapillary-direction-turn-around {\n background: url("data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgODQuMzMiPgogICAgPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTY1LjQ3LDBDNTYsMCw0Ni44Niw1LjM5LDQwLjIxLDE2LjA3LDMzLjQ3LDI3LDI5LjM2LDQzLjE4LDI4LjQzLDY1TDEwLDQ2LjU5YTUuODcsNS44NywwLDAsMC04LjMsOC4zTDI5LjQ0LDgyLjYxYTUuODgsNS44OCwwLDAsMCw4LjMsMEw2NS40Nyw1NWE1Ljg4LDUuODgsMCwxLDAtOC4zMi04LjMyTDM5LjMyLDY0LjQ3YzAuOTItMTkuNTYsNC41LTMzLjcsMTAuMTEtNDIuNzIsNC43Mi03LjYyLDEwLjQ1LTExLDE2LjEtMTFhMTYuNjQsMTYuNjQsMCwwLDEsMTQuNzgsOEM4NiwyNyw4OS4yMSw0MS44NSw4OS4yMSw2NC40N2E1LjM5LDUuMzksMCwxLDAsMTAuNzksMEMxMDAuMDUsMTguNzgsODcuMjIsMCw2NS40NywwWiIvPgo8L3N2Zz4=");\n background-repeat: no-repeat;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n@media (hover: hover) {\n .msgapi .mapillary-direction-circle:hover,\n .msgapi .mapillary-direction-circle-sequence:hover {\n background: rgba(0, 0, 0, 0.4);\n }\n\n .msgapi .mapillary-direction-turn-circle:hover,\n .msgapi .mapillary-direction-turn-circle-sequence:hover {\n background: rgba(0, 0, 0, 0.4);\n }\n}\n.msgapi .mapillary-viewer {\n background-color: #0F0F0F;\n position: relative;\n overflow: hidden;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\n.msgapi .mapillary-interactive {\n cursor: -webkit-grab;\n cursor: grab;\n}\n\n.msgapi .mapillary-interactive:active {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n\n.msgapi .mapillary-viewer .mapillary-dom {\n bottom: 0;\n left: 0;\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n right: 0;\n top: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.msgapi .mapillary-dom .mapillary-dom-renderer {\n pointer-events: auto;\n}\n\n.msgapi .mapillary-viewer div {\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.msgapi .mapillary-viewer input:focus {\n background: none;\n}\n.msgapi .mapillary-navigation-sequence,\n.msgapi .mapillary-navigation-spatial {\n position: absolute;\n pointer-events: none;\n z-index: 10;\n}\n\n.msgapi .mapillary-navigation-sequence {\n top: 12px;\n left: 50%;\n margin-left: -40px;\n}\n\n.msgapi .mapillary-navigation-spatial {\n bottom: 18px;\n left: 50%;\n margin-left: -100px;\n}\n\n.msgapi .mapillary-navigation-spatial-bottom {\n margin-left: 40px;\n}\n\n.msgapi .mapillary-navigation-button {\n width: 36px;\n height: 36px;\n background-size: contain;\n background-repeat: no-repeat;\n pointer-events: auto;\n margin: 0px 2px;\n cursor: pointer;\n display: inline-block;\n -webkit-filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 1));\n filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 1));\n}\n\n.msgapi .mapillary-navigation-prev,\n.msgapi .mapillary-navigation-left {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwcHgiIGhlaWdodD0iMTgwcHgiIHZpZXdCb3g9IjAgMCAxODAgMTgwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9IlBhZ2UtMSIgZmlsbD0ibm9uZSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDkwLDkwKSI+PGcgaWQ9ImFycm93LXVwIiBmaWxsPSIjRkZGRkZGIj48cGF0aCBkPSJNODguODg0MzgxNyw0NS43Mzc4ODA2IEM4OC4yOTk4ODUzLDQ1Ljk0OTc5MTYgODcuNzUxNTY5Miw0Ni4yODk5Mjk5IDg3LjI4MzA4NTMsNDYuNzU4NDEzOCBMMzEuMzYzMzk0NywxMDIuNjc4MTA0IEMyOS42NDYwNjE0LDEwNC4zOTU0MzggMjkuNjUxODM2MywxMDcuMTcwNDk4IDMxLjM2NzAwMzEsMTA4Ljg4NTY2NCBMNDAuNjg2NzQ1MywxMTguMjA1NDA3IEM0Mi40MDAzOTY3LDExOS45MTkwNTggNDUuMTgxMTMxMywxMTkuOTIyMTg5IDQ2Ljg5NDMwNTIsMTE4LjIwOTAxNSBMOTAuODAwOTI3Niw3NC4zMDIzOTI2IEwxMzQuNDUwNTUsMTE3Ljk1MjAxNSBDMTM2LjE2Nzg4MywxMTkuNjY5MzQ5IDEzOC45NDI5NDMsMTE5LjY2MzU3NCAxNDAuNjU4MTEsMTE3Ljk0ODQw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MDU2MjcsMTgwIDkwLDE4MCBDNDAuMjk0MzcyNSwxODAgMCwxMzkuNzA1NjI3IDAsOTAgWiIgaWQ9IkNpcmNsZSI+PC9wYXRoPjwvZz48L2c+PC9zdmc+");\n}\n.msgapi .mapillary-popup {\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n\n.msgapi .mapillary-popup-content,\n.msgapi .mapillary-popup-content-clean {\n position: relative;\n}\n\n.msgapi .mapillary-popup-capture-pointer {\n pointer-events: auto;\n}\n\n.msgapi .mapillary-popup-content {\n padding: 5px 10px;\n background: white;\n border: 1px solid black;\n border-radius: 2px;\n}\n\n.msgapi .mapillary-popup-float-bottom,\n.msgapi .mapillary-popup-float-bottom-left,\n.msgapi .mapillary-popup-float-bottom-right {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n.msgapi .mapillary-popup-float-top,\n.msgapi .mapillary-popup-float-top-left,\n.msgapi .mapillary-popup-float-top-right {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n\n.msgapi .mapillary-popup-float-left {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n\n.msgapi .mapillary-popup-float-right {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n\n.msgapi .mapillary-popup-tip,\n.msgapi .mapillary-popup-tip-inner {\n position: relative;\n z-index: 1;\n width: 0;\n height: 0;\n border: 7px solid transparent;\n}\n\n.msgapi .mapillary-popup-float-top .mapillary-popup-tip {\n -ms-flex-item-align: center;\n align-self: center;\n border-top-color:black;\n border-bottom: none;\n}\n\n.msgapi .mapillary-popup-float-top .mapillary-popup-tip-inner {\n position: relative;\n top: -8px;\n left: -7px;\n border-top-color: white;\n border-bottom: none;\n}\n\n.msgapi .mapillary-popup-float-top-right .mapillary-popup-tip {\n -ms-flex-item-align: start;\n align-self: flex-start;\n border-top-color:black;\n border-bottom: none;\n border-left: none;\n}\n\n.msgapi .mapillary-popup-float-top-right .mapillary-popup-tip-inner {\n position: relative;\n top: -9px;\n left: 1px;\n border-top-color: white;\n border-bottom: none;\n border-left: none;\n}\n\n.msgapi .mapillary-popup-float-top-left .mapillary-popup-tip {\n -ms-flex-item-align: end;\n align-self: flex-end;\n border-top-color:black;\n border-bottom: none;\n border-right: none;\n}\n\n.msgapi .mapillary-popup-float-top-left .mapillary-popup-tip-inner {\n position: relative;\n top: -9px;\n left: -8px;\n border-top-color: white;\n border-bottom: none;\n border-right: none;\n}\n\n.msgapi .mapillary-popup-float-bottom .mapillary-popup-tip {\n -ms-flex-item-align: center;\n align-self: center;\n border-top: none;\n border-bottom-color: black;\n}\n\n.msgapi .mapillary-popup-float-bottom .mapillary-popup-tip-inner {\n position: relative;\n bottom: -1px;\n left: -7px;\n border-top: none;\n border-bottom-color: white;\n}\n\n.msgapi .mapillary-popup-float-bottom-right .mapillary-popup-tip {\n -ms-flex-item-align: start;\n align-self: flex-start;\n border-bottom-color:black;\n border-top: none;\n border-left: none;\n}\n\n.msgapi .mapillary-popup-float-bottom-right .mapillary-popup-tip-inner {\n position: relative;\n bottom: -2px;\n left: 1px;\n border-bottom-color: white;\n border-top: none;\n border-left: none;\n}\n\n.msgapi .mapillary-popup-float-bottom-left .mapillary-popup-tip {\n -ms-flex-item-align: end;\n align-self: flex-end;\n border-bottom-color:black;\n border-top: none;\n border-right: none;\n}\n\n.msgapi .mapillary-popup-float-bottom-left .mapillary-popup-tip-inner {\n position: relative;\n bottom: -2px;\n left: -8px;\n border-bottom-color: white;\n border-top: none;\n border-right: none;\n}\n\n.msgapi .mapillary-popup-float-left .mapillary-popup-tip {\n -ms-flex-item-align: center;\n align-self: center;\n border-left-color: black;\n border-right: none;\n}\n\n.msgapi .mapillary-popup-float-left .mapillary-popup-tip-inner {\n position: relative;\n top: -7px;\n left: -8px;\n border-left-color: white;\n border-right: none;\n}\n\n.msgapi .mapillary-popup-float-right .mapillary-popup-tip {\n -ms-flex-item-align: center;\n align-self: center;\n border-right-color: black;\n border-left: none;\n}\n\n.msgapi .mapillary-popup-float-right .mapillary-popup-tip-inner {\n position: relative;\n top: -7px;\n left: 1px;\n border-right-color: white;\n border-left: none;\n}\n\n.msgapi .mapillary-popup-float-top-left .mapillary-popup-content {\n border-bottom-right-radius: 0;\n}\n\n.msgapi .mapillary-popup-float-top-right .mapillary-popup-content {\n border-bottom-left-radius: 0;\n}\n\n.msgapi .mapillary-popup-float-bottom-left .mapillary-popup-content {\n border-top-right-radius: 0;\n}\n\n.msgapi .mapillary-popup-float-bottom-right .mapillary-popup-content {\n border-top-left-radius: 0;\n}\n.msgapi .mapillary-sequence-container {\n position: absolute;\n top: 14px;\n pointer-events: none;\n font-size: 0;\n z-index: 10;\n width: 100%;\n}\n\n.msgapi .mapillary-sequence-stepper,\n.msgapi .mapillary-sequence-controls {\n position: absolute;\n left: 50%;\n cursor: pointer;\n}\n\n.msgapi .mapillary-sequence-stepper {\n -webkit-transform: translate(-50%, 0);\n transform: translate(-50%, 0);\n}\n\n.msgapi .mapillary-sequence-expander-button,\n.msgapi .mapillary-sequence-playback-button,\n.msgapi .mapillary-sequence-timeline-button {\n display: inline-block;\n height: 100%;\n pointer-events: auto;\n}\n\n.msgapi .mapillary-sequence-expander-button {\n width: calc(100% * 16 / 88);\n background: rgba(0, 0, 0, 0.5);\n}\n\n.msgapi .mapillary-sequence-expander-bar {\n background-color: white;\n width: 12.5%;\n border-radius: 1px;\n height: calc(100% * 16 / 30);\n position: relative;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.msgapi .mapillary-sequence-playback-button,\n.msgapi .mapillary-sequence-timeline-button {\n width: 0;\n background: rgba(0, 0, 0, 0.5);\n -webkit-transition: width 0.15s ease-out;\n transition: width 0.15s ease-out;\n}\n\n.msgapi .mapillary-sequence-speed-container,\n.msgapi .mapillary-sequence-position-container,\n.msgapi .mapillary-sequence-position-container-inactive {\n display: inline-block;\n height: 100%;\n vertical-align: top;\n background: rgba(0, 0, 0, 0.5);\n pointer-events: auto;\n padding-right: 3px;\n}\n\n.msgapi .mapillary-sequence-speed-container {\n padding-left: 3px;\n}\n\n.msgapi .mapillary-sequence-position-container,\n.msgapi .mapillary-sequence-position-container-inactive {\n padding-left: 16px;\n}\n\n.msgapi .mapillary-sequence-speed,\n.msgapi .mapillary-sequence-position {\n margin: 0;\n padding: 0;\n margin-top: 7px;\n height: 16px;\n cursor: pointer;\n outline: none;\n background: none;\n -webkit-appearance: none;\n}\n\n.msgapi .mapillary-sequence-position-container-inactive .mapillary-sequence-position {\n cursor: default;\n}\n\n.msgapi .mapillary-sequence-fast-icon,\n.msgapi .mapillary-sequence-fast-icon-gray,\n.msgapi .mapillary-sequence-timeline-icon,\n.msgapi .mapillary-sequence-timeline-icon-gray,\n.msgapi .mapillary-sequence-slow-icon,\n.msgapi .mapillary-sequence-switch-icon,\n.msgapi .mapillary-sequence-close-icon {\n position: relative;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n background-size: contain;\n background-repeat: no-repeat;\n opacity: 0;\n}\n\n.msgapi .mapillary-sequence-fast-icon,\n.msgapi .mapillary-sequence-timeline-icon {\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-property: opacity;\n transition-property: opacity;\n}\n\n.msgapi .mapillary-sequence-fast-icon,\n.msgapi .mapillary-sequence-fast-icon-gray,\n.msgapi .mapillary-sequence-timeline-icon,\n.msgapi .mapillary-sequence-timeline-icon-gray,\n.msgapi .mapillary-sequence-slow-icon {\n width: calc(100% * 24 / 36);\n height: calc(100% * 24 / 30);\n}\n\n.msgapi .mapillary-sequence-switch-icon,\n.msgapi .mapillary-sequence-close-icon {\n width: calc(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jkyMy4wMTA4LTEuMjczNC4zNTA0LS4zNTA0LjkxNy0uMzU1MiAxLjI3MzMtLjAxMDhMNy45ODkgNi43MjA1bDMuNDU0NC0zLjQ1NDVjLjIyOTQtLjIyOTQuNTYzOC0uMzE5Ljg3NzItLjIzNS4zMTM1LjA4NC41NTgzLjMyODcuNjQyMy42NDIyLjA4MzguMzEzNC0uMDA1OC42NDc4LS4yMzUyLjg3NzJMOS4yNzM0IDguMDA0N3oiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgogIDwvc3ZnPg==");\n}\n\n.msgapi .mapillary-sequence-icon-visible {\n opacity: 1;\n}\n\n.msgapi .mapillary-sequence-controls-expanded .mapillary-sequence-fast-icon,\n.msgapi .mapillary-sequence-controls-expanded .mapillary-sequence-timeline-icon {\n opacity: 1;\n -webkit-transition-delay: 0.12s;\n transition-delay: 0.12s;\n -webkit-transition: 0.2s ease-in;\n transition: 0.2s ease-in;\n -webkit-transition-property: opacity;\n transition-property: opacity;\n}\n\n.msgapi .mapillary-sequence-controls-expanded .mapillary-sequence-playback-button,\n.msgapi .mapillary-sequence-controls-expanded .mapillary-sequence-timeline-button {\n width: calc(100% * 36 / 88);\n}\n\n.msgapi .mapillary-sequence-playback,\n.msgapi .mapillary-sequence-timeline {\n position: absolute;\n height: 30px;\n width: 405px;\n max-width: 80%;\n min-width: 271px;\n left: 50%;\n padding-left: 5px;\n -webkit-transform: translate(-50%, 0);\n transform: translate(-50%, 0);\n}\n\n.msgapi .mapillary-sequence-switch-button,\n.msgapi .mapillary-sequence-switch-button-inactive,\n.msgapi .mapillary-sequence-slow-container,\n.msgapi .mapillary-sequence-fast-container,\n.msgapi .mapillary-sequence-close-button {\n width: 36px;\n height: 100%;\n display: inline-block;\n pointer-events: auto;\n background: rgba(0, 0, 0, 0.5);\n}\n\n.msgapi .mapillary-sequence-switch-button,\n.msgapi .mapillary-sequence-switch-button-inactive,\n.msgapi .mapillary-sequence-close-button {\n cursor: pointer;\n}\n\n.msgapi .mapillary-sequence-play,\n.msgapi .mapillary-sequence-play-inactive,\n.msgapi .mapillary-sequence-stop,\n.msgapi .mapillary-sequence-step-next,\n.msgapi .mapillary-sequence-step-next-inactive,\n.msgapi .mapillary-sequence-step-next-highlight,\n.msgapi .mapillary-sequence-step-prev,\n.msgapi .mapillary-sequence-step-prev-inactive,\n.msgapi .mapillary-sequence-step-prev-highlight {\n display: inline-block;\n width: calc(100% / 3);\n height: 100%;\n pointer-events: auto;\n}\n\n.msgapi .mapillary-sequence-play-inactive,\n.msgapi .mapillary-sequence-step-next-inactive,\n.msgapi .mapillary-sequence-step-prev-inactive {\n cursor: default;\n}\n\n.msgapi .mapillary-sequence-play,\n.msgapi .mapillary-sequence-play-inactive,\n.msgapi .mapillary-sequence-stop,\n.msgapi .mapillary-sequence-step-next,\n.msgapi .mapillary-sequence-step-next-inactive,\n.msgapi .mapillary-sequence-step-prev,\n.msgapi .mapillary-sequence-step-prev-inactive {\n background: rgba(0, 0, 0, 0.5);\n}\n\n.msgapi .mapillary-sequence-step-next-highlight,\n.msgapi .mapillary-sequence-step-prev-highlight {\n background: rgba(0, 0, 0, 0.5);\n}\n\n.msgapi .mapillary-sequence-switch-button,\n.msgapi .mapillary-sequence-switch-button-inactive,\n.msgapi .mapillary-sequence-position-container,\n.msgapi .mapillary-sequence-position-container-inactive {\n border-bottom-left-radius: 8px;\n border-top-left-radius: 8px;\n}\n\n.msgapi .mapillary-sequence-close-button {\n border-bottom-right-radius: 8px;\n border-top-right-radius: 8px;\n}\n\n.msgapi .mapillary-sequence-play .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-play-inactive .mapillary-sequence-icon {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGl0bGU+CiAgICBwbGF5CiAgPC90aXRsZT4KICA8cGF0aCBkPSJNMTQuODk1MiA4LjY4NjVMMy41MDgyIDE1Ljc1N0MyLjY3ODMgMTYuMzAyIDIgMTUuODk4IDIgMTQuODY1VjEuMTM2QzIgLjEgMi42NzgzLS4zMDEgMy41MDk2LjI0M2wxMS4zODcgNy4wNzNjLS4wMDE0IDAgLjQwNDMuMjg2Ny40MDQzLjY4NTMgMCAuMzk4OC0uNDA1OC42ODU1LS40MDU4LjY4NTV6IiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==");\n}\n\n.msgapi .mapillary-sequence-stop .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-stop-inactive .mapillary-sequence-icon {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGl0bGU+CiAgICBzdG9wCiAgPC90aXRsZT4KICA8cGF0aCBkPSJNMCAxLjk5NEMwIC44OTMuODk0NSAwIDEuOTk0IDBoMTIuMDEyQzE1LjEwNyAwIDE2IC44OTQ1IDE2IDEuOTk0djEyLjAxMkMxNiAxNS4xMDcgMTUuMTA1NSAxNiAxNC4wMDYgMTZIMS45OTRDLjg5MyAxNiAwIDE1LjEwNTUgMCAxNC4wMDZWMS45OTR6IiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==");\n}\n\n.msgapi .mapillary-sequence-step-prev .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-step-prev-inactive .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-step-prev-highlight .mapillary-sequence-icon {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGl0bGU+CiAgICBjaGV2cm9ubGVmdAogIDwvdGl0bGU+CiAgPHBhdGggZD0iTTYuMjY4IDguMDAwMmw1LjUyMTUtNS45NDczYy40NzEtLjQ2OTcuNDcxLTEuMjI5NiAwLTEuNzAxLS40NzEtLjQ2OTQtMS4yMzIzLS40Njk0LTEuNzAzNCAwTDMuMzUzNCA3LjE0OGMtLjQ3MS40NzE0LS40NzEgMS4yMzMgMCAxLjcwMjZsNi43MzI4IDYuNzk2Yy40Njk1LjQ3MyAxLjIzMjQuNDY5NSAxLjcwMzUgMCAuNDcxLS40Njc4LjQ3MS0xLjIyOTUgMC0xLjcwMDhMNi4yNjggOC4wMDAyeiIgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJldmVub2RkIi8+Cjwvc3ZnPgo=");\n}\n\n.msgapi .mapillary-sequence-step-next .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-step-next-inactive .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-step-next-highlight .mapillary-sequence-icon {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGl0bGU+CiAgICBjaGV2cm9ucmlnaHQKICA8L3RpdGxlPgogIDxwYXRoIGQ9Ik05Ljg3NSA4LjAwMDJMNC4zNTMyIDIuMDUzYy0uNDcxLS40Njk3LS40NzEtMS4yMjk2IDAtMS43MDEuNDcxMi0uNDY5NCAxLjIzMjMtLjQ2OTQgMS43MDM0IDBsNi43MzI4IDYuNzk2Yy40NzEuNDcxNC40NzEgMS4yMzMgMCAxLjcwMjZsLTYuNzMyOCA2Ljc5NmMtLjQ2OTMuNDczLTEuMjMyMi40Njk1LTEuNzAzNCAwLS40NzEtLjQ2NzgtLjQ3MS0xLjIyOTUgMC0xLjcwMDhMOS44NzUgOC4wMDAyeiIgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJldmVub2RkIi8+Cjwvc3ZnPgo=");\n}\n\n.msgapi .mapillary-sequence-play-inactive .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-stop-inactive .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-step-next-inactive .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-step-prev-inactive .mapillary-sequence-icon,\n.msgapi .mapillary-sequence-switch-button-inactive .mapillary-sequence-switch-icon {\n opacity: 0.35;\n}\n\n.msgapi .mapillary-sequence-icon {\n position: relative;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: calc(100% * 16 / 36);\n height: calc(100% * 16 / 30);\n background-size: contain;\n background-repeat: no-repeat;\n}\n\n.msgapi .mapillary-sequence-speed::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n border: 2px solid white;\n background: white;\n cursor: pointer;\n margin-top: -6px;\n}\n\n.msgapi .mapillary-sequence-position::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n border: 2px solid white;\n background: white;\n cursor: pointer;\n margin-top: -6px;\n}\n\n.msgapi .mapillary-sequence-position-container-inactive\n .mapillary-sequence-position::-webkit-slider-thumb {\n border: none;\n background: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n\n.msgapi .mapillary-sequence-speed::-webkit-slider-runnable-track,\n.msgapi .mapillary-sequence-position::-webkit-slider-runnable-track {\n height: 4px;\n border-radius: 2px;\n background-color: white;\n}\n\n.msgapi .mapillary-sequence-position-container-inactive\n .mapillary-sequence-position::-webkit-slider-runnable-track {\n background-color: #d7dadd;\n}\n\n.msgapi .mapillary-sequence-speed::-moz-focus-outer,\n.msgapi .mapillary-sequence-position::-moz-focus-outer {\n border: 0;\n}\n\n.msgapi .mapillary-sequence-speed::-moz-range-track,\n.msgapi .mapillary-sequence-position::-moz-range-track {\n height: 4px;\n border-radius: 2px;\n background-color: white;\n}\n\n.msgapi .mapillary-sequence-position-container-inactive\n .mapillary-sequence-position::-moz-range-track {\n background-color: #d7dadd;\n}\n\n.msgapi .mapillary-sequence-speed::-moz-range-thumb {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid white;\n background: #dee5ed;\n cursor: pointer;\n margin-top: -6px;\n box-shadow: 1px 2px 4px 0 rgba(0, 0, 0, 0.5);\n}\n\n.msgapi .mapillary-sequence-position::-moz-range-thumb {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid white;\n background: #ff861b;\n cursor: pointer;\n margin-top: -6px;\n box-shadow: 1px 2px 4px 0 rgba(0, 0, 0, 0.5);\n}\n\n.msgapi .mapillary-sequence-position-container-inactive\n .mapillary-sequence-position::-moz-range-thumb {\n border: none;\n background: none;\n box-shadow: none;\n}\n\n.msgapi .mapillary-sequence-speed::-ms-track,\n.msgapi .mapillary-sequence-position::-ms-track {\n height: 2px;\n border-radius: 2px;\n background-color: white;\n}\n\n.msgapi .mapillary-sequence-position-container-inactive\n .mapillary-sequence-position::-ms-track {\n background-color: #d7dadd;\n}\n\n.msgapi .mapillary-sequence-speed::-ms-fill-lower,\n.msgapi .mapillary-sequence-position::-ms-fill-lower {\n height: 0;\n background: none;\n}\n\n.msgapi .mapillary-sequence-speed::-ms-fill-upper,\n.msgapi .mapillary-sequence-position::-ms-fill-upper {\n height: 0;\n background: none;\n}\n\n.msgapi .mapillary-sequence-speed::-ms-thumb {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid white;\n background: white;\n cursor: pointer;\n margin-top: 0;\n}\n\n.msgapi .mapillary-sequence-position::-ms-thumb {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid white;\n background: white;\n cursor: pointer;\n margin-top: 0;\n}\n\n.msgapi .mapillary-sequence-position-container-inactive\n .mapillary-sequence-position::-ms-thumb {\n border: none;\n background: none;\n box-shadow: none;\n}\n\n.msgapi .mapillary-sequence-speed::-ms-tooltip,\n.msgapi .mapillary-sequence-position::-ms-tooltip {\n display: none;\n}\n\n@media (hover: hover) {\n .msgapi .mapillary-sequence-play:hover,\n .msgapi .mapillary-sequence-stop:hover,\n .msgapi .mapillary-sequence-step-prev:hover,\n .msgapi .mapillary-sequence-step-next:hover {\n background: rgba(0, 0, 0, 0.5);\n }\n\n .msgapi .mapillary-sequence-play-inactive:hover,\n .msgapi .mapillary-sequence-step-prev-inactive:hover,\n .msgapi .mapillary-sequence-step-next-inactive:hover {\n background: rgba(0, 0, 0, 0.5);\n }\n\n .msgapi .mapillary-sequence-switch-button-inactive:hover {\n background: rgba(0, 0, 0, 0.5);\n }\n\n .msgapi .mapillary-sequence-playback-button:hover,\n .msgapi .mapillary-sequence-timeline-button:hover,\n .msgapi .mapillary-sequence-switch-button:hover,\n .msgapi .mapillary-sequence-close-button:hover {\n background: rgba(0, 0, 0, 0.5);\n }\n}\n.msgapi .mapillary-slider-container {\n position: absolute;\n bottom: 40px;\n height: 30px;\n left: 50%;\n padding-left: 5px;\n pointer-events: none;\n -webkit-transform: translate(-50%, 0);\n transform: translate(-50%, 0);\n z-index: 10;\n}\n\n.msgapi .mapillary-slider-border {\n display: inline-block;\n width: 8px;\n height: 100%;\n border-bottom-left-radius: 8px;\n border-top-left-radius: 8px;\n pointer-events: auto;\n cursor: default;\n background: rgba(0, 0, 0, 0.5);\n}\n\n.msgapi .mapillary-slider-mode-button,\n.msgapi .mapillary-slider-mode-button-2d,\n.msgapi .mapillary-slider-mode-button-inactive,\n.msgapi .mapillary-slider-mode-button-2d-inactive {\n width: 26px;\n height: 100%;\n display: inline-block;\n pointer-events: auto;\n background: rgba(0, 0, 0, 0.5);\n\n}\n\n.msgapi .mapillary-slider-mode-button,\n.msgapi .mapillary-slider-mode-button-2d {\n cursor: default;\n}\n\n.msgapi .mapillary-slider-mode-button-inactive,\n.msgapi .mapillary-slider-mode-button-2d-inactive {\n cursor: pointer;\n}\n\n.msgapi .mapillary-slider-mode-icon,\n.msgapi .mapillary-slider-mode-icon-2d {\n position: relative;\n top: 50%;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n background-size: contain;\n background-repeat: no-repeat;\n opacity: 1;\n width: 18px;\n height: 18px;\n margin-left: 4px;\n}\n\n.msgapi .mapillary-slider-mode-icon {\n background-image: url(\'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE4IDE3di44NjRjMCAuNTA1IDAgLjk5Ni0uMDM0IDEuNDEyLS4wMzcuNDU4LS4xMjUuOTk3LS40MDIgMS41NGE0IDQgMCAwIDEtMS43NDggMS43NDhjLS41NDMuMjc3LTEuMDgyLjM2NS0xLjU0LjQwMi0uNDE2LjAzNC0uOTA3LjAzNC0xLjQxMi4wMzRINi4xMzZjLS41MDUgMC0uOTk2IDAtMS40MTItLjAzNC0uNDU4LS4wMzctLjk5Ny0uMTI1LTEuNTQtLjQwMmE0IDQgMCAwIDEtMS43NDgtMS43NDhjLS4yNzctLjU0My0uMzY1LTEuMDgyLS40MDItMS41NEExOC4zNiAxOC4zNiAwIDAgMSAxIDE3Ljg2NHYtNi43MjhjMC0uNTA1IDAtLjk5Ni4wMzQtMS40MTIuMDM3LS40NTguMTI1LS45OTcuNDAyLTEuNTRhNCA0IDAgMCAxIDEuNzQ4LTEuNzQ4Yy41NDMtLjI3NyAxLjA4Mi0uMzY1IDEuNTQtLjQwMkM1LjE0IDYgNS42MyA2IDYuMTM2IDZIN3YyaC0uOGMtMS4xMiAwLTEuNjggMC0yLjEwOC4yMThhMiAyIDAgMCAwLS44NzQuODc0QzMgOS41MiAzIDEwLjA4IDMgMTEuMnY2LjZjMCAxLjEyIDAgMS42OC4yMTggMi4xMDhhMiAyIDAgMCAwIC44NzQuODc0QzQuNTIgM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AwLTIuNTIgMC0zLjE2Mi4zMjdhMyAzIDAgMCAwLTEuMzExIDEuMzExek0xMS4xODcgMTVINy4wNHYtLjg4NmwyLjA3LTEuOTE4Yy41MTgtLjUuODEtLjgyNy44MTMtMS4yOS0uMDAzLS41MTEtLjM4OS0uODMtLjkwMy0uODMtLjUzNCAwLS44OTguMzM5LS44OTguODk4SDYuOTU1Yy0uMDAzLTEuMTQyLjg1NS0xLjg3MiAyLjA3My0xLjg3MiAxLjI1NiAwIDIuMDQ2Ljc4MiAyLjA1MSAxLjc5LjAwMy43NDQtLjM4NiAxLjI5My0xLjQxMSAyLjIzbC0uODU1LjgzMnYuMDRoMi4zNzRWMTV6bTUuODM3LTIuOTE1YzAgMS44MTgtMS4wNzQgMi45MTUtMi44NDYgMi45MTVoLTIuMDYzVjkuMTgyaDIuMDhjMS43NTUgMCAyLjgzIDEuMDkgMi44MyAyLjkwM3oiIGZpbGw9IiNmZmYiLz48L3N2Zz4gIA==\');\n}\n\n.msgapi .mapillary-slider-mode-button-inactive .mapillary-slider-mode-icon {\n opacity: 0.35;\n}\n\n.msgapi .mapillary-slider-mode-button-2d-inactive .mapillary-slider-mode-icon-2d {\n opacity: 0.35;\n}\n\n.msgapi .mapillary-slider-position-container {\n display: inline-block;\n height: 100%;\n vertical-align: top;\n background: rgba(0, 0, 0, 0.5);\n pointer-events: auto;\n padding-right: 16px;\n border-bottom-right-radius: 8px;\n border-top-right-radius: 8px;\n padding-left: 8px;\n}\n\n.msgapi .mapillary-slider-position {\n pointer-events: auto;\n margin: 0;\n padding: 0;\n margin-top: 7px;\n height: 16px;\n cursor: pointer;\n outline: none;\n background: none;\n -webkit-appearance: none;\n}\n\n.msgapi .mapillary-slider-position::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n border: 2px solid white;\n background: white;\n cursor: pointer;\n margin-top: -6px;\n}\n\n.msgapi .mapillary-slider-position::-webkit-slider-runnable-track {\n height: 4px;\n border-radius: 2px;\n background-color: white;\n}\n\n.msgapi .mapillary-slider-position::-moz-focus-outer {\n border: 0;\n}\n\n.msgapi .mapillary-slider-position::-moz-range-track {\n height: 4px;\n border-radius: 2px;\n background-color: white;\n}\n\n.msgapi .mapillary-slider-position::-moz-range-thumb {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid white;\n background: white;\n cursor: pointer;\n margin-top: -6px;\n}\n\n.msgapi .mapillary-slider-position::-ms-track {\n height: 2px;\n border-radius: 2px;\n background-color: white;\n}\n\n.msgapi .mapillary-slider-position::-ms-fill-lower {\n height: 0;\n background: none;\n}\n\n.msgapi .mapillary-slider-position::-ms-fill-upper {\n height: 0;\n background: none;\n}\n\n.msgapi .mapillary-slider-position::-ms-thumb {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid white;\n background: white;\n cursor: pointer;\n margin-top: 0;\n}\n\n.msgapi .mapillary-slider-position::-ms-tooltip {\n display: none;\n}\n.msgapi .mapillary-viewer.component-tag-create .mapillary-interactive,\n.msgapi .mapillary-viewer.component-tag-edit-crosshair .mapillary-interactive {\n cursor: crosshair;\n}\n\n.msgapi .mapillary-viewer.component-tag-edit-move .mapillary-interactive {\n cursor: move;\n}\n\n.msgapi .mapillary-viewer.component-tag-edit-nesw-resize .mapillary-interactive {\n cursor: nesw-resize;\n}\n\n.msgapi .mapillary-viewer.component-tag-edit-nwse-resize .mapillary-interactive {\n cursor: nwse-resize;\n}\n\n.msgapi .mapillary-tag-container {\n font-size: 12px;\n font-family: system-ui, -apple-system, BlinkMacSystemFont,\n "Segoe UI", "Roboto", "Oxygen", "Ubuntu",\n "Cantarell", "Fira Sans", "Droid Sans",\n "Helvetica Neue", sans-serif;\n}\n\n.msgapi .mapillary-tag-completer,\n.msgapi .mapillary-tag-interactor,\n.msgapi .mapillary-tag-mover,\n.msgapi .mapillary-tag-resizer,\n.msgapi .mapillary-tag-spot-interactor,\n.msgapi .mapillary-tag-symbol,\n.msgapi .mapillary-tag-vertex {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.msgapi .mapillary-tag-symbol {\n cursor: pointer;\n pointer-events: auto;\n}\n\n.msgapi .mapillary-tag-mover,\n.msgapi .mapillary-tag-resizer {\n pointer-events: auto;\n}\n\n.msgapi .mapillary-tag-mover {\n border-radius: 7px;\n width: 14px;\n height: 14px;\n opacity: 0.2;\n cursor: move;\n}\n\n.msgapi .mapillary-tag-mover:hover {\n opacity: 0.5;\n}\n\n.msgapi .mapillary-tag-resizer {\n border-radius: 7px;\n width: 14px;\n height: 14px;\n opacity: 0;\n cursor: crosshair;\n}\n\n.msgapi .mapillary-tag-resizer:hover {\n opacity: 0.3;\n}\n\n.msgapi .mapillary-tag-vertex {\n pointer-events: none;\n border-radius: 3px;\n width: 6px;\n height: 6px;\n}\n\n.msgapi .mapillary-tag-dot {\n pointer-events: none;\n border-radius: 1.5px;\n width: 3px;\n height: 3px;\n background-color: green;\n}\n\n.msgapi .mapillary-tag-vertex.mapillary-tag-larger {\n border-radius: 4px;\n width: 8px;\n height: 8px;\n}\n\n.msgapi .mapillary-tag-interactor,\n.msgapi .mapillary-tag-completer,\n.msgapi .mapillary-tag-spot-interactor {\n pointer-events: auto;\n border-radius: 7px;\n width: 14px;\n height: 14px;\n opacity: 0;\n}\n\n.msgapi .mapillary-tag-completer.mapillary-tag-larger {\n border-radius: 8px;\n width: 16px;\n height: 16px;\n}\n\n.msgapi .mapillary-tag-interactor,\n.msgapi .mapillary-tag-completer {\n cursor: pointer;\n}\n\n.msgapi .mapillary-tag-spot-interactor {\n cursor: move;\n}\n\n.msgapi .mapillary-tag-completer {\n background: limegreen;\n}\n\n.msgapi .mapillary-tag-interactor {\n background: orangered;\n}\n\n.msgapi .mapillary-tag-completer:hover,\n.msgapi .mapillary-tag-interactor:hover {\n opacity: 0.6;\n}\n\n.msgapi .mapillary-tag-spot-interactor:hover {\n opacity: 0.3;\n}\n.msgapi .mapillary-zoom-container {\n position: absolute;\n bottom: 90px;\n right: 14px;\n height: 66px;\n width: 32px;\n pointer-events: none;\n z-index: 10;\n}\n\n.msgapi .mapillary-zoom-in-button,\n.msgapi .mapillary-zoom-in-button-inactive,\n.msgapi .mapillary-zoom-out-button,\n.msgapi .mapillary-zoom-out-button-inactive {\n width: 100%;\n height: 32px;\n pointer-events: auto;\n background: rgba(0, 0, 0, 0.5);\n cursor: pointer;\n}\n\n.msgapi .mapillary-zoom-in-button,\n.msgapi .mapillary-zoom-in-button-inactive {\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n}\n\n.msgapi .mapillary-zoom-out-button,\n.msgapi .mapillary-zoom-out-button-inactive {\n margin-top: 2px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n}\n\n.msgapi .mapillary-zoom-in-button-inactive,\n.msgapi .mapillary-zoom-out-button-inactive {\n cursor: default;\n}\n\n.msgapi .mapillary-zoom-in-icon,\n.msgapi .mapillary-zoom-out-icon {\n position: relative;\n top: 0;\n left: 0;\n background-size: contain;\n background-repeat: no-repeat;\n opacity: 1;\n width: 32px;\n height: 32px;\n}\n\n.msgapi .mapillary-zoom-compact.mapillary-zoom-container {\n height: 34px;\n width: 16px;\n bottom: 58px;\n}\n\n.msgapi .mapillary-zoom-compact .mapillary-zoom-in-button,\n.msgapi .mapillary-zoom-compact .mapillary-zoom-in-button-inactive,\n.msgapi .mapillary-zoom-compact .mapillary-zoom-out-button,\n.msgapi .mapillary-zoom-compact .mapillary-zoom-out-button-inactive,\n.msgapi .mapillary-zoom-compact .mapillary-zoom-in-icon,\n.msgapi .mapillary-zoom-compact .mapillary-zoom-out-icon {\n width: 16px;\n height: 16px;\n}\n\n.msgapi .mapillary-zoom-compact .mapillary-zoom-in-button,\n.msgapi .mapillary-zoom-compact .mapillary-zoom-in-button-inactive {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n\n.msgapi .mapillary-zoom-compact .mapillary-zoom-out-button,\n.msgapi .mapillary-zoom-compact .mapillary-zoom-out-button-inactive {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n\n.msgapi .mapillary-zoom-in-icon {\n background-image: url(\'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIgdmlld0JveD0iMCAwIDMwIDMwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTE2LDE0IEwyMSwxNCBDMjEuNTUyMjg0NywxNCAyMiwxNC40NDc3MTUzIDIyLDE1IEMyMiwxNS41NTIyODQ3IDIxLjU1MjI4NDcsMTYgMjEsMTYgTDE2LDE2IEwxNiwyMSBDMTYsMjEuNTUyMjg0NyAxNS41NTIyODQ3LDIyIDE1LDIyIEMxNC40NDc3MTUzLDIyIDE0LDIxLjU1MjI4NDcgMTQsMjEgTDE0LDE2IEw5LDE2IEM4LjQ0NzcxNTI1LDE2IDgsMTUuNTUyMjg0NyA4LDE1IEM4LDE0LjQ0NzcxNTMgOC40NDc3MTUyNSwxNCA5LDE0IEwxNCwxNCBMMTQsOSBDMTQsOC40NDc3MTUyNSAxNC40NDc3MTUzLDggMTUsOCBDMTUuNTUyMjg0Nyw4IDE2LDguNDQ3NzE1MjUgMTYsOSBMMTYsMTQgWiIvPjwvZz4gIDwvc3ZnPiAg\');\n}\n\n.msgapi .mapillary-zoom-out-icon {\n background-image: url(\'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIgdmlld0JveD0iMCAwIDMwIDMwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTIyLDE1IEMyMiwxNS41NTIyODQ3IDIxLjU1MjI4NDcsMTYgMjEsMTYgTDksMTYgQzguNDQ3NzE1MjUsMTYgOCwxNS41NTIyODQ3IDgsMTUgQzgsMTQuNDQ3NzE1MyA4LjQ0NzcxNTI1LDE0IDksMTQgTDIxLDE0IEMyMS41NTIyODQ3LDE0IDIyLDE0LjQ0NzcxNTMgMjIsMTUgWiIvPjwvZz4gIDwvc3ZnPiAg\');\n}\n\n.msgapi .mapillary-zoom-in-button-inactive .mapillary-zoom-in-icon,\n.msgapi .mapillary-zoom-out-button-inactive .mapillary-zoom-out-icon {\n opacity: 0.35;\n}\n',""]);const s=r},178640:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Alignment:()=>Ly,ArgumentMapillaryError:()=>Ld,BearingComponent:()=>u_,CacheComponent:()=>p_,CameraControls:()=>UT,CameraVisualizationMode:()=>U_,CancelMapillaryError:()=>d_,CircleMarker:()=>zT,Component:()=>o_,ComponentSize:()=>i_,DataProviderBase:()=>wT,DirectionComponent:()=>f_,DragPanHandler:()=>oM,EventEmitter:()=>s_,ExtremePointTag:()=>Py,Geometry:()=>$M,GeometryProviderBase:()=>TT,GeometryTagError:()=>BM,GraphDataProvider:()=>ET,GraphMapillaryError:()=>$d,Image:()=>Td,KeyPlayHandler:()=>q_,KeySequenceNavigationHandler:()=>H_,KeySpatialNavigationHandler:()=>V_,KeyZoomHandler:()=>Y_,KeyboardComponent:()=>W_,MapillaryError:()=>Ed,Marker:()=>LT,MarkerComponent:()=>Z_,NavigationDirection:()=>Id,OriginalPositionMode:()=>$_,OutlineTag:()=>Uy,PointGeometry:()=>Gy,PointVisualizationMode:()=>B_,PointerComponent:()=>uM,PointsGeometry:()=>FM,PolygonGeometry:()=>Ty,Popup:()=>OT,PopupComponent:()=>dM,RectGeometry:()=>by,RenderMode:()=>$T,RenderPass:()=>BT,S2GeometryProvider:()=>IT,ScrollZoomHandler:()=>lM,SequenceComponent:()=>mM,SimpleMarker:()=>jT,SliderComponent:()=>vM,SliderConfigurationMode:()=>R_,SpatialComponent:()=>UM,SpotTag:()=>By,Tag:()=>ky,TagComponent:()=>Ky,TagDomain:()=>Ey,TagMode:()=>Cy,TouchZoomHandler:()=>hM,TransitionMode:()=>FT,VertexGeometry:()=>xy,Viewer:()=>CS,ZoomComponent:()=>ex,decompress:()=>MT,ecefToEnu:()=>vd,ecefToGeodetic:()=>bd,enuToEcef:()=>yd,enuToGeodetic:()=>Md,fetchArrayBuffer:()=>vT,geodeticToEcef:()=>xd,geodeticToEnu:()=>_d,isFallbackSupported:()=>RT,isSupported:()=>PT,readMeshPbf:()=>xT});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function s(e,t){var i,n,r,s,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,s=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a}function c(e,t){for(var i=0,n=t.length,r=e.length;i0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,i=t.hasError,n=t.isStopped,r=t.observers;return i||n?m:(r.push(e),new g((function(){return d(r,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,i=t.hasError,n=t.thrownError,r=t.isStopped;i?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new P;return e.source=this,e},t.create=function(e,t){return new Y(e,t)},t}(P),Y=function(e){function t(t,i){var n=e.call(this)||this;return n.destination=t,n.source=i,n}return r(t,e),t.prototype.next=function(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,e)},t.prototype.error=function(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==i?i:m},t}(V),q=function(e){function t(t){var i=e.call(this)||this;return i._value=t,i}return r(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var i=e.prototype._subscribe.call(this,t);return!i.closed&&t.next(this._value),i},t.prototype.getValue=function(){var e=this,t=e.hasError,i=e.thrownError,n=e._value;if(t)throw i;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(V),W={now:function(){return(W.delegate||Date).now()},delegate:void 0},Q=function(e){function t(t,i,n){void 0===t&&(t=1/0),void 0===i&&(i=1/0),void 0===n&&(n=W);var r=e.call(this)||this;return r._bufferSize=t,r._windowTime=i,r._timestampProvider=n,r._buffer=[],r._infiniteTimeWindow=!0,r._infiniteTimeWindow=i===1/0,r._bufferSize=Math.max(1,t),r._windowTime=Math.max(1,i),r}return r(t,e),t.prototype.next=function(t){var i=this,n=i.isStopped,r=i._buffer,s=i._infiniteTimeWindow,a=i._timestampProvider,o=i._windowTime;n||(r.push(t),!s&&r.push(a.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),i=this._infiniteTimeWindow,n=this._buffer.slice(),r=0;r1||o(e,t)}))})}function o(e,t){try{(i=r[e](t)).value instanceof l?Promise.resolve(i.value.v).then(c,h):u(s[0][2],i)}catch(e){u(s[0][3],e)}var i}function c(e){o("next",e)}function h(e){o("throw",e)}function u(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}(this,arguments,(function(){var t,i,n;return s(this,(function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,l(t.read())];case 3:return i=r.sent(),n=i.value,i.done?[4,l(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,l(n)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function fe(e){return h(null==e?void 0:e.getReader)}function _e(e,t){return t?function(e,t){if(null!=e){if(ue(e))return function(e,t){return new P((function(i){var n=new g;return n.add(t.schedule((function(){var r=e[O]();n.add(r.subscribe({next:function(e){n.add(t.schedule((function(){return i.next(e)})))},error:function(e){n.add(t.schedule((function(){return i.error(e)})))},complete:function(){n.add(t.schedule((function(){return i.complete()})))}}))}))),n}))}(e,t);if(ae(e))return se(e,t);if(oe(e))return function(e,t){return new P((function(i){return t.schedule((function(){return e.then((function(e){i.add(t.schedule((function(){i.next(e),i.add(t.schedule((function(){return i.complete()})))})))}),(function(e){i.add(t.schedule((function(){return i.error(e)})))}))}))}))}(e,t);if(de(e))return he(e,t);if(pe(e))return function(e,t){return new P((function(i){var n;return i.add(t.schedule((function(){n=e[ce](),le(i,t,(function(){var e=n.next(),t=e.value;e.done?i.complete():(i.next(t),this.schedule())}))}))),function(){return h(null==n?void 0:n.return)&&n.return()}}))}(e,t);if(fe(e))return function(e,t){return he(me(e),t)}(e,t)}throw ge(e)}(e,t):Me(e)}function Me(e){if(e instanceof P)return e;if(null!=e){if(ue(e))return n=e,new P((function(e){var t=n[O]();if(h(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(ae(e))return ve(e);if(oe(e))return i=e,new P((function(e){i.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,w)}));if(de(e))return ye(e);if(pe(e))return t=e,new P((function(e){var i,n;try{for(var r=a(t),s=r.next();!s.done;s=r.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}e.complete()}));if(fe(e))return ye(me(e))}var t,i,n;throw ge(e)}function ve(e){return new P((function(t){for(var i=0;i0&&u(r)}),void 0,void 0,(function(){(null==s?void 0:s.closed)||null==s||s.unsubscribe(),o=null}))),u(null!=n?"number"==typeof n?n:+n-c.now():r)}))}function Le(e){throw new Ae(e)}function ze(e,t){return $((function(i,n){var r=0;i.subscribe(new B(n,(function(i){n.next(e.call(t,i,r++))})))}))}var je=Array.isArray;function Oe(e){return ze((function(t){return function(e,t){return je(t)?e.apply(void 0,c([],o(t))):e(t)}(e,t)}))}var ke=Array.isArray,Pe=Object.getPrototypeOf,Re=Object.prototype,Ue=Object.keys;function $e(){for(var e=[],t=0;t=2,!1,!0))}function ot(e,t){return h(t)?Ge(e,t,1):Ge(e,1)}var ct={connector:function(){return new V}};function lt(e,t){void 0===t&&(t=ct);var i=t.connector;return $((function(t,n){var r,s=i();_e(e((r=s,new P((function(e){return r.subscribe(e)}))))).subscribe(n),n.add(t.subscribe(s))}))}function ht(e,t){return void 0===t&&(t=te),$((function(i,n){var r=null,s=null,a=null,o=function(){if(r){r.unsubscribe(),r=null;var e=s;s=null,n.next(e)}};function c(){var i=a+e,s=t.now();if(s=2;return function(n){return n.pipe(e?et((function(t,i){return e(t,i,n)})):k,pt(1),i?ut(t):mt((function(){return new Ie})))}}function yt(e){return e<=0?function(){return ne}:$((function(t,i){var n=[];t.subscribe(new B(i,(function(t){n.push(t),e=2;return function(n){return n.pipe(e?et((function(t,i){return e(t,i,n)})):k,yt(1),i?ut(t):mt((function(){return new Ie})))}}function bt(e,t){var i=h(e)?e:function(){return e};return h(t)?lt(t,{connector:i}):function(e){return new G(e,i)}}function wt(){return $((function(e,t){var i,n=!1;e.subscribe(new B(t,(function(e){var r=i;i=e,n&&t.next([r,e]),n=!0})))}))}function Tt(e){return e?function(t){return lt(e)(t)}:function(e){return bt(new V)(e)}}function St(e,t,i,n){i&&!h(i)&&(n=i);var r=h(i)?i:void 0;return function(i){return bt(new Q(e,t,n),r)(i)}}function Nt(e){var t;void 0===e&&(e=1/0);var i=(t=e&&"object"==typeof e?e:{count:e}).count,n=void 0===i?1/0:i,r=t.delay,s=t.resetOnSuccess,a=void 0!==s&&s;return n<=0?k:$((function(e,t){var i,s=0,o=function(){var c=!1;i=e.subscribe(new B(t,(function(e){a&&(s=0),t.next(e)}),void 0,(function(e){if(s++=2,!0))}function It(e){void 0===e&&(e={});var t=e.connector,i=void 0===t?function(){return new V}:t,n=e.resetOnError,r=void 0===n||n,s=e.resetOnComplete,a=void 0===s||s,o=e.resetOnRefCountZero,c=void 0===o||o;return function(e){var t=null,n=null,s=null,o=0,l=!1,h=!1,u=function(){null==n||n.unsubscribe(),n=null},p=function(){u(),t=s=null,l=h=!1},d=function(){var e=t;p(),null==e||e.unsubscribe()};return $((function(e,g){o++,h||l||u();var m=s=null!=s?s:i();g.add((function(){0!=--o||h||l||(n=Ct(d,c))})),m.subscribe(g),t||(t=new A({next:function(e){return m.next(e)},error:function(e){h=!0,u(),n=Ct(p,r,e),m.error(e)},complete:function(){l=!0,u(),n=Ct(p,a),m.complete()}}),_e(e).subscribe(t))}))(e)}}function Ct(e,t){for(var i=[],n=2;n"===t||">="===t||"<"===t||"<="===t?this._compileComparisonOp(t,e[1],e[2],!0):"in"===t?this._compileInOp(e[1],e.slice(2)):"!in"===t?this._compileNegation(this._compileInOp(e[1],e.slice(2))):"all"===t?this._compileLogicalOp(e.slice(1),"&&"):"true")+")"}_compare(e,t){return et?1:0}_compileComparisonOp(e,t,i,n){const r=this._compilePropertyReference(t),s=JSON.stringify(i);return(n?"typeof "+r+"===typeof "+s+"&&":"")+r+e+s}_compileInOp(e,t){const i=this._compare;return JSON.stringify(t.sort(i))+".indexOf("+this._compilePropertyReference(e)+")!==-1"}_compileLogicalOp(e,t){const i=this._compile.bind(this);return e.map(i).join(t)}_compileNegation(e){return"!("+e+")"}_compilePropertyReference(e){return"node["+JSON.stringify(e)+"]"}}const Ut=0,$t=1,Bt=2,Ft=1,Gt=2,Ht=3,Vt=0,Yt=1,qt=2,Wt=0,Qt=1,Zt=2,Xt=3,Jt=4,Kt=5,ei=100,ti=101,ii=102,ni=103,ri=104,si=200,ai=201,oi=202,ci=203,li=204,hi=205,ui=206,pi=207,di=208,gi=209,mi=210,fi=0,_i=1,Mi=2,vi=3,yi=4,xi=5,bi=6,wi=7,Ti=0,Si=1,Ni=2,Di=0,Ii=1,Ci=2,Ai=3,Ei=4,Li=5,zi=301,ji=302,Oi=303,ki=304,Pi=306,Ri=307,Ui=1e3,$i=1001,Bi=1002,Fi=1003,Gi=1004,Hi=1005,Vi=1006,Yi=1007,qi=1008,Wi=1009,Qi=1010,Zi=1011,Xi=1012,Ji=1013,Ki=1014,en=1015,tn=1016,nn=1017,rn=1018,sn=1019,an=1020,on=1021,cn=1022,ln=1023,hn=1024,un=1025,pn=ln,dn=1026,gn=1027,mn=1028,fn=1029,_n=1030,Mn=1031,vn=1032,yn=1033,xn=33776,bn=33777,wn=33778,Tn=33779,Sn=35840,Nn=35841,Dn=35842,In=35843,Cn=36196,An=37492,En=37496,Ln=37808,zn=37809,jn=37810,On=37811,kn=37812,Pn=37813,Rn=37814,Un=37815,$n=37816,Bn=37817,Fn=37818,Gn=37819,Hn=37820,Vn=37821,Yn=36492,qn=37840,Wn=37841,Qn=37842,Zn=37843,Xn=37844,Jn=37845,Kn=37846,er=37847,tr=37848,ir=37849,nr=37850,rr=37851,sr=37852,ar=37853,or=2300,cr=2301,lr=2302,hr=2400,ur=2401,pr=2402,dr=3e3,gr=3001,mr=3007,fr=3002,_r=3003,Mr=3004,vr=3005,yr=3006,xr=3201,br=0,wr=1,Tr=7680,Sr=35044,Nr=35048,Dr="300 es";class Ir{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const i=this._listeners[e];if(void 0!==i){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const i=t.slice(0);for(let t=0,n=i.length;t>8&255]+Lr[e>>16&255]+Lr[e>>24&255]+"-"+Lr[255&t]+Lr[t>>8&255]+"-"+Lr[t>>16&15|64]+Lr[t>>24&255]+"-"+Lr[63&i|128]+Lr[i>>8&255]+"-"+Lr[i>>16&255]+Lr[i>>24&255]+Lr[255&n]+Lr[n>>8&255]+Lr[n>>16&255]+Lr[n>>24&255]).toUpperCase()}function Or(e,t,i){return Math.max(t,Math.min(i,e))}function kr(e,t){return(e%t+t)%t}function Pr(e,t,i){return(1-i)*e+i*t}function Rr(e){return!(e&e-1)&&0!==e}function Ur(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var $r=Object.freeze({__proto__:null,DEG2RAD:Ar,RAD2DEG:Er,generateUUID:jr,clamp:Or,euclideanModulo:kr,mapLinear:function(e,t,i,n,r){return n+(e-t)*(r-n)/(i-t)},inverseLerp:function(e,t,i){return e!==t?(i-e)/(t-e):0},lerp:Pr,damp:function(e,t,i,n){return Pr(e,t,1-Math.exp(-i*n))},pingpong:function(e,t=1){return t-Math.abs(kr(e,2*t)-t)},smoothstep:function(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){return void 0!==e&&(Cr=e%2147483647),Cr=16807*Cr%2147483647,(Cr-1)/2147483646},degToRad:function(e){return e*Ar},radToDeg:function(e){return e*Er},isPowerOfTwo:Rr,ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:Ur,setQuaternionFromProperEuler:function(e,t,i,n,r){const s=Math.cos,a=Math.sin,o=s(i/2),c=a(i/2),l=s((t+n)/2),h=a((t+n)/2),u=s((t-n)/2),p=a((t-n)/2),d=s((n-t)/2),g=a((n-t)/2);switch(r){case"XYX":e.set(o*h,c*u,c*p,o*l);break;case"YZY":e.set(c*p,o*h,c*u,o*l);break;case"ZXZ":e.set(c*u,c*p,o*h,o*l);break;case"XZX":e.set(o*h,c*g,c*d,o*l);break;case"YXY":e.set(c*d,o*h,c*g,o*l);break;case"ZYZ":e.set(c*g,c*d,o*h,o*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}});class Br{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,i){return void 0!==i&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),n=Math.sin(t),r=this.x-e.x,s=this.y-e.y;return this.x=r*i-s*n+e.x,this.y=r*n+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}Br.prototype.isVector2=!0;class Fr{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,n,r,s,a,o,c){const l=this.elements;return l[0]=e,l[1]=n,l[2]=a,l[3]=t,l[4]=r,l[5]=o,l[6]=i,l[7]=s,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,r=this.elements,s=i[0],a=i[3],o=i[6],c=i[1],l=i[4],h=i[7],u=i[2],p=i[5],d=i[8],g=n[0],m=n[3],f=n[6],_=n[1],M=n[4],v=n[7],y=n[2],x=n[5],b=n[8];return r[0]=s*g+a*_+o*y,r[3]=s*m+a*M+o*x,r[6]=s*f+a*v+o*b,r[1]=c*g+l*_+h*y,r[4]=c*m+l*M+h*x,r[7]=c*f+l*v+h*b,r[2]=u*g+p*_+d*y,r[5]=u*m+p*M+d*x,r[8]=u*f+p*v+d*b,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],s=e[4],a=e[5],o=e[6],c=e[7],l=e[8];return t*s*l-t*a*c-i*r*l+i*a*o+n*r*c-n*s*o}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],s=e[4],a=e[5],o=e[6],c=e[7],l=e[8],h=l*s-a*c,u=a*o-l*r,p=c*r-s*o,d=t*h+i*u+n*p;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);const g=1/d;return e[0]=h*g,e[1]=(n*c-l*i)*g,e[2]=(a*i-n*s)*g,e[3]=u*g,e[4]=(l*t-n*o)*g,e[5]=(n*r-a*t)*g,e[6]=p*g,e[7]=(i*o-c*t)*g,e[8]=(s*t-i*r)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,r,s,a){const o=Math.cos(r),c=Math.sin(r);return this.set(i*o,i*c,-i*(o*s+c*a)+s+e,-n*c,n*o,-n*(-c*s+o*a)+a+t,0,0,1),this}scale(e,t){const i=this.elements;return i[0]*=e,i[3]*=e,i[6]*=e,i[1]*=t,i[4]*=t,i[7]*=t,this}rotate(e){const t=Math.cos(e),i=Math.sin(e),n=this.elements,r=n[0],s=n[3],a=n[6],o=n[1],c=n[4],l=n[7];return n[0]=t*r+i*o,n[3]=t*s+i*c,n[6]=t*a+i*l,n[1]=-i*r+t*o,n[4]=-i*s+t*c,n[7]=-i*a+t*l,this}translate(e,t){const i=this.elements;return i[0]+=e*i[2],i[3]+=e*i[5],i[6]+=e*i[8],i[1]+=t*i[2],i[4]+=t*i[5],i[7]+=t*i[8],this}equals(e){const t=this.elements,i=e.elements;for(let e=0;e<9;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}function Gr(e){if(0===e.length)return-1/0;let t=e[0];for(let i=1,n=e.length;it&&(t=e[i]);return t}function Hr(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function Vr(e,t=0){let i=3735928559^t,n=1103547991^t;for(let t,r=0;r>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),4294967296*(2097151&n)+(i>>>0)}let Yr;Fr.prototype.isMatrix3=!0;class qr{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Yr&&(Yr=Hr("canvas")),Yr.width=e.width,Yr.height=e.height;const i=Yr.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Yr}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}}let Wr=0;class Qr extends Ir{constructor(e=Qr.DEFAULT_IMAGE,t=Qr.DEFAULT_MAPPING,i=$i,n=$i,r=Vi,s=qi,a=ln,o=Wi,c=1,l=dr){super(),Object.defineProperty(this,"id",{value:Wr++}),this.uuid=jr(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=i,this.wrapT=n,this.magFilter=r,this.minFilter=s,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=o,this.offset=new Br(0,0),this.repeat=new Br(1,1),this.center=new Br(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Fr,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=l,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const i={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const n=this.image;if(void 0===n.uuid&&(n.uuid=jr()),!t&&void 0===e.images[n.uuid]){let t;if(Array.isArray(n)){t=[];for(let e=0,i=n.length;e1)switch(this.wrapS){case Ui:e.x=e.x-Math.floor(e.x);break;case $i:e.x=e.x<0?0:1;break;case Bi:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Ui:e.y=e.y-Math.floor(e.y);break;case $i:e.y=e.y<0?0:1;break;case Bi:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&this.version++}}function Zr(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?qr.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}Qr.DEFAULT_IMAGE=void 0,Qr.DEFAULT_MAPPING=300,Qr.prototype.isTexture=!0;class Xr{constructor(e=0,t=0,i=0,n=1){this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,r=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*t+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*t+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*t+s[7]*i+s[11]*n+s[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,r;const s=.01,a=.1,o=e.elements,c=o[0],l=o[4],h=o[8],u=o[1],p=o[5],d=o[9],g=o[2],m=o[6],f=o[10];if(Math.abs(l-u)o&&e>_?e_?o=0?1:-1,n=1-t*t;if(n>Number.EPSILON){const r=Math.sqrt(n),s=Math.atan2(r,t*i);e=Math.sin(e*s)/r,a=Math.sin(a*s)/r}const r=a*i;if(o=o*e+u*r,c=c*e+p*r,l=l*e+d*r,h=h*e+g*r,e===1-a){const e=1/Math.sqrt(o*o+c*c+l*l+h*h);o*=e,c*=e,l*=e,h*=e}}e[t]=o,e[t+1]=c,e[t+2]=l,e[t+3]=h}static multiplyQuaternionsFlat(e,t,i,n,r,s){const a=i[n],o=i[n+1],c=i[n+2],l=i[n+3],h=r[s],u=r[s+1],p=r[s+2],d=r[s+3];return e[t]=a*d+l*h+o*p-c*u,e[t+1]=o*d+l*u+c*h-a*p,e[t+2]=c*d+l*p+a*u-o*h,e[t+3]=l*d-a*h-o*u-c*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const i=e._x,n=e._y,r=e._z,s=e._order,a=Math.cos,o=Math.sin,c=a(i/2),l=a(n/2),h=a(r/2),u=o(i/2),p=o(n/2),d=o(r/2);switch(s){case"XYZ":this._x=u*l*h+c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h-u*p*d;break;case"YXZ":this._x=u*l*h+c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h+u*p*d;break;case"ZXY":this._x=u*l*h-c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h-u*p*d;break;case"ZYX":this._x=u*l*h-c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h+u*p*d;break;case"YZX":this._x=u*l*h+c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h-u*p*d;break;case"XZY":this._x=u*l*h-c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h+u*p*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=t[4],r=t[8],s=t[1],a=t[5],o=t[9],c=t[2],l=t[6],h=t[10],u=i+a+h;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(l-o)*e,this._y=(r-c)*e,this._z=(s-n)*e}else if(i>a&&i>h){const e=2*Math.sqrt(1+i-a-h);this._w=(l-o)/e,this._x=.25*e,this._y=(n+s)/e,this._z=(r+c)/e}else if(a>h){const e=2*Math.sqrt(1+a-i-h);this._w=(r-c)/e,this._x=(n+s)/e,this._y=.25*e,this._z=(o+l)/e}else{const e=2*Math.sqrt(1+h-i-a);this._w=(s-n)/e,this._x=(r+c)/e,this._y=(o+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Or(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(0===i)return this;const n=Math.min(1,t/i);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,n=e._y,r=e._z,s=e._w,a=t._x,o=t._y,c=t._z,l=t._w;return this._x=i*l+s*a+n*c-r*o,this._y=n*l+s*o+r*a-i*c,this._z=r*l+s*c+i*o-n*a,this._w=s*l-i*a-n*o-r*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const i=this._x,n=this._y,r=this._z,s=this._w;let a=s*e._w+i*e._x+n*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=i,this._y=n,this._z=r,this;const o=1-a*a;if(o<=Number.EPSILON){const e=1-t;return this._w=e*s+t*this._w,this._x=e*i+t*this._x,this._y=e*n+t*this._y,this._z=e*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(o),l=Math.atan2(c,a),h=Math.sin((1-t)*l)/c,u=Math.sin(t*l)/c;return this._w=s*h+this._w*u,this._x=i*h+this._x*u,this._y=n*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,i){this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),n=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(n),i*Math.sin(r),i*Math.cos(r),t*Math.sin(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}es.prototype.isQuaternion=!0;class ts{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(ns.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(ns.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*n,this.y=r[1]*t+r[4]*i+r[7]*n,this.z=r[2]*t+r[5]*i+r[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,r=e.elements,s=1/(r[3]*t+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*t+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*t+r[6]*i+r[10]*n+r[14])*s,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,r=e.x,s=e.y,a=e.z,o=e.w,c=o*t+s*n-a*i,l=o*i+a*t-r*n,h=o*n+r*i-s*t,u=-r*t-s*i-a*n;return this.x=c*o+u*-r+l*-a-h*-s,this.y=l*o+u*-s+h*-r-c*-a,this.z=h*o+u*-a+c*-s-l*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*n,this.y=r[1]*t+r[5]*i+r[9]*n,this.z=r[2]*t+r[6]*i+r[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,n=e.y,r=e.z,s=t.x,a=t.y,o=t.z;return this.x=n*o-r*a,this.y=r*s-i*o,this.z=i*a-n*s,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return is.copy(this).projectOnVector(e),this.sub(is)}reflect(e){return this.sub(is.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Or(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,i){return void 0!==i&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}ts.prototype.isVector3=!0;const is=new ts,ns=new es;class rs{constructor(e=new ts(1/0,1/0,1/0),t=new ts(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,i=1/0,n=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0,c=e.length;or&&(r=c),l>s&&(s=l),h>a&&(a=h)}return this.min.set(t,i,n),this.max.set(r,s,a),this}setFromBufferAttribute(e){let t=1/0,i=1/0,n=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0,c=e.count;or&&(r=c),l>s&&(s=l),h>a&&(a=h)}return this.min.set(t,i,n),this.max.set(r,s,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,as),as.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(gs),ms.subVectors(this.max,gs),cs.subVectors(e.a,gs),ls.subVectors(e.b,gs),hs.subVectors(e.c,gs),us.subVectors(ls,cs),ps.subVectors(hs,ls),ds.subVectors(cs,hs);let t=[0,-us.z,us.y,0,-ps.z,ps.y,0,-ds.z,ds.y,us.z,0,-us.x,ps.z,0,-ps.x,ds.z,0,-ds.x,-us.y,us.x,0,-ps.y,ps.x,0,-ds.y,ds.x,0];return!!Ms(t,cs,ls,hs,ms)&&(t=[1,0,0,0,1,0,0,0,1],!!Ms(t,cs,ls,hs,ms)&&(fs.crossVectors(us,ps),t=[fs.x,fs.y,fs.z],Ms(t,cs,ls,hs,ms)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return as.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(as).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(ss[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ss[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ss[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ss[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ss[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ss[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ss[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ss[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ss)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}rs.prototype.isBox3=!0;const ss=[new ts,new ts,new ts,new ts,new ts,new ts,new ts,new ts],as=new ts,os=new rs,cs=new ts,ls=new ts,hs=new ts,us=new ts,ps=new ts,ds=new ts,gs=new ts,ms=new ts,fs=new ts,_s=new ts;function Ms(e,t,i,n,r){for(let s=0,a=e.length-3;s<=a;s+=3){_s.fromArray(e,s);const a=r.x*Math.abs(_s.x)+r.y*Math.abs(_s.y)+r.z*Math.abs(_s.z),o=t.dot(_s),c=i.dot(_s),l=n.dot(_s);if(Math.max(-Math.max(o,c,l),Math.min(o,c,l))>a)return!1}return!0}const vs=new rs,ys=new ts,xs=new ts,bs=new ts;class ws{constructor(e=new ts,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;void 0!==t?i.copy(t):vs.setFromPoints(e).getCenter(i);let n=0;for(let t=0,r=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){bs.subVectors(e,this.center);const t=bs.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),i=.5*(e-this.radius);this.center.add(bs.multiplyScalar(i/e)),this.radius+=i}return this}union(e){return xs.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(ys.copy(e.center).add(xs)),this.expandByPoint(ys.copy(e.center).sub(xs)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Ts=new ts,Ss=new ts,Ns=new ts,Ds=new ts,Is=new ts,Cs=new ts,As=new ts;class Es{constructor(e=new ts,t=new ts(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Ts)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Ts.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ts.copy(this.direction).multiplyScalar(t).add(this.origin),Ts.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){Ss.copy(e).add(t).multiplyScalar(.5),Ns.copy(t).sub(e).normalize(),Ds.copy(this.origin).sub(Ss);const r=.5*e.distanceTo(t),s=-this.direction.dot(Ns),a=Ds.dot(this.direction),o=-Ds.dot(Ns),c=Ds.lengthSq(),l=Math.abs(1-s*s);let h,u,p,d;if(l>0)if(h=s*o-a,u=s*a-o,d=r*l,h>=0)if(u>=-d)if(u<=d){const e=1/l;h*=e,u*=e,p=h*(h+s*u+2*a)+u*(s*h+u+2*o)+c}else u=r,h=Math.max(0,-(s*u+a)),p=-h*h+u*(u+2*o)+c;else u=-r,h=Math.max(0,-(s*u+a)),p=-h*h+u*(u+2*o)+c;else u<=-d?(h=Math.max(0,-(-s*r+a)),u=h>0?-r:Math.min(Math.max(-r,-o),r),p=-h*h+u*(u+2*o)+c):u<=d?(h=0,u=Math.min(Math.max(-r,-o),r),p=u*(u+2*o)+c):(h=Math.max(0,-(s*r+a)),u=h>0?r:Math.min(Math.max(-r,-o),r),p=-h*h+u*(u+2*o)+c);else u=s>0?-r:r,h=Math.max(0,-(s*u+a)),p=-h*h+u*(u+2*o)+c;return i&&i.copy(this.direction).multiplyScalar(h).add(this.origin),n&&n.copy(Ns).multiplyScalar(u).add(Ss),p}intersectSphere(e,t){Ts.subVectors(e.center,this.origin);const i=Ts.dot(this.direction),n=Ts.dot(Ts)-i*i,r=e.radius*e.radius;if(n>r)return null;const s=Math.sqrt(r-n),a=i-s,o=i+s;return a<0&&o<0?null:a<0?this.at(o,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,r,s,a,o;const c=1/this.direction.x,l=1/this.direction.y,h=1/this.direction.z,u=this.origin;return c>=0?(i=(e.min.x-u.x)*c,n=(e.max.x-u.x)*c):(i=(e.max.x-u.x)*c,n=(e.min.x-u.x)*c),l>=0?(r=(e.min.y-u.y)*l,s=(e.max.y-u.y)*l):(r=(e.max.y-u.y)*l,s=(e.min.y-u.y)*l),i>s||r>n?null:((r>i||i!=i)&&(i=r),(s=0?(a=(e.min.z-u.z)*h,o=(e.max.z-u.z)*h):(a=(e.max.z-u.z)*h,o=(e.min.z-u.z)*h),i>o||a>n?null:((a>i||i!=i)&&(i=a),(o=0?i:n,t)))}intersectsBox(e){return null!==this.intersectBox(e,Ts)}intersectTriangle(e,t,i,n,r){Is.subVectors(t,e),Cs.subVectors(i,e),As.crossVectors(Is,Cs);let s,a=this.direction.dot(As);if(a>0){if(n)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}Ds.subVectors(this.origin,e);const o=s*this.direction.dot(Cs.crossVectors(Ds,Cs));if(o<0)return null;const c=s*this.direction.dot(Is.cross(Ds));if(c<0)return null;if(o+c>a)return null;const l=-s*Ds.dot(As);return l<0?null:this.at(l/a,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Ls{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,n,r,s,a,o,c,l,h,u,p,d,g,m){const f=this.elements;return f[0]=e,f[4]=t,f[8]=i,f[12]=n,f[1]=r,f[5]=s,f[9]=a,f[13]=o,f[2]=c,f[6]=l,f[10]=h,f[14]=u,f[3]=p,f[7]=d,f[11]=g,f[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Ls).fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,n=1/zs.setFromMatrixColumn(e,0).length(),r=1/zs.setFromMatrixColumn(e,1).length(),s=1/zs.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,i=e.x,n=e.y,r=e.z,s=Math.cos(i),a=Math.sin(i),o=Math.cos(n),c=Math.sin(n),l=Math.cos(r),h=Math.sin(r);if("XYZ"===e.order){const e=s*l,i=s*h,n=a*l,r=a*h;t[0]=o*l,t[4]=-o*h,t[8]=c,t[1]=i+n*c,t[5]=e-r*c,t[9]=-a*o,t[2]=r-e*c,t[6]=n+i*c,t[10]=s*o}else if("YXZ"===e.order){const e=o*l,i=o*h,n=c*l,r=c*h;t[0]=e+r*a,t[4]=n*a-i,t[8]=s*c,t[1]=s*h,t[5]=s*l,t[9]=-a,t[2]=i*a-n,t[6]=r+e*a,t[10]=s*o}else if("ZXY"===e.order){const e=o*l,i=o*h,n=c*l,r=c*h;t[0]=e-r*a,t[4]=-s*h,t[8]=n+i*a,t[1]=i+n*a,t[5]=s*l,t[9]=r-e*a,t[2]=-s*c,t[6]=a,t[10]=s*o}else if("ZYX"===e.order){const e=s*l,i=s*h,n=a*l,r=a*h;t[0]=o*l,t[4]=n*c-i,t[8]=e*c+r,t[1]=o*h,t[5]=r*c+e,t[9]=i*c-n,t[2]=-c,t[6]=a*o,t[10]=s*o}else if("YZX"===e.order){const e=s*o,i=s*c,n=a*o,r=a*c;t[0]=o*l,t[4]=r-e*h,t[8]=n*h+i,t[1]=h,t[5]=s*l,t[9]=-a*l,t[2]=-c*l,t[6]=i*h+n,t[10]=e-r*h}else if("XZY"===e.order){const e=s*o,i=s*c,n=a*o,r=a*c;t[0]=o*l,t[4]=-h,t[8]=c*l,t[1]=e*h+r,t[5]=s*l,t[9]=i*h-n,t[2]=n*h-i,t[6]=a*l,t[10]=r*h+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Os,e,ks)}lookAt(e,t,i){const n=this.elements;return Us.subVectors(e,t),0===Us.lengthSq()&&(Us.z=1),Us.normalize(),Ps.crossVectors(i,Us),0===Ps.lengthSq()&&(1===Math.abs(i.z)?Us.x+=1e-4:Us.z+=1e-4,Us.normalize(),Ps.crossVectors(i,Us)),Ps.normalize(),Rs.crossVectors(Us,Ps),n[0]=Ps.x,n[4]=Rs.x,n[8]=Us.x,n[1]=Ps.y,n[5]=Rs.y,n[9]=Us.y,n[2]=Ps.z,n[6]=Rs.z,n[10]=Us.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,r=this.elements,s=i[0],a=i[4],o=i[8],c=i[12],l=i[1],h=i[5],u=i[9],p=i[13],d=i[2],g=i[6],m=i[10],f=i[14],_=i[3],M=i[7],v=i[11],y=i[15],x=n[0],b=n[4],w=n[8],T=n[12],S=n[1],N=n[5],D=n[9],I=n[13],C=n[2],A=n[6],E=n[10],L=n[14],z=n[3],j=n[7],O=n[11],k=n[15];return r[0]=s*x+a*S+o*C+c*z,r[4]=s*b+a*N+o*A+c*j,r[8]=s*w+a*D+o*E+c*O,r[12]=s*T+a*I+o*L+c*k,r[1]=l*x+h*S+u*C+p*z,r[5]=l*b+h*N+u*A+p*j,r[9]=l*w+h*D+u*E+p*O,r[13]=l*T+h*I+u*L+p*k,r[2]=d*x+g*S+m*C+f*z,r[6]=d*b+g*N+m*A+f*j,r[10]=d*w+g*D+m*E+f*O,r[14]=d*T+g*I+m*L+f*k,r[3]=_*x+M*S+v*C+y*z,r[7]=_*b+M*N+v*A+y*j,r[11]=_*w+M*D+v*E+y*O,r[15]=_*T+M*I+v*L+y*k,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],n=e[8],r=e[12],s=e[1],a=e[5],o=e[9],c=e[13],l=e[2],h=e[6],u=e[10],p=e[14];return e[3]*(+r*o*h-n*c*h-r*a*u+i*c*u+n*a*p-i*o*p)+e[7]*(+t*o*p-t*c*u+r*s*u-n*s*p+n*c*l-r*o*l)+e[11]*(+t*c*h-t*a*p-r*s*h+i*s*p+r*a*l-i*c*l)+e[15]*(-n*a*l-t*o*h+t*a*u+n*s*h-i*s*u+i*o*l)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],s=e[4],a=e[5],o=e[6],c=e[7],l=e[8],h=e[9],u=e[10],p=e[11],d=e[12],g=e[13],m=e[14],f=e[15],_=h*m*c-g*u*c+g*o*p-a*m*p-h*o*f+a*u*f,M=d*u*c-l*m*c-d*o*p+s*m*p+l*o*f-s*u*f,v=l*g*c-d*h*c+d*a*p-s*g*p-l*a*f+s*h*f,y=d*h*o-l*g*o-d*a*u+s*g*u+l*a*m-s*h*m,x=t*_+i*M+n*v+r*y;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const b=1/x;return e[0]=_*b,e[1]=(g*u*r-h*m*r-g*n*p+i*m*p+h*n*f-i*u*f)*b,e[2]=(a*m*r-g*o*r+g*n*c-i*m*c-a*n*f+i*o*f)*b,e[3]=(h*o*r-a*u*r-h*n*c+i*u*c+a*n*p-i*o*p)*b,e[4]=M*b,e[5]=(l*m*r-d*u*r+d*n*p-t*m*p-l*n*f+t*u*f)*b,e[6]=(d*o*r-s*m*r-d*n*c+t*m*c+s*n*f-t*o*f)*b,e[7]=(s*u*r-l*o*r+l*n*c-t*u*c-s*n*p+t*o*p)*b,e[8]=v*b,e[9]=(d*h*r-l*g*r-d*i*p+t*g*p+l*i*f-t*h*f)*b,e[10]=(s*g*r-d*a*r+d*i*c-t*g*c-s*i*f+t*a*f)*b,e[11]=(l*a*r-s*h*r-l*i*c+t*h*c+s*i*p-t*a*p)*b,e[12]=y*b,e[13]=(l*g*n-d*h*n+d*i*u-t*g*u-l*i*m+t*h*m)*b,e[14]=(d*a*n-s*g*n-d*i*o+t*g*o+s*i*m-t*a*m)*b,e[15]=(s*h*n-l*a*n+l*i*o-t*h*o-s*i*u+t*a*u)*b,this}scale(e){const t=this.elements,i=e.x,n=e.y,r=e.z;return t[0]*=i,t[4]*=n,t[8]*=r,t[1]*=i,t[5]*=n,t[9]*=r,t[2]*=i,t[6]*=n,t[10]*=r,t[3]*=i,t[7]*=n,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),n=Math.sin(t),r=1-i,s=e.x,a=e.y,o=e.z,c=r*s,l=r*a;return this.set(c*s+i,c*a-n*o,c*o+n*a,0,c*a+n*o,l*a+i,l*o-n*s,0,c*o-n*a,l*o+n*s,r*o*o+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,r,s){return this.set(1,i,r,0,e,1,s,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=this.elements,r=t._x,s=t._y,a=t._z,o=t._w,c=r+r,l=s+s,h=a+a,u=r*c,p=r*l,d=r*h,g=s*l,m=s*h,f=a*h,_=o*c,M=o*l,v=o*h,y=i.x,x=i.y,b=i.z;return n[0]=(1-(g+f))*y,n[1]=(p+v)*y,n[2]=(d-M)*y,n[3]=0,n[4]=(p-v)*x,n[5]=(1-(u+f))*x,n[6]=(m+_)*x,n[7]=0,n[8]=(d+M)*b,n[9]=(m-_)*b,n[10]=(1-(u+g))*b,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;let r=zs.set(n[0],n[1],n[2]).length();const s=zs.set(n[4],n[5],n[6]).length(),a=zs.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),e.x=n[12],e.y=n[13],e.z=n[14],js.copy(this);const o=1/r,c=1/s,l=1/a;return js.elements[0]*=o,js.elements[1]*=o,js.elements[2]*=o,js.elements[4]*=c,js.elements[5]*=c,js.elements[6]*=c,js.elements[8]*=l,js.elements[9]*=l,js.elements[10]*=l,t.setFromRotationMatrix(js),i.x=r,i.y=s,i.z=a,this}makePerspective(e,t,i,n,r,s){void 0===s&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,o=2*r/(t-e),c=2*r/(i-n),l=(t+e)/(t-e),h=(i+n)/(i-n),u=-(s+r)/(s-r),p=-2*s*r/(s-r);return a[0]=o,a[4]=0,a[8]=l,a[12]=0,a[1]=0,a[5]=c,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,i,n,r,s){const a=this.elements,o=1/(t-e),c=1/(i-n),l=1/(s-r),h=(t+e)*o,u=(i+n)*c,p=(s+r)*l;return a[0]=2*o,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*l,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let e=0;e<16;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}Ls.prototype.isMatrix4=!0;const zs=new ts,js=new Ls,Os=new ts(0,0,0),ks=new ts(1,1,1),Ps=new ts,Rs=new ts,Us=new ts,$s=new Ls,Bs=new es;class Fs{constructor(e=0,t=0,i=0,n=Fs.DefaultOrder){this._x=e,this._y=t,this._z=i,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const n=e.elements,r=n[0],s=n[4],a=n[8],o=n[1],c=n[5],l=n[9],h=n[2],u=n[6],p=n[10];switch(t){case"XYZ":this._y=Math.asin(Or(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-l,p),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Or(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(o,c)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Or(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-Or(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,p),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Or(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-Or(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-l,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===i&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return $s.makeRotationFromQuaternion(e),this.setFromRotationMatrix($s,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Bs.setFromEuler(this),this.setFromQuaternion(Bs,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new ts(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}Fs.prototype.isEuler=!0,Fs.DefaultOrder="XYZ",Fs.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Gs{constructor(){this.mask=1}set(e){this.mask=1<1){for(let e=0;e1){for(let e=0;e0){n.children=[];for(let t=0;t0){n.animations=[];for(let t=0;t0&&(i.geometries=t),n.length>0&&(i.materials=n),r.length>0&&(i.textures=r),a.length>0&&(i.images=a),o.length>0&&(i.shapes=o),c.length>0&&(i.skeletons=c),l.length>0&&(i.animations=l)}return i.object=n,i;function s(e){const t=[];for(const i in e){const n=e[i];delete n.metadata,t.push(n)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t0?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}static getBarycoord(e,t,i,n,r){ra.subVectors(n,t),sa.subVectors(i,t),aa.subVectors(e,t);const s=ra.dot(ra),a=ra.dot(sa),o=ra.dot(aa),c=sa.dot(sa),l=sa.dot(aa),h=s*c-a*a;if(0===h)return r.set(-2,-1,-1);const u=1/h,p=(c*o-a*l)*u,d=(s*l-a*o)*u;return r.set(1-p-d,d,p)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,oa),oa.x>=0&&oa.y>=0&&oa.x+oa.y<=1}static getUV(e,t,i,n,r,s,a,o){return this.getBarycoord(e,t,i,n,oa),o.set(0,0),o.addScaledVector(r,oa.x),o.addScaledVector(s,oa.y),o.addScaledVector(a,oa.z),o}static isFrontFacing(e,t,i,n){return ra.subVectors(i,t),sa.subVectors(e,t),ra.cross(sa).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ra.subVectors(this.c,this.b),sa.subVectors(this.a,this.b),.5*ra.cross(sa).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ga.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ga.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,n,r){return ga.getUV(e,this.a,this.b,this.c,t,i,n,r)}containsPoint(e){return ga.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ga.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,n=this.b,r=this.c;let s,a;ca.subVectors(n,i),la.subVectors(r,i),ua.subVectors(e,i);const o=ca.dot(ua),c=la.dot(ua);if(o<=0&&c<=0)return t.copy(i);pa.subVectors(e,n);const l=ca.dot(pa),h=la.dot(pa);if(l>=0&&h<=l)return t.copy(n);const u=o*h-l*c;if(u<=0&&o>=0&&l<=0)return s=o/(o-l),t.copy(i).addScaledVector(ca,s);da.subVectors(e,r);const p=ca.dot(da),d=la.dot(da);if(d>=0&&p<=d)return t.copy(r);const g=p*c-o*d;if(g<=0&&c>=0&&d<=0)return a=c/(c-d),t.copy(i).addScaledVector(la,a);const m=l*d-p*h;if(m<=0&&h-l>=0&&p-d>=0)return ha.subVectors(r,n),a=(h-l)/(h-l+(p-d)),t.copy(n).addScaledVector(ha,a);const f=1/(m+g+u);return s=g*f,a=u*f,t.copy(i).addScaledVector(ca,s).addScaledVector(la,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let ma=0;class fa extends Ir{constructor(){super(),Object.defineProperty(this,"id",{value:ma++}),this.uuid=jr(),this.name="",this.type="Material",this.fog=!0,this.blending=Qt,this.side=Vt,this.vertexColors=!1,this.opacity=1,this.format=ln,this.transparent=!1,this.blendSrc=li,this.blendDst=hi,this.blendEquation=ei,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=vi,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Tr,this.stencilZFail=Tr,this.stencilZPass=Tr,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const i=e[t];if(void 0===i){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===i;continue}const n=this[t];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function n(e){const t=[];for(const i in e){const n=e[i];delete n.metadata,t.push(n)}return t}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Qt&&(i.blending=this.blending),this.side!==Vt&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.format!==ln&&(i.format=this.format),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(i.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=this.flatShading),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),t){const t=n(e.textures),r=n(e.images);t.length>0&&(i.textures=t),r.length>0&&(i.images=r)}return i}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.format=e.format,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(null!==t){const e=t.length;i=new Array(e);for(let n=0;n!==e;++n)i[n]=t[n].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}fa.prototype.isMaterial=!0;const _a={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ma={h:0,s:0,l:0},va={h:0,s:0,l:0};function ya(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+6*(t-e)*(2/3-i):e}function xa(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function ba(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class wa{constructor(e,t,i){return void 0===t&&void 0===i?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,t,i){return this.r=e,this.g=t,this.b=i,this}setHSL(e,t,i){if(e=kr(e,1),t=Or(t,0,1),i=Or(i,0,1),0===t)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+t):i+t-i*t,r=2*i-n;this.r=ya(r,n,e+1/3),this.g=ya(r,n,e),this.b=ya(r,n,e-1/3)}return this}setStyle(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const n=i[1],r=i[2];switch(n){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,t(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,t(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r)){const i=parseFloat(e[1])/360,n=parseInt(e[2],10)/100,r=parseInt(e[3],10)/100;return t(e[4]),this.setHSL(i,n,r)}}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=i[1],t=e.length;if(3===t)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===t)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=_a[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){const i=t>0?1/t:1;return this.r=Math.pow(e.r,i),this.g=Math.pow(e.g,i),this.b=Math.pow(e.b,i),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=xa(e.r),this.g=xa(e.g),this.b=xa(e.b),this}copyLinearToSRGB(e){return this.r=ba(e.r),this.g=ba(e.g),this.b=ba(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const t=this.r,i=this.g,n=this.b,r=Math.max(t,i,n),s=Math.min(t,i,n);let a,o;const c=(s+r)/2;if(s===r)a=0,o=0;else{const e=r-s;switch(o=c<=.5?e/(r+s):e/(2-r-s),r){case t:a=(i-n)/e+(i65535?Ca:Ia)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(void 0!==i){const t=(new Fr).getNormalMatrix(e);i.applyNormalMatrix(t),i.needsUpdate=!0}const n=this.attributes.tangent;return void 0!==n&&(n.transformDirection(e),n.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return La.makeRotationFromQuaternion(e),this.applyMatrix4(La),this}rotateX(e){return La.makeRotationX(e),this.applyMatrix4(La),this}rotateY(e){return La.makeRotationY(e),this.applyMatrix4(La),this}rotateZ(e){return La.makeRotationZ(e),this.applyMatrix4(La),this}translate(e,t,i){return La.makeTranslation(e,t,i),this.applyMatrix4(La),this}scale(e,t,i){return La.makeScale(e,t,i),this.applyMatrix4(La),this}lookAt(e){return za.lookAt(e),za.updateMatrix(),this.applyMatrix4(za.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ja).negate(),this.translate(ja.x,ja.y,ja.z),this}setFromPoints(e){const t=[];for(let i=0,n=e.length;i0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const i in t)void 0!==t[i]&&(e[i]=t[i]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const t in i){const n=i[t];e.data.attributes[t]=n.toJSON(e.data)}const n={};let r=!1;for(const t in this.morphAttributes){const i=this.morphAttributes[t],s=[];for(let t=0,n=i.length;t0&&(n[t]=s,r=!0)}r&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;null!==i&&this.setIndex(i.clone(t));const n=e.attributes;for(const e in n){const i=n[e];this.setAttribute(e,i.clone(t))}const r=e.morphAttributes;for(const e in r){const i=[],n=r[e];for(let e=0,r=n.length;e0){const e=t[i[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,i=e.length;t0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const i=this.geometry,n=this.material,r=this.matrixWorld;if(void 0===n)return;if(null===i.boundingSphere&&i.computeBoundingSphere(),Ba.copy(i.boundingSphere),Ba.applyMatrix4(r),!1===e.ray.intersectsSphere(Ba))return;if(Ua.copy(r).invert(),$a.copy(e.ray).applyMatrix4(Ua),null!==i.boundingBox&&!1===$a.intersectsBox(i.boundingBox))return;let s;if(i.isBufferGeometry){const r=i.index,a=i.attributes.position,o=i.morphAttributes.position,c=i.morphTargetsRelative,l=i.attributes.uv,h=i.attributes.uv2,u=i.groups,p=i.drawRange;if(null!==r)if(Array.isArray(n))for(let i=0,d=u.length;ii.far?null:{distance:l,point:to.clone(),object:e}}(e,t,i,n,Fa,Ga,Ha,eo);if(d){o&&(Xa.fromBufferAttribute(o,l),Ja.fromBufferAttribute(o,h),Ka.fromBufferAttribute(o,u),d.uv=ga.getUV(eo,Fa,Ga,Ha,Xa,Ja,Ka,new Br)),c&&(Xa.fromBufferAttribute(c,l),Ja.fromBufferAttribute(c,h),Ka.fromBufferAttribute(c,u),d.uv2=ga.getUV(eo,Fa,Ga,Ha,Xa,Ja,Ka,new Br));const e={a:l,b:h,c:u,normal:new ts,materialIndex:0};ga.getNormal(Fa,Ga,Ha,e.normal),d.face=e}return d}io.prototype.isMesh=!0;class ro extends Ra{constructor(e=1,t=1,i=1,n=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:r,depthSegments:s};const a=this;n=Math.floor(n),r=Math.floor(r),s=Math.floor(s);const o=[],c=[],l=[],h=[];let u=0,p=0;function d(e,t,i,n,r,s,d,g,m,f,_){const M=s/m,v=d/f,y=s/2,x=d/2,b=g/2,w=m+1,T=f+1;let S=0,N=0;const D=new ts;for(let s=0;s0?1:-1,l.push(D.x,D.y,D.z),h.push(o/m),h.push(1-s/f),S+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const i={};for(const e in this.extensions)!0===this.extensions[e]&&(i[e]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}co.prototype.isShaderMaterial=!0;class lo extends na{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Ls,this.projectionMatrix=new Ls,this.projectionMatrixInverse=new Ls}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}lo.prototype.isCamera=!0;class ho extends lo{constructor(e=50,t=1,i=.1,n=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Er*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Ar*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Er*Math.atan(Math.tan(.5*Ar*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,n,r,s){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Ar*this.fov)/this.zoom,i=2*t,n=this.aspect*i,r=-.5*n;const s=this.view;if(null!==this.view&&this.view.enabled){const e=s.fullWidth,a=s.fullHeight;r+=s.offsetX*n/e,t-=s.offsetY*i/a,n*=s.width/e,i*=s.height/a}const a=this.filmOffset;0!==a&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,t,t-i,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}ho.prototype.isPerspectiveCamera=!0;const uo=90;class po extends na{constructor(e,t,i){if(super(),this.type="CubeCamera",!0!==i.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=i;const n=new ho(uo,1,e,t);n.layers=this.layers,n.up.set(0,-1,0),n.lookAt(new ts(1,0,0)),this.add(n);const r=new ho(uo,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new ts(-1,0,0)),this.add(r);const s=new ho(uo,1,e,t);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new ts(0,1,0)),this.add(s);const a=new ho(uo,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new ts(0,-1,0)),this.add(a);const o=new ho(uo,1,e,t);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new ts(0,0,1)),this.add(o);const c=new ho(uo,1,e,t);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new ts(0,0,-1)),this.add(c)}update(e,t){null===this.parent&&this.updateMatrixWorld();const i=this.renderTarget,[n,r,s,a,o,c]=this.children,l=e.xr.enabled,h=e.getRenderTarget();e.xr.enabled=!1;const u=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,n),e.setRenderTarget(i,1),e.render(t,r),e.setRenderTarget(i,2),e.render(t,s),e.setRenderTarget(i,3),e.render(t,a),e.setRenderTarget(i,4),e.render(t,o),i.texture.generateMipmaps=u,e.setRenderTarget(i,5),e.render(t,c),e.setRenderTarget(h),e.xr.enabled=l}}class go extends Qr{constructor(e,t,i,n,r,s,a,o,c,l){super(e=void 0!==e?e:[],t=void 0!==t?t:zi,i,n,r,s,a,o,c,l),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}go.prototype.isCubeTexture=!0;class mo extends Jr{constructor(e,t,i){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=i),super(e,e,t),t=t||{},this.texture=new go(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Vi,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=ln,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={tEquirect:{value:null}},n="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",r="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",s=new ro(5,5,5),a=new co({name:"CubemapFromEquirect",uniforms:so(i),vertexShader:n,fragmentShader:r,side:Yt,blending:Wt});a.uniforms.tEquirect.value=t;const o=new io(s,a),c=t.minFilter;return t.minFilter===qi&&(t.minFilter=Vi),new po(1,10,this).update(e,o),t.minFilter=c,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,n){const r=e.getRenderTarget();for(let r=0;r<6;r++)e.setRenderTarget(this,r),e.clear(t,i,n);e.setRenderTarget(r)}}mo.prototype.isWebGLCubeRenderTarget=!0;const fo=new ts,_o=new ts,Mo=new Fr;class vo{constructor(e=new ts(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const n=fo.subVectors(i,t).cross(_o.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const i=e.delta(fo),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/n;return r<0||r>1?null:t.copy(i).multiplyScalar(r).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||Mo.getNormalMatrix(e),n=this.coplanarPoint(fo).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}vo.prototype.isPlane=!0;const yo=new ws,xo=new ts;class bo{constructor(e=new vo,t=new vo,i=new vo,n=new vo,r=new vo,s=new vo){this.planes=[e,t,i,n,r,s]}set(e,t,i,n,r,s){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(n),a[4].copy(r),a[5].copy(s),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){const t=this.planes,i=e.elements,n=i[0],r=i[1],s=i[2],a=i[3],o=i[4],c=i[5],l=i[6],h=i[7],u=i[8],p=i[9],d=i[10],g=i[11],m=i[12],f=i[13],_=i[14],M=i[15];return t[0].setComponents(a-n,h-o,g-u,M-m).normalize(),t[1].setComponents(a+n,h+o,g+u,M+m).normalize(),t[2].setComponents(a+r,h+c,g+p,M+f).normalize(),t[3].setComponents(a-r,h-c,g-p,M-f).normalize(),t[4].setComponents(a-s,h-l,g-d,M-_).normalize(),t[5].setComponents(a+s,h+l,g+d,M+_).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),yo.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(yo)}intersectsSprite(e){return yo.center.set(0,0,0),yo.radius=.7071067811865476,yo.applyMatrix4(e.matrixWorld),this.intersectsSphere(yo)}intersectsSphere(e){const t=this.planes,i=e.center,n=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(i)0?e.max.x:e.min.x,xo.y=n.normal.y>0?e.max.y:e.min.y,xo.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(xo)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function wo(){let e=null,t=!1,i=null,n=null;function r(t,s){i(t,s),n=e.requestAnimationFrame(r)}return{start:function(){!0!==t&&null!==i&&(n=e.requestAnimationFrame(r),t=!0)},stop:function(){e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(e){i=e},setContext:function(t){e=t}}}function To(e,t){const i=t.isWebGL2,n=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),n.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const i=n.get(t);i&&(e.deleteBuffer(i.buffer),n.delete(t))},update:function(t,r){if(t.isGLBufferAttribute){const e=n.get(t);return void((!e||e.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec;\n\t\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\t\treflectVec = reflect( - viewDir, normal );\n\t\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\t#else\n\t\t\t\treflectVec = refract( - viewDir, normal, refractionRatio );\n\t\t\t#endif\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tlightMapIrradiance *= PI;\n\t#endif\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= specularColorMapTexelToLinear( texture2D( specularColorMap, vUv ) ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= sheenColorMapTexelToLinear( texture2D( sheenColorMap, vUv ) ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] > 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform vec2 morphTargetsTextureSize;\n\t\tvec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) {\n\t\t\tfloat texelIndex = float( vertexIndex * stride + offset );\n\t\t\tfloat y = floor( texelIndex / morphTargetsTextureSize.x );\n\t\t\tfloat x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tvec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );\n\t\t\treturn texture( morphTargetsTexture, morphUV ).xyz;\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\t#ifndef USE_MORPHNORMALS\n\t\t\t\tif ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ];\n\t\t\t#else\n\t\t\t\tif ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ];\n\t\t\t#endif\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( float roughness, float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( vec2 fragCoord, float roughness, float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( vec3 n, vec3 v, float roughness, vec3 diffuseColor, vec3 specularColor, float specularF90,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - clearcoat * Fcc ) + clearcoatSpecular * clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},Do={common:{diffuse:{value:new wa(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Fr},uv2Transform:{value:new Fr},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Br(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new wa(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new wa(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Fr}},sprite:{diffuse:{value:new wa(16777215)},opacity:{value:1},center:{value:new Br(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Fr}}},Io={basic:{uniforms:ao([Do.common,Do.specularmap,Do.envmap,Do.aomap,Do.lightmap,Do.fog]),vertexShader:No.meshbasic_vert,fragmentShader:No.meshbasic_frag},lambert:{uniforms:ao([Do.common,Do.specularmap,Do.envmap,Do.aomap,Do.lightmap,Do.emissivemap,Do.fog,Do.lights,{emissive:{value:new wa(0)}}]),vertexShader:No.meshlambert_vert,fragmentShader:No.meshlambert_frag},phong:{uniforms:ao([Do.common,Do.specularmap,Do.envmap,Do.aomap,Do.lightmap,Do.emissivemap,Do.bumpmap,Do.normalmap,Do.displacementmap,Do.fog,Do.lights,{emissive:{value:new wa(0)},specular:{value:new wa(1118481)},shininess:{value:30}}]),vertexShader:No.meshphong_vert,fragmentShader:No.meshphong_frag},standard:{uniforms:ao([Do.common,Do.envmap,Do.aomap,Do.lightmap,Do.emissivemap,Do.bumpmap,Do.normalmap,Do.displacementmap,Do.roughnessmap,Do.metalnessmap,Do.fog,Do.lights,{emissive:{value:new wa(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag},toon:{uniforms:ao([Do.common,Do.aomap,Do.lightmap,Do.emissivemap,Do.bumpmap,Do.normalmap,Do.displacementmap,Do.gradientmap,Do.fog,Do.lights,{emissive:{value:new wa(0)}}]),vertexShader:No.meshtoon_vert,fragmentShader:No.meshtoon_frag},matcap:{uniforms:ao([Do.common,Do.bumpmap,Do.normalmap,Do.displacementmap,Do.fog,{matcap:{value:null}}]),vertexShader:No.meshmatcap_vert,fragmentShader:No.meshmatcap_frag},points:{uniforms:ao([Do.points,Do.fog]),vertexShader:No.points_vert,fragmentShader:No.points_frag},dashed:{uniforms:ao([Do.common,Do.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:No.linedashed_vert,fragmentShader:No.linedashed_frag},depth:{uniforms:ao([Do.common,Do.displacementmap]),vertexShader:No.depth_vert,fragmentShader:No.depth_frag},normal:{uniforms:ao([Do.common,Do.bumpmap,Do.normalmap,Do.displacementmap,{opacity:{value:1}}]),vertexShader:No.meshnormal_vert,fragmentShader:No.meshnormal_frag},sprite:{uniforms:ao([Do.sprite,Do.fog]),vertexShader:No.sprite_vert,fragmentShader:No.sprite_frag},background:{uniforms:{uvTransform:{value:new Fr},t2D:{value:null}},vertexShader:No.background_vert,fragmentShader:No.background_frag},cube:{uniforms:ao([Do.envmap,{opacity:{value:1}}]),vertexShader:No.cube_vert,fragmentShader:No.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:No.equirect_vert,fragmentShader:No.equirect_frag},distanceRGBA:{uniforms:ao([Do.common,Do.displacementmap,{referencePosition:{value:new ts},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:No.distanceRGBA_vert,fragmentShader:No.distanceRGBA_frag},shadow:{uniforms:ao([Do.lights,Do.fog,{color:{value:new wa(0)},opacity:{value:1}}]),vertexShader:No.shadow_vert,fragmentShader:No.shadow_frag}};function Co(e,t,i,n,r){const s=new wa(0);let a,o,c=0,l=null,h=0,u=null;function p(e,t){i.buffers.color.setClear(e.r,e.g,e.b,t,r)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),c=t,p(s,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,p(s,c)},render:function(i,r){let d=!1,g=!0===r.isScene?r.background:null;g&&g.isTexture&&(g=t.get(g));const m=e.xr,f=m.getSession&&m.getSession();f&&"additive"===f.environmentBlendMode&&(g=null),null===g?p(s,c):g&&g.isColor&&(p(g,1),d=!0),(e.autoClear||d)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),g&&(g.isCubeTexture||g.mapping===Pi)?(void 0===o&&(o=new io(new ro(1,1,1),new co({name:"BackgroundCubeMaterial",uniforms:so(Io.cube.uniforms),vertexShader:Io.cube.vertexShader,fragmentShader:Io.cube.fragmentShader,side:Yt,depthTest:!1,depthWrite:!1,fog:!1})),o.geometry.deleteAttribute("normal"),o.geometry.deleteAttribute("uv"),o.onBeforeRender=function(e,t,i){this.matrixWorld.copyPosition(i.matrixWorld)},Object.defineProperty(o.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(o)),o.material.uniforms.envMap.value=g,o.material.uniforms.flipEnvMap.value=g.isCubeTexture&&!1===g.isRenderTargetTexture?-1:1,l===g&&h===g.version&&u===e.toneMapping||(o.material.needsUpdate=!0,l=g,h=g.version,u=e.toneMapping),i.unshift(o,o.geometry,o.material,0,0,null)):g&&g.isTexture&&(void 0===a&&(a=new io(new So(2,2),new co({name:"BackgroundMaterial",uniforms:so(Io.background.uniforms),vertexShader:Io.background.vertexShader,fragmentShader:Io.background.fragmentShader,side:Vt,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(a)),a.material.uniforms.t2D.value=g,!0===g.matrixAutoUpdate&&g.updateMatrix(),a.material.uniforms.uvTransform.value.copy(g.matrix),l===g&&h===g.version&&u===e.toneMapping||(a.material.needsUpdate=!0,l=g,h=g.version,u=e.toneMapping),i.unshift(a,a.geometry,a.material,0,0,null))}}}function Ao(e,t,i,n){const r=e.getParameter(34921),s=n.isWebGL2?null:t.get("OES_vertex_array_object"),a=n.isWebGL2||null!==s,o={},c=p(null);let l=c;function h(t){return n.isWebGL2?e.bindVertexArray(t):s.bindVertexArrayOES(t)}function u(t){return n.isWebGL2?e.deleteVertexArray(t):s.deleteVertexArrayOES(t)}function p(e){const t=[],i=[],n=[];for(let e=0;e=0){let s=c[t];if(void 0===s&&("instanceMatrix"===t&&r.instanceMatrix&&(s=r.instanceMatrix),"instanceColor"===t&&r.instanceColor&&(s=r.instanceColor)),void 0!==s){const t=s.normalized,a=s.itemSize,c=i.get(s);if(void 0===c)continue;const l=c.buffer,h=c.type,u=c.bytesPerElement;if(s.isInterleavedBufferAttribute){const i=s.data,c=i.stride,p=s.offset;if(i&&i.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let a=void 0!==i.precision?i.precision:"highp";const o=r(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const c=s||t.has("WEBGL_draw_buffers"),l=!0===i.logarithmicDepthBuffer,h=e.getParameter(34930),u=e.getParameter(35660),p=e.getParameter(3379),d=e.getParameter(34076),g=e.getParameter(34921),m=e.getParameter(36347),f=e.getParameter(36348),_=e.getParameter(36349),M=u>0,v=s||t.has("OES_texture_float");return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:function(){if(void 0!==n)return n;if(!0===t.has("EXT_texture_filter_anisotropic")){const i=t.get("EXT_texture_filter_anisotropic");n=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:l,maxTextures:h,maxVertexTextures:u,maxTextureSize:p,maxCubemapSize:d,maxAttributes:g,maxVertexUniforms:m,maxVaryings:f,maxFragmentUniforms:_,vertexTextures:M,floatFragmentTextures:v,floatVertexTextures:M&&v,maxSamples:s?e.getParameter(36183):0}}function zo(e){const t=this;let i=null,n=0,r=!1,s=!1;const a=new vo,o=new Fr,c={value:null,needsUpdate:!1};function l(){c.value!==i&&(c.value=i,c.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function h(e,i,n,r){const s=null!==e?e.length:0;let l=null;if(0!==s){if(l=c.value,!0!==r||null===l){const t=n+4*s,r=i.matrixWorldInverse;o.getNormalMatrix(r),(null===l||l.length0){const a=e.getRenderTarget(),o=new mo(s.height/2);return o.fromEquirectangularTexture(e,r),t.set(r,o),e.setRenderTarget(a),r.addEventListener("dispose",n),i(o.texture,r.mapping)}return null}}}return r},dispose:function(){t=new WeakMap}}}Io.physical={uniforms:ao([Io.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Br(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new wa(0)},sheenColorMap:{value:null},sheenRoughness:{value:0},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Br},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new wa(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularColor:{value:new wa(1,1,1)},specularColorMap:{value:null}}]),vertexShader:No.meshphysical_vert,fragmentShader:No.meshphysical_frag};class Oo extends lo{constructor(e=-1,t=1,i=1,n=-1,r=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let r=i-e,s=i+e,a=n+t,o=n-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=e*this.view.offsetX,s=r+e*this.view.width,a-=t*this.view.offsetY,o=a-t*this.view.height}this.projectionMatrix.makeOrthographic(r,s,a,o,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}Oo.prototype.isOrthographicCamera=!0;class ko extends co{constructor(e){super(e),this.type="RawShaderMaterial"}}ko.prototype.isRawShaderMaterial=!0;const Po=Math.pow(2,8),Ro=[.125,.215,.35,.446,.526,.582],Uo=5+Ro.length,$o={[dr]:0,[gr]:1,[fr]:2,[Mr]:3,[vr]:4,[yr]:5,[mr]:6},Bo=new Oo,{_lodPlanes:Fo,_sizeLods:Go,_sigmas:Ho}=Jo(),Vo=new wa;let Yo=null;const qo=(1+Math.sqrt(5))/2,Wo=1/qo,Qo=[new ts(1,1,1),new ts(-1,1,1),new ts(1,1,-1),new ts(-1,1,-1),new ts(0,qo,Wo),new ts(0,qo,-Wo),new ts(Wo,0,qo),new ts(-Wo,0,qo),new ts(qo,Wo,0),new ts(-qo,Wo,0)];class Zo{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(e){const t=new Float32Array(20),i=new ts(0,1,0);return new ko({name:"SphericalGaussianBlur",defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i},inputEncoding:{value:$o[dr]},outputEncoding:{value:$o[dr]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include \n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:Wt,depthTest:!1,depthWrite:!1})}(),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,n=100){Yo=this._renderer.getRenderTarget();const r=this._allocateTargets();return this._sceneToCubeUV(e,i,n,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=ic(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=tc(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let e=0;e2?Po:0,Po,Po),o.setRenderTarget(n),d&&o.render(p,r),o.render(e,r)}p.geometry.dispose(),p.material.dispose(),o.toneMapping=h,o.outputEncoding=l,o.autoClear=c,e.background=g}_setEncoding(e,t){!0===this._renderer.capabilities.isWebGL2&&t.format===ln&&t.type===Wi&&t.encoding===gr?e.value=$o[dr]:e.value=$o[t.encoding]}_textureToCubeUV(e,t){const i=this._renderer,n=e.mapping===zi||e.mapping===ji;n?null==this._cubemapShader&&(this._cubemapShader=ic()):null==this._equirectShader&&(this._equirectShader=tc());const r=n?this._cubemapShader:this._equirectShader,s=new io(Fo[0],r),a=r.uniforms;a.envMap.value=e,n||a.texelSize.value.set(1/e.image.width,1/e.image.height),this._setEncoding(a.inputEncoding,e),this._setEncoding(a.outputEncoding,t.texture),ec(t,0,0,3*Po,2*Po),i.setRenderTarget(t),i.render(s,Bo)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let t=1;t20&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${g} samples when the maximum is set to 20`);const m=[];let f=0;for(let e=0;e<20;++e){const t=e/d,i=Math.exp(-t*t/2);m.push(i),0==e?f+=i:e4?n-8+4:0),3*_,2*_),o.setRenderTarget(t),o.render(l,Bo)}}function Xo(e){return void 0!==e&&e.type===Wi&&(e.encoding===dr||e.encoding===gr||e.encoding===mr)}function Jo(){const e=[],t=[],i=[];let n=8;for(let r=0;r4?a=Ro[r-8+4-1]:0==r&&(a=0),i.push(a);const o=1/(s-1),c=-o/2,l=1+o/2,h=[c,c,l,c,l,l,c,c,l,l,c,l],u=6,p=6,d=3,g=2,m=1,f=new Float32Array(d*p*u),_=new Float32Array(g*p*u),M=new Float32Array(m*p*u);for(let e=0;e2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];f.set(n,d*p*e),_.set(h,g*p*e);const r=[e,e,e,e,e,e];M.set(r,m*p*e)}const v=new Ra;v.setAttribute("position",new Da(f,d)),v.setAttribute("uv",new Da(_,g)),v.setAttribute("faceIndex",new Da(M,m)),e.push(v),n>4&&n--}return{_lodPlanes:e,_sizeLods:t,_sigmas:i}}function Ko(e){const t=new Jr(3*Po,3*Po,e);return t.texture.mapping=Pi,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function ec(e,t,i,n,r){e.viewport.set(t,i,n,r),e.scissor.set(t,i,n,r)}function tc(){const e=new Br(1,1);return new ko({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:$o[dr]},outputEncoding:{value:$o[dr]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include \n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:Wt,depthTest:!1,depthWrite:!1})}function ic(){return new ko({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:$o[dr]},outputEncoding:{value:$o[dr]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include \n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:Wt,depthTest:!1,depthWrite:!1})}function nc(e){let t=new WeakMap,i=null;function n(e){const i=e.target;i.removeEventListener("dispose",n);const r=t.get(i);void 0!==r&&(t.delete(i),r.dispose())}return{get:function(r){if(r&&r.isTexture&&!1===r.isRenderTargetTexture){const s=r.mapping,a=s===Oi||s===ki,o=s===zi||s===ji;if(a||o){if(t.has(r))return t.get(r).texture;{const s=r.image;if(a&&s&&s.height>0||o&&s&&function(e){let t=0;for(let i=0;i<6;i++)void 0!==e[i]&&t++;return 6===t}(s)){const s=e.getRenderTarget();null===i&&(i=new Zo(e));const o=a?i.fromEquirectangular(r):i.fromCubemap(r);return t.set(r,o),e.setRenderTarget(s),r.addEventListener("dispose",n),o.texture}return null}}}return r},dispose:function(){t=new WeakMap,null!==i&&(i.dispose(),i=null)}}}function rc(e){const t={};function i(i){if(void 0!==t[i])return t[i];let n;switch(i){case"WEBGL_depth_texture":n=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=e.getExtension(i)}return t[i]=n,n}return{has:function(e){return null!==i(e)},init:function(e){e.isWebGL2?i("EXT_color_buffer_float"):(i("WEBGL_depth_texture"),i("OES_texture_float"),i("OES_texture_half_float"),i("OES_texture_half_float_linear"),i("OES_standard_derivatives"),i("OES_element_index_uint"),i("OES_vertex_array_object"),i("ANGLE_instanced_arrays")),i("OES_texture_float_linear"),i("EXT_color_buffer_half_float")},get:function(e){const t=i(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function sc(e,t,i,n){const r={},s=new WeakMap;function a(e){const o=e.target;null!==o.index&&t.remove(o.index);for(const e in o.attributes)t.remove(o.attributes[e]);o.removeEventListener("dispose",a),delete r[o.id];const c=s.get(o);c&&(t.remove(c),s.delete(o)),n.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,i.memory.geometries--}function o(e){const i=[],n=e.index,r=e.attributes.position;let a=0;if(null!==n){const e=n.array;a=n.version;for(let t=0,n=e.length;t65535?Ca:Ia)(i,1);o.version=a;const c=s.get(e);c&&t.remove(c),s.set(e,o)}return{get:function(e,t){return!0===r[t.id]||(t.addEventListener("dispose",a),r[t.id]=!0,i.memory.geometries++),t},update:function(e){const i=e.attributes;for(const e in i)t.update(i[e],34962);const n=e.morphAttributes;for(const e in n){const i=n[e];for(let e=0,n=i.length;et.maxTextureSize&&(u=Math.ceil(h/t.maxTextureSize),h=t.maxTextureSize);const p=new Float32Array(h*u*4*n),d=new cc(p,h,u,n);d.format=ln,d.type=en;const g=4*c;for(let t=0;t0)return e;const r=t*i;let s=vc[r];if(void 0===s&&(s=new Float32Array(r),vc[r]=s),0!==t){n.toArray(s,0);for(let n=1,r=0;n!==t;++n)r+=i,e[n].toArray(s,r)}return s}function Sc(e,t){if(e.length!==t.length)return!1;for(let i=0,n=e.length;i/gm;function Il(e){return e.replace(Dl,Cl)}function Cl(e,t){const i=No[t];if(void 0===i)throw new Error("Can not resolve #include <"+t+">");return Il(i)}const Al=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,El=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ll(e){return e.replace(El,jl).replace(Al,zl)}function zl(e,t,i,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),jl(0,t,i,n)}function jl(e,t,i,n){let r="";for(let e=parseInt(t);e0?e.gammaFactor:1,d=i.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Tl).join("\n")}(i),g=function(e){const t=[];for(const i in e){const n=e[i];!1!==n&&t.push("#define "+i+" "+n)}return t.join("\n")}(s),m=r.createProgram();let f,_,M=i.glslVersion?"#version "+i.glslVersion+"\n":"";i.isRawShaderMaterial?(f=[g].filter(Tl).join("\n"),f.length>0&&(f+="\n"),_=[d,g].filter(Tl).join("\n"),_.length>0&&(_+="\n")):(f=[Ol(i),"#define SHADER_NAME "+i.shaderName,g,i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+i.maxBones,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+h:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMap&&i.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",i.normalMap&&i.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.displacementMap&&i.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",i.specularColorMap?"#define USE_SPECULARCOLORMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEENCOLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",i.vertexTangents?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUvs?"#define USE_UV":"",i.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.useVertexTexture?"#define BONE_TEXTURE":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&!1===i.flatShading?"#define USE_MORPHNORMALS":"",i.morphTargets&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",i.morphTargets&&i.isWebGL2?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+c:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Tl).join("\n"),_=[d,Ol(i),"#define SHADER_NAME "+i.shaderName,g,"#define GAMMA_FACTOR "+p,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+l:"",i.envMap?"#define "+h:"",i.envMap?"#define "+u:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMap&&i.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",i.normalMap&&i.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",i.specularColorMap?"#define USE_SPECULARCOLORMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEENCOLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.vertexTangents?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUvs?"#define USE_UV":"",i.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+c:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(i.extensionShaderTextureLOD||i.envMap)&&i.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",i.toneMapping!==Di?"#define TONE_MAPPING":"",i.toneMapping!==Di?No.tonemapping_pars_fragment:"",i.toneMapping!==Di?wl("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.format===cn?"#define OPAQUE":"",No.encodings_pars_fragment,i.map?xl("mapTexelToLinear",i.mapEncoding):"",i.matcap?xl("matcapTexelToLinear",i.matcapEncoding):"",i.envMap?xl("envMapTexelToLinear",i.envMapEncoding):"",i.emissiveMap?xl("emissiveMapTexelToLinear",i.emissiveMapEncoding):"",i.specularColorMap?xl("specularColorMapTexelToLinear",i.specularColorMapEncoding):"",i.sheenColorMap?xl("sheenColorMapTexelToLinear",i.sheenColorMapEncoding):"",i.lightMap?xl("lightMapTexelToLinear",i.lightMapEncoding):"",bl("linearToOutputTexel",i.outputEncoding),i.depthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(Tl).join("\n")),a=Il(a),a=Sl(a,i),a=Nl(a,i),o=Il(o),o=Sl(o,i),o=Nl(o,i),a=Ll(a),o=Ll(o),i.isWebGL2&&!0!==i.isRawShaderMaterial&&(M="#version 300 es\n",f=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+f,_=["#define varying in",i.glslVersion===Dr?"":"out highp vec4 pc_fragColor;",i.glslVersion===Dr?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+_);const v=M+_+o,y=_l(r,35633,M+f+a),x=_l(r,35632,v);if(r.attachShader(m,y),r.attachShader(m,x),void 0!==i.index0AttributeName?r.bindAttribLocation(m,0,i.index0AttributeName):!0===i.morphTargets&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),e.debug.checkShaderErrors){const e=r.getProgramInfoLog(m).trim(),t=r.getShaderInfoLog(y).trim(),i=r.getShaderInfoLog(x).trim();let n=!0,s=!0;if(!1===r.getProgramParameter(m,35714)){n=!1;const t=yl(r,y,"vertex"),i=yl(r,x,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,35715)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+i)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==t&&""!==i||(s=!1);s&&(this.diagnostics={runnable:n,programLog:e,vertexShader:{log:t,prefix:f},fragmentShader:{log:i,prefix:_}})}let b,w;return r.deleteShader(y),r.deleteShader(x),this.getUniforms=function(){return void 0===b&&(b=new fl(r,m)),b},this.getAttributes=function(){return void 0===w&&(w=function(e,t){const i={},n=e.getProgramParameter(t,35721);for(let r=0;r0,I=s.clearcoat>0;return{isWebGL2:c,shaderID:b,shaderName:s.type,vertexShader:T,fragmentShader:S,defines:s.defines,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:d,instancing:!0===M.isInstancedMesh,instancingColor:!0===M.isInstancedMesh&&null!==M.instanceColor,supportsVertexTextures:p,outputEncoding:null!==N?f(N.texture):e.outputEncoding,map:!!s.map,mapEncoding:f(s.map),matcap:!!s.matcap,matcapEncoding:f(s.matcap),envMap:!!x,envMapMode:x&&x.mapping,envMapEncoding:f(x),envMapCubeUV:!!x&&(x.mapping===Pi||x.mapping===Ri),lightMap:!!s.lightMap,lightMapEncoding:f(s.lightMap),aoMap:!!s.aoMap,emissiveMap:!!s.emissiveMap,emissiveMapEncoding:f(s.emissiveMap),bumpMap:!!s.bumpMap,normalMap:!!s.normalMap,objectSpaceNormalMap:s.normalMapType===wr,tangentSpaceNormalMap:s.normalMapType===br,clearcoat:I,clearcoatMap:I&&!!s.clearcoatMap,clearcoatRoughnessMap:I&&!!s.clearcoatRoughnessMap,clearcoatNormalMap:I&&!!s.clearcoatNormalMap,displacementMap:!!s.displacementMap,roughnessMap:!!s.roughnessMap,metalnessMap:!!s.metalnessMap,specularMap:!!s.specularMap,specularIntensityMap:!!s.specularIntensityMap,specularColorMap:!!s.specularColorMap,specularColorMapEncoding:f(s.specularColorMap),alphaMap:!!s.alphaMap,alphaTest:D,gradientMap:!!s.gradientMap,sheen:s.sheen>0,sheenColorMap:!!s.sheenColorMap,sheenColorMapEncoding:f(s.sheenColorMap),sheenRoughnessMap:!!s.sheenRoughnessMap,transmission:s.transmission>0,transmissionMap:!!s.transmissionMap,thicknessMap:!!s.thicknessMap,combine:s.combine,vertexTangents:!!s.normalMap&&!!M.geometry&&!!M.geometry.attributes.tangent,vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!M.geometry&&!!M.geometry.attributes.color&&4===M.geometry.attributes.color.itemSize,vertexUvs:!!s.map||!!s.bumpMap||!!s.normalMap||!!s.specularMap||!!s.alphaMap||!!s.emissiveMap||!!s.roughnessMap||!!s.metalnessMap||!!s.clearcoatMap||!!s.clearcoatRoughnessMap||!!s.clearcoatNormalMap||!!s.displacementMap||!!s.transmissionMap||!!s.thicknessMap||!!s.specularIntensityMap||!!s.specularColorMap||!!s.sheenColorMap||s.sheenRoughnessMap,uvsVertexOnly:!(s.map||s.bumpMap||s.normalMap||s.specularMap||s.alphaMap||s.emissiveMap||s.roughnessMap||s.metalnessMap||s.clearcoatNormalMap||s.transmission>0||s.transmissionMap||s.thicknessMap||s.specularIntensityMap||s.specularColorMap||!!s.sheen>0||s.sheenColorMap||s.sheenRoughnessMap||!s.displacementMap),fog:!!v,useFog:s.fog,fogExp2:v&&v.isFogExp2,flatShading:!!s.flatShading,sizeAttenuation:s.sizeAttenuation,logarithmicDepthBuffer:l,skinning:!0===M.isSkinnedMesh&&w>0,maxBones:w,useVertexTexture:h,morphTargets:!!M.geometry&&!!M.geometry.morphAttributes.position,morphNormals:!!M.geometry&&!!M.geometry.morphAttributes.normal,morphTargetsCount:M.geometry&&M.geometry.morphAttributes.position?M.geometry.morphAttributes.position.length:0,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,format:s.format,dithering:s.dithering,shadowMapEnabled:e.shadowMap.enabled&&m.length>0,shadowMapType:e.shadowMap.type,toneMapping:s.toneMapped?e.toneMapping:Di,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:s.premultipliedAlpha,doubleSided:s.side===qt,flipSided:s.side===Yt,depthPacking:void 0!==s.depthPacking&&s.depthPacking,index0AttributeName:s.index0AttributeName,extensionDerivatives:s.extensions&&s.extensions.derivatives,extensionFragDepth:s.extensions&&s.extensions.fragDepth,extensionDrawBuffers:s.extensions&&s.extensions.drawBuffers,extensionShaderTextureLOD:s.extensions&&s.extensions.shaderTextureLOD,rendererExtensionFragDepth:c||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||n.has("EXT_shader_texture_lod"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(t){const i=[];if(t.shaderID?i.push(t.shaderID):(i.push(Vr(t.fragmentShader)),i.push(Vr(t.vertexShader))),void 0!==t.defines)for(const e in t.defines)i.push(e),i.push(t.defines[e]);if(!1===t.isRawShaderMaterial){for(let e=0;e0?r.push(h):!0===i.transparent?s.push(h):n.push(h)},unshift:function(e,t,i,a,c,l){const h=o(e,t,i,a,c,l);i.transmission>0?r.unshift(h):!0===i.transparent?s.unshift(h):n.unshift(h)},finish:function(){for(let e=i,n=t.length;e1&&n.sort(e||Ul),r.length>1&&r.sort(t||$l),s.length>1&&s.sort(t||$l)}}}function Fl(e){let t=new WeakMap;return{get:function(i,n){let r;return!1===t.has(i)?(r=new Bl(e),t.set(i,[r])):n>=t.get(i).length?(r=new Bl(e),t.get(i).push(r)):r=t.get(i)[n],r},dispose:function(){t=new WeakMap}}}function Gl(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new ts,color:new wa};break;case"SpotLight":i={position:new ts,direction:new ts,color:new wa,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new ts,color:new wa,distance:0,decay:0};break;case"HemisphereLight":i={direction:new ts,skyColor:new wa,groundColor:new wa};break;case"RectAreaLight":i={color:new wa,position:new ts,halfWidth:new ts,halfHeight:new ts}}return e[t.id]=i,i}}}let Hl=0;function Vl(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Yl(e,t){const i=new Gl,n=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Br};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Br,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=i,i}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let e=0;e<9;e++)r.probe.push(new ts);const s=new ts,a=new Ls,o=new Ls;return{setup:function(s,a){let o=0,c=0,l=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let h=0,u=0,p=0,d=0,g=0,m=0,f=0,_=0;s.sort(Vl);const M=!0!==a?Math.PI:1;for(let e=0,t=s.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=Do.LTC_FLOAT_1,r.rectAreaLTC2=Do.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=Do.LTC_HALF_1,r.rectAreaLTC2=Do.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=o,r.ambient[1]=c,r.ambient[2]=l;const v=r.hash;v.directionalLength===h&&v.pointLength===u&&v.spotLength===p&&v.rectAreaLength===d&&v.hemiLength===g&&v.numDirectionalShadows===m&&v.numPointShadows===f&&v.numSpotShadows===_||(r.directional.length=h,r.spot.length=p,r.rectArea.length=d,r.point.length=u,r.hemi.length=g,r.directionalShadow.length=m,r.directionalShadowMap.length=m,r.pointShadow.length=f,r.pointShadowMap.length=f,r.spotShadow.length=_,r.spotShadowMap.length=_,r.directionalShadowMatrix.length=m,r.pointShadowMatrix.length=f,r.spotShadowMatrix.length=_,v.directionalLength=h,v.pointLength=u,v.spotLength=p,v.rectAreaLength=d,v.hemiLength=g,v.numDirectionalShadows=m,v.numPointShadows=f,v.numSpotShadows=_,r.version=Hl++)},setupView:function(e,t){let i=0,n=0,c=0,l=0,h=0;const u=t.matrixWorldInverse;for(let t=0,p=e.length;t=i.get(n).length?(s=new ql(e,t),i.get(n).push(s)):s=i.get(n)[r],s},dispose:function(){i=new WeakMap}}}class Ql extends fa{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}Ql.prototype.isMeshDepthMaterial=!0;class Zl extends fa{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new ts,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}Zl.prototype.isMeshDistanceMaterial=!0;const Xl="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",Jl="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function Kl(e,t,i){let n=new bo;const r=new Br,s=new Br,a=new Xr,o=new Ql({depthPacking:xr}),c=new Zl,l={},h=i.maxTextureSize,u={0:Yt,1:Vt,2:qt},p=new co({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Br},radius:{value:4}},vertexShader:Xl,fragmentShader:Jl}),d=p.clone();d.defines.HORIZONTAL_PASS=1;const g=new Ra;g.setAttribute("position",new Da(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new io(g,p),f=this;function _(i,n){const r=t.update(m);p.defines.VSM_SAMPLES!==i.blurSamples&&(p.defines.VSM_SAMPLES=i.blurSamples,d.defines.VSM_SAMPLES=i.blurSamples,p.needsUpdate=!0,d.needsUpdate=!0),p.uniforms.shadow_pass.value=i.map.texture,p.uniforms.resolution.value=i.mapSize,p.uniforms.radius.value=i.radius,e.setRenderTarget(i.mapPass),e.clear(),e.renderBufferDirect(n,null,r,p,m,null),d.uniforms.shadow_pass.value=i.mapPass.texture,d.uniforms.resolution.value=i.mapSize,d.uniforms.radius.value=i.radius,e.setRenderTarget(i.map),e.clear(),e.renderBufferDirect(n,null,r,d,m,null)}function M(t,i,n,r,s,a,h){let p=null;const d=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(p=void 0!==d?d:!0===r.isPointLight?c:o,e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0){const e=p.uuid,t=n.uuid;let i=l[e];void 0===i&&(i={},l[e]=i);let r=i[t];void 0===r&&(r=p.clone(),i[t]=r),p=r}return p.visible=n.visible,p.wireframe=n.wireframe,p.side=h===Ht?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:u[n.side],p.alphaMap=n.alphaMap,p.alphaTest=n.alphaTest,p.clipShadows=n.clipShadows,p.clippingPlanes=n.clippingPlanes,p.clipIntersection=n.clipIntersection,p.displacementMap=n.displacementMap,p.displacementScale=n.displacementScale,p.displacementBias=n.displacementBias,p.wireframeLinewidth=n.wireframeLinewidth,p.linewidth=n.linewidth,!0===r.isPointLight&&!0===p.isMeshDistanceMaterial&&(p.referencePosition.setFromMatrixPosition(r.matrixWorld),p.nearDistance=s,p.farDistance=a),p}function v(i,r,s,a,o){if(!1===i.visible)return;if(i.layers.test(r.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&o===Ht)&&(!i.frustumCulled||n.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,i.matrixWorld);const n=t.update(i),r=i.material;if(Array.isArray(r)){const t=n.groups;for(let c=0,l=t.length;ch||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/d.x),r.x=s.x*d.x,u.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/d.y),r.y=s.y*d.y,u.mapSize.y=s.y)),null===u.map&&!u.isPointLightShadow&&this.type===Ht){const e={minFilter:Vi,magFilter:Vi,format:ln};u.map=new Jr(r.x,r.y,e),u.map.texture.name=l.name+".shadowMap",u.mapPass=new Jr(r.x,r.y,e),u.camera.updateProjectionMatrix()}if(null===u.map){const e={minFilter:Fi,magFilter:Fi,format:ln};u.map=new Jr(r.x,r.y,e),u.map.texture.name=l.name+".shadowMap",u.camera.updateProjectionMatrix()}e.setRenderTarget(u.map),e.clear();const g=u.getViewportCount();for(let e=0;e=1):-1!==I.indexOf("OpenGL ES")&&(D=parseFloat(/^OpenGL ES (\d)/.exec(I)[1]),N=D>=2);let C=null,A={};const E=e.getParameter(3088),L=e.getParameter(2978),z=(new Xr).fromArray(E),j=(new Xr).fromArray(L);function O(t,i,n){const r=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;tn||e.height>n)&&(r=n/Math.max(e.width,e.height)),r<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const n=t?Ur:Math.floor,s=n(r*e.width),a=n(r*e.height);void 0===d&&(d=m(s,a));const o=i?m(s,a):d;return o.width=s,o.height=a,o.getContext("2d").drawImage(e,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+s+"x"+a+")."),o}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function _(e){return Rr(e.width)&&Rr(e.height)}function M(e,t){return e.generateMipmaps&&t&&e.minFilter!==Fi&&e.minFilter!==Vi}function v(t,i,r,s,a=1){e.generateMipmap(t),n.get(i).__maxMipLevel=Math.log2(Math.max(r,s,a))}function y(i,n,r,s){if(!1===o)return n;if(null!==i){if(void 0!==e[i])return e[i];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+i+"'")}let a=n;return 6403===n&&(5126===r&&(a=33326),5131===r&&(a=33325),5121===r&&(a=33321)),6407===n&&(5126===r&&(a=34837),5131===r&&(a=34843),5121===r&&(a=32849)),6408===n&&(5126===r&&(a=34836),5131===r&&(a=34842),5121===r&&(a=s===gr?35907:32856)),33325!==a&&33326!==a&&34842!==a&&34836!==a||t.get("EXT_color_buffer_float"),a}function x(e){return e===Fi||e===Gi||e===Hi?9728:9729}function b(t){const i=t.target;i.removeEventListener("dispose",b),function(t){const i=n.get(t);void 0!==i.__webglInit&&(e.deleteTexture(i.__webglTexture),n.remove(t))}(i),i.isVideoTexture&&p.delete(i),a.memory.textures--}function w(t){const i=t.target;i.removeEventListener("dispose",w),function(t){const i=t.texture,r=n.get(t),s=n.get(i);if(t){if(void 0!==s.__webglTexture&&(e.deleteTexture(s.__webglTexture),a.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(r.__webglFramebuffer[t]),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[t]);else e.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&e.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer&&e.deleteRenderbuffer(r.__webglColorRenderbuffer),r.__webglDepthRenderbuffer&&e.deleteRenderbuffer(r.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let t=0,r=i.length;t0&&r.__version!==e.version){const i=e.image;if(void 0===i)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==i.complete)return void E(r,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}i.activeTexture(33984+t),i.bindTexture(3553,r.__webglTexture)}function N(t,r){const a=n.get(t);t.version>0&&a.__version!==t.version?function(t,n,r){if(6!==n.image.length)return;A(t,n),i.activeTexture(33984+r),i.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,n.flipY),e.pixelStorei(37441,n.premultiplyAlpha),e.pixelStorei(3317,n.unpackAlignment),e.pixelStorei(37443,0);const a=n&&(n.isCompressedTexture||n.image[0].isCompressedTexture),c=n.image[0]&&n.image[0].isDataTexture,h=[];for(let e=0;e<6;e++)h[e]=a||c?c?n.image[e].image:n.image[e]:f(n.image[e],!1,!0,l);const u=h[0],p=_(u)||o,d=s.convert(n.format),g=s.convert(n.type),m=y(n.internalFormat,d,g,n.encoding);let x;if(C(34067,n,p),a){for(let e=0;e<6;e++){x=h[e].mipmaps;for(let t=0;t1||n.get(s).__currentAnisotropy)&&(e.texParameterf(i,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),n.get(s).__currentAnisotropy=s.anisotropy)}}function A(t,i){void 0===t.__webglInit&&(t.__webglInit=!0,i.addEventListener("dispose",b),t.__webglTexture=e.createTexture(),a.memory.textures++)}function E(t,n,r){let a=3553;n.isDataTexture2DArray&&(a=35866),n.isDataTexture3D&&(a=32879),A(t,n),i.activeTexture(33984+r),i.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,n.flipY),e.pixelStorei(37441,n.premultiplyAlpha),e.pixelStorei(3317,n.unpackAlignment),e.pixelStorei(37443,0);const c=function(e){return!o&&(e.wrapS!==$i||e.wrapT!==$i||e.minFilter!==Fi&&e.minFilter!==Vi)}(n)&&!1===_(n.image),l=f(n.image,c,!1,h),u=_(l)||o,p=s.convert(n.format);let d,g=s.convert(n.type),m=y(n.internalFormat,p,g,n.encoding);C(a,n,u);const x=n.mipmaps;if(n.isDepthTexture)m=6402,o?m=n.type===en?36012:n.type===Ki?33190:n.type===an?35056:33189:n.type===en&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),n.format===dn&&6402===m&&n.type!==Xi&&n.type!==Ki&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),n.type=Xi,g=s.convert(n.type)),n.format===gn&&6402===m&&(m=34041,n.type!==an&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),n.type=an,g=s.convert(n.type))),i.texImage2D(3553,0,m,l.width,l.height,0,p,g,null);else if(n.isDataTexture)if(x.length>0&&u){for(let e=0,t=x.length;e0&&u){for(let e=0,t=x.length;e=c&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+c),T+=1,e},this.resetTextureUnits=function(){T=0},this.setTexture2D=S,this.setTexture2DArray=function(e,t){const r=n.get(e);e.version>0&&r.__version!==e.version?E(r,e,t):(i.activeTexture(33984+t),i.bindTexture(35866,r.__webglTexture))},this.setTexture3D=function(e,t){const r=n.get(e);e.version>0&&r.__version!==e.version?E(r,e,t):(i.activeTexture(33984+t),i.bindTexture(32879,r.__webglTexture))},this.setTextureCube=N,this.setupRenderTarget=function(t){const c=t.texture,l=n.get(t),h=n.get(c);t.addEventListener("dispose",w),!0!==t.isWebGLMultipleRenderTargets&&(h.__webglTexture=e.createTexture(),h.__version=c.version,a.memory.textures++);const u=!0===t.isWebGLCubeRenderTarget,p=!0===t.isWebGLMultipleRenderTargets,d=!0===t.isWebGLMultisampleRenderTarget,g=c.isDataTexture3D||c.isDataTexture2DArray,m=_(t)||o;if(!o||c.format!==cn||c.type!==en&&c.type!==tn||(c.format=ln,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),u){l.__webglFramebuffer=[];for(let t=0;t<6;t++)l.__webglFramebuffer[t]=e.createFramebuffer()}else if(l.__webglFramebuffer=e.createFramebuffer(),p)if(r.drawBuffers){const i=t.texture;for(let t=0,r=i.length;to+l?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&a<=o-l&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==n),null!==o&&(o.visible=null!==r),null!==c&&(c.visible=null!==s),this}}class oh extends Ir{constructor(e,t){super();const i=this,n=e.state;let r=null,s=1,a=null,o="local-floor",c=null,l=null,h=null,u=null,p=null,d=!1,g=null,m=null,f=null,_=null,M=null,v=null;const y=[],x=new Map,b=new ho;b.layers.enable(1),b.viewport=new Xr;const w=new ho;w.layers.enable(2),w.viewport=new Xr;const T=[b,w],S=new nh;S.layers.enable(1),S.layers.enable(2);let N=null,D=null;function I(e){const t=x.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function C(){x.forEach((function(e,t){e.disconnect(t)})),x.clear(),N=null,D=null,n.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),h&&t.deleteFramebuffer(h),g&&t.deleteFramebuffer(g),m&&t.deleteRenderbuffer(m),f&&t.deleteRenderbuffer(f),h=null,g=null,m=null,f=null,p=null,u=null,l=null,r=null,O.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}function A(e){const t=r.inputSources;for(let e=0;e0&&(t.alphaTest.value=i.alphaTest);const n=e.get(i).envMap;if(n){t.envMap.value=n,t.flipEnvMap.value=n.isCubeTexture&&!1===n.isRenderTargetTexture?-1:1,t.reflectivity.value=i.reflectivity,t.ior.value=i.ior,t.refractionRatio.value=i.refractionRatio;const r=e.get(n).__maxMipLevel;void 0!==r&&(t.maxMipLevel.value=r)}let r,s;i.lightMap&&(t.lightMap.value=i.lightMap,t.lightMapIntensity.value=i.lightMapIntensity),i.aoMap&&(t.aoMap.value=i.aoMap,t.aoMapIntensity.value=i.aoMapIntensity),i.map?r=i.map:i.specularMap?r=i.specularMap:i.displacementMap?r=i.displacementMap:i.normalMap?r=i.normalMap:i.bumpMap?r=i.bumpMap:i.roughnessMap?r=i.roughnessMap:i.metalnessMap?r=i.metalnessMap:i.alphaMap?r=i.alphaMap:i.emissiveMap?r=i.emissiveMap:i.clearcoatMap?r=i.clearcoatMap:i.clearcoatNormalMap?r=i.clearcoatNormalMap:i.clearcoatRoughnessMap?r=i.clearcoatRoughnessMap:i.specularIntensityMap?r=i.specularIntensityMap:i.specularColorMap?r=i.specularColorMap:i.transmissionMap?r=i.transmissionMap:i.thicknessMap?r=i.thicknessMap:i.sheenColorMap?r=i.sheenColorMap:i.sheenRoughnessMap&&(r=i.sheenRoughnessMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix)),i.aoMap?s=i.aoMap:i.lightMap&&(s=i.lightMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),t.uv2Transform.value.copy(s.matrix))}function i(t,i){t.roughness.value=i.roughness,t.metalness.value=i.metalness,i.roughnessMap&&(t.roughnessMap.value=i.roughnessMap),i.metalnessMap&&(t.metalnessMap.value=i.metalnessMap),i.emissiveMap&&(t.emissiveMap.value=i.emissiveMap),i.bumpMap&&(t.bumpMap.value=i.bumpMap,t.bumpScale.value=i.bumpScale,i.side===Yt&&(t.bumpScale.value*=-1)),i.normalMap&&(t.normalMap.value=i.normalMap,t.normalScale.value.copy(i.normalScale),i.side===Yt&&t.normalScale.value.negate()),i.displacementMap&&(t.displacementMap.value=i.displacementMap,t.displacementScale.value=i.displacementScale,t.displacementBias.value=i.displacementBias),e.get(i).envMap&&(t.envMapIntensity.value=i.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,n,r,s,a){n.isMeshBasicMaterial?t(e,n):n.isMeshLambertMaterial?(t(e,n),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,n)):n.isMeshToonMaterial?(t(e,n),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Yt&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Yt&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,n)):n.isMeshPhongMaterial?(t(e,n),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Yt&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Yt&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,n)):n.isMeshStandardMaterial?(t(e,n),n.isMeshPhysicalMaterial?function(e,t,n){i(e,t),e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap)),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===Yt&&e.clearcoatNormalScale.value.negate())),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,n,a):i(e,n)):n.isMeshMatcapMaterial?(t(e,n),function(e,t){t.matcap&&(e.matcap.value=t.matcap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Yt&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Yt&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,n)):n.isMeshDepthMaterial?(t(e,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,n)):n.isMeshDistanceMaterial?(t(e,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,n)):n.isMeshNormalMaterial?(t(e,n),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Yt&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Yt&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,n)):n.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,n),n.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,n)):n.isPointsMaterial?function(e,t,i,n){let r;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*i,e.scale.value=.5*n,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?r=t.map:t.alphaMap&&(r=t.alphaMap),void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix))}(e,n,r,s):n.isSpriteMaterial?function(e,t){let i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,n):n.isShadowMaterial?(e.color.value.copy(n.color),e.opacity.value=n.opacity):n.isShaderMaterial&&(n.uniformsNeedUpdate=!1)}}}function lh(e={}){const t=void 0!==e.canvas?e.canvas:function(){const e=Hr("canvas");return e.style.display="block",e}(),i=void 0!==e.context?e.context:null,n=void 0!==e.alpha&&e.alpha,r=void 0===e.depth||e.depth,s=void 0===e.stencil||e.stencil,a=void 0!==e.antialias&&e.antialias,o=void 0===e.premultipliedAlpha||e.premultipliedAlpha,c=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,l=void 0!==e.powerPreference?e.powerPreference:"default",h=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let u=null,p=null;const d=[],g=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=dr,this.physicallyCorrectLights=!1,this.toneMapping=Di,this.toneMappingExposure=1;const m=this;let f=!1,_=0,M=0,v=null,y=-1,x=null;const b=new Xr,w=new Xr;let T=null,S=t.width,N=t.height,D=1,I=null,C=null;const A=new Xr(0,0,S,N),E=new Xr(0,0,S,N);let L=!1;const z=[],j=new bo;let O=!1,k=!1,P=null;const R=new Ls,U=new ts,$={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function B(){return null===v?D:1}let F,G,H,V,Y,q,W,Q,Z,X,J,K,ee,te,ie,ne,re,se,ae,oe,ce,le,he,ue=i;function pe(e,i){for(let n=0;n0&&function(e,t,i){if(null===P){const e=!0===a&&!0===G.isWebGL2;P=new(e?Kr:Jr)(1024,1024,{generateMipmaps:!0,type:null!==le.convert(tn)?tn:Wi,minFilter:qi,magFilter:Fi,wrapS:$i,wrapT:$i})}const n=m.getRenderTarget();m.setRenderTarget(P),m.clear();const r=m.toneMapping;m.toneMapping=Di,Te(e,t,i),m.toneMapping=r,q.updateMultisampleRenderTarget(P),q.updateRenderTargetMipmap(P),m.setRenderTarget(n)}(r,t,i),n&&H.viewport(b.copy(n)),r.length>0&&Te(r,t,i),s.length>0&&Te(s,t,i),o.length>0&&Te(o,t,i)}function Te(e,t,i){const n=!0===t.isScene?t.overrideMaterial:null;for(let r=0,s=e.length;r0?g[g.length-1]:null,d.pop(),u=d.length>0?d[d.length-1]:null},this.getActiveCubeFace=function(){return _},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return v},this.setRenderTarget=function(e,t=0,i=0){v=e,_=t,M=i,e&&void 0===Y.get(e).__webglFramebuffer&&q.setupRenderTarget(e);let n=null,r=!1,s=!1;if(e){const i=e.texture;(i.isDataTexture3D||i.isDataTexture2DArray)&&(s=!0);const a=Y.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(n=a[t],r=!0):n=e.isWebGLMultisampleRenderTarget?Y.get(e).__webglMultisampledFramebuffer:a,b.copy(e.viewport),w.copy(e.scissor),T=e.scissorTest}else b.copy(A).multiplyScalar(D).floor(),w.copy(E).multiplyScalar(D).floor(),T=L;if(H.bindFramebuffer(36160,n)&&G.drawBuffers){let t=!1;if(e)if(e.isWebGLMultipleRenderTargets){const i=e.texture;if(z.length!==i.length||36064!==z[0]){for(let e=0,t=i.length;e=0&&t<=e.width-n&&i>=0&&i<=e.height-r&&ue.readPixels(t,i,n,r,le.convert(o),le.convert(c),s):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==v?Y.get(v).__webglFramebuffer:null;H.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,i=0){const n=Math.pow(2,-i),r=Math.floor(t.image.width*n),s=Math.floor(t.image.height*n);let a=le.convert(t.format);G.isWebGL2&&(6407===a&&(a=32849),6408===a&&(a=32856)),q.setTexture2D(t,0),ue.copyTexImage2D(3553,i,a,e.x,e.y,r,s,0),H.unbindTexture()},this.copyTextureToTexture=function(e,t,i,n=0){const r=t.image.width,s=t.image.height,a=le.convert(i.format),o=le.convert(i.type);q.setTexture2D(i,0),ue.pixelStorei(37440,i.flipY),ue.pixelStorei(37441,i.premultiplyAlpha),ue.pixelStorei(3317,i.unpackAlignment),t.isDataTexture?ue.texSubImage2D(3553,n,e.x,e.y,r,s,a,o,t.image.data):t.isCompressedTexture?ue.compressedTexSubImage2D(3553,n,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):ue.texSubImage2D(3553,n,e.x,e.y,a,o,t.image),0===n&&i.generateMipmaps&&ue.generateMipmap(3553),H.unbindTexture()},this.copyTextureToTexture3D=function(e,t,i,n,r=0){if(m.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=e.max.x-e.min.x+1,a=e.max.y-e.min.y+1,o=e.max.z-e.min.z+1,c=le.convert(n.format),l=le.convert(n.type);let h;if(n.isDataTexture3D)q.setTexture3D(n,0),h=32879;else{if(!n.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");q.setTexture2DArray(n,0),h=35866}ue.pixelStorei(37440,n.flipY),ue.pixelStorei(37441,n.premultiplyAlpha),ue.pixelStorei(3317,n.unpackAlignment);const u=ue.getParameter(3314),p=ue.getParameter(32878),d=ue.getParameter(3316),g=ue.getParameter(3315),f=ue.getParameter(32877),_=i.isCompressedTexture?i.mipmaps[0]:i.image;ue.pixelStorei(3314,_.width),ue.pixelStorei(32878,_.height),ue.pixelStorei(3316,e.min.x),ue.pixelStorei(3315,e.min.y),ue.pixelStorei(32877,e.min.z),i.isDataTexture||i.isDataTexture3D?ue.texSubImage3D(h,r,t.x,t.y,t.z,s,a,o,c,l,_.data):i.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ue.compressedTexSubImage3D(h,r,t.x,t.y,t.z,s,a,o,c,_.data)):ue.texSubImage3D(h,r,t.x,t.y,t.z,s,a,o,c,l,_),ue.pixelStorei(3314,u),ue.pixelStorei(32878,p),ue.pixelStorei(3316,d),ue.pixelStorei(3315,g),ue.pixelStorei(32877,f),0===r&&n.generateMipmaps&&ue.generateMipmap(h),H.unbindTexture()},this.initTexture=function(e){q.setTexture2D(e,0),H.unbindTexture()},this.resetState=function(){_=0,M=0,v=null,H.reset(),he.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}lh.prototype.isWebGLRenderer=!0,class extends lh{}.prototype.isWebGL1Renderer=!0;class hh extends na{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}hh.prototype.isScene=!0;class uh{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Sr,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=jr()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let n=0,r=this.stride;ne.far||t.push({distance:o,point:fh.clone(),uv:ga.getUV(fh,bh,wh,Th,Sh,Nh,Dh,new Br),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Ch(e,t,i,n,r,s){vh.subVectors(e,i).addScalar(.5).multiply(n),void 0!==r?(yh.x=s*vh.x-r*vh.y,yh.y=r*vh.x+s*vh.y):yh.copy(vh),e.copy(t),e.x+=yh.x,e.y+=yh.y,e.applyMatrix4(xh)}Ih.prototype.isSprite=!0;const Ah=new ts,Eh=new Xr,Lh=new Xr,zh=new ts,jh=new Ls;class Oh extends io{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Ls,this.bindMatrixInverse=new Ls}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Xr,t=this.geometry.attributes.skinWeight;for(let i=0,n=t.count;io)continue;u.applyMatrix4(this.matrixWorld);const p=e.ray.origin.distanceTo(u);pe.far||t.push({distance:p,point:h.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}else for(let i=Math.max(0,s.start),n=Math.min(r.count,s.start+s.count)-1;io)continue;u.applyMatrix4(this.matrixWorld);const n=e.ray.origin.distanceTo(u);ne.far||t.push({distance:n,point:h.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else i.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,i=Object.keys(t);if(i.length>0){const e=t[i[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,i=e.length;t0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}qh.prototype.isLine=!0;const Wh=new ts,Qh=new ts;class Zh extends qh{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,i=[];for(let e=0,n=t.count;e0){const e=t[i[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,i=e.length;t0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function nu(e,t,i,n,r,s,a){const o=Kh.distanceSqToPoint(e);if(or.far)return;s.push({distance:c,distanceToRay:Math.sqrt(o),point:i,index:t,face:null,object:a})}}iu.prototype.isPoints=!0,class extends Qr{constructor(e,t,i,n,r,s,a,o,c){super(e,t,i,n,r,s,a,o,c),this.format=void 0!==a?a:cn,this.minFilter=void 0!==s?s:Vi,this.magFilter=void 0!==r?r:Vi,this.generateMipmaps=!1;const l=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){l.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}.prototype.isVideoTexture=!0,class extends Qr{constructor(e,t,i,n,r,s,a,o,c,l,h,u){super(null,s,a,o,c,l,n,r,h,u),this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}.prototype.isCompressedTexture=!0,class extends Qr{constructor(e,t,i,n,r,s,a,o,c){super(e,t,i,n,r,s,a,o,c),this.needsUpdate=!0}}.prototype.isCanvasTexture=!0,class extends Qr{constructor(e,t,i,n,r,s,a,o,c,l){if((l=void 0!==l?l:dn)!==dn&&l!==gn)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&l===dn&&(i=Xi),void 0===i&&l===gn&&(i=an),super(null,n,r,s,a,o,l,i,c),this.image={width:e,height:t},this.magFilter=void 0!==a?a:Fi,this.minFilter=void 0!==o?o:Fi,this.flipY=!1,this.generateMipmaps=!1}}.prototype.isDepthTexture=!0;class ru extends Ra{constructor(e=1,t=8,i=0,n=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:n},t=Math.max(3,t);const r=[],s=[],a=[],o=[],c=new ts,l=new Br;s.push(0,0,0),a.push(0,0,1),o.push(.5,.5);for(let r=0,h=3;r<=t;r++,h+=3){const u=i+r/t*n;c.x=e*Math.cos(u),c.y=e*Math.sin(u),s.push(c.x,c.y,c.z),a.push(0,0,1),l.x=(s[h]/e+1)/2,l.y=(s[h+1]/e+1)/2,o.push(l.x,l.y)}for(let e=1;e<=t;e++)r.push(e,e+1,0);this.setIndex(r),this.setAttribute("position",new Aa(s,3)),this.setAttribute("normal",new Aa(a,3)),this.setAttribute("uv",new Aa(o,2))}static fromJSON(e){return new ru(e.radius,e.segments,e.thetaStart,e.thetaLength)}}new ts,new ts,new ts,new ga;class su{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,n=this.getPoint(0),r=0;t.push(0);for(let s=1;s<=e;s++)i=this.getPoint(s/e),r+=i.distanceTo(n),t.push(r),n=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let n=0;const r=i.length;let s;s=t||e*i[r-1];let a,o=0,c=r-1;for(;o<=c;)if(n=Math.floor(o+(c-o)/2),a=i[n]-s,a<0)o=n+1;else{if(!(a>0)){c=n;break}c=n-1}if(n=c,i[n]===s)return n/(r-1);const l=i[n];return(n+(s-l)/(i[n+1]-l))/(r-1)}getTangent(e,t){const i=1e-4;let n=e-i,r=e+i;n<0&&(n=0),r>1&&(r=1);const s=this.getPoint(n),a=this.getPoint(r),o=t||(s.isVector2?new Br:new ts);return o.copy(a).sub(s).normalize(),o}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new ts,n=[],r=[],s=[],a=new ts,o=new Ls;for(let t=0;t<=e;t++){const i=t/e;n[t]=this.getTangentAt(i,new ts)}r[0]=new ts,s[0]=new ts;let c=Number.MAX_VALUE;const l=Math.abs(n[0].x),h=Math.abs(n[0].y),u=Math.abs(n[0].z);l<=c&&(c=l,i.set(1,0,0)),h<=c&&(c=h,i.set(0,1,0)),u<=c&&i.set(0,0,1),a.crossVectors(n[0],i).normalize(),r[0].crossVectors(n[0],a),s[0].crossVectors(n[0],r[0]);for(let t=1;t<=e;t++){if(r[t]=r[t-1].clone(),s[t]=s[t-1].clone(),a.crossVectors(n[t-1],n[t]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(Or(n[t-1].dot(n[t]),-1,1));r[t].applyMatrix4(o.makeRotationAxis(a,e))}s[t].crossVectors(n[t],r[t])}if(!0===t){let t=Math.acos(Or(r[0].dot(r[e]),-1,1));t/=e,n[0].dot(a.crossVectors(r[0],r[e]))>0&&(t=-t);for(let i=1;i<=e;i++)r[i].applyMatrix4(o.makeRotationAxis(n[i],t*i)),s[i].crossVectors(n[i],r[i])}return{tangents:n,normals:r,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class au extends su{constructor(e=0,t=0,i=1,n=1,r=0,s=2*Math.PI,a=!1,o=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=n,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=a,this.aRotation=o}getPoint(e,t){const i=t||new Br,n=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)n;)r-=n;r0?0:(Math.floor(Math.abs(c)/r)+1)*r:0===l&&c===r-1&&(c=r-2,l=1),this.closed||c>0?a=n[(c-1)%r]:(lu.subVectors(n[0],n[1]).add(n[0]),a=lu);const h=n[c%r],u=n[(c+1)%r];if(this.closed||c+2n.length-2?n.length-1:s+1],h=n[s>n.length-3?n.length-1:s+2];return i.set(gu(a,o.x,c.x,l.x,h.x),gu(a,o.y,c.y,l.y,h.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const e=n[r]-i,s=this.curves[r],a=s.getLength(),o=0===a?0:1-e/a;return s.getPointAt(o,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,n=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const e=c.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(c);const l=c.getPoint(1);return this.currentPoint.copy(l),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Nu extends Su{constructor(e){super(e),this.uuid=jr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,n=this.holes.length;i0)for(s=t;s=t;s-=n)a=Wu(s,e[s],e[s+1],a);return a&&Fu(a,a.next)&&(Qu(a),a=a.next),a}function Iu(e,t){if(!e)return e;t||(t=e);let i,n=e;do{if(i=!1,n.steiner||!Fu(n,n.next)&&0!==Bu(n.prev,n,n.next))n=n.next;else{if(Qu(n),n=t=n.prev,n===n.next)break;i=!0}}while(i||n!==t);return t}function Cu(e,t,i,n,r,s,a){if(!e)return;!a&&s&&function(e,t,i,n){let r=e;do{null===r.z&&(r.z=Pu(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,function(e){let t,i,n,r,s,a,o,c,l=1;do{for(i=e,e=null,s=null,a=0;i;){for(a++,n=i,o=0,t=0;t0||c>0&&n;)0!==o&&(0===c||!n||i.z<=n.z)?(r=i,i=i.nextZ,o--):(r=n,n=n.nextZ,c--),s?s.nextZ=r:e=r,r.prevZ=s,s=r;i=n}s.nextZ=null,l*=2}while(a>1)}(r)}(e,n,r,s);let o,c,l=e;for(;e.prev!==e.next;)if(o=e.prev,c=e.next,s?Eu(e,n,r,s):Au(e))t.push(o.i/i),t.push(e.i/i),t.push(c.i/i),Qu(e),e=c.next,l=c.next;else if((e=c)===l){a?1===a?Cu(e=Lu(Iu(e),t,i),t,i,n,r,s,2):2===a&&zu(e,t,i,n,r,s):Cu(Iu(e),t,i,n,r,s,1);break}}function Au(e){const t=e.prev,i=e,n=e.next;if(Bu(t,i,n)>=0)return!1;let r=e.next.next;for(;r!==e.prev;){if(Uu(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&Bu(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Eu(e,t,i,n){const r=e.prev,s=e,a=e.next;if(Bu(r,s,a)>=0)return!1;const o=r.xs.x?r.x>a.x?r.x:a.x:s.x>a.x?s.x:a.x,h=r.y>s.y?r.y>a.y?r.y:a.y:s.y>a.y?s.y:a.y,u=Pu(o,c,t,i,n),p=Pu(l,h,t,i,n);let d=e.prevZ,g=e.nextZ;for(;d&&d.z>=u&&g&&g.z<=p;){if(d!==e.prev&&d!==e.next&&Uu(r.x,r.y,s.x,s.y,a.x,a.y,d.x,d.y)&&Bu(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,g!==e.prev&&g!==e.next&&Uu(r.x,r.y,s.x,s.y,a.x,a.y,g.x,g.y)&&Bu(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&Uu(r.x,r.y,s.x,s.y,a.x,a.y,d.x,d.y)&&Bu(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;g&&g.z<=p;){if(g!==e.prev&&g!==e.next&&Uu(r.x,r.y,s.x,s.y,a.x,a.y,g.x,g.y)&&Bu(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function Lu(e,t,i){let n=e;do{const r=n.prev,s=n.next.next;!Fu(r,s)&&Gu(r,n,n.next,s)&&Yu(r,s)&&Yu(s,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(s.i/i),Qu(n),Qu(n.next),n=e=s),n=n.next}while(n!==e);return Iu(n)}function zu(e,t,i,n,r,s){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&$u(a,e)){let o=qu(a,e);return a=Iu(a,a.next),o=Iu(o,o.next),Cu(a,t,i,n,r,s),void Cu(o,t,i,n,r,s)}e=e.next}a=a.next}while(a!==e)}function ju(e,t){return e.x-t.x}function Ou(e,t){if(t=function(e,t){let i=t;const n=e.x,r=e.y;let s,a=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){const e=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(e<=n&&e>a){if(a=e,e===n){if(r===i.y)return i;if(r===i.next.y)return i.next}s=i.x=i.x&&i.x>=c&&n!==i.x&&Uu(rs.x||i.x===s.x&&ku(s,i)))&&(s=i,u=h)),i=i.next}while(i!==o);return s}(e,t),t){const i=qu(t,e);Iu(t,t.next),Iu(i,i.next)}}function ku(e,t){return Bu(e.prev,e,t.prev)<0&&Bu(t.next,e,e.next)<0}function Pu(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Ru(e){let t=e,i=e;do{(t.x=0&&(e-a)*(n-o)-(i-a)*(t-o)>=0&&(i-a)*(s-o)-(r-a)*(n-o)>=0}function $u(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&Gu(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}(e,t)&&(Yu(e,t)&&Yu(t,e)&&function(e,t){let i=e,n=!1;const r=(e.x+t.x)/2,s=(e.y+t.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}(e,t)&&(Bu(e.prev,e,t.prev)||Bu(e,t.prev,t))||Fu(e,t)&&Bu(e.prev,e,e.next)>0&&Bu(t.prev,t,t.next)>0)}function Bu(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function Fu(e,t){return e.x===t.x&&e.y===t.y}function Gu(e,t,i,n){const r=Vu(Bu(e,t,i)),s=Vu(Bu(e,t,n)),a=Vu(Bu(i,n,e)),o=Vu(Bu(i,n,t));return r!==s&&a!==o||!(0!==r||!Hu(e,i,t))||!(0!==s||!Hu(e,n,t))||!(0!==a||!Hu(i,e,n))||!(0!==o||!Hu(i,t,n))}function Hu(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function Vu(e){return e>0?1:e<0?-1:0}function Yu(e,t){return Bu(e.prev,e,e.next)<0?Bu(e,t,e.next)>=0&&Bu(e,e.prev,t)>=0:Bu(e,t,e.prev)<0||Bu(e,e.next,t)<0}function qu(e,t){const i=new Zu(e.i,e.x,e.y),n=new Zu(t.i,t.x,t.y),r=e.next,s=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function Wu(e,t,i,n){const r=new Zu(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function Qu(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Zu(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Xu{static area(e){const t=e.length;let i=0;for(let n=t-1,r=0;r80*i){o=l=e[0],c=h=e[1];for(let t=i;tl&&(l=u),p>h&&(h=p);d=Math.max(l-o,h-c),d=0!==d?1/d:0}return Cu(s,a,i,o,c,d),a}(i,n);for(let e=0;e2&&e[t-1].equals(e[0])&&e.pop()}function Ku(e,t){for(let i=0;iNumber.EPSILON){const u=Math.sqrt(h),p=Math.sqrt(c*c+l*l),d=t.x-o/u,g=t.y+a/u,m=((i.x-l/p-d)*l-(i.y+c/p-g)*c)/(a*l-o*c);n=d+a*m-e.x,r=g+o*m-e.y;const f=n*n+r*r;if(f<=2)return new Br(n,r);s=Math.sqrt(f/2)}else{let e=!1;a>Number.EPSILON?c>Number.EPSILON&&(e=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(l)&&(e=!0),e?(n=-o,r=a,s=Math.sqrt(h)):(n=a,r=o,s=Math.sqrt(h/2))}return new Br(n/s,r/s)}const E=[];for(let e=0,t=N.length,i=t-1,n=e+1;e=0;e--){const t=e/d,i=h*Math.cos(t*Math.PI/2),n=u*Math.sin(t*Math.PI/2)+p;for(let e=0,t=N.length;e=0;){const n=i;let r=i-1;r<0&&(r=e.length-1);for(let e=0,i=o+2*d;e0)&&p.push(t,r,c),(e!==i-1||o0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}.prototype.isMeshPhysicalMaterial=!0,class extends fa{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new wa(16777215),this.specular=new wa(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new wa(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=br,this.normalScale=new Br(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Ti,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}}.prototype.isMeshPhongMaterial=!0,class extends fa{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new wa(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new wa(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=br,this.normalScale=new Br(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}.prototype.isMeshToonMaterial=!0,class extends fa{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=br,this.normalScale=new Br(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}.prototype.isMeshNormalMaterial=!0,class extends fa{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new wa(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new wa(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Ti,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}.prototype.isMeshLambertMaterial=!0,class extends fa{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new wa(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=br,this.normalScale=new Br(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}}.prototype.isMeshMatcapMaterial=!0,class extends Bh{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}.prototype.isLineDashedMaterial=!0;const sp={arraySlice:function(e,t,i){return sp.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==i?i:e.length)):e.slice(t,i)},convertArray:function(e,t,i){return!e||!i&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,i=new Array(t);for(let e=0;e!==t;++e)i[e]=e;return i.sort((function(t,i){return e[t]-e[i]})),i},sortedArray:function(e,t,i){const n=e.length,r=new e.constructor(n);for(let s=0,a=0;a!==n;++s){const n=i[s]*t;for(let i=0;i!==t;++i)r[a++]=e[n+i]}return r},flattenJSON:function(e,t,i,n){let r=1,s=e[0];for(;void 0!==s&&void 0===s[n];)s=e[r++];if(void 0===s)return;let a=s[n];if(void 0!==a)if(Array.isArray(a))do{a=s[n],void 0!==a&&(t.push(s.time),i.push.apply(i,a)),s=e[r++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[n],void 0!==a&&(t.push(s.time),a.toArray(i,i.length)),s=e[r++]}while(void 0!==s);else do{a=s[n],void 0!==a&&(t.push(s.time),i.push(a)),s=e[r++]}while(void 0!==s)},subclip:function(e,t,i,n,r=30){const s=e.clone();s.name=t;const a=[];for(let e=0;e=n)){c.push(t.times[e]);for(let i=0;is.tracks[e].times[0]&&(o=s.tracks[e].times[0]);for(let e=0;e=n.times[u]){const e=u*c+o,t=e+c-o;p=sp.arraySlice(n.values,e,t)}else{const e=n.createInterpolant(),t=o,i=c-o;e.evaluate(s),p=sp.arraySlice(e.resultBuffer,t,i)}"quaternion"===r&&(new es).fromArray(p).normalize().conjugate().toArray(p);const d=a.times.length;for(let e=0;e=r)break e;{const a=t[1];e=r)break t}s=i,i=0}}for(;i>>1;et;)--s;if(++s,0!==r||s!==n){r>=s&&(s=Math.max(s,1),r=s-1);const e=this.getValueSize();this.times=sp.arraySlice(i,r,s),this.values=sp.arraySlice(this.values,r*e,s*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let t=0;t!==r;t++){const n=i[t];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,n),e=!1;break}if(null!==s&&s>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,n,s),e=!1;break}s=n}if(void 0!==n&&sp.isTypedArray(n))for(let t=0,i=n.length;t!==i;++t){const i=n[t];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,i),e=!1;break}}return e}optimize(){const e=sp.arraySlice(this.times),t=sp.arraySlice(this.values),i=this.getValueSize(),n=this.getInterpolation()===lr,r=e.length-1;let s=1;for(let a=1;a0){e[s]=e[r];for(let e=r*i,n=s*i,a=0;a!==i;++a)t[n+a]=t[e+a];++s}return s!==e.length?(this.times=sp.arraySlice(e,0,s),this.values=sp.arraySlice(t,0,s*i)):(this.times=e,this.values=t),this}clone(){const e=sp.arraySlice(this.times,0),t=sp.arraySlice(this.values,0),i=new(0,this.constructor)(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}hp.prototype.TimeBufferType=Float32Array,hp.prototype.ValueBufferType=Float32Array,hp.prototype.DefaultInterpolation=cr;class up extends hp{}up.prototype.ValueTypeName="bool",up.prototype.ValueBufferType=Array,up.prototype.DefaultInterpolation=or,up.prototype.InterpolantFactoryMethodLinear=void 0,up.prototype.InterpolantFactoryMethodSmooth=void 0;class pp extends hp{}pp.prototype.ValueTypeName="color";class dp extends hp{}dp.prototype.ValueTypeName="number";class gp extends ap{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e,t,i,n){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(i-t)/(n-t);let c=e*a;for(let e=c+a;c!==e;c+=4)es.slerpFlat(r,0,s,c-a,s,c,o);return r}}class mp extends hp{InterpolantFactoryMethodLinear(e){return new gp(this.times,this.values,this.getValueSize(),e)}}mp.prototype.ValueTypeName="quaternion",mp.prototype.DefaultInterpolation=cr,mp.prototype.InterpolantFactoryMethodSmooth=void 0;class fp extends hp{}fp.prototype.ValueTypeName="string",fp.prototype.ValueBufferType=Array,fp.prototype.DefaultInterpolation=or,fp.prototype.InterpolantFactoryMethodLinear=void 0,fp.prototype.InterpolantFactoryMethodSmooth=void 0;class _p extends hp{}_p.prototype.ValueTypeName="vector";class Mp{constructor(e,t=-1,i,n=2500){this.name=e,this.tracks=i,this.duration=t,this.blendMode=n,this.uuid=jr(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,n=1/(e.fps||1);for(let e=0,r=i.length;e!==r;++e)t.push(vp(i[e]).scale(n));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,n=i.length;e!==n;++e)t.push(hp.toJSON(i[e]));return n}static CreateFromMorphTargetSequence(e,t,i,n){const r=t.length,s=[];for(let e=0;e1){const e=s[1];let t=n[e];t||(n[e]=t=[]),t.push(i)}}const s=[];for(const e in n)s.push(this.CreateFromMorphTargetSequence(e,n[e],t,i));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(e,t,i,n,r){if(0!==i.length){const s=[],a=[];sp.flattenJSON(i,s,a,n),0!==s.length&&r.push(new e(t,s,a))}},n=[],r=e.name||"default",s=e.fps||30,a=e.blendMode;let o=e.length||-1;const c=e.hierarchy||[];for(let e=0;e{t&&t(r),this.manager.itemEnd(e)}),0),r;if(void 0!==wp[e])return void wp[e].push({onLoad:t,onProgress:i,onError:n});wp[e]=[],wp[e].push({onLoad:t,onProgress:i,onError:n});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(s).then((t=>{if(200===t.status||0===t.status){0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");const i=wp[e],n=t.body.getReader(),r=t.headers.get("Content-Length"),s=r?parseInt(r):0,a=0!==s;let o=0;return new ReadableStream({start(e){!function t(){n.read().then((({done:n,value:r})=>{if(n)e.close();else{o+=r.byteLength;const n=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let e=0,t=i.length;e{const t=new Response(e);switch(this.responseType){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then((e=>(new DOMParser).parseFromString(e,this.mimeType)));case"json":return t.json();default:return t.text()}})).then((t=>{yp.add(e,t);const i=wp[e];delete wp[e];for(let e=0,n=i.length;e{const i=wp[e];delete wp[e];for(let e=0,n=i.length;e0&&this._mixBufferRegionAdditive(i,n,this._addIndex*t,1,t);for(let e=t,r=t+t;e!==r;++e)if(i[e]!==i[e+t]){a.setValue(i,n);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,n=i*this._origIndex;e.getValue(t,n);for(let e=i,r=n;e!==r;++e)t[e]=t[n+e%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let n=0;n!==r;++n)e[t+n]=e[i+n]}_slerp(e,t,i,n){es.slerpFlat(e,t,e,t,e,i,n)}_slerpAdditive(e,t,i,n,r){const s=this._workIndex*r;es.multiplyQuaternionsFlat(e,s,e,t,e,i),es.slerpFlat(e,t,e,t,e,s,n)}_lerp(e,t,i,n,r){const s=1-n;for(let a=0;a!==r;++a){const r=t+a;e[r]=e[r]*s+e[i+a]*n}}_lerpAdditive(e,t,i,n,r){for(let s=0;s!==r;++s){const r=t+s;e[r]=e[r]+e[i+s]*n}}}const qp="\\[\\]\\.:\\/",Wp=new RegExp("["+qp+"]","g"),Qp="[^"+qp+"]",Zp="[^"+qp.replace("\\.","")+"]",Xp=/((?:WC+[\/:])*)/.source.replace("WC",Qp),Jp=/(WCOD+)?/.source.replace("WCOD",Zp),Kp=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Qp),ed=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Qp),td=new RegExp("^"+Xp+Jp+Kp+ed+"$"),id=["material","materials","bones"];class nd{constructor(e,t,i){this.path=t,this.parsedPath=i||nd.parseTrackName(t),this.node=nd.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new nd.Composite(e,t,i):new nd(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Wp,"")}static parseTrackName(e){const t=td.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const e=i.nodeName.substring(n+1);-1!==id.indexOf(e)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=e)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(void 0!==i)return i}if(e.children){const i=function(e){for(let n=0;n0){const e=this._interpolants,t=this._propertyBindings;if(2501===this.blendMode)for(let i=0,n=e.length;i!==n;++i)e[i].evaluate(s),t[i].accumulateAdditive(a);else for(let i=0,r=e.length;i!==r;++i)e[i].evaluate(s),t[i].accumulate(n,a)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(null!==i){const n=i.evaluate(e)[0];t*=n,e>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;null!==i&&(t*=i.evaluate(e)[0],e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let n=this.time+e,r=this._loopCount;const s=2202===i;if(0===e)return-1===r||!s||1&~r?n:t-n;if(2200===i){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(n>=t)n=t;else{if(!(n<0)){this.time=n;break e}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(e>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),n>=t||n<0){const i=Math.floor(n/t);n-=t*i,r+=Math.abs(i);const a=this.repetitions-r;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=e>0?t:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=n;if(s&&!(1&~r))return t-n}return n}_setEndings(e,t,i){const n=this._interpolantSettings;i?(n.endingStart=ur,n.endingEnd=ur):(n.endingStart=e?this.zeroSlopeAtStart?ur:hr:pr,n.endingEnd=t?this.zeroSlopeAtEnd?ur:hr:pr)}_scheduleFading(e,t,i){const n=this._mixer,r=n.time;let s=this._weightInterpolant;null===s&&(s=n._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=r,o[0]=t,a[1]=r+e,o[1]=i,this}}(class extends Ir{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,n=e._clip.tracks,r=n.length,s=e._propertyBindings,a=e._interpolants,o=i.uuid,c=this._bindingsByRootAndName;let l=c[o];void 0===l&&(l={},c[o]=l);for(let e=0;e!==r;++e){const r=n[e],c=r.name;let h=l[c];if(void 0!==h)s[e]=h;else{if(h=s[e],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,o,c));continue}const n=t&&t._propertyBindings[e].binding.parsedPath;h=new Yp(nd.create(i,c,n),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,o,c),s[e]=h}a[e].resultBuffer=h.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,i=e._clip.uuid,n=this._actionsByClip[i];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,i,t)}const t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){const i=t[e];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){const i=t[e];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,n=this.time+=e,r=Math.sign(e),s=this._accuIndex^=1;for(let a=0;a!==i;++a)t[a]._update(n,e,r,s);const a=this._bindings,o=this._nActiveBindings;for(let e=0;e!==o;++e)a[e].apply(s);return this}setTime(e){this.time=0;for(let e=0;e0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;ethis)))}cacheImage$(){return this._cache.cacheImage$(this._spatial).pipe(ze((()=>this)))}cacheSequenceEdges(e){this._cache.cacheSequenceEdges(e)}cacheSpatialEdges(e){this._cache.cacheSpatialEdges(e)}dispose(){null!=this._cache&&(this._cache.dispose(),this._cache=null),this._core=null,this._spatial=null}initializeCache(e){if(null!=this._cache)throw new Error(`Image cache already initialized (${this.id}).`);this._cache=e}makeComplete(e){if(null==e)throw new Error("Fill can not be null.");this._spatial=e}resetSequenceEdges(){this._cache.resetSequenceEdges()}resetSpatialEdges(){this._cache.resetSpatialEdges()}uncache(){null!=this._cache&&(this._cache.dispose(),this._cache=null)}}class Sd{constructor(e){this._disposed=!1,this._provider=e,this._image=null,this._mesh=null,this._sequenceEdges={cached:!1,edges:[]},this._spatialEdges={cached:!1,edges:[]},this._imageChanged$=new V,this._image$=this._imageChanged$.pipe(Lt(null),St(1),F()),this._iamgeSubscription=this._image$.subscribe(),this._sequenceEdgesChanged$=new V,this._sequenceEdges$=this._sequenceEdgesChanged$.pipe(Lt(this._sequenceEdges),St(1),F()),this._sequenceEdgesSubscription=this._sequenceEdges$.subscribe((()=>{})),this._spatialEdgesChanged$=new V,this._spatialEdges$=this._spatialEdgesChanged$.pipe(Lt(this._spatialEdges),St(1),F()),this._spatialEdgesSubscription=this._spatialEdges$.subscribe((()=>{})),this._cachingAssets$=null}get image(){return this._image}get image$(){return this._image$}get mesh(){return this._mesh}get sequenceEdges(){return this._sequenceEdges}get sequenceEdges$(){return this._sequenceEdges$}get spatialEdges(){return this._spatialEdges}get spatialEdges$(){return this._spatialEdges$}cacheAssets$(e,t){return null!=this._cachingAssets$||(this._cachingAssets$=$e(this._cacheImage$(e),this._cacheMesh$(e,t)).pipe(ze((([e,t])=>(this._image=e,this._mesh=t,this))),Mt((()=>{this._cachingAssets$=null})),St(1),F()),this._cachingAssets$.pipe(vt((e=>!!e._image))).subscribe((()=>{this._imageChanged$.next(this._image)}),(()=>{}))),this._cachingAssets$}cacheImage$(e){if(null!=this._image)return Ne(this);const t=this._cacheImage$(e).pipe(vt((e=>!!e)),kt((e=>{this._disposeImage(),this._image=e})),ze((()=>this)),St(1),F());return t.subscribe((()=>{this._imageChanged$.next(this._image)}),(()=>{})),t}cacheSequenceEdges(e){this._sequenceEdges={cached:!0,edges:e},this._sequenceEdgesChanged$.next(this._sequenceEdges)}cacheSpatialEdges(e){this._spatialEdges={cached:!0,edges:e},this._spatialEdgesChanged$.next(this._spatialEdges)}dispose(){this._iamgeSubscription.unsubscribe(),this._sequenceEdgesSubscription.unsubscribe(),this._spatialEdgesSubscription.unsubscribe(),this._disposeImage(),this._mesh=null,this._sequenceEdges={cached:!1,edges:[]},this._spatialEdges={cached:!1,edges:[]},this._imageChanged$.next(null),this._sequenceEdgesChanged$.next(this._sequenceEdges),this._spatialEdgesChanged$.next(this._spatialEdges),this._disposed=!0,null!=this._imageAborter&&(this._imageAborter(),this._imageAborter=null),null!=this._meshAborter&&(this._meshAborter(),this._meshAborter=null)}resetSequenceEdges(){this._sequenceEdges={cached:!1,edges:[]},this._sequenceEdgesChanged$.next(this._sequenceEdges)}resetSpatialEdges(){this._spatialEdges={cached:!1,edges:[]},this._spatialEdgesChanged$.next(this._spatialEdges)}_cacheImage$(e){return P.create((t=>{const i=new Promise(((e,t)=>{this._imageAborter=t})),n=e.thumb.url;if(n)this._provider.getImageBuffer(n,i).then((e=>{this._imageAborter=null;const i=new Image;i.crossOrigin="Anonymous",i.onload=()=>{if(this._disposed){window.URL.revokeObjectURL(i.src);const e=`Image load was aborted (${n})`;t.error(new Error(e))}else t.next(i),t.complete()},i.onerror=()=>{this._imageAborter=null,t.error(new Error(`Failed to load image (${n})`))};const r=new Blob([e]);i.src=window.URL.createObjectURL(r)}),(e=>{this._imageAborter=null,t.error(e)}));else{const i=e.thumb.id,r=`Incorrect thumb URL for ${e.id} (${i}, ${n})`;t.error(new Error(r))}}))}_cacheMesh$(e,t){return P.create((i=>{if(!t)return i.next(this._createEmptyMesh()),void i.complete();const n=e.mesh.url;if(!n){const t=e.mesh.id,r=`Incorrect mesh URL for ${e.id} (${t}, ${n})`;return console.warn(r),i.next(this._createEmptyMesh()),void i.complete()}const r=new Promise(((e,t)=>{this._meshAborter=t}));this._provider.getMesh(n,r).then((e=>{this._meshAborter=null,this._disposed||(i.next(e),i.complete())}),(e=>{this._meshAborter=null,console.error(e),i.next(this._createEmptyMesh()),i.complete()}))}))}_createEmptyMesh(){return{faces:[],vertices:[]}}_disposeImage(){null!=this._image&&window.URL.revokeObjectURL(this._image.src),this._image=null}}class Nd{constructor(e){this._id=e.id,this._imageIds=e.image_ids}get id(){return this._id}get imageIds(){return this._imageIds}dispose(){this._id=null,this._imageIds=null}findNext(e){let t=this._imageIds.indexOf(e);return t+1>=this._imageIds.length||-1===t?null:this._imageIds[t+1]}findPrev(e){let t=this._imageIds.indexOf(e);return 0===t||-1===t?null:this._imageIds[t-1]}}class Dd{constructor(){this.sphericalPreferredDistance=2,this.sphericalMotion=2,this.sphericalSequencePenalty=1,this.sphericalMergeCCPenalty=4,this.stepPreferredDistance=4,this.stepMotion=3,this.stepRotation=4,this.stepSequencePenalty=2,this.stepMergeCCPenalty=6,this.similarDistance=2,this.similarRotation=3,this.turnDistance=4,this.turnMotion=2,this.turnSequencePenalty=1,this.turnMergeCCPenalty=4}}var Id;!function(e){e[e.Next=0]="Next",e[e.Prev=1]="Prev",e[e.StepLeft=2]="StepLeft",e[e.StepRight=3]="StepRight",e[e.StepForward=4]="StepForward",e[e.StepBackward=5]="StepBackward",e[e.TurnLeft=6]="TurnLeft",e[e.TurnRight=7]="TurnRight",e[e.TurnU=8]="TurnU",e[e.Spherical=9]="Spherical",e[e.Similar=10]="Similar"}(Id||(Id={}));class Cd{constructor(){this.steps={},this.turns={},this.spherical={},this.steps[Id.StepForward]={direction:Id.StepForward,motionChange:0,useFallback:!0},this.steps[Id.StepBackward]={direction:Id.StepBackward,motionChange:Math.PI,useFallback:!0},this.steps[Id.StepLeft]={direction:Id.StepLeft,motionChange:Math.PI/2,useFallback:!1},this.steps[Id.StepRight]={direction:Id.StepRight,motionChange:-Math.PI/2,useFallback:!1},this.turns[Id.TurnLeft]={direction:Id.TurnLeft,directionChange:Math.PI/2,motionChange:Math.PI/4},this.turns[Id.TurnRight]={direction:Id.TurnRight,directionChange:-Math.PI/2,motionChange:-Math.PI/4},this.turns[Id.TurnU]={direction:Id.TurnU,directionChange:Math.PI,motionChange:null},this.spherical[Id.StepForward]={direction:Id.StepForward,directionChange:0,next:Id.StepLeft,prev:Id.StepRight},this.spherical[Id.StepBackward]={direction:Id.StepBackward,directionChange:Math.PI,next:Id.StepRight,prev:Id.StepLeft},this.spherical[Id.StepLeft]={direction:Id.StepLeft,directionChange:Math.PI/2,next:Id.StepBackward,prev:Id.StepForward},this.spherical[Id.StepRight]={direction:Id.StepRight,directionChange:-Math.PI/2,next:Id.StepForward,prev:Id.StepBackward}}}class Ad{constructor(){this.sphericalMinDistance=.1,this.sphericalMaxDistance=20,this.sphericalPreferredDistance=5,this.sphericalMaxItems=4,this.sphericalMaxStepTurnChange=Math.PI/8,this.rotationMaxDistance=this.turnMaxRigDistance,this.rotationMaxDirectionChange=Math.PI/6,this.rotationMaxVerticalDirectionChange=Math.PI/8,this.similarMaxDirectionChange=Math.PI/8,this.similarMaxDistance=12,this.similarMinTimeDifference=432e5,this.stepMaxDistance=20,this.stepMaxDirectionChange=Math.PI/6,this.stepMaxDrift=Math.PI/6,this.stepPreferredDistance=4,this.turnMaxDistance=15,this.turnMaxDirectionChange=2*Math.PI/9,this.turnMaxRigDistance=.65,this.turnMinRigDirectionChange=Math.PI/6}get maxDistance(){return Math.max(this.sphericalMaxDistance,this.similarMaxDistance,this.stepMaxDistance,this.turnMaxDistance)}}class Ed extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Ed.prototype),this.name="MapillaryError"}}class Ld extends Ed{constructor(e){super(null!=e?e:"The argument is not valid."),Object.setPrototypeOf(this,Ld.prototype),this.name="ArgumentMapillaryError"}}class zd{constructor(){this._epsilon=1e-9}azimuthalToBearing(e){return-e+Math.PI/2}degToRad(e){return Math.PI*e/180}radToDeg(e){return 180*e/Math.PI}rotationMatrix(e){let t=new ts(e[0],e[1],e[2]),i=t.length();return i>0&&t.normalize(),(new Ls).makeRotationAxis(t,i)}rotate(e,t){let i=new ts(e[0],e[1],e[2]),n=this.rotationMatrix(t);return i.applyMatrix4(n),i}opticalCenter(e,t){let i=[-e[0],-e[1],-e[2]],n=[-t[0],-t[1],-t[2]];return this.rotate(n,i)}viewingDirection(e){let t=[-e[0],-e[1],-e[2]];return this.rotate([0,0,1],t)}wrap(e,t,i){if(ii||ei?e-=n:ei?i:e}angleBetweenVector2(e,t,i,n){let r=Math.atan2(n,i)-Math.atan2(t,e);return this.wrapAngle(r)}angleDifference(e,t){let i=t-e;return this.wrapAngle(i)}relativeRotationAngle(e,t){let i=this.rotationMatrix([-e[0],-e[1],-e[2]]),n=this.rotationMatrix(t),r=i.multiply(n).elements,s=r[0]+r[5]+r[10];return Math.acos(Math.max(Math.min((s-1)/2,1),-1))}angleToPlane(e,t){let i=(new ts).fromArray(e),n=i.length();if(n{const i=e.unprojectBasic(t,1e4),n=r.worldToCamera(i,a);return[Math.abs(n[0]/n[2]),Math.abs(n[1]/n[2])]}))}class Ud{constructor(e,t,i){this._spatial=new zd,this._settings=null!=e?e:new Ad,this._directions=null!=t?t:new Cd,this._coefficients=null!=i?i:new Dd}getPotentialEdges(e,t,i){if(!e.complete)throw new Ld("Image has to be full.");if(!e.merged)return[];let n=this._spatial.viewingDirection(e.rotation),r=this._spatial.angleToPlane(n.toArray(),[0,0,1]),s=[];for(let a of t){if(!a.merged||a.id===e.id)continue;let t=_d(a.lngLat.lng,a.lngLat.lat,a.computedAltitude,e.lngLat.lng,e.lngLat.lat,e.computedAltitude),o=new ts(t[0],t[1],t[2]),c=o.length();if(c>this._settings.maxDistance&&i.indexOf(a.id)<0)continue;let l=this._spatial.angleBetweenVector2(n.x,n.y,o.x,o.y),h=this._spatial.angleToPlane(o.toArray(),[0,0,1]),u=this._spatial.viewingDirection(a.rotation),p=this._spatial.angleBetweenVector2(n.x,n.y,u.x,u.y),d=this._spatial.angleToPlane(u.toArray(),[0,0,1])-r,g=this._spatial.relativeRotationAngle(e.rotation,a.rotation),m=this._spatial.angleBetweenVector2(1,0,o.x,o.y),f=null!=a.sequenceId&&null!=e.sequenceId&&a.sequenceId===e.sequenceId,_=a.mergeId===e.mergeId,M=a.creatorId===e.creatorId,v={capturedAt:a.capturedAt,directionChange:p,distance:c,spherical:Od(a.cameraType),id:a.id,motionChange:l,rotation:g,sameMergeCC:_,sameSequence:f,sameUser:M,sequenceId:a.sequenceId,verticalDirectionChange:d,verticalMotion:h,worldMotionAzimuth:m};s.push(v)}return s}computeSequenceEdges(e,t){if(!e.complete)throw new Ld("Image has to be full.");if(e.sequenceId!==t.id)throw new Ld("Image and sequence does not correspond.");let i=[],n=t.findNext(e.id);null!=n&&i.push({data:{direction:Id.Next,worldMotionAzimuth:Number.NaN},source:e.id,target:n});let r=t.findPrev(e.id);return null!=r&&i.push({data:{direction:Id.Prev,worldMotionAzimuth:Number.NaN},source:e.id,target:r}),i}computeSimilarEdges(e,t){if(!e.complete)throw new Ld("Image has to be full.");let i=Od(e.cameraType),n={};for(let r of t)if(null!=r.sequenceId&&!r.sameSequence){if(i){if(!r.spherical)continue}else if(!r.spherical&&Math.abs(r.directionChange)>this._settings.similarMaxDirectionChange)continue;r.distance>this._settings.similarMaxDistance||r.sameUser&&Math.abs(r.capturedAt-e.capturedAt)e.distance:e=>this._coefficients.similarDistance*e.distance+this._coefficients.similarRotation*e.rotation;for(let e in n){if(!n.hasOwnProperty(e))continue;let t=Number.MAX_VALUE,i=null;for(let r of n[e]){let e=s(r);e({data:{direction:Id.Similar,worldMotionAzimuth:t.worldMotionAzimuth},source:e.id,target:t.id})))}computeStepEdges(e,t,i,n){if(!e.complete)throw new Ld("Image has to be full.");let r=[];if(Od(e.cameraType))return r;for(let s in this._directions.steps){if(!this._directions.steps.hasOwnProperty(s))continue;let a=this._directions.steps[s],o=Number.MAX_VALUE,c=null,l=null;for(let e of t){if(e.spherical)continue;if(Math.abs(e.directionChange)>this._settings.stepMaxDirectionChange)continue;let t=this._spatial.angleDifference(a.motionChange,e.motionChange),r=this._spatial.angleDifference(e.directionChange,t),s=Math.max(Math.abs(t),Math.abs(r));if(Math.abs(s)>this._settings.stepMaxDrift)continue;let h=e.id;if(!a.useFallback||h!==i&&h!==n||(l=e),e.distance>this._settings.stepMaxDistance)continue;t=Math.sqrt(t*t+e.verticalMotion*e.verticalMotion);let u=this._coefficients.stepPreferredDistance*Math.abs(e.distance-this._settings.stepPreferredDistance)/this._settings.stepMaxDistance+this._coefficients.stepMotion*t/this._settings.stepMaxDrift+this._coefficients.stepRotation*e.rotation/this._settings.stepMaxDirectionChange+this._coefficients.stepSequencePenalty*(e.sameSequence?0:1)+this._coefficients.stepMergeCCPenalty*(e.sameMergeCC?0:1);uthis._settings.turnMaxDistance)continue;let t,i=r.direction!==Id.TurnU&&e.distancethis._settings.turnMinRigDirectionChange,n=this._spatial.angleDifference(r.directionChange,e.directionChange);if(i&&e.directionChange*r.directionChange>0&&Math.abs(e.directionChange)this._settings.turnMaxDirectionChange)continue;let i=r.motionChange?this._spatial.angleDifference(r.motionChange,e.motionChange):0;i=Math.sqrt(i*i+e.verticalMotion*e.verticalMotion),t=this._coefficients.turnDistance*e.distance/this._settings.turnMaxDistance+this._coefficients.turnMotion*i/Math.PI+this._coefficients.turnSequencePenalty*(e.sameSequence?0:1)+this._coefficients.turnMergeCCPenalty*(e.sameMergeCC?0:1)}tthis._settings.sphericalMaxDistance))if(e.spherical){if(e.distancethis._settings.sphericalMaxStepTurnChange)){r.push([i.direction,e]);break}}let s=Math.PI/this._settings.sphericalMaxItems,a=[],o=[];for(let t=0;ts)continue;let i=Number.MAX_VALUE;for(let t of a){let n=Math.abs(this._spatial.angleDifference(t,e.motionChange));ns)continue;let n=Number.MAX_VALUE;for(let t of l){let i=Math.abs(this._spatial.angleDifference(t,e[1].motionChange));i{})),this._defaultAlt=2,this._edgeCalculator=null!=n?n:new Ud,this._graphCalculator=null!=i?i:new wd,this._configuration=null!=s?s:{maxSequences:50,maxUnusedImages:100,maxUnusedPreStoredImages:30,maxUnusedTiles:20},this._nodes={},this._nodeIndex=null!=t?t:new Bd._spatialIndex(16),this._nodeIndexTiles={},this._nodeToTile={},this._preStored={},this._requiredNodeTiles={},this._requiredSpatialArea={},this._sequences={},this._tileThreshold=20}static register(e){Bd._spatialIndex=e}get api(){return this._api}get changed$(){return this._changed$}get filter$(){return this._filter$}cacheBoundingBox$(e,t){const i=this._api.data.geometry.bboxToCellIds(e,t).filter((e=>!(e in this._cachedTiles))).map((e=>e in this._cachingTiles$?this._cachingTiles$[e]:this._cacheTile$(e)));return 0===i.length&&i.push(Ne(this)),_e(i).pipe(He(),xt(),Ge((()=>{const i=this._nodeIndex.search({maxX:t.lng,maxY:t.lat,minX:e.lng,minY:e.lat}).map((e=>e.node)),n=[],r=[];for(const e of i)e.complete?n.push(e):r.push(e.id);const s=[];for(;r.length>0;)s.push(r.splice(0,200));return Je(Ne(n),_e(s.map((e=>this._api.getSpatialImages$(e).pipe(ze((e=>{const t=[];for(const i of e){if(!this.hasNode(i.node_id))continue;const e=this.getNode(i.node_id);e.complete||this._makeFull(e,i.node),t.push(e)}return t})))))).pipe(He()))})),at(((e,t)=>e.concat(t))))}cacheCell$(e){return(e in this._cachedTiles?Ne(this):e in this._cachingTiles$?this._cachingTiles$[e]:this._cacheTile$(e)).pipe(Ge((()=>{const t=this._cachedTiles[e];t.accessed=(new Date).getTime();const i=t.nodes,n=[],r=[];for(const e of i)e.complete?n.push(e):r.push(e.id);const s=[];for(;r.length>0;)s.push(r.splice(0,200));return Je(Ne(n),_e(s.map((e=>this._api.getSpatialImages$(e).pipe(ze((e=>{const t=[];for(const i of e){if(!i.node){console.warn(`Image is empty (${i.node})`);continue}const e=i.node_id;if(!this.hasNode(e))continue;const n=this.getNode(e);n.complete||this._makeFull(n,i.node),t.push(n)}return t})))))).pipe(He()))})),at(((e,t)=>e.concat(t))))}cacheFill$(e){if(e in this._cachingFull$)throw new $d(`Cannot fill node while caching full (${e}).`);if(!this.hasNode(e))throw new $d(`Cannot fill node that does not exist in graph (${e}).`);if(e in this._cachingFill$)return this._cachingFill$[e];const t=this.getNode(e);if(t.complete)throw new $d(`Cannot fill node that is already full (${e}).`);return this._cachingFill$[e]=this._api.getSpatialImages$([e]).pipe(kt((e=>{for(const i of e)i.node||console.warn(`Image is empty ${i.node_id}`),t.complete||this._makeFull(t,i.node),delete this._cachingFill$[i.node_id]})),ze((()=>this)),Mt((()=>{e in this._cachingFill$&&delete this._cachingFill$[e],this._changed$.next(this)})),Tt(),F()),this._cachingFill$[e]}cacheFull$(e){if(e in this._cachingFull$)return this._cachingFull$[e];if(this.hasNode(e))throw new $d(`Cannot cache full node that already exist in graph (${e}).`);return this._cachingFull$[e]=this._api.getImages$([e]).pipe(kt((t=>{for(const i of t){if(!i.node)throw new $d(`Image does not exist (${e}, ${i.node}).`);const t=i.node_id;if(this.hasNode(t)){const t=this.getNode(e);t.complete||this._makeFull(t,i.node)}else{if(null==i.node.sequence.id)throw new $d(`Image has no sequence key (${e}).`);const n=new Td(i.node);this._makeFull(n,i.node);const r=this._api.data.geometry.lngLatToCellId(n.originalLngLat);this._preStore(r,n),this._setNode(n),delete this._cachingFull$[t]}}})),ze((()=>this)),Mt((()=>{e in this._cachingFull$&&delete this._cachingFull$[e],this._changed$.next(this)})),Tt(),F()),this._cachingFull$[e]}cacheNodeSequence$(e){if(!this.hasNode(e))throw new $d(`Cannot cache sequence edges of node that does not exist in graph (${e}).`);let t=this.getNode(e);if(t.sequenceId in this._sequences)throw new $d(`Sequence already cached (${e}), (${t.sequenceId}).`);return this._cacheSequence$(t.sequenceId)}cacheSequence$(e){if(e in this._sequences)throw new $d(`Sequence already cached (${e})`);return this._cacheSequence$(e)}cacheSequenceEdges(e){let t=this.getNode(e);if(!(t.sequenceId in this._sequences))throw new $d(`Sequence is not cached (${e}), (${t.sequenceId})`);let i=this._sequences[t.sequenceId].sequence,n=this._edgeCalculator.computeSequenceEdges(t,i);t.cacheSequenceEdges(n)}cacheSequenceNodes$(e,t){if(!this.hasSequence(e))throw new $d(`Cannot cache sequence nodes of sequence that does not exist in graph (${e}).`);if(this.hasSequenceNodes(e))throw new $d(`Sequence nodes already cached (${e}).`);const i=this.getSequence(e);if(i.id in this._cachingSequenceNodes$)return this._cachingSequenceNodes$[i.id];const n=[],r=i.imageIds.slice();if(t&&r.length>50){const e=r.indexOf(t),i=Math.max(0,Math.min(e-25,r.length-50));n.push(r.splice(i,50))}for(;r.length>0;)n.push(r.splice(0,200));let s=n.length;const a=_e(n).pipe(Ge((e=>this._api.getImages$(e).pipe(kt((e=>{for(const t of e){if(!t.node){console.warn(`Image empty (${t.node_id})`);continue}const e=t.node_id;if(this.hasNode(e)){const i=this.getNode(e);i.complete||this._makeFull(i,t.node)}else{null==t.node.sequence.id&&console.warn(`Sequence missing, discarding node (${t.node_id})`);const e=new Td(t.node);this._makeFull(e,t.node);const i=this._api.data.geometry.lngLatToCellId(e.originalLngLat);this._preStore(i,e),this._setNode(e)}}s--})),ze((()=>this)))),6),xt(),Mt((()=>{delete this._cachingSequenceNodes$[i.id],0===s&&(this._cachedSequenceNodes[i.id]=!0)})),Tt(),F());return this._cachingSequenceNodes$[i.id]=a,a}cacheSpatialArea$(e){if(!this.hasNode(e))throw new $d(`Cannot cache spatial area of node that does not exist in graph (${e}).`);if(e in this._cachedSpatialEdges)throw new $d(`Image already spatially cached (${e}).`);if(!(e in this._requiredSpatialArea))throw new $d(`Spatial area not determined (${e}).`);let t=this._requiredSpatialArea[e];if(0===Object.keys(t.cacheNodes).length)throw new $d(`Spatial nodes already cached (${e}).`);if(e in this._cachingSpatialArea$)return this._cachingSpatialArea$[e];let i=[];for(;t.cacheKeys.length>0;)i.push(t.cacheKeys.splice(0,200));let n=i.length,r=[];for(let s of i){let i=this._api.getSpatialImages$(s).pipe(kt((i=>{for(const e of i){if(!e.node){console.warn(`Image is empty (${e.node_id})`);continue}const i=e.node_id,n=t.cacheNodes[i];n.complete||this._makeFull(n,e.node),delete t.cacheNodes[i]}0==--n&&delete this._cachingSpatialArea$[e]})),ze((()=>this)),rt((i=>{for(let e of s)e in t.all&&delete t.all[e],e in t.cacheNodes&&delete t.cacheNodes[e];throw 0==--n&&delete this._cachingSpatialArea$[e],i})),Mt((()=>{0===Object.keys(t.cacheNodes).length&&this._changed$.next(this)})),Tt(),F());r.push(i)}return this._cachingSpatialArea$[e]=r,r}cacheSpatialEdges(e){if(e in this._cachedSpatialEdges)throw new $d(`Spatial edges already cached (${e}).`);let t=this.getNode(e),i=this._sequences[t.sequenceId].sequence,n=[],r=i.findPrev(t.id);null!=r&&n.push(r);let s=i.findNext(t.id);null!=s&&n.push(s);let a=this._requiredSpatialArea[e].all,o=[],c=this._filter;for(let e in a){if(!a.hasOwnProperty(e))continue;let t=a[e];c(t)&&o.push(t)}let l=this._edgeCalculator.getPotentialEdges(t,o,n),h=this._edgeCalculator.computeStepEdges(t,l,r,s);h=h.concat(this._edgeCalculator.computeTurnEdges(t,l)),h=h.concat(this._edgeCalculator.computeSphericalEdges(t,l)),h=h.concat(this._edgeCalculator.computePerspectiveToSphericalEdges(t,l)),h=h.concat(this._edgeCalculator.computeSimilarEdges(t,l)),t.cacheSpatialEdges(h),this._cachedSpatialEdges[e]=t,delete this._requiredSpatialArea[e],delete this._cachedNodeTiles[e]}cacheTiles$(e){if(e in this._cachedNodeTiles)throw new $d(`Tiles already cached (${e}).`);if(e in this._cachedSpatialEdges)throw new $d(`Spatial edges already cached so tiles considered cached (${e}).`);if(!(e in this._requiredNodeTiles))throw new $d(`Tiles have not been determined (${e}).`);let t=this._requiredNodeTiles[e];if(0===t.cache.length&&0===t.caching.length)throw new $d(`Tiles already cached (${e}).`);if(!this.hasNode(e))throw new $d(`Cannot cache tiles of node that does not exist in graph (${e}).`);let i=t.cache.slice();t.caching=this._requiredNodeTiles[e].caching.concat(i),t.cache=[];let n=[];for(let i of t.caching){const r=i in this._cachingTiles$?this._cachingTiles$[i]:this._cacheTile$(i);n.push(r.pipe(kt((n=>{let r=t.caching.indexOf(i);r>-1&&t.caching.splice(r,1),0===t.caching.length&&0===t.cache.length&&(delete this._requiredNodeTiles[e],this._cachedNodeTiles[e]=!0)})),rt((n=>{let r=t.caching.indexOf(i);throw r>-1&&t.caching.splice(r,1),0===t.caching.length&&0===t.cache.length&&(delete this._requiredNodeTiles[e],this._cachedNodeTiles[e]=!0),n})),Mt((()=>{this._changed$.next(this)})),Tt(),F()))}return n}initializeCache(e){if(e in this._cachedNodes)throw new $d(`Image already in cache (${e}).`);const t=this.getNode(e),i=this._api.data;t.initializeCache(new Sd(i));const n=(new Date).getTime();this._cachedNodes[e]={accessed:n,node:t},this._updateCachedTileAccess(e,n)}isCachingFill(e){return e in this._cachingFill$}isCachingFull(e){return e in this._cachingFull$}isCachingNodeSequence(e){return this.getNode(e).sequenceId in this._cachingSequences$}isCachingSequence(e){return e in this._cachingSequences$}isCachingSequenceNodes(e){return e in this._cachingSequenceNodes$}isCachingTiles(e){return e in this._requiredNodeTiles&&0===this._requiredNodeTiles[e].cache.length&&this._requiredNodeTiles[e].caching.length>0}hasInitializedCache(e){return e in this._cachedNodes}hasNode(e){let t=(new Date).getTime();return this._updateCachedNodeAccess(e,t),this._updateCachedTileAccess(e,t),e in this._nodes}hasNodeSequence(e){let t=this.getNode(e).sequenceId,i=t in this._sequences;return i&&(this._sequences[t].accessed=(new Date).getTime()),i}hasSequence(e){let t=e in this._sequences;return t&&(this._sequences[e].accessed=(new Date).getTime()),t}hasSequenceNodes(e){return e in this._cachedSequenceNodes}hasSpatialArea(e){if(!this.hasNode(e))throw new $d(`Spatial area nodes cannot be determined if node not in graph (${e}).`);if(e in this._cachedSpatialEdges)return!0;if(e in this._requiredSpatialArea)return 0===Object.keys(this._requiredSpatialArea[e].cacheNodes).length;let t=this.getNode(e),i=this._graphCalculator.boundingBoxCorners(t.lngLat,this._tileThreshold),n=this._nodeIndex.search({maxX:i[1].lng,maxY:i[1].lat,minX:i[0].lng,minY:i[0].lat}),r={all:{},cacheKeys:[],cacheNodes:{}};for(let e of n)r.all[e.node.id]=e.node,e.node.complete||(r.cacheKeys.push(e.node.id),r.cacheNodes[e.node.id]=e.node);return this._requiredSpatialArea[e]=r,0===r.cacheKeys.length}hasTiles(e){if(e in this._cachedNodeTiles)return!0;if(e in this._cachedSpatialEdges)return!0;if(!this.hasNode(e))throw new $d(`Image does not exist in graph (${e}).`);let t={cache:[],caching:[]};if(e in this._requiredNodeTiles)t=this._requiredNodeTiles[e];else{const i=this.getNode(e),[n,r]=this._graphCalculator.boundingBoxCorners(i.lngLat,this._tileThreshold);t.cache=this._api.data.geometry.bboxToCellIds(n,r).filter((e=>!(e in this._cachedTiles))),t.cache.length>0&&(this._requiredNodeTiles[e]=t)}return 0===t.cache.length&&0===t.caching.length}getNode(e){let t=(new Date).getTime();return this._updateCachedNodeAccess(e,t),this._updateCachedTileAccess(e,t),this._nodes[e]}getSequence(e){let t=this._sequences[e];return t.accessed=(new Date).getTime(),t.sequence}resetSpatialEdges(){let e=Object.keys(this._cachedSpatialEdges);for(let t of e)this._cachedSpatialEdges[t].resetSpatialEdges(),delete this._cachedSpatialEdges[t]}reset(e){const t=[];for(const i of e){if(!this.hasNode(i))throw new Error(`Image does not exist ${i}`);const e=this.getNode(i);e.resetSequenceEdges(),e.resetSpatialEdges(),t.push(e)}for(let t of Object.keys(this._cachedNodes))-1===e.indexOf(t)&&(this._cachedNodes[t].node.dispose(),delete this._cachedNodes[t]);this._cachedNodeTiles={},this._cachedSpatialEdges={},this._cachedTiles={},this._cachingFill$={},this._cachingFull$={},this._cachingSequences$={},this._cachingSpatialArea$={},this._cachingTiles$={},this._nodes={},this._nodeToTile={},this._preStored={};for(const e of t){this._nodes[e.id]=e;const t=this._api.data.geometry.lngLatToCellId(e.originalLngLat);this._preStore(t,e)}this._requiredNodeTiles={},this._requiredSpatialArea={},this._sequences={},this._nodeIndexTiles={},this._nodeIndex.clear()}setFilter(e){this._filter=this._filterCreator.createFilter(e),this._filterSubject$.next(this._filter)}uncache(e,t,i){const n={};this._addNewKeys(n,this._cachingFull$),this._addNewKeys(n,this._cachingFill$),this._addNewKeys(n,this._cachingSpatialArea$),this._addNewKeys(n,this._requiredNodeTiles),this._addNewKeys(n,this._requiredSpatialArea);for(const t of e)t in n||(n[t]=!0);const r=this._tileThreshold,s=this._graphCalculator,a=this._api.data.geometry,o=new Set(t);for(let e in n){if(!n.hasOwnProperty(e))continue;const t=this._nodes[e],[i,c]=s.boundingBoxCorners(t.lngLat,r),l=a.bboxToCellIds(i,c);for(const e of l)o.has(e)||o.add(e)}const c=[];for(let e in this._cachedTiles)this._cachedTiles.hasOwnProperty(e)&&!o.has(e)&&c.push([e,this._cachedTiles[e]]);const l=c.sort(((e,t)=>t[1].accessed-e[1].accessed)).slice(this._configuration.maxUnusedTiles).map((e=>e[0]));for(let e of l)this._uncacheTile(e,i);const h=[],u=[];for(let e in this._preStored){if(!this._preStored.hasOwnProperty(e)||e in this._cachingTiles$)continue;const t=this._preStored[e];for(let r in t)t.hasOwnProperty(r)&&!(r in n)&&t[r].sequenceId!==i&&(r in this._cachedNodes?h.push([this._cachedNodes[r],e]):u.push([r,e]))}const p=h.sort((([e],[t])=>t.accessed-e.accessed)).slice(this._configuration.maxUnusedPreStoredImages).map((([e,t])=>[e.node.id,t]));this._uncachePreStored(u),this._uncachePreStored(p);const d=[];for(let e in this._cachedNodes)this._cachedNodes.hasOwnProperty(e)&&!(e in n)&&d.push(this._cachedNodes[e]);const g=d.sort(((e,t)=>t.accessed-e.accessed)).slice(this._configuration.maxUnusedImages);for(const e of g){e.node.uncache();const t=e.node.id;delete this._cachedNodes[t],t in this._cachedNodeTiles&&delete this._cachedNodeTiles[t],t in this._cachedSpatialEdges&&delete this._cachedSpatialEdges[t]}const m=[];for(let e in this._sequences)this._sequences.hasOwnProperty(e)&&!(e in this._cachingSequences$)&&e!==i&&m.push(this._sequences[e]);const f=m.sort(((e,t)=>t.accessed-e.accessed)).slice(this._configuration.maxSequences);for(const e of f){const t=e.sequence.id;delete this._sequences[t],t in this._cachedSequenceNodes&&delete this._cachedSequenceNodes[t],e.sequence.dispose()}}updateCells$(e){const t=this._cachedTiles,i=this._cachingTiles$;return _e(e).pipe(Ge((e=>e in t?this._updateCell$(e):e in i?i[e].pipe(rt((()=>Ne(this))),Ge((()=>this._updateCell$(e)))):re())))}unsubscribe(){this._filterSubscription.unsubscribe()}_addNewKeys(e,t){for(let i in t)t.hasOwnProperty(i)&&this.hasNode(i)&&(i in e||(e[i]=!0))}_cacheSequence$(e){return e in this._cachingSequences$||(this._cachingSequences$[e]=this._api.getSequence$(e).pipe(kt((t=>{t?(t.id in this._sequences||(this._sequences[t.id]={accessed:(new Date).getTime(),sequence:new Nd(t)}),delete this._cachingSequences$[e]):console.warn(`Sequence does not exist (${e})`)})),ze((()=>this)),Mt((()=>{e in this._cachingSequences$&&delete this._cachingSequences$[e],this._changed$.next(this)})),Tt(),F())),this._cachingSequences$[e]}_cacheTile$(e){return this._cachingTiles$[e]=this._api.getCoreImages$(e).pipe(kt((t=>{if(e in this._cachedTiles)return;const i=t.images;this._nodeIndexTiles[e]=[],this._cachedTiles[e]={accessed:(new Date).getTime(),nodes:[]};const n=this._cachedTiles[e].nodes,r=this._removeFromPreStore(e);for(const t of i){if(!t)break;if(null==t.sequence.id){console.warn(`Sequence missing, discarding node (${t.id})`);continue}if(null!=r&&t.id in r){const i=r[t.id];delete r[t.id],n.push(i);const s={lat:i.lngLat.lat,lng:i.lngLat.lng,node:i};this._nodeIndex.insert(s),this._nodeIndexTiles[e].push(s),this._nodeToTile[i.id]=e;continue}const i=new Td(t);n.push(i);const s={lat:i.lngLat.lat,lng:i.lngLat.lng,node:i};this._nodeIndex.insert(s),this._nodeIndexTiles[e].push(s),this._nodeToTile[i.id]=e,this._setNode(i)}delete this._cachingTiles$[e]})),ze((()=>this)),rt((t=>{throw delete this._cachingTiles$[e],t})),Tt(),F()),this._cachingTiles$[e]}_makeFull(e,t){null==t.computed_altitude&&(t.computed_altitude=this._defaultAlt),null==t.computed_rotation&&(t.computed_rotation=this._graphCalculator.rotationFromCompass(t.compass_angle,t.exif_orientation)),e.makeComplete(t)}_preStore(e,t){e in this._preStored||(this._preStored[e]={}),this._preStored[e][t.id]=t}_removeFromPreStore(e){let t=null;return e in this._preStored&&(t=this._preStored[e],delete this._preStored[e]),t}_setNode(e){let t=e.id;if(this.hasNode(t))throw new $d(`Image already exist (${t}).`);this._nodes[t]=e}_uncacheTile(e,t){for(let i of this._cachedTiles[e].nodes){let n=i.id;delete this._nodeToTile[n],n in this._cachedNodes&&delete this._cachedNodes[n],n in this._cachedNodeTiles&&delete this._cachedNodeTiles[n],n in this._cachedSpatialEdges&&delete this._cachedSpatialEdges[n],i.sequenceId===t?(this._preStore(e,i),i.uncache()):(delete this._nodes[n],i.sequenceId in this._cachedSequenceNodes&&delete this._cachedSequenceNodes[i.sequenceId],i.dispose())}for(let t of this._nodeIndexTiles[e])this._nodeIndex.remove(t);delete this._nodeIndexTiles[e],delete this._cachedTiles[e]}_uncachePreStored(e){let t={};for(let[i,n]of e){i in this._nodes&&delete this._nodes[i],i in this._cachedNodes&&delete this._cachedNodes[i];let e=this._preStored[n][i];e.sequenceId in this._cachedSequenceNodes&&delete this._cachedSequenceNodes[e.sequenceId],delete this._preStored[n][i],e.dispose(),t[n]=!0}for(let e in t)t.hasOwnProperty(e)&&0===Object.keys(this._preStored[e]).length&&delete this._preStored[e]}_updateCachedTileAccess(e,t){e in this._nodeToTile&&(this._cachedTiles[this._nodeToTile[e]].accessed=t)}_updateCachedNodeAccess(e,t){e in this._cachedNodes&&(this._cachedNodes[e].accessed=t)}_updateCell$(e){return this._api.getCoreImages$(e).pipe(Ge((t=>{if(!(e in this._cachedTiles))return re();const i=this._nodeIndex,n=this._nodeIndexTiles[e],r=this._nodeToTile,s=this._cachedTiles[e];s.accessed=(new Date).getTime();const a=s.nodes,o=t.images;for(const t of o){if(null==t)break;if(this.hasNode(t.id))continue;if(null==t.sequence.id){console.warn(`Sequence missing, discarding node (${t.id})`);continue}const s=new Td(t);a.push(s);const o={lat:s.lngLat.lat,lng:s.lngLat.lng,node:s};i.insert(o),n.push(o),r[s.id]=e,this._setNode(s)}return Ne(e)})),rt((e=>(console.error(e),re()))))}}class Fd{constructor(){this._hash={},this._index=new Fd._spatialIndex(16),this._indexChanged$=new V,this._updated$=new V}static register(e){Fd._spatialIndex=e}get changed$(){return this._indexChanged$}get updated$(){return this._updated$}add(e){const t=[],i=this._hash,n=this._index;for(const r of e){const e=r.id;e in i&&(n.remove(i[e]),t.push(r));const s={lat:r.lngLat.lat,lng:r.lngLat.lng,marker:r};i[e]=s,n.insert(s)}t.length>0&&this._updated$.next(t),e.length>t.length&&this._indexChanged$.next(this)}has(e){return e in this._hash}get(e){return this.has(e)?this._hash[e].marker:void 0}getAll(){return this._index.all().map((e=>e.marker))}remove(e){const t=this._hash,i=this._index;let n=!1;for(const r of e){if(!(r in t))continue;const e=t[r];i.remove(e),delete t[r],n=!0}n&&this._indexChanged$.next(this)}removeAll(){this._hash={},this._index.clear(),this._indexChanged$.next(this)}search([e,t]){return this._index.search({maxX:t.lng,maxY:t.lat,minX:e.lng,minY:e.lat}).map((e=>e.marker))}update(e){const t=this._hash,i=this._index,n=e.id;if(!(n in t))return;i.remove(t[n]);const r={lat:e.lngLat.lat,lng:e.lngLat.lng,marker:e};t[n]=r,i.insert(r)}}function Gd(e,t,i,n,r){Hd(e,t,i||0,n||e.length-1,r||Yd)}function Hd(e,t,i,n,r){for(;n>i;){if(n-i>600){var s=n-i+1,a=t-i+1,o=Math.log(s),c=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*c*(s-c)/s)*(a-s/2<0?-1:1);Hd(e,t,Math.max(i,Math.floor(t-a*c/s+l)),Math.min(n,Math.floor(t+(s-a)*c/s+l)),r)}var h=e[t],u=i,p=n;for(Vd(e,i,t),r(e[n],h)>0&&Vd(e,i,n);u0;)p--}0===r(e[i],h)?Vd(e,i,p):Vd(e,++p,n),p<=t&&(i=p+1),t<=p&&(n=p-1)}}function Vd(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Yd(e,t){return et?1:0}class qd{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const i=[];if(!rg(e,t))return i;const n=this.toBBox,r=[];for(;t;){for(let s=0;s=0&&r[t].children.length>this._maxEntries;)this._split(r,t),t--;this._adjustParentBBoxes(n,r,t)}_split(e,t){const i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);const s=this._chooseSplitIndex(i,r,n),a=sg(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,Qd(i,this.toBBox),Qd(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=sg([e,t]),this.data.height=e.height+1,this.data.leaf=!1,Qd(this.data,this.toBBox)}_chooseSplitIndex(e,t,i){let n,r=1/0,s=1/0;for(let a=t;a<=i-t;a++){const t=Zd(e,0,a,this.toBBox),o=Zd(e,a,i,this.toBBox),c=ig(t,o),l=eg(t)+eg(o);c=t;n--){const t=e.children[n];Xd(a,e.leaf?r(t):t),o+=tg(a)}return o}_adjustParentBBoxes(e,t,i){for(let n=i;n>=0;n--)Xd(t[n],e)}_condense(e){for(let t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children,t.splice(t.indexOf(e[i]),1)):this.clear():Qd(e[i],this.toBBox)}}function Wd(e,t,i){if(!i)return t.indexOf(e);for(let n=0;n=e.minX&&t.maxY>=e.minY}function sg(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ag(e,t,i,n,r){const s=[t,i];for(;s.length;){if((i=s.pop())-(t=s.pop())<=n)continue;const a=t+Math.ceil((i-t)/n/2)*n;Gd(e,a,t,i,r),s.push(t,a,a,i)}}class og extends qd{compareMinX(e,t){return e.lng-t.lng}compareMinY(e,t){return e.lat-t.lat}toBBox(e){return{minX:e.lng,minY:e.lat,maxX:e.lng,maxY:e.lat}}}class cg{constructor(e,t){this._components={};for(const i in cg.registeredComponents){if(!cg.registeredComponents.hasOwnProperty(i))continue;const n=cg.registeredComponents[i];this._components[i]={active:!1,component:new n(i,e,t)}}this._coverComponent=new cg.registeredCoverComponent("cover",e,t),this._coverComponent.activate(),this._coverActivated=!0}static register(e){void 0===cg.registeredComponents[e.componentName]&&(cg.registeredComponents[e.componentName]=e)}static registerCover(e){cg.registeredCoverComponent=e}get coverActivated(){return this._coverActivated}activateCover(){if(!this._coverActivated){this._coverActivated=!0;for(const e in this._components){if(!this._components.hasOwnProperty(e))continue;const t=this._components[e];t.active&&t.component.deactivate()}}}deactivateCover(){if(this._coverActivated){this._coverActivated=!1;for(const e in this._components){if(!this._components.hasOwnProperty(e))continue;const t=this._components[e];t.active&&t.component.activate()}}}activate(e){this._checkName(e),this._components[e].active=!0,this._coverActivated||this.get(e).activate()}configure(e,t){this._checkName(e),this.get(e).configure(t)}deactivate(e){this._checkName(e),this._components[e].active=!1,this._coverActivated||this.get(e).deactivate()}get(e){return this._components[e].component}getCover(){return this._coverComponent}remove(){this._coverComponent.deactivate();for(const e in this._components)this._components.hasOwnProperty(e)&&this._components[e].component.deactivate()}_checkName(e){if(!(e in this._components))throw new Ld(`Component does not exist: ${e}`)}}cg.registeredComponents={};var lg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function hg(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})})),t}var ug=Array.isArray,pg=Object.prototype.toString,dg=ug||function(e){return"[object Array]"===pg.call(e)},gg="2",mg=gg;_g.NONE=0,_g.VTEXT=1,_g.VNODE=2,_g.WIDGET=3,_g.PROPS=4,_g.ORDER=5,_g.INSERT=6,_g.REMOVE=7,_g.THUNK=8;var fg=_g;function _g(e,t,i){this.type=Number(e),this.vNode=t,this.patch=i}_g.prototype.version=mg,_g.prototype.type="VirtualPatch";var Mg=gg,vg=function(e){return e&&"VirtualNode"===e.type&&e.version===Mg},yg=gg,xg=function(e){return e&&"VirtualText"===e.type&&e.version===yg},bg=function(e){return e&&"Widget"===e.type},wg=function(e){return e&&"Thunk"===e.type},Tg=vg,Sg=xg,Ng=bg,Dg=wg,Ig=function(e,t){var i=e,n=t;return Dg(t)&&(n=Cg(t,e)),Dg(e)&&(i=Cg(e,null)),{a:i,b:n}};function Cg(e,t){var i=e.vnode;if(i||(i=e.vnode=e.render(t)),!(Tg(i)||Sg(i)||Ng(i)))throw new Error("thunk did not return a valid node");return i}var Ag=function(e){return"object"==typeof e&&null!==e},Eg=function(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))},Lg=Ag,zg=Eg;function jg(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var Og=dg,kg=fg,Pg=vg,Rg=xg,Ug=bg,$g=wg,Bg=Ig,Fg=function e(t,i){var n;for(var r in t){r in i||((n=n||{})[r]=void 0);var s=t[r],a=i[r];if(s!==a)if(Lg(s)&&Lg(a))if(jg(a)!==jg(s))(n=n||{})[r]=a;else if(zg(a))(n=n||{})[r]=a;else{var o=e(s,a);o&&((n=n||{})[r]=o)}else(n=n||{})[r]=a}for(var c in i)c in t||((n=n||{})[c]=i[c]);return n};function Gg(e,t){var i={a:e};return Hg(e,t,i,0),i}function Hg(e,t,i,n){if(e!==t){var r=i[n],s=!1;if($g(e)||$g(t))qg(e,t,i,n);else if(null==t)Ug(e)||(Vg(e,i,n),r=i[n]),r=Xg(r,new kg(kg.REMOVE,e,t));else if(Pg(t))if(Pg(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var a=Fg(e.properties,t.properties);a&&(r=Xg(r,new kg(kg.PROPS,e,a))),r=function(e,t,i,n,r){for(var s=e.children,a=function(e,t){var i=Zg(t),n=i.keys,r=i.free;if(r.length===t.length)return{children:t,moves:null};var s=Zg(e),a=s.keys;if(s.free.length===e.length)return{children:t,moves:null};for(var o=[],c=0,l=r.length,h=0,u=0;u=r.length?t.length:r[c],m=0;m=g&&o.push(f)}for(var _,M=o.slice(),v=0,y=[],x=[],b=0;bl?c:l,u=0;u0||e.hasOwnProperty(t)&&("string"===i||"boolean"===i||"number"===i)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t}function hm(e){var t=[];return e.forEach((function(e){var i=e.name,n=e.value;"style"===i&&(n=function(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach((function(i){var n=e[i];i=i.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()})),t+=i+":"+n+";"})),t}(n)),t.push(i+'="'+um(n).replace(/"/g,""")+'"')})),t.length?" "+t.join(" "):""}function um(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&").replace(//g,">")}var pm=em,dm=sm,gm=am,mm=om,fm=function e(t){switch(t.nodeType){case 3:return um(t.data);case 8:return"\x3c!--"+t.data+"--\x3e";default:return function(t){var i=[],n=t.tagName;return"http://www.w3.org/1999/xhtml"===t.namespaceURI&&(n=n.toLowerCase()),i.push("<"+n+function(e){var t=[];for(var i in e)lm(e,i)&&t.push({name:i,value:e[i]});for(var n in e._attributes)for(var r in e._attributes[n]){var s=e._attributes[n][r],a=(s.prefix?s.prefix+":":"")+r;t.push({name:a,value:s.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?hm(t):""}(t)+function(e){var t=e.dataset,i=[];for(var n in t)i.push({name:"data-"+n,value:t[n]});return i.length?hm(i):""}(t)),cm.indexOf(n)>-1?i.push(" />"):(i.push(">"),t.childNodes.length?i.push.apply(i,t.childNodes.map(e)):t.textContent||t.innerText?i.push(um(t.textContent||t.innerText)):t.innerHTML&&i.push(t.innerHTML),i.push("")),i.join("")}(t)}},_m="http://www.w3.org/1999/xhtml",Mm=vm;function vm(e,t,i){if(!(this instanceof vm))return new vm(e);var n=void 0===i?_m:i||null;this.tagName=n===_m?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=n,this._attributes={},"INPUT"===this.tagName&&(this.type="text")}vm.prototype.type="DOMElement",vm.prototype.nodeType=1,vm.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},vm.prototype.replaceChild=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[i]=e,e.parentNode=this,t},vm.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);return this.childNodes.splice(t,1),e.parentNode=null,e},vm.prototype.insertBefore=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=null==t?-1:this.childNodes.indexOf(t);return i>-1?this.childNodes.splice(i,0,e):this.childNodes.push(e),e.parentNode=this,e},vm.prototype.setAttributeNS=function(e,t,i){var n=null,r=t,s=t.indexOf(":");s>-1&&(n=t.substr(0,s),r=t.substr(s+1)),"INPUT"===this.tagName&&"type"===t?this.type=i:(this._attributes[e]||(this._attributes[e]={}))[r]={value:i,prefix:n}},vm.prototype.getAttributeNS=function(e,t){var i=this._attributes[e],n=i&&i[t]&&i[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof n?null:n},vm.prototype.removeAttributeNS=function(e,t){var i=this._attributes[e];i&&delete i[t]},vm.prototype.hasAttributeNS=function(e,t){var i=this._attributes[e];return!!i&&t in i},vm.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},vm.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},vm.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},vm.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},vm.prototype.removeEventListener=mm,vm.prototype.addEventListener=gm,vm.prototype.dispatchEvent=dm,vm.prototype.focus=function(){},vm.prototype.toString=function(){return fm(this)},vm.prototype.getElementsByClassName=function(e){var t=e.split(" "),i=[];return pm(this,(function(e){if(1===e.nodeType){var n=(e.className||"").split(" ");t.every((function(e){return-1!==n.indexOf(e)}))&&i.push(e)}})),i},vm.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return pm(this.childNodes,(function(i){1!==i.nodeType||"*"!==e&&i.tagName.toLowerCase()!==e||t.push(i)})),t},vm.prototype.contains=function(e){return pm(this,(function(t){return e===t}))||!1};var ym=Mm,xm=bm;function bm(e){if(!(this instanceof bm))return new bm;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}bm.prototype.type="DocumentFragment",bm.prototype.nodeType=11,bm.prototype.nodeName="#document-fragment",bm.prototype.appendChild=ym.prototype.appendChild,bm.prototype.replaceChild=ym.prototype.replaceChild,bm.prototype.removeChild=ym.prototype.removeChild,bm.prototype.toString=function(){return this.childNodes.map((function(e){return String(e)})).join("")};var wm=Tm;function Tm(e){}Tm.prototype.initEvent=function(e,t,i){this.type=e,this.bubbles=t,this.cancelable=i},Tm.prototype.preventDefault=function(){};var Sm=em,Nm=tm,Dm=nm,Im=Mm,Cm=xm,Am=wm,Em=sm,Lm=am,zm=om,jm=Om;function Om(){if(!(this instanceof Om))return new Om;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var km=Om.prototype;km.createTextNode=function(e){return new Dm(e,this)},km.createElementNS=function(e,t){var i=null===e?null:String(e);return new Im(t,this,i)},km.createElement=function(e){return new Im(e,this)},km.createDocumentFragment=function(){return new Cm(this)},km.createEvent=function(e){return new Am(e)},km.createComment=function(e){return new Nm(e,this)},km.getElementById=function(e){return e=String(e),Sm(this.childNodes,(function(t){if(String(t.id)===e)return t}))||null},km.getElementsByClassName=Im.prototype.getElementsByClassName,km.getElementsByTagName=Im.prototype.getElementsByTagName,km.contains=Im.prototype.contains,km.removeEventListener=zm,km.addEventListener=Lm,km.dispatchEvent=Em;var Pm,Rm=new jm,Um=void 0!==lg?lg:"undefined"!=typeof window?window:{},$m=Rm;"undefined"!=typeof document?Pm=document:(Pm=Um["__GLOBAL_DOCUMENT_CACHE@4"])||(Pm=Um["__GLOBAL_DOCUMENT_CACHE@4"]=$m);var Bm=Ag,Fm=Eg,Gm=function(e,t,i){for(var n in t){var r=t[n];void 0===r?Hm(e,n,r,i):Fm(r)?(Hm(e,n,r,i),r.hook&&r.hook(e,n,i?i[n]:void 0)):Bm(r)?Vm(e,0,i,n,r):e[n]=r}};function Hm(e,t,i,n){if(n){var r=n[t];if(Fm(r))r.unhook&&r.unhook(e,t,i);else if("attributes"===t)for(var s in r)e.removeAttribute(s);else if("style"===t)for(var a in r)e.style[a]="";else e[t]="string"==typeof r?"":null}}function Vm(e,t,i,n,r){var s=i?i[n]:void 0;if("attributes"!==n)if(s&&Bm(s)&&Ym(s)!==Ym(r))e[n]=r;else{Bm(e[n])||(e[n]={});var a="style"===n?"":void 0;for(var o in r){var c=r[o];e[n][o]=void 0===c?a:c}}else for(var l in r){var h=r[l];void 0===h?e.removeAttribute(l):e.setAttribute(l,h)}}function Ym(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var qm=Pm,Wm=Gm,Qm=vg,Zm=xg,Xm=bg,Jm=Ig,Km=function e(t,i){var n=i&&i.document||qm,r=i?i.warn:null;if(t=Jm(t).a,Xm(t))return t.init();if(Zm(t))return n.createTextNode(t.text);if(!Qm(t))return r&&r("Item is not a valid virtual dom node",t),null;var s=null===t.namespace?n.createElement(t.tagName):n.createElementNS(t.namespace,t.tagName),a=t.properties;Wm(s,a);for(var o=t.children,c=0;c=t&&r<=i;if(ri))return!0;a=n-1}}return!1}function rf(e,t){return e>t?1:-1}var sf=bg,af=Gm,of=bg,cf=fg;function lf(e,t){"function"==typeof t.destroy&&of(t)&&t.destroy(e)}var hf=Pm,uf=dg,pf=Km,df=function(e,t,i,n){return i&&0!==i.length?(i.sort(rf),tf(e,t,i,n,0)):{}},gf=function(e,t,i){var n,r,s=e.type,a=e.vNode,o=e.patch;switch(s){case cf.REMOVE:return function(e,t){var i=e.parentNode;return i&&i.removeChild(e),lf(e,t),null}(t,a);case cf.INSERT:return function(e,t,i){var n=i.render(t,i);return e&&e.appendChild(n),e}(t,o,i);case cf.VTEXT:return function(e,t,i,n){var r;if(3===e.nodeType)e.replaceData(0,e.length,i.text),r=e;else{var s=e.parentNode;r=n.render(i,n),s&&r!==e&&s.replaceChild(r,e)}return r}(t,0,o,i);case cf.WIDGET:return function(e,t,i,n){var r,s,a,o=(a=i,!(!sf(s=t)||!sf(a))&&("name"in s&&"name"in a?s.id===a.id:s.init===a.init));r=o?i.update(t,e)||e:n.render(i,n);var c=e.parentNode;return c&&r!==e&&c.replaceChild(r,e),o||lf(e,t),r}(t,a,o,i);case cf.VNODE:return function(e,t,i,n){var r=e.parentNode,s=n.render(i,n);return r&&s!==e&&r.replaceChild(s,e),s}(t,0,o,i);case cf.ORDER:return function(e,t){for(var i,n,r,s=e.childNodes,a={},o=0;o=c++?null:s[r.to])}(t,o),t;case cf.PROPS:return af(t,o,a.properties),t;case cf.THUNK:return n=t,r=i.patch(t,o,i),n&&r&&n!==r&&n.parentNode&&n.parentNode.replaceChild(r,n),r;default:return t}};function mf(e,t,i){var n=function(e){var t=[];for(var i in e)"a"!==i&&t.push(Number(i));return t}(t);if(0===n.length)return e;var r=df(e,t.a,n),s=e.ownerDocument;i.document||s===hf||(i.document=s);for(var a=0;a>>0:s>>>0;(o=r.exec(t))&&!((c=o.index+o[0].length)>p&&(h.push(t.slice(p,o.index)),!n&&o.length>1&&o[0].replace(a,(function(){for(var t=1;t1&&o.index=s));)r.lastIndex===o.index&&r.lastIndex++;return p===t.length?!l&&r.test("")||h.push(""):h.push(t.slice(p)),h.length>s?h.slice(0,s):h},t}(),Ef=/([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/,Lf=/^\.|#/,zf=jf;function jf(e){if(!(this instanceof jf))return new jf(e);this.value=e}jf.prototype.hook=function(e,t){e[t]!==this.value&&(e[t]=this.value)};var Of="undefined"!=typeof window?window:void 0!==lg?lg:{},kf=function(e,t){return e in Of?Of[e]:(Of[e]=t,t)};!function(e,t,i){var n="__INDIVIDUAL_ONE_VERSION_"+e,r=kf(n+"_ENFORCE_SINGLETON",t);if(r!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+r+" installed.\nThis means you cannot install version "+t);kf(n,i)}("ev-store","7");var Pf="__EV_STORE_KEY@7",Rf=function(e){var t=e[Pf];return t||(t=e[Pf]={}),t},Uf=$f;function $f(e){if(!(this instanceof $f))return new $f(e);this.value=e}$f.prototype.hook=function(e,t){Rf(e)[t.substr(3)]=this.value},$f.prototype.unhook=function(e,t){Rf(e)[t.substr(3)]=void 0};var Bf=dg,Ff=wf,Gf=If,Hf=vg,Vf=xg,Yf=bg,qf=Eg,Wf=wg,Qf=function(e,t){if(!e)return"DIV";var i,n,r,s,a=!t.hasOwnProperty("id"),o=Af(e,Ef),c=null;for(Lf.test(o[1])&&(c="DIV"),s=0;s=0&&this._events[e].splice(i,1),this._events[e].length||delete this._events[e]}}else this._events={}}on(e,t){this._events[e]=this._events[e]||[],this._events[e].push(t)}_listens(e){return e in this._events}}class a_{constructor(){this._subscriptions=[]}push(e){this._subscriptions.push(e)}unsubscribe(){for(const e of this._subscriptions)e.unsubscribe();this._subscriptions=[]}}class o_ extends s_{constructor(e,t,i){super(),this._activated$=new q(!1),this._configurationSubject$=new V,this._activated=!1,this._container=t,this._name=e,this._navigator=i,this._subscriptions=new a_,this._configuration$=this._configurationSubject$.pipe(Lt(this.defaultConfiguration),Dt(((e,t)=>{for(let i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e})),St(1),F()),this._configuration$.subscribe((()=>{}))}get activated(){return this._activated}get activated$(){return this._activated$}get defaultConfiguration(){return this._getDefaultConfiguration()}get configuration$(){return this._configuration$}get name(){return this._name}activate(e){this._activated||(void 0!==e&&this._configurationSubject$.next(e),this._activated=!0,this._activate(),this._activated$.next(!0))}configure(e){this._configurationSubject$.next(e)}deactivate(){this._activated&&(this._activated=!1,this._deactivate(),this._container.domRenderer.clear(this._name),this._container.glRenderer.clear(this._name),this._activated$.next(!1))}fire(e,t){super.fire(e,t)}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}resize(){}}!function(e){e[e.Hidden=0]="Hidden",e[e.Loading=1]="Loading",e[e.Visible=2]="Visible"}(t_||(t_={}));class c_ extends o_{constructor(e,t,i){super(e,t,i)}_activate(){const e=this.configuration$.pipe(vt((e=>!!e.id)),et((e=>!e.src)),zt((e=>this._getImageSrc$(e.id).pipe(rt((e=>(console.error(e),re())))))),St(1),F()),t=this._subscriptions;t.push(e.pipe(ze((e=>({src:e})))).subscribe((e=>{this._configurationSubject$.next(e)}))),t.push($e(this.configuration$,e).pipe(et((([e,t])=>!!e.src&&e.src!==t)),vt()).subscribe((([,e])=>{window.URL.revokeObjectURL(e)}))),t.push(this._configuration$.pipe(dt(void 0,(e=>e.state)),zt((e=>$e(Ne(e.state),this._navigator.stateService.currentImage$))),zt((([e,t])=>{const i=$e(Ne(t.id),t.image$.pipe(et((e=>!!e)),ze((e=>e.src))));return e===t_.Visible?i.pipe(vt()):i})),dt((([e,t],[i,n])=>e===i&&t===n)),ze((([e,t])=>({id:e,src:t})))).subscribe(this._configurationSubject$)),t.push($e(this._configuration$,this._container.configurationService.exploreUrl$,this._container.renderService.size$).pipe(ze((([e,t,i])=>{if(!e.src)return{name:this._name,vNode:r_.h("div",[])};const n=i.width<=640||i.height<=480?".mapillary-cover-compact":"";if(e.state===t_.Hidden){const t=r_.h("div.mapillary-cover-container.mapillary-cover-done"+n,[this._getCoverBackgroundVNode(e)]);return{name:this._name,vNode:t}}const r=r_.h("div.mapillary-cover-container"+n,[this._getCoverButtonVNode(e,t)]);return{name:this._name,vNode:r}}))).subscribe(this._container.domRenderer.render$))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{state:t_.Visible}}_getCoverButtonVNode(e,t){const i=e.state===t_.Loading?"div.mapillary-cover.mapillary-cover-loading":"div.mapillary-cover",n=r_.h("div.mapillary-cover-button",[r_.h("div.mapillary-cover-button-icon",[])]),r=r_.h("a.mapillary-cover-logo",{href:t,target:"_blank"},[]),s=r_.h("div.mapillary-cover-indicator",{onclick:()=>{this.configure({state:t_.Loading})}},[]);return r_.h(i,[this._getCoverBackgroundVNode(e),s,n,r])}_getCoverBackgroundVNode(e){const t={style:{backgroundImage:`url(${e.src})`}},i=[];return e.state===t_.Loading&&i.push(r_.h("div.mapillary-cover-spinner",{},[])),r_.h("div.mapillary-cover-background",t,i)}_getImageSrc$(e){return P.create((t=>{this._navigator.api.getImages$([e]).subscribe((i=>{for(const n of i){const i="number"==typeof e?e.toString():e;if(n.node_id===i)return void this._navigator.api.data.getImageBuffer(n.node.thumb.url).then((i=>{const n=new Image;n.crossOrigin="Anonymous",n.onload=()=>{t.next(n.src),t.complete()},n.onerror=()=>{t.error(new Error(`Failed to load cover image (${e})`))};const r=new Blob([i]);n.src=window.URL.createObjectURL(r)}),(e=>{t.error(e)}))}t.error(new Ed(`Non existent cover key: ${e}`))}),(e=>{t.error(e)}))}))}}c_.componentName="cover";class l_ extends o_{_activate(){this._subscriptions.push($e(this._container.configurationService.exploreUrl$,this._navigator.stateService.currentImage$,this._container.renderService.size$).pipe(ze((([e,t,i])=>{const n=this._makeAttribution(t.creatorUsername,e,t.id,t.capturedAt,i.width);return{name:this._name,vNode:n}}))).subscribe(this._container.domRenderer.render$))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{}}makeImageUrl(e,t){return`${e}/app/?pKey=${t}&focus=photo`}_makeAttribution(e,t,i,n,r){const s=r<=640,a=this._makeDate(n,s),o=this._makeBy(e,t,i,s),c=s?".mapillary-attribution-compact":"";return r_.h("div.mapillary-attribution-container"+c,{},[...o,a])}_makeBy(e,t,i,n){const r=r_.h("div.mapillary-attribution-logo",[]);return e?this._makeCreatorBy(r,e,t,i,n):this._makeGeneralBy(r,t,i,n)}_makeCreatorBy(e,t,i,n,r){const s=r_.h("a.mapillary-attribution-icon-container",{href:i,rel:"noreferrer",target:"_blank"},[e]),a=r?`${t}`:`image by ${t}`,o=r_.h("div.mapillary-attribution-username",{textContent:a},[]);return[s,r_.h("a.mapillary-attribution-image-container",{href:this.makeImageUrl(i,n),rel:"noreferrer",target:"_blank"},[o])]}_makeGeneralBy(e,t,i,n){const r=r_.h("div.mapillary-attribution-username",{textContent:"images by"},[]),s=[r_.h("div.mapillary-attribution-icon-container",{},[e]),r_.h("div.mapillary-attribution-username",{textContent:"contributors"},[])];return n||s.unshift(r),[r_.h("a.mapillary-attribution-image-container",{href:this.makeImageUrl(t,i),rel:"noreferrer",target:"_blank"},s)]}_makeDate(e,t){const i=new Date(e).toDateString().split(" "),n=(i.length>3?t?[i[3]]:[i[1],i[2]+",",i[3]]:i).join(" ");return r_.h("div.mapillary-attribution-date",{textContent:n},[])}}l_.componentName="attribution";class h_{constructor(){this._unprojectDepth=200}basicToCanvas(e,t,i,n,r){const s=n.unprojectBasic([e,t],this._unprojectDepth);return this.projectToCanvas(s,i,r)}basicToCanvasSafe(e,t,i,n,r){const s=this.basicToViewportSafe(e,t,n,r);return null===s?null:this.viewportToCanvas(s[0],s[1],i)}basicToViewport(e,t,i,n){const r=i.unprojectBasic([e,t],this._unprojectDepth);return this.projectToViewport(r,n)}basicToViewportSafe(e,t,i,n){const r=i.unprojectBasic([e,t],this._unprojectDepth);return this.worldToCamera(r,n)[2]>0?null:this.projectToViewport(r,n)}cameraToViewport(e,t){const i=(new ts).fromArray(e).applyMatrix4(t.projectionMatrix);return[i.x,i.y]}canvasPosition(e,t){const i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}canvasToBasic(e,t,i,n,r){const s=this.unprojectFromCanvas(e,t,i,r).toArray();return n.projectBasic(s)}canvasToViewport(e,t,i){const[n,r]=this.containerToCanvas(i);return[2*e/n-1,1-2*t/r]}containerToCanvas(e){return[e.offsetWidth,e.offsetHeight]}getBasicDistances(e,t){const i=this.viewportToBasic(-1,1,e,t),n=this.viewportToBasic(1,1,e,t),r=this.viewportToBasic(1,-1,e,t),s=this.viewportToBasic(-1,-1,e,t);let a=0,o=0,c=0,l=0;return i[1]<0&&n[1]<0&&(a=i[1]>n[1]?-i[1]:-n[1]),n[0]>1&&r[0]>1&&(o=n[0]1&&s[1]>1&&(c=r[1]i[0]?-s[0]:-i[0]),[a,o,c,l]}getPixelDistances(e,t,i){const n=this.viewportToBasic(-1,1,t,i),r=this.viewportToBasic(1,1,t,i),s=this.viewportToBasic(1,-1,t,i),a=this.viewportToBasic(-1,-1,t,i);let o=0,c=0,l=0,h=0;const[u,p]=this.containerToCanvas(e);if(n[1]<0&&r[1]<0){const s=n[1]>r[1]?n[0]:r[0],a=this.basicToCanvas(s,0,e,t,i);o=a[1]>0?a[1]:0}if(r[0]>1&&s[0]>1){const n=r[0]1&&a[1]>1){const n=s[1]n[0]?a[1]:n[1],s=this.basicToCanvas(0,r,e,t,i);h=s[0]>0?s[0]:0}return[o,c,l,h]}insideElement(e,t){const i=t.getBoundingClientRect(),n=i.left+t.clientLeft,r=n+t.clientWidth,s=i.top+t.clientTop,a=s+t.clientHeight;return e.clientX>n&&e.clientXs&&e.clientY0)return null;const n=this.projectToViewport(e,i);return this.viewportToCanvas(n[0],n[1],t)}projectToViewport(e,t){const i=new ts(e[0],e[1],e[2]).project(t);return[i.x,i.y]}unprojectFromCanvas(e,t,i,n){const r=this.canvasToViewport(e,t,i);return this.unprojectFromViewport(r[0],r[1],n)}unprojectFromViewport(e,t,i){return new ts(e,t,1).unproject(i)}viewportToBasic(e,t,i,n){const r=new ts(e,t,1).unproject(n).toArray();return i.projectBasic(r)}viewportToCanvas(e,t,i){const[n,r]=this.containerToCanvas(i);return[n*(e+1)/2,-r*(t-1)/2]}worldToCamera(e,t){return new ts(e[0],e[1],e[2]).applyMatrix4(t.matrixWorldInverse).toArray()}}!function(e){e[e.Automatic=0]="Automatic",e[e.Large=1]="Large",e[e.Small=2]="Small"}(i_||(i_={}));class u_ extends o_{constructor(e,t,i){super(e,t,i),this._spatial=new zd,this._viewportCoords=new h_,this._svgNamespace="http://www.w3.org/2000/svg",this._distinctThreshold=Math.PI/360,this._animationSpeed=.075}_activate(){const e=this._subscriptions,t=this._container.renderService.renderCamera$.pipe(ze((e=>{let t=this._spatial.degToRad(e.perspective.fov),i=e.perspective.aspect===Number.POSITIVE_INFINITY?Math.PI:2*Math.atan(e.perspective.aspect*Math.tan(.5*t));return[this._spatial.azimuthalToBearing(e.rotation.phi),i]})),dt(((e,t)=>Math.abs(t[0]-e[0])e.state.currentImage.id))),this._navigator.panService.panImages$).pipe(ze((([e,t])=>{const i=e.state.currentImage,n=e.state.currentTransform;if(Od(i.cameraType))return[Math.PI,Math.PI];const r=this._computeProjectedPoints(n),s=this._spatial.degToRad(this._computeHorizontalFov(r));let a=s/2,o=s/2;for(const[e,,n]of t){const t=this._spatial.wrap(e.compassAngle-i.compassAngle,-180,180);t<0?a=this._spatial.degToRad(Math.abs(t))+n/2:o=this._spatial.degToRad(Math.abs(t))+n/2}return[a,o]})),dt((([e,t],[i,n])=>Math.abs(i-e)e.state.currentImage.id))),this._container.renderService.bearing$).pipe(ze((([e,t])=>this._spatial.degToRad(e.state.currentImage.compassAngle-t)))),r=new V,s=r.pipe(Dt(((e,t)=>t(e)),{alpha:0,curr:[0,0,0],prev:[0,0,0]}),ze((e=>{const t=$r.smootherstep(e.alpha,0,1),i=e.curr,n=e.prev;return[this._interpolate(n[0],i[0],t),this._interpolate(n[1],i[1],t)]})));e.push(i.pipe(ze((e=>t=>{const i=$r.smootherstep(t.alpha,0,1),n=t.curr,r=t.prev,s=[this._interpolate(r[0],n[0],i),this._interpolate(r[1],n[1],i)];return{alpha:0,curr:e.slice(),prev:s}}))).subscribe(r)),e.push(i.pipe(zt((()=>this._container.renderService.renderCameraFrame$.pipe(At(1),Dt((e=>e+this._animationSpeed),0),Ot((e=>e<=1+this._animationSpeed)),ze((e=>Math.min(e,1)))))),ze((e=>t=>({alpha:e,curr:t.curr.slice(),prev:t.prev.slice()})))).subscribe(r));const a=$e(n,s).pipe(ze((([e,t])=>[e,t[0],t[1]])));e.push($e(t,a,this._configuration$,this._container.renderService.size$).pipe(ze((([[e,t],[i,n,r],s,a])=>{const o=this._createBackground(e),c=this._createFovIndicator(n,r,i),l=this._createNorth(e),h=this._createCircleSectorCompass(this._createCircleSector(Math.max(Math.PI/20,t),"#FFF")),u=s.size===i_.Small||s.size===i_.Automatic&&a.width<640?".mapillary-bearing-compact":"";return{name:this._name,vNode:r_.h("div.mapillary-bearing-indicator-container"+u,{oncontextmenu:e=>{e.preventDefault()}},[o,c,l,h])}}))).subscribe(this._container.domRenderer.render$))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{size:i_.Automatic}}_createFovIndicator(e,t,i){const n=this._createFovArc(e,t),r=r_.h("g",{attributes:{transform:"translate(18,18)"},namespace:this._svgNamespace},[n]);return r_.h("svg",{attributes:{viewBox:"0 0 36 36"},namespace:this._svgNamespace,style:{height:"36px",left:"2px",position:"absolute",top:"2px",transform:`rotateZ(${this._spatial.radToDeg(i)}deg)`,width:"36px"}},[r])}_createFovArc(e,t){const i=16.75,n=e+t;if(n>2*Math.PI-Math.PI/90)return r_.h("circle",{attributes:{cx:"0",cy:"0","fill-opacity":"0",r:"16.75",stroke:"#FFF","stroke-width":"2.5"},namespace:this._svgNamespace},[]);let r=-Math.PI/2-e,s=r+n,a=i*Math.cos(r),o=i*Math.sin(r),c=i*Math.cos(s),l=i*Math.sin(s),h=`M ${a} ${o} A 16.75 16.75 0 ${n>=Math.PI?1:0} 1 ${c} ${l}`;return r_.h("path",{attributes:{d:h,"fill-opacity":"0",stroke:"#FFF","stroke-width":"2.5"},namespace:this._svgNamespace},[])}_createCircleSectorCompass(e){let t=r_.h("g",{attributes:{transform:"translate(1,1)"},namespace:this._svgNamespace},[e]);return r_.h("svg",{attributes:{viewBox:"0 0 2 2"},namespace:this._svgNamespace,style:{height:"26px",left:"7px",position:"absolute",top:"7px",width:"26px"}},[t])}_createCircleSector(e,t){if(e>2*Math.PI-Math.PI/90)return r_.h("circle",{attributes:{cx:"0",cy:"0",fill:t,r:"1"},namespace:this._svgNamespace},[]);let i=-Math.PI/2-e/2,n=i+e,r=Math.cos(i),s=Math.sin(i),a=Math.cos(n),o=Math.sin(n),c=`M 0 0 ${r} ${s} A 1 1 0 ${e>=Math.PI?1:0} 1 ${a} ${o}`;return r_.h("path",{attributes:{d:c,fill:t},namespace:this._svgNamespace},[])}_createNorth(e){const t=r_.h("div.mapillary-bearing-north",[]);return r_.h("div.mapillary-bearing-north-container",{style:{transform:`rotateZ(${this._spatial.radToDeg(-e)}deg)`}},[t])}_createBackground(e){return r_.h("div.mapillary-bearing-indicator-background",{style:{transform:`rotateZ(${this._spatial.radToDeg(-e)}deg)`}},[r_.h("div.mapillary-bearing-indicator-background-circle",[]),r_.h("div.mapillary-bearing-indicator-background-arrow-container",[r_.h("div.mapillary-bearing-indicator-background-arrow",[])])])}_computeProjectedPoints(e){return Rd(e,[[1,0]],[[0,.5]],12,this._viewportCoords)}_computeHorizontalFov(e){const t=e.map((e=>this._coordToFov(e[0])));return Math.min(...t)}_coordToFov(e){return this._spatial.radToDeg(2*Math.atan(e))}_interpolate(e,t,i){return(1-i)*e+i*t}}u_.componentName="bearing";class p_ extends o_{constructor(e,t,i){super(e,t,i)}_activate(){const e=this._subscriptions;e.push($e(this._navigator.stateService.currentImage$.pipe(zt((e=>e.sequenceEdges$)),et((e=>e.cached))),this._configuration$).pipe(zt((e=>{let t=e[0],i=e[1],n=Math.max(0,Math.min(4,i.depth.sequence));return Je(this._cache$(t.edges,Id.Next,n),this._cache$(t.edges,Id.Prev,n)).pipe(rt((e=>(console.error("Failed to cache sequence edges.",e),re()))))}))).subscribe((()=>{}))),e.push($e(this._navigator.stateService.currentImage$.pipe(zt((e=>$e(Ne(e),e.spatialEdges$.pipe(et((e=>e.cached))))))),this._configuration$).pipe(zt((([[e,t],i])=>{let n=t.edges,r=i.depth,s=Math.max(0,Math.min(2,r.spherical)),a=Od(e.cameraType)?0:Math.max(0,Math.min(3,r.step)),o=Od(e.cameraType)?0:Math.max(0,Math.min(1,r.turn)),c=this._cache$(n,Id.Spherical,s);return Je(this._cache$(n,Id.StepForward,a),this._cache$(n,Id.StepBackward,a),this._cache$(n,Id.StepLeft,a),this._cache$(n,Id.StepRight,a),c,this._cache$(n,Id.TurnLeft,o),this._cache$(n,Id.TurnRight,o),this._cache$(n,Id.TurnU,o)).pipe(rt((e=>(console.error("Failed to cache spatial edges.",e),re()))))}))).subscribe((()=>{})))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{depth:{spherical:1,sequence:2,step:1,turn:0}}}_cache$(e,t,i){return tt(Ne(e),Ne(i)).pipe(_t((e=>{let i=e[0],n=e[1],r=[];if(n>0)for(let e of i)e.data.direction===t&&r.push(tt(this._navigator.graphService.cacheImage$(e.target).pipe(Ge((e=>this._imageToEdges$(e,t)))),Ne(n-1)));return _e(r).pipe(He())})),At(1))}_imageToEdges$(e,t){return([Id.Next,Id.Prev].indexOf(t)>-1?e.sequenceEdges$:e.spatialEdges$).pipe(vt((e=>e.cached)),ze((e=>e.edges)))}}p_.componentName="cache";class d_ extends Ed{constructor(e){super(null!=e?e:"The request was cancelled."),Object.setPrototypeOf(this,d_.prototype),this.name="CancelMapillaryError"}}class g_{constructor(e,t){this._spatial=new zd,this._minThresholdWidth=320,this._maxThresholdWidth=1480,this._minThresholdHeight=240,this._maxThresholdHeight=820,this._configure(e),this._resize(t),this._reset()}get minWidth(){return this._minWidth}get maxWidth(){return this._maxWidth}get containerWidth(){return this._containerWidth}get containerWidthCss(){return this._containerWidthCss}get containerMarginCss(){return this._containerMarginCss}get containerLeftCss(){return this._containerLeftCss}get containerHeight(){return this._containerHeight}get containerHeightCss(){return this._containerHeightCss}get containerBottomCss(){return this._containerBottomCss}get stepCircleSize(){return this._stepCircleSize}get stepCircleSizeCss(){return this._stepCircleSizeCss}get stepCircleMarginCss(){return this._stepCircleMarginCss}get turnCircleSize(){return this._turnCircleSize}get turnCircleSizeCss(){return this._turnCircleSizeCss}get outerRadius(){return this._outerRadius}get innerRadius(){return this._innerRadius}get shadowOffset(){return this._shadowOffset}configure(e){this._configure(e),this._reset()}resize(e){this._resize(e),this._reset()}angleToCoordinates(e){return[Math.cos(e),Math.sin(e)]}relativeAngleToCoordiantes(e,t){let i=this._spatial.wrapAngle(e-t);return this.angleToCoordinates(i)}_configure(e){this._minWidth=e.minWidth,this._maxWidth=this._getMaxWidth(e.minWidth,e.maxWidth)}_resize(e){this._elementWidth=e.width,this._elementHeight=e.height}_reset(){this._containerWidth=this._getContainerWidth(this._elementWidth,this._elementHeight),this._containerHeight=this._getContainerHeight(this.containerWidth),this._stepCircleSize=this._getStepCircleDiameter(this._containerHeight),this._turnCircleSize=this._getTurnCircleDiameter(this.containerHeight),this._outerRadius=this._getOuterRadius(this._containerHeight),this._innerRadius=this._getInnerRadius(this._containerHeight),this._shadowOffset=3,this._containerWidthCss=this._numberToCssPixels(this._containerWidth),this._containerMarginCss=this._numberToCssPixels(-.5*this._containerWidth),this._containerLeftCss=this._numberToCssPixels(Math.floor(.5*this._elementWidth)),this._containerHeightCss=this._numberToCssPixels(this._containerHeight),this._containerBottomCss=this._numberToCssPixels(Math.floor(-.08*this._containerHeight)),this._stepCircleSizeCss=this._numberToCssPixels(this._stepCircleSize),this._stepCircleMarginCss=this._numberToCssPixels(-.5*this._stepCircleSize),this._turnCircleSizeCss=this._numberToCssPixels(this._turnCircleSize)}_getContainerWidth(e,t){let i=(e-this._minThresholdWidth)/(this._maxThresholdWidth-this._minThresholdWidth),n=(t-this._minThresholdHeight)/(this._maxThresholdHeight-this._minThresholdHeight),r=Math.max(0,Math.min(1,Math.min(i,n)));return r=.04*Math.round(25*r),this._minWidth+r*(this._maxWidth-this._minWidth)}_getContainerHeight(e){return.77*e}_getStepCircleDiameter(e){return.34*e}_getTurnCircleDiameter(e){return.3*e}_getOuterRadius(e){return.31*e}_getInnerRadius(e){return.125*e}_numberToCssPixels(e){return e+"px"}_getMaxWidth(e,t){return e>t?e:t}}class m_{constructor(e,t){this._isEdge=!1,this._spatial=new zd,this._calculator=new g_(e,t),this._image=null,this._rotation={phi:0,theta:0},this._epsilon=.5*Math.PI/180,this._highlightKey=null,this._distinguishSequence=!1,this._needsRender=!1,this._stepEdges=[],this._turnEdges=[],this._sphericalEdges=[],this._sequenceEdgeKeys=[],this._stepDirections=[Id.StepForward,Id.StepBackward,Id.StepLeft,Id.StepRight],this._turnDirections=[Id.TurnLeft,Id.TurnRight,Id.TurnU],this._turnNames={},this._turnNames[Id.TurnLeft]="mapillary-direction-turn-left",this._turnNames[Id.TurnRight]="mapillary-direction-turn-right",this._turnNames[Id.TurnU]="mapillary-direction-turn-around";let i=!!document.documentMode;this._isEdge=!i&&!!window.StyleMedia}get needsRender(){return this._needsRender}render(e){this._needsRender=!1;let t=this._rotation,i=[],n=[];return Od(this._image.cameraType)?i=i.concat(this._createSphericalArrows(e,t)):(i=i.concat(this._createPerspectiveToSphericalArrows(e,t)),i=i.concat(this._createStepArrows(e,t)),n=n.concat(this._createTurnArrows(e))),this._getContainer(i,n,t)}setEdges(e,t){this._setEdges(e,t),this._setNeedsRender()}setImage(e){this._image=e,this._clearEdges(),this._setNeedsRender()}setRenderCamera(e){let t=e.rotation;Math.abs(t.phi-this._rotation.phi)-1?this._stepEdges.push(t):this._turnDirections.indexOf(e)>-1?this._turnEdges.push(t):t.data.direction===Id.Spherical&&this._sphericalEdges.push(t)}if(this._distinguishSequence&&null!=t){let e=this._sphericalEdges.concat(this._stepEdges).concat(this._turnEdges);for(let i of e){let e=i.target;for(let i of t.imageIds)if(i===e){this._sequenceEdgeKeys.push(e);break}}}}_createSphericalArrows(e,t){let i=[];for(let n of this._sphericalEdges)i.push(this._createVNodeByKey(e,n.target,n.data.worldMotionAzimuth,t,this._calculator.outerRadius,"mapillary-direction-arrow-spherical"));for(let n of this._stepEdges)i.push(this._createSphericalToPerspectiveArrow(e,n.target,n.data.worldMotionAzimuth,t,n.data.direction));return i}_createSphericalToPerspectiveArrow(e,t,i,n,r){let s=Math.PI/8,a=n.phi;switch(r){case Id.StepBackward:a=n.phi-Math.PI;break;case Id.StepLeft:a=n.phi+Math.PI/2;break;case Id.StepRight:a=n.phi-Math.PI/2}return Math.abs(this._spatial.wrapAngle(i-a)){e.moveTo$(t).subscribe(void 0,(e=>{e instanceof d_||console.error(e)}))}),a)}_createVNodeByDirection(e,t,i,n,r){return this._createVNode(t,i,n,this._calculator.outerRadius,"mapillary-direction-arrow-step","mapillary-direction-circle",(t=>{e.moveDir$(r).subscribe(void 0,(e=>{e instanceof d_||console.error(e)}))}))}_createVNodeByTurn(e,t,i,n){let r={height:this._calculator.turnCircleSizeCss,transform:"rotate(0)",width:this._calculator.turnCircleSizeCss};switch(n){case Id.TurnLeft:r.left="5px",r.top="5px";break;case Id.TurnRight:r.right="5px",r.top="5px";break;case Id.TurnU:r.left="5px",r.bottom="5px"}let s={attributes:{"data-id":t},onclick:t=>{e.moveDir$(n).subscribe(void 0,(e=>{e instanceof d_||console.error(e)}))},style:r},a="mapillary-direction-turn-circle";this._sequenceEdgeKeys.indexOf(t)>-1&&(a+="-sequence"),this._highlightKey===t&&(a+="-highlight");let o=r_.h(`div.${i}`,{},[]);return r_.h("div."+a,s,[o])}_createVNodeInactive(e,t,i){return this._createVNode(e,t,i,this._calculator.outerRadius,"mapillary-direction-arrow-inactive","mapillary-direction-circle-inactive")}_createVNode(e,t,i,n,r,s,a,o){let c=this._calculator.angleToCoordinates(t-i.phi),l=Math.round(-n*c[1]+.5*this._calculator.containerWidth),h=Math.round(-n*c[0]+.5*this._calculator.containerHeight),u=this._calculator.relativeAngleToCoordiantes(t,i.phi),p=this._calculator.shadowOffset,d=`drop-shadow(${-p*u[1]}px ${p*u[0]}px 1px rgba(0,0,0,0.8))`,g={style:{"-webkit-filter":d,filter:d}},m=r_.h("div."+r,g,[]),f=-this._spatial.radToDeg(t-i.phi),_=o?`translate(${l}px, ${h}px) rotate(${f}deg) translateZ(-0.01px)`:`translate(${l}px, ${h}px) rotate(${f}deg)`,M={attributes:{"data-id":e},onclick:a,style:{height:this._calculator.stepCircleSizeCss,marginLeft:this._calculator.stepCircleMarginCss,marginTop:this._calculator.stepCircleMarginCss,transform:_,width:this._calculator.stepCircleSizeCss}};return this._sequenceEdgeKeys.indexOf(e)>-1&&(s+="-sequence"),this._highlightKey===e&&(s+="-highlight"),r_.h("div."+s,M,[m])}_getContainer(e,t,i){let n=this._isEdge?"rotateX(60deg)":`perspective(${this._calculator.containerWidthCss}) rotateX(60deg)`,r={oncontextmenu:e=>{e.preventDefault()},style:{bottom:this._calculator.containerBottomCss,height:this._calculator.containerHeightCss,left:this._calculator.containerLeftCss,marginLeft:this._calculator.containerMarginCss,transform:n,width:this._calculator.containerWidthCss}};return r_.h("div.mapillary-direction-perspective",r,t.concat(e))}}class f_ extends o_{constructor(e,t,i,n){super(e,t,i),this._renderer=n||new m_(this.defaultConfiguration,{height:t.container.offsetHeight,width:t.container.offsetWidth}),this._hoveredIdSubject$=new V,this._hoveredId$=this._hoveredIdSubject$.pipe(It())}fire(e,t){super.fire(e,t)}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}_activate(){const e=this._subscriptions;e.push(this._configuration$.subscribe((e=>{this._renderer.setConfiguration(e)}))),e.push(this._container.renderService.size$.subscribe((e=>{this._renderer.resize(e)}))),e.push(this._navigator.stateService.currentImage$.pipe(kt((e=>{this._container.domRenderer.render$.next({name:this._name,vNode:r_.h("div",{},[])}),this._renderer.setImage(e)})),Pt(this._configuration$),zt((([e,t])=>$e(e.spatialEdges$,t.distinguishSequence?this._navigator.graphService.cacheSequence$(e.sequenceId).pipe(rt((t=>(console.error(`Failed to cache sequence (${e.sequenceId})`,t),Ne(null))))):Ne(null))))).subscribe((([e,t])=>{this._renderer.setEdges(e,t)}))),e.push(this._container.renderService.renderCameraFrame$.pipe(kt((e=>{this._renderer.setRenderCamera(e)})),ze((()=>this._renderer)),et((e=>e.needsRender)),ze((e=>({name:this._name,vNode:e.render(this._navigator)})))).subscribe(this._container.domRenderer.render$)),e.push($e(this._container.domRenderer.element$,this._container.renderService.renderCamera$,this._container.mouseService.mouseMove$.pipe(Lt(null)),this._container.mouseService.mouseUp$.pipe(Lt(null))).pipe(ze((([e])=>{let t=e.getElementsByClassName("mapillary-direction-perspective");for(let e=0;e{const t="hover",i={id:e,target:this,type:t};this.fire(t,i)})))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{distinguishSequence:!1,maxWidth:460,minWidth:260}}}f_.componentName="direction";class __{}__.fisheye={fragment:"\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\nuniform sampler2D projectorTex;\nuniform float opacity;\nuniform float focal;\nuniform float k1;\nuniform float k2;\nuniform float scale_x;\nuniform float scale_y;\nuniform float radial_peak;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n float x = vRstq.x;\n float y = vRstq.y;\n float z = vRstq.z;\n\n float r = sqrt(x * x + y * y);\n float theta = atan(r, z);\n\n if (radial_peak > 0. && theta > radial_peak) {\n theta = radial_peak;\n }\n\n float theta2 = theta * theta;\n float theta_d = theta * (1.0 + theta2 * (k1 + theta2 * k2));\n float s = focal * theta_d / r;\n\n float u = scale_x * s * x + 0.5;\n float v = -scale_y * s * y + 0.5;\n\n vec4 baseColor;\n if (u >= 0. && u <= 1. && v >= 0. && v <= 1.) {\n baseColor = texture2D(projectorTex, vec2(u, v));\n baseColor.a = opacity;\n } else {\n baseColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n\n gl_FragColor = baseColor;\n}\n",vertex:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform mat4 projectorMat;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vRstq = projectorMat * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},__.fisheyeCurtain={fragment:"\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\nuniform sampler2D projectorTex;\nuniform float opacity;\nuniform float focal;\nuniform float k1;\nuniform float k2;\nuniform float scale_x;\nuniform float scale_y;\nuniform float radial_peak;\nuniform float curtain;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n float x = vRstq.x;\n float y = vRstq.y;\n float z = vRstq.z;\n\n float r2 = sqrt(x * x + y * y);\n float theta = atan(r2, z);\n\n if (radial_peak > 0. && theta > radial_peak) {\n theta = radial_peak;\n }\n\n float theta2 = theta * theta;\n float theta_d = theta * (1.0 + theta2 * (k1 + theta2 * k2));\n float s = focal * theta_d / r2;\n\n float u = scale_x * s * x + 0.5;\n float v = -scale_y * s * y + 0.5;\n\n vec4 baseColor;\n if ((u < curtain || curtain >= 1.0) && u >= 0. && u <= 1. && v >= 0. && v <= 1.) {\n baseColor = texture2D(projectorTex, vec2(u, v));\n baseColor.a = opacity;\n } else {\n baseColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n\n gl_FragColor = baseColor;\n}\n",vertex:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform mat4 projectorMat;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vRstq = projectorMat * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},__.perspective={fragment:"\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\nuniform sampler2D projectorTex;\nuniform float opacity;\nuniform float focal;\nuniform float k1;\nuniform float k2;\nuniform float scale_x;\nuniform float scale_y;\nuniform float radial_peak;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n float x = vRstq.x / vRstq.z;\n float y = vRstq.y / vRstq.z;\n float r2 = x * x + y * y;\n\n if (radial_peak > 0. && r2 > radial_peak * sqrt(r2)) {\n r2 = radial_peak * radial_peak;\n }\n\n float d = 1.0 + k1 * r2 + k2 * r2 * r2;\n float u = scale_x * focal * d * x + 0.5;\n float v = - scale_y * focal * d * y + 0.5;\n\n vec4 baseColor;\n if (u >= 0. && u <= 1. && v >= 0. && v <= 1.) {\n baseColor = texture2D(projectorTex, vec2(u, v));\n baseColor.a = opacity;\n } else {\n baseColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n\n gl_FragColor = baseColor;\n}\n",vertex:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform mat4 projectorMat;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vRstq = projectorMat * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},__.perspectiveCurtain={fragment:"\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\nuniform sampler2D projectorTex;\nuniform float opacity;\nuniform float focal;\nuniform float k1;\nuniform float k2;\nuniform float scale_x;\nuniform float scale_y;\nuniform float radial_peak;\nuniform float curtain;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n float x = vRstq.x / vRstq.z;\n float y = vRstq.y / vRstq.z;\n float r2 = x * x + y * y;\n\n if (radial_peak > 0. && r2 > radial_peak * sqrt(r2)) {\n r2 = radial_peak * radial_peak;\n }\n\n float d = 1.0 + k1 * r2 + k2 * r2 * r2;\n float u = scale_x * focal * d * x + 0.5;\n float v = - scale_y * focal * d * y + 0.5;\n\n vec4 baseColor;\n if ((u < curtain || curtain >= 1.0) && u >= 0. && u <= 1. && v >= 0. && v <= 1.) {\n baseColor = texture2D(projectorTex, vec2(u, v));\n baseColor.a = opacity;\n } else {\n baseColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n\n gl_FragColor = baseColor;\n}\n",vertex:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform mat4 projectorMat;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vRstq = projectorMat * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},__.perspectiveDistorted={fragment:"\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\nuniform sampler2D projectorTex;\nuniform float opacity;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n float u = vRstq.x / vRstq.w;\n float v = vRstq.y / vRstq.w;\n\n vec4 baseColor;\n if (u >= 0. && u <= 1. && v >= 0. && v <= 1.) {\n baseColor = texture2D(projectorTex, vec2(u, v));\n baseColor.a = opacity;\n } else {\n baseColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n\n gl_FragColor = baseColor;\n}\n",vertex:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform mat4 projectorMat;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vRstq = projectorMat * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},__.perspectiveDistortedCurtain={fragment:"\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\nuniform sampler2D projectorTex;\nuniform float opacity;\nuniform float curtain;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n float u = vRstq.x / vRstq.w;\n float v = vRstq.y / vRstq.w;\n\n vec4 baseColor;\n if ((u < curtain || curtain >= 1.0) && u >= 0. && u <= 1. && v >= 0. && v <= 1.) {\n baseColor = texture2D(projectorTex, vec2(u, v));\n baseColor.a = opacity;\n } else {\n baseColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n\n gl_FragColor = baseColor;\n}\n",vertex:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform mat4 projectorMat;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vRstq = projectorMat * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},__.spherical={fragment:"\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\n#define tau 6.28318530718\n\nuniform sampler2D projectorTex;\nuniform float opacity;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vec3 b = normalize(vRstq.xyz);\n float lat = -asin(b.y);\n float lng = atan(b.x, b.z);\n float x = lng / tau + 0.5;\n float y = lat / tau * 2.0 + 0.5;\n vec4 baseColor = texture2D(projectorTex, vec2(x, y));\n baseColor.a = opacity;\n gl_FragColor = baseColor;\n}\n",vertex:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform mat4 projectorMat;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vRstq = projectorMat * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},__.sphericalCurtain={fragment:"\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\n#define tau 6.28318530718\n\nuniform sampler2D projectorTex;\nuniform float curtain;\nuniform float opacity;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vec3 b = normalize(vRstq.xyz);\n float lat = -asin(b.y);\n float lng = atan(b.x, b.z);\n float x = lng / tau + 0.5;\n float y = lat / tau * 2.0 + 0.5;\n\n bool inverted = curtain < 0.5;\n\n float curtainMin = inverted ? curtain + 0.5 : curtain - 0.5;\n float curtainMax = curtain;\n\n bool insideCurtain = inverted ?\n x > curtainMin || x < curtainMax :\n x > curtainMin && x < curtainMax;\n\n vec4 baseColor;\n if (insideCurtain) {\n baseColor = texture2D(projectorTex, vec2(x, y));\n baseColor.a = opacity;\n } else {\n baseColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n\n gl_FragColor = baseColor;\n}\n",vertex:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform mat4 projectorMat;\n\nvarying vec4 vRstq;\n\nvoid main()\n{\n vRstq = projectorMat * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"};class M_{constructor(e,t){this._imagePlaneDepth=null!=e?e:200,this._imageSphereRadius=null!=t?t:200}createMesh(e,t){return Od(t.cameraType)?this._createImageSphere(e,t):kd(t.cameraType)?this._createImagePlaneFisheye(e,t):this._createImagePlane(e,t)}createFlatMesh(e,t,i,n,r,s){let a=this._createTexture(e.image),o=this._createDistortedPlaneMaterialParameters(t,a),c=new co(o),l=this._getFlatImagePlaneGeoFromBasic(t,i,n,r,s);return new io(l,c)}createCurtainMesh(e,t){return Od(t.cameraType)?this._createSphereCurtainMesh(e,t):kd(t.cameraType)?this._createCurtainMeshFisheye(e,t):this._createCurtainMesh(e,t)}createDistortedCurtainMesh(e,t){return this._createDistortedCurtainMesh(e,t)}_createCurtainMesh(e,t){let i=this._createTexture(e.image),n=this._createCurtainPlaneMaterialParameters(t,i),r=new co(n),s=this._useMesh(t,e)?this._getImagePlaneGeo(t,e):this._getRegularFlatImagePlaneGeo(t);return new io(s,r)}_createCurtainMeshFisheye(e,t){let i=this._createTexture(e.image),n=this._createCurtainPlaneMaterialParametersFisheye(t,i),r=new co(n),s=this._useMesh(t,e)?this._getImagePlaneGeoFisheye(t,e):this._getRegularFlatImagePlaneGeo(t);return new io(s,r)}_createDistortedCurtainMesh(e,t){let i=this._createTexture(e.image),n=this._createDistortedCurtainPlaneMaterialParameters(t,i),r=new co(n),s=this._getRegularFlatImagePlaneGeo(t);return new io(s,r)}_createSphereCurtainMesh(e,t){let i=this._createTexture(e.image),n=this._createCurtainSphereMaterialParameters(t,i),r=new co(n);return this._useMesh(t,e)?new io(this._getImageSphereGeo(t,e),r):new io(this._getFlatImageSphereGeo(t),r)}_createImageSphere(e,t){let i=this._createTexture(e.image),n=this._createSphereMaterialParameters(t,i),r=new co(n);return this._useMesh(t,e)?new io(this._getImageSphereGeo(t,e),r):new io(this._getFlatImageSphereGeo(t),r)}_createImagePlane(e,t){let i=this._createTexture(e.image),n=this._createPlaneMaterialParameters(t,i),r=new co(n),s=this._useMesh(t,e)?this._getImagePlaneGeo(t,e):this._getRegularFlatImagePlaneGeo(t);return new io(s,r)}_createImagePlaneFisheye(e,t){let i=this._createTexture(e.image),n=this._createPlaneMaterialParametersFisheye(t,i),r=new co(n),s=this._useMesh(t,e)?this._getImagePlaneGeoFisheye(t,e):this._getRegularFlatImagePlaneGeoFisheye(t);return new io(s,r)}_createSphereMaterialParameters(e,t){return{depthWrite:!1,fragmentShader:__.spherical.fragment,side:qt,transparent:!0,uniforms:{opacity:{value:1},projectorMat:{value:e.rt},projectorTex:{value:t}},vertexShader:__.spherical.vertex}}_createCurtainSphereMaterialParameters(e,t){return{depthWrite:!1,fragmentShader:__.sphericalCurtain.fragment,side:qt,transparent:!0,uniforms:{curtain:{value:1},opacity:{value:1},projectorMat:{value:e.rt},projectorTex:{value:t}},vertexShader:__.sphericalCurtain.vertex}}_createPlaneMaterialParameters(e,t){return{depthWrite:!1,fragmentShader:__.perspective.fragment,side:qt,transparent:!0,uniforms:{focal:{value:e.focal},k1:{value:e.ck1},k2:{value:e.ck2},opacity:{value:1},projectorMat:{value:e.basicRt},projectorTex:{value:t},radial_peak:{value:e.radialPeak?e.radialPeak:0},scale_x:{value:Math.max(e.basicHeight,e.basicWidth)/e.basicWidth},scale_y:{value:Math.max(e.basicWidth,e.basicHeight)/e.basicHeight}},vertexShader:__.perspective.vertex}}_createPlaneMaterialParametersFisheye(e,t){return{depthWrite:!1,fragmentShader:__.fisheye.fragment,side:qt,transparent:!0,uniforms:{focal:{value:e.focal},k1:{value:e.ck1},k2:{value:e.ck2},opacity:{value:1},projectorMat:{value:e.basicRt},projectorTex:{value:t},radial_peak:{value:e.radialPeak?e.radialPeak:0},scale_x:{value:Math.max(e.basicHeight,e.basicWidth)/e.basicWidth},scale_y:{value:Math.max(e.basicWidth,e.basicHeight)/e.basicHeight}},vertexShader:__.fisheye.vertex}}_createCurtainPlaneMaterialParametersFisheye(e,t){return{depthWrite:!1,fragmentShader:__.fisheyeCurtain.fragment,side:qt,transparent:!0,uniforms:{curtain:{value:1},focal:{value:e.focal},k1:{value:e.ck1},k2:{value:e.ck2},opacity:{value:1},projectorMat:{value:e.basicRt},projectorTex:{value:t},radial_peak:{value:e.radialPeak?e.radialPeak:0},scale_x:{value:Math.max(e.basicHeight,e.basicWidth)/e.basicWidth},scale_y:{value:Math.max(e.basicWidth,e.basicHeight)/e.basicHeight}},vertexShader:__.fisheyeCurtain.vertex}}_createCurtainPlaneMaterialParameters(e,t){return{depthWrite:!1,fragmentShader:__.perspectiveCurtain.fragment,side:qt,transparent:!0,uniforms:{curtain:{value:1},focal:{value:e.focal},k1:{value:e.ck1},k2:{value:e.ck2},opacity:{value:1},projectorMat:{value:e.basicRt},projectorTex:{value:t},radial_peak:{value:e.radialPeak?e.radialPeak:0},scale_x:{value:Math.max(e.basicHeight,e.basicWidth)/e.basicWidth},scale_y:{value:Math.max(e.basicWidth,e.basicHeight)/e.basicHeight}},vertexShader:__.perspectiveCurtain.vertex}}_createDistortedCurtainPlaneMaterialParameters(e,t){return{depthWrite:!1,fragmentShader:__.perspectiveDistortedCurtain.fragment,side:qt,transparent:!0,uniforms:{curtain:{value:1},opacity:{value:1},projectorMat:{value:e.projectorMatrix()},projectorTex:{value:t}},vertexShader:__.perspectiveDistortedCurtain.vertex}}_createDistortedPlaneMaterialParameters(e,t){return{depthWrite:!1,fragmentShader:__.perspectiveDistorted.fragment,side:qt,transparent:!0,uniforms:{opacity:{value:1},projectorMat:{value:e.projectorMatrix()},projectorTex:{value:t}},vertexShader:__.perspectiveDistorted.vertex}}_createTexture(e){let t=new Qr(e);return t.minFilter=Vi,t.needsUpdate=!0,t}_useMesh(e,t){return t.mesh.vertices.length&&e.hasValidScale}_getImageSphereGeo(e,t){const i=e.srtInverse;let n=5*e.scale,r=this._imageSphereRadius*e.scale,s=t.mesh.vertices,a=s.length/3,o=new Float32Array(s.length);for(let e=0;e{this._updateTexture(e)})),n=t.textureUpdated$.subscribe((e=>{this._needsRender=!0}));e in this._providerDisposers&&((0,this._providerDisposers[e])(),delete this._providerDisposers[e]),this._providerDisposers[e]=()=>{i.unsubscribe(),n.unsubscribe(),t.dispose()}}updateTextureImage(e,t){this._needsRender=!0;const i=this._extend({},this._scene.planes,this._scene.planesOld,this._scene.planesPeriphery);for(const n in i){if(!i.hasOwnProperty(n))continue;if(n!==t.id)continue;let r=i[n].material.uniforms.projectorTex.value;r.image=e,r.needsUpdate=!0}}render(e,t){const i=this._scene.planes,n=this._scene.planesOld,r=this._scene.planesPeriphery,s=Object.keys(n).length?1:this._alpha,a=Object.keys(n).length?1:Math.floor(this._alpha);for(const e in i)i.hasOwnProperty(e)&&(i[e].material.uniforms.opacity.value=s);for(const e in n)n.hasOwnProperty(e)&&(n[e].material.uniforms.opacity.value=this._alphaOld);for(const e in r)r.hasOwnProperty(e)&&(r[e].material.uniforms.opacity.value=a);t.render(this._scene.scenePeriphery,e),t.render(this._scene.scene,e),t.render(this._scene.sceneOld,e);for(const e in i)i.hasOwnProperty(e)&&(i[e].material.uniforms.opacity.value=this._alpha);t.render(this._scene.scene,e)}clearNeedsRender(){this._needsRender=!1}dispose(){this._scene.clear()}_updateFrameId(e){this._frameId=e}_updateAlpha(e){return e!==this._alpha&&(this._alpha=e,!0)}_updateAlphaOld(e){return!(e<1||0===this._alphaOld||(this._alphaOld=Math.max(0,this._alphaOld-this._fadeOutSpeed),0))}_updateImagePlanes(e){if(null==e.currentImage||e.currentImage.id===this._currentKey)return!1;let t=null!=e.previousImage?e.previousImage.id:null,i=e.currentImage.id;if(this._previousKey!==t&&this._previousKey!==i&&this._previousKey in this._providerDisposers&&((0,this._providerDisposers[this._previousKey])(),delete this._providerDisposers[this._previousKey]),null!=t){if(t!==this._currentKey&&t!==this._previousKey){let i=this._factory.createMesh(e.previousImage,e.previousTransform);const n={};n[t]=i,this._scene.updateImagePlanes(n)}this._previousKey=t}this._currentKey=i;let n=this._factory.createMesh(e.currentImage,e.currentTransform);const r={};return r[i]=n,this._scene.updateImagePlanes(r),this._alphaOld=1,!0}_updateTexture(e){this._needsRender=!0;const t=this._scene.planes;for(const i in t){if(!t.hasOwnProperty(i))continue;let n=t[i].material,r=n.uniforms.projectorTex.value;n.uniforms.projectorTex.value=null,r.dispose(),n.uniforms.projectorTex.value=e}}_extend(e,...t){for(const i of t)for(const t in i)i.hasOwnProperty(t)&&(e[t]=i[t]);return e}}!function(e){e[e.Background=0]="Background",e[e.Opaque=1]="Opaque"}(n_||(n_={}));class x_{constructor(e){this._api=e,this._urls$=new Map}getImage$(e){let t;const i=new Promise(((e,i)=>{t=i}));return[P.create((n=>{this._api.data.getImageBuffer(e,i).then((e=>{t=null;const i=new Image;i.crossOrigin="Anonymous",i.onload=()=>{window.URL.revokeObjectURL(i.src),n.next(i),n.complete()},i.onerror=()=>{t=null,window.URL.revokeObjectURL(i.src),n.error(new Error("Failed to load image tile"))};const r=new Blob([e]);i.src=window.URL.createObjectURL(r)}),(e=>{t=null,n.error(e)}))})),()=>{t&&t()}]}getURLs$(e,t){const i=this._inventId(e,t);if(this._urls$.has(i))return this._urls$.get(i);const n={imageId:e,z:t},r=this._api.getImageTiles$(n).pipe(ze((e=>e.node)),Mt((()=>{this._urls$.delete(i)})),Tt(),F());return this._urls$.set(i,r),r}_inventId(e,t){return`${e}-${t}`}}class b_{constructor(){this._tiles=new Map,this._urlLevels=new Set,this._urls=new Map}add(e,t){if(this._tiles.has(e))throw new Error(`Image tile already stored (${e})`);this._tiles.set(e,t)}addURLs(e,t){const i=this._urls;for(const e of t){const t=this.inventId(e);if(this._urls.has(t))throw new Error(`URL already stored (${t})`);i.set(t,e.url)}this._urlLevels.add(e)}dispose(){this._tiles.forEach((e=>window.URL.revokeObjectURL(e.src))),this._tiles.clear(),this._urls.clear(),this._urlLevels.clear()}get(e){return this._tiles.get(e)}getURL(e){return this._urls.get(e)}has(e){return this._tiles.has(e)}hasURL(e){return this._urls.has(e)}hasURLLevel(e){return this._urlLevels.has(e)}inventId(e){return`${e.z}-${e.x}-${e.y}`}}class w_{constructor(){this._viewportCoords=new h_}computeRegionOfInterest(e,t,i){const n=this._viewportBoundaryPoints(4),r=this._viewportPointsBoundingBox(n,e,i);this._clipBoundingBox(r);const s=2/t.width,a=2/t.height,o=[[-.5*s,.5*a],[.5*s,.5*a],[.5*s,-.5*a],[-.5*s,-.5*a]],c=this._viewportPointsBoundingBox(o,e,i),l=c.minXthis._viewportCoords.viewportToBasic(e[0],e[1],i,t.perspective)));return Od(i.cameraType)?this._boundingBoxSpherical(n):this._boundingBox(n)}_boundingBox(e){const t={maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY};for(let i=0;ithis._sign(e-t))),i.sort(((e,t)=>this._sign(e-t)));const n=this._intervalSpherical(t);return{maxX:n[1],maxY:i[i.length-1],minX:n[0],minY:i[0]}}_intervalSpherical(e){let t=0,i=-1;for(let n=0;nt&&(t=r,i=n)}return e[0]+1-e[e.length-1]>t?[e[0],e[e.length-1]]:[e[i+1],e[i]]}_clipBoundingBox(e){e.minX=Math.max(0,Math.min(1,e.minX)),e.maxX=Math.max(0,Math.min(1,e.maxX)),e.minY=Math.max(0,Math.min(1,e.minY)),e.maxY=Math.max(0,Math.min(1,e.maxY))}_sign(e){return e>0?1:e<0?-1:0}}const T_=1024;function S_(e,t,i){return Math.max(t,Math.min(i,e))}function N_(e){return T_/D_(e)}function D_(e){return Math.pow(2,e.z-e.max)}function I_(e){return Math.ceil(function(e){const t=Math.max(e.w,e.h);return Math.log(t)/Math.log(2)}(e))}function C_(e,t,i){const n=N_(i),r=t.w,s=t.h,a=Math.ceil(r/n)-1,o=Math.ceil(s/n)-1;return{x:S_(Math.floor(r*e[0]/n),0,a),y:S_(Math.floor(s*e[1]/n),0,o)}}function A_(e,t,i){const n=1/D_(i)*T_,r=n*e.x,s=n*e.y,a=Math.min(n,t.w-r);return{h:Math.min(n,t.h-s),x:r,y:s,w:a}}function E_(e,t,i){return i*e<=t&&t0&&e.h>0}class j_{constructor(e,t,i,n,r,s,a){const o={h:i,w:t};z_(o)||console.warn(`Original image size (${t}, ${i}) is invalid (${e}). Tiles will not be loaded.`),this._imageId=e,this._size=o,this._level={max:I_(this._size),z:-1},this._holder=new a_,this._updated$=new V,this._createdSubject$=new V,this._created$=this._createdSubject$.pipe(St(1),F()),this._holder.push(this._created$.subscribe((()=>{}))),this._hasSubject$=new V,this._has$=this._hasSubject$.pipe(Lt(!1),St(1),F()),this._holder.push(this._has$.subscribe((()=>{}))),this._renderedLevel=new Set,this._rendered=new Map,this._subscriptions=new Map,this._urlSubscriptions=new Map,this._loader=r,this._store=s,this._background=n,this._renderer=a,this._aborts=[],this._render=null,this._disposed=!1}get disposed(){return this._disposed}get hasTexture$(){return this._has$}get id(){return this._imageId}get textureUpdated$(){return this._updated$}get textureCreated$(){return this._created$}abort(){this._subscriptions.forEach((e=>e.unsubscribe())),this._subscriptions.clear();for(const e of this._aborts)e();this._aborts=[]}dispose(){this._disposed?console.warn(`Texture already disposed (${this._imageId})`):(this._urlSubscriptions.forEach((e=>e.unsubscribe())),this._urlSubscriptions.clear(),this.abort(),null!=this._render&&(this._render.target.dispose(),this._render.target=null,this._render.camera=null,this._render=null),this._store.dispose(),this._holder.unsubscribe(),this._renderedLevel.clear(),this._background=null,this._renderer=null,this._disposed=!0)}setRegionOfInterest(e){if(!z_(this._size))return;const t=1/e.pixelWidth,i=function(e,t,i){return Math.max(11,Math.min(i,I_(e)))}({h:1/e.pixelHeight,w:t},0,this._level.max);i!==this._level.z&&(this.abort(),this._level.z=i,this._renderedLevel.clear(),this._rendered.forEach(((e,t)=>{e.z===i&&this._renderedLevel.add(t)}))),null==this._render&&this._initRender();const n=function(e,t,i,n){const r=[];if(e.x>t.x){const s=N_(n),a=Math.ceil(i.w/s)-1;for(let t=e.x;t<=a;t++)r.push(t);for(let e=0;e<=t.x;e++)r.push(e)}else for(let i=e.x;i<=t.x;i++)r.push(i);const s=[];for(const i of r)for(let n=e.y;n<=t.y;n++)s.push({x:i,y:n});return s}(C_([e.bbox.minX,e.bbox.minY],this._size,this._level),C_([e.bbox.maxX,e.bbox.maxY],this._size,this._level),this._size,this._level);this._fetchTiles(i,n)}_fetchTile(e){const t=this._loader.getImage$(e.url),i=t[0],n=t[1];this._aborts.push(n);const r=this._store.inventId(e),s=i.subscribe((t=>{const i=A_(e,this._size,this._level);this._renderToTarget(i,t),this._subscriptions.delete(r),this._removeFromArray(n,this._aborts),this._markRendered(e),this._store.add(r,t),this._updated$.next(!0)}),(e=>{this._subscriptions.delete(r),this._removeFromArray(n,this._aborts),console.error(e)}));s.closed||this._subscriptions.set(r,s)}_fetchTiles(e,t){const i=(this._store.hasURLLevel(e)?Ne(void 0):this._loader.getURLs$(this._imageId,e).pipe(kt((t=>{this._store.hasURLLevel(e)||this._store.addURLs(e,t)})))).subscribe((()=>{if(e===this._level.z){for(const i of t){const t={x:i.x,y:i.y,z:e,url:null},n=this._store.inventId(t);if(!this._renderedLevel.has(n)&&!this._subscriptions.has(n))if(this._store.has(n)){const e=A_(i,this._size,this._level);this._renderToTarget(e,this._store.get(n)),this._markRendered(t),this._updated$.next(!0)}else t.url=this._store.getURL(n),this._fetchTile(t)}this._urlSubscriptions.delete(e)}}),(t=>{this._urlSubscriptions.delete(e),console.error(t)}));i.closed||this._urlSubscriptions.set(e,i)}_initRender(){const e=this._size.w/2,t=this._size.h/2,i=new Oo(-e,e,t,-t,-1,1);i.position.z=1;const n=this._renderer.getContext(),r=n.getParameter(n.MAX_TEXTURE_SIZE),s=Math.max(this._size.w,this._size.h),a=r>s?1:r/s,o=Math.floor(a*this._size.w),c=Math.floor(a*this._size.h),l=new Jr(o,c,{depthBuffer:!1,format:cn,magFilter:Vi,minFilter:Vi,stencilBuffer:!1});this._render={camera:i,target:l};const h=A_({x:0,y:0},this._size,{max:this._level.max,z:0});this._renderToTarget(h,this._background),this._createdSubject$.next(l.texture),this._hasSubject$.next(!0)}_markRendered(e){const t=Array.from(this._rendered.entries()).filter((([t,i])=>i.z!==e.z));for(const[i,n]of t)L_(e,n)&&this._rendered.delete(i);const i=this._store.inventId(e);this._rendered.set(i,e),this._renderedLevel.add(i)}_removeFromArray(e,t){const i=t.indexOf(e);-1!==i&&t.splice(i,1)}_renderToTarget(e,t){const i=new Qr(t);i.minFilter=Vi,i.needsUpdate=!0;const n=new So(e.w,e.h),r=new Ta({map:i,side:Vt}),s=new io(n,r);s.position.x=-this._size.w/2+e.x+e.w/2,s.position.y=this._size.h/2-e.y-e.h/2;const a=new hh;a.add(s);const o=this._renderer.getRenderTarget();this._renderer.resetState(),this._renderer.setRenderTarget(this._render.target),this._renderer.render(a,this._render.camera),this._renderer.setRenderTarget(o),a.remove(s),n.dispose(),r.dispose(),i.dispose()}}var O_,k_,P_,R_,U_,$_,B_;!function(e){e[e.Custom=0]="Custom",e[e.Earth=1]="Earth",e[e.Traversing=2]="Traversing",e[e.Waiting=3]="Waiting",e[e.WaitingInteractively=4]="WaitingInteractively"}(O_||(O_={}));class F_ extends o_{constructor(e,t,i){super(e,t,i),this._imageTileLoader=new x_(i.api),this._roiCalculator=new w_,this._rendererOperation$=new V,this._rendererCreator$=new V,this._rendererDisposer$=new V,this._renderer$=this._rendererOperation$.pipe(Dt(((e,t)=>t(e)),null),et((e=>null!=e)),dt(void 0,(e=>e.frameId))),this._rendererCreator$.pipe(ze((()=>e=>{if(null!=e)throw new Error("Multiple image plane states can not be created at the same time");return new y_}))).subscribe(this._rendererOperation$),this._rendererDisposer$.pipe(ze((()=>e=>(e.dispose(),null)))).subscribe(this._rendererOperation$)}_activate(){const e=this._subscriptions;e.push(this._renderer$.pipe(ze((e=>{const t={name:this._name,renderer:{frameId:e.frameId,needsRender:e.needsRender,render:e.render.bind(e),pass:n_.Background}};return e.clearNeedsRender(),t}))).subscribe(this._container.glRenderer.render$)),this._rendererCreator$.next(null),e.push(this._navigator.stateService.currentState$.pipe(ze((e=>t=>(t.updateFrame(e),t)))).subscribe(this._rendererOperation$));const t=this._container.configurationService.imageTiling$.pipe(zt((e=>e?this._navigator.stateService.currentState$:new V)),dt(void 0,(e=>e.state.currentImage.id)),Pt(this._container.glRenderer.webGLRenderer$),ze((([e,t])=>{const i=e.state,n=i.currentImage,r=i.currentTransform;return new j_(n.id,r.basicWidth,r.basicHeight,n.image,this._imageTileLoader,new b_,t)})),St(1),F());e.push(t.subscribe((()=>{}))),e.push(t.pipe(ze((e=>t=>(t.setTextureProvider(e.id,e),t)))).subscribe(this._rendererOperation$)),e.push(t.pipe(wt()).subscribe((e=>{e[0].abort()})));const i=this._container.configurationService.imageTiling$.pipe(zt((e=>e?$e(this._navigator.stateService.state$,this._navigator.stateService.inTranslation$):new V)),zt((([e,t])=>e!==O_.Traversing&&e!==O_.Waiting&&e!==O_.WaitingInteractively||t?re():this._container.renderService.renderCameraFrame$)),ze((e=>({camera:e,height:e.size.height.valueOf(),lookat:e.camera.lookat.clone(),width:e.size.width.valueOf(),zoom:e.zoom.valueOf()}))),wt(),ze((([e,t])=>{const i=e.width===t.width&&e.height===t.height&&e.zoom===t.zoom&&e.lookat.equals(t.lookat);return{camera:t.camera,stalled:i}})),dt(((e,t)=>e.stalled===t.stalled)),et((e=>e.stalled)),Pt(this._container.renderService.size$,this._navigator.stateService.currentTransform$));e.push(t.pipe(zt((e=>i.pipe(ze((([t,i,n])=>{const r=t.camera,s=(new h_).viewportToBasic(0,0,n,r.perspective);if(!(s[0]<0||s[1]<0||s[0]>1||s[1]>1))return[this._roiCalculator.computeRegionOfInterest(r,i,n),e]})),et((e=>!!e))))),et((e=>!e[1].disposed))).subscribe((([e,t])=>{t.setRegionOfInterest(e)})));const n=t.pipe(zt((e=>e.hasTexture$)),Lt(!1),St(1),F());e.push(n.subscribe((()=>{}))),e.push(this._navigator.panService.panImages$.pipe(et((e=>0===e.length)),ze((()=>e=>(e.clearPeripheryPlanes(),e)))).subscribe(this._rendererOperation$));const r=this._navigator.panService.panImages$.pipe(zt((e=>_e(e).pipe(Ge((([e,t])=>$e(this._navigator.graphService.cacheImage$(e.id).pipe(rt((t=>(console.error(`Failed to cache periphery image (${e.id})`,t),re())))),Ne(t))))))),It());e.push(r.pipe(ze((([e,t])=>i=>(i.addPeripheryPlane(e,t),i)))).subscribe(this._rendererOperation$)),e.push(r.pipe(Ge((([e])=>e.cacheImage$().pipe(rt((()=>re()))))),ze((e=>t=>(t.updateTextureImage(e.image,e),t)))).subscribe(this._rendererOperation$));const s=this._navigator.stateService.currentState$.pipe(ze((e=>e.state.alpha<1)),dt()),a=$e(this._container.mouseService.active$,this._container.touchService.active$,this._navigator.stateService.inMotion$,s).pipe(ze((([e,t,i,n])=>!(e||t||i||n))),et((e=>e)));e.push(this._navigator.stateService.state$.pipe(zt((e=>e===O_.Traversing?this._navigator.panService.panImages$:re())),zt((e=>a.pipe(Pt(this._container.renderService.renderCamera$,this._navigator.stateService.currentImage$,this._navigator.stateService.currentTransform$),Ge((([,t,i,n])=>Ne([t,i,n,e])))))),zt((([e,t,i,n])=>{const r=e.camera.lookat.clone().sub(e.camera.position),s=[(new zd).viewingDirection(t.rotation).angleTo(r),void 0],a=(new h_).viewportToBasic(0,0,i,e.perspective);a[0]>=0&&a[0]<=1&&a[1]>=0&&a[1]<=1&&(s[0]=Number.NEGATIVE_INFINITY);for(const[e]of n){const t=(new zd).viewingDirection(e.rotation).angleTo(r);tre()))):re()}))).subscribe())}_deactivate(){this._rendererDisposer$.next(null),this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{}}}F_.componentName="image";class G_{constructor(e,t,i){this._component=e,this._container=t,this._navigator=i,this._enabled=!1}get isEnabled(){return this._enabled}enable(){!this._enabled&&this._component.activated&&(this._enable(),this._enabled=!0,this._component.configure(this._getConfiguration(!0)))}disable(){this._enabled&&(this._disable(),this._enabled=!1,this._component.activated&&this._component.configure(this._getConfiguration(!1)))}}class H_ extends G_{_enable(){const e=this._navigator.stateService.currentImage$.pipe(zt((e=>e.sequenceEdges$)));this._keyDownSubscription=this._container.keyboardService.keyDown$.pipe(Pt(e)).subscribe((([e,t])=>{let i=null;switch(e.keyCode){case 38:i=Id.Next;break;case 40:i=Id.Prev;break;default:return}if(e.preventDefault(),e.altKey&&!e.shiftKey&&t.cached)for(const e of t.edges)if(e.data.direction===i)return void this._navigator.moveTo$(e.target).subscribe(void 0,(e=>{e instanceof d_||console.error(e)}))}))}_disable(){this._keyDownSubscription.unsubscribe()}_getConfiguration(e){return{keySequenceNavigation:e}}}class V_ extends G_{constructor(e,t,i,n){super(e,t,i),this._spatial=n}_enable(){const e=this._navigator.stateService.currentImage$.pipe(zt((e=>e.spatialEdges$)));this._keyDownSubscription=this._container.keyboardService.keyDown$.pipe(Pt(e,this._navigator.stateService.currentState$)).subscribe((([e,t,i])=>{let n=Od(i.state.currentImage.cameraType),r=null;switch(e.keyCode){case 37:r=e.shiftKey&&!n?Id.TurnLeft:Id.StepLeft;break;case 38:r=e.shiftKey&&!n?Id.Spherical:Id.StepForward;break;case 39:r=e.shiftKey&&!n?Id.TurnRight:Id.StepRight;break;case 40:r=e.shiftKey&&!n?Id.TurnU:Id.StepBackward;break;default:return}if(e.preventDefault(),!(e.altKey||!t.cached||e.shiftKey&&n))if(n){const e={};e[Id.StepBackward]=Math.PI,e[Id.StepForward]=0,e[Id.StepLeft]=Math.PI/2,e[Id.StepRight]=-Math.PI/2;const n=this._rotationFromCamera(i.state.camera).phi,s=this._spatial.wrapAngle(n+e[r]),a=Math.PI/4,o=t.edges.filter((e=>e.data.direction===Id.Spherical||e.data.direction===r));let c=Number.MAX_VALUE,l=null;for(const e of o){const t=Math.abs(this._spatial.wrapAngle(e.data.worldMotionAzimuth-s));t{e instanceof d_||console.error(e)}))}_rotationFromCamera(e){let t=e.lookat.clone().sub(e.position),i=t.clone().dot(e.up),n=t.clone().sub(e.up.clone().multiplyScalar(i));return{phi:Math.atan2(n.y,n.x),theta:Math.PI/2-this._spatial.angleToPlane(t.toArray(),[0,0,1])}}}class Y_ extends G_{constructor(e,t,i,n){super(e,t,i),this._viewportCoords=n}_enable(){this._keyDownSubscription=this._container.keyboardService.keyDown$.pipe(Pt(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$)).subscribe((([e,t,i])=>{if(e.altKey||e.ctrlKey||e.metaKey)return;let n=0;switch(e.key){case"+":n=1;break;case"-":n=-1;break;default:return}e.preventDefault();const r=this._viewportCoords.unprojectFromViewport(0,0,t.perspective),s=i.projectBasic(r.toArray());this._navigator.stateService.zoomIn(n,s)}))}_disable(){this._keyDownSubscription.unsubscribe()}_getConfiguration(e){return{keyZoom:e}}}class q_ extends G_{_enable(){this._keyDownSubscription=this._container.keyboardService.keyDown$.pipe(Pt(this._navigator.playService.playing$,this._navigator.playService.direction$,this._navigator.playService.speed$,this._navigator.stateService.currentImage$.pipe(zt((e=>e.sequenceEdges$))),this._navigator.stateService.state$.pipe(ze((e=>e===O_.Earth)),dt()))).subscribe((([e,t,i,n,r,s])=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){switch(e.key){case"D":if(!e.shiftKey)return;const a=t?null:i===Id.Next?Id.Prev:i===Id.Prev?Id.Next:null;null!=a&&this._navigator.playService.setDirection(a);break;case" ":if(e.shiftKey)return;if(!s)if(t)this._navigator.playService.stop();else for(let e of r.edges)e.data.direction===i&&this._navigator.playService.play();break;case"<":this._navigator.playService.setSpeed(n-.05);break;case">":this._navigator.playService.setSpeed(n+.05);break;default:return}e.preventDefault()}}))}_disable(){this._keyDownSubscription.unsubscribe()}_getConfiguration(e){return{keyPlay:e}}}class W_ extends o_{constructor(e,t,i){super(e,t,i),this._keyPlayHandler=new q_(this,t,i),this._keySequenceNavigationHandler=new H_(this,t,i),this._keySpatialNavigationHandler=new V_(this,t,i,new zd),this._keyZoomHandler=new Y_(this,t,i,new h_)}get keyPlay(){return this._keyPlayHandler}get keySequenceNavigation(){return this._keySequenceNavigationHandler}get keySpatialNavigation(){return this._keySpatialNavigationHandler}get keyZoom(){return this._keyZoomHandler}_activate(){this._subscriptions.push(this._configuration$.subscribe((e=>{e.keyPlay?this._keyPlayHandler.enable():this._keyPlayHandler.disable(),e.keySequenceNavigation?this._keySequenceNavigationHandler.enable():this._keySequenceNavigationHandler.disable(),e.keySpatialNavigation?this._keySpatialNavigationHandler.enable():this._keySpatialNavigationHandler.disable(),e.keyZoom?this._keyZoomHandler.enable():this._keyZoomHandler.disable()})))}_deactivate(){this._subscriptions.unsubscribe(),this._keyPlayHandler.disable(),this._keySequenceNavigationHandler.disable(),this._keySpatialNavigationHandler.disable(),this._keyZoomHandler.disable()}_getDefaultConfiguration(){return{keyPlay:!0,keySequenceNavigation:!0,keySpatialNavigation:!0,keyZoom:!0}}}W_.componentName="keyboard";class Q_{constructor(e,t){this._needsRender=!1,this._interactiveObjects=[],this._markers={},this._objectMarkers={},this._raycaster=t||new sd,this._scene=e||new hh}get markers(){return this._markers}get needsRender(){return this._needsRender}add(e,t){e.id in this._markers&&this._dispose(e.id),e.createGeometry(t),this._scene.add(e.geometry),this._markers[e.id]=e;for(let t of e.getInteractiveObjects())this._interactiveObjects.push(t),this._objectMarkers[t.uuid]=e.id;this._needsRender=!0}clear(){for(const e in this._markers)this._markers.hasOwnProperty&&this._dispose(e);this._needsRender=!0}get(e){return this._markers[e]}getAll(){return Object.keys(this._markers).map((e=>this._markers[e]))}has(e){return e in this._markers}intersectObjects([e,t],i){this._raycaster.setFromCamera(new Br(e,t),i);const n=this._raycaster.intersectObjects(this._interactiveObjects);for(const e of n)if(e.object.uuid in this._objectMarkers)return this._objectMarkers[e.object.uuid];return null}lerpAltitude(e,t,i){e in this._markers&&(this._markers[e].lerpAltitude(t,i),this._needsRender=!0)}remove(e){e in this._markers&&(this._dispose(e),this._needsRender=!0)}render(e,t){t.render(this._scene,e),this._needsRender=!1}update(e,t,i){e in this._markers&&(this._markers[e].updatePosition(t,i),this._needsRender=!0)}_dispose(e){const t=this._markers[e];this._scene.remove(t.geometry);for(let i of t.getInteractiveObjects()){const t=this._interactiveObjects.indexOf(i);-1!==t?this._interactiveObjects.splice(t,1):console.warn(`Object does not exist (${i.id}) for ${e}`),delete this._objectMarkers[i.uuid]}t.disposeGeometry(),delete this._markers[e]}}class Z_ extends o_{constructor(e,t,i){super(e,t,i),this._graphCalculator=new wd,this._markerScene=new Q_,this._markerSet=new Fd,this._viewportCoords=new h_,this._relativeGroundAltitude=-2}add(e){this._markerSet.add(e)}fire(e,t){super.fire(e,t)}get(e){return this._markerSet.get(e)}getAll(){return this._markerSet.getAll()}getMarkerIdAt(e){return new Promise(((t,i)=>{this._container.renderService.renderCamera$.pipe(vt(),ze((t=>{const i=this._viewportCoords.canvasToViewport(e[0],e[1],this._container.container);return this._markerScene.intersectObjects(i,t.perspective)}))).subscribe((e=>{t(e)}),(e=>{i(e)}))}))}has(e){return this._markerSet.has(e)}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}remove(e){this._markerSet.remove(e)}removeAll(){this._markerSet.removeAll()}_activate(){const e=this._navigator.stateService.currentState$.pipe(ze((e=>e.state.camera.position.z+this._relativeGroundAltitude)),dt(((e,t)=>Math.abs(e-t)<.01)),St(1),F()),t=$e(e,this._navigator.stateService.reference$).pipe(vt(),ze((()=>{})),St(1),F()),i=this._configuration$.pipe(ze((e=>({visibleBBoxSize:Math.max(1,Math.min(200,e.visibleBBoxSize))})))),n=this._navigator.stateService.currentImage$.pipe(ze((e=>e.lngLat)),St(1),F()),r=$e(i,n).pipe(ze((([e,t])=>this._graphCalculator.boundingBoxCorners(t,e.visibleBBoxSize/2))),St(1),F()),s=$e(Ve(Ne(this._markerSet),this._markerSet.changed$),r).pipe(ze((([e,t])=>e.search(t)))),a=this._subscriptions;a.push(t.pipe(zt((()=>s.pipe(Pt(this._navigator.stateService.reference$,e))))).subscribe((([e,t,i])=>{const n=this._markerScene,r=n.markers,s=Object.assign({},r);for(const a of e)if(a.id in r)delete s[a.id];else{const e=_d(a.lngLat.lng,a.lngLat.lat,t.alt+i,t.lng,t.lat,t.alt);n.add(a,e)}for(const e in s)s.hasOwnProperty(e)&&n.remove(e)}))),a.push(t.pipe(zt((()=>this._markerSet.updated$.pipe(Pt(r,this._navigator.stateService.reference$,e))))).subscribe((([e,[t,i],n,r])=>{const s=this._markerScene;for(const a of e){const e=s.has(a.id),o=a.lngLat.lat>t.lat&&a.lngLat.latt.lng&&a.lngLat.lng{const i=this._markerScene;for(const n of i.getAll()){const r=_d(n.lngLat.lng,n.lngLat.lat,e.alt+t,e.lng,e.lat,e.alt);i.update(n.id,r)}}))),a.push(e.pipe(At(1),Pt(this._navigator.stateService.reference$,n)).subscribe((([e,t,i])=>{const n=this._markerScene,r=_d(i.lng,i.lat,t.alt+e,t.lng,t.lat,t.alt);for(const i of n.getAll()){const s=_d(i.lngLat.lng,i.lngLat.lat,t.alt+e,t.lng,t.lat,t.alt),a=s[0]-r[0],o=s[1]-r[1],c=Math.sqrt(a*a+o*o);c>50||n.lerpAltitude(i.id,e,Math.min(1,Math.max(0,1.2-1.2*c/50)))}}))),a.push(this._navigator.stateService.currentState$.pipe(ze((e=>{const t=this._markerScene;return{name:this._name,renderer:{frameId:e.id,needsRender:t.needsRender,render:t.render.bind(t),pass:n_.Opaque}}}))).subscribe(this._container.glRenderer.render$));const o=$e(this._container.renderService.renderCamera$,this._container.mouseService.mouseMove$).pipe(ze((([e,t])=>{const i=this._container.container,[n,r]=this._viewportCoords.canvasPosition(t,i),s=this._viewportCoords.canvasToViewport(n,r,i);return this._markerScene.intersectObjects(s,e.perspective)})),St(1),F()),c=this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDragStart$).pipe(ze((()=>!0))),l=this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDragEnd$).pipe(ze((()=>!1))),h=Je(c,l).pipe(Lt(!1));a.push(Je(c.pipe(Pt(o)),$e(l,Ne(null))).pipe(Lt([!1,null]),wt()).subscribe((([e,t])=>{const i=t[0],n=i?"markerdragstart":"markerdragend",r=i?t[1]:e[1],s={marker:this._markerScene.get(r),target:this,type:n};this.fire(n,s)})));const u=Je(this._container.mouseService.mouseDown$.pipe(ze((()=>!0))),this._container.mouseService.documentMouseUp$.pipe(ze((()=>!1)))).pipe(Lt(!1));a.push($e(this._container.mouseService.active$,o.pipe(dt()),u,h).pipe(ze((([e,t,i,n])=>!e&&null!=t&&i||n)),dt()).subscribe((e=>{e?(this._container.mouseService.claimMouse(this._name,1),this._container.mouseService.claimWheel(this._name,1)):(this._container.mouseService.unclaimMouse(this._name),this._container.mouseService.unclaimWheel(this._name))})));const p=this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDragStart$).pipe(Pt(o,this._container.renderService.renderCamera$),ze((([e,t,i])=>{const n=this._markerScene.get(t),r=this._container.container,[s,a]=this._viewportCoords.projectToCanvas(n.geometry.position.toArray(),r,i.perspective),[o,c]=this._viewportCoords.canvasPosition(e,r);return[n,[o-s,c-a],i]})),St(1),F());a.push(this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDrag$).pipe(Pt(p,this._navigator.stateService.reference$,i)).subscribe((([e,[t,i,n],r,s])=>{if(!this._markerScene.has(t.id))return;const a=this._container.container,[o,c]=this._viewportCoords.canvasPosition(e,a),l=o-i[0],h=c-i[1],[u,p]=this._viewportCoords.canvasToViewport(l,h,a),d=new ts(u,p,1).unproject(n.perspective).sub(n.perspective.position).normalize(),g=Math.min(this._relativeGroundAltitude/d.z,s.visibleBBoxSize/2-.1);if(g<0)return;const m=d.clone().multiplyScalar(g).add(n.perspective.position);m.z=n.perspective.position.z+this._relativeGroundAltitude;const[f,_]=Md(m.x,m.y,m.z,r.lng,r.lat,r.alt);this._markerScene.update(t.id,m.toArray(),{lat:_,lng:f}),this._markerSet.update(t);const M="markerposition",v={marker:t,target:this,type:M};this.fire(M,v)})))}_deactivate(){this._subscriptions.unsubscribe(),this._markerScene.clear()}_getDefaultConfiguration(){return{visibleBBoxSize:100}}}function X_(e,t){return e.x<=Math.max(t.p1.x,t.p2.x)&&e.x>=Math.min(t.p1.x,t.p2.x)&&e.y>=Math.max(t.p1.y,t.p2.y)&&e.y>=Math.min(t.p1.y,t.p2.y)}function J_(e,t){const i=e.p2.x-e.p1.x,n=e.p2.y-e.p1.y,r=t.p2.x-t.p1.x,s=t.p2.y-t.p1.y,a=i*s-n*r;return a*a<1e-10*(i*i+n*n)*(r*r+s*s)}function K_(e,t,i){return(n=(t.y-e.y)*(i.x-t.x)-(i.y-t.y)*(t.x-e.x))>0?1:n<0?-1:0;var n}function eM(e,t){if(J_(e,t))return!1;const i=K_(e.p1,e.p2,t.p1),n=K_(e.p1,e.p2,t.p2),r=K_(t.p1,t.p2,e.p1),s=K_(t.p1,t.p2,e.p2);return i!==n&&r!==s||!(0!==i||!X_(t.p1,e))||!(0!==n||!X_(t.p2,e))||!(0!==r||!X_(e.p1,t))||!(0!==s||!X_(e.p2,t))}function tM(e,t){if(J_(e,t))return;const i=e.p1.x,n=e.p2.x,r=e.p1.y,s=e.p2.y,a=t.p1.x,o=t.p2.x,c=t.p1.y,l=t.p2.y,h=(i-n)*(c-l)-(r-s)*(a-o);return{x:((i*s-r*n)*(a-o)-(i-n)*(a*l-c*o))/h,y:((i*s-r*n)*(c-l)-(r-s)*(a*l-c*o))/h}}function iM(e,t){return e>=-1&&e<=1&&t>=-1&&t<=1}function nM(e,t){return e>=0&&e<=1&&t>=0&&t<=1}function rM(e,t,i){const n=function(e){let t=[],i=[[0,0],[1,0],[1,1],[0,1]],n=[[1,0],[0,1],[-1,0],[0,-1]];for(let e=0;e<4;++e){let r=i[e],s=n[e];for(let e=0;e<100;++e)t.push([r[0]+s[0]*e/100,r[1]+s[1]*e/100])}return t}().map((n=>i.basicToViewportSafe(n[0],n[1],e,t))),r=[],s=[{x:-1,y:1},{x:1,y:1},{x:1,y:-1},{x:-1,y:-1}],a=[!1,!1,!1,!1];for(let e=0;em[1]&&(m[1]=t),tm[0]&&(m[0]=i),ie.state.alpha<1)),dt());this._bounceSubscription=$e(e,this._navigator.stateService.inTranslation$,this._container.mouseService.active$,this._container.touchService.active$).pipe(ze((e=>e[0]||e[1]||e[2]||e[3])),dt(),zt((e=>e?re():$e(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$.pipe(vt())))),Pt(this._navigator.panService.panImages$)).subscribe((([[e,t],i])=>{if(!t.hasValidScale&&e.camera.focal<.1)return;if(0===e.perspective.aspect||e.perspective.aspect===Number.POSITIVE_INFINITY)return;const n=rM(t,e.perspective,this._viewportCoords),r=this._viewportCoords.viewportToBasic(0,0,t,e.perspective);(r[0]<0||r[0]>1)&&i.length>0&&(n[0]=n[2]=0);for(const[,t]of i){const i=rM(t,e.perspective,this._viewportCoords);for(let e=1;e0?1:-1)*c.angleTo(o),u=(a>0?1:-1)*l.angleTo(o);const p=Math.PI/60;h=this._spatial.clamp(.1*h,-p,p),u=this._spatial.clamp(.1*u,-p,p),this._navigator.stateService.rotateUnbounded({phi:h,theta:u})}))}_disable(){this._bounceSubscription.unsubscribe()}_getConfiguration(){return{}}}class aM{static filteredPairwiseMouseDrag$(e,t){return this._filteredPairwiseMouseDrag$(e,t,t.mouseDragStart$,t.mouseDrag$,t.mouseDragEnd$)}static filteredPairwiseMouseRightDrag$(e,t){return this._filteredPairwiseMouseDrag$(e,t,t.mouseRightDragStart$,t.mouseRightDrag$,t.mouseRightDragEnd$)}static _filteredPairwiseMouseDrag$(e,t,i,n,r){return t.filtered$(e,i).pipe(zt((i=>Je(Ve(Ne(i),t.filtered$(e,n)),t.filtered$(e,r).pipe(ze((()=>null)))).pipe(Ot((e=>!!e)),Lt(null)))),wt(),et((e=>null!=e[0]&&null!=e[1])))}}class oM extends G_{constructor(e,t,i,n,r){super(e,t,i),this._spatial=r,this._viewportCoords=n}_enable(){let e=this._container.mouseService.filtered$(this._component.name,this._container.mouseService.mouseDragStart$).pipe(ze((()=>!0)),It()),t=this._container.mouseService.filtered$(this._component.name,this._container.mouseService.mouseDragEnd$).pipe(ze((()=>!1)),It());this._activeMouseSubscription=Je(e,t).subscribe(this._container.mouseService.activate$);const i=Je(e,t).pipe(zt((e=>e?this._container.mouseService.documentMouseMove$:re())));this._preventDefaultSubscription=Je(i,this._container.touchService.touchMove$).subscribe((e=>{e.preventDefault()}));let n=this._container.touchService.singleTouchDragStart$.pipe(ze((()=>!0))),r=this._container.touchService.singleTouchDragEnd$.pipe(ze((()=>!1)));this._activeTouchSubscription=Je(n,r).subscribe(this._container.touchService.activate$);const s=this._navigator.stateService.currentState$.pipe(ze((e=>Od(e.state.currentImage.cameraType)||e.state.imagesAhead<1)),dt(),zt((e=>{if(!e)return re();const t=aM.filteredPairwiseMouseDrag$(this._component.name,this._container.mouseService),i=Je(this._container.touchService.singleTouchDragStart$,this._container.touchService.singleTouchDrag$,this._container.touchService.singleTouchDragEnd$.pipe(ze((()=>null)))).pipe(ze((e=>null!=e&&e.touches.length>0?e.touches[0]:null)),wt(),et((e=>null!=e[0]&&null!=e[1])));return Je(t,i)})),Pt(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$,this._navigator.panService.panImages$),ze((([e,t,i,n])=>{let r=e[0],s=e[1],a=s.clientX-r.clientX,o=s.clientY-r.clientY,c=this._container.container,[l,h]=this._viewportCoords.canvasPosition(s,c),u=this._viewportCoords.unprojectFromCanvas(l,h,c,t.perspective).sub(t.perspective.position),p=this._viewportCoords.unprojectFromCanvas(l-a,h,c,t.perspective).sub(t.perspective.position),d=this._viewportCoords.unprojectFromCanvas(l,h-o,c,t.perspective).sub(t.perspective.position),g=(a>0?1:-1)*p.angleTo(u),m=(o>0?-1:1)*d.angleTo(u);const f=rM(i,t.perspective,this._viewportCoords);for(const[,e]of n){const i=rM(e,t.perspective,this._viewportCoords);for(let e=0;e0&&m<0&&(m/=Math.max(1,200*f[0])),f[2]>0&&m>0&&(m/=Math.max(1,200*f[2])),f[1]>0&&g<0&&(g/=Math.max(1,200*f[1])),f[3]>0&&g>0&&(g/=Math.max(1,200*f[3])),{phi:g,theta:m}})),It());var a;this._rotateWithoutInertiaSubscription=s.subscribe((e=>{this._navigator.stateService.rotateWithoutInertia(e)})),this._rotateSubscription=s.pipe(Dt(((e,t)=>(this._drainBuffer(e),e.push([Date.now(),t]),e)),[]),(a=Je(this._container.mouseService.filtered$(this._component.name,this._container.mouseService.mouseDragEnd$),this._container.touchService.singleTouchDragEnd$),$((function(e,t){var i=!1,n=null;e.subscribe(new B(t,(function(e){i=!0,n=e}))),a.subscribe(new B(t,(function(){if(i){i=!1;var e=n;n=null,t.next(e)}}),T))}))),ze((e=>{const t=this._drainBuffer(e.slice()),i={phi:0,theta:0};for(const e of t)i.phi+=e[1].phi,i.theta+=e[1].theta;const n=t.length;n>0&&(i.phi/=n,i.theta/=n);const r=Math.PI/18;return i.phi=this._spatial.clamp(i.phi,-r,r),i.theta=this._spatial.clamp(i.theta,-r,r),i}))).subscribe((e=>{this._navigator.stateService.rotate(e)}))}_disable(){this._activeMouseSubscription.unsubscribe(),this._activeTouchSubscription.unsubscribe(),this._preventDefaultSubscription.unsubscribe(),this._rotateSubscription.unsubscribe(),this._rotateWithoutInertiaSubscription.unsubscribe(),this._activeMouseSubscription=null,this._activeTouchSubscription=null,this._preventDefaultSubscription=null,this._rotateSubscription=null}_getConfiguration(e){return{dragPan:e}}_drainBuffer(e){const t=Date.now();for(;e.length>0&&t-e[0][0]>50;)e.shift();return e}}class cM extends G_{constructor(e,t,i,n,r){super(e,t,i),this._spatial=r,this._viewportCoords=n,this._subscriptions=new a_}_enable(){const e=this._navigator.stateService.state$.pipe(ze((e=>e===O_.Earth)),St(1),F()),t=this._subscriptions;t.push(e.pipe(zt((e=>e?this._container.mouseService.mouseWheel$:re()))).subscribe((e=>{e.preventDefault()}))),t.push(e.pipe(zt((e=>e?aM.filteredPairwiseMouseDrag$(this._component.name,this._container.mouseService).pipe(et((([e,t])=>!(e.ctrlKey&&t.ctrlKey)))):re())),Pt(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$),ze((([[e,t],i,n])=>{const r=[0,0,1],s=[0,0,-2],a=this._planeIntersection(t,r,s,i.perspective,this._container.container),o=this._planeIntersection(e,r,s,i.perspective,this._container.container);return a&&o?(new ts).subVectors(a,o).multiplyScalar(-1).toArray():null})),et((e=>!!e))).subscribe((e=>{this._navigator.stateService.truck(e)}))),t.push(e.pipe(zt((e=>e?aM.filteredPairwiseMouseDrag$(this._component.name,this._container.mouseService).pipe(et((([e,t])=>e.ctrlKey&&t.ctrlKey))):re())),ze((([e,t])=>this._mousePairToRotation(e,t)))).subscribe((e=>{this._navigator.stateService.orbit(e)}))),t.push(e.pipe(zt((e=>e?aM.filteredPairwiseMouseRightDrag$(this._component.name,this._container.mouseService).pipe(et((([e,t])=>!e.ctrlKey&&!t.ctrlKey))):re())),ze((([e,t])=>this._mousePairToRotation(e,t)))).subscribe((e=>{this._navigator.stateService.orbit(e)}))),t.push(e.pipe(zt((e=>e?this._container.mouseService.filteredWheel$(this._component.name,this._container.mouseService.mouseWheel$):re())),ze((e=>{let t=e.deltaY;return 1===e.deltaMode?t*=40:2===e.deltaMode&&(t*=800),-t/this._viewportCoords.containerToCanvas(this._container.container)[1]}))).subscribe((e=>{this._navigator.stateService.dolly(e)})))}_disable(){this._subscriptions.unsubscribe()}_getConfiguration(){return{}}_eventToViewport(e,t){const i=this._viewportCoords.canvasPosition(e,t);return this._viewportCoords.canvasToViewport(i[0],i[1],t)}_mousePairToRotation(e,t){const[i,n]=this._eventToViewport(t,this._container.container),[r,s]=this._eventToViewport(e,this._container.container);return{phi:(r-i)*Math.PI,theta:(n-s)*Math.PI/2}}_planeIntersection(e,t,i,n,r){const[s,a]=this._viewportCoords.canvasPosition(e,r),o=this._viewportCoords.unprojectFromCanvas(s,a,r,n).sub(n.position).normalize();if(Math.abs(this._spatial.angleToPlane(o.toArray(),t))0?null:p}}class lM extends G_{constructor(e,t,i,n){super(e,t,i),this._viewportCoords=n}_enable(){this._container.mouseService.claimWheel(this._component.name,0),this._preventDefaultSubscription=this._container.mouseService.mouseWheel$.subscribe((e=>{e.preventDefault()})),this._zoomSubscription=this._container.mouseService.filteredWheel$(this._component.name,this._container.mouseService.mouseWheel$).pipe(Pt(this._navigator.stateService.currentState$,((e,t)=>[e,t])),et((e=>{let t=e[1].state;return Od(t.currentImage.cameraType)||t.imagesAhead<1})),ze((e=>e[0])),Pt(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$,((e,t,i)=>[e,t,i]))).subscribe((e=>{let t=e[0],i=e[1],n=e[2],r=this._container.container,[s,a]=this._viewportCoords.canvasPosition(t,r),o=this._viewportCoords.unprojectFromCanvas(s,a,r,i.perspective),c=n.projectBasic(o.toArray()),l=t.deltaY;1===t.deltaMode?l*=40:2===t.deltaMode&&(l*=800);let h=-3*l/this._viewportCoords.containerToCanvas(r)[1];this._navigator.stateService.zoomIn(h,c)}))}_disable(){this._container.mouseService.unclaimWheel(this._component.name),this._preventDefaultSubscription.unsubscribe(),this._zoomSubscription.unsubscribe(),this._preventDefaultSubscription=null,this._zoomSubscription=null}_getConfiguration(e){return{scrollZoom:e}}}class hM extends G_{constructor(e,t,i,n){super(e,t,i),this._viewportCoords=n}_enable(){this._preventDefaultSubscription=this._container.touchService.pinch$.subscribe((e=>{e.originalEvent.preventDefault()}));let e=this._container.touchService.pinchStart$.pipe(ze((e=>!0))),t=this._container.touchService.pinchEnd$.pipe(ze((e=>!1)));this._activeSubscription=Je(e,t).subscribe(this._container.touchService.activate$),this._zoomSubscription=this._container.touchService.pinch$.pipe(Pt(this._navigator.stateService.currentState$),et((e=>{let t=e[1].state;return Od(t.currentImage.cameraType)||t.imagesAhead<1})),ze((e=>e[0])),Pt(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$)).subscribe((([e,t,i])=>{let n=this._container.container,[r,s]=this._viewportCoords.canvasPosition(e,n),a=this._viewportCoords.unprojectFromCanvas(r,s,n,t.perspective),o=i.projectBasic(a.toArray());const[c,l]=this._viewportCoords.containerToCanvas(n);let h=3*e.distanceChange/Math.min(c,l);this._navigator.stateService.zoomIn(h,o)}))}_disable(){this._activeSubscription.unsubscribe(),this._preventDefaultSubscription.unsubscribe(),this._zoomSubscription.unsubscribe(),this._preventDefaultSubscription=null,this._zoomSubscription=null}_getConfiguration(e){return{touchZoom:e}}}class uM extends o_{constructor(e,t,i){super(e,t,i);const n=new zd,r=new h_;this._bounceHandler=new sM(this,t,i,r,n),this._dragPanHandler=new oM(this,t,i,r,n),this._earthControlHandler=new cM(this,t,i,r,n),this._scrollZoomHandler=new lM(this,t,i,r),this._touchZoomHandler=new hM(this,t,i,r)}get dragPan(){return this._dragPanHandler}get earthControl(){return this._earthControlHandler}get scrollZoom(){return this._scrollZoomHandler}get touchZoom(){return this._touchZoomHandler}_activate(){this._bounceHandler.enable(),this._subscriptions.push(this._configuration$.subscribe((e=>{e.dragPan?this._dragPanHandler.enable():this._dragPanHandler.disable(),e.earthControl?this._earthControlHandler.enable():this._earthControlHandler.disable(),e.scrollZoom?this._scrollZoomHandler.enable():this._scrollZoomHandler.disable(),e.touchZoom?this._touchZoomHandler.enable():this._touchZoomHandler.disable()}))),this._container.mouseService.claimMouse(this._name,0)}_deactivate(){this._container.mouseService.unclaimMouse(this._name),this._subscriptions.unsubscribe(),this._bounceHandler.disable(),this._dragPanHandler.disable(),this._earthControlHandler.disable(),this._scrollZoomHandler.disable(),this._touchZoomHandler.disable()}_getDefaultConfiguration(){return{dragPan:!0,earthControl:!0,scrollZoom:!0,touchZoom:!0}}}uM.componentName="pointer";class pM{constructor(e){this._document=e||document}get document(){return this._document}createElement(e,t,i){const n=this._document.createElement(e);return t&&(n.className=t),i&&i.appendChild(n),n}}class dM extends o_{constructor(e,t,i,n){super(e,t,i),this._dom=n||new pM,this._popups=[],this._added$=new V,this._popups$=new V}add(e){for(const t of e)-1===this._popups.indexOf(t)&&(this._popups.push(t),this._activated&&t.setParentContainer(this._popupContainer));this._added$.next(e),this._popups$.next(this._popups)}getAll(){return this._popups.slice()}remove(e){for(const t of e)this._remove(t);this._popups$.next(this._popups)}removeAll(){for(const e of this._popups.slice())this._remove(e);this._popups$.next(this._popups)}_activate(){this._popupContainer=this._dom.createElement("div","mapillary-popup-container",this._container.container);for(const e of this._popups)e.setParentContainer(this._popupContainer);const e=this._subscriptions;e.push($e(this._container.renderService.renderCamera$,this._container.renderService.size$,this._navigator.stateService.currentTransform$).subscribe((([e,t,i])=>{for(const n of this._popups)n.update(e,t,i)})));const t=this._popups$.pipe(Lt(this._popups),zt((e=>_e(e).pipe(Ge((e=>e.changed$))))),ze((e=>[e])));e.push(Je(this._added$,t).pipe(Pt(this._container.renderService.renderCamera$,this._container.renderService.size$,this._navigator.stateService.currentTransform$)).subscribe((([e,t,i,n])=>{for(const r of e)r.update(t,i,n)})))}_deactivate(){this._subscriptions.unsubscribe();for(const e of this._popups)e.remove();this._container.container.removeChild(this._popupContainer),delete this._popupContainer}_getDefaultConfiguration(){return{}}_remove(e){const t=this._popups.indexOf(e);if(-1===t)return;const i=this._popups.splice(t,1)[0];this._activated&&i.remove()}}dM.componentName="popup",function(e){e[e.Sequence=0]="Sequence",e[e.Spatial=1]="Spatial"}(k_||(k_={})),function(e){e[e.Default=0]="Default",e[e.Playback=1]="Playback",e[e.Timeline=2]="Timeline"}(P_||(P_={}));class gM{constructor(e){this._container=e,this._minThresholdWidth=320,this._maxThresholdWidth=1480,this._minThresholdHeight=240,this._maxThresholdHeight=820,this._stepperDefaultWidth=108,this._controlsDefaultWidth=88,this._defaultHeight=30,this._expandControls=!1,this._mode=P_.Default,this._speed=.5,this._changingSpeed=!1,this._index=null,this._changingPosition=!1,this._mouseEnterDirection$=new V,this._mouseLeaveDirection$=new V,this._notifyChanged$=new V,this._notifyChangingPositionChanged$=new V,this._notifySpeedChanged$=new V,this._notifyIndexChanged$=new V}get changed$(){return this._notifyChanged$}get changingPositionChanged$(){return this._notifyChangingPositionChanged$}get speed$(){return this._notifySpeedChanged$}get index$(){return this._notifyIndexChanged$}get mouseEnterDirection$(){return this._mouseEnterDirection$}get mouseLeaveDirection$(){return this._mouseLeaveDirection$}activate(){this._changingSubscription||(this._changingSubscription=Je(this._container.mouseService.documentMouseUp$,this._container.touchService.touchEnd$.pipe(et((e=>0===e.touches.length)))).subscribe((()=>{this._changingSpeed&&(this._changingSpeed=!1),this._changingPosition&&this._setChangingPosition(!1)})))}deactivate(){this._changingSubscription&&(this._changingSpeed=!1,this._changingPosition=!1,this._expandControls=!1,this._mode=P_.Default,this._changingSubscription.unsubscribe(),this._changingSubscription=null)}render(e,t,i,n,r,s,a,o,c){if(!1===t.visible)return r_.h("div.mapillary-sequence-container",{},[]);const l=this._createStepper(e,t,a,i,o,c),h=this._createSequenceControls(i),u=this._createPlaybackControls(i,n,o,t),p=this._createTimelineControls(i,r,s);return r_.h("div.mapillary-sequence-container",[l,h,u,p])}getContainerWidth(e,t){let i=t.minWidth,n=t.maxWidth;n{this._index=Number(e.target.value),this._notifyIndexChanged$.next(this._index)},n=this._container.domContainer.getBoundingClientRect(),r=e=>{e.stopPropagation(),this._setChangingPosition(!0)},s=e=>{!0===this._changingPosition&&e.stopPropagation()},a={max:null!=t?t:1,min:0,onchange:i,oninput:i,onkeydown:e=>{"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key&&"ArrowUp"!==e.key||e.preventDefault()},onpointerdown:r,onpointermove:s,ontouchmove:s,ontouchstart:r,style:{width:Math.max(276,Math.min(410,5+.8*n.width))-65+"px"},type:"range",value:null!=e?e:0},o=null==e||null==t||t<=1;o&&(a.disabled="true");const c=r_.h("input.mapillary-sequence-position",a,[]),l=o?".mapillary-sequence-position-container-inactive":".mapillary-sequence-position-container";return r_.h("div"+l,[c])}_createSpeedInput(e){this._speed=e;const t=e=>{this._speed=Number(e.target.value)/1e3,this._notifySpeedChanged$.next(this._speed)},i=this._container.domContainer.getBoundingClientRect(),n=Math.max(276,Math.min(410,5+.8*i.width))-160,r=e=>{this._changingSpeed=!0,e.stopPropagation()},s=e=>{!0===this._changingSpeed&&e.stopPropagation()},a=r_.h("input.mapillary-sequence-speed",{max:1e3,min:0,onchange:t,oninput:t,onkeydown:e=>{"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key&&"ArrowUp"!==e.key||e.preventDefault()},onpointerdown:r,onpointermove:s,ontouchmove:s,ontouchstart:r,style:{width:`${n}px`},type:"range",value:1e3*e},[]);return r_.h("div.mapillary-sequence-speed-container",[a])}_createPlaybackControls(e,t,i,n){if(this._mode!==P_.Playback)return r_.h("div.mapillary-sequence-playback",[]);const r=r_.h("div.mapillary-sequence-switch-icon.mapillary-sequence-icon-visible",[]),s=n.direction===Id.Next?Id.Prev:Id.Next,a=n.playing,o={onclick:()=>{a||i.configure({direction:s})}},c=n.playing?".mapillary-sequence-switch-button-inactive":".mapillary-sequence-switch-button",l=r_.h("div"+c,o,[r]),h=r_.h("div.mapillary-sequence-slow-icon.mapillary-sequence-icon-visible",[]),u=r_.h("div.mapillary-sequence-slow-container",[h]),p=r_.h("div.mapillary-sequence-fast-icon.mapillary-sequence-icon-visible",[]),d=r_.h("div.mapillary-sequence-fast-container",[p]),g=r_.h("div.mapillary-sequence-close-icon.mapillary-sequence-icon-visible",[]),m={onclick:()=>{this._mode=P_.Default,this._notifyChanged$.next(this)}},f=r_.h("div.mapillary-sequence-close-button",m,[g]),_=[l,u,this._createSpeedInput(t),d,f],M={style:{top:`${Math.round(e/this._stepperDefaultWidth*this._defaultHeight+10)}px`}};return r_.h("div.mapillary-sequence-playback",M,_)}_createPlayingButton(e,t,i,n,r){let s=n.direction===Id.Next&&null!=e||n.direction===Id.Prev&&null!=t;s=s&&i;let a={onclick:n.playing?()=>{r.stop()}:s?()=>{r.play()}:null},o={};n.direction===Id.Prev&&(o.style={transform:"rotate(180deg) translate(50%, 50%)"});let c=r_.h("div.mapillary-sequence-icon",o,[]),l=n.playing?"mapillary-sequence-stop":s?"mapillary-sequence-play":"mapillary-sequence-play-inactive";return r_.h("div."+l,a,[c])}_createSequenceControls(e){const t=Math.round(8/this._stepperDefaultWidth*e),i={onclick:()=>{this._expandControls=!this._expandControls,this._mode=P_.Default,this._notifyChanged$.next(this)},style:{"border-bottom-right-radius":`${t}px`,"border-top-right-radius":`${t}px`}},n=r_.h("div.mapillary-sequence-expander-bar",[]),r=r_.h("div.mapillary-sequence-expander-button",i,[n]),s=this._mode===P_.Playback?".mapillary-sequence-fast-icon-gray.mapillary-sequence-icon-visible":".mapillary-sequence-fast-icon",a=r_.h("div"+s,[]),o={onclick:()=>{this._mode=this._mode===P_.Playback?P_.Default:P_.Playback,this._notifyChanged$.next(this)}},c=r_.h("div.mapillary-sequence-playback-button",o,[a]),l=this._mode===P_.Timeline?".mapillary-sequence-timeline-icon-gray.mapillary-sequence-icon-visible":".mapillary-sequence-timeline-icon",h=r_.h("div"+l,[]),u={onclick:()=>{this._mode=this._mode===P_.Timeline?P_.Default:P_.Timeline,this._notifyChanged$.next(this)}},p=r_.h("div.mapillary-sequence-timeline-button",u,[h]),d={style:{height:this._defaultHeight/this._stepperDefaultWidth*e+"px",transform:`translate(${e/2+2}px, 0)`,width:this._controlsDefaultWidth/this._stepperDefaultWidth*e+"px"}},g=".mapillary-sequence-controls"+(this._expandControls?".mapillary-sequence-controls-expanded":"");return r_.h("div"+g,d,[c,p,r])}_createSequenceArrows(e,t,i,n,r){let s={onclick:null!=e?()=>{r.moveDir$(Id.Next).subscribe(void 0,(e=>{e instanceof d_||console.error(e)}))}:null,onpointerenter:()=>{this._mouseEnterDirection$.next(Id.Next)},onpointerleave:()=>{this._mouseLeaveDirection$.next(Id.Next)}};const a=Math.round(8/this._stepperDefaultWidth*i);let o={onclick:null!=t?()=>{r.moveDir$(Id.Prev).subscribe(void 0,(e=>{e instanceof d_||console.error(e)}))}:null,onpointerenter:()=>{this._mouseEnterDirection$.next(Id.Prev)},onpointerleave:()=>{this._mouseLeaveDirection$.next(Id.Prev)},style:{"border-bottom-left-radius":`${a}px`,"border-top-left-radius":`${a}px`}},c=this._getStepClassName(Id.Next,e,n.highlightId),l=this._getStepClassName(Id.Prev,t,n.highlightId),h=r_.h("div.mapillary-sequence-icon",[]),u=r_.h("div.mapillary-sequence-icon",[]);return[r_.h("div."+l,o,[u]),r_.h("div."+c,s,[h])]}_createStepper(e,t,i,n,r,s){let a=null,o=null;for(let t of e.edges)t.data.direction===Id.Next&&(a=t.target),t.data.direction===Id.Prev&&(o=t.target);const c=this._createPlayingButton(a,o,i,t,r),l=this._createSequenceArrows(a,o,n,t,s);l.splice(1,0,c);const h={oncontextmenu:e=>{e.preventDefault()},style:{height:this._defaultHeight/this._stepperDefaultWidth*n+"px",width:n+"px"}};return r_.h("div.mapillary-sequence-stepper",h,l)}_createTimelineControls(e,t,i){if(this._mode!==P_.Timeline)return r_.h("div.mapillary-sequence-timeline",[]);const n=this._createPositionInput(t,i),r=r_.h("div.mapillary-sequence-close-icon.mapillary-sequence-icon-visible",[]),s={onclick:()=>{this._mode=P_.Default,this._notifyChanged$.next(this)}},a=r_.h("div.mapillary-sequence-close-button",s,[r]),o={style:{top:`${Math.round(e/this._stepperDefaultWidth*this._defaultHeight+10)}px`}};return r_.h("div.mapillary-sequence-timeline",o,[n,a])}_getStepClassName(e,t,i){let n=e===Id.Next?"mapillary-sequence-step-next":"mapillary-sequence-step-prev";return null==t?n+="-inactive":i===t&&(n+="-highlight"),n}_setChangingPosition(e){this._changingPosition=e,this._notifyChangingPositionChanged$.next(e)}}class mM extends o_{constructor(e,t,i,n,r){super(e,t,i),this._sequenceDOMRenderer=n||new gM(t),this._scheduler=r,this._containerWidth$=new V,this._hoveredIdSubject$=new V,this._hoveredId$=this._hoveredIdSubject$.pipe(It()),this._navigator.playService.playing$.pipe(At(1),Pt(this._configuration$)).subscribe((([e,t])=>{const i="playing",n={playing:e,target:this,type:i};this.fire(i,n),e!==t.playing&&(e?this.play():this.stop())})),this._navigator.playService.direction$.pipe(At(1),Pt(this._configuration$)).subscribe((([e,t])=>{e!==t.direction&&this.configure({direction:e})}))}fire(e,t){super.fire(e,t)}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}play(){this.configure({playing:!0})}stop(){this.configure({playing:!1})}_activate(){this._sequenceDOMRenderer.activate();const e=this._navigator.stateService.currentImage$.pipe(zt((e=>e.sequenceEdges$)),St(1),F()),t=this._navigator.stateService.currentImage$.pipe(dt(void 0,(e=>e.sequenceId)),zt((e=>Ve(Ne(null),this._navigator.graphService.cacheSequence$(e.sequenceId).pipe(Nt(3),rt((e=>(console.error("Failed to cache sequence",e),Ne(null)))))))),Lt(null),St(1),F()),i=this._subscriptions;i.push(t.subscribe());const n=this._sequenceDOMRenderer.index$.pipe(Pt(t),ze((([e,t])=>null!=t?t.imageIds[e]:null)),et((e=>!!e)),dt(),Tt(),F());i.push(Je(n.pipe(ht(100,this._scheduler)),n.pipe(it(400,this._scheduler))).pipe(dt(),zt((e=>this._navigator.moveTo$(e).pipe(rt((()=>re())))))).subscribe()),i.push(this._sequenceDOMRenderer.changingPositionChanged$.pipe(et((e=>e))).subscribe((()=>{this._navigator.graphService.setGraphMode(k_.Sequence)}))),i.push(this._sequenceDOMRenderer.changingPositionChanged$.pipe(et((e=>!e))).subscribe((()=>{this._navigator.graphService.setGraphMode(k_.Spatial)}))),this._navigator.graphService.graphMode$.pipe(zt((e=>e===k_.Spatial?this._navigator.stateService.currentImage$.pipe(pt(2)):re())),et((e=>!e.spatialEdges.cached)),zt((e=>this._navigator.graphService.cacheImage$(e.id).pipe(rt((()=>re())))))).subscribe(),i.push(this._sequenceDOMRenderer.changingPositionChanged$.pipe(et((e=>e))).subscribe((()=>{this._navigator.playService.stop()}))),i.push($e(this._navigator.graphService.graphMode$,this._sequenceDOMRenderer.changingPositionChanged$.pipe(Lt(!1),dt())).pipe(Pt(this._navigator.stateService.currentImage$),zt((([[e,t],i])=>t&&e===k_.Sequence?this._navigator.graphService.cacheSequenceImages$(i.sequenceId,i.id).pipe(Nt(3),rt((e=>(console.error("Failed to cache sequence images.",e),re())))):re()))).subscribe());const r=t.pipe(zt((e=>{if(!e)return Ne({index:null,max:null});let t=!0;return this._sequenceDOMRenderer.changingPositionChanged$.pipe(Lt(!1),dt(),zt((e=>{const i=!e&&t?0:1;return t=!1,e?n:this._navigator.stateService.currentImage$.pipe(ze((e=>e.id)),dt(),At(i))})),ze((t=>{const i=e.imageIds.indexOf(t);return-1===i?{index:null,max:null}:{index:i,max:e.imageIds.length-1}})))}))),s=this._navigator.stateService.state$.pipe(ze((e=>e===O_.Earth)),dt());i.push($e(e,this._configuration$,this._containerWidth$,this._sequenceDOMRenderer.changed$.pipe(Lt(this._sequenceDOMRenderer)),this._navigator.playService.speed$,r,s).pipe(ze((([e,t,i,,n,r,s])=>{const a=this._sequenceDOMRenderer.render(e,t,i,n,r.index,r.max,!s,this,this._navigator);return{name:this._name,vNode:a}}))).subscribe(this._container.domRenderer.render$)),i.push(this._sequenceDOMRenderer.speed$.subscribe((e=>{this._navigator.playService.setSpeed(e)}))),i.push(this._configuration$.pipe(ze((e=>e.direction)),dt()).subscribe((e=>{this._navigator.playService.setDirection(e)}))),i.push($e(this._container.renderService.size$,this._configuration$.pipe(dt(((e,t)=>e[0]===t[0]&&e[1]===t[1]),(e=>[e.minWidth,e.maxWidth])))).pipe(ze((([e,t])=>this._sequenceDOMRenderer.getContainerWidth(e,t)))).subscribe(this._containerWidth$)),i.push(this._configuration$.pipe(ze((e=>e.playing)),dt()).subscribe((e=>{e?this._navigator.playService.play():this._navigator.playService.stop()}))),i.push(this._sequenceDOMRenderer.mouseEnterDirection$.pipe(zt((t=>Ve(e.pipe(ze((e=>{for(let i of e.edges)if(i.data.direction===t)return i.target;return null})),jt(this._sequenceDOMRenderer.mouseLeaveDirection$)),Ne(null)))),dt()).subscribe(this._hoveredIdSubject$)),i.push(this._hoveredId$.subscribe((e=>{const t="hover",i={id:e,target:this,type:t};this.fire(t,i)})))}_deactivate(){this._subscriptions.unsubscribe(),this._sequenceDOMRenderer.deactivate()}_getDefaultConfiguration(){return{direction:Id.Next,maxWidth:108,minWidth:70,playing:!1,visible:!0}}}mM.componentName="sequence",function(e){e[e.Motion=0]="Motion",e[e.Stationary=1]="Stationary"}(R_||(R_={}));class fM{constructor(e,t,i,n,r,s,a,o,c,l){this._orientation=this._getValue(e,1);let h=null!=a?a.width:4,u=null!=a?a.height:3,p=this._orientation<5;this._width=this._getValue(t,p?h:u),this._height=this._getValue(i,p?u:h),this._basicAspect=p?this._width/this._height:this._height/this._width,this._basicWidth=p?t:i,this._basicHeight=p?i:t;const d=this._getCameraParameters(c,l),g=d[0],m=d[1],f=d[2];this._focal=this._getValue(g,1),this._scale=this._getValue(n,0),this._worldToCamera=this.createWorldToCamera(r,s),this._worldToCameraInverse=(new Ls).copy(this._worldToCamera).invert(),this._scaledWorldToCamera=this._createScaledWorldToCamera(this._worldToCamera,this._scale),this._scaledWorldToCameraInverse=(new Ls).copy(this._scaledWorldToCamera).invert(),this._basicWorldToCamera=this._createBasicWorldToCamera(this._worldToCamera,e),this._textureScale=o||[1,1],this._ck1=m||0,this._ck2=f||0,this._cameraType=l||"perspective",this._radialPeak=this._getRadialPeak(this._ck1,this._ck2)}get ck1(){return this._ck1}get ck2(){return this._ck2}get cameraType(){return this._cameraType}get basicAspect(){return this._basicAspect}get basicHeight(){return this._basicHeight}get basicRt(){return this._basicWorldToCamera}get basicWidth(){return this._basicWidth}get focal(){return this._focal}get height(){return this._height}get orientation(){return this._orientation}get rt(){return this._worldToCamera}get srt(){return this._scaledWorldToCamera}get srtInverse(){return this._scaledWorldToCameraInverse}get scale(){return this._scale}get hasValidScale(){return this._scale>.01&&this._scale<50}get radialPeak(){return this._radialPeak}get width(){return this._width}upVector(){let e=this._worldToCamera.elements;switch(this._orientation){case 1:default:return new ts(-e[1],-e[5],-e[9]);case 3:return new ts(e[1],e[5],e[9]);case 6:return new ts(-e[0],-e[4],-e[8]);case 8:return new ts(e[0],e[4],e[8])}}projectorMatrix(){let e=this._normalizedToTextureMatrix(),t=this._focal,i=(new Ls).set(t,0,0,0,0,t,0,0,0,0,0,0,0,0,1,0);return e.multiply(i),e.multiply(this._worldToCamera),e}projectBasic(e){let t=this.projectSfM(e);return this._sfmToBasic(t)}unprojectBasic(e,t,i){let n=this._basicToSfm(e);return this.unprojectSfM(n,t,i)}projectSfM(e){let t=new Xr(e[0],e[1],e[2],1);return t.applyMatrix4(this._worldToCamera),this._bearingToSfm([t.x,t.y,t.z])}unprojectSfM(e,t,i){const n=this._sfmToBearing(e),r=(i&&!Od(this._cameraType)?new Xr(t*n[0]/n[2],t*n[1]/n[2],t,1):new Xr(t*n[0],t*n[1],t*n[2],1)).applyMatrix4(this._worldToCameraInverse);return[r.x/r.w,r.y/r.w,r.z/r.w]}_sfmToBearing(e){if(Od(this._cameraType)){let t=2*e[0]*Math.PI,i=2*-e[1]*Math.PI;return[Math.cos(i)*Math.sin(t),-Math.sin(i),Math.cos(i)*Math.cos(t)]}if(kd(this._cameraType)){let[t,i]=[e[0]/this._focal,e[1]/this._focal];const n=Math.sqrt(t*t+i*i);let r=n/this._distortionFromDistortedRadius(n,this._ck1,this._ck2,this._radialPeak),s=Math.cos(r),a=Math.sin(r);const o=n>1e-8?1/n:1;return[a*t*o,a*i*o,s]}{let[t,i]=[e[0]/this._focal,e[1]/this._focal];const n=Math.sqrt(t*t+i*i);let r=this._distortionFromDistortedRadius(n,this._ck1,this._ck2,this._radialPeak),s=new ts(t/r,i/r,1);return s.normalize(),[s.x,s.y,s.z]}}_distortionFromDistortedRadius(e,t,i,n){let r=1;for(let s=0;s<10;s++){let s=e/r;s>n&&(s=n),r=1+t*Math.pow(s,2)+i*Math.pow(s,4)}return r}_bearingToSfm(e){if(Od(this._cameraType)){let t=e[0],i=e[1],n=e[2],r=Math.atan2(t,n),s=Math.atan2(-i,Math.sqrt(t*t+n*n));return[r/(2*Math.PI),-s/(2*Math.PI)]}if(kd(this._cameraType)){if(e[2]>0){const[t,i,n]=e,r=Math.sqrt(t*t+i*i);let s=Math.atan2(r,n);s>this._radialPeak&&(s=this._radialPeak);const a=1+Math.pow(s,2)*(this._ck1+Math.pow(s,2)*this._ck2),o=this._focal*a*s/r;return[o*t,o*i]}return[e[0]<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,e[1]<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY]}if(e[2]>0){let[t,i]=[e[0]/e[2],e[1]/e[2]],n=t*t+i*i;const r=Math.pow(this._radialPeak,2);n>r&&(n=r);const s=1+this._ck1*n+this._ck2*Math.pow(n,2);return[this._focal*s*t,this._focal*s*i]}return[e[0]<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,e[1]<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY]}_basicToSfm(e){let t,i;switch(this._orientation){case 1:default:t=e[0],i=e[1];break;case 3:t=1-e[0],i=1-e[1];break;case 6:t=e[1],i=1-e[0];break;case 8:t=1-e[1],i=e[0]}let n=this._width,r=this._height,s=Math.max(n,r);return[t*n/s-n/s/2,i*r/s-r/s/2]}_sfmToBasic(e){let t,i,n=this._width,r=this._height,s=Math.max(n,r),a=(e[0]+n/s/2)/n*s,o=(e[1]+r/s/2)/r*s;switch(this._orientation){case 1:default:t=a,i=o;break;case 3:t=1-a,i=1-o;break;case 6:t=1-o,i=a;break;case 8:t=o,i=1-a}return[t,i]}_getValue(e,t){return null!=e&&e>0?e:t}_getCameraParameters(e,t){if(Od(t))return[];if(!e||0===e.length)return[1,0,0];const i=3-e.length;return i<=0?e:e.concat(new Array(i).fill(0))}createWorldToCamera(e,t){const i=new ts(e[0],e[1],e[2]),n=i.length();n>0&&i.normalize();const r=new Ls;return r.makeRotationAxis(i,n),r.setPosition(new ts(t[0],t[1],t[2])),r}_createScaledWorldToCamera(e,t){const i=e.clone(),n=i.elements;return n[12]=t*n[12],n[13]=t*n[13],n[14]=t*n[14],i.scale(new ts(t,t,t)),i}_createBasicWorldToCamera(e,t){const i=new ts(0,0,1);let n=0;switch(t){case 3:n=Math.PI;break;case 6:n=Math.PI/2;break;case 8:n=3*Math.PI/2}return(new Ls).makeRotationAxis(i,n).multiply(e)}_getRadialPeak(e,t){const i=5*t,n=3*e,r=Math.pow(n,2)-4*i*1;if(r<0)return;const s=(-n-Math.sqrt(r))/2/i,a=(-n+Math.sqrt(r))/2/i,o=Math.min(s,a),c=Math.max(s,a);return o>0?Math.sqrt(o):c>0?Math.sqrt(c):void 0}_normalizedToTextureMatrix(){const e=Math.max(this._width,this._height),t=this._orientation<5?this._textureScale[0]:this._textureScale[1],i=this._orientation<5?this._textureScale[1]:this._textureScale[0],n=e/this._width*t,r=e/this._height*i;switch(this._orientation){case 1:default:return(new Ls).set(n,0,0,.5,0,-r,0,.5,0,0,1,0,0,0,0,1);case 3:return(new Ls).set(-n,0,0,.5,0,r,0,.5,0,0,1,0,0,0,0,1);case 6:return(new Ls).set(0,-r,0,.5,-n,0,0,.5,0,0,1,0,0,0,0,1);case 8:return(new Ls).set(0,r,0,.5,n,0,0,.5,0,0,1,0,0,0,0,1)}}}class _M{constructor(){this._factory=new M_,this._scene=new v_,this._spatial=new zd,this._currentKey=null,this._previousKey=null,this._disabled=!1,this._curtain=1,this._frameId=0,this._needsRender=!1,this._mode=null,this._currentProviderDisposers={},this._previousProviderDisposers={}}get disabled(){return this._disabled}get frameId(){return this._frameId}get needsRender(){return this._needsRender}setTextureProvider(e,t){this._setTextureProvider(e,this._currentKey,t,this._currentProviderDisposers,this._updateTexture.bind(this))}setTextureProviderPrev(e,t){this._setTextureProvider(e,this._previousKey,t,this._previousProviderDisposers,this._updateTexturePrev.bind(this))}update(e,t){this._updateFrameId(e.id),this._updateImagePlanes(e.state,t)}updateCurtain(e){this._curtain!==e&&(this._curtain=e,this._updateCurtain(),this._needsRender=!0)}updateTexture(e,t){const i=t.id===this._currentKey?this._scene.planes:t.id===this._previousKey?this._scene.planesOld:{};if(0!==Object.keys(i).length){this._needsRender=!0;for(const t in i){if(!i.hasOwnProperty(t))continue;let n=i[t].material.uniforms.projectorTex.value;n.image=e,n.needsUpdate=!0}}}updateTextureImage(e,t){if(this._currentKey!==t.id)return;this._needsRender=!0;const i=this._scene.planes;for(const t in i){if(!i.hasOwnProperty(t))continue;let n=i[t].material.uniforms.projectorTex.value;n.image=e,n.needsUpdate=!0}}render(e,t){this.disabled||t.render(this._scene.sceneOld,e),t.render(this._scene.scene,e),this._needsRender=!1}dispose(){this._scene.clear();for(const e in this._currentProviderDisposers)this._currentProviderDisposers.hasOwnProperty(e)&&this._currentProviderDisposers[e]();for(const e in this._previousProviderDisposers)this._previousProviderDisposers.hasOwnProperty(e)&&this._previousProviderDisposers[e]();this._currentProviderDisposers={},this._previousProviderDisposers={}}_getBasicCorners(e,t){let i,n;return e>t?(i=.5,n=.5*e/t):(i=.5*t/e,n=.5),[[.5-i,.5-n],[.5+i,.5+n]]}_setDisabled(e){this._disabled=null==e.currentImage||null==e.previousImage||Od(e.currentImage.cameraType)&&!Od(e.previousImage.cameraType)}_setTextureProvider(e,t,i,n,r){if(e!==t)return;let s=i.textureCreated$.subscribe(r),a=i.textureUpdated$.subscribe((e=>{this._needsRender=!0}));e in n&&((0,n[e])(),delete n[e]),n[e]=()=>{s.unsubscribe(),a.unsubscribe(),i.dispose()}}_updateCurtain(){const e=this._scene.planes;for(const t in e){if(!e.hasOwnProperty(t))continue;let i=e[t].material;i.uniforms.curtain&&(i.uniforms.curtain.value=this._curtain)}}_updateFrameId(e){this._frameId=e}_updateImagePlanes(e,t){const i=null!=e.currentImage&&this._currentKey!==e.currentImage.id,n=null!=e.previousImage&&this._previousKey!==e.previousImage.id,r=this._mode!==t;if(!(i||n||r))return;this._setDisabled(e),this._needsRender=!0,this._mode=t;const s=e.motionless||t===R_.Stationary||Od(e.currentImage.cameraType);if((this.disabled||n)&&this._previousKey in this._previousProviderDisposers&&(this._previousProviderDisposers[this._previousKey](),delete this._previousProviderDisposers[this._previousKey]),this.disabled)this._scene.setImagePlanesOld({});else if(n||r){const t=e.previousImage;this._previousKey=t.id;const i=e.currentTransform.rt.elements;let n=[i[12],i[13],i[14]];const r=e.currentTransform.basicAspect,a=e.previousTransform.basicAspect,o=r>a?[1,a/r]:[r/a,1];let c=e.currentImage.rotation,l=e.currentImage.width,h=e.currentImage.height;Od(t.cameraType)&&(c=e.previousImage.rotation,n=this._spatial.rotate(this._spatial.opticalCenter(e.currentImage.rotation,n).toArray(),c).multiplyScalar(-1).toArray(),l=e.previousImage.width,h=e.previousImage.height);const u=new fM(e.currentImage.exifOrientation,l,h,e.currentImage.scale,c,n,t.image,o,e.currentImage.cameraParameters,e.currentImage.cameraType);let p;if(Od(t.cameraType))p=this._factory.createMesh(t,s||Od(e.currentImage.cameraType)?u:e.previousTransform);else if(s){const[[t,i],[n,s]]=this._getBasicCorners(r,a);p=this._factory.createFlatMesh(e.previousImage,u,t,n,i,s)}else p=this._factory.createMesh(e.previousImage,e.previousTransform);const d={};d[t.id]=p,this._scene.setImagePlanesOld(d)}if(i||r){this._currentKey in this._currentProviderDisposers&&(this._currentProviderDisposers[this._currentKey](),delete this._currentProviderDisposers[this._currentKey]),this._currentKey=e.currentImage.id;const t={};Od(e.currentImage.cameraType)?t[e.currentImage.id]=this._factory.createCurtainMesh(e.currentImage,e.currentTransform):t[e.currentImage.id]=s?this._factory.createDistortedCurtainMesh(e.currentImage,e.currentTransform):this._factory.createCurtainMesh(e.currentImage,e.currentTransform),this._scene.setImagePlanes(t),this._updateCurtain()}}_updateTexture(e){this._needsRender=!0;const t=this._scene.planes;for(const i in t){if(!t.hasOwnProperty(i))continue;let n=t[i].material,r=n.uniforms.projectorTex.value;n.uniforms.projectorTex.value=null,r.dispose(),n.uniforms.projectorTex.value=e}}_updateTexturePrev(e){this._needsRender=!0;const t=this._scene.planesOld;for(const i in t){if(!t.hasOwnProperty(i))continue;let n=t[i].material,r=n.uniforms.projectorTex.value;n.uniforms.projectorTex.value=null,r.dispose(),n.uniforms.projectorTex.value=e}}}class MM{constructor(e){this._container=e,this._interacting=!1,this._notifyModeChanged$=new V,this._notifyPositionChanged$=new V,this._stopInteractionSubscription=null}get mode$(){return this._notifyModeChanged$}get position$(){return this._notifyPositionChanged$}activate(){this._stopInteractionSubscription||(this._stopInteractionSubscription=Je(this._container.mouseService.documentMouseUp$,this._container.touchService.touchEnd$.pipe(et((e=>0===e.touches.length)))).subscribe((e=>{this._interacting&&(this._interacting=!1)})))}deactivate(){this._stopInteractionSubscription&&(this._interacting=!1,this._stopInteractionSubscription.unsubscribe(),this._stopInteractionSubscription=null)}render(e,t,i,n,r){const s=[];if(r){s.push(r_.h("div.mapillary-slider-border",[]));const r=!(i||n);r&&(s.push(this._createModeButton(t)),s.push(this._createModeButton2d(t))),s.push(this._createPositionInput(e,r))}const a=this._container.domContainer.getBoundingClientRect(),o=Math.max(215,Math.min(400,a.width-100));return r_.h("div.mapillary-slider-container",{style:{width:`${o}px`}},s)}_createModeButton(e){const t={onclick:()=>{e!==R_.Motion&&this._notifyModeChanged$.next(R_.Motion)}},i=e===R_.Stationary?"mapillary-slider-mode-button-inactive":"mapillary-slider-mode-button";return r_.h("div."+i,t,[r_.h("div.mapillary-slider-mode-icon",[])])}_createModeButton2d(e){const t={onclick:()=>{e!==R_.Stationary&&this._notifyModeChanged$.next(R_.Stationary)}},i=e===R_.Motion?"mapillary-slider-mode-button-2d-inactive":"mapillary-slider-mode-button-2d";return r_.h("div."+i,t,[r_.h("div.mapillary-slider-mode-icon-2d",[])])}_createPositionInput(e,t){const i=e=>{this._notifyPositionChanged$.next(Number(e.target.value)/1e3)},n=e=>{this._interacting=!0,e.stopPropagation()},r=e=>{this._interacting&&e.stopPropagation()},s=this._container.domContainer.getBoundingClientRect(),a=Math.max(215,Math.min(400,s.width-105))-84+(t?0:52),o=r_.h("input.mapillary-slider-position",{max:1e3,min:0,onchange:i,oninput:i,onkeydown:e=>{"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key&&"ArrowUp"!==e.key||e.preventDefault()},onpointerdown:n,onpointermove:r,ontouchmove:r,ontouchstart:n,style:{width:`${a}px`},type:"range",value:1e3*e},[]);return r_.h("div.mapillary-slider-position-container",[o])}}class vM extends o_{constructor(e,t,i,n){super(e,t,i),this._viewportCoords=n||new h_,this._domRenderer=new MM(t),this._imageTileLoader=new x_(i.api),this._roiCalculator=new w_,this._spatial=new zd,this._glRendererOperation$=new V,this._glRendererCreator$=new V,this._glRendererDisposer$=new V,this._glRenderer$=this._glRendererOperation$.pipe(Dt(((e,t)=>t(e)),null),et((e=>null!=e)),dt(void 0,(e=>e.frameId))),this._glRendererCreator$.pipe(ze((()=>e=>{if(null!=e)throw new Error("Multiple slider states can not be created at the same time");return new _M}))).subscribe(this._glRendererOperation$),this._glRendererDisposer$.pipe(ze((()=>e=>(e.dispose(),null)))).subscribe(this._glRendererOperation$)}_activate(){const e=this._subscriptions;e.push(this._domRenderer.mode$.subscribe((e=>{this.configure({mode:e})}))),e.push(this._glRenderer$.pipe(ze((e=>({name:this._name,renderer:{frameId:e.frameId,needsRender:e.needsRender,render:e.render.bind(e),pass:n_.Background}})))).subscribe(this._container.glRenderer.render$));const t=Ve(this.configuration$.pipe(ze((e=>null!=e.initialPosition?e.initialPosition:1)),vt()),this._domRenderer.position$),i=this.configuration$.pipe(ze((e=>e.mode)),dt()),n=this._navigator.stateService.currentState$.pipe(ze((e=>e.state.motionless)),dt()),r=this._navigator.stateService.currentState$.pipe(ze((e=>Od(e.state.currentImage.cameraType))),dt()),s=$e(this._configuration$.pipe(ze((e=>e.sliderVisible))),this._navigator.stateService.currentState$.pipe(ze((e=>!(null==e.state.currentImage||null==e.state.previousImage||Od(e.state.currentImage.cameraType)&&!Od(e.state.previousImage.cameraType)))),dt())).pipe(ze((([e,t])=>e&&t)),dt());this._waitSubscription=$e(i,n,r,s).pipe(Pt(this._navigator.stateService.state$)).subscribe((([[e,t,i,n],r])=>{const s=n&&(t||e===R_.Stationary||i);s&&r!==O_.WaitingInteractively?this._navigator.stateService.waitInteractively():s||r===O_.Waiting||this._navigator.stateService.wait()})),e.push($e(t,i,n,r,s).subscribe((([e,t,i,n])=>{i||t===R_.Stationary||n?this._navigator.stateService.moveTo(1):this._navigator.stateService.moveTo(e)}))),e.push($e(t,i,n,r,s,this._container.renderService.size$).pipe(ze((([e,t,i,n,r])=>({name:this._name,vNode:this._domRenderer.render(e,t,i,n,r)})))).subscribe(this._container.domRenderer.render$)),this._glRendererCreator$.next(null),e.push($e(t,r,s,this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$).pipe(ze((([e,t,i,n,r])=>{if(!t)return i?e:1;const s=this._viewportCoords.viewportToBasic(-1.15,0,r,n.perspective),a=this._viewportCoords.viewportToBasic(1.15,0,r,n.perspective),o=a[0]1?c-1:c})),ze((e=>t=>(t.updateCurtain(e),t)))).subscribe(this._glRendererOperation$)),e.push($e(this._navigator.stateService.currentState$,i).pipe(ze((([e,t])=>i=>(i.update(e,t),i)))).subscribe(this._glRendererOperation$)),e.push(this._configuration$.pipe(et((e=>null!=e.ids)),zt((e=>tt(tt(this._catchCacheImage$(e.ids.background),this._catchCacheImage$(e.ids.foreground)).pipe(ze((e=>({background:e[0],foreground:e[1]})))),this._navigator.stateService.currentState$.pipe(vt())).pipe(ze((e=>({images:e[0],state:e[1].state}))))))).subscribe((e=>{null!=e.state.currentImage&&null!=e.state.previousImage&&e.state.currentImage.id===e.images.foreground.id&&e.state.previousImage.id===e.images.background.id||(e.state.currentImage.id!==e.images.background.id?e.state.currentImage.id!==e.images.foreground.id||1!==e.state.trajectory.length?(this._navigator.stateService.setImages([e.images.background]),this._navigator.stateService.setImages([e.images.foreground])):this._navigator.stateService.prependImages([e.images.background]):this._navigator.stateService.setImages([e.images.foreground]))}),(e=>{console.error(e)})));const a=this._container.configurationService.imageTiling$.pipe(zt((e=>e?this._navigator.stateService.currentState$:new V)),dt(void 0,(e=>e.state.currentImage.id)),Pt(this._container.glRenderer.webGLRenderer$,this._container.renderService.size$),ze((([e,t,i])=>{const n=e.state;Math.max(i.width,i.height);const r=n.currentImage,s=n.currentTransform;return new j_(r.id,s.basicWidth,s.basicHeight,r.image,this._imageTileLoader,new b_,t)})),St(1),F());e.push(a.subscribe((()=>{}))),e.push(a.pipe(ze((e=>t=>(t.setTextureProvider(e.id,e),t)))).subscribe(this._glRendererOperation$)),e.push(a.pipe(wt()).subscribe((e=>{e[0].abort()})));const o=this._container.configurationService.imageTiling$.pipe(zt((e=>e?$e(this._container.renderService.renderCameraFrame$,this._container.renderService.size$.pipe(ht(250))):new V)),ze((([e,t])=>[e.camera.position.clone(),e.camera.lookat.clone(),e.zoom.valueOf(),t.height.valueOf(),t.width.valueOf()])),wt(),Et((e=>e[1][2]-e[0][2]<0||0===e[1][2])),ze((e=>{let t=e[0][0].equals(e[1][0]),i=e[0][1].equals(e[1][1]),n=e[0][2]===e[1][2],r=e[0][3]===e[1][3],s=e[0][4]===e[1][4];return t&&i&&n&&r&&s})),dt(),et((e=>e)),zt((()=>this._container.renderService.renderCameraFrame$.pipe(vt()))),Pt(this._container.renderService.size$,this._navigator.stateService.currentTransform$));e.push(a.pipe(zt((e=>o.pipe(ze((([t,i,n])=>[this._roiCalculator.computeRegionOfInterest(t,i,n),e]))))),et((e=>!e[1].disposed))).subscribe((e=>{let t=e[0];e[1].setRegionOfInterest(t)})));const c=a.pipe(zt((e=>e.hasTexture$)),Lt(!1),St(1),F());e.push(c.subscribe((()=>{})));const l=this._container.configurationService.imageTiling$.pipe(zt((e=>e?this._navigator.stateService.currentState$:new V)),et((e=>!!e.state.previousImage)),dt(void 0,(e=>e.state.previousImage.id)),Pt(this._container.glRenderer.webGLRenderer$,this._container.renderService.size$),ze((([e,t,i])=>{const n=e.state,r=n.previousImage,s=n.previousTransform;return new j_(r.id,s.basicWidth,s.basicHeight,r.image,this._imageTileLoader,new b_,t)})),St(1),F());e.push(l.subscribe((()=>{}))),e.push(l.pipe(ze((e=>t=>(t.setTextureProviderPrev(e.id,e),t)))).subscribe(this._glRendererOperation$)),e.push(l.pipe(wt()).subscribe((e=>{e[0].abort()})));const h=this._container.configurationService.imageTiling$.pipe(zt((e=>e?$e(this._container.renderService.renderCameraFrame$,this._container.renderService.size$.pipe(ht(250))):new V)),ze((([e,t])=>[e.camera.position.clone(),e.camera.lookat.clone(),e.zoom.valueOf(),t.height.valueOf(),t.width.valueOf()])),wt(),Et((e=>e[1][2]-e[0][2]<0||0===e[1][2])),ze((e=>{let t=e[0][0].equals(e[1][0]),i=e[0][1].equals(e[1][1]),n=e[0][2]===e[1][2],r=e[0][3]===e[1][3],s=e[0][4]===e[1][4];return t&&i&&n&&r&&s})),dt(),et((e=>e)),zt((()=>this._container.renderService.renderCameraFrame$.pipe(vt()))),Pt(this._container.renderService.size$,this._navigator.stateService.currentTransform$));e.push(l.pipe(zt((e=>h.pipe(ze((([t,i,n])=>[this._roiCalculator.computeRegionOfInterest(t,i,n),e]))))),et((e=>!e[1].disposed)),Pt(this._navigator.stateService.currentState$)).subscribe((([[e,t],i])=>{let n=null;if(Od(i.state.previousImage.cameraType))if(Od(i.state.currentImage.cameraType)){const t=this._spatial.viewingDirection(i.state.currentImage.rotation),r=this._spatial.viewingDirection(i.state.previousImage.rotation),s=this._spatial.angleBetweenVector2(t.x,t.y,r.x,r.y)/(2*Math.PI);n={bbox:{maxX:this._spatial.wrap(e.bbox.maxX+s,0,1),maxY:e.bbox.maxY,minX:this._spatial.wrap(e.bbox.minX+s,0,1),minY:e.bbox.minY},pixelHeight:e.pixelHeight,pixelWidth:e.pixelWidth}}else{const t=this._spatial.viewingDirection(i.state.currentImage.rotation),r=this._spatial.viewingDirection(i.state.previousImage.rotation),s=this._spatial.angleBetweenVector2(t.x,t.y,r.x,r.y)/(2*Math.PI),a=this._spatial.angleToPlane(t.toArray(),[0,0,1]),o=(this._spatial.angleToPlane(r.toArray(),[0,0,1])-a)/(2*Math.PI),c=i.state.currentTransform,l=Math.max(c.basicWidth,c.basicHeight),h=l>0?2*Math.atan(.5*c.basicWidth/(l*c.focal)):Math.PI/3,u=l>0?2*Math.atan(.5*c.basicHeight/(l*c.focal)):Math.PI/3,p=h/(2*Math.PI),d=u/Math.PI,g=(e.bbox.maxX-e.bbox.minX)*p,m=(e.bbox.maxY-e.bbox.minY)*d,f=e.pixelWidth*p,_=e.pixelHeight*d,M=(e.bbox.minX+e.bbox.maxX)/2-.5,v=(e.bbox.minY+e.bbox.maxY)/2-.5,y=.5+s+p*M-g/2,x=.5+s+p*M+g/2,b=.5+o+d*v-m/2,w=.5+o+d*v+m/2;n={bbox:{maxX:this._spatial.wrap(x,0,1),maxY:w,minX:this._spatial.wrap(y,0,1),minY:b},pixelHeight:_,pixelWidth:f}}else{const t=i.state.currentTransform.basicAspect,r=i.state.previousTransform.basicAspect,[[s,a],[o,c]]=this._getBasicCorners(t,r),l=o-s,h=c-a,u=e.pixelWidth/l,p=e.pixelHeight/h,d=(l-1)/(2*l)+e.bbox.minX/l,g=(l-1)/(2*l)+e.bbox.maxX/l,m=(h-1)/(2*h)+e.bbox.minY/h,f={maxX:g,maxY:(h-1)/(2*h)+e.bbox.maxY/h,minX:d,minY:m};this._clipBoundingBox(f),n={bbox:f,pixelHeight:p,pixelWidth:u}}t.setRegionOfInterest(n)})));const u=l.pipe(zt((e=>e.hasTexture$)),Lt(!1),St(1),F());e.push(u.subscribe((()=>{})))}_deactivate(){this._waitSubscription.unsubscribe(),this._navigator.stateService.state$.pipe(vt()).subscribe((e=>{e!==O_.Traversing&&this._navigator.stateService.traverse()})),this._glRendererDisposer$.next(null),this._domRenderer.deactivate(),this._subscriptions.unsubscribe(),this.configure({ids:null})}_getDefaultConfiguration(){return{initialPosition:1,mode:R_.Motion,sliderVisible:!0}}_catchCacheImage$(e){return this._navigator.graphService.cacheImage$(e).pipe(rt((t=>(console.error(`Failed to cache slider image (${e})`,t),re()))))}_getBasicCorners(e,t){let i,n;return e>t?(i=.5,n=.5*e/t):(i=.5*t/e,n=.5),[[.5-i,.5-n],[.5+i,.5+n]]}_clipBoundingBox(e){e.minX=Math.max(0,Math.min(1,e.minX)),e.maxX=Math.max(0,Math.min(1,e.maxX)),e.minY=Math.max(0,Math.min(1,e.minY)),e.maxY=Math.max(0,Math.min(1,e.maxY))}}vM.componentName="slider";class yM{constructor(e,t){this._subscriptions=new a_,this._graphService=e,this._stateService=t;const i=this._subscriptions;this._directionSubject$=new V,this._direction$=this._directionSubject$.pipe(Lt(Id.Next),St(1),F()),i.push(this._direction$.subscribe()),this._playing=!1,this._playingSubject$=new V,this._playing$=this._playingSubject$.pipe(Lt(this._playing),St(1),F()),i.push(this._playing$.subscribe()),this._speed=.5,this._speedSubject$=new V,this._speed$=this._speedSubject$.pipe(Lt(this._speed),St(1),F()),i.push(this._speed$.subscribe()),this._imagesAhead=this._mapImagesAhead(this._mapSpeed(this._speed)),this._bridging$=null}get playing(){return this._playing}get direction$(){return this._direction$}get playing$(){return this._playing$}get speed$(){return this._speed$}play(){if(this._playing)return;this._stateService.cutImages();const e=this._setSpeed(this._speed);this._stateService.setSpeed(e),this._graphModeSubscription=this._speed$.pipe(ze((e=>e>yM.sequenceSpeed?k_.Sequence:k_.Spatial)),dt()).subscribe((e=>{this._graphService.setGraphMode(e)})),this._cacheSubscription=$e(this._stateService.currentImage$.pipe(ze((e=>[e.sequenceId,e.id])),dt(void 0,(([e])=>e))),this._graphService.graphMode$,this._direction$).pipe(zt((([[e,t],i,n])=>n!==Id.Next&&n!==Id.Prev?Ne([void 0,n]):$e((i===k_.Sequence?this._graphService.cacheSequenceImages$(e,t):this._graphService.cacheSequence$(e)).pipe(Nt(3),rt((e=>(console.error(e),Ne(void 0))))),Ne(n)))),zt((([e,t])=>{if(void 0===e)return re();const i=e.imageIds.slice();return t===Id.Prev&&i.reverse(),this._stateService.currentState$.pipe(ze((e=>[e.state.trajectory[e.state.trajectory.length-1].id,e.state.imagesAhead])),Dt((([e,t],[n,r])=>{void 0===e&&(e=n);const s=i.length-1;if(r>=this._imagesAhead||i[s]===e)return[e,[]];const a=i.indexOf(n),o=i.indexOf(e)+1,c=Math.min(s,a+this._imagesAhead-r)+1;return c<=o?[e,[]]:[i[c-1],i.slice(o,c)]}),[void 0,[]]),Ge((([e,t])=>_e(t))))})),Ge((e=>this._graphService.cacheImage$(e).pipe(rt((()=>re())))),6)).subscribe(),this._playingSubscription=this._stateService.currentState$.pipe(et((e=>e.state.imagesAheade.state.lastImage.id)),ze((e=>{const t=e.state.lastImage,i=e.state.trajectory;let n;for(let e=i.length-2;e>=0;e--){const r=i[e];if(r.sequenceId!==t.sequenceId)break;if(r.capturedAt!==t.capturedAt){n=r.capturedAttt(([Id.Next,Id.Prev].indexOf(i)>-1?e.sequenceEdges$:e.spatialEdges$).pipe(vt((e=>e.cached)),Ee(15e3)),Ne(i)).pipe(ze((([e,t])=>{for(let i of e.edges)if(i.data.direction===t)return i.target;return null})),zt((e=>null!=e?this._graphService.cacheImage$(e):re())))))).subscribe((e=>{this._stateService.appendImagess([e])}),(e=>{console.error(e),this.stop()})),this._clearSubscription=this._stateService.currentImage$.pipe(nt(1,10)).subscribe((e=>{this._stateService.clearPriorImages()})),this._setPlaying(!0);const t=this._stateService.currentState$.pipe(ze((e=>e.state)),dt((([e,t],[i,n])=>e===i&&t===n),(e=>[e.currentImage.id,e.lastImage.id])),et((e=>e.currentImage.id===e.lastImage.id&&e.currentIndex===e.trajectory.length-1)),ze((e=>e.currentImage)));this._stopSubscription=$e(t,this._direction$).pipe(zt((([e,t])=>{const i=([Id.Next,Id.Prev].indexOf(t)>-1?e.sequenceEdges$:e.spatialEdges$).pipe(vt((e=>e.cached)),Ee(15e3),rt((e=>(console.error(e),Ne({cached:!1,edges:[]})))));return $e(Ne(t),i).pipe(ze((([e,t])=>{for(const i of t.edges)if(i.data.direction===e)return!0;return!1})))})),Ge((e=>e||!this._bridging$?Ne(e):this._bridging$.pipe(ze((e=>null!=e)),rt((e=>(console.error(e),Ne(!1))))))),vt((e=>!e))).subscribe(void 0,void 0,(()=>{this.stop()})),this._stopSubscription.closed&&(this._stopSubscription=null),this._earthSubscription=this._stateService.state$.pipe(ze((e=>e===O_.Earth)),dt(),vt((e=>e))).subscribe(void 0,void 0,(()=>{this.stop()})),this._earthSubscription.closed&&(this._earthSubscription=null)}dispose(){this.stop(),this._subscriptions.unsubscribe()}setDirection(e){this._directionSubject$.next(e)}setSpeed(e){if((e=Math.max(0,Math.min(1,e)))===this._speed)return;const t=this._setSpeed(e);this._playing&&this._stateService.setSpeed(t),this._speedSubject$.next(this._speed)}stop(){this._playing&&(this._stopSubscription&&(this._stopSubscription.closed||this._stopSubscription.unsubscribe(),this._stopSubscription=null),this._earthSubscription&&(this._earthSubscription.closed||this._earthSubscription.unsubscribe(),this._earthSubscription=null),this._graphModeSubscription.unsubscribe(),this._graphModeSubscription=null,this._cacheSubscription.unsubscribe(),this._cacheSubscription=null,this._playingSubscription.unsubscribe(),this._playingSubscription=null,this._clearSubscription.unsubscribe(),this._clearSubscription=null,this._stateService.setSpeed(1),this._stateService.cutImages(),this._graphService.setGraphMode(k_.Spatial),this._setPlaying(!1))}_mapSpeed(e){const t=2*e-1;return Math.pow(10,t)-.2*t}_mapImagesAhead(e){return Math.round(Math.max(10,Math.min(50,8+6*e)))}_setPlaying(e){this._playing=e,this._playingSubject$.next(e)}_setSpeed(e){this._speed=e;const t=this._mapSpeed(this._speed);return this._imagesAhead=this._mapImagesAhead(t),t}}yM.sequenceSpeed=.54,function(e){e[e.Hidden=0]="Hidden",e[e.Homogeneous=1]="Homogeneous",e[e.Cluster=2]="Cluster",e[e.ConnectedComponent=3]="ConnectedComponent",e[e.Sequence=4]="Sequence"}(U_||(U_={})),function(e){e[e.Hidden=0]="Hidden",e[e.Altitude=1]="Altitude",e[e.Flat=2]="Flat"}($_||($_={}));class xM extends iu{constructor(e){super(),this._originalSize=e.originalSize;const{cluster:t,color:i,scale:n,translation:r}=e;this._makeAttributes(t),this.material.size=n*this._originalSize,this.setColor(i),this.matrixAutoUpdate=!1,this.position.fromArray(r),this.updateMatrix(),this.updateMatrixWorld(!1)}dispose(){this.geometry.dispose(),this.material.dispose()}setColor(e){this.material.vertexColors=null==e,this.material.color=new wa(e),this.material.needsUpdate=!0}resize(e){this.material.size=e*this._originalSize,this.material.needsUpdate=!0}_makeAttributes(e){const t=[],i=[],n=e.points;for(const e in n){if(!n.hasOwnProperty(e))continue;const r=n[e];t.push(...r.coordinates);const s=r.color;i.push(s[0]),i.push(s[1]),i.push(s[2])}const r=this.geometry;r.setAttribute("position",new Da(new Float32Array(t),3)),r.setAttribute("color",new Da(new Float32Array(i),3))}}class bM extends qh{constructor(e){super(),this._makeAttributes(e),this.matrixAutoUpdate=!1,this.updateMatrix(),this.updateMatrixWorld(!1)}dispose(){this.geometry.dispose(),this.material.dispose()}_makeAttributes(e){const t=e.slice();t.push(e[0]);let i=0;const n=new Float32Array(3*(e.length+1));for(const e of t)n[i++]=e[0],n[i++]=e[1],n[i++]=e[2];this.geometry.setAttribute("position",new Da(n,3))}}function wM(e,t){return e===t}class TM{constructor(e,t,i,n){this.level=e,this.leafLevel=t,this.boundingBox=i,this.parent=n,this.children=[],this.items=[],n&&n.children.push(this)}get isEmpty(){return!(this.children.length||this.items.length)}add(e){const t=this;if(!t.boundingBox.containsPoint(e.position))throw new Error("Item not contained in node");if(wM(t.level,t.leafLevel))return t.items.push(e),this;for(const i of t.children)if(i.boundingBox.containsPoint(e.position))return i.add(e);for(const i of t._generateBoundingBoxes())if(i.containsPoint(e.position))return new TM(t.level-1,t.leafLevel,i,t).add(e);throw new Error("Item not contained in children")}intersect(e,t,i){if(e.intersectBox(this.boundingBox,t))if(wM(this.level,this.leafLevel))i.push(this);else for(const n of this.children)n.intersect(e,t,i)}remove(e){const t=this.items.indexOf(e);if(t<0)throw new Error(`Item does not exist ${e.uuid}`);this.items.splice(t,1)}traverse(){const e=this;if(!e.isEmpty)return;const t=e.parent;if(!t)return;const i=t.children.indexOf(e);if(i<0)throw new Error("Corrupt octree");t.children.splice(i,1),this.parent=null,t.traverse()}_generateBoundingBoxes(){const e=this.boundingBox.min,t=(this.boundingBox.max.x-e.x)/2,i=[[e.x,e.y+t,e.z+t],[e.x+t,e.y+t,e.z+t],[e.x,e.y,e.z+t],[e.x+t,e.y,e.z+t],[e.x,e.y+t,e.z],[e.x+t,e.y+t,e.z],[e.x,e.y,e.z],[e.x+t,e.y,e.z]],n=[];for(const[e,r,s]of i)n.push(new rs(new ts(e,r,s),new ts(e+t,r+t,s+t)));return n}}class SM{constructor(e,t){if(this.rootLevel=e,this.leafLevel=t,t>e)throw new Error;this._index=new Map,this._root=this._makeRoot()}get root(){return this._root}add(e){if(!this.root.boundingBox.containsPoint(e.position))return void console.warn(`Object outside bounding box ${e.uuid}`);const t=this._root.add(e);this._index.set(e.uuid,t)}has(e){return this._index.has(e.uuid)}intersect(e){const t=[],i=new ts;return this._root.intersect(e,i,t),t.map((e=>e.items)).reduce(((e,t)=>(e.push(...t),e)),[])}reset(){this._root=this._makeRoot(),this._index.clear()}remove(e){if(!this.has(e))throw new Error(`Frame does not exist ${e.uuid}`);const t=this._index.get(e.uuid);t.remove(e),t.traverse(),this._index.delete(e.uuid)}_makeRoot(){const e=this.rootLevel,t=function(e){const t=function(e){return Math.pow(2,e)}(e),i=t/2;return{min:[-i,-i,-i],max:[i,i,i]}}(e),i=new rs((new ts).fromArray(t.min),(new ts).fromArray(t.max));return new TM(e,this.leafLevel,i)}}class NM{constructor(e,t){this._objects=[],this._objectImageMap=new Map,this._octree=null!=e?e:new SM(14,6),this._raycaster=null!=t?t:new sd,this._interactiveLayer=1,this._raycaster=t||new sd(void 0,void 0,1,1e4),this._lineThreshold=.2,this._largeLineThreshold=.4,this._raycaster.params.Line.threshold=this._lineThreshold,this._raycaster.layers.set(this._interactiveLayer)}get interactiveLayer(){return this._interactiveLayer}get octree(){return this._octree}get raycaster(){return this._raycaster}add(e,t){const i=e.uuid;this._objectImageMap.set(i,t),this._objects.push(e),this._octree.add(e)}intersectObjects(e,t){this._raycaster.setFromCamera((new Br).fromArray(e),t);const i=this._octree.intersect(this.raycaster.ray),n=this._raycaster.intersectObjects(i),r=this._objectImageMap;for(const e of n){const t=e.object.uuid;if(r.has(t))return r.get(t)}return null}remove(e){const t=this._objects,i=t.indexOf(e);if(-1!==i){const n=t.splice(i,1);for(const e of n)this._objectImageMap.delete(e.uuid);this._octree.remove(e)}else console.warn("Object does not exist")}resetIntersectionThreshold(e){this._raycaster.params.Line.threshold=e?this._largeLineThreshold:this._lineThreshold}}class DM extends qh{constructor(e){super(e.geometry,e.material);const t=e.mode,i=e.originalOrigin,n=e.transform.unprojectBasic([0,0],0);this._relativeAltitude=i[2]-n[2],this._makeAttributes(n,i,t),this.matrixAutoUpdate=!1,this.position.fromArray(n),this.updateMatrix(),this.updateMatrixWorld(!1)}dispose(){this.geometry.dispose(),this.material.dispose()}setMode(e){const t=this.geometry.attributes.position;t.array[5]=this._modeToAltitude(e),t.needsUpdate=!0,this.geometry.computeBoundingSphere()}_makeAttributes(e,t,i){const n=new Float32Array(6);n[0]=0,n[1]=0,n[2]=0,n[3]=t[0]-e[0],n[4]=t[1]-e[1],n[5]=this._modeToAltitude(i);const r=new Da(n,3);this.geometry.setAttribute("position",r),r.needsUpdate=!0,this.geometry.computeBoundingSphere()}_modeToAltitude(e){return e===$_.Altitude?this._relativeAltitude:0}}class IM extends Zh{constructor(e){super(e.geometry,e.material);const t=e.color,i=e.size,n=e.scale,r=e.transform,s=r.unprojectBasic([0,0],0),a=this._makePositions(i,r,s);this._makeAttributes(a,t),this.geometry.computeBoundingSphere(),this.geometry.computeBoundingBox(),this.matrixAutoUpdate=!1,this.position.fromArray(s),this.scale.set(n,n,n),this.updateMatrix(),this.updateMatrixWorld(!1)}dispose(){this.geometry.dispose(),this.material.dispose()}setColor(e){return this._updateColorAttribute(e),this}resize(e){return this.scale.set(e,e,e),this.updateMatrix(),this.updateMatrixWorld(!1),this}_makeAttributes(e,t){const i=this.geometry,n=new Da(new Float32Array(e),3);i.setAttribute("position",n),n.needsUpdate=!0;const r=new Da(new Float32Array(e.length),3);i.setAttribute("color",r),this._updateColorAttribute(t)}_updateColorAttribute(e){const[t,i,n]=new wa(e).toArray(),r=this.geometry.attributes.color,s=r.array,a=s.length;let o=0;for(let e=0;e!0}get needsRender(){return this._needsRender}get intersection(){return this._intersection}addCluster(e,t,i){if(this.hasCluster(e.id,i))return;const n=e.id;if(!(n in this._clusters)){this._clusters[n]={points:new na,cellIds:[]};const i=this._getClusterVisible(n),r=this._clusters[n],s=this._pointVisualizationMode===B_.Cluster?this._assets.getColor(n):null,a=new xM({cluster:e,color:s,originalSize:this._originalPointSize,scale:this._pointSize,translation:t});r.points.visible=i,r.points.add(a),this._scene.add(r.points)}-1===this._clusters[n].cellIds.indexOf(i)&&this._clusters[n].cellIds.push(i),i in this._cellClusters||(this._cellClusters[i]={keys:[]}),-1===this._cellClusters[i].keys.indexOf(n)&&this._cellClusters[i].keys.push(n),this._needsRender=!0}addImage(e,t,i,n){var r,s,a;const o=e.id,c={clusterId:null!==(r=e.clusterId)&&void 0!==r?r:"NO_CLUSTER_ID",sequenceId:null!==(s=e.sequenceId)&&void 0!==s?s:"NO_SEQUENCE_ID",ccId:null!==(a=e.mergeId)&&void 0!==a?a:"NO_MERGE_ID"};if(!(n in this._images)){const e=new LM(n,this._scene,this._intersection);e.cameras.visible=jM(this._cameraVisualizationMode),e.applyPositionMode(this._positionMode),this._images[n]=e}const l=this._images[n];if(l.hasImage(o))return;l.addImage({idMap:c,image:e});const h=l.getColorId(o,this._cameraVisualizationMode),u=this._assets.getColor(h),p=this._filter(e);if(l.visualize({id:o,color:u,positionMode:this._positionMode,scale:this._cameraSize,transform:t,visible:p,maxSize:this._originalCameraSize,originalPosition:i}),this._imageCellMap.set(o,n),o===this._selectedId&&this._highlight(o,this._colors.select,this._cameraVisualizationMode),c.clusterId in this._clusters){const e=this._getClusterVisible(c.clusterId);this._clusters[c.clusterId].points.visible=e}this._needsRender=!0}addCell(e,t){if(this.hasCell(t))return;const i=new bM(e);this._cells[t]=new na,this._cells[t].visible=this._cellsVisible,this._cells[t].add(i),this._scene.add(this._cells[t]),this._needsRender=!0}deactivate(){this._filter=()=>!0,this._selectedId=null,this._hoveredId=null,this.uncache()}hasCluster(e,t){return e in this._clusters&&-1!==this._clusters[e].cellIds.indexOf(t)}hasCell(e){return e in this._cells}hasImage(e,t){return t in this._images&&this._images[t].hasImage(e)}render(e,t){t.render(this._scene,e),this._needsRender=!1}resetReference(e,t){const i=this._clusters;for(const n in i){if(!i.hasOwnProperty(n))continue;const r=i[n];r.points.position.fromArray(EM(e,r.points.position.toArray(),t))}const n=this._cells;for(const i in n){if(!n.hasOwnProperty(i))continue;const r=n[i];r.position.fromArray(EM(e,r.position.toArray(),t))}const r=this._images;for(const i in r)r.hasOwnProperty(i)&&r[i].resetReference(e,t)}setCameraSize(e){if(Math.abs(e-this._cameraSize)<.001)return;const t=this._images;for(const i of Object.keys(t))t[i].applyCameraSize(e);this._intersection.raycaster.near=this._getNear(e),this._cameraSize=e,this._needsRender=!0}setFilter(e){this._filter=e;const t={};for(const i of Object.values(this._images)){i.applyFilter(e);const n=i.clusterVisibles;for(const e in n)n.hasOwnProperty(e)&&(e in t||(t[e]=!1),t[e]||(t[e]=n[e]))}const i=this._pointVisualizationMode!==B_.Hidden;for(const e in t){if(!t.hasOwnProperty(e))continue;t[e]&&(t[e]=i);const n=t[e];e in this._clusters&&(this._clusters[e].points.visible=n)}this._needsRender=!0}setHoveredImage(e){if(null!=e&&!this._imageCellMap.has(e))throw new Ed(`Image does not exist: ${e}`);this._hoveredId!==e&&(this._needsRender=!0,null!=this._hoveredId&&(this._hoveredId===this._selectedId?this._highlight(this._hoveredId,this._colors.select,this._cameraVisualizationMode):this._resetCameraColor(this._hoveredId)),this._highlight(e,this._colors.hover,this._cameraVisualizationMode),this._hoveredId=e)}setNavigationState(e){this._intersection.resetIntersectionThreshold(e)}setPointSize(e){if(Math.abs(e-this._pointSize)<.001)return;const t=this._clusters;for(const i in t)if(t.hasOwnProperty(i))for(const n of t[i].points.children)n.resize(e);this._pointSize=e,this._needsRender=!0}setPointVisualizationMode(e){if(e!==this._pointVisualizationMode){this._pointVisualizationMode=e;for(const t in this._clusters){if(!this._clusters.hasOwnProperty(t))continue;const i=this._clusters[t];i.points.visible=this._getClusterVisible(t);for(const n of i.points.children){const i=e===B_.Cluster?this._assets.getColor(t):null;n.setColor(i)}}this._needsRender=!0}}setPositionMode(e){if(e!==this._positionMode){for(const t of Object.values(this._images))t.applyPositionMode(e);this._positionMode=e,this._needsRender=!0}}setSelectedImage(e){this._selectedId!==e&&(this._needsRender=!0,null!=this._selectedId&&this._resetCameraColor(this._selectedId),this._highlight(e,this._colors.select,this._cameraVisualizationMode),this._selectedId=e)}setCellVisibility(e){if(e!==this._cellsVisible){for(const t in this._cells)this._cells.hasOwnProperty(t)&&(this._cells[t].visible=e);this._cellsVisible=e,this._needsRender=!0}}setCameraVisualizationMode(e){if(e===this._cameraVisualizationMode)return;const t=jM(e),i=this._assets;for(const n of Object.values(this._images))n.cameras.visible=t,n.getCamerasByMode(e).forEach(((e,t)=>{const n=i.getColor(t);for(const t of e)t.setColor(n)}));this._highlight(this._hoveredId,this._colors.hover,e),this._highlight(this._selectedId,this._colors.select,e),this._cameraVisualizationMode=e,this._needsRender=!0}uncache(e){for(const t of Object.keys(this._cellClusters))e&&-1!==e.indexOf(t)||this._disposeReconstruction(t);for(const t of Object.keys(this._images)){if(e&&-1!==e.indexOf(t))continue;const i=this._imageCellMap,n=this._images[t].keys;for(const e of n)i.delete(e);this._images[t].dispose(),delete this._images[t]}for(const t of Object.keys(this._cells))e&&-1!==e.indexOf(t)||this._disposeCell(t);this._needsRender=!0}_getClusterVisible(e){if(this._pointVisualizationMode===B_.Hidden)return!1;let t=!1;for(const i of Object.values(this._images)){const n=i.clusterVisibles;e in n&&(t||(t=n[e]))}return t}_disposePoints(e){for(const t of this._cellClusters[e].keys){if(!(t in this._clusters))continue;const i=this._clusters[t].cellIds.indexOf(e);if(-1!==i&&(this._clusters[t].cellIds.splice(i,1),!(this._clusters[t].cellIds.length>0))){for(const e of this._clusters[t].points.children.slice())e.dispose();this._scene.remove(this._clusters[t].points),delete this._clusters[t]}}}_disposeReconstruction(e){this._disposePoints(e),delete this._cellClusters[e]}_disposeCell(e){const t=this._cells[e];for(const e of t.children.slice())e.dispose(),t.remove(e);this._scene.remove(t),delete this._cells[e]}_getNear(e){const t=this._rayNearScale*this._originalCameraSize*e;return Math.max(1,t)}_resetCameraColor(e){const t=this._imageCellMap;if(null==e||!t.has(e))return;const i=t.get(e),n=this._images[i],r=n.getColorId(e,this._cameraVisualizationMode),s=this._assets.getColor(r);n.applyCameraColor(e,s)}_highlight(e,t,i){const n=this._imageCellMap;if(null==e||!n.has(e))return;const r=n.get(e);t=i===U_.Homogeneous?t:"#FFFFFF",this._images[r].applyCameraColor(e,t)}}class kM{constructor(e,t){this._graphService=e,this._data=t,this._cells={},this._cacheRequests={},this._clusters={},this._clusterCells={},this._cellClusters={},this._cachingCells$={},this._cachingClusters$={}}cacheClusters$(e){if(!this.hasCell(e))throw new Error("Cannot cache reconstructions of a non-existing cell.");if(this.hasClusters(e))throw new Error("Cannot cache reconstructions that already exists.");if(this.isCachingClusters(e))return this._cachingClusters$[e];const t=this.getCell(e).filter((e=>!!e.clusterId&&!!e.clusterUrl)).map((e=>({key:e.clusterId,url:e.clusterUrl}))),i=Array.from(new Map(t.map((e=>[e.key,e]))).values());let n;this._cellClusters[e]=i,this._cacheRequests[e]=[];const r=new Promise(((e,t)=>{n=t}));return this._cacheRequests[e].push(n),this._cachingClusters$[e]=this._cacheClusters$(i,e,r).pipe(Mt((()=>{e in this._cachingClusters$&&delete this._cachingClusters$[e],e in this._cacheRequests&&delete this._cacheRequests[e]})),Tt(),F()),this._cachingClusters$[e]}cacheCell$(e){if(this.hasCell(e))throw new Error("Cannot cache cell that already exists.");return this.isCachingCell(e)||(this._cachingCells$[e]=this._graphService.cacheCell$(e).pipe(rt((e=>(console.error(e),re()))),et((()=>!(e in this._cells))),kt((t=>{this._cells[e]=[],this._cells[e].push(...t),delete this._cachingCells$[e]})),Mt((()=>{e in this._cachingCells$&&delete this._cachingCells$[e]})),Tt(),F())),this._cachingCells$[e]}isCachingClusters(e){return e in this._cachingClusters$}isCachingCell(e){return e in this._cachingCells$}hasClusters(e){if(e in this._cachingClusters$||!(e in this._cellClusters))return!1;for(const t of this._cellClusters[e])if(!(t.key in this._clusters))return!1;return!0}hasCell(e){return!(e in this._cachingCells$)&&e in this._cells}getClusters(e){return e in this._cellClusters?this._cellClusters[e].map((e=>this._clusters[e.key])).filter((e=>!!e)):[]}getCell(e){return e in this._cells?this._cells[e]:[]}uncache(e){for(let t of Object.keys(this._cacheRequests))if(!e||-1===e.indexOf(t)){for(const e of this._cacheRequests[t])e();delete this._cacheRequests[t]}for(let t of Object.keys(this._cellClusters))if(!e||-1===e.indexOf(t)){for(const e of this._cellClusters[t]){if(!(e.key in this._clusterCells))continue;const i=this._clusterCells[e.key].indexOf(t);-1!==i&&(this._clusterCells[e.key].splice(i,1),this._clusterCells[e.key].length>0||(delete this._clusterCells[e.key],delete this._clusters[e.key]))}delete this._cellClusters[t]}for(let t of Object.keys(this._cells))e&&-1!==e.indexOf(t)||delete this._cells[t]}updateCell$(e){if(!this.hasCell(e))throw new Error("Cannot update cell that does not exists.");return this._graphService.cacheCell$(e).pipe(rt((e=>(console.error(e),re()))),et((()=>e in this._cells)),kt((t=>{this._cells[e]=[],this._cells[e].push(...t)})),Tt(),F())}updateClusters$(e){if(!this.hasCell(e))throw new Error("Cannot update reconstructions of a non-existing cell.");if(!this.hasClusters(e))throw new Error("Cannot update reconstructions for cell that is not cached.");const t=this.getCell(e).filter((e=>!!e.clusterId&&!!e.clusterUrl)).map((e=>({key:e.clusterId,url:e.clusterUrl}))),i=Array.from(new Map(t.map((e=>[e.key,e]))).values()).filter((e=>!(e.key in this._clusters)));return this._cellClusters[e].push(...i),this._cacheClusters$(i,e,null)}_cacheClusters$(e,t,i){return _e(e).pipe(Ge((e=>this._hasCluster(e.key)?Ne(this._getCluster(e.key)):this._getCluster$(e.url,e.key,i).pipe(rt((e=>(e instanceof d_||console.error(e),re()))))),6),et((()=>t in this._cellClusters)),kt((e=>{this._hasCluster(e.id)||(this._clusters[e.id]=e),e.id in this._clusterCells||(this._clusterCells[e.id]=[]),-1===this._clusterCells[e.id].indexOf(t)&&this._clusterCells[e.id].push(t)})))}_getCluster(e){return this._clusters[e]}_getCluster$(e,t,i){return P.create((n=>{this._data.getCluster(e,i).then((e=>{e.id=t,n.next(e),n.complete()}),(e=>{n.error(e)}))}))}_hasCluster(e){return e in this._clusters}}function PM(e,t,i){const n=new Set;return n.add(e),RM(n,[e],0,t,i),Array.from(n)}function RM(e,t,i,n,r){if(i>=n)return;const s=[];for(const e of t){const t=r.getAdjacent(e);s.push(...t)}const a=[];for(const t of s)e.has(t)||(e.add(t),a.push(t));RM(e,a,i+1,n,r)}class UM extends o_{constructor(e,t,i){super(e,t,i),this._cache=new kM(i.graphService,i.api.data),this._scene=new OM(this._getDefaultConfiguration()),this._viewportCoords=new h_,this._spatial=new zd}getFrameIdAt(e){return new Promise(((t,i)=>{this._container.renderService.renderCamera$.pipe(vt(),ze((t=>{const i=this._viewportCoords.canvasToViewport(e[0],e[1],this._container.container);return this._scene.intersection.intersectObjects(i,t.perspective)}))).subscribe((e=>{t(e)}),(e=>{i(e)}))}))}_activate(){this._navigator.cacheService.configure({cellDepth:3});const e=this._subscriptions;e.push(this._navigator.stateService.reference$.pipe(wt()).subscribe((([e,t])=>{this._scene.resetReference(t,e)}))),e.push(this._navigator.graphService.filter$.subscribe((e=>{this._scene.setFilter(e)})));const t=this._container.renderService.bearing$.pipe(ze((e=>6*Math.floor(e/6))),dt(),St(1),F()),i=this._navigator.stateService.currentImage$.pipe(ze((e=>this._navigator.api.data.geometry.lngLatToCellId(e.originalLngLat))),dt(),St(1),F()),n=this._configuration$.pipe(ze((e=>this._spatial.clamp(e.cellGridDepth,1,3))),dt(),St(1),F()),r=$e(this._navigator.playService.playing$,this._navigator.playService.speed$).pipe(ze((([e,t])=>e&&t>yM.sequenceSpeed)),dt(),St(1),F()),s=this._navigator.stateService.state$.pipe(ze((e=>function(e){return e===O_.Custom||e===O_.Earth}(e))),dt(),St(1),F());e.push(s.subscribe((e=>{this._scene.setNavigationState(e)})));const a=$e(s,r,t,n,this._navigator.stateService.currentImage$).pipe(dt((([e,t,i,n,r],[s,a,o,c,l])=>{if(e!==s)return!1;const h=r.id===l.id&&t===a&&n===c;return e?h:h&&i===o})),ot((([e,t,i,n,r])=>{if(e){const e=this._navigator.api.data.geometry,i=e.lngLatToCellId(r.originalLngLat);return Ne(t?[i]:PM(i,n,e))}const s=t?30:90;return Ne(this._cellsInFov(r,i,s))})),zt((e=>_e(e).pipe(Ge((e=>(this._cache.hasCell(e)?Ne(this._cache.getCell(e)):this._cache.cacheCell$(e)).pipe(ze((t=>({id:e,images:t}))))),6)))));e.push(a.pipe(Pt(this._navigator.stateService.reference$)).subscribe((([e,t])=>{this._scene.hasCell(e.id)||this._scene.addCell(this._cellToTopocentric(e.id,t),e.id)}))),e.push(a.pipe(Pt(this._navigator.stateService.reference$)).subscribe((([e,t])=>{this._addSceneImages(e,t)}))),e.push(a.pipe(ot((e=>{const t=e.id;let i;return i=this._cache.hasClusters(t)?_e(this._cache.getClusters(t)):this._cache.isCachingClusters(t)?this._cache.cacheClusters$(t).pipe(xt(null,{}),zt((()=>_e(this._cache.getClusters(t))))):this._cache.hasCell(t)?this._cache.cacheClusters$(t):re(),$e(Ne(t),i)})),Pt(this._navigator.stateService.reference$)).subscribe((([[e,t],i])=>{this._scene.hasCluster(t.id,e)||this._scene.addCluster(t,this._computeTranslation(t,i),e)}))),e.push(this._configuration$.pipe(ze((e=>{var t;e.cameraSize=this._spatial.clamp(e.cameraSize,.01,1),e.pointSize=this._spatial.clamp(e.pointSize,.01,1);const i=e.pointsVisible?null!==(t=e.pointVisualizationMode)&&void 0!==t?t:B_.Original:B_.Hidden;return{cameraSize:e.cameraSize,cameraVisualizationMode:e.cameraVisualizationMode,cellsVisible:e.cellsVisible,originalPositionMode:e.originalPositionMode,pointSize:e.pointSize,pointVisualizationMode:i}})),dt(((e,t)=>e.cameraSize===t.cameraSize&&e.cameraVisualizationMode===t.cameraVisualizationMode&&e.cellsVisible===t.cellsVisible&&e.originalPositionMode===t.originalPositionMode&&e.pointSize===t.pointSize&&e.pointVisualizationMode===t.pointVisualizationMode))).subscribe((e=>{this._scene.setCameraSize(e.cameraSize);const t=e.cameraVisualizationMode;this._scene.setCameraVisualizationMode(t),this._scene.setCellVisibility(e.cellsVisible),this._scene.setPointSize(e.pointSize);const i=e.pointVisualizationMode;this._scene.setPointVisualizationMode(i);const n=e.originalPositionMode;this._scene.setPositionMode(n)}))),e.push($e(i,n).subscribe((([e,t])=>{const i=PM(e,t,this._navigator.api.data.geometry);this._scene.uncache(i),this._cache.uncache(i)}))),e.push(this._navigator.playService.playing$.pipe(zt((e=>e?re():this._container.mouseService.dblClick$)),Pt(this._container.renderService.renderCamera$),zt((([e,t])=>{const i=this._container.container,[n,r]=this._viewportCoords.canvasPosition(e,i),s=this._viewportCoords.canvasToViewport(n,r,i),a=this._scene.intersection.intersectObjects(s,t.perspective);return a?this._navigator.moveTo$(a).pipe(rt((()=>re()))):re()}))).subscribe());const o=$e(this._configuration$,this._navigator.stateService.state$).pipe(ze((([e,t])=>(e.cameraSize=this._spatial.clamp(e.cameraSize,.01,1),{size:e.cameraSize,visible:jM(e.cameraVisualizationMode),state:t}))),dt(((e,t)=>e.size===t.size&&e.visible===t.visible&&e.state===t.state))),c=this._container.mouseService.mouseMove$.pipe(St(1),F());e.push(c.subscribe());const l=Je(this._container.mouseService.mouseEnter$,this._container.mouseService.mouseLeave$,this._container.mouseService.windowBlur$);e.push($e(this._navigator.playService.playing$,l,s,this._navigator.graphService.filter$).pipe(zt((([e,t])=>e||"pointerenter"!==t.type?$e(Ne(t),Ne(null),Ne(null)):$e(Ve(c.pipe(pt(1)),this._container.mouseService.mouseMove$),this._container.renderService.renderCamera$,o)))).subscribe((([e,t])=>{if("pointermove"!==e.type)return void this._scene.setHoveredImage(null);const i=this._container.container,[n,r]=this._viewportCoords.canvasPosition(e,i),s=this._viewportCoords.canvasToViewport(n,r,i),a=this._scene.intersection.intersectObjects(s,t.perspective);this._scene.setHoveredImage(a)}))),e.push(this._navigator.stateService.currentId$.subscribe((e=>{this._scene.setSelectedImage(e)}))),e.push(this._navigator.stateService.currentState$.pipe(ze((e=>{const t=this._scene;return{name:this._name,renderer:{frameId:e.id,needsRender:t.needsRender,render:t.render.bind(t),pass:n_.Opaque}}}))).subscribe(this._container.glRenderer.render$));const h=this._navigator.graphService.dataAdded$.pipe(et((e=>this._cache.hasCell(e))),Ge((e=>this._cache.updateCell$(e).pipe(ze((t=>({id:e,images:t}))),Pt(this._navigator.stateService.reference$)))),Tt(),F());e.push(h.subscribe((([e,t])=>{this._addSceneImages(e,t)}))),e.push(h.pipe(ot((([e])=>{const t=e.id,i=this._cache;let n;return n=i.hasClusters(t)?i.updateClusters$(t):i.isCachingClusters(t)?this._cache.cacheClusters$(t).pipe(xt(null,{}),zt((()=>_e(i.updateClusters$(t))))):re(),$e(Ne(t),n)})),Pt(this._navigator.stateService.reference$)).subscribe((([[e,t],i])=>{this._scene.hasCluster(t.id,e)||this._scene.addCluster(t,this._computeTranslation(t,i),e)})))}_deactivate(){this._subscriptions.unsubscribe(),this._cache.uncache(),this._scene.deactivate(),this._navigator.cacheService.configure()}_getDefaultConfiguration(){return{cameraSize:.1,cameraVisualizationMode:U_.Homogeneous,cellGridDepth:1,originalPositionMode:$_.Hidden,pointSize:.1,pointsVisible:!0,pointVisualizationMode:B_.Original,cellsVisible:!1}}_addSceneImages(e,t){const i=e.id,n=e.images;for(const e of n)this._scene.hasImage(e.id,i)||this._scene.addImage(e,this._createTransform(e,t),this._computeOriginalPosition(e,t),i)}_cellsInFov(e,t,i){const n=this._spatial,r=this._navigator.api.data.geometry,s=r.lngLatToCellId(e.originalLngLat),a=[s],o=i/2,c=r.getAdjacent(s);for(const i of c){const s=r.getVertices(i);for(const r of s){const[s,c]=_d(r.lng,r.lat,0,e.lngLat.lng,e.lngLat.lat,0),l=Math.atan2(c,s),h=n.radToDeg(n.azimuthalToBearing(l));Math.abs(h-t)_d(e.lng,e.lat,-2,t.lng,t.lat,t.alt)));return i}_computeTranslation(e,t){return _d(e.reference.lng,e.reference.lat,e.reference.alt,t.lng,t.lat,t.alt)}_createTransform(e,t){const i=Pd({alt:e.computedAltitude,lat:e.lngLat.lat,lng:e.lngLat.lng},e.rotation,t);return new fM(e.exifOrientation,e.width,e.height,e.scale,e.rotation,i,void 0,void 0,e.cameraParameters,e.cameraType)}}UM.componentName="spatial";class $M{constructor(){this._notifyChanged$=new V}get changed$(){return this._notifyChanged$}}class BM extends Ed{constructor(e){super(null!=e?e:"The provided geometry value is incorrect"),Object.setPrototypeOf(this,BM.prototype),this.name="GeometryTagError"}}class FM extends $M{constructor(e){if(super(),e.length<2)throw new BM("A points geometry must have two or more positions.");this._points=[];for(const t of e){if(t[0]<0||t[0]>1||t[1]<0||t[1]>1)throw new BM("Basic coordinates of points must be on the interval [0, 1].");this._points.push(t.slice())}}get points(){return this._points}addPoint2d(e){const t=[Math.max(0,Math.min(1,e[0])),Math.max(0,Math.min(1,e[1]))];this._points.push(t),this._notifyChanged$.next(this)}getPoint2d(e){return this._points[e].slice()}removePoint2d(e){if(e<0||e>=this._points.length||this._points.length<3)throw new BM("Index for removed point must be valid.");this._points.splice(e,1),this._notifyChanged$.next(this)}setVertex2d(e,t,i){this.setPoint2d(e,t,i)}setPoint2d(e,t,i){const n=[Math.max(0,Math.min(1,t[0])),Math.max(0,Math.min(1,t[1]))];this._points[e]=n,this._notifyChanged$.next(this)}getPoints3d(e){return this._getPoints3d(this._points,e)}getPoint3d(e,t){return t.unprojectBasic(this._points[e],200)}getPoints2d(){return this._points.slice()}getCentroid2d(e){if(!e)throw new BM("Get centroid must be called with a transform for points geometries.");const[t,i,n,r]=this.getRect2d(e);return[ti&&(i=e[0]),e[1]r&&(r=e[1]);if(Od(e.cameraType)){const e=[];for(let t=0;ts[e][0]s[t][0]?1:en&&(n=o,r=t+1)}r>0&&(t=s[e[r]][0],i=s[e[r-1]][0])}return[t,n,i,r]}setCentroid2d(e,t){throw new Error("Not implemented")}_getPoints3d(e,t){return e.map((e=>t.unprojectBasic(e,200)))}}class GM{constructor(e,t,i){this._geometry=e,this._transform=t,this._viewportCoords=i||new h_,this._aborted$=new V,this._created$=new V,this._glObjectsChanged$=new V,this._geometryChangedSubscription=this._geometry.changed$.subscribe((()=>{this._onGeometryChanged(),this._glObjectsChanged$.next(this)}))}get geometry(){return this._geometry}get glObjects(){return this._glObjects}get aborted$(){return this._aborted$}get created$(){return this._created$}get glObjectsChanged$(){return this._glObjectsChanged$}get geometryChanged$(){return this._geometry.changed$.pipe(ze((()=>this)))}dispose(){this._geometryChangedSubscription.unsubscribe()}_canvasToTransform(e){return`translate(-50%,-50%) translate(${Math.round(e[0])}px,${Math.round(e[1])}px)`}_colorToBackground(e){return"#"+("000000"+e.toString(16)).substr(-6)}_createOutine(e,t){const i=this._getLinePositions(e),n=new Ra;n.setAttribute("position",new Da(i,3));const r=new Bh({color:t,linewidth:1});return new qh(n,r)}_disposeLine(e){null!=e&&(e.geometry.dispose(),e.material.dispose())}_getLinePositions(e){const t=e.length,i=new Float32Array(3*t);for(let n=0;n80*i){n=s=e[0],r=a=e[1];for(var g=i;gs&&(s=o),c>a&&(a=c);l=0!==(l=Math.max(s-n,a-r))?1/l:0}return WM(p,d,i,n,r,l),d}function YM(e,t,i,n,r){var s,a;if(r===fv(e,t,i,n)>0)for(s=t;s=t;s-=n)a=dv(s,e[s],e[s+1],a);return a&&ov(a,a.next)&&(gv(a),a=a.next),a}function qM(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!ov(n,n.next)&&0!==av(n.prev,n,n.next))n=n.next;else{if(gv(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function WM(e,t,i,n,r,s,a){if(e){!a&&s&&function(e,t,i,n){var r=e;do{null===r.z&&(r.z=iv(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,function(e){var t,i,n,r,s,a,o,c,l=1;do{for(i=e,e=null,s=null,a=0;i;){for(a++,n=i,o=0,t=0;t0||c>0&&n;)0!==o&&(0===c||!n||i.z<=n.z)?(r=i,i=i.nextZ,o--):(r=n,n=n.nextZ,c--),s?s.nextZ=r:e=r,r.prevZ=s,s=r;i=n}s.nextZ=null,l*=2}while(a>1)}(r)}(e,n,r,s);for(var o,c,l=e;e.prev!==e.next;)if(o=e.prev,c=e.next,s?ZM(e,n,r,s):QM(e))t.push(o.i/i),t.push(e.i/i),t.push(c.i/i),gv(e),e=c.next,l=c.next;else if((e=c)===l){a?1===a?WM(e=XM(qM(e),t,i),t,i,n,r,s,2):2===a&&JM(e,t,i,n,r,s):WM(qM(e),t,i,n,r,s,1);break}}}function QM(e){var t=e.prev,i=e,n=e.next;if(av(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(rv(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&av(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function ZM(e,t,i,n){var r=e.prev,s=e,a=e.next;if(av(r,s,a)>=0)return!1;for(var o=r.xs.x?r.x>a.x?r.x:a.x:s.x>a.x?s.x:a.x,h=r.y>s.y?r.y>a.y?r.y:a.y:s.y>a.y?s.y:a.y,u=iv(o,c,t,i,n),p=iv(l,h,t,i,n),d=e.prevZ,g=e.nextZ;d&&d.z>=u&&g&&g.z<=p;){if(d!==e.prev&&d!==e.next&&rv(r.x,r.y,s.x,s.y,a.x,a.y,d.x,d.y)&&av(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,g!==e.prev&&g!==e.next&&rv(r.x,r.y,s.x,s.y,a.x,a.y,g.x,g.y)&&av(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&rv(r.x,r.y,s.x,s.y,a.x,a.y,d.x,d.y)&&av(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;g&&g.z<=p;){if(g!==e.prev&&g!==e.next&&rv(r.x,r.y,s.x,s.y,a.x,a.y,g.x,g.y)&&av(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function XM(e,t,i){var n=e;do{var r=n.prev,s=n.next.next;!ov(r,s)&&cv(r,n,n.next,s)&&uv(r,s)&&uv(s,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(s.i/i),gv(n),gv(n.next),n=e=s),n=n.next}while(n!==e);return qM(n)}function JM(e,t,i,n,r,s){var a=e;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&sv(a,o)){var c=pv(a,o);return a=qM(a,a.next),c=qM(c,c.next),WM(a,t,i,n,r,s),void WM(c,t,i,n,r,s)}o=o.next}a=a.next}while(a!==e)}function KM(e,t){return e.x-t.x}function ev(e,t){var i=function(e,t){var i,n=t,r=e.x,s=e.y,a=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var o=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=r&&o>a){if(a=o,o===r){if(s===n.y)return n;if(s===n.next.y)return n.next}i=n.x=n.x&&n.x>=h&&r!==n.x&&rv(si.x||n.x===i.x&&tv(i,n)))&&(i=n,p=c)),n=n.next}while(n!==l);return i}(e,t);if(!i)return t;var n=pv(i,e),r=qM(i,i.next);return qM(n,n.next),t===i?r:t}function tv(e,t){return av(e.prev,e,t.prev)<0&&av(t.next,e,e.next)<0}function iv(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function nv(e){var t=e,i=e;do{(t.x=0&&(e-a)*(n-o)-(i-a)*(t-o)>=0&&(i-a)*(s-o)-(r-a)*(n-o)>=0}function sv(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&cv(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}(e,t)&&(uv(e,t)&&uv(t,e)&&function(e,t){var i=e,n=!1,r=(e.x+t.x)/2,s=(e.y+t.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}(e,t)&&(av(e.prev,e,t.prev)||av(e,t.prev,t))||ov(e,t)&&av(e.prev,e,e.next)>0&&av(t.prev,t,t.next)>0)}function av(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function ov(e,t){return e.x===t.x&&e.y===t.y}function cv(e,t,i,n){var r=hv(av(e,t,i)),s=hv(av(e,t,n)),a=hv(av(i,n,e)),o=hv(av(i,n,t));return r!==s&&a!==o||!(0!==r||!lv(e,i,t))||!(0!==s||!lv(e,n,t))||!(0!==a||!lv(i,e,n))||!(0!==o||!lv(i,t,n))}function lv(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function hv(e){return e>0?1:e<0?-1:0}function uv(e,t){return av(e.prev,e,e.next)<0?av(e,t,e.next)>=0&&av(e,e.prev,t)>=0:av(e,t,e.prev)<0||av(e,e.next,t)<0}function pv(e,t){var i=new mv(e.i,e.x,e.y),n=new mv(t.i,t.x,t.y),r=e.next,s=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function dv(e,t,i,n){var r=new mv(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function gv(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function mv(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function fv(e,t,i,n){for(var r=0,s=t,a=i-n;s0&&(n+=e[r-1].length,i.holes.push(n))}return i};var _v=HM.exports,Mv={exports:{}};function vv(e,t){return et?1:0}var yv=hg(Object.freeze({__proto__:null,default:class{constructor(e=[],t=vv){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:i}=this,n=t[e];for(;e>0;){const r=e-1>>1,s=t[r];if(i(n,s)>=0)break;t[e]=s,e=r}t[e]=n}_down(e){const{data:t,compare:i}=this,n=this.length>>1,r=t[e];for(;e=0)break;t[e]=s,e=n}t[e]=r}}}));function xv(e,t,i){var n,r,s,a;t=t||1;for(var o=0;os)&&(s=c[0]),(!o||c[1]>a)&&(a=c[1])}var l=s-n,h=a-r,u=Math.min(l,h),p=u/2;if(0===u){var d=[n,r];return d.distance=0,d}for(var g=new yv(void 0,bv),m=n;m_.d&&(_=M);for(var v=g.length;g.length;){var y=g.pop();y.d>_.d&&(_=y,i&&console.log("found best %d after %d probes",Math.round(1e4*y.d)/1e4,v)),y.max-_.d<=t||(p=y.h/2,g.push(new wv(y.x-p,y.y-p,p,e)),g.push(new wv(y.x+p,y.y-p,p,e)),g.push(new wv(y.x-p,y.y+p,p,e)),g.push(new wv(y.x+p,y.y+p,p,e)),v+=4)}i&&(console.log("num probes: "+v),console.log("best distance: "+_.d));var x=[_.x,_.y];return x.distance=_.d,x}function bv(e,t){return t.max-e.max}function wv(e,t,i,n){this.x=e,this.y=t,this.h=i,this.d=function(e,t,i){for(var n=!1,r=1/0,s=0;st!=u[1]>t&&e<(u[0]-h[0])*(t-h[1])/(u[1]-h[1])+h[0]&&(n=!n),r=Math.min(r,Tv(e,t,h,u))}return 0===r?0:(n?1:-1)*Math.sqrt(r)}(e,t,n),this.max=this.d+this.h*Math.SQRT2}function Tv(e,t,i,n){var r=i[0],s=i[1],a=n[0]-r,o=n[1]-s;if(0!==a||0!==o){var c=((e-r)*a+(t-s)*o)/(a*a+o*o);c>1?(r=n[0],s=n[1]):c>0&&(r+=a*c,s+=o*c)}return(a=e-r)*a+(o=t-s)*o}yv.default&&(yv=yv.default),Mv.exports=xv,Mv.exports.default=xv;var Sv=Mv.exports;function Nv(e,t){return e>t?1:e0))return t;t=t.left}}return null}contains(e){for(var t=this._root,i=this._compare;t;){var n=i(e,t.key);if(0===n)return!0;t=n<0?t.left:t.right}return!1}remove(e){var t=this.find(e);if(!t)return!1;if(this.splay(t),t.left)if(t.right){var i=this.minNode(t.right);i.parent!==t&&(this.replace(i,i.right),i.right=t.right,i.right.parent=i),this.replace(t,i),i.left=t.left,i.left.parent=i}else this.replace(t,t.left);else this.replace(t,t.right);return this._size--,!0}removeNode(e){if(!e)return!1;if(this.splay(e),e.left)if(e.right){var t=this.minNode(e.right);t.parent!==e&&(this.replace(t,t.right),t.right=e.right,t.right.parent=t),this.replace(e,t),t.left=e.left,t.left.parent=t}else this.replace(e,e.left);else this.replace(e,e.right);return this._size--,!0}erase(e){var t=this.find(e);if(t){this.splay(t);var i=t.left,n=t.right,r=null;i&&(i.parent=null,r=this.maxNode(i),this.splay(r),this._root=r),n&&(i?r.right=n:this._root=n,n.parent=r),this._size--}}pop(){var e=this._root,t=null;if(e){for(;e.left;)e=e.left;t={key:e.key,data:e.data},this.remove(e.key)}return t}next(e){var t=e;if(t)if(t.right)for(t=t.right;t&&t.left;)t=t.left;else for(t=e.parent;t&&t.right===e;)e=t,t=t.parent;return t}prev(e){var t=e;if(t)if(t.left)for(t=t.left;t&&t.right;)t=t.right;else for(t=e.parent;t&&t.left===e;)e=t,t=t.parent;return t}forEach(e){for(var t=this._root,i=[],n=!1,r=0;!n;)t?(i.push(t),t=t.left):i.length>0?(e(t=i.pop(),r++),t=t.right):n=!0;return this}range(e,t,i,n){const r=[],s=this._compare;let a,o=this._root;for(;0!==r.length||o;)if(o)r.push(o),o=o.left;else{if(o=r.pop(),a=s(o.key,t),a>0)break;if(s(o.key,e)>=0&&i.call(n,o))return this;o=o.right}return this}keys(){for(var e=this._root,t=[],i=[],n=!1;!n;)e?(t.push(e),e=e.left):t.length>0?(e=t.pop(),i.push(e.key),e=e.right):n=!0;return i}values(){for(var e=this._root,t=[],i=[],n=!1;!n;)e?(t.push(e),e=e.left):t.length>0?(e=t.pop(),i.push(e.data),e=e.right):n=!0;return i}at(e){for(var t=this._root,i=[],n=!1,r=0;!n;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),r===e)return t;r++,t=t.right}else n=!0;return null}load(e=[],t=[],i=!1){if(0!==this._size)throw new Error("bulk-load: tree is not empty");const n=e.length;return i&&Cv(e,t,0,n-1,this._compare),this._root=Iv(null,e,t,0,n),this._size=n,this}min(){var e=this.minNode(this._root);return e?e.key:null}max(){var e=this.maxNode(this._root);return e?e.key:null}isEmpty(){return null===this._root}get size(){return this._size}static createTree(e,t,i,n,r){return new Dv(i,r).load(e,t,n)}}function Iv(e,t,i,n,r){const s=r-n;if(s>0){const a=n+Math.floor(s/2),o={key:t[a],data:i[a],parent:e};return o.left=Iv(o,t,i,n,a),o.right=Iv(o,t,i,a+1,r),o}return null}function Cv(e,t,i,n,r){if(i>=n)return;const s=e[i+n>>1];let a=i-1,o=n+1;for(;;){do{a++}while(r(e[a],s)<0);do{o--}while(r(e[o],s)>0);if(a>=o)break;let i=e[a];e[a]=e[o],e[o]=i,i=t[a],t[a]=t[o],t[o]=i}Cv(e,t,i,o,r),Cv(e,t,o+1,n,r)}const Av=0,Ev=1,Lv=2,zv=3,jv=0,Ov=1,kv=2,Pv=3;function Rv(e,t,i){null===t?(e.inOut=!1,e.otherInOut=!0):(e.isSubject===t.isSubject?(e.inOut=!t.inOut,e.otherInOut=t.otherInOut):(e.inOut=!t.otherInOut,e.otherInOut=t.isVertical()?!t.inOut:t.inOut),t&&(e.prevInResult=!Uv(t,i)||t.isVertical()?t.prevInResult:t));let n=Uv(e,i);e.resultTransition=n?function(e,t){let i,n=!e.inOut,r=!e.otherInOut;switch(t){case jv:i=n&&r;break;case Ov:i=n||r;break;case Pv:i=n^r;break;case kv:i=e.isSubject?n&&!r:r&&!n}return i?1:-1}(e,i):0}function Uv(e,t){switch(e.type){case Av:switch(t){case jv:return!e.otherInOut;case Ov:return e.otherInOut;case kv:return e.isSubject&&e.otherInOut||!e.isSubject&&!e.otherInOut;case Pv:return!0}break;case Lv:return t===jv||t===Ov;case zv:return t===kv;case Ev:return!1}return!1}class $v{constructor(e,t,i,n,r){this.left=t,this.point=e,this.otherEvent=i,this.isSubject=n,this.type=r||Av,this.inOut=!1,this.otherInOut=!1,this.prevInResult=null,this.resultTransition=0,this.otherPos=-1,this.outputContourId=-1,this.isExteriorRing=!0}isBelow(e){const t=this.point,i=this.otherEvent.point;return this.left?(t[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(t[1]-e[1])>0:(i[0]-e[0])*(t[1]-e[1])-(t[0]-e[0])*(i[1]-e[1])>0}isAbove(e){return!this.isBelow(e)}isVertical(){return this.point[0]===this.otherEvent.point[0]}get inResult(){return 0!==this.resultTransition}clone(){const e=new $v(this.point,this.left,this.otherEvent,this.isSubject,this.type);return e.contourId=this.contourId,e.resultTransition=this.resultTransition,e.prevInResult=this.prevInResult,e.isExteriorRing=this.isExteriorRing,e.inOut=this.inOut,e.otherInOut=this.otherInOut,e}}function Bv(e,t){return e[0]===t[0]&&e[1]===t[1]}const Fv=11102230246251565e-32,Gv=134217729,Hv=(3+8*Fv)*Fv;function Vv(e,t,i,n,r){let s,a,o,c,l=t[0],h=n[0],u=0,p=0;h>l==h>-l?(s=l,l=t[++u]):(s=h,h=n[++p]);let d=0;if(ul==h>-l?(a=l+s,o=s-(a-l),l=t[++u]):(a=h+s,o=s-(a-h),h=n[++p]),s=a,0!==o&&(r[d++]=o);ul==h>-l?(a=s+l,c=a-s,o=s-(a-c)+(l-c),l=t[++u]):(a=s+h,c=a-s,o=s-(a-c)+(h-c),h=n[++p]),s=a,0!==o&&(r[d++]=o);for(;u0!=o>0)return c;const l=Math.abs(a+o);return Math.abs(c)>=qv*l?c:-function(e,t,i,n,r,s,a){let o,c,l,h,u,p,d,g,m,f,_,M,v,y,x,b,w,T;const S=e-r,N=i-r,D=t-s,I=n-s;y=S*I,p=Gv*S,d=p-(p-S),g=S-d,p=Gv*I,m=p-(p-I),f=I-m,x=g*f-(y-d*m-g*m-d*f),b=D*N,p=Gv*D,d=p-(p-D),g=D-d,p=Gv*N,m=p-(p-N),f=N-m,w=g*f-(b-d*m-g*m-d*f),_=x-w,u=x-_,Zv[0]=x-(_+u)+(u-w),M=y+_,u=M-y,v=y-(M-u)+(_-u),_=v-b,u=v-_,Zv[1]=v-(_+u)+(u-b),T=M+_,u=T-M,Zv[2]=M-(T-u)+(_-u),Zv[3]=T;let C=function(e,t){let i=t[0];for(let e=1;e<4;e++)i+=t[e];return i}(0,Zv),A=Wv*a;if(C>=A||-C>=A)return C;if(u=e-S,o=e-(S+u)+(u-r),u=i-N,l=i-(N+u)+(u-r),u=t-D,c=t-(D+u)+(u-s),u=n-I,h=n-(I+u)+(u-s),0===o&&0===c&&0===l&&0===h)return C;if(A=Qv*a+Hv*Math.abs(C),C+=S*h+I*o-(D*l+N*c),C>=A||-C>=A)return C;y=o*I,p=Gv*o,d=p-(p-o),g=o-d,p=Gv*I,m=p-(p-I),f=I-m,x=g*f-(y-d*m-g*m-d*f),b=c*N,p=Gv*c,d=p-(p-c),g=c-d,p=Gv*N,m=p-(p-N),f=N-m,w=g*f-(b-d*m-g*m-d*f),_=x-w,u=x-_,ey[0]=x-(_+u)+(u-w),M=y+_,u=M-y,v=y-(M-u)+(_-u),_=v-b,u=v-_,ey[1]=v-(_+u)+(u-b),T=M+_,u=T-M,ey[2]=M-(T-u)+(_-u),ey[3]=T;const E=Vv(4,Zv,4,ey,Xv);y=S*h,p=Gv*S,d=p-(p-S),g=S-d,p=Gv*h,m=p-(p-h),f=h-m,x=g*f-(y-d*m-g*m-d*f),b=D*l,p=Gv*D,d=p-(p-D),g=D-d,p=Gv*l,m=p-(p-l),f=l-m,w=g*f-(b-d*m-g*m-d*f),_=x-w,u=x-_,ey[0]=x-(_+u)+(u-w),M=y+_,u=M-y,v=y-(M-u)+(_-u),_=v-b,u=v-_,ey[1]=v-(_+u)+(u-b),T=M+_,u=T-M,ey[2]=M-(T-u)+(_-u),ey[3]=T;const L=Vv(E,Xv,4,ey,Jv);y=o*h,p=Gv*o,d=p-(p-o),g=o-d,p=Gv*h,m=p-(p-h),f=h-m,x=g*f-(y-d*m-g*m-d*f),b=c*l,p=Gv*c,d=p-(p-c),g=c-d,p=Gv*l,m=p-(p-l),f=l-m,w=g*f-(b-d*m-g*m-d*f),_=x-w,u=x-_,ey[0]=x-(_+u)+(u-w),M=y+_,u=M-y,v=y-(M-u)+(_-u),_=v-b,u=v-_,ey[1]=v-(_+u)+(u-b),T=M+_,u=T-M,ey[2]=M-(T-u)+(_-u),ey[3]=T;const z=Vv(L,Jv,4,ey,Kv);return Kv[z-1]}(e,t,i,n,r,s,l)}(e[0],e[1],t[0],t[1],i[0],i[1]);return n>0?-1:n<0?1:0}function iy(e,t){const i=e.point,n=t.point;return i[0]>n[0]?1:i[0]n[1]?1:-1:function(e,t,i,n){return e.left!==t.left?e.left?1:-1:0!==ty(i,e.otherEvent.point,t.otherEvent.point)?e.isBelow(t.otherEvent.point)?-1:1:!e.isSubject&&t.isSubject?1:-1}(e,t,i)}function ny(e,t,i){const n=new $v(t,!1,e,e.isSubject),r=new $v(t,!0,e.otherEvent,e.isSubject);return Bv(e.point,e.otherEvent.point)&&console.warn("what is that, a collapsed segment?",e),n.contourId=r.contourId=e.contourId,iy(r,e.otherEvent)>0&&(e.otherEvent.left=!0,r.left=!1),e.otherEvent.otherEvent=r,e.otherEvent=n,i.push(r),i.push(n),i}function ry(e,t){return e[0]*t[1]-e[1]*t[0]}function sy(e,t){return e[0]*t[0]+e[1]*t[1]}function ay(e,t,i){const n=function(e,t,i,n,r){const s=[t[0]-e[0],t[1]-e[1]],a=[n[0]-i[0],n[1]-i[1]];function o(e,t,i){return[e[0]+t*i[0],e[1]+t*i[1]]}const c=[i[0]-e[0],i[1]-e[1]];let l=ry(s,a),h=l*l;const u=sy(s,s);if(h>0){const t=ry(c,a)/l;if(t<0||t>1)return null;const n=ry(c,s)/l;return n<0||n>1?null:0===t||1===t?[o(e,t,s)]:0===n||1===n?[o(i,n,a)]:[o(e,t,s)]}if(l=ry(c,s),h=l*l,h>0)return null;const p=sy(s,c)/u,d=p+sy(s,a)/u,g=Math.min(p,d),m=Math.max(p,d);return g<=1&&m>=0?1===g?[o(e,g>0?g:0,s)]:0===m?[o(e,m<1?m:1,s)]:[o(e,g>0?g:0,s),o(e,m<1?m:1,s)]:null}(e.point,e.otherEvent.point,t.point,t.otherEvent.point),r=n?n.length:0;if(0===r)return 0;if(1===r&&(Bv(e.point,t.point)||Bv(e.otherEvent.point,t.otherEvent.point)))return 0;if(2===r&&e.isSubject===t.isSubject)return 0;if(1===r)return Bv(e.point,n[0])||Bv(e.otherEvent.point,n[0])||ny(e,n[0],i),Bv(t.point,n[0])||Bv(t.otherEvent.point,n[0])||ny(t,n[0],i),1;const s=[];let a=!1,o=!1;return Bv(e.point,t.point)?a=!0:1===iy(e,t)?s.push(t,e):s.push(e,t),Bv(e.otherEvent.point,t.otherEvent.point)?o=!0:1===iy(e.otherEvent,t.otherEvent)?s.push(t.otherEvent,e.otherEvent):s.push(e.otherEvent,t.otherEvent),a&&o||a?(t.type=Ev,e.type=t.inOut===e.inOut?Lv:zv,a&&!o&&ny(s[1].otherEvent,s[0].point,i),2):o?(ny(s[0],s[1].point,i),3):s[0]!==s[3].otherEvent?(ny(s[0],s[1].point,i),ny(s[1],s[2].point,i),3):(ny(s[0],s[1].point,i),ny(s[3].otherEvent,s[2].point,i),3)}function oy(e,t){if(e===t)return 0;if(0!==ty(e.point,e.otherEvent.point,t.point)||0!==ty(e.point,e.otherEvent.point,t.otherEvent.point))return Bv(e.point,t.point)?e.isBelow(t.otherEvent.point)?-1:1:e.point[0]===t.point[0]?e.point[1]t.contourId?1:-1}return 1===iy(e,t)?1:-1}class cy{constructor(){this.points=[],this.holeIds=[],this.holeOf=null,this.depth=null}isExterior(){return null==this.holeOf}}function ly(e,t,i,n){let r,s=e+1,a=t[e].point;const o=t.length;for(sn;)s--;return s}function hy(e,t,i){const n=new cy;if(null!=e.prevInResult){const r=e.prevInResult,s=r.outputContourId;if(r.resultTransition>0){const e=t[s];if(null!=e.holeOf){const r=e.holeOf;t[r].holeIds.push(i),n.holeOf=r,n.depth=t[s].depth}else t[s].holeIds.push(i),n.holeOf=s,n.depth=t[s].depth+1}else n.holeOf=null,n.depth=t[s].depth}else n.holeOf=null,n.depth=0;return n}var uy={exports:{}};function py(e,t){if(!(this instanceof py))return new py(e,t);if(this.data=e||[],this.length=this.data.length,this.compare=t||dy,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)}function dy(e,t){return et?1:0}uy.exports=py,uy.exports.default=py,py.prototype={push:function(e){this.data.push(e),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},_up:function(e){for(var t=this.data,i=this.compare,n=t[e];e>0;){var r=e-1>>1,s=t[r];if(i(n,s)>=0)break;t[e]=s,e=r}t[e]=n},_down:function(e){for(var t=this.data,i=this.compare,n=this.length>>1,r=t[e];e=0)break;t[e]=o,e=s}t[e]=r}};var gy=uy.exports;const my=Math.max,fy=Math.min;let _y=0;function My(e,t,i,n,r,s){let a,o,c,l,h,u;for(a=0,o=e.length-1;a0?u.left=!0:h.left=!0;const o=c[0],p=c[1];r[0]=fy(r[0],o),r[1]=fy(r[1],p),r[2]=my(r[2],o),r[3]=my(r[3],p),n.push(h),n.push(u)}}const vy=[];function yy(e,t,i){"number"==typeof e[0][0][0]&&(e=[e]),"number"==typeof t[0][0][0]&&(t=[t]);let n=function(e,t,i){let n=null;return e.length*t.length==0&&(i===jv?n=vy:i===kv?n=e:i!==Ov&&i!==Pv||(n=0===e.length?t:e)),n}(e,t,i);if(n)return n===vy?null:n;const r=[1/0,1/0,-1/0,-1/0],s=[1/0,1/0,-1/0,-1/0],a=function(e,t,i,n,r){const s=new gy(null,iy);let a,o,c,l,h,u;for(c=0,l=e.length;cn[2]||n[0]>i[2]||i[1]>n[3]||n[1]>i[3])&&(r===jv?s=vy:r===kv?s=e:r!==Ov&&r!==Pv||(s=e.concat(t))),s}(e,t,r,s,i),n)return n===vy?null:n;const o=function(e,t,i,n,r,s){const a=new Dv(oy),o=[],c=Math.min(n[2],r[2]);let l,h,u;for(;0!==e.length;){let t=e.pop();if(o.push(t),s===jv&&t.point[0]>c||s===kv&&t.point[0]>n[2])break;if(t.left){h=l=a.insert(t),u=a.minNode(),l=l!==u?a.prev(l):null,h=a.next(h);const i=l?l.key:null;let n;if(Rv(t,i,s),h&&2===ay(t,h.key,e)&&(Rv(t,i,s),Rv(t,h.key,s)),l&&2===ay(l.key,t,e)){let e=l;e=e!==u?a.prev(e):null,n=e?e.key:null,Rv(i,n,s),Rv(t,i,s)}}else t=t.otherEvent,h=l=a.find(t),l&&h&&(l=l!==u?a.prev(l):null,h=a.next(h),a.remove(t),h&&l&&ay(l.key,h.key,e))}return o}(a,0,0,r,s,i),c=function(e){let t,i;const n=function(e){let t,i,n,r;const s=[];for(i=0,n=e.length;i{r[t]=!0,n[t].outputContourId=e};let o=t,c=t;const l=n[t].point;for(i.points.push(l);a(o),o=n[o].otherPos,a(o),i.points.push(n[o].point),o=ly(o,n,r,c),o!=c;);s.push(i)}return s}(o),l=[];for(let e=0;et.unprojectBasic(e,i)))}_createCamera(e,t,i){const n=new lo;return n.up.copy((new ts).fromArray(e)),n.position.copy((new ts).fromArray(t)),n.lookAt((new ts).fromArray(i)),n.updateMatrix(),n.updateMatrixWorld(!0),n}_deunproject(e,t,i){return e.map((e=>{const n=t.unprojectBasic(e,1e4),r=new ts(n[0],n[1],n[2]).applyMatrix4(i.matrixWorldInverse);return[r.x/r.z,r.y/r.z]}))}_triangulateSubarea(e,t,i,n,r){const s=yy([e,...t],[i],jv);if(!s)return[];const a=[],o=this._subsampleThreshold,c=this._createCamera(r.upVector().toArray(),r.unprojectSfM([0,0],0),r.unprojectBasic(n,10));for(const e of s){const t=this._subsample(e[0],o),i=this._deunproject(t,r,c),n=this._unproject(t,r),s=[],l=[];for(let t=1;te[3])throw new BM("Basic Y coordinates values can not be inverted.");for(let t of e)if(t<0||t>1)throw new BM("Basic coordinates must be on the interval [0, 1].");this._anchorIndex=void 0,this._rect=e.slice(0,4),this._inverted=this._rect[0]>this._rect[2]}get anchorIndex(){return this._anchorIndex}get inverted(){return this._inverted}get rect(){return this._rect}initializeAnchorIndexing(e){if(void 0!==this._anchorIndex)throw new BM("Anchor indexing is already initialized.");if(e<0||e>3)throw new BM(`Invalid anchor index: ${e}.`);this._anchorIndex=void 0===e?0:e}terminateAnchorIndexing(){this._anchorIndex=void 0}setOppositeVertex2d(e,t){if(void 0===this._anchorIndex)throw new BM("Anchor indexing needs to be initialized.");const i=[Math.max(0,Math.min(1,e[0])),Math.max(0,Math.min(1,e[1]))],n=this._rect.slice(),r=0===this._anchorIndex?[n[0],n[3]]:1===this._anchorIndex?[n[0],n[1]]:2===this._anchorIndex?[n[2],n[1]]:[n[2],n[3]];if(Od(t.cameraType)){const e=this._anchorIndex<2?i[0]-n[2]:i[0]-n[0];!this._inverted&&this._anchorIndex<2&&i[0]<.25&&n[2]>.75&&e<-.5||!this._inverted&&this._anchorIndex>=2&&i[0]<.25&&n[2]>.75&&e<-.5?(this._inverted=!0,this._anchorIndex=r[1]>i[1]?0:1):this._inverted&&this._anchorIndex>=2&&i[0]<.25&&n[0]>.75&&e<-.5?(this._inverted=!1,this._anchorIndex=r[0]>i[0]?r[1]>i[1]?3:2:r[1]>i[1]?0:1):!this._inverted&&this._anchorIndex>=2&&i[0]>.75&&n[0]<.25&&e>.5||!this._inverted&&this._anchorIndex<2&&i[0]>.75&&n[0]<.25&&e>.5?(this._inverted=!0,this._anchorIndex=r[1]>i[1]?3:2):this._inverted&&this._anchorIndex<2&&i[0]>.75&&n[2]<.25&&e>.5?(this._inverted=!1,this._anchorIndex=r[0]>i[0]?r[1]>i[1]?3:2:r[1]>i[1]?0:1):this._inverted&&this._anchorIndex<2&&i[0]>n[0]?(this._inverted=!1,this._anchorIndex=r[1]>i[1]?0:1):this._inverted&&this._anchorIndex>=2&&i[0]i[1]?3:2):this._inverted?this._anchorIndex<2?this._anchorIndex=r[1]>i[1]?0:1:this._anchorIndex=r[1]>i[1]?3:2:this._anchorIndex=r[0]<=i[0]&&r[1]>i[1]?0:r[0]<=i[0]&&r[1]<=i[1]?1:r[0]>i[0]&&r[1]<=i[1]?2:3;const t=[];0===this._anchorIndex?(t[0]=r[0],t[1]=i[1],t[2]=i[0],t[3]=r[1]):1===this._anchorIndex?(t[0]=r[0],t[1]=r[1],t[2]=i[0],t[3]=i[1]):2===this._anchorIndex?(t[0]=i[0],t[1]=r[1],t[2]=r[0],t[3]=i[1]):(t[0]=i[0],t[1]=i[1],t[2]=r[0],t[3]=r[1]),(!this._inverted&&t[0]>t[2]||this._inverted&&t[0]t[3]&&(t[1]=n[1],t[3]=n[3]),this._rect[0]=t[0],this._rect[1]=t[1],this._rect[2]=t[2],this._rect[3]=t[3]}else{this._anchorIndex=r[0]<=i[0]&&r[1]>i[1]?0:r[0]<=i[0]&&r[1]<=i[1]?1:r[0]>i[0]&&r[1]<=i[1]?2:3;const e=[];0===this._anchorIndex?(e[0]=r[0],e[1]=i[1],e[2]=i[0],e[3]=r[1]):1===this._anchorIndex?(e[0]=r[0],e[1]=r[1],e[2]=i[0],e[3]=i[1]):2===this._anchorIndex?(e[0]=i[0],e[1]=r[1],e[2]=r[0],e[3]=i[1]):(e[0]=i[0],e[1]=i[1],e[2]=r[0],e[3]=r[1]),e[0]>e[2]&&(e[0]=n[0],e[2]=n[2]),e[1]>e[3]&&(e[1]=n[1],e[3]=n[3]),this._rect[0]=e[0],this._rect[1]=e[1],this._rect[2]=e[2],this._rect[3]=e[3]}this._notifyChanged$.next(this)}setVertex2d(e,t,i){let n=this._rect.slice(),r=[Math.max(0,Math.min(1,t[0])),Math.max(0,Math.min(1,t[1]))],s=[];if(0===e?(s[0]=r[0],s[1]=n[1],s[2]=n[2],s[3]=r[1]):1===e?(s[0]=r[0],s[1]=r[1],s[2]=n[2],s[3]=n[3]):2===e?(s[0]=n[0],s[1]=r[1],s[2]=r[0],s[3]=n[3]):3===e&&(s[0]=n[0],s[1]=n[1],s[2]=r[0],s[3]=r[1]),Od(i.cameraType)){let t=e<2&&r[0]>.75&&n[0]<.25||e>=2&&this._inverted&&r[0]>.75&&n[2]<.25,i=e<2&&this._inverted&&r[0]<.25&&n[0]>.75||e>=2&&r[0]<.25&&n[2]>.75;t||i?this._inverted=!this._inverted:(s[0]-n[0]<-.25&&(s[0]=n[0]),s[2]-n[2]>.25&&(s[2]=n[2])),(!this._inverted&&s[0]>s[2]||this._inverted&&s[0]s[2]&&(s[0]=n[0],s[2]=n[2]);s[1]>s[3]&&(s[1]=n[1],s[3]=n[3]),this._rect[0]=s[0],this._rect[1]=s[1],this._rect[2]=s[2],this._rect[3]=s[3],this._notifyChanged$.next(this)}setCentroid2d(e,t){let i=this._rect.slice(),n=i[0],r=this._inverted?i[2]+1:i[2],s=i[1],a=i[3],o=n+(r-n)/2,c=s+(a-s)/2,l=0;if(Od(t.cameraType))l=this._inverted?e[0]+1-o:e[0]-o;else{let t=-n,i=1-r;l=Math.max(t,Math.min(i,e[0]-o))}let h=-s,u=1-a,p=Math.max(h,Math.min(u,e[1]-c));this._rect[0]=i[0]+l,this._rect[1]=i[1]+p,this._rect[2]=i[2]+l,this._rect[3]=i[3]+p,this._rect[0]<0?(this._rect[0]+=1,this._inverted=!this._inverted):this._rect[0]>1&&(this._rect[0]-=1,this._inverted=!this._inverted),this._rect[2]<0?(this._rect[2]+=1,this._inverted=!this._inverted):this._rect[2]>1&&(this._rect[2]-=1,this._inverted=!this._inverted),this._notifyChanged$.next(this)}getPoints3d(e){return this._getPoints2d().map((t=>e.unprojectBasic(t,200)))}getVertex2d(e){return this._rectToVertices2d(this._rect)[e]}getNonAdjustedVertex2d(e){return this._rectToNonAdjustedVertices2d(this._rect)[e]}getVertex3d(e,t){return t.unprojectBasic(this._rectToVertices2d(this._rect)[e],200)}getVertices2d(){return this._rectToVertices2d(this._rect)}getVertices3d(e){return this._rectToVertices2d(this._rect).map((t=>e.unprojectBasic(t,200)))}getCentroid2d(){const e=this._rect;return[(e[0]+(this._inverted?e[2]+1:e[2]))/2,(e[1]+e[3])/2]}getCentroid3d(e){const t=this.getCentroid2d();return e.unprojectBasic(t,200)}getPoleOfInaccessibility2d(){return this._getPoleOfInaccessibility2d(this._rectToVertices2d(this._rect))}getPoleOfInaccessibility3d(e){let t=this._getPoleOfInaccessibility2d(this._rectToVertices2d(this._rect));return e.unprojectBasic(t,200)}getTriangles3d(e){return Od(e.cameraType)?[]:this._triangulate(this._project(this._getPoints2d(),e),this.getPoints3d(e))}validate(e){let t=this._rect;return!(!this._inverted&&e[0].25||e[1]{e.stopPropagation(),this._aborted$.next(this)},u=e=>{e.stopPropagation(),this._geometry.removePoint2d(a)},p=this._canvasToTransform(l),d={onclick:0===t&&s<3?h:u,style:{transform:p}};n.push(r_.h("div.mapillary-tag-interactor",d,[]));const g={style:{background:this._colorToBackground(this._options.color),transform:p}};n.push(r_.h("div.mapillary-tag-vertex",g,[]))}if(s>2&&!0===this._options.indicateCompleter){const[t,r]=this._geometry.getCentroid2d(this._transform),s=this._viewportCoords.basicToCanvasSafe(t,r,i,this._transform,e);if(s){const e=e=>{e.stopPropagation(),this._geometry.removePoint2d(this._geometry.points.length-1),this._created$.next(this)},t=this._canvasToTransform(s),i={onclick:e,style:{transform:t}};n.push(r_.h("div.mapillary-tag-completer.mapillary-tag-larger",i,[]));const r={style:{background:this._colorToBackground(this._options.color),transform:t}};n.push(r_.h("div.mapillary-tag-vertex.mapillary-tag-larger",r,[]));const a={style:{transform:t}};n.push(r_.h("div.mapillary-tag-dot",a,[]))}}return n}_onGeometryChanged(){this._disposeObjects(),this._rectGeometry=new by(this._geometry.getRect2d(this._transform)),this._createGlObjects()}_createGlObjects(){this._glObjects=[];const e=this._rectGeometry.getPoints3d(this._transform);this._outline=this._createOutine(e,this._options.color),this._glObjects.push(this._outline)}_disposeObjects(){this._disposeLine(this._outline),this._outline=null,this._glObjects=null}}class Ty extends xy{constructor(e,t){super();let i=e.length;if(i<3)throw new BM("A polygon must have three or more positions.");if(e[0][0]!==e[i-1][0]||e[0][1]!==e[i-1][1])throw new BM("First and last positions must be equivalent.");this._polygon=[];for(let t of e){if(t[0]<0||t[0]>1||t[1]<0||t[1]>1)throw new BM("Basic coordinates of polygon must be on the interval [0, 1].");this._polygon.push(t.slice())}if(this._holes=[],null!=t)for(let e=0;e1||t[1]<0||t[1]>1)throw new BM("Basic coordinates of hole must be on the interval [0, 1].");this._holes[e].push(t.slice())}}}get polygon(){return this._polygon}get holes(){return this._holes}addVertex2d(e){let t=[Math.max(0,Math.min(1,e[0])),Math.max(0,Math.min(1,e[1]))];this._polygon.splice(this._polygon.length-1,0,t),this._notifyChanged$.next(this)}getVertex2d(e){return this._polygon[e].slice()}removeVertex2d(e){if(e<0||e>=this._polygon.length||this._polygon.length<4)throw new BM("Index for removed vertex must be valid.");if(e>0&&ee[0])),n=this._polygon.map((e=>e[1])),r=Math.min.apply(Math,i),s=Math.max.apply(Math,i),a=Math.min.apply(Math,n),o=Math.max.apply(Math,n),c=this.getCentroid2d(),l=-r,h=1-s,u=-a,p=1-o,d=Math.max(l,Math.min(h,e[0]-c[0])),g=Math.max(u,Math.min(p,e[1]-c[1]));for(let e of this._polygon)e[0]+=d,e[1]+=g;this._notifyChanged$.next(this)}getPoints3d(e){return this._getPoints3d(this._subsample(this._polygon),e)}getVertex3d(e,t){return t.unprojectBasic(this._polygon[e],200)}getVertices2d(){return this._polygon.slice()}getVertices3d(e){return this._getPoints3d(this._polygon,e)}getHolePoints3d(e){return this._holes.map((t=>this._getPoints3d(this._subsample(t),e)))}getHoleVertices3d(e){return this._holes.map((t=>this._getPoints3d(t,e)))}getCentroid2d(){let e=this._polygon,t=0,i=0,n=0;for(let r=0;rthis._project(t,e))),this.getHoleVertices3d(e))}getTriangles3d(e){if(Od(e.cameraType))return this._triangulateSpherical(this._polygon.slice(),this.holes.slice(),e);const t=this._project(this._subsample(this._polygon),e),i=this.getPoints3d(e),n=this._holes.map((t=>this._project(this._subsample(t),e))),r=this.getHolePoints3d(e);return this._triangulate(t,i,n,r)}getPoleOfInaccessibility2d(){return this._getPoleOfInaccessibility2d(this._polygon.slice())}getPoleOfInaccessibility3d(e){let t=this._getPoleOfInaccessibility2d(this._polygon.slice());return e.unprojectBasic(t,200)}_getPoints3d(e,t){return e.map((e=>t.unprojectBasic(e,200)))}}class Sy extends GM{constructor(e,t,i,n){super(e,i,n),this._options={color:null==t.color?16777215:t.color},this._createGlObjects()}create(){if(this._geometry instanceof by)this._created$.next(this);else if(this._geometry instanceof Ty){const e=this._geometry;e.removeVertex2d(e.polygon.length-2),this._created$.next(this)}}dispose(){super.dispose(),this._disposeLine(this._outline),this._disposeObjects()}getDOMObjects(e,t){const i=[],n={offsetHeight:t.height,offsetWidth:t.width},r=e=>{e.stopPropagation(),this._aborted$.next(this)};if(this._geometry instanceof by){const t=this._geometry.anchorIndex,s=void 0===t?1:t,[a,o]=this._geometry.getVertex2d(s),c=this._viewportCoords.basicToCanvasSafe(a,o,n,this._transform,e);if(null!=c){const e=this._colorToBackground(this._options.color),t=this._canvasToTransform(c),n={style:{background:e,transform:t}},s={onclick:r,style:{transform:t}};i.push(r_.h("div.mapillary-tag-interactor",s,[])),i.push(r_.h("div.mapillary-tag-vertex",n,[]))}}else if(this._geometry instanceof Ty){const t=this._geometry,[s,a]=t.getVertex2d(0),o=this._viewportCoords.basicToCanvasSafe(s,a,n,this._transform,e);if(null!=o){const e={onclick:t.polygon.length>4?e=>{e.stopPropagation(),t.removeVertex2d(t.polygon.length-2),this._created$.next(this)}:r,style:{transform:this._canvasToTransform(o)}},n=t.polygon.length>4?"mapillary-tag-completer":"mapillary-tag-interactor";i.push(r_.h("div."+n,e,[]))}if(t.polygon.length>3){const[r,s]=t.getVertex2d(t.polygon.length-3),a=this._viewportCoords.basicToCanvasSafe(r,s,n,this._transform,e);if(null!=a){const e={onclick:e=>{e.stopPropagation(),t.removeVertex2d(t.polygon.length-3)},style:{transform:this._canvasToTransform(a)}};i.push(r_.h("div.mapillary-tag-interactor",e,[]))}}const c=t.polygon.slice();c.splice(-2,2);for(const t of c){const r=this._viewportCoords.basicToCanvasSafe(t[0],t[1],n,this._transform,e);if(null!=r){const e={style:{background:this._colorToBackground(this._options.color),transform:this._canvasToTransform(r)}};i.push(r_.h("div.mapillary-tag-vertex",e,[]))}}}return i}addPoint(e){if(this._geometry instanceof by){if(!this._geometry.validate(e))return;this._created$.next(this)}else this._geometry instanceof Ty&&this._geometry.addVertex2d(e)}_onGeometryChanged(){this._disposeLine(this._outline),this._disposeObjects(),this._createGlObjects()}_disposeObjects(){this._outline=null,this._glObjects=[]}_createGlObjects(){const e=this._geometry instanceof by?this._geometry.getPoints3d(this._transform):this._geometry.getVertices3d(this._transform);this._outline=this._createOutine(e,this._options.color),this._glObjects=[this._outline]}}class Ny{constructor(e,t){this._component=e,this._navigator=t,this._tagOperation$=new V,this._createPoints$=new V,this._createPolygon$=new V,this._createRect$=new V,this._delete$=new V,this._tag$=this._tagOperation$.pipe(Dt(((e,t)=>t(e)),null),It()),this._replayedTag$=this._tag$.pipe(St(1),F()),this._replayedTag$.subscribe(),this._createPoints$.pipe(Pt(this._component.configuration$,this._navigator.stateService.currentTransform$),ze((([e,t,i])=>()=>{const n=new FM([[e[0],e[1]],[e[0],e[1]]]);return new wy(n,{color:t.createColor,indicateCompleter:t.indicatePointsCompleter},i)}))).subscribe(this._tagOperation$),this._createRect$.pipe(Pt(this._component.configuration$,this._navigator.stateService.currentTransform$),ze((([e,t,i])=>()=>{const n=new by([e[0],e[1],e[0],e[1]]);return new Sy(n,{color:t.createColor},i)}))).subscribe(this._tagOperation$),this._createPolygon$.pipe(Pt(this._component.configuration$,this._navigator.stateService.currentTransform$),ze((([e,t,i])=>()=>{const n=new Ty([[e[0],e[1]],[e[0],e[1]],[e[0],e[1]]]);return new Sy(n,{color:t.createColor},i)}))).subscribe(this._tagOperation$),this._delete$.pipe(ze((()=>()=>null))).subscribe(this._tagOperation$)}get createRect$(){return this._createRect$}get createPolygon$(){return this._createPolygon$}get createPoints$(){return this._createPoints$}get delete$(){return this._delete$}get tag$(){return this._tag$}get replayedTag$(){return this._replayedTag$}}class Dy{render(e,t,i,n,r){let s=[];for(const t of e)s=s.concat(t.getDOMObjects(i,n,r));return null!=t&&(s=s.concat(t.getDOMObjects(n,r))),r_.h("div.mapillary-tag-container",{},s)}clear(){return r_.h("div",{},[])}}class Iy{constructor(e,t){this._createTag=null,this._needsRender=!1,this._raycaster=t||new sd,this._scene=e||new hh,this._objectTags={},this._retrievableObjects=[],this._tags={}}get needsRender(){return this._needsRender}add(e){for(let t of e)t.tag.id in this._tags&&this._remove(t.tag.id),this._add(t);this._needsRender=!0}addCreateTag(e){for(const t of e.glObjects)this._scene.add(t);this._createTag={tag:e,objects:e.glObjects},this._needsRender=!0}clear(){for(const e of Object.keys(this._tags))this._remove(e);this._needsRender=!1}get(e){return this.has(e)?this._tags[e].tag:void 0}has(e){return e in this._tags}hasCreateTag(){return null!=this._createTag}intersectObjects([e,t],i){this._raycaster.setFromCamera(new Br(e,t),i);const n=this._raycaster.intersectObjects(this._retrievableObjects),r=[];for(const e of n)e.object.uuid in this._objectTags&&r.push(this._objectTags[e.object.uuid]);return r}remove(e){for(const t of e)this._remove(t);this._needsRender=!0}removeAll(){for(const e of Object.keys(this._tags))this._remove(e);this._needsRender=!0}removeCreateTag(){if(null!=this._createTag){for(const e of this._createTag.objects)this._scene.remove(e);this._createTag.tag.dispose(),this._createTag=null,this._needsRender=!0}}render(e,t){t.render(this._scene,e),this._needsRender=!1}update(){this._needsRender=!0}updateCreateTagObjects(e){if(this._createTag.tag!==e)throw new Error("Create tags do not have the same reference.");for(let e of this._createTag.objects)this._scene.remove(e);for(const t of e.glObjects)this._scene.add(t);this._createTag.objects=e.glObjects,this._needsRender=!0}updateObjects(e){const t=e.tag.id;if(this._tags[t].tag!==e)throw new Error("Tags do not have the same reference.");const i=this._tags[t];this._removeObjects(i),delete this._tags[t],this._add(e),this._needsRender=!0}_add(e){const t=e.tag.id,i={tag:e,objects:[],retrievableObjects:[]};this._tags[t]=i;for(const t of e.getGLObjects())i.objects.push(t),this._scene.add(t);for(const t of e.getRetrievableObjects())i.retrievableObjects.push(t),this._retrievableObjects.push(t),this._objectTags[t.uuid]=e.tag.id}_remove(e){const t=this._tags[e];this._removeObjects(t),t.tag.dispose(),delete this._tags[e]}_removeObjects(e){for(const t of e.objects)this._scene.remove(t);for(const t of e.retrievableObjects){const e=this._retrievableObjects.indexOf(t);-1!==e&&this._retrievableObjects.splice(e,1)}}}var Cy,Ay,Ey,Ly;!function(e){e[e.Default=0]="Default",e[e.CreatePoint=1]="CreatePoint",e[e.CreatePoints=2]="CreatePoints",e[e.CreatePolygon=3]="CreatePolygon",e[e.CreateRect=4]="CreateRect",e[e.CreateRectDrag=5]="CreateRectDrag"}(Cy||(Cy={})),function(e){e[e.None=0]="None",e[e.Centroid=1]="Centroid",e[e.Vertex=2]="Vertex"}(Ay||(Ay={}));class zy{constructor(e,t,i){this._tag=e,this._transform=t,this._viewportCoords=i||new h_,this._glObjectsChanged$=new V,this._interact$=new V}get glObjectsChanged$(){return this._glObjectsChanged$}get interact$(){return this._interact$}get tag(){return this._tag}}class jy extends zy{constructor(e,t){super(e,t),this._geometryChangedSubscription=this._tag.geometry.changed$.subscribe((()=>{this._onGeometryChanged()})),this._changedSubscription=this._tag.changed$.subscribe((()=>{this._onTagChanged()&&this._glObjectsChanged$.next(this)}))}dispose(){this._changedSubscription.unsubscribe(),this._geometryChangedSubscription.unsubscribe()}_colorToCss(e){return"#"+("000000"+e.toString(16)).substr(-6)}_createFill(){let e=this._getTriangles(),t=new Float32Array(e),i=new Ra;i.setAttribute("position",new Da(t,3)),i.computeBoundingSphere();let n=new Ta({side:qt,transparent:!0});return this._updateFillMaterial(n),new io(i,n)}_createLine(e){let t=this._getLinePositions(e),i=new Ra;i.setAttribute("position",new Da(t,3)),i.computeBoundingSphere();let n=new Bh;this._updateLineBasicMaterial(n);const r=new qh(i,n);return r.renderOrder=1,r}_createOutline(){return this._createLine(this._getPoints3d())}_disposeFill(){null!=this._fill&&(this._fill.geometry.dispose(),this._fill.material.dispose(),this._fill=null)}_disposeOutline(){null!=this._outline&&(this._outline.geometry.dispose(),this._outline.material.dispose(),this._outline=null)}_getLinePositions(e){let t=e.length,i=new Float32Array(3*t);for(let n=0;n{let r=n.offsetX-n.target.offsetWidth/2,s=n.offsetY-n.target.offsetHeight/2;this._interact$.next({cursor:t,offsetX:r,offsetY:s,operation:e,tag:this._tag,vertexIndex:i})}}_updateFillGeometry(){let e=this._getTriangles(),t=new Float32Array(e),i=this._fill.geometry,n=i.getAttribute("position");n.array.length===t.length?(n.set(t),n.needsUpdate=!0):(i.deleteAttribute("position"),i.setAttribute("position",new Da(t,3))),i.computeBoundingSphere()}_updateLine(e,t){let i=this._getLinePositions(t),n=e.geometry,r=n.getAttribute("position");r.set(i),r.needsUpdate=!0,n.computeBoundingSphere()}_updateOulineGeometry(){this._updateLine(this._outline,this._getPoints3d())}}class Oy extends jy{constructor(e,t){super(e,t),this._rectGeometry=new by(this._tag.geometry.getRect2d(t)),this._fill=Od(t.cameraType)?null:this._createFill(),this._outline=this._tag.lineWidth>=1?this._createOutline():null}dispose(){super.dispose(),this._disposeFill(),this._disposeOutline()}getDOMObjects(e,t,i){const n=[],r={offsetHeight:i.height,offsetWidth:i.width};if(!this._tag.editable)return n;const s=this._colorToCss(this._tag.lineColor),a=this._tag.geometry.getPoints2d();for(let e=0;e=1&&(this._outline=this._createOutline(),e=!0):this._updateOutlineMaterial(),e}_getPoints3d(){return this._rectGeometry.getPoints3d(this._transform)}_getTriangles(){return this._rectGeometry.getTriangles3d(this._transform)}_updateFillMaterial(e){e.color=new wa(this._tag.fillColor),e.opacity=this._tag.fillOpacity,e.needsUpdate=!0}_updateLineBasicMaterial(e){e.color=new wa(this._tag.lineColor),e.linewidth=Math.max(this._tag.lineWidth,1),e.visible=this._tag.lineWidth>=1&&this._tag.lineOpacity>0,e.opacity=this._tag.lineOpacity,e.transparent=this._tag.lineOpacity<1,e.needsUpdate=!0}_updateOutlineMaterial(){let e=this._outline.material;this._updateLineBasicMaterial(e)}}class ky extends s_{constructor(e,t){super(),this._id=e,this._geometry=t,this._notifyChanged$=new V,this._notifyChanged$.subscribe((e=>{const t={target:this,type:"tag"};this.fire("tag",t)})),this._geometry.changed$.subscribe((e=>{const t="geometry",i={target:this,type:t};this.fire(t,i)}))}get id(){return this._id}get geometry(){return this._geometry}get changed$(){return this._notifyChanged$}get geometryChanged$(){return this._geometry.changed$.pipe(ze((()=>this)),It())}fire(e,t){super.fire(e,t)}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}}class Py extends ky{constructor(e,t,i){super(e,t),i=i||{},this._editable=null!=i.editable&&i.editable,this._fillColor=null==i.fillColor?16777215:i.fillColor,this._fillOpacity=null==i.fillOpacity?0:i.fillOpacity,this._indicateVertices=null==i.indicateVertices||i.indicateVertices,this._lineColor=null==i.lineColor?16777215:i.lineColor,this._lineOpacity=null==i.lineOpacity?1:i.lineOpacity,this._lineWidth=null==i.lineWidth?1:i.lineWidth}get editable(){return this._editable}set editable(e){this._editable=e,this._notifyChanged$.next(this)}get fillColor(){return this._fillColor}set fillColor(e){this._fillColor=e,this._notifyChanged$.next(this)}get fillOpacity(){return this._fillOpacity}set fillOpacity(e){this._fillOpacity=e,this._notifyChanged$.next(this)}get geometry(){return this._geometry}get indicateVertices(){return this._indicateVertices}set indicateVertices(e){this._indicateVertices=e,this._notifyChanged$.next(this)}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this._notifyChanged$.next(this)}get lineOpacity(){return this._lineOpacity}set lineOpacity(e){this._lineOpacity=e,this._notifyChanged$.next(this)}get lineWidth(){return this._lineWidth}set lineWidth(e){this._lineWidth=e,this._notifyChanged$.next(this)}setOptions(e){this._editable=null==e.editable?this._editable:e.editable,this._indicateVertices=null==e.indicateVertices?this._indicateVertices:e.indicateVertices,this._lineColor=null==e.lineColor?this._lineColor:e.lineColor,this._lineWidth=null==e.lineWidth?this._lineWidth:e.lineWidth,this._fillColor=null==e.fillColor?this._fillColor:e.fillColor,this._fillOpacity=null==e.fillOpacity?this._fillOpacity:e.fillOpacity,this._notifyChanged$.next(this)}}!function(e){e[e.TwoDimensional=0]="TwoDimensional",e[e.ThreeDimensional=1]="ThreeDimensional"}(Ey||(Ey={}));class Ry extends jy{constructor(e,t){super(e,t),this._fill=Od(t.cameraType)?e.domain===Ey.TwoDimensional&&e.geometry instanceof Ty?this._createFill():null:this._createFill(),this._holes=this._tag.lineWidth>=1?this._createHoles():[],this._outline=this._tag.lineWidth>=1?this._createOutline():null}dispose(){super.dispose(),this._disposeFill(),this._disposeHoles(),this._disposeOutline()}getDOMObjects(e,t,i){const n=[],r=this._tag.geometry instanceof by,s=!Od(this._transform.cameraType),a={offsetHeight:i.height,offsetWidth:i.width};if(null!=this._tag.icon&&(r||s)){const[i,r]=this._tag.geometry instanceof by?this._tag.geometry.getVertex2d(this._tag.iconIndex):this._tag.geometry.getPoleOfInaccessibility2d(),s=this._viewportCoords.basicToCanvasSafe(i,r,a,this._transform,t);if(null!=s){const t=()=>{this._interact$.next({offsetX:0,offsetY:0,operation:Ay.None,tag:this._tag})};if(e.loaded){const i=e.getDOMSprite(this._tag.icon,this._tag.iconFloat),r={onclick:e=>{e.stopPropagation(),this._tag.click$.next(this._tag)},onpointerdown:t,style:{transform:`translate(${Math.round(s[0])}px,${Math.round(s[1])}px)`}};n.push(r_.h("div.mapillary-tag-symbol",r,[i]))}}}else if(null!=this._tag.text&&(r||s)){const[e,i]=this._tag.geometry instanceof by?this._tag.geometry.getVertex2d(3):this._tag.geometry.getPoleOfInaccessibility2d(),r=this._viewportCoords.basicToCanvasSafe(e,i,a,this._transform,t);if(null!=r){const e=Math.round(r[0]),t=Math.round(r[1]),i=this._tag.geometry instanceof by?`translate(${e}px,${t}px)`:`translate(-50%, -50%) translate(${e}px,${t}px)`,s={onpointerdown:()=>{this._interact$.next({offsetX:0,offsetY:0,operation:Ay.None,tag:this._tag})},style:{color:this._colorToCss(this._tag.textColor),transform:i},textContent:this._tag.text};n.push(r_.h("span.mapillary-tag-symbol",s,[]))}}if(!this._tag.editable)return n;const o=this._colorToCss(this._tag.lineColor);if(this._tag.geometry instanceof by){const[e,i]=this._tag.geometry.getCentroid2d(),r=this._viewportCoords.basicToCanvasSafe(e,i,a,this._transform,t);if(null!=r){const e={onpointerdown:this._interact(Ay.Centroid,"move"),style:{background:o,transform:`translate(-50%, -50%) translate(${Math.round(r[0])}px,${Math.round(r[1])}px)`}};n.push(r_.h("div.mapillary-tag-mover",e,[]))}}const c=this._tag.geometry.getVertices2d();for(let e=0;e0&&this._updateHoleGeometries(),null!=this._outline&&this._updateOulineGeometry()}_onTagChanged(){let e=!1;return null!=this._fill&&this._updateFillMaterial(this._fill.material),null==this._outline?this._tag.lineWidth>=1&&(this._holes=this._createHoles(),this._outline=this._createOutline(),e=!0):(this._updateHoleMaterials(),this._updateOutlineMaterial()),e}_getPoints3d(){return this._in3dDomain()?this._tag.geometry.getVertices3d(this._transform):this._tag.geometry.getPoints3d(this._transform)}_getTriangles(){return this._in3dDomain()?this._tag.geometry.get3dDomainTriangles3d(this._transform):this._tag.geometry.getTriangles3d(this._transform)}_updateFillMaterial(e){e.color=new wa(this._tag.fillColor),e.opacity=this._tag.fillOpacity,e.needsUpdate=!0}_updateLineBasicMaterial(e){e.color=new wa(this._tag.lineColor),e.linewidth=Math.max(this._tag.lineWidth,1),e.visible=this._tag.lineWidth>=1&&this._tag.lineOpacity>0,e.opacity=this._tag.lineOpacity,e.transparent=this._tag.lineOpacity<1,e.needsUpdate=!0}_createHoles(){let e=[];if(this._tag.geometry instanceof Ty){let t=this._getHoles3d();for(let i of t){let t=this._createLine(i);e.push(t)}}return e}_disposeHoles(){for(let e of this._holes)e.geometry.dispose(),e.material.dispose();this._holes=[]}_getHoles3d(){const e=this._tag.geometry;return this._in3dDomain()?e.getHoleVertices3d(this._transform):e.getHolePoints3d(this._transform)}_in3dDomain(){return this._tag.geometry instanceof Ty&&this._tag.domain===Ey.ThreeDimensional}_updateHoleGeometries(){let e=this._getHoles3d();if(e.length!==this._holes.length)throw new Error("Changing the number of holes is not supported.");for(let t=0;t{const e="click",t={target:this,type:e};this.fire(e,t)}))}get click$(){return this._click$}get domain(){return this._domain}get editable(){return this._editable}set editable(e){this._twoDimensionalPolygon(this._domain,this._geometry)||(this._editable=e,this._notifyChanged$.next(this))}get fillColor(){return this._fillColor}set fillColor(e){this._fillColor=e,this._notifyChanged$.next(this)}get fillOpacity(){return this._fillOpacity}set fillOpacity(e){this._fillOpacity=e,this._notifyChanged$.next(this)}get geometry(){return this._geometry}get icon(){return this._icon}set icon(e){this._icon=e,this._notifyChanged$.next(this)}get iconFloat(){return this._iconFloat}set iconFloat(e){this._iconFloat=e,this._notifyChanged$.next(this)}get iconIndex(){return this._iconIndex}set iconIndex(e){this._iconIndex=e,this._notifyChanged$.next(this)}get indicateVertices(){return this._indicateVertices}set indicateVertices(e){this._indicateVertices=e,this._notifyChanged$.next(this)}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this._notifyChanged$.next(this)}get lineOpacity(){return this._lineOpacity}set lineOpacity(e){this._lineOpacity=e,this._notifyChanged$.next(this)}get lineWidth(){return this._lineWidth}set lineWidth(e){this._lineWidth=e,this._notifyChanged$.next(this)}get text(){return this._text}set text(e){this._text=e,this._notifyChanged$.next(this)}get textColor(){return this._textColor}set textColor(e){this._textColor=e,this._notifyChanged$.next(this)}fire(e,t){super.fire(e,t)}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}setOptions(e){const t=this._twoDimensionalPolygon(this._domain,this._geometry);this._editable=t||null==e.editable?this._editable:e.editable,this._icon=void 0===e.icon?this._icon:e.icon,this._iconFloat=null==e.iconFloat?this._iconFloat:e.iconFloat,this._iconIndex=null==e.iconIndex?this._iconIndex:e.iconIndex,this._indicateVertices=null==e.indicateVertices?this._indicateVertices:e.indicateVertices,this._lineColor=null==e.lineColor?this._lineColor:e.lineColor,this._lineWidth=null==e.lineWidth?this._lineWidth:e.lineWidth,this._fillColor=null==e.fillColor?this._fillColor:e.fillColor,this._fillOpacity=null==e.fillOpacity?this._fillOpacity:e.fillOpacity,this._text=void 0===e.text?this._text:e.text,this._textColor=null==e.textColor?this._textColor:e.textColor,this._notifyChanged$.next(this)}_twoDimensionalPolygon(e,t){return e!==Ey.ThreeDimensional&&t instanceof Ty}}class $y extends zy{dispose(){}getDOMObjects(e,t,i){const n=this._tag,r={offsetHeight:i.height,offsetWidth:i.width},s=[],[a,o]=n.geometry.getCentroid2d(),c=this._viewportCoords.basicToCanvasSafe(a,o,r,this._transform,t);if(null!=c){const t=e=>{this._interact$.next({offsetX:0,offsetY:0,operation:Ay.None,tag:n})},i=Math.round(c[0]),r=Math.round(c[1]);if(null!=n.icon){if(e.loaded){const a=e.getDOMSprite(n.icon,Ly.Bottom),o={onpointerdown:t,style:{pointerEvents:"all",transform:`translate(${i}px,${r+8}px)`}};s.push(r_.h("div",o,[a]))}}else if(null!=n.text){const e=`translate(-50%,0%) translate(${i}px,${r+8}px)`,a={onpointerdown:t,style:{color:this._colorToCss(n.textColor),transform:e},textContent:n.text};s.push(r_.h("span.mapillary-tag-symbol",a,[]))}const a=this._interact(Ay.Centroid,n,"move"),o=this._colorToCss(n.color),l=`translate(-50%,-50%) translate(${i}px,${r}px)`;if(n.editable){let e={onpointerdown:a,style:{background:o,transform:l}};s.push(r_.h("div.mapillary-tag-spot-interactor",e,[]))}const h={style:{background:o,transform:l}};s.push(r_.h("div.mapillary-tag-vertex",h,[]))}return s}getGLObjects(){return[]}getRetrievableObjects(){return[]}_colorToCss(e){return"#"+("000000"+e.toString(16)).substr(-6)}_interact(e,t,i,n){return r=>{const s=r.offsetX-r.target.offsetWidth/2,a=r.offsetY-r.target.offsetHeight/2;this._interact$.next({cursor:i,offsetX:s,offsetY:a,operation:e,tag:t,vertexIndex:n})}}}class By extends ky{constructor(e,t,i){super(e,t),i=i||{},this._color=null==i.color?16777215:i.color,this._editable=null!=i.editable&&i.editable,this._icon=void 0===i.icon?null:i.icon,this._text=void 0===i.text?null:i.text,this._textColor=null==i.textColor?16777215:i.textColor}get color(){return this._color}set color(e){this._color=e,this._notifyChanged$.next(this)}get editable(){return this._editable}set editable(e){this._editable=e,this._notifyChanged$.next(this)}get icon(){return this._icon}set icon(e){this._icon=e,this._notifyChanged$.next(this)}get text(){return this._text}set text(e){this._text=e,this._notifyChanged$.next(this)}get textColor(){return this._textColor}set textColor(e){this._textColor=e,this._notifyChanged$.next(this)}setOptions(e){this._color=null==e.color?this._color:e.color,this._editable=null==e.editable?this._editable:e.editable,this._icon=void 0===e.icon?this._icon:e.icon,this._text=void 0===e.text?this._text:e.text,this._textColor=null==e.textColor?this._textColor:e.textColor,this._notifyChanged$.next(this)}}class Fy{constructor(){this._active=!1,this._hash={},this._hashDeactivated={},this._notifyChanged$=new V}get active(){return this._active}get changed$(){return this._notifyChanged$}activate(e){if(!this._active){for(const t in this._hashDeactivated){if(!this._hashDeactivated.hasOwnProperty(t))continue;const i=this._hashDeactivated[t];this._add(i,e)}this._hashDeactivated={},this._active=!0,this._notifyChanged$.next(this)}}deactivate(){if(this._active){for(const e in this._hash)this._hash.hasOwnProperty(e)&&(this._hashDeactivated[e]=this._hash[e].tag);this._hash={},this._active=!1}}add(e,t){this._assertActivationState(!0);for(const i of e)this._add(i,t);this._notifyChanged$.next(this)}addDeactivated(e){this._assertActivationState(!1);for(const t of e){if(!(t instanceof Uy||t instanceof By||t instanceof Py))throw new Error("Tag type not supported");this._hashDeactivated[t.id]=t}}get(e){return this.has(e)?this._hash[e]:void 0}getAll(){const e=this._hash;return Object.keys(e).map((t=>e[t]))}getAllDeactivated(){const e=this._hashDeactivated;return Object.keys(e).map((t=>e[t]))}getDeactivated(e){return this.hasDeactivated(e)?this._hashDeactivated[e]:void 0}has(e){return e in this._hash}hasDeactivated(e){return e in this._hashDeactivated}remove(e){this._assertActivationState(!0);const t=this._hash;for(const i of e)i in t&&delete t[i];this._notifyChanged$.next(this)}removeAll(){this._assertActivationState(!0),this._hash={},this._notifyChanged$.next(this)}removeAllDeactivated(){this._assertActivationState(!1),this._hashDeactivated={}}removeDeactivated(e){this._assertActivationState(!1);const t=this._hashDeactivated;for(const i of e)i in t&&delete t[i]}_add(e,t){if(e instanceof Uy)this._hash[e.id]=new Ry(e,t);else if(e instanceof By)this._hash[e.id]=new $y(e,t);else{if(!(e instanceof Py))throw new Error("Tag type not supported");this._hash[e.id]=new Oy(e,t)}}_assertActivationState(e){if(e!==this._active)throw new Error("Tag set not in correct state for operation.")}}class Gy extends $M{constructor(e){super();let t=e[0],i=e[1];if(t<0||t>1||i<0||i>1)throw new BM("Basic coordinates must be on the interval [0, 1].");this._point=e.slice()}get point(){return this._point}getCentroid2d(){return this._point.slice()}getCentroid3d(e){return e.unprojectBasic(this._point,200)}setCentroid2d(e,t){let i=[Math.max(0,Math.min(1,e[0])),Math.max(0,Math.min(1,e[1]))];this._point[0]=i[0],this._point[1]=i[1],this._notifyChanged$.next(this)}}class Hy extends G_{constructor(e,t,i,n){super(e,t,i),this._name=`${this._component.name}-${this._getNameExtension()}`,this._viewportCoords=n}_getConfiguration(e){return{}}_mouseEventToBasic(e,t,i,n,r,s){r=null!=r?r:0,s=null!=s?s:0;const[a,o]=this._viewportCoords.canvasPosition(e,t);return this._viewportCoords.canvasToBasic(a-r,o-s,t,n,i.perspective)}}class Vy extends Hy{constructor(e,t,i,n,r){super(e,t,i,n),this._tagCreator=r,this._geometryCreated$=new V}get geometryCreated$(){return this._geometryCreated$}_enable(){this._enableCreate(),this._container.container.classList.add("component-tag-create")}_disable(){this._container.container.classList.remove("component-tag-create"),this._disableCreate()}_validateBasic(e){const t=e[0],i=e[1];return 0<=t&&t<=1&&0<=i&&i<=1}_mouseEventToBasic$(e){return e.pipe(Pt(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$),ze((([e,t,i])=>this._mouseEventToBasic(e,this._container.container,t,i))))}}class Yy extends Vy{_enableCreate(){this._container.mouseService.deferPixels(this._name,4),this._geometryCreatedSubscription=this._mouseEventToBasic$(this._container.mouseService.proximateClick$).pipe(et(this._validateBasic),ze((e=>new Gy(e)))).subscribe(this._geometryCreated$)}_disableCreate(){this._container.mouseService.undeferPixels(this._name),this._geometryCreatedSubscription.unsubscribe()}_getNameExtension(){return"create-point"}}class qy extends Vy{_enableCreate(){this._container.mouseService.deferPixels(this._name,4);const e=this._navigator.stateService.currentTransform$.pipe(ze((()=>{})),St(1),F());this._deleteSubscription=e.pipe(At(1)).subscribe(this._tagCreator.delete$);const t=this._mouseEventToBasic$(this._container.mouseService.proximateClick$).pipe(It());this._createSubscription=e.pipe(zt((()=>t.pipe(et(this._validateBasic),pt(1))))).subscribe(this._create$),this._setVertexSubscription=this._tagCreator.tag$.pipe(zt((e=>e?$e(Ne(e),Je(this._container.mouseService.mouseMove$,this._container.mouseService.domMouseMove$),this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$):re()))).subscribe((([e,t,i,n])=>{const r=this._mouseEventToBasic(t,this._container.container,i,n);this._setVertex2d(e,r,n)})),this._addPointSubscription=this._tagCreator.tag$.pipe(zt((e=>e?$e(Ne(e),t):re()))).subscribe((([e,t])=>{this._addPoint(e,t)})),this._geometryCreateSubscription=this._tagCreator.tag$.pipe(zt((e=>e?e.created$.pipe(ze((e=>e.geometry))):re()))).subscribe(this._geometryCreated$)}_disableCreate(){this._container.mouseService.undeferPixels(this._name),this._tagCreator.delete$.next(null),this._addPointSubscription.unsubscribe(),this._createSubscription.unsubscribe(),this._deleteSubscription.unsubscribe(),this._geometryCreateSubscription.unsubscribe(),this._setVertexSubscription.unsubscribe()}}class Wy extends qy{get _create$(){return this._tagCreator.createPoints$}_addPoint(e,t){e.geometry.addPoint2d(t)}_getNameExtension(){return"create-points"}_setVertex2d(e,t,i){e.geometry.setPoint2d(e.geometry.points.length-1,t,i)}}class Qy extends qy{get _create$(){return this._tagCreator.createPolygon$}_addPoint(e,t){e.addPoint(t)}_getNameExtension(){return"create-polygon"}_setVertex2d(e,t,i){e.geometry.setVertex2d(e.geometry.polygon.length-2,t,i)}}class Zy extends qy{get _create$(){return this._tagCreator.createRect$}_addPoint(e,t){const i=e.geometry;i.validate(t)||(t=i.getNonAdjustedVertex2d(3)),e.addPoint(t)}_enable(){super._enable(),this._initializeAnchorIndexingSubscription=this._tagCreator.tag$.pipe(et((e=>!!e))).subscribe((e=>{e.geometry.initializeAnchorIndexing()}))}_disable(){super._disable(),this._initializeAnchorIndexingSubscription.unsubscribe()}_getNameExtension(){return"create-rect"}_setVertex2d(e,t,i){e.geometry.setOppositeVertex2d(t,i)}}class Xy extends Vy{_enableCreate(){this._container.mouseService.claimMouse(this._name,2),this._deleteSubscription=this._navigator.stateService.currentTransform$.pipe(ze((e=>null)),At(1)).subscribe(this._tagCreator.delete$),this._createSubscription=this._mouseEventToBasic$(this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDragStart$)).pipe(et(this._validateBasic)).subscribe(this._tagCreator.createRect$),this._initializeAnchorIndexingSubscription=this._tagCreator.tag$.pipe(et((e=>!!e))).subscribe((e=>{e.geometry.initializeAnchorIndexing()}));const e=$e(Je(this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseMove$),this._container.mouseService.filtered$(this._name,this._container.mouseService.domMouseMove$)),this._container.renderService.renderCamera$).pipe(Pt(this._navigator.stateService.currentTransform$),ze((([[e,t],i])=>this._mouseEventToBasic(e,this._container.container,t,i))));this._setVertexSubscription=this._tagCreator.tag$.pipe(zt((t=>t?$e(Ne(t),e,this._navigator.stateService.currentTransform$):re()))).subscribe((([e,t,i])=>{e.geometry.setOppositeVertex2d(t,i)}));const t=this._container.mouseService.mouseDragEnd$.pipe(Pt(this._mouseEventToBasic$(this._container.mouseService.filtered$(this._name,this._container.mouseService.mouseDrag$)).pipe(et(this._validateBasic)),((e,t)=>t)),It());this._addPointSubscription=this._tagCreator.tag$.pipe(zt((e=>e?$e(Ne(e),t):re()))).subscribe((([e,t])=>{const i=e.geometry;i.validate(t)||(t=i.getNonAdjustedVertex2d(3)),e.addPoint(t)})),this._geometryCreatedSubscription=this._tagCreator.tag$.pipe(zt((e=>e?e.created$.pipe(ze((e=>e.geometry))):re()))).subscribe(this._geometryCreated$)}_disableCreate(){this._container.mouseService.unclaimMouse(this._name),this._tagCreator.delete$.next(null),this._addPointSubscription.unsubscribe(),this._createSubscription.unsubscribe(),this._deleteSubscription.unsubscribe(),this._geometryCreatedSubscription.unsubscribe(),this._initializeAnchorIndexingSubscription.unsubscribe(),this._setVertexSubscription.unsubscribe()}_getNameExtension(){return"create-rect-drag"}}class Jy extends Hy{constructor(e,t,i,n,r){super(e,t,i,n),this._tagSet=r}_enable(){const e=this._tagSet.changed$.pipe(ze((e=>e.getAll())),zt((e=>_e(e).pipe(Ge((e=>e.interact$))))),zt((e=>Ve(Ne(e),this._container.mouseService.documentMouseUp$.pipe(ze((()=>({offsetX:0,offsetY:0,operation:Ay.None,tag:null}))),vt())))),It());Je(this._container.mouseService.mouseMove$,this._container.mouseService.domMouseMove$).pipe(It()),this._claimMouseSubscription=e.pipe(zt((e=>e.tag?this._container.mouseService.domMouseDragStart$:re()))).subscribe((()=>{this._container.mouseService.claimMouse(this._name,3)})),this._cursorSubscription=e.pipe(ze((e=>e.cursor)),dt()).subscribe((e=>{const t=["crosshair","move","nesw-resize","nwse-resize"];for(const e of t)this._container.container.classList.remove(`component-tag-edit-${e}`);e&&this._container.container.classList.add(`component-tag-edit-${e}`)})),this._unclaimMouseSubscription=this._container.mouseService.filtered$(this._name,this._container.mouseService.domMouseDragEnd$).subscribe((e=>{this._container.mouseService.unclaimMouse(this._name)})),this._preventDefaultSubscription=e.pipe(zt((e=>e.tag?this._container.mouseService.documentMouseMove$:re()))).subscribe((e=>{e.preventDefault()})),this._updateGeometrySubscription=e.pipe(zt((e=>{if(e.operation===Ay.None||!e.tag)return re();const t=this._container.mouseService.filtered$(this._name,this._container.mouseService.domMouseDrag$).pipe(et((e=>this._viewportCoords.insideElement(e,this._container.container))));return $e(t,this._container.renderService.renderCamera$).pipe(Pt(Ne(e),this._navigator.stateService.currentTransform$,(([e,t],i,n)=>[e,t,i,n])))}))).subscribe((([e,t,i,n])=>{const r=this._mouseEventToBasic(e,this._container.container,t,n,i.offsetX,i.offsetY),s=i.tag.geometry;i.operation===Ay.Centroid?s.setCentroid2d(r,n):i.operation===Ay.Vertex&&s.setVertex2d(i.vertexIndex,r,n)}))}_disable(){this._claimMouseSubscription.unsubscribe(),this._cursorSubscription.unsubscribe(),this._preventDefaultSubscription.unsubscribe(),this._unclaimMouseSubscription.unsubscribe(),this._updateGeometrySubscription.unsubscribe()}_getNameExtension(){return"edit-vertex"}}class Ky extends o_{constructor(e,t,i){super(e,t,i),this._tagDomRenderer=new Dy,this._tagScene=new Iy,this._tagSet=new Fy,this._tagCreator=new Ny(this,i),this._viewportCoords=new h_,this._createHandlers={CreatePoint:new Yy(this,t,i,this._viewportCoords,this._tagCreator),CreatePoints:new Wy(this,t,i,this._viewportCoords,this._tagCreator),CreatePolygon:new Qy(this,t,i,this._viewportCoords,this._tagCreator),CreateRect:new Zy(this,t,i,this._viewportCoords,this._tagCreator),CreateRectDrag:new Xy(this,t,i,this._viewportCoords,this._tagCreator),Default:void 0},this._editVertexHandler=new Jy(this,t,i,this._viewportCoords,this._tagSet),this._renderTags$=this._tagSet.changed$.pipe(ze((e=>{const t=e.getAll();return t.sort(((e,t)=>{const i=e.tag.id,n=t.tag.id;return in?1:0})),t})),It()),this._tagChanged$=this._renderTags$.pipe(zt((e=>_e(e).pipe(Ge((e=>Je(e.tag.changed$,e.tag.geometryChanged$)))))),It()),this._renderTagGLChanged$=this._renderTags$.pipe(zt((e=>_e(e).pipe(Ge((e=>e.glObjectsChanged$))))),It()),this._createGeometryChanged$=this._tagCreator.tag$.pipe(zt((e=>null!=e?e.geometryChanged$:re())),It()),this._createGLObjectsChanged$=this._tagCreator.tag$.pipe(zt((e=>null!=e?e.glObjectsChanged$:re())),It()),this._creatingConfiguration$=this._configuration$.pipe(dt(((e,t)=>e.mode===t.mode),(e=>({createColor:e.createColor,mode:e.mode}))),St(1),F()),this._creatingConfiguration$.subscribe((e=>{const t="tagmode",i={mode:e.mode,target:this,type:t};this.fire(t,i)}))}add(e){this._activated?this._navigator.stateService.currentTransform$.pipe(vt()).subscribe((t=>{this._tagSet.add(e,t);const i=e.map((e=>this._tagSet.get(e.id)));this._tagScene.add(i)})):this._tagSet.addDeactivated(e)}calculateRect(e){return new Promise(((t,i)=>{this._navigator.stateService.currentTransform$.pipe(vt(),ze((t=>e.getRect2d(t)))).subscribe((e=>{t(e)}),(e=>{i(e)}))}))}create(){this._tagCreator.replayedTag$.pipe(vt(),et((e=>!!e))).subscribe((e=>{e.create()}))}changeMode(e){this.configure({mode:e})}fire(e,t){super.fire(e,t)}get(e){if(this._activated){const t=this._tagSet.get(e);return void 0!==t?t.tag:void 0}return this._tagSet.getDeactivated(e)}getAll(){return this.activated?this._tagSet.getAll().map((e=>e.tag)):this._tagSet.getAllDeactivated()}getTagIdsAt(e){return new Promise(((t,i)=>{this._container.renderService.renderCamera$.pipe(vt(),ze((t=>{const i=this._viewportCoords.canvasToViewport(e[0],e[1],this._container.container);return this._tagScene.intersectObjects(i,t.perspective)}))).subscribe((e=>{t(e)}),(e=>{i(e)}))}))}has(e){return this._activated?this._tagSet.has(e):this._tagSet.hasDeactivated(e)}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}remove(e){this._activated?(this._tagSet.remove(e),this._tagScene.remove(e)):this._tagSet.removeDeactivated(e)}removeAll(){this._activated?(this._tagSet.removeAll(),this._tagScene.removeAll()):this._tagSet.removeAllDeactivated()}_activate(){this._editVertexHandler.enable();const e=_e(Object.keys(this._createHandlers)).pipe(ze((e=>this._createHandlers[e])),et((e=>!!e)),Ge((e=>e.geometryCreated$)),It()),t=this._subscriptions;t.push(e.subscribe((e=>{const t="geometrycreate",i={geometry:e,target:this,type:t};this.fire(t,i)}))),t.push(this._tagCreator.tag$.pipe(Et((e=>null==e)),dt()).subscribe((e=>{const t=null!=e?"tagcreatestart":"tagcreateend",i={target:this,type:t};this.fire(t,i)}))),t.push(e.subscribe((()=>{this.changeMode(Cy.Default)}))),t.push(this._creatingConfiguration$.subscribe((e=>{this._disableCreateHandlers();const t=Cy[e.mode],i=this._createHandlers[t];i&&i.enable()}))),t.push(this._renderTags$.subscribe((()=>{const e="tags",t={target:this,type:e};this.fire(e,t)}))),t.push(this._tagCreator.tag$.pipe(zt((e=>null!=e?e.aborted$.pipe(ze((()=>null))):re()))).subscribe((()=>{this.changeMode(Cy.Default)}))),t.push(this._tagCreator.tag$.subscribe((e=>{this._tagScene.hasCreateTag()&&this._tagScene.removeCreateTag(),null!=e&&this._tagScene.addCreateTag(e)}))),t.push(this._createGLObjectsChanged$.subscribe((e=>{this._tagScene.updateCreateTagObjects(e)}))),t.push(this._renderTagGLChanged$.subscribe((e=>{this._tagScene.updateObjects(e)}))),t.push(this._tagChanged$.subscribe((()=>{this._tagScene.update()}))),t.push($e(this._renderTags$.pipe(Lt([]),kt((()=>{this._container.domRenderer.render$.next({name:this._name,vNode:this._tagDomRenderer.clear()})}))),this._container.renderService.renderCamera$,this._container.spriteService.spriteAtlas$,this._container.renderService.size$,this._tagChanged$.pipe(Lt(null)),Je(this._tagCreator.tag$,this._createGeometryChanged$).pipe(Lt(null))).pipe(ze((([e,t,i,n,,r])=>({name:this._name,vNode:this._tagDomRenderer.render(e,r,i,t.perspective,n)})))).subscribe(this._container.domRenderer.render$)),t.push(this._navigator.stateService.currentState$.pipe(ze((e=>{const t=this._tagScene;return{name:this._name,renderer:{frameId:e.id,needsRender:t.needsRender,render:t.render.bind(t),pass:n_.Opaque}}}))).subscribe(this._container.glRenderer.render$)),this._navigator.stateService.currentTransform$.pipe(vt()).subscribe((e=>{this._tagSet.activate(e),this._tagScene.add(this._tagSet.getAll())}))}_deactivate(){this._editVertexHandler.disable(),this._disableCreateHandlers(),this._tagScene.clear(),this._tagSet.deactivate(),this._tagCreator.delete$.next(null),this._subscriptions.unsubscribe(),this._container.container.classList.remove("component-tag-create")}_getDefaultConfiguration(){return{createColor:16777215,indicatePointsCompleter:!0,mode:Cy.Default}}_disableCreateHandlers(){const e=this._createHandlers;for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t];i&&i.disable()}}}Ky.componentName="tag";class ex extends o_{constructor(e,t,i){super(e,t,i),this._viewportCoords=new h_,this._zoomDelta$=new V}_activate(){const e=this._subscriptions;e.push($e(this._navigator.stateService.currentState$,this._navigator.stateService.state$,this._configuration$,this._container.renderService.size$).pipe(ze((([e,t,i,n])=>{const r=e.state.zoom,s=r_.h("div.mapillary-zoom-in-icon",[]),a=r>=3||t===O_.Waiting?r_.h("div.mapillary-zoom-in-button-inactive",[s]):r_.h("div.mapillary-zoom-in-button",{onclick:()=>{this._zoomDelta$.next(1)}},[s]),o=r_.h("div.mapillary-zoom-out-icon",[]),c=r<=0||t===O_.Waiting?r_.h("div.mapillary-zoom-out-button-inactive",[o]):r_.h("div.mapillary-zoom-out-button",{onclick:()=>{this._zoomDelta$.next(-1)}},[o]),l=i.size===i_.Small||i.size===i_.Automatic&&n.width<640?".mapillary-zoom-compact":"";return{name:this._name,vNode:r_.h("div.mapillary-zoom-container"+l,{oncontextmenu:e=>{e.preventDefault()}},[a,c])}}))).subscribe(this._container.domRenderer.render$)),e.push(this._zoomDelta$.pipe(Pt(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$)).subscribe((([e,t,i])=>{const n=this._viewportCoords.unprojectFromViewport(0,0,t.perspective),r=i.projectBasic(n.toArray());this._navigator.stateService.zoomIn(e,r)})))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{size:i_.Automatic}}}ex.componentName="zoom";class tx extends o_{constructor(e,t,i,n){super(e,t,i),this._canvasId=`${t.id}-${this._name}`,this._dom=n||new pM}_activate(){const e=this._container.domRenderer.element$.pipe(ze((()=>this._dom.document.getElementById(this._canvasId))),et((e=>!!e)),ze((e=>{const t=e.parentElement,i=t.offsetWidth;return[e,{height:t.offsetHeight,width:i}]})),dt(((e,t)=>e.height===t.height&&e.width===t.width),(([,e])=>e)));this._subscriptions.push($e(e,this._navigator.stateService.currentImage$).subscribe((([[e,t],i])=>{e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(i.image,0,0,t.width,t.height)}))),this._container.domRenderer.renderAdaptive$.next({name:this._name,vNode:r_.h(`canvas#${this._canvasId}`,[])})}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{}}}tx.componentName="imagefallback";class ix extends o_{constructor(e,t,i){super(e,t,i),this._seqNames={},this._seqNames[Id[Id.Prev]]="-prev",this._seqNames[Id[Id.Next]]="-next",this._spaTopNames={},this._spaTopNames[Id[Id.TurnLeft]]="-turn-left",this._spaTopNames[Id[Id.StepLeft]]="-left",this._spaTopNames[Id[Id.StepForward]]="-forward",this._spaTopNames[Id[Id.StepRight]]="-right",this._spaTopNames[Id[Id.TurnRight]]="-turn-right",this._spaBottomNames={},this._spaBottomNames[Id[Id.TurnU]]="-turn-around",this._spaBottomNames[Id[Id.StepBackward]]="-backward"}_activate(){this._subscriptions.push($e(this._navigator.stateService.currentImage$,this._configuration$).pipe(zt((([e,t])=>$e(t.sequence?e.sequenceEdges$.pipe(ze((e=>e.edges.map((e=>e.data.direction))))):Ne([]),!Od(e.cameraType)&&t.spatial?e.spatialEdges$.pipe(ze((e=>e.edges.map((e=>e.data.direction))))):Ne([])).pipe(ze((([e,t])=>e.concat(t)))))),ze((e=>{const t=this._createArrowRow(this._seqNames,e),i=this._createArrowRow(this._spaTopNames,e),n=this._createArrowRow(this._spaBottomNames,e),r=r_.h("div.mapillary-navigation-sequence",t),s=r_.h("div.NavigationSpatialTop",i),a=r_.h("div.mapillary-navigation-spatial-bottom",n),o=r_.h("div.mapillary-navigation-spatial",[s,a]);return{name:this._name,vNode:r_.h("div.NavigationContainer",[r,o])}}))).subscribe(this._container.domRenderer.render$))}_deactivate(){this._subscriptions.unsubscribe()}_getDefaultConfiguration(){return{sequence:!0,spatial:!0}}_createArrowRow(e,t){const i=[];for(const n in e){if(!e.hasOwnProperty(n))continue;const r=Id[n];-1!==t.indexOf(r)?i.push(this._createVNode(r,e[n],"visible")):i.push(this._createVNode(r,e[n],"hidden"))}return i}_createVNode(e,t,i){return r_.h(`span.mapillary-navigation-button.mapillary-navigation${t}`,{onclick:()=>{this._navigator.moveDir$(e).subscribe(void 0,(e=>{e instanceof d_||console.error(e)}))},style:{visibility:i}},[])}}function nx(e){let t=e.length;for(;--t>=0;)e[t]=0}ix.componentName="navigationfallback";const rx=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),sx=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ax=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ox=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cx=new Array(576);nx(cx);const lx=new Array(60);nx(lx);const hx=new Array(512);nx(hx);const ux=new Array(256);nx(ux);const px=new Array(29);nx(px);const dx=new Array(30);function gx(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let mx,fx,_x;function Mx(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}nx(dx);const vx=e=>e<256?hx[e]:hx[256+(e>>>7)],yx=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},xx=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<{xx(e,i[2*t],i[2*t+1])},wx=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},Tx=(e,t,i)=>{const n=new Array(16);let r,s,a=0;for(r=1;r<=15;r++)n[r]=a=a+i[r-1]<<1;for(s=0;s<=t;s++){let t=e[2*s+1];0!==t&&(e[2*s]=wx(n[t]++,t))}},Sx=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},Nx=e=>{e.bi_valid>8?yx(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Dx=(e,t,i,n)=>{const r=2*t,s=2*i;return e[r]{const n=e.heap[i];let r=i<<1;for(;r<=e.heap_len&&(r{let n,r,s,a,o=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],r=e.pending_buf[e.l_buf+o],o++,0===n?bx(e,r,t):(s=ux[r],bx(e,s+256+1,t),a=rx[s],0!==a&&(r-=px[s],xx(e,r,a)),n--,s=vx(n),bx(e,s,i),a=sx[s],0!==a&&(n-=dx[s],xx(e,n,a)))}while(o{const i=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,s=t.stat_desc.elems;let a,o,c,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)Ix(e,i,a);c=s;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ix(e,i,1),o=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=o,i[2*c]=i[2*a]+i[2*o],e.depth[c]=(e.depth[a]>=e.depth[o]?e.depth[a]:e.depth[o])+1,i[2*a+1]=i[2*o+1]=c,e.heap[1]=c++,Ix(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,s=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,h,u,p,d,g,m=0;for(p=0;p<=15;p++)e.bl_count[p]=0;for(i[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)h=e.heap[l],p=i[2*i[2*h+1]+1]+1,p>c&&(p=c,m++),i[2*h+1]=p,h>n||(e.bl_count[p]++,d=0,h>=o&&(d=a[h-o]),g=i[2*h],e.opt_len+=g*(p+d),s&&(e.static_len+=g*(r[2*h+1]+d)));if(0!==m){do{for(p=c-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(p=c;0!==p;p--)for(h=e.bl_count[p];0!==h;)u=e.heap[--l],u>n||(i[2*u+1]!==p&&(e.opt_len+=(p-i[2*u+1])*i[2*u],i[2*u+1]=p),h--)}})(e,t),Tx(i,l,e.bl_count)},Ex=(e,t,i)=>{let n,r,s=-1,a=t[1],o=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)r=a,a=t[2*(n+1)+1],++o{let n,r,s=-1,a=t[1],o=0,c=7,l=4;for(0===a&&(c=138,l=3),n=0;n<=i;n++)if(r=a,a=t[2*(n+1)+1],!(++o{xx(e,0+(n?1:0),3),((e,t,i,n)=>{Nx(e),yx(e,i),yx(e,~i),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i)};var Ox={_tr_init:e=>{zx||((()=>{let e,t,i,n,r;const s=new Array(16);for(i=0,n=0;n<28;n++)for(px[n]=i,e=0;e<1<>=7;n<30;n++)for(dx[n]=r<<7,e=0;e<1<{let r,s,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Ax(e,e.l_desc),Ax(e,e.d_desc),a=(e=>{let t;for(Ex(e,e.dyn_ltree,e.l_desc.max_code),Ex(e,e.dyn_dtree,e.d_desc.max_code),Ax(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*ox[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=r&&(r=s)):r=s=i+5,i+4<=r&&-1!==t?jx(e,t,i,n):4===e.strategy||s===r?(xx(e,2+(n?1:0),3),Cx(e,cx,lx)):(xx(e,4+(n?1:0),3),((e,t,i,n)=>{let r;for(xx(e,t-257,5),xx(e,i-1,5),xx(e,n-4,4),r=0;r(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(ux[i]+256+1)]++,e.dyn_dtree[2*vx(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{xx(e,2,3),bx(e,256,cx),(e=>{16===e.bi_valid?(yx(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},kx=(e,t,i,n)=>{let r=65535&e,s=e>>>16&65535,a=0;for(;0!==i;){a=i>2e3?2e3:i,i-=a;do{r=r+t[n++]|0,s=s+r|0}while(--a);r%=65521,s%=65521}return r|s<<16};const Px=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Rx=(e,t,i,n)=>{const r=Px,s=n+i;e^=-1;for(let i=n;i>>8^r[255&(e^t[i])];return~e},Ux={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},$x={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Bx,_tr_stored_block:Fx,_tr_flush_block:Gx,_tr_tally:Hx,_tr_align:Vx}=Ox,{Z_NO_FLUSH:Yx,Z_PARTIAL_FLUSH:qx,Z_FULL_FLUSH:Wx,Z_FINISH:Qx,Z_BLOCK:Zx,Z_OK:Xx,Z_STREAM_END:Jx,Z_STREAM_ERROR:Kx,Z_DATA_ERROR:eb,Z_BUF_ERROR:tb,Z_DEFAULT_COMPRESSION:ib,Z_FILTERED:nb,Z_HUFFMAN_ONLY:rb,Z_RLE:sb,Z_FIXED:ab,Z_DEFAULT_STRATEGY:ob,Z_UNKNOWN:cb,Z_DEFLATED:lb}=$x,hb=258,ub=262,pb=103,db=113,gb=666,mb=(e,t)=>(e.msg=Ux[t],t),fb=e=>(e<<1)-(e>4?9:0),_b=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let Mb=(e,t,i)=>(t<{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},yb=(e,t)=>{Gx(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,vb(e.strm)},xb=(e,t)=>{e.pending_buf[e.pending++]=t},bb=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},wb=(e,t,i,n)=>{let r=e.avail_in;return r>n&&(r=n),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),i),1===e.state.wrap?e.adler=kx(e.adler,t,r,i):2===e.state.wrap&&(e.adler=Rx(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)},Tb=(e,t)=>{let i,n,r=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match;const c=e.strstart>e.w_size-ub?e.strstart-(e.w_size-ub):0,l=e.window,h=e.w_mask,u=e.prev,p=e.strstart+hb;let d=l[s+a-1],g=l[s+a];e.prev_length>=e.good_match&&(r>>=2),o>e.lookahead&&(o=e.lookahead);do{if(i=t,l[i+a]===g&&l[i+a-1]===d&&l[i]===l[s]&&l[++i]===l[s+1]){s+=2,i++;do{}while(l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&sa){if(e.match_start=t,a=n,n>=o)break;d=l[s+a-1],g=l[s+a]}}}while((t=u[t&h])>c&&0!=--r);return a<=e.lookahead?a:e.lookahead},Sb=e=>{const t=e.w_size;let i,n,r,s,a;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ub)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,i=n;do{r=e.head[--i],e.head[i]=r>=t?r-t:0}while(--n);n=t,i=n;do{r=e.prev[--i],e.prev[i]=r>=t?r-t:0}while(--n);s+=t}if(0===e.strm.avail_in)break;if(n=wb(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=Mb(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=Mb(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let i,n;for(;;){if(e.lookahead=3&&(e.ins_h=Mb(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-ub&&(e.match_length=Tb(e,i)),e.match_length>=3)if(n=Hx(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Mb(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Mb(e,e.ins_h,e.window[e.strstart+1]);else n=Hx(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(yb(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Qx?(yb(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(yb(e,!1),0===e.strm.avail_out)?1:2},Db=(e,t)=>{let i,n,r;for(;;){if(e.lookahead=3&&(e.ins_h=Mb(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,n=Hx(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=Mb(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(yb(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=Hx(e,0,e.window[e.strstart-1]),n&&yb(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Hx(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Qx?(yb(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(yb(e,!1),0===e.strm.avail_out)?1:2};function Ib(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}const Cb=[new Ib(0,0,0,0,((e,t)=>{let i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Sb(e),0===e.lookahead&&t===Yx)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+i;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,yb(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-ub&&(yb(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Qx?(yb(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(yb(e,!1),e.strm.avail_out),1)})),new Ib(4,4,8,4,Nb),new Ib(4,5,16,8,Nb),new Ib(4,6,32,32,Nb),new Ib(4,4,16,16,Db),new Ib(8,16,32,32,Db),new Ib(8,16,128,128,Db),new Ib(8,32,128,256,Db),new Ib(32,128,258,1024,Db),new Ib(32,258,258,4096,Db)];function Ab(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=lb,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),_b(this.dyn_ltree),_b(this.dyn_dtree),_b(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),_b(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),_b(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Eb=e=>{if(!e||!e.state)return mb(e,Kx);e.total_in=e.total_out=0,e.data_type=cb;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:db,e.adler=2===t.wrap?0:1,t.last_flush=Yx,Bx(t),Xx},Lb=e=>{const t=Eb(e);var i;return t===Xx&&((i=e.state).window_size=2*i.w_size,_b(i.head),i.max_lazy_match=Cb[i.level].max_lazy,i.good_match=Cb[i.level].good_length,i.nice_match=Cb[i.level].nice_length,i.max_chain_length=Cb[i.level].max_chain,i.strstart=0,i.block_start=0,i.lookahead=0,i.insert=0,i.match_length=i.prev_length=2,i.match_available=0,i.ins_h=0),t},zb=(e,t,i,n,r,s)=>{if(!e)return Kx;let a=1;if(t===ib&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),r<1||r>9||i!==lb||n<8||n>15||t<0||t>9||s<0||s>ab)return mb(e,Kx);8===n&&(n=9);const o=new Ab;return e.state=o,o.strm=e,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<e&&e.state?2!==e.state.wrap?Kx:(e.state.gzhead=t,Xx):Kx,kb=(e,t)=>{let i,n;if(!e||!e.state||t>Zx||t<0)return e?mb(e,Kx):Kx;const r=e.state;if(!e.output||!e.input&&0!==e.avail_in||r.status===gb&&t!==Qx)return mb(e,0===e.avail_out?tb:Kx);r.strm=e;const s=r.last_flush;if(r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,xb(r,31),xb(r,139),xb(r,8),r.gzhead?(xb(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xb(r,255&r.gzhead.time),xb(r,r.gzhead.time>>8&255),xb(r,r.gzhead.time>>16&255),xb(r,r.gzhead.time>>24&255),xb(r,9===r.level?2:r.strategy>=rb||r.level<2?4:0),xb(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xb(r,255&r.gzhead.extra.length),xb(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Rx(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xb(r,0),xb(r,0),xb(r,0),xb(r,0),xb(r,0),xb(r,9===r.level?2:r.strategy>=rb||r.level<2?4:0),xb(r,3),r.status=db);else{let t=lb+(r.w_bits-8<<4)<<8,i=-1;i=r.strategy>=rb||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=i<<6,0!==r.strstart&&(t|=32),t+=31-t%31,r.status=db,bb(r,t),0!==r.strstart&&(bb(r,e.adler>>>16),bb(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Rx(e.adler,r.pending_buf,r.pending-i,i)),vb(e),i=r.pending,r.pending!==r.pending_buf_size));)xb(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Rx(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Rx(e.adler,r.pending_buf,r.pending-i,i)),vb(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexi&&(e.adler=Rx(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Rx(e.adler,r.pending_buf,r.pending-i,i)),vb(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexi&&(e.adler=Rx(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.status=pb)}else r.status=pb;if(r.status===pb&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&vb(e),r.pending+2<=r.pending_buf_size&&(xb(r,255&e.adler),xb(r,e.adler>>8&255),e.adler=0,r.status=db)):r.status=db),0!==r.pending){if(vb(e),0===e.avail_out)return r.last_flush=-1,Xx}else if(0===e.avail_in&&fb(t)<=fb(s)&&t!==Qx)return mb(e,tb);if(r.status===gb&&0!==e.avail_in)return mb(e,tb);if(0!==e.avail_in||0!==r.lookahead||t!==Yx&&r.status!==gb){let i=r.strategy===rb?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(Sb(e),0===e.lookahead)){if(t===Yx)return 1;break}if(e.match_length=0,i=Hx(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(yb(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Qx?(yb(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(yb(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===sb?((e,t)=>{let i,n,r,s;const a=e.window;for(;;){if(e.lookahead<=hb){if(Sb(e),e.lookahead<=hb&&t===Yx)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,n=a[r],n===a[++r]&&n===a[++r]&&n===a[++r])){s=e.strstart+hb;do{}while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=Hx(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=Hx(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(yb(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Qx?(yb(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(yb(e,!1),0===e.strm.avail_out)?1:2})(r,t):Cb[r.level].func(r,t);if(3!==i&&4!==i||(r.status=gb),1===i||3===i)return 0===e.avail_out&&(r.last_flush=-1),Xx;if(2===i&&(t===qx?Vx(r):t!==Zx&&(Fx(r,0,0,!1),t===Wx&&(_b(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),vb(e),0===e.avail_out))return r.last_flush=-1,Xx}return t!==Qx?Xx:r.wrap<=0?Jx:(2===r.wrap?(xb(r,255&e.adler),xb(r,e.adler>>8&255),xb(r,e.adler>>16&255),xb(r,e.adler>>24&255),xb(r,255&e.total_in),xb(r,e.total_in>>8&255),xb(r,e.total_in>>16&255),xb(r,e.total_in>>24&255)):(bb(r,e.adler>>>16),bb(r,65535&e.adler)),vb(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?Xx:Jx)},Pb=e=>{if(!e||!e.state)return Kx;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==pb&&t!==db&&t!==gb?mb(e,Kx):(e.state=null,t===db?mb(e,eb):Xx)},Rb=(e,t)=>{let i=t.length;if(!e||!e.state)return Kx;const n=e.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return Kx;if(1===r&&(e.adler=kx(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===r&&(_b(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.w_size}const s=e.avail_in,a=e.next_in,o=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,Sb(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=Mb(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Sb(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=a,e.input=o,e.avail_in=s,n.wrap=r,Xx};const Ub=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var $b={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)Ub(i,t)&&(e[t]=i[t])}}return e},flattenChunks:e=>{let t=0;for(let i=0,n=e.length;i=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Fb[254]=Fb[254]=1;var Gb={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,r,s,a=e.length,o=0;for(r=0;r>>6,t[s++]=128|63&i):i<65536?(t[s++]=224|i>>>12,t[s++]=128|i>>>6&63,t[s++]=128|63&i):(t[s++]=240|i>>>18,t[s++]=128|i>>>12&63,t[s++]=128|i>>>6&63,t[s++]=128|63&i);return t},buf2string:(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,r;const s=new Array(2*i);for(r=0,n=0;n4)s[r++]=65533,n+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&n1?s[r++]=65533:t<65536?s[r++]=t:(t-=65536,s[r++]=55296|t>>10&1023,s[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Bb)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let n=0;n{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+Fb[e[i]]>t?i:t}},Hb=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Vb=Object.prototype.toString,{Z_NO_FLUSH:Yb,Z_SYNC_FLUSH:qb,Z_FULL_FLUSH:Wb,Z_FINISH:Qb,Z_OK:Zb,Z_STREAM_END:Xb,Z_DEFAULT_COMPRESSION:Jb,Z_DEFAULT_STRATEGY:Kb,Z_DEFLATED:ew}=$x;function tw(e){this.options=$b.assign({level:Jb,method:ew,chunkSize:16384,windowBits:15,memLevel:8,strategy:Kb},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Hb,this.strm.avail_out=0;let i=jb(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==Zb)throw new Error(Ux[i]);if(t.header&&Ob(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Gb.string2buf(t.dictionary):"[object ArrayBuffer]"===Vb.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=Rb(this.strm,e),i!==Zb)throw new Error(Ux[i]);this._dict_set=!0}}tw.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize;let r,s;if(this.ended)return!1;for(s=t===~~t?t:!0===t?Qb:Yb,"string"==typeof e?i.input=Gb.string2buf(e):"[object ArrayBuffer]"===Vb.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),(s===qb||s===Wb)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(r=kb(i,s),r===Xb)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),r=Pb(this.strm),this.onEnd(r),this.ended=!0,r===Zb;if(0!==i.avail_out){if(s>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},tw.prototype.onData=function(e){this.chunks.push(e)},tw.prototype.onEnd=function(e){e===Zb&&(this.result=$b.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var iw=function(e,t){let i,n,r,s,a,o,c,l,h,u,p,d,g,m,f,_,M,v,y,x,b,w,T,S;const N=e.state;i=e.next_in,T=e.input,n=i+(e.avail_in-5),r=e.next_out,S=e.output,s=r-(t-e.avail_out),a=r+(e.avail_out-257),o=N.dmax,c=N.wsize,l=N.whave,h=N.wnext,u=N.window,p=N.hold,d=N.bits,g=N.lencode,m=N.distcode,f=(1<>>24,p>>>=v,d-=v,v=M>>>16&255,0===v)S[r++]=65535&M;else{if(!(16&v)){if(64&v){if(32&v){N.mode=12;break e}e.msg="invalid literal/length code",N.mode=30;break e}M=g[(65535&M)+(p&(1<>>=v,d-=v),d<15&&(p+=T[i++]<>>24,p>>>=v,d-=v,v=M>>>16&255,16&v){if(x=65535&M,v&=15,do){e.msg="invalid distance too far back",N.mode=30;break e}if(p>>>=v,d-=v,v=r-s,x>v){if(v=x-v,v>l&&N.sane){e.msg="invalid distance too far back",N.mode=30;break e}if(b=0,w=u,0===h){if(b+=c-v,v2;)S[r++]=w[b++],S[r++]=w[b++],S[r++]=w[b++],y-=3;y&&(S[r++]=w[b++],y>1&&(S[r++]=w[b++]))}else{b=r-x;do{S[r++]=S[b++],S[r++]=S[b++],S[r++]=S[b++],y-=3}while(y>2);y&&(S[r++]=S[b++],y>1&&(S[r++]=S[b++]))}break}if(64&v){e.msg="invalid distance code",N.mode=30;break e}M=m[(65535&M)+(p&(1<>3,i-=y,d-=y<<3,p&=(1<{const c=o.bits;let l,h,u,p,d,g,m=0,f=0,_=0,M=0,v=0,y=0,x=0,b=0,w=0,T=0,S=null,N=0;const D=new Uint16Array(16),I=new Uint16Array(16);let C,A,E,L=null,z=0;for(m=0;m<=15;m++)D[m]=0;for(f=0;f=1&&0===D[M];M--);if(v>M&&(v=M),0===M)return r[s++]=20971520,r[s++]=20971520,o.bits=1,0;for(_=1;_0&&(0===e||1!==M))return-1;for(I[1]=0,m=1;m<15;m++)I[m+1]=I[m]+D[m];for(f=0;f852||2===e&&w>592)return 1;for(;;){C=m-x,a[f]g?(A=L[z+a[f]],E=S[N+a[f]]):(A=96,E=0),l=1<>x)+h]=C<<24|A<<16|E}while(0!==h);for(l=1<>=1;if(0!==l?(T&=l-1,T+=l):T=0,f++,0==--D[m]){if(m===M)break;m=t[i+a[f]]}if(m>v&&(T&p)!==u){for(0===x&&(x=v),d+=_,y=m-x,b=1<852||2===e&&w>592)return 1;u=T&p,r[u]=v<<24|y<<16|d-s}}return 0!==T&&(r[d+T]=m-x<<24|64<<16),o.bits=v,0};const{Z_FINISH:cw,Z_BLOCK:lw,Z_TREES:hw,Z_OK:uw,Z_STREAM_END:pw,Z_NEED_DICT:dw,Z_STREAM_ERROR:gw,Z_DATA_ERROR:mw,Z_MEM_ERROR:fw,Z_BUF_ERROR:_w,Z_DEFLATED:Mw}=$x,vw=12,yw=30,xw=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function bw(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ww=e=>{if(!e||!e.state)return gw;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,uw},Tw=e=>{if(!e||!e.state)return gw;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ww(e)},Sw=(e,t)=>{let i;if(!e||!e.state)return gw;const n=e.state;return t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?gw:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,Tw(e))},Nw=(e,t)=>{if(!e)return gw;const i=new bw;e.state=i,i.window=null;const n=Sw(e,t);return n!==uw&&(e.state=null),n};let Dw,Iw,Cw=!0;const Aw=e=>{if(Cw){Dw=new Int32Array(512),Iw=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ow(1,e.lens,0,288,Dw,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ow(2,e.lens,0,32,Iw,0,e.work,{bits:5}),Cw=!1}e.lencode=Dw,e.lenbits=9,e.distcode=Iw,e.distbits=5},Ew=(e,t,i,n)=>{let r;const s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(t.subarray(i-s.wsize,i),0),s.wnext=0,s.whave=s.wsize):(r=s.wsize-s.wnext,r>n&&(r=n),s.window.set(t.subarray(i-n,i-n+r),s.wnext),(n-=r)?(s.window.set(t.subarray(i-n,i),0),s.wnext=n,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whaveNw(e,15),inflateInit2:Nw,inflate:(e,t)=>{let i,n,r,s,a,o,c,l,h,u,p,d,g,m,f,_,M,v,y,x,b,w,T=0;const S=new Uint8Array(4);let N,D;const I=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return gw;i=e.state,i.mode===vw&&(i.mode=13),a=e.next_out,r=e.output,c=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,l=i.hold,h=i.bits,u=o,p=c,w=uw;e:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;h<16;){if(0===o)break e;o--,l+=n[s++]<>>8&255,i.check=Rx(i.check,S,2,0),l=0,h=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=yw;break}if((15&l)!==Mw){e.msg="unknown compression method",i.mode=yw;break}if(l>>>=4,h-=4,b=8+(15&l),0===i.wbits)i.wbits=b;else if(b>i.wbits){e.msg="invalid window size",i.mode=yw;break}i.dmax=1<>8&1),512&i.flags&&(S[0]=255&l,S[1]=l>>>8&255,i.check=Rx(i.check,S,2,0)),l=0,h=0,i.mode=3;case 3:for(;h<32;){if(0===o)break e;o--,l+=n[s++]<>>8&255,S[2]=l>>>16&255,S[3]=l>>>24&255,i.check=Rx(i.check,S,4,0)),l=0,h=0,i.mode=4;case 4:for(;h<16;){if(0===o)break e;o--,l+=n[s++]<>8),512&i.flags&&(S[0]=255&l,S[1]=l>>>8&255,i.check=Rx(i.check,S,2,0)),l=0,h=0,i.mode=5;case 5:if(1024&i.flags){for(;h<16;){if(0===o)break e;o--,l+=n[s++]<>>8&255,i.check=Rx(i.check,S,2,0)),l=0,h=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(d=i.length,d>o&&(d=o),d&&(i.head&&(b=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(n.subarray(s,s+d),b)),512&i.flags&&(i.check=Rx(i.check,n,d,s)),o-=d,s+=d,i.length-=d),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===o)break e;d=0;do{b=n[s+d++],i.head&&b&&i.length<65536&&(i.head.name+=String.fromCharCode(b))}while(b&&d>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=vw;break;case 10:for(;h<32;){if(0===o)break e;o--,l+=n[s++]<>>=7&h,h-=7&h,i.mode=27;break}for(;h<3;){if(0===o)break e;o--,l+=n[s++]<>>=1,h-=1,3&l){case 0:i.mode=14;break;case 1:if(Aw(i),i.mode=20,t===hw){l>>>=2,h-=2;break e}break;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=yw}l>>>=2,h-=2;break;case 14:for(l>>>=7&h,h-=7&h;h<32;){if(0===o)break e;o--,l+=n[s++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=yw;break}if(i.length=65535&l,l=0,h=0,i.mode=15,t===hw)break e;case 15:i.mode=16;case 16:if(d=i.length,d){if(d>o&&(d=o),d>c&&(d=c),0===d)break e;r.set(n.subarray(s,s+d),a),o-=d,s+=d,c-=d,a+=d,i.length-=d;break}i.mode=vw;break;case 17:for(;h<14;){if(0===o)break e;o--,l+=n[s++]<>>=5,h-=5,i.ndist=1+(31&l),l>>>=5,h-=5,i.ncode=4+(15&l),l>>>=4,h-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=yw;break}i.have=0,i.mode=18;case 18:for(;i.have>>=3,h-=3}for(;i.have<19;)i.lens[I[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,N={bits:i.lenbits},w=ow(0,i.lens,0,19,i.lencode,0,i.work,N),i.lenbits=N.bits,w){e.msg="invalid code lengths set",i.mode=yw;break}i.have=0,i.mode=19;case 19:for(;i.have>>24,_=T>>>16&255,M=65535&T,!(f<=h);){if(0===o)break e;o--,l+=n[s++]<>>=f,h-=f,i.lens[i.have++]=M;else{if(16===M){for(D=f+2;h>>=f,h-=f,0===i.have){e.msg="invalid bit length repeat",i.mode=yw;break}b=i.lens[i.have-1],d=3+(3&l),l>>>=2,h-=2}else if(17===M){for(D=f+3;h>>=f,h-=f,b=0,d=3+(7&l),l>>>=3,h-=3}else{for(D=f+7;h>>=f,h-=f,b=0,d=11+(127&l),l>>>=7,h-=7}if(i.have+d>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=yw;break}for(;d--;)i.lens[i.have++]=b}}if(i.mode===yw)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=yw;break}if(i.lenbits=9,N={bits:i.lenbits},w=ow(1,i.lens,0,i.nlen,i.lencode,0,i.work,N),i.lenbits=N.bits,w){e.msg="invalid literal/lengths set",i.mode=yw;break}if(i.distbits=6,i.distcode=i.distdyn,N={bits:i.distbits},w=ow(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,N),i.distbits=N.bits,w){e.msg="invalid distances set",i.mode=yw;break}if(i.mode=20,t===hw)break e;case 20:i.mode=21;case 21:if(o>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=s,e.avail_in=o,i.hold=l,i.bits=h,iw(e,p),a=e.next_out,r=e.output,c=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,l=i.hold,h=i.bits,i.mode===vw&&(i.back=-1);break}for(i.back=0;T=i.lencode[l&(1<>>24,_=T>>>16&255,M=65535&T,!(f<=h);){if(0===o)break e;o--,l+=n[s++]<>v)],f=T>>>24,_=T>>>16&255,M=65535&T,!(v+f<=h);){if(0===o)break e;o--,l+=n[s++]<>>=v,h-=v,i.back+=v}if(l>>>=f,h-=f,i.back+=f,i.length=M,0===_){i.mode=26;break}if(32&_){i.back=-1,i.mode=vw;break}if(64&_){e.msg="invalid literal/length code",i.mode=yw;break}i.extra=15&_,i.mode=22;case 22:if(i.extra){for(D=i.extra;h>>=i.extra,h-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;T=i.distcode[l&(1<>>24,_=T>>>16&255,M=65535&T,!(f<=h);){if(0===o)break e;o--,l+=n[s++]<>v)],f=T>>>24,_=T>>>16&255,M=65535&T,!(v+f<=h);){if(0===o)break e;o--,l+=n[s++]<>>=v,h-=v,i.back+=v}if(l>>>=f,h-=f,i.back+=f,64&_){e.msg="invalid distance code",i.mode=yw;break}i.offset=M,i.extra=15&_,i.mode=24;case 24:if(i.extra){for(D=i.extra;h>>=i.extra,h-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=yw;break}i.mode=25;case 25:if(0===c)break e;if(d=p-c,i.offset>d){if(d=i.offset-d,d>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=yw;break}d>i.wnext?(d-=i.wnext,g=i.wsize-d):g=i.wnext-d,d>i.length&&(d=i.length),m=i.window}else m=r,g=a-i.offset,d=i.length;d>c&&(d=c),c-=d,i.length-=d;do{r[a++]=m[g++]}while(--d);0===i.length&&(i.mode=21);break;case 26:if(0===c)break e;r[a++]=i.length,c--,i.mode=21;break;case 27:if(i.wrap){for(;h<32;){if(0===o)break e;o--,l|=n[s++]<{if(!e||!e.state)return gw;let t=e.state;return t.window&&(t.window=null),e.state=null,uw},inflateGetHeader:(e,t)=>{if(!e||!e.state)return gw;const i=e.state;return 2&i.wrap?(i.head=t,t.done=!1,uw):gw},inflateSetDictionary:(e,t)=>{const i=t.length;let n,r,s;return e&&e.state?(n=e.state,0!==n.wrap&&11!==n.mode?gw:11===n.mode&&(r=1,r=kx(r,t,i,0),r!==n.check)?mw:(s=Ew(e,t,i,i),s?(n.mode=31,fw):(n.havedict=1,uw))):gw},inflateInfo:"pako inflate (from Nodeca project)"},zw=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const jw=Object.prototype.toString,{Z_NO_FLUSH:Ow,Z_FINISH:kw,Z_OK:Pw,Z_STREAM_END:Rw,Z_NEED_DICT:Uw,Z_STREAM_ERROR:$w,Z_DATA_ERROR:Bw,Z_MEM_ERROR:Fw}=$x;function Gw(e){this.options=$b.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Hb,this.strm.avail_out=0;let i=Lw.inflateInit2(this.strm,t.windowBits);if(i!==Pw)throw new Error(Ux[i]);if(this.header=new zw,Lw.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Gb.string2buf(t.dictionary):"[object ArrayBuffer]"===jw.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=Lw.inflateSetDictionary(this.strm,t.dictionary),i!==Pw)))throw new Error(Ux[i])}function Hw(e,t){const i=new Gw(t);if(i.push(e),i.err)throw i.msg||Ux[i.err];return i.result}Gw.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize,r=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(a=t===~~t?t:!0===t?kw:Ow,"[object ArrayBuffer]"===jw.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),s=Lw.inflate(i,a),s===Uw&&r&&(s=Lw.inflateSetDictionary(i,r),s===Pw?s=Lw.inflate(i,a):s===Bw&&(s=Uw));i.avail_in>0&&s===Rw&&i.state.wrap>0&&0!==e[i.next_in];)Lw.inflateReset(i),s=Lw.inflate(i,a);switch(s){case $w:case Bw:case Uw:case Fw:return this.onEnd(s),this.ended=!0,!1}if(o=i.avail_out,i.next_out&&(0===i.avail_out||s===Rw))if("string"===this.options.to){let e=Gb.utf8border(i.output,i.next_out),t=i.next_out-e,r=Gb.buf2string(i.output,e);i.next_out=t,i.avail_out=n-t,t&&i.output.set(i.output.subarray(e,e+t),0),this.onData(r)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(s!==Pw||0!==o){if(s===Rw)return s=Lw.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},Gw.prototype.onData=function(e){this.chunks.push(e)},Gw.prototype.onEnd=function(e){e===Pw&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=$b.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Vw={Inflate:Gw,inflate:Hw,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Hw(e,t)},ungzip:Hw,constants:$x};const{Inflate:Yw,inflate:qw,inflateRaw:Ww,ungzip:Qw}=Vw;var Zw=qw,Xw=Kw,Jw={read:function(e,t,i,n,r){var s,a,o=8*r-n-1,c=(1<>1,h=-7,u=i?r-1:0,p=i?-1:1,d=e[t+u];for(u+=p,s=d&(1<<-h)-1,d>>=-h,h+=o;h>0;s=256*s+e[t+u],u+=p,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=n;h>0;a=256*a+e[t+u],u+=p,h-=8);if(0===s)s=1-l;else{if(s===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),s-=l}return(d?-1:1)*a*Math.pow(2,s-n)},write:function(e,t,i,n,r,s){var a,o,c,l=8*s-r-1,h=(1<>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,g=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+u>=1?p/c:p*Math.pow(2,1-u))*c>=2&&(a++,c/=2),a+u>=h?(o=0,a=h):a+u>=1?(o=(t*c-1)*Math.pow(2,r),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,r),a=0));r>=8;e[i+d]=255&o,d+=g,o/=256,r-=8);for(a=a<0;e[i+d]=255&a,d+=g,a/=256,l-=8);e[i+d-g]|=128*m}};function Kw(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Kw.Varint=0,Kw.Fixed64=1,Kw.Bytes=2,Kw.Fixed32=5;var eT=4294967296,tT=1/eT,iT="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function nT(e){return e.type===Kw.Bytes?e.readVarint()+e.pos:e.pos+1}function rT(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function sT(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function aT(e,t){for(var i=0;i>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function _T(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function MT(e){const t=Zw(e,{to:"string"});return JSON.parse(t)}function vT(e,t){return yT(e,"GET","arraybuffer",[],null,t)}function yT(e,t,i,n,r,s){const a=new XMLHttpRequest,o=new Promise(((s,o)=>{a.open(t,e,!0);for(const e of n)a.setRequestHeader(e.name,e.value);a.responseType=i,a.timeout=15e3,a.onload=()=>{var t;if(200!==a.status){const i=null!==(t=a.response)&&void 0!==t?t:new Ed(`Response status error: ${e}`);o(i)}a.response||o(new Ed(`Response empty: ${e}`)),s(a.response)},a.onerror=()=>{o(new Ed(`Request error: ${e}`))},a.ontimeout=()=>{o(new Ed(`Request timeout: ${e}`))},a.onabort=()=>{o(new Ed(`Request aborted: ${e}`))},a.send("POST"===t?r:null)}));return s&&s.catch((()=>{a.abort()})),o}function xT(e){return new Xw(e).readFields(bT,{faces:[],vertices:[]})}function bT(e,t,i){1===e?t.vertices.push(i.readFloat()):2===e?t.faces.push(i.readVarint()):console.warn(`Unsupported pbf tag (${e})`)}Kw.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos>3,s=this.pos;this.type=7&n,e(r,t,this),this.pos===s&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=mT(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=_T(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=mT(this.buf,this.pos)+mT(this.buf,this.pos+4)*eT;return this.pos+=8,e},readSFixed64:function(){var e=mT(this.buf,this.pos)+_T(this.buf,this.pos+4)*eT;return this.pos+=8,e},readFloat:function(){var e=Jw.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Jw.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128?t:(t|=(127&(i=n[this.pos++]))<<7,i<128?t:(t|=(127&(i=n[this.pos++]))<<14,i<128?t:(t|=(127&(i=n[this.pos++]))<<21,i<128?t:function(e,t,i){var n,r,s=i.buf;if(n=(112&(r=s[i.pos++]))>>4,r<128)return rT(e,n,t);if(n|=(127&(r=s[i.pos++]))<<3,r<128)return rT(e,n,t);if(n|=(127&(r=s[i.pos++]))<<10,r<128)return rT(e,n,t);if(n|=(127&(r=s[i.pos++]))<<17,r<128)return rT(e,n,t);if(n|=(127&(r=s[i.pos++]))<<24,r<128)return rT(e,n,t);if(n|=(1&(r=s[i.pos++]))<<31,r<128)return rT(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(i=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&iT?function(e,t,i){return iT.decode(e.subarray(t,i))}(this.buf,t,e):function(e,t,i){for(var n="",r=t;r239?4:c>223?3:c>191?2:1;if(r+h>i)break;1===h?c<128&&(l=c):2===h?128==(192&(s=e[r+1]))&&(l=(31&c)<<6|63&s)<=127&&(l=null):3===h?(s=e[r+1],a=e[r+2],128==(192&s)&&128==(192&a)&&((l=(15&c)<<12|(63&s)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===h&&(s=e[r+1],a=e[r+2],o=e[r+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&((l=(15&c)<<18|(63&s)<<12|(63&a)<<6|63&o)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,h=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),r+=h}return n}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Kw.Bytes)return e.push(this.readVarint(t));var i=nT(this);for(e=e||[];this.pos127;);else if(t===Kw.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Kw.Fixed32)this.pos+=4;else{if(t!==Kw.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}(i,0,t),function(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,i){for(var n,r,s=0;s55295&&n<57344){if(!r){n>56319||s+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}(this.buf,e,this.pos);var i=this.pos-t;i>=128&&sT(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),Jw.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Jw.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i=128&&sT(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,Kw.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,aT,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,oT,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,hT,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,cT,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,lT,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,uT,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,pT,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,dT,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,gT,t)},writeBytesField:function(e,t){this.writeTag(e,Kw.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Kw.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Kw.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Kw.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Kw.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Kw.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Kw.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Kw.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Kw.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Kw.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};class wT extends s_{constructor(e){super(),this._geometry=e}get geometry(){return this._geometry}fire(e,t){super.fire(e,t)}getCoreImages(e){return Promise.reject(new Ed("Not implemented"))}getCluster(e,t){return Promise.reject(new Ed("Not implemented"))}getSpatialImages(e){return Promise.reject(new Ed("Not implemented"))}getImages(e){return Promise.reject(new Ed("Not implemented"))}getImageBuffer(e,t){return Promise.reject(new Ed("Not implemented"))}getImageTiles(e){return Promise.reject(new Ed("Not implemented"))}getMesh(e,t){return Promise.reject(new Ed("Not implemented"))}getSequence(e){return Promise.reject(new Ed("Not implemented"))}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}setAccessToken(e){throw new Ed("Not implemented")}}class TT{constructor(){}bboxToCellIds(e,t){throw new Ed("Not implemented")}getAdjacent(e){throw new Ed("Not implemented")}getVertices(e){throw new Ed("Not implemented")}lngLatToCellId(e){throw new Ed("Not implemented")}_approxBboxToCellIds(e,t){if(t.lat<=e.lat||t.lng<=e.lng)throw new Ed("North east needs to be top right of south west");const i=(e.lat+t.lat)/2,n=(e.lng+t.lng)/2,r=_d(t.lng,t.lat,0,n,i,0),s=Math.max(r[0],r[1]);return this._lngLatToCellIds({lat:i,lng:n},s)}_enuToGeodetic(e,t){const[i,n]=Md(e[0],e[1],e[2],t.lng,t.lat,0);return{lat:n,lng:i}}_getLngLatBoundingBoxCorners(e,t){return[[-t,t,0],[t,t,0],[t,-t,0],[-t,-t,0]].map((t=>this._enuToGeodetic(t,e)))}_lngLatToCellIds(e,t){const i=this.lngLatToCellId(e),n=this._getLngLatBoundingBoxCorners(e,t);for(const e of n)if(this.lngLatToCellId(e)!==i)return[i,...this.getAdjacent(i)];return[i]}}var ST,NT={exports:{}},DT={exports:{}};ST=DT,function(e,t){ST&&ST.exports?ST.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()}(lg,(function(){function e(e,t,i){this.low=0|e,this.high=0|t,this.unsigned=!!i}function t(e){return!0===(e&&e.__isLong__)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var i={},n={};function r(e,t){var r,s,o;return t?(o=0<=(e>>>=0)&&e<256)&&(s=n[e])?s:(r=a(e,(0|e)<0?-1:0,!0),o&&(n[e]=r),r):(o=-128<=(e|=0)&&e<128)&&(s=i[e])?s:(r=a(e,e<0?-1:0,!1),o&&(i[e]=r),r)}function s(e,t){if(isNaN(e)||!isFinite(e))return t?m:g;if(t){if(e<0)return m;if(e>=u)return y}else{if(e<=-p)return x;if(e+1>=p)return v}return e<0?s(-e,t).neg():a(e%h|0,e/h|0,t)}function a(t,i,n){return new e(t,i,n)}e.fromInt=r,e.fromNumber=s,e.fromBits=a;var o=Math.pow;function c(e,t,i){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return g;if("number"==typeof t?(i=t,t=!1):t=!!t,(i=i||10)<2||360)throw Error("interior hyphen");if(0===n)return c(e.substring(1),t,i).neg();for(var r=s(o(i,8)),a=g,l=0;l>>0:this.low},b.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},b.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((a=l).isZero())return h+c;for(;h.length<6;)h="0"+h;c=""+h+c}},b.getHighBits=function(){return this.high},b.getHighBitsUnsigned=function(){return this.high>>>0},b.getLowBits=function(){return this.low},b.getLowBitsUnsigned=function(){return this.low>>>0},b.getNumBitsAbs=function(){if(this.isNegative())return this.eq(x)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<=0},b.isOdd=function(){return!(1&~this.low)},b.isEven=function(){return!(1&this.low)},b.equals=function(e){return t(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},b.eq=b.equals,b.notEquals=function(e){return!this.eq(e)},b.neq=b.notEquals,b.lessThan=function(e){return this.comp(e)<0},b.lt=b.lessThan,b.lessThanOrEqual=function(e){return this.comp(e)<=0},b.lte=b.lessThanOrEqual,b.greaterThan=function(e){return this.comp(e)>0},b.gt=b.greaterThan,b.greaterThanOrEqual=function(e){return this.comp(e)>=0},b.gte=b.greaterThanOrEqual,b.compare=function(e){if(t(e)||(e=l(e)),this.eq(e))return 0;var i=this.isNegative(),n=e.isNegative();return i&&!n?-1:!i&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},b.comp=b.compare,b.negate=function(){return!this.unsigned&&this.eq(x)?x:this.not().add(f)},b.neg=b.negate,b.add=function(e){t(e)||(e=l(e));var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,s=65535&this.low,o=e.high>>>16,c=65535&e.high,h=e.low>>>16,u=0,p=0,d=0,g=0;return d+=(g+=s+(65535&e.low))>>>16,p+=(d+=r+h)>>>16,u+=(p+=n+c)>>>16,u+=i+o,a((d&=65535)<<16|(g&=65535),(u&=65535)<<16|(p&=65535),this.unsigned)},b.subtract=function(e){return t(e)||(e=l(e)),this.add(e.neg())},b.sub=b.subtract,b.multiply=function(e){if(this.isZero())return g;if(t(e)||(e=l(e)),e.isZero())return g;if(this.eq(x))return e.isOdd()?x:g;if(e.eq(x))return this.isOdd()?x:g;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(d)&&e.lt(d))return s(this.toNumber()*e.toNumber(),this.unsigned);var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,o=65535&this.low,c=e.high>>>16,h=65535&e.high,u=e.low>>>16,p=65535&e.low,m=0,f=0,_=0,M=0;return _+=(M+=o*p)>>>16,f+=(_+=r*p)>>>16,_&=65535,f+=(_+=o*u)>>>16,m+=(f+=n*p)>>>16,f&=65535,m+=(f+=r*u)>>>16,f&=65535,m+=(f+=o*h)>>>16,m+=i*p+n*u+r*h+o*c,a((_&=65535)<<16|(M&=65535),(m&=65535)<<16|(f&=65535),this.unsigned)},b.mul=b.multiply,b.divide=function(e){if(t(e)||(e=l(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?m:g;var i,n,r;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return m;if(e.gt(this.shru(1)))return _;r=m}else{if(this.eq(x))return e.eq(f)||e.eq(M)?x:e.eq(x)?f:(i=this.shr(1).div(e).shl(1)).eq(g)?e.isNegative()?f:M:(n=this.sub(e.mul(i)),r=i.add(n.div(e)));if(e.eq(x))return this.unsigned?m:g;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=g}for(n=this;n.gte(e);){i=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(i)/Math.LN2),c=a<=48?1:o(2,a-48),h=s(i),u=h.mul(e);u.isNegative()||u.gt(n);)u=(h=s(i-=c,this.unsigned)).mul(e);h.isZero()&&(h=f),r=r.add(h),n=n.sub(u)}return r},b.div=b.divide,b.modulo=function(e){return t(e)||(e=l(e)),this.sub(this.div(e).mul(e))},b.mod=b.modulo,b.not=function(){return a(~this.low,~this.high,this.unsigned)},b.and=function(e){return t(e)||(e=l(e)),a(this.low&e.low,this.high&e.high,this.unsigned)},b.or=function(e){return t(e)||(e=l(e)),a(this.low|e.low,this.high|e.high,this.unsigned)},b.xor=function(e){return t(e)||(e=l(e)),a(this.low^e.low,this.high^e.high,this.unsigned)},b.shiftLeft=function(e){return t(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?a(this.low<>>32-e,this.unsigned):a(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):a(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},b.shr=b.shiftRight,b.shiftRightUnsigned=function(e){if(t(e)&&(e=e.toInt()),0==(e&=63))return this;var i=this.high;return e<32?a(this.low>>>e|i<<32-e,i>>>e,this.unsigned):a(32===e?i:i>>>e-32,0,this.unsigned)},b.shru=b.shiftRightUnsigned,b.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},b.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},b.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},b.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},b.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t]},e})),function(e){!function(e){var t=e.S2={L:{}};t.L.LatLng=function(e,t,i){var n=parseFloat(e,10),r=parseFloat(t,10);if(isNaN(n)||isNaN(r))throw new Error("Invalid LatLng object: ("+e+", "+t+")");return!0!==i&&(n=Math.max(Math.min(n,90),-90),r=(r+180)%360+(r<-180||180===r?180:-180)),{lat:n,lng:r}},t.L.LatLng.DEG_TO_RAD=Math.PI/180,t.L.LatLng.RAD_TO_DEG=180/Math.PI,t.LatLngToXYZ=function(e){var i=t.L.LatLng.DEG_TO_RAD,n=e.lat*i,r=e.lng*i,s=Math.cos(n);return[Math.cos(r)*s,Math.sin(r)*s,Math.sin(n)]},t.XYZToLatLng=function(e){var i=t.L.LatLng.RAD_TO_DEG,n=Math.atan2(e[2],Math.sqrt(e[0]*e[0]+e[1]*e[1])),r=Math.atan2(e[1],e[0]);return t.L.LatLng(n*i,r*i)},t.XYZToFaceUV=function(e){var t=function(e){var t=[Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2])];return t[0]>t[1]?t[0]>t[2]?0:2:t[1]>t[2]?1:2}(e);e[t]<0&&(t+=3);var i=function(e,t){var i,n;switch(e){case 0:i=t[1]/t[0],n=t[2]/t[0];break;case 1:i=-t[0]/t[1],n=t[2]/t[1];break;case 2:i=-t[0]/t[2],n=-t[1]/t[2];break;case 3:i=t[2]/t[0],n=t[1]/t[0];break;case 4:i=t[2]/t[1],n=-t[0]/t[1];break;case 5:i=-t[1]/t[2],n=-t[0]/t[2];break;default:throw{error:"Invalid face"}}return[i,n]}(t,e);return[t,i]},t.FaceUVToXYZ=function(e,t){var i=t[0],n=t[1];switch(e){case 0:return[1,i,n];case 1:return[-i,1,n];case 2:return[-i,-n,1];case 3:return[-1,-n,-i];case 4:return[n,-1,-i];case 5:return[n,i,-1];default:throw{error:"Invalid face"}}};var i=function(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))};t.STToUV=function(e){return[i(e[0]),i(e[1])]};var n=function(e){return e>=0?.5*Math.sqrt(1+3*e):1-.5*Math.sqrt(1-3*e)};t.UVToST=function(e){return[n(e[0]),n(e[1])]},t.STToIJ=function(e,t){var i=1<=0;o--){var c=1<=0;i--)n=p-i,a=0,o=0,"1"===(s=u[i])?o=1:"2"===s?(a=1,o=1):"3"===s&&(a=1),c=Math.pow(2,n-1),r(c,d,a,o),d.x+=c*a,d.y+=c*o;if(h%2==1){var g=d.x;d.x=d.y,d.y=g}return t.S2Cell.FromFaceIJ(parseInt(h),[d.x,d.y],n)},t.S2Cell.FromLatLng=function(e,i){if(!e.lat&&0!==e.lat||!e.lng&&0!==e.lng)throw new Error("Pass { lat: lat, lng: lng } to S2.S2Cell.FromLatLng");var n=t.LatLngToXYZ(e),r=t.XYZToFaceUV(n),s=t.UVToST(r[1]),a=t.STToIJ(s,i);return t.S2Cell.FromFaceIJ(r[0],a,i)},t.S2Cell.FromFaceIJ=function(e,i,n){var r=new t.S2Cell;return r.face=e,r.ij=i,r.level=n,r},t.S2Cell.prototype.toString=function(){return"F"+this.face+"ij["+this.ij[0]+","+this.ij[1]+"]@"+this.level},t.S2Cell.prototype.getLatLng=function(){var e=t.IJToST(this.ij,this.level,[.5,.5]),i=t.STToUV(e),n=t.FaceUVToXYZ(this.face,i);return t.XYZToLatLng(n)},t.S2Cell.prototype.getCornerLatLngs=function(){for(var e=[],i=[[0,0],[0,1],[1,1],[1,0]],n=0;n<4;n++){var r=t.IJToST(this.ij,this.level,i[n]),s=t.STToUV(r),a=t.FaceUVToXYZ(this.face,s);e.push(t.XYZToLatLng(a))}return e},t.S2Cell.prototype.getFaceAndQuads=function(){var e=s(this.ij[0],this.ij[1],this.level,this.face);return[this.face,e]},t.S2Cell.prototype.toHilbertQuadkey=function(){var e=s(this.ij[0],this.ij[1],this.level,this.face);return this.face.toString(10)+"/"+e.join("")},t.latLngToNeighborKeys=t.S2Cell.latLngToNeighborKeys=function(e,i,n){return t.S2Cell.FromLatLng({lat:e,lng:i},n).getNeighbors().map((function(e){return e.toHilbertQuadkey()}))},t.S2Cell.prototype.getNeighbors=function(){var e=function(e,i,n){var r=1<=0&&i[1]>=0&&i[0]r&&(n=n.substr(0,r)),s=c.fromString(i.toString(10),!0,10).toString(2);s.length30)throw new Error("'level' is not a number between 1 and 30 (but it should be)");return t.S2Cell.FromLatLng({lat:e,lng:i},n).toHilbertQuadkey()},t.stepKey=function(t,i){var n,r=e.dcodeIO&&e.dcodeIO.Long||DT.exports,s=t.split("/"),a=s[0],o=s[1],c=s[1].length,l=r.fromString(o,!0,4);i>0?n=l.add(Math.abs(i)):i<0&&(n=l.subtract(Math.abs(i)));var h=n.toString(4);for("0"===h&&console.warning(new Error("face/position wrapping is not yet supported"));h.length!o.includes(e))))),l=[n,r,s,a];for(const e of c){let t=0;for(const n of this._getNeighbors(e,i))o.includes(n)&&t++;2===t&&l.push(e)}return l.map((e=>NT.exports.S2.keyToId(e)))}getVertices(e){const t=NT.exports.S2.idToKey(e);return NT.exports.S2.S2Cell.FromHilbertQuadKey(t).getCornerLatLngs().map((e=>({lat:e.lat,lng:e.lng})))}lngLatToCellId(e){return this._lngLatToId(e,this._level)}_getNeighbors(e,t){const i=NT.exports.S2.keyToLatLng(e);return NT.exports.S2.latLngToNeighborKeys(i.lat,i.lng,t)}_lngLatToId(e,t){const i=NT.exports.S2.latLngToKey(e.lat,e.lng,t);return NT.exports.S2.keyToId(i)}}class CT{clusterReconstruction(e){const t=e.points,i=1/255;for(const e in t){if(!t.hasOwnProperty(e))continue;const n=t[e].color;n[0]*=i,n[1]*=i,n[2]*=i}const n=e.reference_lla;return{id:null,points:t,reference:{alt:n.altitude,lat:n.latitude,lng:n.longitude}}}coreImage(e){const t=this._geometry(e.geometry),i=this._geometry(e.computed_geometry),n={id:e.sequence};return{computed_geometry:i,geometry:t,id:e.id,sequence:n}}spatialImage(e){var t,i,n,r,s;e.camera_type=function(e){switch(e){case"equirectangular":case"spherical":return"spherical";case"fisheye":return"fisheye";default:return"perspective"}}(e.camera_type),e.merge_id=e.merge_cc?e.merge_cc.toString():null,e.private=null;const a="spherical"===e.camera_type?e.thumb_2048_url:e.thumb_1024_url;return e.thumb=null!==(t=e.thumb)&&void 0!==t?t:{id:null,url:a},e.cluster=null!==(i=e.sfm_cluster)&&void 0!==i?i:{id:null,url:null},e.creator=null!==(n=e.creator)&&void 0!==n?n:{id:null,username:null},e.owner=null!==(r=e.organization)&&void 0!==r?r:{id:null},e.mesh=null!==(s=e.mesh)&&void 0!==s?s:{id:null,url:null},e}_geometry(e){const t=null==e?void 0:e.coordinates;return t?{lat:t[1],lng:t[0]}:null}}class AT{constructor(){this.imagesPath="images",this.sequencePath="image_ids",this._imageTilesPath="tiles",this.coreFields=["computed_geometry","geometry","sequence"],this.idFields=["id"],this.spatialFields=["altitude","atomic_scale","camera_parameters","camera_type","captured_at","compass_angle","computed_altitude","computed_compass_angle","computed_rotation","creator","exif_orientation","height","merge_cc","mesh","organization","quality_score","sfm_cluster","thumb_1024_url","thumb_2048_url","width"],this.imageTileFields=["url","z","x","y"]}images(e,t){return`image_ids=${e.join(",")}&fields=${t.join(",")}`}imagesS2(e,t){return`s2=${e}&fields=${t.join(",")}`}imageTiles(e,t){return`z=${e}&fields=${t.join(",")}`}imageTilesPath(e){return`${e}/${this._imageTilesPath}`}sequence(e){return`sequence_id=${e}`}}class ET extends wT{constructor(e,t,i,n){var r;super(null!=t?t:new IT),this._convert=null!=i?i:new CT,this._query=null!=n?n:new AT,this._method="GET";const s=null!=e?e:{};this._endpoint=null!==(r=s.endpoint)&&void 0!==r?r:"https://graph.mapillary.com",this._accessToken=s.accessToken}getCluster(e,t){return vT(e,t).then((e=>{const t=MT(e);if(t.length<1)throw new Error("Cluster reconstruction empty");return this._convert.clusterReconstruction(t[0])}))}getCoreImages(e){const t=[...this._query.idFields,...this._query.coreFields],i=this._query.imagesS2(e,t),n=new URL(this._query.imagesPath,this._endpoint).href;return this._fetchGraphContract(i,n).then((t=>{const i={cell_id:e,images:[]},n=t.data;for(const e of n){const t=this._convert.coreImage(e);i.images.push(t)}return i}))}getImageBuffer(e,t){return vT(e,t)}getImages(e){const t=[...this._query.idFields,...this._query.coreFields,...this._query.spatialFields],i=this._query.images(e,t),n=new URL(this._query.imagesPath,this._endpoint).href;return this._fetchGraphContract(i,n).then((e=>{const t=[],i=e.data;for(const e of i){const i=this._convert.coreImage(e),n=this._convert.spatialImage(e),r={node:Object.assign({},n,i),node_id:e.id};t.push(r)}return t}))}getImageTiles(e){const t=[...this._query.imageTileFields],i=this._query.imageTiles(e.z,t),n=new URL(this._query.imageTilesPath(e.imageId),this._endpoint).href;return this._fetchGraphContract(i,n).then((t=>({node:t.data,node_id:e.imageId})))}getMesh(e,t){return vT(e,t).then((e=>xT(e)))}getSequence(e){const t=this._query.sequence(e),i=new URL(this._query.sequencePath,this._endpoint).href;return this._fetchGraphContract(t,i).then((t=>({id:e,image_ids:t.data.map((e=>e.id))})))}getSpatialImages(e){const t=[...this._query.idFields,...this._query.coreFields,...this._query.spatialFields],i=this._query.images(e,t),n=new URL(this._query.imagesPath,this._endpoint).href;return this._fetchGraphContract(i,n).then((e=>{const t=[],i=e.data;for(const e of i){const i={node:this._convert.spatialImage(e),node_id:e.id};t.push(i)}return t}))}setAccessToken(e){this._accessToken=e}_createHeaders(){const e=[{name:"Accept",value:"application/json"},{name:"Content-Type",value:"application/x-www-form-urlencoded"}];return this._accessToken&&e.push({name:"Authorization",value:`OAuth ${this._accessToken}`}),e}_fetchGraphContract(e,t){return yT(`${t}?${e}`,this._method,"json",this._createHeaders(),null,null).catch((e=>{const t=this._makeErrorMessage(e);throw new Ed(t)}))}_makeErrorMessage(e){const t=e.error;return t?`${t.code} (${t.type}, ${t.fbtrace_id}): ${t.message}`:"Failed to fetch data"}}class LT{constructor(e,t){this._id=e,this._lngLat=t}get id(){return this._id}get geometry(){return this._geometry}get lngLat(){return this._lngLat}createGeometry(e){this._geometry||(this._createGeometry(e),this._geometry.updateMatrixWorld(!0))}disposeGeometry(){this._geometry&&(this._disposeGeometry(),this._geometry=void 0)}getInteractiveObjects(){return this._geometry?this._getInteractiveObjects():[]}lerpAltitude(e,t){this._geometry&&(this._geometry.position.z=(1-t)*this._geometry.position.z+t*e)}updatePosition(e,t){t&&(this._lngLat.lat=t.lat,this._lngLat.lng=t.lng),this._geometry&&(this._geometry.position.fromArray(e),this._geometry.updateMatrixWorld(!0))}}class zT extends LT{constructor(e,t,i){super(e,t),i=i||{},this._color=null!=i.color?i.color:16777215,this._opacity=null!=i.opacity?i.opacity:.4,this._radius=null!=i.radius?i.radius:1}_createGeometry(e){const t=new io(new ru(this._radius,16),new Ta({color:this._color,opacity:this._opacity,transparent:!0}));t.up.fromArray([0,0,1]),t.renderOrder=-1;const i=new na;i.add(t),i.position.fromArray(e),this._geometry=i}_disposeGeometry(){for(let e of this._geometry.children)e.geometry.dispose(),e.material.dispose()}_getInteractiveObjects(){return[]}}class jT extends LT{constructor(e,t,i){super(e,t),i=i||{},this._ballColor=null!=i.ballColor?i.ballColor:16711680,this._ballOpacity=null!=i.ballOpacity?i.ballOpacity:.8,this._circleToRayAngle=2,this._color=null!=i.color?i.color:16711680,this._interactive=!!i.interactive,this._opacity=null!=i.opacity?i.opacity:.4,this._radius=null!=i.radius?i.radius:1}_createGeometry(e){const t=this._radius,i=this._markerHeight(t),n=new Ta({color:this._color,opacity:this._opacity,transparent:!0,depthWrite:!1}),r=new io(this._createMarkerGeometry(t,8,8),n),s=new io(new np(t/2,8,8),new Ta({color:this._ballColor,opacity:this._ballOpacity,transparent:!0}));s.position.z=i,s.renderOrder=1;const a=new na;a.add(s),a.add(r),a.position.fromArray(e),this._geometry=a}_disposeGeometry(){for(const e of this._geometry.children)e.geometry.dispose(),e.material.dispose()}_getInteractiveObjects(){return this._interactive?[this._geometry.children[0]]:[]}_markerHeight(e){const t=Math.tan(Math.PI-this._circleToRayAngle);return e*Math.sqrt(1+t*t)}_createMarkerGeometry(e,t,i){const n=this._markerHeight(e),r=this._circleToRayAngle,s=[],a=new Float32Array(3*(t+1)*(i+1));let o=0;for(let c=0;c<=i;++c){const l=[];for(let s=0;s<=t;++s){const h=s/t*Math.PI*2,u=c/i*Math.PI;let p=e;if(u>r){const t=Math.tan(u-r);p=e*Math.sqrt(1+t*t)}const d=3*o,g=Math.sin(u);a[d+0]=p*Math.cos(h)*g,a[d+1]=p*Math.sin(h)*g,a[d+2]=p*Math.cos(u)+n,l.push(o++)}s.push(l)}const c=new Uint16Array(6*t*i);let l=0;for(let e=0;e0&&u[0]0&&u[1]l[0]&&(l[0]=v,l[1]=u,l[2]=h)}if(l[0]>0)return[l[1],l[2]]}const a=this._pointFromRectPosition(e,t);return[this._viewportCoords.basicToCanvasSafe(a[0],a[1],{offsetHeight:r.height,offsetWidth:r.width},s,n.perspective),null!=t?t:"top"]}_alignmentToPopupAligment(e){switch(e){case Ly.Bottom:return"bottom";case Ly.BottomLeft:return"bottom-left";case Ly.BottomRight:return"bottom-right";case Ly.Center:return"center";case Ly.Left:return"left";case Ly.Right:return"right";case Ly.Top:return"top";case Ly.TopLeft:return"top-left";case Ly.TopRight:return"top-right";default:return null}}_normalizeOffset(e){if(null==e)return this._normalizeOffset(0);if("number"==typeof e){const t=e,i=(t>=0?1:-1)*Math.round(Math.sqrt(.5*Math.pow(t,2)));return{bottom:[0,t],"bottom-left":[-i,i],"bottom-right":[i,i],center:[0,0],left:[-t,0],right:[t,0],top:[0,-t],"top-left":[-i,-i],"top-right":[i,-i]}}return{bottom:e.bottom||[0,0],"bottom-left":e.bottomLeft||[0,0],"bottom-right":e.bottomRight||[0,0],center:e.center||[0,0],left:e.left||[0,0],right:e.right||[0,0],top:e.top||[0,0],"top-left":e.topLeft||[0,0],"top-right":e.topRight||[0,0]}}_pixelToFloats(e,t,i,n){const r=[];return e[1]t.height-n&&r.push("top"),e[0]t.width-i/2&&r.push("left"),r}_pointFromRectPosition(e,t){const i=e[0],n=e[0]null!=e))).subscribe((e=>{this._key=e,this._componentService.deactivateCover(),this._coverComponent.configure({id:this._key,state:t_.Hidden}),this._subscribeCoverComponent(),this._navigator.stateService.start(),this._navigator.cacheService.start(),this._navigator.panService.start(),this._observer.startEmit()}))}get navigable(){return this._navigable}get(e){return this._componentService.get(e)}activate(e){this._componentService.activate(e)}activateCover(){this._coverComponent.configure({state:t_.Visible})}deactivate(e){this._componentService.deactivate(e)}deactivateCover(){this._coverComponent.configure({state:t_.Loading})}remove(){this._componentService.remove(),null!=this._configurationSubscription&&this._configurationSubscription.unsubscribe()}_initializeComponents(){var e,t;const i=this._options;this._uFalse(null===(e=i.fallback)||void 0===e?void 0:e.image,"imagefallback"),this._uFalse(null===(t=i.fallback)||void 0===t?void 0:t.navigation,"navigationfallback"),this._uFalse(i.marker,"marker"),this._uFalse(i.popup,"popup"),this._uFalse(i.slider,"slider"),this._uFalse(i.spatial,"spatial"),this._uFalse(i.tag,"tag"),this._uTrue(i.attribution,"attribution"),this._uTrue(i.bearing,"bearing"),this._uTrue(i.cache,"cache"),this._uTrue(i.direction,"direction"),this._uTrue(i.image,"image"),this._uTrue(i.keyboard,"keyboard"),this._uTrue(i.pointer,"pointer"),this._uTrue(i.sequence,"sequence"),this._uTrue(i.zoom,"zoom")}_initilizeCoverComponent(){let e=this._options;this._coverComponent.configure({id:this._key}),void 0===e.cover||e.cover?this.activateCover():this.deactivateCover()}_setNavigable(e){this._navigable!==e&&(this._navigable=e,this._observer.navigable$.next(e))}_subscribeCoverComponent(){this._configurationSubscription=this._coverComponent.configuration$.pipe(dt(void 0,(e=>e.state))).subscribe((e=>{e.state===t_.Loading?this._navigator.stateService.currentId$.pipe(vt(),zt((t=>{const i=null==t||t!==e.id;return i&&this._setNavigable(!1),i?this._navigator.moveTo$(e.id):this._navigator.stateService.currentImage$.pipe(vt())}))).subscribe((()=>{this._navigator.stateService.start(),this._navigator.cacheService.start(),this._navigator.panService.start(),this._observer.startEmit(),this._coverComponent.configure({state:t_.Hidden}),this._componentService.deactivateCover(),this._setNavigable(!0)}),(e=>{console.error("Failed to deactivate cover.",e),this._coverComponent.configure({state:t_.Visible})})):e.state===t_.Visible&&(this._observer.stopEmit(),this._navigator.stateService.stop(),this._navigator.cacheService.stop(),this._navigator.playService.stop(),this._navigator.panService.stop(),this._componentService.activateCover(),this._setNavigable(null==e.id))}))}_uFalse(e,t){void 0!==e?"boolean"!=typeof e?(this._componentService.configure(t,e),this._componentService.activate(t)):e?this._componentService.activate(t):this._componentService.deactivate(t):this._componentService.deactivate(t)}_uTrue(e,t){void 0!==e?"boolean"!=typeof e?(this._componentService.configure(t,e),this._componentService.activate(t)):e?this._componentService.activate(t):this._componentService.deactivate(t):this._componentService.activate(t)}}class HT{constructor(e,t,i){this._adaptiveOperation$=new V,this._render$=new V,this._renderAdaptive$=new V,this._subscriptions=new a_,this._renderService=t,this._currentFrame$=i;const n=this._subscriptions,r=r_.create(r_.h("div.mapillary-dom-renderer",[]));e.appendChild(r),this._offset$=this._adaptiveOperation$.pipe(Dt(((e,t)=>t(e)),{elementHeight:e.offsetHeight,elementWidth:e.offsetWidth,imageAspect:0,renderMode:$T.Fill}),et((e=>e.imageAspect>0&&e.elementWidth>0&&e.elementHeight>0)),ze((e=>{const t=e.elementWidth/e.elementHeight,i=e.imageAspect/t;let n=0,r=0;return e.renderMode===$T.Letterbox?e.imageAspect>t?n=e.elementHeight*(1-1/i)/2:r=e.elementWidth*(1-i)/2:e.imageAspect>t?r=-e.elementWidth*(i-1)/2:n=-e.elementHeight*(1/i-1)/2,{bottom:n,left:r,right:r,top:n}})));const s=this._currentFrame$.pipe(et((e=>null!=e.state.currentImage)),dt(((e,t)=>e===t),(e=>e.state.currentImage.id)),ze((e=>e.state.currentTransform.basicAspect)),ze((e=>t=>(t.imageAspect=e,t)))).subscribe(this._adaptiveOperation$),a=$e(this._renderAdaptive$.pipe(Dt(((e,t)=>(null==t.vNode?delete e[t.name]:e[t.name]=t.vNode,e)),{})),this._offset$).pipe(ze((e=>{const t=[],i=e[0];for(const e in i)i.hasOwnProperty(e)&&t.push(i[e]);const n=e[1],r={style:{bottom:n.bottom+"px",left:n.left+"px","pointer-events":"none",position:"absolute",right:n.right+"px",top:n.top+"px"}};return{name:"mapillary-dom-adaptive-renderer",vNode:r_.h("div.mapillary-dom-adaptive-renderer",r,t)}}))).subscribe(this._render$);this._vNode$=this._render$.pipe(Dt(((e,t)=>(null==t.vNode?delete e[t.name]:e[t.name]=t.vNode,e)),{}),ze((e=>{const t=[];for(const i in e)e.hasOwnProperty(i)&&t.push(e[i]);return r_.h("div.mapillary-dom-renderer",t)}))),this._vPatch$=this._vNode$.pipe(Dt(((e,t)=>(e.vpatch=r_.diff(e.vNode,t),e.vNode=t,e)),{vNode:r_.h("div.mapillary-dom-renderer",[]),vpatch:null}),function(){for(var e=[],t=0;tr_.patch(e,t)),r),St(1),F()),n.push(s),n.push(a),n.push(this._element$.subscribe((()=>{}))),n.push(this._renderService.size$.pipe(ze((e=>t=>(t.elementWidth=e.width,t.elementHeight=e.height,t)))).subscribe(this._adaptiveOperation$)),n.push(this._renderService.renderMode$.pipe(ze((e=>t=>(t.renderMode=e,t)))).subscribe(this._adaptiveOperation$))}get element$(){return this._element$}get render$(){return this._render$}get renderAdaptive$(){return this._renderAdaptive$}clear(e){this._renderAdaptive$.next({name:e,vNode:null}),this._render$.next({name:e,vNode:null})}remove(){this._subscriptions.unsubscribe()}}class VT{constructor(e,t,i){this._renderFrame$=new V,this._renderCameraOperation$=new V,this._render$=new V,this._clear$=new V,this._renderOperation$=new V,this._rendererOperation$=new V,this._eraserOperation$=new V,this._triggerOperation$=new V,this._subscriptions=new a_,this._opaqueRender$=new V,this._renderService=i;const n=this._subscriptions;this._renderer$=this._rendererOperation$.pipe(Dt(((e,t)=>t(e)),{needsRender:!1,renderer:null}),et((e=>!!e.renderer))),this._renderCollection$=this._renderOperation$.pipe(Dt(((e,t)=>t(e)),{}),It()),this._renderCamera$=this._renderCameraOperation$.pipe(Dt(((e,t)=>t(e)),{frameId:-1,needsRender:!1,perspective:null})),this._eraser$=this._eraserOperation$.pipe(Lt((e=>e)),Dt(((e,t)=>t(e)),{needsRender:!1}));const r=this._triggerOperation$.pipe(Lt((e=>e)),Dt(((e,t)=>t(e)),{needsRender:!1})),s=new wa(986895),a=$e(this._renderer$,this._renderCollection$,this._renderCamera$,this._eraser$,r).pipe(ze((([e,t,i,n,r])=>({camera:i,eraser:n,trigger:r,renderer:e,renders:Object.keys(t).map((e=>t[e]))}))),et((e=>{let t=e.renderer.needsRender||e.camera.needsRender||e.eraser.needsRender||e.trigger.needsRender;const i=e.camera.frameId;for(const n of e.renders){if(n.frameId!==i)return!1;t=t||n.needsRender}return t})),dt(((e,t)=>e===t),(e=>e.eraser.needsRender||e.trigger.needsRender?-e.camera.frameId:e.camera.frameId))).subscribe((e=>{e.renderer.needsRender=!1,e.camera.needsRender=!1,e.eraser.needsRender=!1,e.trigger.needsRender=!1;const t=e.camera.perspective,i=[],n=[];for(const t of e.renders)t.pass===n_.Background?i.push(t.render):t.pass===n_.Opaque&&n.push(t.render);const r=e.renderer.renderer;r.resetState(),r.setClearColor(s,1),r.clear();for(const e of i)e(t,r);r.clearDepth();for(const e of n)e(t,r);r.resetState(),this._opaqueRender$.next()}));n.push(a),n.push(this._renderFrame$.pipe(ze((e=>t=>(t.frameId=e.frameId,t.perspective=e.perspective,!0===e.changed&&(t.needsRender=!0),t)))).subscribe(this._renderCameraOperation$)),this._renderFrameSubscribe();const o=this._render$.pipe(ze((e=>t=>(t[e.name]=e.renderer,t)))),c=this._clear$.pipe(ze((e=>t=>(delete t[e],t))));n.push(Je(o,c).subscribe(this._renderOperation$)),this._webGLRenderer$=this._render$.pipe(vt(),ze((()=>{t.appendChild(e);const n=i.element,r=new lh({canvas:e});return r.setPixelRatio(window.devicePixelRatio),r.setSize(n.offsetWidth,n.offsetHeight),r.autoClear=!1,r})),St(1),F()),n.push(this._webGLRenderer$.subscribe((()=>{})));const l=this._webGLRenderer$.pipe(vt(),ze((e=>t=>(t.needsRender=!0,t.renderer=e,t)))),h=this._renderService.size$.pipe(ze((e=>t=>(null==t.renderer||(t.renderer.setSize(e.width,e.height),t.needsRender=!0),t)))),u=this._clear$.pipe(ze((()=>e=>(null==e.renderer||(e.needsRender=!0),e))));n.push(Je(l,h,u).subscribe(this._rendererOperation$));const p=this._renderCollection$.pipe(et((e=>0===Object.keys(e).length)),It());n.push(p.subscribe((()=>{null!=this._renderFrameSubscription&&(this._renderFrameSubscription.unsubscribe(),this._renderFrameSubscription=null,this._renderFrameSubscribe())}))),n.push(p.pipe(ze((()=>e=>(e.needsRender=!0,e)))).subscribe(this._eraserOperation$))}get render$(){return this._render$}get opaqueRender$(){return this._opaqueRender$}get webGLRenderer$(){return this._webGLRenderer$}clear(e){this._clear$.next(e)}remove(){this._rendererOperation$.next((e=>{if(null!=e.renderer){const t=e.renderer.getContext().getExtension("WEBGL_lose_context");t&&t.loseContext(),e.renderer=null}return e})),null!=this._renderFrameSubscription&&this._renderFrameSubscription.unsubscribe(),this._subscriptions.unsubscribe()}triggerRerender(){this._renderService.renderCameraFrame$.pipe(At(1),vt()).subscribe((()=>{this._triggerOperation$.next((e=>(e.needsRender=!0,e)))}))}_renderFrameSubscribe(){this._render$.pipe(vt(),ze((()=>e=>(e.needsRender=!0,e)))).subscribe((e=>{this._renderCameraOperation$.next(e)})),this._renderFrameSubscription=this._render$.pipe(vt(),Ge((()=>this._renderService.renderCameraFrame$))).subscribe(this._renderFrame$)}}class YT{constructor(e){null!=e?(this._position=(new ts).fromArray(e.unprojectSfM([0,0],0)),this._lookat=(new ts).fromArray(e.unprojectSfM([0,0],10)),this._up=e.upVector(),this._focal=this._getFocal(e)):(this._position=new ts(0,0,0),this._lookat=new ts(1,0,0),this._up=new ts(0,0,1),this._focal=1)}get position(){return this._position}get lookat(){return this._lookat}get up(){return this._up}get focal(){return this._focal}set focal(e){this._focal=e}lerpCameras(e,t,i){this._position.subVectors(t.position,e.position).multiplyScalar(i).add(e.position),this._lookat.subVectors(t.lookat,e.lookat).multiplyScalar(i).add(e.lookat),this._up.subVectors(t.up,e.up).multiplyScalar(i).add(e.up),this._focal=(1-i)*e.focal+i*t.focal}copy(e){this._position.copy(e.position),this._lookat.copy(e.lookat),this._up.copy(e.up),this._focal=e.focal}clone(){let e=new YT;return e.position.copy(this._position),e.lookat.copy(this._lookat),e.up.copy(this._up),e.focal=this._focal,e}diff(e){let t=this._position.distanceToSquared(e.position),i=this._lookat.distanceToSquared(e.lookat),n=this._up.distanceToSquared(e.up),r=100*Math.abs(this._focal-e.focal);return Math.max(t,i,n,r)}_getFocal(e){return Od(e.cameraType)?.5/Math.tan(Math.PI/2):e.focal}}class qT{constructor(e,t,i){this._spatial=new zd,this._viewportCoords=new h_,this._size={width:e,height:t},this._initialFov=60,this._alpha=-1,this._stateTransitionAlpha=-1,this._stateTransitionFov=-1,this._renderMode=i,this._zoom=0,this._frameId=-1,this._changed=!1,this._changedForFrame=-1,this._currentImageId=null,this._previousImageId=null,this._currentSpherical=!1,this._previousSpherical=!1,this._state=null,this._currentProjectedPoints=[],this._previousProjectedPoints=[],this._currentFov=this._initialFov,this._previousFov=this._initialFov,this._camera=new YT,this._perspective=new ho(this._initialFov,this._computeAspect(e,t),.1,1e4),this._perspective.position.copy(this._camera.position),this._perspective.up.copy(this._camera.up),this._perspective.lookAt(this._camera.lookat),this._perspective.updateMatrixWorld(!0),this._perspective.matrixAutoUpdate=!1,this._rotation={phi:0,theta:0}}get alpha(){return this._alpha}get camera(){return this._camera}get changed(){return this._frameId===this._changedForFrame}get frameId(){return this._frameId}get perspective(){return this._perspective}get renderMode(){return this._renderMode}get rotation(){return this._rotation}get zoom(){return this._zoom}get size(){return this._size}getTilt(){return 90-this._spatial.radToDeg(this._rotation.theta)}fovToZoom(e){e=Math.min(90,Math.max(0,e));const t=this._computeCurrentFov(0),i=1===this._alpha?t:this._interpolateFov(t,this._computePreviousFov(0),this._alpha),n=Math.tan(i/2*Math.PI/180),r=Math.tan(e/2*Math.PI/180);return Math.log(n/r)/Math.log(2)}setFrame(e){const t=e.state;if(t.state!==this._state){if(this._state=t.state,this._state!==O_.Custom&&(this.setRenderMode(this._renderMode),this.setSize(this._size)),this._state===O_.Earth){const e=this._fovToY(this._perspective.fov,this._zoom);this._stateTransitionFov=this._yToFov(e,0)}this._changed=!0}const i=t.currentImage.id,n=t.previousImage?t.previousImage.id:null;i!==this._currentImageId&&(this._currentImageId=i,this._currentSpherical=Od(t.currentTransform.cameraType),this._currentProjectedPoints=this._computeProjectedPoints(t.currentTransform),this._changed=!0),n!==this._previousImageId&&(this._previousImageId=n,this._previousSpherical=Od(t.previousTransform.cameraType),this._previousProjectedPoints=this._computeProjectedPoints(t.previousTransform),this._changed=!0);const r=t.zoom;r!==this._zoom&&(this._changed=!0),this._changed&&(this._currentFov=this._computeCurrentFov(r),this._previousFov=this._computePreviousFov(r));const s=t.alpha,a=t.stateTransitionAlpha;if(this._changed||s!==this._alpha||a!==this._stateTransitionAlpha){switch(this._alpha=s,this._stateTransitionAlpha=a,this._state){case O_.Earth:{const e=this._stateTransitionFov,i=this._focalToFov(t.camera.focal),n=$r.lerp(e,i,a),s=this._fovToY(n,0);this._perspective.fov=this._yToFov(s,r);break}case O_.Custom:break;default:this._perspective.fov=this._interpolateFov(this._currentFov,this._previousFov,this._alpha),this._changed=!0}this._zoom=r,this._state!==O_.Custom&&this._perspective.updateProjectionMatrix()}const o=t.camera;this._camera.diff(o)>1e-9&&(this._camera.copy(o),this._rotation=this._computeRotation(o),this._perspective.up.copy(o.up),this._perspective.position.copy(o.position),this._perspective.matrixAutoUpdate=!0,this._perspective.lookAt(o.lookat),this._perspective.matrixAutoUpdate=!1,this._perspective.updateMatrix(),this._perspective.updateMatrixWorld(!1),this._changed=!0),this._setFrameId(e.id)}setProjectionMatrix(e){this._perspective.fov=this._focalToFov(e[5]/2),this._perspective.projectionMatrix.fromArray(e),this._perspective.projectionMatrixInverse.copy(this._perspective.projectionMatrix).invert(),this._changed=!0}setRenderMode(e){this._renderMode=e,this._state!==O_.Custom&&(this._perspective.fov=this._computeFov(),this._perspective.updateProjectionMatrix(),this._changed=!0)}setSize(e){this._size=e,this._state!==O_.Custom&&(this._perspective.aspect=this._computeAspect(e.width,e.height),this._perspective.fov=this._computeFov(),this._perspective.updateProjectionMatrix(),this._changed=!0)}_computeAspect(e,t){return 0===e?0:e/t}_computeCurrentFov(e){return 0===this._perspective.aspect?0:this._currentImageId?this._currentSpherical?this._yToFov(1,e):this._computeVerticalFov(this._currentProjectedPoints,this._renderMode,e,this.perspective.aspect):this._initialFov}_computeFov(){return this._currentFov=this._computeCurrentFov(this._zoom),this._previousFov=this._computePreviousFov(this._zoom),this._interpolateFov(this._currentFov,this._previousFov,this._alpha)}_computePreviousFov(e){return 0===this._perspective.aspect?0:this._currentImageId?this._previousImageId?this._previousSpherical?this._yToFov(1,e):this._computeVerticalFov(this._previousProjectedPoints,this._renderMode,e,this.perspective.aspect):this._currentFov:this._initialFov}_computeProjectedPoints(e){return Rd(e,[[.5,0],[1,0]],[[.5,0],[0,.5]],100,this._viewportCoords)}_computeRequiredVerticalFov(e,t,i){const n=Math.max(e[0]/i,e[1]);return this._yToFov(n,t)}_computeRotation(e){let t=e.lookat.clone().sub(e.position),i=e.up.clone();return{phi:this._spatial.azimuthal(t.toArray(),i.toArray()),theta:Math.PI/2-this._spatial.angleToPlane(t.toArray(),[0,0,1])}}_computeVerticalFov(e,t,i,n){const r=e.map((e=>this._computeRequiredVerticalFov(e,i,n)));return t===$T.Fill?.995*Math.min(...r):Math.max(...r)}_yToFov(e,t){return 2*Math.atan(e/Math.pow(2,t))*180/Math.PI}_focalToFov(e){return 2*Math.atan2(1,2*e)*180/Math.PI}_fovToY(e,t){return Math.pow(2,t)*Math.tan(Math.PI*e/360)}_interpolateFov(e,t,i){return i*e+(1-i)*t}_setFrameId(e){this._frameId=e,this._changed&&(this._changed=!1,this._changedForFrame=e)}}class WT{constructor(e,t,i,n){this._subscriptions=new a_,this._element=e,this._currentFrame$=t,this._spatial=new zd,i=null!=i?i:$T.Fill,this._resize$=new V,this._projectionMatrix$=new V,this._renderCameraOperation$=new V,this._size$=new q({height:this._element.offsetHeight,width:this._element.offsetWidth});const r=this._subscriptions;r.push(this._resize$.pipe(ze((()=>({height:this._element.offsetHeight,width:this._element.offsetWidth})))).subscribe(this._size$)),this._renderMode$=new q(i),this._renderCameraHolder$=this._renderCameraOperation$.pipe(Lt((e=>e)),Dt(((e,t)=>t(e)),null!=n?n:new qT(this._element.offsetWidth,this._element.offsetHeight,i)),St(1),F()),this._renderCameraFrame$=this._currentFrame$.pipe(Pt(this._renderCameraHolder$),kt((([e,t])=>{t.setFrame(e)})),ze((e=>e[1])),St(1),F()),this._renderCamera$=this._renderCameraFrame$.pipe(et((e=>e.changed)),St(1),F()),this._bearing$=this._renderCamera$.pipe(ze((e=>{let t=this._spatial.radToDeg(this._spatial.azimuthalToBearing(e.rotation.phi));return this._spatial.wrap(t,0,360)})),St(1),F()),r.push(this._size$.pipe(At(1),ze((e=>t=>(t.setSize(e),t)))).subscribe(this._renderCameraOperation$)),r.push(this._renderMode$.pipe(At(1),ze((e=>t=>(t.setRenderMode(e),t)))).subscribe(this._renderCameraOperation$)),r.push(this._projectionMatrix$.pipe(ze((e=>t=>(t.setProjectionMatrix(e),t)))).subscribe(this._renderCameraOperation$)),r.push(this._bearing$.subscribe((()=>{}))),r.push(this._renderCameraHolder$.subscribe((()=>{}))),r.push(this._size$.subscribe((()=>{}))),r.push(this._renderMode$.subscribe((()=>{}))),r.push(this._renderCamera$.subscribe((()=>{}))),r.push(this._renderCameraFrame$.subscribe((()=>{})))}get bearing$(){return this._bearing$}get element(){return this._element}get projectionMatrix$(){return this._projectionMatrix$}get renderCamera$(){return this._renderCamera$}get renderCameraFrame$(){return this._renderCameraFrame$}get renderMode$(){return this._renderMode$}get resize$(){return this._resize$}get size$(){return this._size$}dispose(){this._subscriptions.unsubscribe()}}class QT{constructor(e){this._keyDown$=Qe(e,"keydown"),this._keyUp$=Qe(e,"keyup")}get keyDown$(){return this._keyDown$}get keyUp$(){return this._keyUp$}}const ZT=0,XT=2,JT={[ZT]:1,[XT]:2};class KT{constructor(e,t,i,n){this._subscriptions=new a_;const r=this._subscriptions;this._activeSubject$=new q(!1),this._active$=this._activeSubject$.pipe(dt(),St(1),F()),this._claimMouse$=new V,this._claimWheel$=new V,this._deferPixelClaims$=new V,this._deferPixels$=this._deferPixelClaims$.pipe(Dt(((e,t)=>(null==t.deferPixels?delete e[t.name]:e[t.name]=t.deferPixels,e)),{}),ze((e=>{let t=-1;for(const i in e){if(!e.hasOwnProperty(i))continue;const n=e[i];n>t&&(t=n)}return t})),Lt(-1),St(1),F()),r.push(this._deferPixels$.subscribe((()=>{}))),this._documentMouseMove$=Qe(n,"pointermove").pipe(et(this._isMousePen)),this._documentMouseUp$=Qe(n,"pointerup").pipe(et(this._isMousePen)),this._mouseDown$=Qe(t,"pointerdown").pipe(et(this._isMousePen)),this._mouseEnter$=Qe(t,"pointerenter").pipe(et(this._isMousePen)),this._mouseLeave$=Qe(t,"pointerleave").pipe(et(this._isMousePen)),this._mouseMove$=Qe(t,"pointermove").pipe(et(this._isMousePen)),this._mouseUp$=Qe(t,"pointerup").pipe(et(this._isMousePen)),this._mouseOut$=Qe(t,"pointerout").pipe(et(this._isMousePen)),this._mouseOver$=Qe(t,"pointerover").pipe(et(this._isMousePen)),this._domMouseDown$=Qe(i,"pointerdown").pipe(et(this._isMousePen)),this._domMouseMove$=Qe(i,"pointermove").pipe(et(this._isMousePen)),this._click$=Qe(t,"click"),this._contextMenu$=Qe(t,"contextmenu"),this._windowBlur$=Qe(window,"blur"),this._dblClick$=Je(Qe(e,"click"),Qe(t,"dblclick")).pipe(nt(3,1),et((e=>{const i=e[0],n=e[1],r=e[2];return"click"===i.type&&"click"===n.type&&"dblclick"===r.type&&i.target.parentNode===t&&n.target.parentNode===t})),ze((e=>e[2])),It()),r.push(Je(this._domMouseDown$,this._domMouseMove$,this._dblClick$,this._contextMenu$).subscribe((e=>{e.preventDefault()}))),this._mouseWheel$=Je(Qe(t,"wheel"),Qe(i,"wheel")).pipe(It()),this._consistentContextMenu$=Je(this._mouseDown$,this._mouseMove$,this._mouseOut$,this._mouseUp$,this._contextMenu$).pipe(nt(3,1),et((e=>"pointerdown"===e[0].type&&"contextmenu"===e[1].type&&"pointerup"===e[2].type)),ze((e=>e[1])),It());const s=Je(this._windowBlur$,this._documentMouseMove$.pipe(et((e=>this._buttonReleased(e,0)))),this._documentMouseUp$.pipe(et((e=>0===this._mouseButton(e))))).pipe(It()),a=this._createMouseDragInitiate$(0,this._mouseDown$,s,!0).pipe(It());this._mouseDragStart$=this._createMouseDragStart$(a).pipe(It()),this._mouseDrag$=this._createMouseDrag$(a,s).pipe(It()),this._mouseDragEnd$=this._createMouseDragEnd$(this._mouseDragStart$,s).pipe(It());const o=this._createMouseDragInitiate$(0,this._domMouseDown$,s,!1).pipe(It());this._domMouseDragStart$=this._createMouseDragStart$(o).pipe(It()),this._domMouseDrag$=this._createMouseDrag$(o,s).pipe(It()),this._domMouseDragEnd$=this._createMouseDragEnd$(this._domMouseDragStart$,s).pipe(It());const c=Je(this._windowBlur$,this._documentMouseMove$.pipe(et((e=>this._buttonReleased(e,2)))),this._documentMouseUp$.pipe(et((e=>2===this._mouseButton(e))))).pipe(It()),l=this._createMouseDragInitiate$(2,this._mouseDown$,c,!0).pipe(It());this._mouseRightDragStart$=this._createMouseDragStart$(l).pipe(It()),this._mouseRightDrag$=this._createMouseDrag$(l,c).pipe(It()),this._mouseRightDragEnd$=this._createMouseDragEnd$(this._mouseRightDragStart$,c).pipe(It()),this._proximateClick$=this._mouseDown$.pipe(zt((e=>this._click$.pipe(jt(this._createDeferredMouseMove$(e,this._documentMouseMove$)),pt(1)))),It()),this._staticClick$=this._mouseDown$.pipe(zt((()=>this._click$.pipe(jt(this._documentMouseMove$),pt(1)))),It()),r.push(this._mouseDragStart$.subscribe()),r.push(this._mouseDrag$.subscribe()),r.push(this._mouseDragEnd$.subscribe()),r.push(this._domMouseDragStart$.subscribe()),r.push(this._domMouseDrag$.subscribe()),r.push(this._domMouseDragEnd$.subscribe()),r.push(this._mouseRightDragStart$.subscribe()),r.push(this._mouseRightDrag$.subscribe()),r.push(this._mouseRightDragEnd$.subscribe()),r.push(this._staticClick$.subscribe()),this._mouseOwner$=this._createOwner$(this._claimMouse$).pipe(St(1),F()),this._wheelOwner$=this._createOwner$(this._claimWheel$).pipe(St(1),F()),r.push(this._mouseOwner$.subscribe((()=>{}))),r.push(this._wheelOwner$.subscribe((()=>{})))}get active$(){return this._active$}get activate$(){return this._activeSubject$}get documentMouseMove$(){return this._documentMouseMove$}get documentMouseUp$(){return this._documentMouseUp$}get domMouseDragStart$(){return this._domMouseDragStart$}get domMouseDrag$(){return this._domMouseDrag$}get domMouseDragEnd$(){return this._domMouseDragEnd$}get domMouseDown$(){return this._domMouseDown$}get domMouseMove$(){return this._domMouseMove$}get mouseOwner$(){return this._mouseOwner$}get mouseDown$(){return this._mouseDown$}get mouseEnter$(){return this._mouseEnter$}get mouseMove$(){return this._mouseMove$}get mouseLeave$(){return this._mouseLeave$}get mouseOut$(){return this._mouseOut$}get mouseOver$(){return this._mouseOver$}get mouseUp$(){return this._mouseUp$}get click$(){return this._click$}get dblClick$(){return this._dblClick$}get contextMenu$(){return this._consistentContextMenu$}get mouseWheel$(){return this._mouseWheel$}get mouseDragStart$(){return this._mouseDragStart$}get mouseDrag$(){return this._mouseDrag$}get mouseDragEnd$(){return this._mouseDragEnd$}get mouseRightDragStart$(){return this._mouseRightDragStart$}get mouseRightDrag$(){return this._mouseRightDrag$}get mouseRightDragEnd$(){return this._mouseRightDragEnd$}get proximateClick$(){return this._proximateClick$}get staticClick$(){return this._staticClick$}get windowBlur$(){return this._windowBlur$}dispose(){this._subscriptions.unsubscribe()}claimMouse(e,t){this._claimMouse$.next({name:e,zindex:t})}unclaimMouse(e){this._claimMouse$.next({name:e,zindex:null})}deferPixels(e,t){this._deferPixelClaims$.next({name:e,deferPixels:t})}undeferPixels(e){this._deferPixelClaims$.next({name:e,deferPixels:null})}claimWheel(e,t){this._claimWheel$.next({name:e,zindex:t})}unclaimWheel(e){this._claimWheel$.next({name:e,zindex:null})}filtered$(e,t){return this._filtered(e,t,this._mouseOwner$)}filteredWheel$(e,t){return this._filtered(e,t,this._wheelOwner$)}_createDeferredMouseMove$(e,t){return t.pipe(ze((t=>{const i=t.clientX-e.clientX,n=t.clientY-e.clientY;return[t,Math.sqrt(i*i+n*n)]})),Pt(this._deferPixels$),et((([[,e],t])=>e>t)),ze((([[e]])=>e)))}_createMouseDrag$(e,t){return e.pipe(ze((([,e])=>e)),zt((e=>Ve(Ne(e),this._documentMouseMove$).pipe(jt(t)))))}_createMouseDragEnd$(e,t){return e.pipe(zt((()=>t.pipe(vt()))))}_createMouseDragStart$(e){return e.pipe(ze((([e])=>e)))}_createMouseDragInitiate$(e,t,i,n){return t.pipe(et((t=>this._mouseButton(t)===e)),zt((e=>$e(Ne(e),n?this._createDeferredMouseMove$(e,this._documentMouseMove$):this._documentMouseMove$).pipe(jt(i),pt(1)))))}_createOwner$(e){return e.pipe(Dt(((e,t)=>(null==t.zindex?delete e[t.name]:e[t.name]=t.zindex,e)),{}),ze((e=>{let t=null,i=-1;for(const n in e)e.hasOwnProperty(n)&&e[n]>i&&(i=e[n],t=n);return t})),Lt(null))}_filtered(e,t,i){return t.pipe(Pt(i),et((([,t])=>t===e)),ze((([e])=>e)))}_mouseButton(e){const t="pointerdown"===e.type||"pointerup"===e.type,i=window.InstallTrigger;return t&&void 0!==i&&2===e.button&&e.ctrlKey&&window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button}_buttonReleased(e,t){const i=JT[t];return void 0===e.buttons||(e.buttons&i)!==i}_isMousePen(e){const t=e.pointerType;return"mouse"===t||"pen"===t}}class eS{set json(e){this._json=e}set image(e){this._image=e,this._texture=new Qr(this._image),this._texture.minFilter=Fi}get loaded(){return!(!this._image||!this._json)}getGLSprite(e){if(!this.loaded)throw new Error("Sprites cannot be retrieved before the atlas is loaded.");let t=this._json[e];if(!t)return console.warn("Sprite with key"+e+"does not exist in sprite definition."),new na;let i=this._texture.clone();i.needsUpdate=!0;let n=this._image.width,r=this._image.height;i.offset.x=t.x/n,i.offset.y=(r-t.y-t.height)/r,i.repeat.x=t.width/n,i.repeat.y=t.height/r;let s=new gh({map:i});return new Ih(s)}getDOMSprite(e,t){if(!this.loaded)throw new Error("Sprites cannot be retrieved before the atlas is loaded.");null==t&&(t=Ly.Center);let i=this._json[e];if(!i)return console.warn("Sprite with key"+e+"does not exist in sprite definition."),r_.h("div",{},[]);let n=i.y,r=i.x+i.width,s=i.y+i.height,a=i.x,o=-i.x,c=-i.y,l=this._image.height,h=this._image.width;switch(t){case Ly.Bottom:case Ly.Center:case Ly.Top:o-=i.width/2;break;case Ly.BottomLeft:case Ly.Left:case Ly.TopLeft:o-=i.width;case Ly.BottomRight:case Ly.Right:case Ly.TopRight:}switch(t){case Ly.Center:case Ly.Left:case Ly.Right:c-=i.height/2;break;case Ly.Top:case Ly.TopLeft:case Ly.TopRight:c-=i.height;case Ly.Bottom:case Ly.BottomLeft:case Ly.BottomRight:}let u=1/i.pixelRatio;n*=u,r*=u,s*=u,a*=u,o*=u,c*=u,l*=u,h*=u;let p={src:this._image.src,style:{clip:`rect(${n}px, ${r}px, ${s}px, ${a}px)`,height:`${l}px`,left:`${o}px`,position:"absolute",top:`${c}px`,width:`${h}px`}};return r_.h("img",p,[])}}class tS{constructor(e){if(this._retina=window.devicePixelRatio>1,this._spriteAtlasOperation$=new V,this._spriteAtlas$=this._spriteAtlasOperation$.pipe(Lt((e=>e)),Dt(((e,t)=>t(e)),new eS),St(1),F()),this._atlasSubscription=this._spriteAtlas$.subscribe((()=>{})),null==e)return;let t=this._retina?"@2x":"",i=new XMLHttpRequest;i.open("GET",e+t+".png",!0),i.responseType="arraybuffer",i.onload=()=>{let e=new Image;e.onload=()=>{this._spriteAtlasOperation$.next((t=>(t.image=e,t)))};let t=new Blob([i.response]);e.src=window.URL.createObjectURL(t)},i.onerror=i=>{console.error(new Error(`Failed to fetch sprite sheet (${e}${t}.png)`))},i.send();let n=new XMLHttpRequest;n.open("GET",e+t+".json",!0),n.responseType="text",n.onload=()=>{let e=JSON.parse(n.response);this._spriteAtlasOperation$.next((t=>(t.json=e,t)))},n.onerror=i=>{console.error(new Error(`Failed to fetch sheet (${e}${t}.json)`))},n.send()}get spriteAtlas$(){return this._spriteAtlas$}dispose(){this._atlasSubscription.unsubscribe()}}class iS{constructor(e,t){this._subscriptions=new a_;const i=this._subscriptions;this._activeSubject$=new q(!1),this._active$=this._activeSubject$.pipe(dt(),St(1),F()),i.push(Qe(t,"touchmove").subscribe((e=>{e.preventDefault()}))),this._touchStart$=Qe(e,"touchstart"),this._touchMove$=Qe(e,"touchmove"),this._touchEnd$=Qe(e,"touchend"),this._touchCancel$=Qe(e,"touchcancel");const n=this._touchStart$.pipe(et((e=>1===e.touches.length&&1===e.targetTouches.length)),It());var r;this._doubleTap$=n.pipe((r=()=>n.pipe(vt(),zt((()=>Je(Xe(300),n).pipe(pt(1))))),$((function(e,t){var i=null,n=null,s=function(){null==n||n.unsubscribe();var e=i;i=[],e&&t.next(e),Me(r()).subscribe(n=new B(t,s,T))};s(),e.subscribe(new B(t,(function(e){return null==i?void 0:i.push(e)}),(function(){i&&t.next(i),t.complete()}),void 0,(function(){return i=n=null})))}))),et((e=>2===e.length)),ze((e=>e[e.length-1])),It()),i.push(this._doubleTap$.subscribe((e=>{e.preventDefault()}))),this._singleTouchMove$=this._touchMove$.pipe(et((e=>1===e.touches.length&&1===e.targetTouches.length)),It());let s=Je(this._touchStart$,this._touchEnd$,this._touchCancel$).pipe(et((e=>1===e.touches.length&&1===e.targetTouches.length))),a=Je(this._touchStart$,this._touchEnd$,this._touchCancel$).pipe(et((e=>e.touches.length>=1))),o=Je(this._touchEnd$,this._touchCancel$).pipe(et((e=>0===e.touches.length)));this._singleTouchDragStart$=s.pipe(Ge((()=>this._singleTouchMove$.pipe(jt(Je(o,a)),pt(1))))),this._singleTouchDragEnd$=s.pipe(Ge((()=>Je(o,a).pipe(vt())))),this._singleTouchDrag$=s.pipe(zt((()=>this._singleTouchMove$.pipe(At(1),jt(Je(a,o))))));let c=Je(this._touchStart$,this._touchEnd$,this._touchCancel$);this._pinchStart$=c.pipe(et((e=>2===e.touches.length&&2===e.targetTouches.length))),this._pinchEnd$=c.pipe(et((e=>2!==e.touches.length||2!==e.targetTouches.length))),this._pinchOperation$=new V,this._pinch$=this._pinchOperation$.pipe(Dt(((e,t)=>t(e)),{changeX:0,changeY:0,clientX:0,clientY:0,distance:0,distanceChange:0,distanceX:0,distanceY:0,originalEvent:null,pageX:0,pageY:0,screenX:0,screenY:0,touch1:null,touch2:null}));const l=this._touchMove$.pipe(et((e=>2===e.touches.length&&2===e.targetTouches.length)),ze((e=>t=>{let i=e.touches[0],n=e.touches[1],r=Math.min(i.clientX,n.clientX),s=Math.max(i.clientX,n.clientX),a=Math.min(i.clientY,n.clientY),o=r+(s-r)/2,c=a+(Math.max(i.clientY,n.clientY)-a)/2,l=o+i.pageX-i.clientX,h=c+i.pageY-i.clientY,u=o+i.screenX-i.clientX,p=c+i.screenY-i.clientY,d=Math.abs(i.clientX-n.clientX),g=Math.abs(i.clientY-n.clientY),m=Math.sqrt(d*d+g*g),f=m-t.distance;return{changeX:d-t.distanceX,changeY:g-t.distanceY,clientX:o,clientY:c,distance:m,distanceChange:f,distanceX:d,distanceY:g,originalEvent:e,pageX:l,pageY:h,screenX:u,screenY:p,touch1:i,touch2:n}}))).subscribe(this._pinchOperation$);i.push(l),this._pinchChange$=this._pinchStart$.pipe(zt((()=>this._pinch$.pipe(At(1),jt(this._pinchEnd$)))))}get active$(){return this._active$}get activate$(){return this._activeSubject$}get doubleTap$(){return this._doubleTap$}get touchStart$(){return this._touchStart$}get touchMove$(){return this._touchMove$}get touchEnd$(){return this._touchEnd$}get touchCancel$(){return this._touchCancel$}get singleTouchDragStart$(){return this._singleTouchDragStart$}get singleTouchDrag$(){return this._singleTouchDrag$}get singleTouchDragEnd$(){return this._singleTouchDragEnd$}get pinch$(){return this._pinchChange$}get pinchStart$(){return this._pinchStart$}get pinchEnd$(){return this._pinchEnd$}dispose(){this._subscriptions.unsubscribe()}}class nS{constructor(e){var t,i,n,r;const s=null!==(i=null===(t=null==e?void 0:e.url)||void 0===t?void 0:t.exploreHost)&&void 0!==i?i:"www.mapillary.com",a=`${null!==(r=null===(n=null==e?void 0:e.url)||void 0===n?void 0:n.scheme)&&void 0!==r?r:"https"}://${s}`;this._exploreUrl$=Ne(a);const o=!1!==(null==e?void 0:e.imageTiling);this._imageTiling$=Ne(o)}get exploreUrl$(){return this._exploreUrl$}get imageTiling$(){return this._imageTiling$}}class rS{constructor(e,t,i){var n;if(this._onWindowResize=()=>{this._trackResize&&this.renderService.resize$.next()},this._dom=null!=i?i:new pM,"string"==typeof e.container){if(this._container=this._dom.document.getElementById(e.container),!this._container)throw new Error(`Container "${e.container}" not found.`)}else{if(!(e.container instanceof HTMLElement))throw new Error('Invalid type: "container" must be a String or HTMLElement.');this._container=e.container}this._trackResize=!1!==e.trackResize,this.id=null!==(n=this._container.id)&&void 0!==n?n:"mapillary-fallback-container-id",this._container.classList.add("mapillary-viewer"),this._canvasContainer=this._dom.createElement("div","mapillary-interactive",this._container),this._canvas=this._dom.createElement("canvas","mapillary-canvas"),this._canvas.style.position="absolute",this._canvas.setAttribute("tabindex","0"),this._domContainer=this._dom.createElement("div","mapillary-dom",this._container),this.configurationService=new nS(e),this.renderService=new WT(this._container,t.currentState$,e.renderMode),this.glRenderer=new VT(this._canvas,this._canvasContainer,this.renderService),this.domRenderer=new HT(this._domContainer,this.renderService,t.currentState$),this.keyboardService=new QT(this._canvasContainer),this.mouseService=new KT(this._container,this._canvasContainer,this._domContainer,document),this.touchService=new iS(this._canvasContainer,this._domContainer),this.spriteService=new tS(e.sprite),window.addEventListener("resize",this._onWindowResize,!1)}get canvas(){return this._canvas.parentNode?this._canvas:null}get canvasContainer(){return this._canvasContainer}get container(){return this._container}get domContainer(){return this._domContainer}remove(){window.removeEventListener("resize",this._onWindowResize,!1),this.spriteService.dispose(),this.touchService.dispose(),this.mouseService.dispose(),this.glRenderer.remove(),this.domRenderer.remove(),this.renderService.dispose(),this._removeNode(this._canvasContainer),this._removeNode(this._domContainer),this._container.classList.remove("mapillary-viewer")}_removeNode(e){e.parentNode&&e.parentNode.removeChild(e)}}class sS{constructor(e,t,i){this._graphService=e,this._stateService=t,this._api=i,this._subscriptions=new a_,this._started=!1,this._cellDepth=1}get started(){return this._started}configure(e){this._cellDepth=e?Math.max(1,Math.min(3,e.cellDepth)):1}start(){if(this._started)return;const e=this._subscriptions;e.push(this._stateService.currentState$.pipe(dt(void 0,(e=>e.state.currentImage.id)),ze((e=>{const t=e.state,i=t.trajectory,n=i.map((e=>e.id)),r=i[i.length-1].sequenceId;return[n,t.currentImage.originalLngLat,r]})),nt(1,5),Pt(this._graphService.graphMode$),zt((([e,t])=>{const i=e[0][0],n=e[0][1],r=this._api.data.geometry,s=PM(r.lngLatToCellId(n),this._cellDepth,r),a=t===k_.Sequence?e[0][2]:void 0;return this._graphService.uncache$(i,s,a)}))).subscribe((()=>{}))),e.push(this._graphService.graphMode$.pipe(At(1),Pt(this._stateService.currentState$),zt((([e,t])=>e===k_.Sequence?this._keyToEdges(t.state.currentImage.id,(e=>e.sequenceEdges$)):_e(t.state.trajectory.map((e=>e.id)).slice(t.state.currentIndex)).pipe(Ge((e=>this._keyToEdges(e,(e=>e.spatialEdges$))),6))))).subscribe((()=>{}))),e.push(this._graphService.dataAdded$.pipe(Pt(this._stateService.currentId$),zt((([e,t])=>this._graphService.cacheImage$(t)))).subscribe((()=>{}))),this._started=!0}stop(){this._started&&(this._subscriptions.unsubscribe(),this._started=!1)}_keyToEdges(e,t){return this._graphService.cacheImage$(e).pipe(zt(t),vt((e=>e.cached)),Ee(15e3),rt((t=>(console.error(`Failed to cache edges (${e}).`,t),re()))))}}class aS{constructor(){this._loadersSubject$=new V,this._loaders$=this._loadersSubject$.pipe(Dt(((e,t)=>(void 0!==t.task&&(e[t.task]=t.loading),e)),{}),Lt({}),St(1),F())}get loading$(){return this._loaders$.pipe(ze((e=>{for(const t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1})),ht(100),dt())}taskLoading$(e){return this._loaders$.pipe(ze((t=>!!t[e])),ht(100),dt())}startLoading(e){this._loadersSubject$.next({loading:!0,task:e})}stopLoading(e){this._loadersSubject$.next({loading:!1,task:e})}}var oS;!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Started=2]="Started"}(oS||(oS={}));class cS{constructor(e,t,i,n,r,s){this._subscriptions=new a_,this._graphService=e,this._stateService=t,this._graphCalculator=null!=n?n:new wd,this._spatial=null!=r?r:new zd,this._viewportCoords=null!=s?s:new h_,this._mode=!1!==i?oS.Enabled:oS.Disabled,this._panImagesSubject$=new V,this._panImages$=this._panImagesSubject$.pipe(Lt([]),St(1),F()),this._subscriptions.push(this._panImages$.subscribe())}get panImages$(){return this._panImages$}dispose(){this.stop(),null!=this._panImagesSubscription&&this._panImagesSubscription.unsubscribe(),this._subscriptions.unsubscribe()}enable(){this._mode===oS.Disabled&&(this._mode=oS.Enabled,this.start())}disable(){this._mode!==oS.Disabled&&(this.stop(),this._mode=oS.Disabled)}start(){if(this._mode!==oS.Enabled)return;const e=this._stateService.currentImage$.pipe(zt((e=>{if(!e.merged||Od(e.cameraType))return Ne([]);const t=Ne(e),i=this._graphCalculator.boundingBoxCorners(e.lngLat,20);return $e(t,this._graphService.cacheBoundingBox$(i[0],i[1]).pipe(rt((t=>(console.error(`Failed to cache periphery bounding box (${e.id})`,t),re()))),ze((t=>{if(Od(e.cameraType))return[];const i=[];for(const n of t)n.id!==e.id&&n.mergeId===e.mergeId&&(Od(n.cameraType)||this._distance(n,e)>4||i.push(n));return i})))).pipe(Pt(this._stateService.reference$),ze((([[e,t],i])=>{const n=this._spatial.viewingDirection(e.rotation),r=Pd({lat:e.lngLat.lat,lng:e.lngLat.lng,alt:e.computedAltitude},e.rotation,i),s=this._createTransform(e,r),a=this._spatial.wrap(this._spatial.azimuthal(n.toArray(),s.upVector().toArray()),0,2*Math.PI),o=this._computeProjectedPoints(s),c=this._computeHorizontalFov(o)/180*Math.PI,l=Math.PI/8;let h,u;for(const r of t){const t=Pd({lat:r.lngLat.lat,lng:r.lngLat.lng,alt:r.computedAltitude},r.rotation,i),s=this._createTransform(r,t),o=this._computeProjectedPoints(s),p=this._computeHorizontalFov(o)/180*Math.PI,d=this._spatial.viewingDirection(r.rotation),g=this._spatial.wrap(this._spatial.azimuthal(d.toArray(),s.upVector().toArray()),0,2*Math.PI),m=this._spatial.angleBetweenVector2(n.x,n.y,d.x,d.y);let f=Number.NEGATIVE_INFINITY;f=m>0?a>g?a-2*Math.PI+c/2-(g-p/2):a+c/2-(g-p/2):a0?-2*_:0);f>0&&f<.5*c&&f<.5*p&&_>.5*c&&(m>0?h?Me.state.imagesAhead>0)),dt(),zt((t=>t?Ne([]):e))).subscribe((e=>{this._panImagesSubject$.next(e)})),this._mode=oS.Started}stop(){this._mode===oS.Started&&(this._panImagesSubscription.unsubscribe(),this._panImagesSubject$.next([]),this._mode=oS.Enabled)}_distance(e,t){const[i,n,r]=_d(e.lngLat.lng,e.lngLat.lat,e.computedAltitude,t.lngLat.lng,t.lngLat.lat,t.computedAltitude);return Math.sqrt(i*i+n*n+r*r)}_timeDifference(e,t){return Math.abs(e.capturedAt-t.capturedAt)/2592e6}_createTransform(e,t){return new fM(e.exifOrientation,e.width,e.height,e.scale,e.rotation,t,e.assetsCached?e.image:void 0,void 0,e.cameraParameters,e.cameraType)}_computeProjectedPoints(e){return Rd(e,[[1,0]],[[0,.5]],20,this._viewportCoords)}_computeHorizontalFov(e){const t=e.map((e=>this._coordToFov(e[0])));return Math.min(...t)}_coordToFov(e){return 2*Math.atan(e)*180/Math.PI}}class lS{constructor(e){this._data=e}get data(){return this._data}getCoreImages$(e){return this._wrap$(this._data.getCoreImages(e))}getImages$(e){return this._wrap$(this._data.getImages(e))}getImageTiles$(e){return this._wrap$(this._data.getImageTiles(e))}getSequence$(e){return this._wrap$(this._data.getSequence(e))}getSpatialImages$(e){return this._wrap$(this._data.getSpatialImages(e))}setAccessToken(e){this._data.setAccessToken(e)}_wrap$(e){return P.create((t=>{e.then((e=>{t.next(e),t.complete()}),(e=>{t.error(e)}))}))}}class hS{constructor(e){this._dataAdded$=new V,this._subscriptions=new a_,this._onDataAdded=e=>{this._graph$.pipe(vt(),Ge((t=>t.updateCells$(e.cellIds).pipe(kt((()=>{t.resetSpatialEdges()})))))).subscribe((e=>{this._dataAdded$.next(e)}))};const t=this._subscriptions;this._graph$=Ve(Ne(e),e.changed$).pipe(St(1),F()),t.push(this._graph$.subscribe((()=>{}))),this._graphMode=k_.Spatial,this._graphModeSubject$=new V,this._graphMode$=this._graphModeSubject$.pipe(Lt(this._graphMode),St(1),F()),t.push(this._graphMode$.subscribe((()=>{}))),this._firstGraphSubjects$=[],this._initializeCacheSubscriptions=[],this._sequenceSubscriptions=[],this._spatialSubscriptions=[],e.api.data.on("datacreate",this._onDataAdded)}get dataAdded$(){return this._dataAdded$}get filter$(){return this._graph$.pipe(vt(),Ge((e=>e.filter$)))}get graphMode$(){return this._graphMode$}cacheBoundingBox$(e,t){return this._graph$.pipe(vt(),Ge((i=>i.cacheBoundingBox$(e,t))))}cacheCell$(e){return this._graph$.pipe(vt(),Ge((t=>t.cacheCell$(e))))}cacheImage$(e){const t=new V;this._firstGraphSubjects$.push(t);const i=t.pipe(St(1),F()),n=i.pipe(ze((t=>t.getNode(e))),Ge((e=>e.assetsCached?Ne(e):e.cacheAssets$())),St(1),F());let r;n.subscribe(void 0,(t=>{console.error(`Failed to cache image (${e}).`,t)})),r=this._graph$.pipe(vt(),Ge((t=>t.isCachingFull(e)||!t.hasNode(e)?t.cacheFull$(e):t.isCachingFill(e)||!t.getNode(e).complete?t.cacheFill$(e):Ne(t))),kt((t=>{if(!t.hasNode(e))throw new $d(`Failed to cache image (${e})`);t.hasInitializedCache(e)||t.initializeCache(e)})),Mt((()=>{null!=r&&(this._removeFromArray(r,this._initializeCacheSubscriptions),this._removeFromArray(t,this._firstGraphSubjects$))}))).subscribe((e=>{t.next(e),t.complete()}),(e=>{t.error(e)})),r.closed||this._initializeCacheSubscriptions.push(r);const s=i.pipe(rt((()=>re())),Ge((t=>t.isCachingNodeSequence(e)||!t.hasNodeSequence(e)?t.cacheNodeSequence$(e):Ne(t))),St(1),F());let a;if(a=s.pipe(kt((t=>{t.getNode(e).sequenceEdges.cached||t.cacheSequenceEdges(e)})),Mt((()=>{null!=a&&this._removeFromArray(a,this._sequenceSubscriptions)}))).subscribe((()=>{}),(t=>{console.error(`Failed to cache sequence edges (${e}).`,t)})),a.closed||this._sequenceSubscriptions.push(a),this._graphMode===k_.Spatial){let t;t=i.pipe(rt((()=>re())),_t((t=>t.hasTiles(e)?re():_e(t.cacheTiles$(e)).pipe(Ge((t=>t.pipe(Ge((t=>t.isCachingTiles(e)?re():Ne(t))),rt((t=>(console.error(`Failed to cache tile data (${e}).`,t),re()))))))))),yt(1),Ge((t=>t.hasSpatialArea(e)?Ne(t):_e(t.cacheSpatialArea$(e)).pipe(Ge((t=>t.pipe(rt((t=>(console.error(`Failed to cache spatial images (${e}).`,t),re()))))))))),yt(1),Ge((t=>t.hasNodeSequence(e)?Ne(t):t.cacheNodeSequence$(e))),kt((t=>{t.getNode(e).spatialEdges.cached||t.cacheSpatialEdges(e)})),Mt((()=>{null!=t&&this._removeFromArray(t,this._spatialSubscriptions)}))).subscribe((()=>{}),(t=>{const i=`Failed to cache spatial edges (${e}).`;console.error(i,t)})),t.closed||this._spatialSubscriptions.push(t)}return n.pipe(vt((e=>e.assetsCached)))}cacheSequence$(e){return this._graph$.pipe(vt(),Ge((t=>t.isCachingSequence(e)||!t.hasSequence(e)?t.cacheSequence$(e):Ne(t))),ze((t=>t.getSequence(e))))}cacheSequenceImages$(e,t){return this._graph$.pipe(vt(),Ge((t=>t.isCachingSequence(e)||!t.hasSequence(e)?t.cacheSequence$(e):Ne(t))),Ge((i=>i.isCachingSequenceNodes(e)||!i.hasSequenceNodes(e)?i.cacheSequenceNodes$(e,t):Ne(i))),ze((t=>t.getSequence(e))))}dispose(){this._graph$.pipe(vt()).subscribe((e=>{e.unsubscribe()})),this._subscriptions.unsubscribe()}setFilter$(e){return this._resetSubscriptions(this._spatialSubscriptions),this._graph$.pipe(vt(),kt((t=>{t.resetSpatialEdges(),t.setFilter(e)})),ze((()=>{})))}setGraphMode(e){this._graphMode!==e&&(e===k_.Sequence&&this._resetSubscriptions(this._spatialSubscriptions),this._graphMode=e,this._graphModeSubject$.next(this._graphMode))}reset$(e){return this._abortSubjects(this._firstGraphSubjects$),this._resetSubscriptions(this._initializeCacheSubscriptions),this._resetSubscriptions(this._sequenceSubscriptions),this._resetSubscriptions(this._spatialSubscriptions),this._graph$.pipe(vt(),kt((t=>{t.reset(e)})),ze((()=>{})))}uncache$(e,t,i){return this._graph$.pipe(vt(),kt((n=>{n.uncache(e,t,i)})),ze((()=>{})))}_abortSubjects(e){for(const t of e.slice())this._removeFromArray(t,e),t.error(new Error("Cache image request was aborted."))}_removeFromArray(e,t){const i=t.indexOf(e);-1!==i&&t.splice(i,1)}_resetSubscriptions(e){for(const t of e.slice())this._removeFromArray(t,e),t.closed||t.unsubscribe()}}class uS{constructor(e){e.requestAnimationFrame?(this._cancelAnimationFrame=e.cancelAnimationFrame.bind(e),this._requestAnimationFrame=e.requestAnimationFrame.bind(e)):e.mozRequestAnimationFrame?(this._cancelAnimationFrame=e.mozCancelAnimationFrame.bind(e),this._requestAnimationFrame=e.mozRequestAnimationFrame.bind(e)):e.webkitRequestAnimationFrame?(this._cancelAnimationFrame=e.webkitCancelAnimationFrame.bind(e),this._requestAnimationFrame=e.webkitRequestAnimationFrame.bind(e)):e.msRequestAnimationFrame?(this._cancelAnimationFrame=e.msCancelAnimationFrame.bind(e),this._requestAnimationFrame=e.msRequestAnimationFrame.bind(e)):e.oRequestAnimationFrame?(this._cancelAnimationFrame=e.oCancelAnimationFrame.bind(e),this._requestAnimationFrame=e.oRequestAnimationFrame.bind(e)):(this._cancelAnimationFrame=e.clearTimeout.bind(e),this._requestAnimationFrame=t=>e.setTimeout(t,1e3/60))}get cancelAnimationFrame(){return this._cancelAnimationFrame}get requestAnimationFrame(){return this._requestAnimationFrame}}class pS{constructor(e){this._spatial=new zd,this._referenceThreshold=.01,this._transitionMode=e.transitionMode,this._reference=e.reference,this._alpha=e.alpha,this._stateTransitionAlpha=0,this._camera=e.camera.clone(),this._zoom=e.zoom,this._currentIndex=e.currentIndex,this._trajectory=e.trajectory.slice(),this._trajectoryTransforms=[],this._trajectoryCameras=[];for(let e of this._trajectory){let t=this._imageToTranslation(e,this._reference),i=new fM(e.exifOrientation,e.width,e.height,e.scale,e.rotation,t,e.image,void 0,e.cameraParameters,e.cameraType);this._trajectoryTransforms.push(i),this._trajectoryCameras.push(new YT(i))}this._currentImage=this._trajectory.length>0?this._trajectory[this._currentIndex]:null,this._previousImage=this._trajectory.length>1&&this.currentIndex>0?this._trajectory[this._currentIndex-1]:null,this._currentCamera=this._trajectoryCameras.length>0?this._trajectoryCameras[this._currentIndex].clone():new YT,this._previousCamera=this._trajectoryCameras.length>1&&this.currentIndex>0?this._trajectoryCameras[this._currentIndex-1].clone():this._currentCamera.clone()}get reference(){return this._reference}get alpha(){return this._getAlpha()}get stateTransitionAlpha(){return this._getStateTransitionAlpha()}get camera(){return this._camera}get zoom(){return this._zoom}get trajectory(){return this._trajectory}get currentIndex(){return this._currentIndex}get currentImage(){return this._currentImage}get previousImage(){return this._previousImage}get currentCamera(){return this._currentCamera}get currentTransform(){return this._trajectoryTransforms.length>0?this._trajectoryTransforms[this.currentIndex]:null}get previousTransform(){return this._trajectoryTransforms.length>1&&this.currentIndex>0?this._trajectoryTransforms[this.currentIndex-1]:null}get motionless(){return this._motionless}get transitionMode(){return this._transitionMode}move(e){}moveTo(e){}rotate(e){}rotateUnbounded(e){}rotateWithoutInertia(e){}rotateBasic(e){}rotateBasicUnbounded(e){}rotateBasicWithoutInertia(e){}rotateToBasic(e){}setSpeed(e){}zoomIn(e,t){}update(e){}setCenter(e){}setZoom(e){}dolly(e){}orbit(e){}setViewMatrix(e){}truck(e){}append(e){if(e.length<1)throw Error("Trajectory can not be empty");this._currentIndex<0?this.set(e):(this._trajectory=this._trajectory.concat(e),this._appendToTrajectories(e))}prepend(e){if(e.length<1)throw Error("Trajectory can not be empty");this._trajectory=e.slice().concat(this._trajectory),this._currentIndex+=e.length,this._setCurrentImage(),this._setReference(this._currentImage)?this._setTrajectories():this._prependToTrajectories(e),this._setCurrentCamera()}remove(e){if(e<0)throw Error("n must be a positive integer");if(this._currentIndex-10&&this.remove(this._currentIndex-1)}clear(){this.cut(),this._currentIndex>0&&this.remove(this._currentIndex-1)}cut(){for(;this._trajectory.length-1>this._currentIndex;)this._trajectory.pop(),this._trajectoryTransforms.pop(),this._trajectoryCameras.pop()}set(e){this._setTrajectory(e),this._setCurrentImage(),this._setReference(this._currentImage),this._setTrajectories(),this._setCurrentCamera()}getCenter(){return null!=this._currentImage?this.currentTransform.projectBasic(this._camera.lookat.toArray()):[.5,.5]}setTransitionMode(e){this._transitionMode=e}_getAlpha(){return 1}_getStateTransitionAlpha(){return 1}_setCurrent(){this._setCurrentImage(),this._setReference(this._currentImage)&&this._setTrajectories(),this._setCurrentCamera()}_setCurrentCamera(){this._currentCamera=this._trajectoryCameras[this._currentIndex].clone(),this._previousCamera=this._currentIndex>0?this._trajectoryCameras[this._currentIndex-1].clone():this._currentCamera.clone()}_motionlessTransition(){return null!=this._currentImage&&null!=this._previousImage&&(this._transitionMode===FT.Instantaneous||!(this._currentImage.merged&&this._previousImage.merged&&this._withinOriginalDistance()&&this._sameConnectedComponent()))}_setReference(e){return!(Math.abs(e.lngLat.lat-this.reference.lat)0?this._trajectory[this._currentIndex]:null,this._previousImage=this._currentIndex>0?this._trajectory[this._currentIndex-1]:null}_setTrajectory(e){if(e.length<1)throw new Ld("Trajectory can not be empty");null!=this._currentImage?(this._trajectory=[this._currentImage].concat(e),this._currentIndex=1):(this._trajectory=e.slice(),this._currentIndex=0)}_setTrajectories(){this._trajectoryTransforms.length=0,this._trajectoryCameras.length=0,this._appendToTrajectories(this._trajectory)}_appendToTrajectories(e){for(let t of e){if(!t.assetsCached)throw new Ld("Assets must be cached when image is added to trajectory");let e=this._imageToTranslation(t,this.reference),i=new fM(t.exifOrientation,t.width,t.height,t.scale,t.rotation,e,t.image,void 0,t.cameraParameters,t.cameraType);this._trajectoryTransforms.push(i),this._trajectoryCameras.push(new YT(i))}}_prependToTrajectories(e){for(let t of e.reverse()){if(!t.assetsCached)throw new Ld("Assets must be cached when added to trajectory");let e=this._imageToTranslation(t,this.reference),i=new fM(t.exifOrientation,t.width,t.height,t.scale,t.rotation,e,t.image,void 0,t.cameraParameters,t.cameraType);this._trajectoryTransforms.unshift(i),this._trajectoryCameras.unshift(new YT(i))}}_imageToTranslation(e,t){return Pd({alt:e.computedAltitude,lat:e.lngLat.lat,lng:e.lngLat.lng},e.rotation,t)}_sameConnectedComponent(){let e=this._currentImage,t=this._previousImage;return!!e&&!!t&&e.mergeId===t.mergeId}_withinOriginalDistance(){let e=this._currentImage,t=this._previousImage;return!e||!t||this._spatial.distanceFromLngLat(e.originalLngLat.lng,e.originalLngLat.lat,t.originalLngLat.lng,t.originalLngLat.lat)<25}}class dS extends pS{constructor(e){super(e)}setViewMatrix(e){const t=(new Ls).fromArray(e).invert().elements,i=new ts(t[12],t[13],t[14]),n=new ts(-t[8],-t[9],-t[10]),r=new ts(t[4],t[5],t[6]),s=this._camera;s.position.copy(i),s.lookat.copy(i.clone().add(n)),s.up.copy(r);const a=.5/Math.tan(Math.PI/3);s.focal=a}}class gS extends pS{constructor(e){super(e),this._transition=0;const t=this._camera.position.clone(),i=this._camera.lookat.clone().sub(t).normalize(),n=Math.sqrt(i.x*i.x+i.y*i.y),r=Math.atan2(i.z,n),s=new ts;if(r>-Math.PI/45)s.copy(t),t.add(new ts(i.x,i.y,0).multiplyScalar(-50)),t.z=30;else{const e=t.clone(),n=new ts(0,0,1),r=new ts(0,0,-2),a=(new ts).subVectors(r,e).dot(n)/i.dot(n),o=1e4,c=e.clone().add(i.clone().multiplyScalar(Math.min(o,a)));s.copy(c);const l=t.clone().sub(c).normalize();t.copy(c.add(l.multiplyScalar(Math.max(50,l.length()))))}const a=this._camera.position.clone(),o=a.clone().add(i.clone().normalize().multiplyScalar(10)),c=this._camera.up.clone(),l=o.clone(),h=l.clone().add(i.clone().normalize().multiplyScalar(10)),u=c.clone(),p=t.clone(),d=s.clone(),g=new ts(0,0,1),m=t.clone().add(d.clone().sub(p).normalize().multiplyScalar(-10)),f=d.clone(),_=g.clone();this._curveE=new du([l,a,p,m]),this._curveL=new du([h,o,d,f]),this._curveU=new du([u,c,g,_]),this._zoom0=this._zoom,this._zoom1=0,this._camera.focal=.5/Math.tan(Math.PI/4)}get _isTransitioning(){return this._transition<1}dolly(e){if(this._isTransitioning)return;const t=this._camera,i=t.position.clone().sub(t.lookat),n=i.length()*Math.pow(2,-e),r=Math.max(1,Math.min(n,4e3));i.normalize(),i.multiplyScalar(r),t.position.copy(t.lookat).add(i)}orbit(e){if(this._isTransitioning)return;const t=this._camera,i=(new es).setFromUnitVectors(t.up,new ts(0,0,1)),n=i.clone().invert(),r=t.position.clone().sub(t.lookat);r.applyQuaternion(i);const s=r.length();let a=Math.atan2(r.y,r.x);a+=e.phi;let o=Math.atan2(Math.sqrt(r.x*r.x+r.y*r.y),r.z);o+=e.theta;const c=Math.PI/36;o=Math.max(c,Math.min(Math.PI/2-c,o)),r.x=Math.sin(o)*Math.cos(a),r.y=Math.sin(o)*Math.sin(a),r.z=Math.cos(o),r.applyQuaternion(n),t.position.copy(t.lookat).add(r.multiplyScalar(s))}truck(e){if(this._isTransitioning)return;const t=this._camera;t.position.add((new ts).fromArray(e)),t.lookat.add((new ts).fromArray(e))}update(e){if(!this._isTransitioning)return;this._transition=Math.min(this._transition+2*e/3,1);const t=$r.smootherstep(this._transition,0,1),i=(t+1)/3,n=this._curveE.getPoint(i),r=this._curveL.getPoint(i),s=this._curveU.getPoint(i);this._camera.position.copy(n),this._camera.lookat.copy(r),this._camera.up.copy(s),this._zoom=$r.lerp(this._zoom0,this._zoom1,t),this._stateTransitionAlpha=t}_getStateTransitionAlpha(){return this._stateTransitionAlpha}}class mS{constructor(e,t){this._phi=e,this._theta=t}get phi(){return this._phi}set phi(e){this._phi=e}get theta(){return this._theta}set theta(e){this._theta=e}get isZero(){return 0===this._phi&&0===this._theta}copy(e){this._phi=e.phi,this._theta=e.theta}lerp(e,t){this._phi=(1-t)*this._phi+t*e.phi,this._theta=(1-t)*this._theta+t*e.theta}multiply(e){this._phi*=e,this._theta*=e}threshold(e){this._phi=Math.abs(this._phi)>e?this._phi:0,this._theta=Math.abs(this._theta)>e?this._theta:0}lengthSquared(){return this._phi*this._phi+this._theta*this._theta}reset(){this._phi=0,this._theta=0}}class fS extends pS{constructor(e){super(e),this._animationSpeed=1/40,this._rotationDelta=new mS(0,0),this._requestedRotationDelta=null,this._basicRotation=[0,0],this._requestedBasicRotation=null,this._requestedBasicRotationUnbounded=null,this._rotationAcceleration=.86,this._rotationIncreaseAlpha=.97,this._rotationDecreaseAlpha=.9,this._rotationThreshold=.001,this._unboundedRotationAlpha=.8,this._desiredZoom=e.zoom,this._minZoom=0,this._maxZoom=3,this._lookatDepth=10,this._desiredLookat=null,this._desiredCenter=null}rotate(e){null!=this._currentImage&&(0===e.phi&&0===e.theta||(this._desiredZoom=this._zoom,this._desiredLookat=null,this._requestedBasicRotation=null,null!=this._requestedRotationDelta?(this._requestedRotationDelta.phi=this._requestedRotationDelta.phi+e.phi,this._requestedRotationDelta.theta=this._requestedRotationDelta.theta+e.theta):this._requestedRotationDelta=new mS(e.phi,e.theta)))}rotateUnbounded(e){if(null==this._currentImage)return;if(this._requestedBasicRotation=null,this._requestedRotationDelta=null,this._applyRotation(e,this._currentCamera),this._applyRotation(e,this._previousCamera),!this._desiredLookat)return;const t=(new es).setFromUnitVectors(this._currentCamera.up,new ts(0,0,1)),i=t.clone().invert(),n=(new ts).copy(this._desiredLookat).sub(this._camera.position).applyQuaternion(t),r=n.length();let s=Math.atan2(n.y,n.x);s+=e.phi;let a=Math.atan2(Math.sqrt(n.x*n.x+n.y*n.y),n.z);a+=e.theta,a=Math.max(.1,Math.min(Math.PI-.1,a)),n.x=Math.sin(a)*Math.cos(s),n.y=Math.sin(a)*Math.sin(s),n.z=Math.cos(a),n.applyQuaternion(i),this._desiredLookat.copy(this._camera.position).add(n.multiplyScalar(r))}rotateWithoutInertia(e){if(null==this._currentImage)return;this._desiredZoom=this._zoom,this._desiredLookat=null,this._requestedBasicRotation=null,this._requestedRotationDelta=null;const t=Math.PI/(10*Math.pow(2,this._zoom)),i={phi:this._spatial.clamp(e.phi,-t,t),theta:this._spatial.clamp(e.theta,-t,t)};this._applyRotation(i,this._currentCamera),this._applyRotation(i,this._previousCamera)}rotateBasic(e){if(null!=this._currentImage)if(this._desiredZoom=this._zoom,this._desiredLookat=null,this._requestedRotationDelta=null,null!=this._requestedBasicRotation){this._requestedBasicRotation[0]+=e[0],this._requestedBasicRotation[1]+=e[1];let t=.05/Math.pow(2,this._zoom);this._requestedBasicRotation[0]=this._spatial.clamp(this._requestedBasicRotation[0],-t,t),this._requestedBasicRotation[1]=this._spatial.clamp(this._requestedBasicRotation[1],-t,t)}else this._requestedBasicRotation=e.slice()}rotateBasicUnbounded(e){null!=this._currentImage&&(null!=this._requestedBasicRotationUnbounded?(this._requestedBasicRotationUnbounded[0]+=e[0],this._requestedBasicRotationUnbounded[1]+=e[1]):this._requestedBasicRotationUnbounded=e.slice())}rotateBasicWithoutInertia(e){if(null==this._currentImage)return;this._desiredZoom=this._zoom,this._desiredLookat=null,this._requestedRotationDelta=null,this._requestedBasicRotation=null;const t=.05/Math.pow(2,this._zoom),i=e.slice();i[0]=this._spatial.clamp(i[0],-t,t),i[1]=this._spatial.clamp(i[1],-t,t),this._applyRotationBasic(i)}rotateToBasic(e){if(null==this._currentImage)return;this._desiredZoom=this._zoom,this._desiredLookat=null,e[0]=this._spatial.clamp(e[0],0,1),e[1]=this._spatial.clamp(e[1],0,1);let t=this.currentTransform.unprojectBasic(e,this._lookatDepth);this._currentCamera.lookat.fromArray(t)}zoomIn(e,t){if(null==this._currentImage)return;this._desiredZoom=Math.max(this._minZoom,Math.min(this._maxZoom,this._desiredZoom+e));let i=this.currentTransform.projectBasic(this._currentCamera.lookat.toArray()),n=i[0],r=i[1],s=Math.pow(2,this._zoom),a=Math.pow(2,this._desiredZoom),o=t[0],c=t[1];Od(this.currentTransform.cameraType)&&(o-n>.5?o-=1:n-o>.5&&(o=1+o));let l=o-s/a*(o-n),h=c-s/a*(c-r);Od(this._currentImage.cameraType)?(l=this._spatial.wrap(l+this._basicRotation[0],0,1),h=this._spatial.clamp(h+this._basicRotation[1],.05,.95)):(l=this._spatial.clamp(l,0,1),h=this._spatial.clamp(h,0,1)),this._desiredLookat=(new ts).fromArray(this.currentTransform.unprojectBasic([l,h],this._lookatDepth))}setCenter(e){this._desiredLookat=null,this._requestedRotationDelta=null,this._requestedBasicRotation=null,this._desiredZoom=this._zoom;let t=[this._spatial.clamp(e[0],0,1),this._spatial.clamp(e[1],0,1)];if(null==this._currentImage)return void(this._desiredCenter=t);this._desiredCenter=null;let i=(new ts).fromArray(this.currentTransform.unprojectBasic(t,this._lookatDepth)),n=null!=this.previousTransform?this.previousTransform:this.currentTransform,r=(new ts).fromArray(n.unprojectBasic(t,this._lookatDepth));this._currentCamera.lookat.copy(i),this._previousCamera.lookat.copy(r)}setZoom(e){this._desiredLookat=null,this._requestedRotationDelta=null,this._requestedBasicRotation=null,this._zoom=this._spatial.clamp(e,this._minZoom,this._maxZoom),this._desiredZoom=this._zoom}_applyRotation(e,t){if(null==t)return;let i=(new es).setFromUnitVectors(t.up,new ts(0,0,1)),n=i.clone().invert(),r=new ts;r.copy(t.lookat).sub(t.position),r.applyQuaternion(i);let s=r.length(),a=Math.atan2(r.y,r.x);a+=e.phi;let o=Math.atan2(Math.sqrt(r.x*r.x+r.y*r.y),r.z);o+=e.theta,o=Math.max(.1,Math.min(Math.PI-.1,o)),r.x=Math.sin(o)*Math.cos(a),r.y=Math.sin(o)*Math.sin(a),r.z=Math.cos(o),r.applyQuaternion(n),t.lookat.copy(t.position).add(r.multiplyScalar(s))}_applyRotationBasic(e){let t=this._currentImage,i=null!=this._previousImage?this.previousImage:this.currentImage,n=this._currentCamera,r=this._previousCamera,s=this.currentTransform,a=null!=this.previousTransform?this.previousTransform:this.currentTransform,o=s.projectBasic(n.lookat.toArray()),c=a.projectBasic(r.lookat.toArray());Od(t.cameraType)?(o[0]=this._spatial.wrap(o[0]+e[0],0,1),o[1]=this._spatial.clamp(o[1]+e[1],.05,.95)):(o[0]=this._spatial.clamp(o[0]+e[0],0,1),o[1]=this._spatial.clamp(o[1]+e[1],0,1)),Od(i.cameraType)?(c[0]=this._spatial.wrap(c[0]+e[0],0,1),c[1]=this._spatial.clamp(c[1]+e[1],.05,.95)):(c[0]=this._spatial.clamp(c[0]+e[0],0,1),c[1]=this._spatial.clamp(o[1]+e[1],0,1));let l=s.unprojectBasic(o,this._lookatDepth);n.lookat.fromArray(l);let h=a.unprojectBasic(c,this._lookatDepth);r.lookat.fromArray(h)}_updateZoom(e){let t=this._desiredZoom-this._zoom,i=t>0?1:t<0?-1:0;0!==t&&(Math.abs(t)<.002?(this._zoom=this._desiredZoom,null!=this._desiredLookat&&(this._desiredLookat=null)):this._zoom+=i*Math.max(Math.abs(5*e*t),.002))}_updateLookat(e){if(null===this._desiredLookat)return;let t=this._desiredLookat.distanceToSquared(this._currentCamera.lookat);Math.abs(t)<1e-6?(this._currentCamera.lookat.copy(this._desiredLookat),this._desiredLookat=null):this._currentCamera.lookat.lerp(this._desiredLookat,5*e)}_updateRotation(){if(null!=this._requestedRotationDelta){let e=this._rotationDelta.lengthSquared();return this._requestedRotationDelta.lengthSquared()>e?this._rotationDelta.lerp(this._requestedRotationDelta,this._rotationIncreaseAlpha):this._rotationDelta.lerp(this._requestedRotationDelta,this._rotationDecreaseAlpha),void(this._requestedRotationDelta=null)}if(this._rotationDelta.isZero)return;const e=Od(this.currentImage.cameraType)?1:this._alpha;this._rotationDelta.multiply(this._rotationAcceleration*e),this._rotationDelta.threshold(this._rotationThreshold)}_updateRotationBasic(){if(null!=this._requestedBasicRotation){let e=this._basicRotation[0],t=this._basicRotation[1],i=this._requestedBasicRotation[0],n=this._requestedBasicRotation[1];return Math.abs(i)>Math.abs(e)?this._basicRotation[0]=(1-this._rotationIncreaseAlpha)*e+this._rotationIncreaseAlpha*i:this._basicRotation[0]=(1-this._rotationDecreaseAlpha)*e+this._rotationDecreaseAlpha*i,Math.abs(n)>Math.abs(t)?this._basicRotation[1]=(1-this._rotationIncreaseAlpha)*t+this._rotationIncreaseAlpha*n:this._basicRotation[1]=(1-this._rotationDecreaseAlpha)*t+this._rotationDecreaseAlpha*n,void(this._requestedBasicRotation=null)}if(null!=this._requestedBasicRotationUnbounded){let e=this._requestedBasicRotationUnbounded[0],t=this._requestedBasicRotationUnbounded[1];if(Math.abs(e)>0&&(this._basicRotation[0]=(1-this._unboundedRotationAlpha)*this._basicRotation[0]+this._unboundedRotationAlpha*e),Math.abs(t)>0&&(this._basicRotation[1]=(1-this._unboundedRotationAlpha)*this._basicRotation[1]+this._unboundedRotationAlpha*t),null!=this._desiredLookat){let i=this.currentTransform.projectBasic(this._desiredLookat.toArray());i[0]+=e,i[1]+=t,this._desiredLookat=(new ts).fromArray(this.currentTransform.unprojectBasic(i,this._lookatDepth))}this._requestedBasicRotationUnbounded=null}0===this._basicRotation[0]&&0===this._basicRotation[1]||(this._basicRotation[0]=this._rotationAcceleration*this._basicRotation[0],this._basicRotation[1]=this._rotationAcceleration*this._basicRotation[1],Math.abs(this._basicRotation[0])0||this._basicRotation[1]>0)&&(this._basicRotation=[0,0]))}_setDesiredCenter(){if(null==this._desiredCenter)return;let e=(new ts).fromArray(this.currentTransform.unprojectBasic(this._desiredCenter,this._lookatDepth)).sub(this._currentCamera.position);this._currentCamera.lookat.copy(this._currentCamera.position.clone().add(e)),this._previousCamera.lookat.copy(this._previousCamera.position.clone().add(e)),this._desiredCenter=null}_setDesiredZoom(){this._desiredZoom=Od(this._currentImage.cameraType)||null==this._previousImage?this._zoom:0}}class _S extends fS{constructor(e){super(e),this._adjustCameras(),this._motionless=this._motionlessTransition()}prepend(e){super.prepend(e),this._motionless=this._motionlessTransition()}set(e){super.set(e),this._motionless=this._motionlessTransition()}move(e){this._alpha=Math.max(0,Math.min(1,this._alpha+e))}moveTo(e){this._alpha=Math.max(0,Math.min(1,e))}update(e){this._updateRotation(),this._rotationDelta.isZero||(this._applyRotation(this._rotationDelta,this._previousCamera),this._applyRotation(this._rotationDelta,this._currentCamera)),this._updateRotationBasic(),0===this._basicRotation[0]&&0===this._basicRotation[1]||this._applyRotationBasic(this._basicRotation);let t=this._animationSpeed*e/.1*6;this._updateZoom(t),this._updateLookat(t),this._camera.lerpCameras(this._previousCamera,this._currentCamera,this.alpha)}_getAlpha(){return this._motionless?Math.round(this._alpha):this._alpha}_setCurrentCamera(){super._setCurrentCamera(),this._adjustCameras()}_adjustCameras(){if(null!=this._previousImage){if(Od(this._currentImage.cameraType)){let e=this._camera.lookat.clone().sub(this._camera.position);this._currentCamera.lookat.copy(e.clone().add(this._currentCamera.position))}if(Od(this._previousImage.cameraType)){let e=this._currentCamera.lookat.clone().sub(this._currentCamera.position);this._previousCamera.lookat.copy(e.clone().add(this._previousCamera.position))}}}}class MS extends fS{constructor(e){super(e),this._adjustCameras(),this._motionless=this._motionlessTransition(),this._baseAlpha=this._alpha,this._speedCoefficient=1,this._smoothing=!1}append(e){let t=0===this._trajectory.length;t&&this._resetTransition(),super.append(e),t&&(this._setDesiredCenter(),this._setDesiredZoom())}prepend(e){let t=0===this._trajectory.length;t&&this._resetTransition(),super.prepend(e),t&&(this._setDesiredCenter(),this._setDesiredZoom())}set(e){super.set(e),this._desiredLookat=null,this._resetTransition(),this._clearRotation(),this._setDesiredCenter(),this._setDesiredZoom(),this._trajectory.length<3&&(this._smoothing=!0)}setSpeed(e){this._speedCoefficient=this._spatial.clamp(e,0,10)}update(e){1===this._alpha&&this._currentIndex+this._alphae)),this._context$=this._contextOperation$.pipe(Dt(((e,t)=>t(e)),new xS(e,t)),St(1),F()),this._state$=this._context$.pipe(ze((e=>e.state)),dt(),St(1),F()),this._currentState$=this._frame$.pipe(Pt(this._context$,((e,t)=>[e,t])),et((e=>null!=e[1].currentImage)),kt((e=>{e[1].update(this._clock.getDelta())})),ze((e=>({fps:60,id:e[0],state:e[1]}))),It()),this._lastState$=this._currentState$.pipe(St(1),F());let n=this._currentState$.pipe(dt(void 0,(e=>e.state.currentImage.id)),St(1),F()),r=new V;i.push(n.subscribe(r)),this._currentId$=new q(null),i.push(r.pipe(ze((e=>e.state.currentImage.id))).subscribe(this._currentId$)),this._currentImage$=r.pipe(ze((e=>e.state.currentImage)),St(1),F()),this._currentCamera$=r.pipe(ze((e=>e.state.currentCamera)),St(1),F()),this._currentTransform$=r.pipe(ze((e=>e.state.currentTransform)),St(1),F()),this._reference$=r.pipe(ze((e=>e.state.reference)),dt(((e,t)=>e.lat===t.lat&&e.lng===t.lng),(e=>({lat:e.lat,lng:e.lng}))),St(1),F()),this._currentImageExternal$=n.pipe(ze((e=>e.state.currentImage)),St(1),F()),i.push(this._appendImage$.pipe(ze((e=>t=>(t.append([e]),t)))).subscribe(this._contextOperation$)),this._inMotionOperation$=new V,i.push(n.pipe(ze((()=>!0))).subscribe(this._inMotionOperation$)),i.push(this._inMotionOperation$.pipe(dt(),et((e=>e)),zt((()=>this._currentState$.pipe(et((e=>0===e.state.imagesAhead)),ze((e=>[e.state.camera.clone(),e.state.zoom])),wt(),ze((e=>{let t=e[0][0],i=e[1][0],n=e[0][1],r=e[1][1];return t.diff(i)>1e-5||Math.abs(n-r)>1e-5})),vt((e=>!e)))))).subscribe(this._inMotionOperation$)),this._inMotion$=this._inMotionOperation$.pipe(dt(),St(1),F()),this._inTranslationOperation$=new V,i.push(n.pipe(ze((()=>!0))).subscribe(this._inTranslationOperation$)),i.push(this._inTranslationOperation$.pipe(dt(),et((e=>e)),zt((()=>this._currentState$.pipe(et((e=>0===e.state.imagesAhead)),ze((e=>e.state.camera.position.clone())),wt(),ze((e=>0!==e[0].distanceToSquared(e[1]))),vt((e=>!e)))))).subscribe(this._inTranslationOperation$)),this._inTranslation$=this._inTranslationOperation$.pipe(dt(),St(1),F()),i.push(this._state$.subscribe((()=>{}))),i.push(this._currentImage$.subscribe((()=>{}))),i.push(this._currentCamera$.subscribe((()=>{}))),i.push(this._currentTransform$.subscribe((()=>{}))),i.push(this._reference$.subscribe((()=>{}))),i.push(this._currentImageExternal$.subscribe((()=>{}))),i.push(this._lastState$.subscribe((()=>{}))),i.push(this._inMotion$.subscribe((()=>{}))),i.push(this._inTranslation$.subscribe((()=>{}))),this._frameId=null,this._frameGenerator=new uS(window)}get currentState$(){return this._currentState$}get currentImage$(){return this._currentImage$}get currentId$(){return this._currentId$}get currentImageExternal$(){return this._currentImageExternal$}get currentCamera$(){return this._currentCamera$}get currentTransform$(){return this._currentTransform$}get state$(){return this._state$}get reference$(){return this._reference$}get inMotion$(){return this._inMotion$}get inTranslation$(){return this._inTranslation$}get appendImage$(){return this._appendImage$}dispose(){this.stop(),this._subscriptions.unsubscribe()}custom(){this._inMotionOperation$.next(!0),this._invokeContextOperation((e=>{e.custom()}))}earth(){this._inMotionOperation$.next(!0),this._invokeContextOperation((e=>{e.earth()}))}traverse(){this._inMotionOperation$.next(!0),this._invokeContextOperation((e=>{e.traverse()}))}wait(){this._invokeContextOperation((e=>{e.wait()}))}waitInteractively(){this._invokeContextOperation((e=>{e.waitInteractively()}))}appendImagess(e){this._invokeContextOperation((t=>{t.append(e)}))}prependImages(e){this._invokeContextOperation((t=>{t.prepend(e)}))}removeImages(e){this._invokeContextOperation((t=>{t.remove(e)}))}clearImages(){this._invokeContextOperation((e=>{e.clear()}))}clearPriorImages(){this._invokeContextOperation((e=>{e.clearPrior()}))}cutImages(){this._invokeContextOperation((e=>{e.cut()}))}setImages(e){this._invokeContextOperation((t=>{t.set(e)}))}setViewMatrix(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.setViewMatrix(e)}))}rotate(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.rotate(e)}))}rotateUnbounded(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.rotateUnbounded(e)}))}rotateWithoutInertia(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.rotateWithoutInertia(e)}))}rotateBasic(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.rotateBasic(e)}))}rotateBasicUnbounded(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.rotateBasicUnbounded(e)}))}rotateBasicWithoutInertia(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.rotateBasicWithoutInertia(e)}))}rotateToBasic(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.rotateToBasic(e)}))}move(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.move(e)}))}moveTo(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.moveTo(e)}))}dolly(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.dolly(e)}))}orbit(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.orbit(e)}))}truck(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.truck(e)}))}zoomIn(e,t){this._inMotionOperation$.next(!0),this._invokeContextOperation((i=>{i.zoomIn(e,t)}))}getCenter(){return this._lastState$.pipe(vt(),ze((e=>e.state.getCenter())))}getZoom(){return this._lastState$.pipe(vt(),ze((e=>e.state.zoom)))}setCenter(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.setCenter(e)}))}setSpeed(e){this._invokeContextOperation((t=>{t.setSpeed(e)}))}setTransitionMode(e){this._invokeContextOperation((t=>{t.setTransitionMode(e)}))}setZoom(e){this._inMotionOperation$.next(!0),this._invokeContextOperation((t=>{t.setZoom(e)}))}start(){this._clock.start(),null==this._frameId&&(this._start$.next(null),this._frameId=this._frameGenerator.requestAnimationFrame(this._frame.bind(this)),this._frame$.next(this._frameId))}stop(){this._clock.stop(),null!=this._frameId&&(this._frameGenerator.cancelAnimationFrame(this._frameId),this._frameId=null)}_invokeContextOperation(e){this._contextOperation$.next((t=>(e(t),t)))}_frame(){this._frameId=this._frameGenerator.requestAnimationFrame(this._frame.bind(this)),this._frame$.next(this._frameId)}}function wS(e){switch(e){case UT.Custom:return O_.Custom;case UT.Earth:return O_.Earth;case UT.Street:return O_.Traversing;default:return null}}class TS{constructor(e,t,i,n,r,s,a,o){var c;t?this._api=t:e.dataProvider?this._api=new lS(e.dataProvider):this._api=new lS(new ET({accessToken:e.accessToken})),this._graphService=null!=i?i:new hS(new Bd(this.api)),this._loadingName="navigator",this._loadingService=null!=n?n:new aS;const l=null!==(c=e.cameraControls)&&void 0!==c?c:UT.Street;this._stateService=null!=r?r:new bS(wS(l),e.transitionMode),this._cacheService=null!=s?s:new sS(this._graphService,this._stateService,this._api),this._playService=null!=a?a:new yM(this._graphService,this._stateService),this._panService=null!=o?o:new cS(this._graphService,this._stateService,e.combinedPanning),this._idRequested$=new q(null),this._movedToId$=new q(null),this._request$=null,this._requestSubscription=null,this._imageRequestSubscription=null}get api(){return this._api}get cacheService(){return this._cacheService}get graphService(){return this._graphService}get loadingService(){return this._loadingService}get movedToId$(){return this._movedToId$}get panService(){return this._panService}get playService(){return this._playService}get stateService(){return this._stateService}dispose(){this._abortRequest("viewer removed"),this._cacheService.stop(),this._graphService.dispose(),this._panService.dispose(),this._playService.dispose(),this._stateService.dispose()}moveTo$(e){this._abortRequest(`to id ${e}`),this._loadingService.startLoading(this._loadingName);const t=this._moveTo$(e);return this._makeRequest$(t)}moveDir$(e){this._abortRequest(`in dir ${Id[e]}`),this._loadingService.startLoading(this._loadingName);const t=this.stateService.currentImage$.pipe(vt(),Ge((t=>([Id.Next,Id.Prev].indexOf(e)>-1?t.sequenceEdges$:t.spatialEdges$).pipe(vt(),ze((t=>{for(let i of t.edges)if(i.data.direction===e)return i.target;return null}))))),Ge((t=>null==t?(this._loadingService.stopLoading(this._loadingName),De(new Error(`Direction (${e}) does not exist for current image.`))):this._moveTo$(t))));return this._makeRequest$(t)}setFilter$(e){return this._stateService.clearImages(),this._movedToId$.pipe(vt(),Ge((t=>null!=t?this._trajectoryIds$().pipe(Ge((t=>this._graphService.setFilter$(e).pipe(Ge((()=>this._cacheIds$(t)))))),xt()):this._idRequested$.pipe(vt(),Ge((t=>null!=t?this._graphService.setFilter$(e).pipe(Ge((()=>this._graphService.cacheImage$(t)))):this._graphService.setFilter$(e).pipe(ze((()=>{})))))))),ze((()=>{})))}setAccessToken$(e){return this._abortRequest("to set user token"),this._stateService.clearImages(),this._movedToId$.pipe(vt(),kt((()=>{this._api.setAccessToken(e)})),Ge((e=>null==e?this._graphService.reset$([]):this._trajectoryIds$().pipe(Ge((e=>this._graphService.reset$(e).pipe(Ge((()=>this._cacheIds$(e)))))),xt(),ze((()=>{}))))))}_cacheIds$(e){return _e(e.map((e=>this._graphService.cacheImage$(e)))).pipe(He())}_abortRequest(e){null!=this._requestSubscription&&(this._requestSubscription.unsubscribe(),this._requestSubscription=null),null!=this._imageRequestSubscription&&(this._imageRequestSubscription.unsubscribe(),this._imageRequestSubscription=null),null!=this._request$&&(this._request$.isStopped||this._request$.hasError||this._request$.error(new d_(`Request aborted by a subsequent request ${e}.`)),this._request$=null)}_makeRequest$(e){const t=new Q(1);return this._requestSubscription=t.subscribe(void 0,(()=>{})),this._request$=t,this._imageRequestSubscription=e.subscribe((e=>{this._request$=null,t.next(e),t.complete()}),(e=>{this._request$=null,t.error(e)})),t}_moveTo$(e){return this._idRequested$.next(e),this._graphService.cacheImage$(e).pipe(kt((e=>{this._stateService.setImages([e]),this._movedToId$.next(e.id)})),Mt((()=>{this._loadingService.stopLoading(this._loadingName)})))}_trajectoryIds$(){return this._stateService.currentState$.pipe(vt(),ze((e=>e.state.trajectory.map((e=>e.id)))))}}class SS{constructor(e,t){this._spatial=null!=t?t:new zd,this._viewportCoords=null!=e?e:new h_}basicToCanvas(e,t,i,n){return this._viewportCoords.basicToCanvasSafe(e[0],e[1],t,n,i.perspective)}canvasToBasic(e,t,i,n){let r=this._viewportCoords.canvasToBasic(e[0],e[1],t,n,i.perspective);return(r[0]<0||r[0]>1||r[1]<0||r[1]>1)&&(r=null),r}eventToUnprojection(e,t,i,n,r){const s=this._viewportCoords.canvasPosition(e,t);return this.canvasToUnprojection(s,t,i,n,r)}canvasToUnprojection(e,t,i,n,r){const s=e[0],a=e[1],[o,c]=this._viewportCoords.canvasToViewport(s,a,t),l=new ts(o,c,1).unproject(i.perspective);let h=r.projectBasic(l.toArray());(h[0]<0||h[0]>1||h[1]<0||h[1]>1)&&(h=null);const u=l.clone().sub(i.camera.position).normalize(),p=-2/u.z;let d=null;if(p>0&&p<100&&h){const e=u.clone().multiplyScalar(p).add(i.camera.position),[t,r]=Md(e.x,e.y,e.z,n.lng,n.lat,n.alt);d={lat:r,lng:t}}return{basicPoint:h,lngLat:d,pixelPoint:[s,a]}}cameraToLngLat(e,t){const i=e.camera.position,[n,r]=Md(i.x,i.y,i.z,t.lng,t.lat,t.alt);return{lat:r,lng:n}}lngLatToCanvas(e,t,i,n){const r=_d(e.lng,e.lat,0,n.lng,n.lat,n.alt);return this._viewportCoords.projectToCanvasSafe(r,t,i.perspective)}distanceBetweenLngLats(e,t){return this._spatial.distanceFromLngLat(e.lng,e.lat,t.lng,t.lat)}}class NS{constructor(e,t,i){this._subscriptions=new a_,this._emitSubscriptions=new a_,this._container=i,this._viewer=e,this._navigator=t,this._projection=new SS,this._started=!1,this._navigable$=new V;const n=this._subscriptions;n.push(this._navigable$.subscribe((e=>{const t="navigable",i={navigable:e,target:this._viewer,type:t};this._viewer.fire(t,i)}))),n.push(this._navigator.loadingService.loading$.subscribe((e=>{const t="dataloading",i={loading:e,target:this._viewer,type:t};this._viewer.fire(t,i)}))),n.push(this._container.glRenderer.opaqueRender$.pipe(vt()).subscribe((()=>{const e="load",t={target:this._viewer,type:e};this._viewer.fire(e,t)})))}get started(){return this._started}get navigable$(){return this._navigable$}get projection(){return this._projection}dispose(){this.stopEmit(),this._subscriptions.unsubscribe()}project$(e){return $e(this._container.renderService.renderCamera$,this._navigator.stateService.currentImage$,this._navigator.stateService.reference$).pipe(vt(),ze((([t,i,n])=>{if(this._projection.distanceBetweenLngLats(e,i.lngLat)>1e3)return null;const r=this._projection.lngLatToCanvas(e,this._container.container,t,n);return r?[Math.round(r[0]),Math.round(r[1])]:null})))}projectBasic$(e){return $e(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$).pipe(vt(),ze((([t,i])=>{const n=this._projection.basicToCanvas(e,this._container.container,t,i);return n?[Math.round(n[0]),Math.round(n[1])]:null})))}startEmit(){if(this._started)return;this._started=!0;const e=this._emitSubscriptions;e.push(this._navigator.stateService.currentImageExternal$.subscribe((e=>{const t="image",i={image:e,target:this._viewer,type:t};this._viewer.fire(t,i)}))),e.push(this._navigator.stateService.currentImageExternal$.pipe(zt((e=>e.sequenceEdges$))).subscribe((e=>{const t="sequenceedges",i={status:e,target:this._viewer,type:t};this._viewer.fire(t,i)}))),e.push(this._navigator.stateService.currentImageExternal$.pipe(zt((e=>e.spatialEdges$))).subscribe((e=>{const t="spatialedges",i={status:e,target:this._viewer,type:t};this._viewer.fire(t,i)}))),e.push(this._navigator.stateService.reference$.subscribe((e=>{const t="reference",i={reference:e,target:this._viewer,type:t};this._viewer.fire(t,i)}))),e.push($e(this._navigator.stateService.inMotion$,this._container.mouseService.active$,this._container.touchService.active$).pipe(ze((e=>e[0]||e[1]||e[2])),dt()).subscribe((e=>{const t=e?"movestart":"moveend",i={target:this._viewer,type:t};this._viewer.fire(t,i)}))),e.push(this._container.renderService.bearing$.pipe(it(100),dt(((e,t)=>Math.abs(t-e)<1))).subscribe((e=>{const t="bearing",i={bearing:e,target:this._viewer,type:t};this._viewer.fire(t,i)})));const t=this._container.mouseService.active$.pipe(zt((e=>e?re():this._container.mouseService.mouseMove$)));e.push(Je(this._mapMouseEvent$("click",this._container.mouseService.staticClick$),this._mapMouseEvent$("contextmenu",this._container.mouseService.contextMenu$),this._mapMouseEvent$("dblclick",this._container.mouseService.dblClick$),this._mapMouseEvent$("mousedown",this._container.mouseService.mouseDown$),this._mapMouseEvent$("mousemove",t),this._mapMouseEvent$("mouseout",this._container.mouseService.mouseOut$),this._mapMouseEvent$("mouseover",this._container.mouseService.mouseOver$),this._mapMouseEvent$("mouseup",this._container.mouseService.mouseUp$)).pipe(Pt(this._container.renderService.renderCamera$,this._navigator.stateService.reference$,this._navigator.stateService.currentTransform$,this._navigator.stateService.state$),ze((([[e,t],i,n,r,s])=>{const a=this._projection.eventToUnprojection(t,this._container.container,i,n,r);return{basicPoint:s===O_.Traversing?a.basicPoint:null,lngLat:a.lngLat,originalEvent:t,pixelPoint:a.pixelPoint,target:this._viewer,type:e}}))).subscribe((e=>{this._viewer.fire(e.type,e)}))),e.push(this._container.renderService.renderCamera$.pipe(dt((([e,t],[i,n])=>this._closeTo(e,i,.01)&&this._closeTo(t,n,.01)),(e=>e.camera.position.toArray()))).subscribe((()=>{const e="position",t={target:this._viewer,type:e};this._viewer.fire(e,t)}))),e.push(this._container.renderService.renderCamera$.pipe(dt((([e,t],[i,n])=>this._closeTo(e,i,.001)&&this._closeTo(t,n,.001)),(e=>[e.rotation.phi,e.rotation.theta]))).subscribe((()=>{const e={target:this._viewer,type:"pov"};this._viewer.fire("pov",e)}))),e.push(this._container.renderService.renderCamera$.pipe(dt(((e,t)=>this._closeTo(e,t,.01)),(e=>e.perspective.fov))).subscribe((()=>{const e={target:this._viewer,type:"fov"};this._viewer.fire("fov",e)})))}stopEmit(){this.started&&(this._emitSubscriptions.unsubscribe(),this._started=!1)}unproject$(e){return $e(this._container.renderService.renderCamera$,this._navigator.stateService.reference$,this._navigator.stateService.currentTransform$).pipe(vt(),ze((([t,i,n])=>this._projection.canvasToUnprojection(e,this._container.container,t,i,n).lngLat)))}unprojectBasic$(e){return $e(this._container.renderService.renderCamera$,this._navigator.stateService.currentTransform$).pipe(vt(),ze((([t,i])=>this._projection.canvasToBasic(e,this._container.container,t,i))))}_closeTo(e,t,i){return Math.abs(e-t)<=i}_mapMouseEvent$(e,t){return t.pipe(ze((t=>[e,t])))}}class DS{constructor(e,t){this._container=e,this._navigator=t,this._renderers={}}add(e,t){const i=new a_;this._renderers[e.id]={subs:i,renderer:e},i.push($e([this._container.glRenderer.webGLRenderer$,this._navigator.stateService.reference$]).pipe(pt(1)).subscribe((([i,n])=>{e.onAdd(t,n,i.getContext())}))),i.push(this._container.glRenderer.opaqueRender$.pipe(Pt(this._container.renderService.renderCamera$,this._container.glRenderer.webGLRenderer$)).subscribe((([,t,i])=>{const n=i.getContext(),r=t.perspective.matrixWorldInverse,s=t.perspective.projectionMatrix;e.render(n,r.toArray(),s.toArray())}))),i.push(this._navigator.stateService.reference$.pipe(At(1)).subscribe((i=>{e.onReference(t,i)})))}dispose(e){for(const t of Object.keys(this._renderers))this.remove(t,e)}has(e){return e in this._renderers}remove(e,t){this._renderers[e].subs.unsubscribe();const i=this._renderers[e].renderer;delete this._renderers[e],this._container.glRenderer.webGLRenderer$.subscribe((e=>{i.onRemove(t,e.getContext())}))}}class IS{constructor(e,t){this._container=e,this._navigator=t,this._controls=null,this._subscriptions=new a_}attach(e,t){if(this._controls)throw new Ed("Custom camera controls already attached");this._controls=e;const i=new V,n=i.pipe(zt((()=>this._navigator.stateService.state$)),ze((e=>e===O_.Custom)),dt()),r=this._subscriptions;r.push(n.pipe(Lt(!1),wt(),Pt(this._navigator.stateService.reference$,this._container.renderService.renderCamera$)).subscribe((([[i,n],r,s])=>{n?e.onActivate(t,s.perspective.matrixWorldInverse.toArray(),s.perspective.projectionMatrix.toArray(),r):i&&e.onDeactivate(t)}))),r.push(n.pipe(zt((e=>e?this._navigator.stateService.currentState$.pipe(At(1)):re()))).subscribe((i=>{e.onAnimationFrame(t,i.id)}))),r.push(n.pipe(zt((e=>e?this._navigator.stateService.reference$.pipe(At(1)):re()))).subscribe((i=>e.onReference(t,i)))),r.push(n.pipe(zt((e=>e?this._container.renderService.size$.pipe(At(1)):re()))).subscribe((()=>e.onResize(t)))),r.push($e([this._container.glRenderer.webGLRenderer$,this._container.renderService.renderCamera$,this._navigator.stateService.reference$,this._navigator.stateService.state$]).pipe(vt()).subscribe((()=>{e.onAttach(t,(t=>{this._controls&&e===this._controls&&this._updateViewMatrix(t)}),(t=>{this._controls&&e===this._controls&&this._updateProjectionMatrix(t)})),i.next(),i.complete()})))}detach(e){const t=this._controls;return this._controls=null,this._subscriptions.unsubscribe(),new Promise((i=>{this._navigator.stateService.state$.pipe(pt(1)).subscribe((n=>{t?(n===O_.Custom&&t.onDeactivate(e),t.onDetach(e),i(t)):i(null)}))}))}dispose(e){this.detach(e)}has(e){return!!this._controls&&e===this._controls}_updateProjectionMatrix(e){this._navigator.stateService.state$.pipe(vt()).subscribe((t=>{if(t===O_.Custom)this._container.renderService.projectionMatrix$.next(e);else{const e="Incorrect camera control mode for projection matrix update";console.warn(e)}}))}_updateViewMatrix(e){this._navigator.stateService.state$.pipe(vt()).subscribe((t=>{if(t===O_.Custom)this._navigator.stateService.setViewMatrix(e);else{const e="Incorrect camera control mode for view matrix update";console.warn(e)}}))}}class CS extends s_{constructor(e){super(),this._navigator=new TS(e),this._container=new rS(e,this._navigator.stateService),this._observer=new NS(this,this._navigator,this._container),this._componentController=new GT(this._container,this._navigator,this._observer,e.imageId,e.component),this._customRenderer=new DS(this._container,this._navigator),this._customCameraControls=new IS(this._container,this._navigator)}get dataProvider(){return this._navigator.api.data}get isNavigable(){return this._componentController.navigable}activateCombinedPanning(){this._navigator.panService.enable()}activateComponent(e){this._componentController.activate(e)}activateCover(){this._componentController.activateCover()}addCustomRenderer(e){this._customRenderer.add(e,this)}attachCustomCameraControls(e){this._customCameraControls.attach(e,this)}deactivateCombinedPanning(){this._navigator.panService.disable()}deactivateComponent(e){this._componentController.deactivate(e)}deactivateCover(){this._componentController.deactivateCover()}detachCustomCameraControls(){return this._customCameraControls.detach(this)}fire(e,t){super.fire(e,t)}getBearing(){return new Promise(((e,t)=>{this._container.renderService.bearing$.pipe(vt()).subscribe((t=>{e(t)}),(e=>{t(e)}))}))}getCameraControls(){return new Promise(((e,t)=>{this._navigator.stateService.state$.pipe(vt()).subscribe((t=>{switch(t){case O_.Custom:e(UT.Custom);break;case O_.Earth:e(UT.Earth);break;default:e(UT.Street)}}),(e=>{t(e)}))}))}getCanvas(){return this._container.canvas}getCanvasContainer(){return this._container.canvasContainer}getCenter(){return new Promise(((e,t)=>{this._navigator.stateService.getCenter().subscribe((t=>{e(t)}),(e=>{t(e)}))}))}getComponent(e){return this._componentController.get(e)}getContainer(){return this._container.container}getFieldOfView(){return new Promise(((e,t)=>{this._container.renderService.renderCamera$.pipe(vt()).subscribe((t=>{e(t.perspective.fov)}),(e=>{t(e)}))}))}getImage(){return new Promise(((e,t)=>{this._navigator.stateService.currentImage$.pipe(vt()).subscribe((t=>{e(t)}),(e=>{t(e)}))}))}getPointOfView(){return new Promise(((e,t)=>{$e(this._container.renderService.renderCamera$,this._container.renderService.bearing$).pipe(vt()).subscribe((([t,i])=>{e({bearing:i,tilt:t.getTilt()})}),(e=>{t(e)}))}))}getPosition(){return new Promise(((e,t)=>{$e(this._container.renderService.renderCamera$,this._navigator.stateService.reference$).pipe(vt()).subscribe((([t,i])=>{e(this._observer.projection.cameraToLngLat(t,i))}),(e=>{t(e)}))}))}getReference(){return new Promise(((e,t)=>{this._navigator.stateService.reference$.pipe(vt()).subscribe((t=>{e(t)}),(e=>{t(e)}))}))}getZoom(){return new Promise(((e,t)=>{this._navigator.stateService.getZoom().subscribe((t=>{e(t)}),(e=>{t(e)}))}))}hasCustomCameraControls(e){return this._customCameraControls.has(e)}hasCustomRenderer(e){return this._customRenderer.has(e)}moveDir(e){const t=this.isNavigable?this._navigator.moveDir$(e):De(new Error("Calling moveDir is not supported when viewer is not navigable."));return new Promise(((e,i)=>{t.subscribe((t=>{e(t)}),(e=>{i(e)}))}))}moveTo(e){const t=this.isNavigable?this._navigator.moveTo$(e):De(new Error("Calling moveTo is not supported when viewer is not navigable."));return new Promise(((e,i)=>{t.subscribe((t=>{e(t)}),(e=>{i(e)}))}))}off(e,t){super.off(e,t)}on(e,t){super.on(e,t)}project(e){return new Promise(((t,i)=>{this._observer.project$(e).subscribe((e=>{t(e)}),(e=>{i(e)}))}))}projectFromBasic(e){return new Promise(((t,i)=>{this._observer.projectBasic$(e).subscribe((e=>{t(e)}),(e=>{i(e)}))}))}remove(){this._customRenderer.dispose(this),this._customCameraControls.dispose(this),this._observer.dispose(),this._componentController.remove(),this._navigator.dispose(),this._container.remove();const e="remove",t={target:this,type:e};this.fire(e,t)}removeCustomRenderer(e){this._customRenderer.remove(e,this)}resize(){this._container.renderService.resize$.next()}setCameraControls(e){const t=wS(e);t===O_.Traversing?this._navigator.stateService.traverse():t===O_.Earth?this._navigator.stateService.earth():t===O_.Custom?this._navigator.stateService.custom():console.warn(`Unsupported camera control transition (${e})`)}setCenter(e){this._navigator.stateService.setCenter(e)}setFieldOfView(e){this._container.renderService.renderCamera$.pipe(vt()).subscribe((t=>{const i=t.fovToZoom(e);this._navigator.stateService.setZoom(i)}))}setFilter(e){return new Promise(((t,i)=>{this._navigator.setFilter$(e).subscribe((()=>{t(void 0)}),(e=>{i(e)}))}))}setRenderMode(e){this._container.renderService.renderMode$.next(e)}setTransitionMode(e){this._navigator.stateService.setTransitionMode(e)}setAccessToken(e){const t=this.isNavigable?this._navigator.setAccessToken$(e):De(new Error("Calling setAccessToken is not supported when viewer is not navigable."));return new Promise(((e,i)=>{t.subscribe((()=>{e(void 0)}),(e=>{i(e)}))}))}setZoom(e){this._navigator.stateService.setZoom(e)}triggerRerender(){this._container.glRenderer.triggerRerender()}unproject(e){return new Promise(((t,i)=>{this._observer.unproject$(e).subscribe((e=>{t(e)}),(e=>{i(e)}))}))}unprojectToBasic(e){return new Promise(((t,i)=>{this._observer.unprojectBasic$(e).subscribe((e=>{t(e)}),(e=>{i(e)}))}))}}Bd.register(og),Fd.register(og),cg.registerCover(c_),cg.register(l_),cg.register(u_),cg.register(p_),cg.register(f_),cg.register(F_),cg.register(W_),cg.register(Z_),cg.register(uM),cg.register(dM),cg.register(mM),cg.register(vM),cg.register(UM),cg.register(Ky),cg.register(ex),cg.register(tx),cg.register(ix)},684016:(e,t,i)=>{"use strict";var n=i(893379),r=i.n(n),s=i(201910);r()(s.Z,{insert:"head",singleton:!1}),s.Z.locals}}]); \ No newline at end of file diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1151.d9401ba7a3b8a01b0d22.chunk.js.LICENSE.txt b/geonode_mapstore_client/static/mapstore/dist/js/1151.127e6ba55a24dde58fd9.chunk.js.LICENSE.txt similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1151.d9401ba7a3b8a01b0d22.chunk.js.LICENSE.txt rename to geonode_mapstore_client/static/mapstore/dist/js/1151.127e6ba55a24dde58fd9.chunk.js.LICENSE.txt diff --git a/geonode_mapstore_client/static/mapstore/dist/js/11671.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/11671.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/11671.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/11671.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/11699.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/11699.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/11699.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/11699.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1174.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1174.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1174.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1174.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/11915.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/11915.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/11915.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/11915.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/11932.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/11932.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/11932.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/11932.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/120.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/120.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/120.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/120.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12020.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12020.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12020.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12020.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12050.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12050.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12050.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12050.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12064.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12064.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12064.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12064.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12151.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12151.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12151.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12151.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12157.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12157.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12157.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12157.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12290.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12290.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12290.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12290.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1230.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1230.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1230.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1230.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12474.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12474.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12474.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12474.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12485.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12485.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12485.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12485.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12542.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12542.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12542.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12542.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12574.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12574.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12574.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12574.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12594.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12594.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12594.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12594.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1269.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1269.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1269.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1269.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1274.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1274.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1274.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1274.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/12831.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/12831.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/12831.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/12831.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1303.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1303.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1303.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1303.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/13261.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/13261.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/13261.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/13261.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/13265.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/13265.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/13265.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/13265.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/13268.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/13268.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/13268.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/13268.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/13324.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/13324.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/13324.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/13324.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/13434.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/13434.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/13434.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/13434.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/13447.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/13447.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/13447.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/13447.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/13579.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/13579.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/13579.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/13579.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/13581.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/13581.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/13581.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/13581.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14195.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14195.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14195.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14195.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14312.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14312.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14312.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14312.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14327.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14327.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14327.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14327.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14361.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14361.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14361.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14361.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14381.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14381.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14381.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14381.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1444.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1444.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1444.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1444.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14502.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14502.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14502.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14502.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14742.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14742.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14742.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14742.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14763.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14763.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14763.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14763.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/14801.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/14801.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/14801.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/14801.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/15007.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/15007.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/15007.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/15007.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/15081.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/15081.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/15081.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/15081.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/15199.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/15199.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/15199.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/15199.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/15245.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/15245.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/15245.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/15245.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/15504.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/15504.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/15504.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/15504.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/15574.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/15574.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/15574.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/15574.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/15639.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/15639.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/15639.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/15639.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1567.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1567.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1567.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1567.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1577.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1577.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1577.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1577.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/15910.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/15910.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/15910.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/15910.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16072.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16072.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16072.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16072.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16095.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16095.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16095.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16095.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16144.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16144.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16144.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16144.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16231.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16231.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16231.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16231.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16262.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16262.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16262.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16262.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16272.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16272.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16272.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16272.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16290.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16290.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16290.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16290.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1630.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1630.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1630.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1630.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16375.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16375.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16375.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16375.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16410.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16410.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16410.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16410.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16425.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16425.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16425.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16425.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1649.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1649.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1649.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1649.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16684.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16684.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16684.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16684.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/16841.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/16841.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/16841.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/16841.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/17009.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/17009.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/17009.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/17009.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1706.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1706.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1706.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1706.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/17208.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/17208.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/17208.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/17208.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/17555.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/17555.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/17555.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/17555.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/17581.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/17581.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/17581.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/17581.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/17704.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/17704.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/17704.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/17704.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/17775.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/17775.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/17775.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/17775.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/17809.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/17809.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/17809.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/17809.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18034.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18034.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18034.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18034.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18132.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18132.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18132.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18132.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18274.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18274.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18274.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18274.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18353.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18353.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18353.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18353.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18397.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18397.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18397.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18397.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18414.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18414.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18414.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18414.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18453.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18453.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18453.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18453.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18672.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18672.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18672.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18672.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18733.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18733.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18733.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18733.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18812.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18812.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18812.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18812.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/18829.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/18829.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/18829.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/18829.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19008.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19008.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19008.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19008.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19018.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19018.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19018.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19018.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19132.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19132.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19132.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19132.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19154.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19154.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19154.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19154.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19333.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19333.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19333.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19333.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19337.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19337.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19337.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19337.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/1947.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/1947.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/1947.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/1947.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19717.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19717.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19717.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19717.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19902.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19902.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19902.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19902.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/19920.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/19920.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/19920.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/19920.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20090.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20090.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20090.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20090.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20154.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20154.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20154.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20154.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20202.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20202.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20202.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20202.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20218.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20218.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20218.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20218.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20279.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20279.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20279.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20279.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20355.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20355.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20355.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20355.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20391.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20391.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20391.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20391.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20447.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20447.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20447.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20447.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20516.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20516.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20516.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20516.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20518.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20518.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20518.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20518.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20523.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20523.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20523.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20523.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20689.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20689.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20689.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20689.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20724.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20724.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20724.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20724.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/20810.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/20810.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/20810.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/20810.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21082.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21082.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21082.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21082.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21092.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21092.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21092.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21092.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21342.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21342.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21342.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21342.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21364.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21364.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21364.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21364.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21379.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21379.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21379.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21379.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21431.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21431.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21431.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21431.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21611.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21611.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21611.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21611.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21646.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21646.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21646.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21646.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21672.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21672.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21672.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21672.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21689.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21689.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21689.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21689.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21706.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21706.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21706.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21706.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21869.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21869.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21869.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21869.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21886.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21886.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21886.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21886.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/21951.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/21951.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/21951.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/21951.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22010.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22010.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22010.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22010.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22079.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22079.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22079.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22079.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22091.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22091.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22091.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22091.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22149.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22149.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22149.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22149.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22229.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22229.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22229.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22229.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22320.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22320.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22320.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22320.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22340.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22340.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22340.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22340.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22343.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22343.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22343.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22343.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22394.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22394.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22394.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22394.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22426.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22426.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22426.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22426.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22466.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22466.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22466.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22466.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22589.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22589.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22589.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22589.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22685.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22685.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22685.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22685.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22861.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22861.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22861.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22861.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22882.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22882.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22882.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22882.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22938.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22938.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22938.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22938.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2294.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/2294.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/2294.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/2294.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/22990.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/22990.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/22990.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/22990.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23330.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23330.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23330.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23330.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23456.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23456.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23456.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23456.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23474.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23474.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23474.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23474.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23541.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23541.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23541.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23541.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23583.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23583.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23583.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23583.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23663.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23663.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23663.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23663.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23677.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23677.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23677.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23677.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23751.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23751.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23751.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23751.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/23801.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/23801.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/23801.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/23801.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24034.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24034.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24034.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24034.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24111.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24111.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24111.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24111.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24226.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24226.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24226.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24226.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24371.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24371.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24371.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24371.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24562.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24562.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24562.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24562.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24592.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24592.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24592.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24592.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2461.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/2461.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/2461.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/2461.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24693.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24693.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24693.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24693.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24794.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24794.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24794.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24794.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24850.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24850.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24850.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24850.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24896.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24896.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24896.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24896.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2495.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/2495.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/2495.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/2495.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/24968.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/24968.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/24968.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/24968.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25088.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25088.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25088.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25088.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25134.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25134.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25134.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25134.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25243.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25243.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25243.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25243.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25250.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25250.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25250.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25250.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25339.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25339.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25339.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25339.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25352.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25352.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25352.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25352.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25450.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25450.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25450.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25450.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25574.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25574.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25574.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25574.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25594.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25594.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25594.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25594.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25678.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25678.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25678.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25678.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2568.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/2568.127e6ba55a24dde58fd9.chunk.js similarity index 98% rename from geonode_mapstore_client/static/mapstore/dist/js/2568.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/2568.127e6ba55a24dde58fd9.chunk.js index 4e48b3a0b1..31f885ef6c 100644 --- a/geonode_mapstore_client/static/mapstore/dist/js/2568.d9401ba7a3b8a01b0d22.chunk.js +++ b/geonode_mapstore_client/static/mapstore/dist/js/2568.127e6ba55a24dde58fd9.chunk.js @@ -1,2 +1,2 @@ -/*! For license information please see 2568.d9401ba7a3b8a01b0d22.chunk.js.LICENSE.txt */ +/*! For license information please see 2568.127e6ba55a24dde58fd9.chunk.js.LICENSE.txt */ (self.webpackChunkgeonode_mapstore_client=self.webpackChunkgeonode_mapstore_client||[]).push([[2568],{540487:r=>{var n={utf8:{stringToBytes:function(r){return n.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(n.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var n=[],t=0;t{var n,t;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(r,n){return r<>>32-n},rotr:function(r,n){return r<<32-n|r>>>n},endian:function(r){if(r.constructor==Number)return 16711935&t.rotl(r,8)|4278255360&t.rotl(r,24);for(var n=0;n0;r--)n.push(Math.floor(256*Math.random()));return n},bytesToWords:function(r){for(var n=[],t=0,e=0;t>>5]|=r[t]<<24-e%32;return n},wordsToBytes:function(r){for(var n=[],t=0;t<32*r.length;t+=8)n.push(r[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(r){for(var n=[],t=0;t>>4).toString(16)),n.push((15&r[t]).toString(16));return n.join("")},hexToBytes:function(r){for(var n=[],t=0;t>>6*(3-u)&63)):t.push("=");return t.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],e=0,o=0;e>>6-2*o);return t}},r.exports=t},848738:r=>{function n(r){return!!r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)}r.exports=function(r){return null!=r&&(n(r)||function(r){return"function"==typeof r.readFloatLE&&"function"==typeof r.slice&&n(r.slice(0,0))}(r)||!!r._isBuffer)}},402568:(r,n,t)=>{var e,o,u,i,s;e=t(971012),o=t(540487).utf8,u=t(848738),i=t(540487).bin,(s=function(r,n){r.constructor==String?r=n&&"binary"===n.encoding?i.stringToBytes(r):o.stringToBytes(r):u(r)?r=Array.prototype.slice.call(r,0):Array.isArray(r)||r.constructor===Uint8Array||(r=r.toString());for(var t=e.bytesToWords(r),f=8*r.length,a=1732584193,c=-271733879,h=-1732584194,g=271733878,l=0;l>>24)|4278255360&(t[l]<<24|t[l]>>>8);t[f>>>5]|=128<>>9<<4)]=f;var p=s._ff,y=s._gg,v=s._hh,d=s._ii;for(l=0;l>>0,c=c+T>>>0,h=h+B>>>0,g=g+_>>>0}return e.endian([a,c,h,g])})._ff=function(r,n,t,e,o,u,i){var s=r+(n&t|~n&e)+(o>>>0)+i;return(s<>>32-u)+n},s._gg=function(r,n,t,e,o,u,i){var s=r+(n&e|t&~e)+(o>>>0)+i;return(s<>>32-u)+n},s._hh=function(r,n,t,e,o,u,i){var s=r+(n^t^e)+(o>>>0)+i;return(s<>>32-u)+n},s._ii=function(r,n,t,e,o,u,i){var s=r+(t^(n|~e))+(o>>>0)+i;return(s<>>32-u)+n},s._blocksize=16,s._digestsize=16,r.exports=function(r,n){if(null==r)throw new Error("Illegal argument "+r);var t=e.wordsToBytes(s(r,n));return n&&n.asBytes?t:n&&n.asString?i.bytesToString(t):e.bytesToHex(t)}}}]); \ No newline at end of file diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2568.d9401ba7a3b8a01b0d22.chunk.js.LICENSE.txt b/geonode_mapstore_client/static/mapstore/dist/js/2568.127e6ba55a24dde58fd9.chunk.js.LICENSE.txt similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/2568.d9401ba7a3b8a01b0d22.chunk.js.LICENSE.txt rename to geonode_mapstore_client/static/mapstore/dist/js/2568.127e6ba55a24dde58fd9.chunk.js.LICENSE.txt diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25722.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25722.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25722.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25722.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25734.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25734.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25734.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25734.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25750.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25750.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25750.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25750.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25772.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25772.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25772.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25772.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25972.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25972.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25972.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25972.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25993.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25993.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25993.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25993.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/25996.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/25996.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/25996.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/25996.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2607.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/2607.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/2607.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/2607.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26080.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26080.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26080.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26080.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26123.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26123.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26123.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26123.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2629.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/2629.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/2629.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/2629.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26374.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26374.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26374.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26374.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26411.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26411.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26411.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26411.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26417.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26417.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26417.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26417.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26483.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26483.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26483.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26483.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26532.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26532.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26532.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26532.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26580.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26580.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26580.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26580.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26597.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26597.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26597.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26597.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/26921.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/26921.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/26921.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/26921.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27004.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27004.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27004.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27004.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27111.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27111.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27111.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27111.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27157.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27157.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27157.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27157.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27308.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27308.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27308.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27308.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27311.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27311.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27311.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27311.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27412.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27412.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27412.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27412.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27414.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27414.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27414.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27414.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27431.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27431.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27431.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27431.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27508.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27508.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27508.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27508.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27529.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27529.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27529.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27529.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2753.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/2753.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/2753.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/2753.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/2764.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/2764.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/2764.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/2764.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27646.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27646.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27646.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27646.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27703.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27703.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27703.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27703.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27870.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27870.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27870.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27870.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27943.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27943.127e6ba55a24dde58fd9.chunk.js similarity index 100% rename from geonode_mapstore_client/static/mapstore/dist/js/27943.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27943.127e6ba55a24dde58fd9.chunk.js diff --git a/geonode_mapstore_client/static/mapstore/dist/js/27962.d9401ba7a3b8a01b0d22.chunk.js b/geonode_mapstore_client/static/mapstore/dist/js/27962.127e6ba55a24dde58fd9.chunk.js similarity index 99% rename from geonode_mapstore_client/static/mapstore/dist/js/27962.d9401ba7a3b8a01b0d22.chunk.js rename to geonode_mapstore_client/static/mapstore/dist/js/27962.127e6ba55a24dde58fd9.chunk.js index d05b883dc6..b35ea34a15 100644 --- a/geonode_mapstore_client/static/mapstore/dist/js/27962.d9401ba7a3b8a01b0d22.chunk.js +++ b/geonode_mapstore_client/static/mapstore/dist/js/27962.127e6ba55a24dde58fd9.chunk.js @@ -1,2 +1,2 @@ -/*! For license information please see 27962.d9401ba7a3b8a01b0d22.chunk.js.LICENSE.txt */ +/*! For license information please see 27962.127e6ba55a24dde58fd9.chunk.js.LICENSE.txt */ (self.webpackChunkgeonode_mapstore_client=self.webpackChunkgeonode_mapstore_client||[]).push([[27962,82582,65417],{169819:(e,t,n)=>{"use strict";n.d(t,{Z:()=>me});var i=n(809980),r=n.n(i),o=n(900011),a=n.n(o),s=n(250840),c=n.n(s),u=n(857023),l=n.n(u),p=n(623115),d=n(902299),h=n(532056),f=n(638601),m=n(714233),g=n(11020),b=n(660904),v=n(765153),y=n(700234),x=n(835189),k=n(732292),w=n(405254),_=n(143450),C=n(518931),E=n(998537),A=n(659635),D=n(762031),T=n(339079),S=n(344485),M=n(720794),L=n(282910),F=/(.|\s)*<\/html>/im,P=new(r())({html:!0,linkify:!0});P.use(a(),{imageClass:"",removeUnbalanced:!1,removeUnknown:!1});var I={register:function(e){var t=e;t.bindingHandlers.markdown={init:function(){return{controlsDescendantBindings:!0}},update:function(e,n){for(var i=e;i.firstChild;)t.removeNode(i.firstChild);var r,o=t.unwrap(n());r=F.test(o)?o:P.render(o);var a=t.utils.parseHtmlFragment(r,i);i.className=i.className+" markdown";for(var s=0;s0)for(var n=0;n=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},t.radiansToLength=l,t.lengthToRadians=p,t.lengthToDegrees=function(e,t){return d(p(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=d,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return l(p(e,t),n)},t.convertArea=function(e,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(e>=0))throw new Error("area must be a positive number");var r=t.areaFactors[n];if(!r)throw new Error("invalid original units");var o=t.areaFactors[i];if(!o)throw new Error("invalid final units");return e/r*o},t.isNumber=h,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!h(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")},t.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},t.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},t.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},t.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},t.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},t.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},t.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}}(O={exports:{}},O.exports),O.exports);(q=B)&&q.__esModule&&Object.prototype.hasOwnProperty.call(q,"default")&&q.default,B.earthRadius,B.factors,B.unitsFactors,B.areaFactors,B.feature,B.geometry,B.point,B.points,B.polygon,B.polygons,B.lineString,B.lineStrings,B.featureCollection,B.multiLineString,B.multiPoint,B.multiPolygon,B.geometryCollection,B.round,B.radiansToLength,B.lengthToRadians,B.lengthToDegrees,B.bearingToAzimuth,B.radiansToDegrees,B.degreesToRadians;var Z=B.convertLength,j=(B.convertArea,B.isNumber,B.isObject,B.validateBBox,B.validateId,B.radians2degrees,B.degrees2radians,B.distanceToDegrees,B.distanceToRadians,B.radiansToDistance,B.bearingToAngle,B.convertDistance,new h.Z),V=new f.Z;function $(e,t,n){var i=n,r=e.scene,o=r.camera;if(r.mode!==m.Z.MORPHING&&((0,g.Z)(i)||(i=new b.Z),(0,g.Z)(e.trackedEntity)?i=e.trackedEntity.position.getValue(e.clock.currentTime,i):(V.origin=o.positionWC,V.direction=o.directionWC,i=r.globe.pick(V,r,i)),(0,g.Z)(i)))return r.mode===m.Z.SCENE2D||r.mode===m.Z.COLUMBUS_VIEW?(i=o.worldToCameraCoordinatesPoint(i,i),t&&(i=r.globe.ellipsoid.cartographicToCartesian(r.mapProjection.unproject(i,j),i))):t||(i=o.worldToCameraCoordinatesPoint(i,i)),i}var U={meters:"m",millimeters:"mm",centimeters:"cm",kilometers:"km",acres:"ac",miles:"mi",nauticalmiles:"nm",inches:"inch",yards:"yd",feet:"ft",radians:"rad",degrees:"deg"};function H(e,t){var n=1;return e<1&&(n=2,"kilometers"===t&&(e=Z(e,"kilometers",t="meters"))),e.toFixed(n)+" "+U[t]}function W(e){if(!(0,g.Z)(e)||!(0,g.Z)(e.terria))throw new v.Z("options.terria is required.");this.terria=e.terria,this._removeSubscription=void 0,this._lastLegendUpdate=void 0,this.eventHelper=new y.Z,this.distanceLabel=void 0,this.barWidth=void 0,this.enableDistanceLegend=!(0,g.Z)(e.enableDistanceLegend)||e.enableDistanceLegend,l().track(this,["distanceLabel","barWidth"]),this.eventHelper.add(this.terria.afterWidgetChanged,(function(){(0,g.Z)(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0)}),this);var t=this;function n(){if((0,g.Z)(t.terria)){var n=t.terria.scene;t._removeSubscription=n.postRender.addEventListener((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.units,r=void 0===i?"kilometers":i,o=n.distanceLabelFormatter,a=void 0===o?H:o,s=e;if(!s.enableDistanceLegend)return s.barWidth=void 0,void(s.distanceLabel=void 0);var c=(0,k.Z)();if(!(c=0;--_)G[_]/y<100&&(x=G[_]);if((0,g.Z)(x)){var C=a(Z(x,"meters",r),r);s.barWidth=x/y|0,s.distanceLabel=C}else s.barWidth=void 0,s.distanceLabel=void 0}}(this,n,e)}),t)}}n(),this.eventHelper.add(this.terria.afterWidgetChanged,(function(){n()}),this)}W.prototype.destroy=function(){this.eventHelper.removeAll()},W.prototype.show=function(e){N(this.enableDistanceLegend?'
':'',e,this)},W.create=function(e){var t=new W(e);return t.show(e.container),t};var Y=new x.Z,G=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];function X(e){if(!(0,g.Z)(e))throw new v.Z("terria is required");this._terria=e,this.name="Unnamed Control",this.text=void 0,this.svgIcon=void 0,this.svgHeight=void 0,this.svgWidth=void 0,this.cssClass=void 0,this.isActive=!1,l().track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])}Object.defineProperties(X.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return(0,g.Z)(this.text)&&"string"==typeof this.text}}}),X.prototype.activate=function(){throw new v.Z("activate must be implemented in the derived class.")};var J=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(X),K="M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z";function Q(){for(var e=arguments.length,t=Array(e),n=0;n1&&this.controls[1].setNavigationLocked(this.navigationLocked)},this.eventHelper.add(this.terria.afterWidgetChanged,n,this),n()}oe.prototype.destroy=function(){this.eventHelper.removeAll()},oe.prototype.show=function(e){var t=void 0;this.enableZoomControls&&this.enableCompass?t='
':!this.enableZoomControls&&this.enableCompass?t='
':this.enableZoomControls&&!this.enableCompass?t='':this.enableZoomControls||this.enableCompass||(t=''),N(t,e,this)},oe.prototype.add=function(e){this.controls.push(e)},oe.prototype.remove=function(e){this.controls.remove(e)},oe.prototype.isLastControl=function(e){return e===this.controls[this.controls.length-1]};var ae=new w.Z;oe.prototype.handleMouseDown=function(e,t){if(this.terria.scene.mode===m.Z.MORPHING)return!0;if(e.navigationLocked)return!0;var n=t.currentTarget,i=t.currentTarget.getBoundingClientRect(),r=i.width/2,o=new w.Z((i.right-i.left)/2,(i.bottom-i.top)/2),a=new w.Z(t.clientX-i.left,t.clientY-i.top),s=w.Z.subtract(a,o,ae),c=w.Z.magnitude(s)/r;if(c<50/145)!function(e,t,n){var i=e,r=i.terria.scene,o=r.screenSpaceCameraController;if(r.mode!==m.Z.MORPHING&&o.enableInputs){if(i.navigationLocked)return!0;switch(r.mode){case m.Z.COLUMBUS_VIEW:if(o.enableLook)break;if(!o.enableTranslate||!o.enableTilt)return;break;case m.Z.SCENE3D:if(o.enableLook)break;if(!o.enableTilt||!o.enableRotate)return;break;case m.Z.SCENE2D:if(!o.enableTranslate)return;break;default:console.warn("scene.mode:"+r.mode+" bad case")}document.removeEventListener("mousemove",i.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",i.orbitMouseUpFunction,!1),(0,g.Z)(i.orbitTickFunction)&&i.terria.clock.onTick.removeEventListener(i.orbitTickFunction),i.orbitMouseMoveFunction=void 0,i.orbitMouseUpFunction=void 0,i.orbitTickFunction=void 0,i.isOrbiting=!0,i.orbitLastTimestamp=(0,k.Z)();var a=r.camera;if((0,g.Z)(i.terria.trackedEntity))i.orbitFrame=void 0,i.orbitIsLook=!1;else{var s=$(i.terria,!0,ue);(0,g.Z)(s)?(i.orbitFrame=M.Z.eastNorthUpToFixedFrame(s,r.globe.ellipsoid,ce),i.orbitIsLook=!1):(i.orbitFrame=M.Z.eastNorthUpToFixedFrame(a.positionWC,r.globe.ellipsoid,ce),i.orbitIsLook=!0)}i.orbitTickFunction=function(e){var t=(0,k.Z)(),n=(t-i.orbitLastTimestamp)*(2.5*(i.orbitCursorOpacity-.5)/1e3),o=i.orbitCursorAngle+S.Z.PI_OVER_TWO,s=Math.cos(o)*n,c=Math.sin(o)*n,u=void 0;if(i.navigationLocked)return!0;(0,g.Z)(i.orbitFrame)&&(u=A.Z.clone(a.transform,se),a.lookAtTransform(i.orbitFrame)),r.mode===m.Z.SCENE2D?a.move(new b.Z(s,c,0),Math.max(r.canvas.clientWidth,r.canvas.clientHeight)/100*a.positionCartographic.height*n):i.orbitIsLook?(a.look(b.Z.UNIT_Z,-s),a.look(a.right,-c)):(a.rotateLeft(s),a.rotateUp(c)),(0,g.Z)(i.orbitFrame)&&a.lookAtTransform(u),i.orbitLastTimestamp=t},i.orbitMouseMoveFunction=function(e){var n=t.getBoundingClientRect(),i=new w.Z((n.right-n.left)/2,(n.bottom-n.top)/2),r=new w.Z(e.clientX-n.left,e.clientY-n.top);c(w.Z.subtract(r,i,ae),n.width)},i.orbitMouseUpFunction=function(e){i.isOrbiting=!1,document.removeEventListener("mousemove",i.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",i.orbitMouseUpFunction,!1),(0,g.Z)(i.orbitTickFunction)&&i.terria.clock.onTick.removeEventListener(i.orbitTickFunction),i.orbitMouseMoveFunction=void 0,i.orbitMouseUpFunction=void 0,i.orbitTickFunction=void 0},document.addEventListener("mousemove",i.orbitMouseMoveFunction,!1),document.addEventListener("mouseup",i.orbitMouseUpFunction,!1),i.terria.clock.onTick.addEventListener(i.orbitTickFunction),c(n,t.getBoundingClientRect().width)}function c(e,t){var n=Math.atan2(-e.y,e.x);i.orbitCursorAngle=S.Z.zeroToTwoPi(n-S.Z.PI_OVER_TWO);var r=w.Z.magnitude(e),o=t/2,a=Math.min(r/o,1),s=.5*a*a+.5;i.orbitCursorOpacity=s}}(this,n,s);else{if(!(c<1))return!0;!function(e,t,n){var i=e,r=i.terria.scene,o=r.camera,a=r.screenSpaceCameraController;if(r.mode!==m.Z.MORPHING&&r.mode!==m.Z.SCENE2D&&a.enableInputs){if(i.navigationLocked)return!0;if(a.enableLook||r.mode!==m.Z.COLUMBUS_VIEW&&(r.mode!==m.Z.SCENE3D||a.enableRotate)){if(document.removeEventListener("mousemove",i.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",i.rotateMouseUpFunction,!1),i.rotateMouseMoveFunction=void 0,i.rotateMouseUpFunction=void 0,i.isRotating=!0,i.rotateInitialCursorAngle=Math.atan2(-n.y,n.x),(0,g.Z)(i.terria.trackedEntity))i.rotateFrame=void 0,i.rotateIsLook=!1;else{var s=$(i.terria,!0,ue);(0,g.Z)(s)&&(r.mode!==m.Z.COLUMBUS_VIEW||a.enableLook||a.enableTranslate)?(i.rotateFrame=M.Z.eastNorthUpToFixedFrame(s,r.globe.ellipsoid,ce),i.rotateIsLook=!1):(i.rotateFrame=M.Z.eastNorthUpToFixedFrame(o.positionWC,r.globe.ellipsoid,ce),i.rotateIsLook=!0)}var c=void 0;(0,g.Z)(i.rotateFrame)&&(c=A.Z.clone(o.transform,se),o.lookAtTransform(i.rotateFrame)),i.rotateInitialCameraAngle=-o.heading,(0,g.Z)(i.rotateFrame)&&o.lookAtTransform(c),i.rotateMouseMoveFunction=function(e){var n=t.getBoundingClientRect(),r=new w.Z((n.right-n.left)/2,(n.bottom-n.top)/2),a=new w.Z(e.clientX-n.left,e.clientY-n.top),s=w.Z.subtract(a,r,ae),u=Math.atan2(-s.y,s.x)-i.rotateInitialCursorAngle,l=S.Z.zeroToTwoPi(i.rotateInitialCameraAngle-u);o=i.terria.scene.camera,(0,g.Z)(i.rotateFrame)&&(c=A.Z.clone(o.transform,se),o.lookAtTransform(i.rotateFrame));var p=-o.heading;o.rotateRight(l-p),(0,g.Z)(i.rotateFrame)&&o.lookAtTransform(c)},i.rotateMouseUpFunction=function(e){i.isRotating=!1,document.removeEventListener("mousemove",i.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",i.rotateMouseUpFunction,!1),i.rotateMouseMoveFunction=void 0,i.rotateMouseUpFunction=void 0},document.addEventListener("mousemove",i.rotateMouseMoveFunction,!1),document.addEventListener("mouseup",i.rotateMouseUpFunction,!1)}}}(this,n,s)}};var se=new A.Z,ce=new A.Z,ue=new b.Z;oe.prototype.handleDoubleClick=function(e){var t=e.terria.scene,n=t.camera,i=t.screenSpaceCameraController;if(t.mode===m.Z.MORPHING||!i.enableInputs)return!0;if(e.navigationLocked)return!0;if(t.mode!==m.Z.COLUMBUS_VIEW||i.enableTranslate){if(t.mode===m.Z.SCENE3D||t.mode===m.Z.COLUMBUS_VIEW){if(!i.enableLook)return;if(t.mode===m.Z.SCENE3D&&!i.enableRotate)return}var r=$(e.terria,!0,ue);if((0,g.Z)(r)){var o=t.globe.ellipsoid.cartographicToCartesian(n.positionCartographic,new b.Z),a=t.globe.ellipsoid.geodeticSurfaceNormal(r),s=new D.Z(r,0);n.flyToBoundingSphere(s,{offset:new T.Z(0,S.Z.PI_OVER_TWO-b.Z.angleBetween(a,n.directionWC),b.Z.distance(o,r)),duration:1.5})}else this.controls[1].resetView()}},oe.create=function(e){var t=new oe(e);return t.show(e.container),t};var le=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{units:"kilometers"};if(!(0,g.Z)(e))throw new v.Z("CesiumWidget or Viewer is required.");var n=(0,g.Z)(e.cesiumWidget)?e.cesiumWidget:e,i=document.createElement("div");i.className="cesium-widget-cesiumNavigationContainer",n.container.appendChild(i),this.terria=e,this.terria.options=(0,g.Z)(t)?t:{},this.terria.afterWidgetChanged=new L.Z,this.terria.beforeWidgetChanged=new L.Z,this.container=i,p.Z.register(l()),I.register(l()),R.register(l()),l().bindingHandlers.embeddedComponent={init:function(e,t){return l().unwrap(t()).show(e),{controlsDescendantBindings:!0}},update:function(){}},(0,g.Z)(this.terria.options.enableDistanceLegend)&&!this.terria.options.enableDistanceLegend||(this.distanceLegendDiv=document.createElement("div"),i.appendChild(this.distanceLegendDiv),this.distanceLegendDiv.setAttribute("id","distanceLegendDiv"),this.distanceLegendViewModel=W.create(le({},t,{container:this.distanceLegendDiv,terria:this.terria,mapElement:i,enableDistanceLegend:!0}))),(0,g.Z)(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls||(0,g.Z)(this.terria.options.enableCompass)&&!this.terria.options.enableCompass?!(0,g.Z)(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls||(0,g.Z)(this.terria.options.enableCompass)&&!this.terria.options.enableCompass?(0,g.Z)(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls||!(0,g.Z)(this.terria.options.enableCompass)||this.terria.options.enableCompass?(0,g.Z)(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&(0,g.Z)(this.terria.options.enableCompass)&&this.terria.options.enableCompass:(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),i.appendChild(this.navigationDiv),this.navigationViewModel=oe.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!1})):(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),i.appendChild(this.navigationDiv),this.navigationViewModel=oe.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!1,enableCompass:!0})):(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),i.appendChild(this.navigationDiv),this.navigationViewModel=oe.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!0}))}function he(e,t){if(!(0,g.Z)(e))throw new v.Z("viewer is required.");var n;fe(e,t).addOnDestroyListener((n=e,function(){delete n.cesiumNavigation})),Object.defineProperties(e,{cesiumNavigation:{configurable:!0,get:function(){return e.cesiumWidget.cesiumNavigation}}})}pe.prototype.distanceLegendViewModel=void 0,pe.prototype.navigationViewModel=void 0,pe.prototype.navigationDiv=void 0,pe.prototype.distanceLegendDiv=void 0,pe.prototype.terria=void 0,pe.prototype.container=void 0,pe.prototype._onDestroyListeners=void 0,pe.prototype._navigationLocked=!1,pe.prototype.setNavigationLocked=function(e){this._navigationLocked=e,this.navigationViewModel.setNavigationLocked(this._navigationLocked)},pe.prototype.getNavigationLocked=function(){return this._navigationLocked},pe.prototype.destroy=function(){(0,g.Z)(this.navigationViewModel)&&this.navigationViewModel.destroy(),(0,g.Z)(this.distanceLegendViewModel)&&this.distanceLegendViewModel.destroy(),(0,g.Z)(this.navigationDiv)&&this.navigationDiv.parentNode.removeChild(this.navigationDiv),delete this.navigationDiv,(0,g.Z)(this.distanceLegendDiv)&&this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv),delete this.distanceLegendDiv,(0,g.Z)(this.container)&&this.container.parentNode.removeChild(this.container),delete this.container;for(var e=0;e{"use strict";n.d(t,{Z:()=>o});var i=n(923645),r=n.n(i)()((function(e){return e[1]}));r.push([e.id,"/*html {\n height: 100%;\n -webkit-font-smoothing: antialiased;\n}\n\nbody {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n padding: 0;\n background: #000;\n font-size: 15px;\n font-family: @default-font;\n}*/\n.msgapi .full-window {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n margin: 0;\n overflow: hidden;\n padding: 0;\n -webkit-transition: left 0.25s ease-out;\n -moz-transition: left 0.25s ease-out;\n -ms-transition: left 0.25s ease-out;\n -o-transition: left 0.25s ease-out;\n transition: left 0.25s ease-out;\n}\n.msgapi .transparent-to-input {\n pointer-events: none;\n}\n.msgapi .opaque-to-input {\n pointer-events: auto;\n}\n.msgapi .clickable {\n cursor: pointer;\n}\n/*a {\n text-decoration: none;\n color: @highlight-color;\n}*/\n.msgapi a:hover {\n text-decoration: underline;\n}\n/*\n@modal-background-color: @panel-background-color;\n@modal-text-color: @panel-emphasized-text-color;\n@modal-header-background-color: rgba(0,0,0,0.2);\n@modal-header-text-color: @panel-emphasized-text-color;*/\n/*.modal-background {\n .opaque-to-input;\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1000; required for IE9 \n}*/\n/*\n.modal {\n position: absolute;\n margin: auto;\n background-color: @modal-background-color;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n max-height: 100%;\n max-width: 100%;\n font-family: @default-font;\n color: @modal-text-color;\n}\n\n.modal-header {\n background-color: @modal-header-background-color;\n border-bottom: @panel-element-border;\n font-size: 15px;\n line-height: 40px;\n margin: 0;\n}\n\n.modal-header h1 {\n font-size: 15px;\n color: @modal-header-text-color;\n margin-left: 15px;\n}*/\n/* Commented out due to conflicts with client apps. \n.modal-content {\n margin-left: 15px;\n margin-right: 15px;\n margin-bottom: 15px;\n padding-top: 15px;\n overflow: auto;\n}*/\n/*.modal-close-button {\n position: absolute;\n right: 15px;\n cursor: pointer;\n font-size: 18px;\n color: @modal-header-text-color;\n}*/\n.msgapi #ui {\n z-index: 2100;\n}\n@media print {\n .msgapi .full-window {\n position: initial;\n }\n}\n/* input[type=text] {\n height: 38px;\n background-color: #eeeeee;\n color: @input-text-color;\n font-size: 14px;\n}\n\n::-webkit-input-placeholder {\n color: fade(@input-text-color, 75%);\n font-style: italic;\n}\n\n:-moz-placeholder { /* Firefox 18- \n color: fade(@input-text-color, 75%);\n font-style: italic;\n}\n\n::-moz-placeholder { /* Firefox 19+ \n color: fade(@input-text-color, 75%);\n font-style: italic;\n}\n\n:-ms-input-placeholder {\n color: fade(@input-text-color, 75%);\n font-style: italic;\n}\n\ninput:focus {\n outline-color: #FFFFFF;\n}\n*/\n/*select {\n display: block;\n background-color: @panel-form-input-background-color;\n color: @panel-form-input-text-color;\n height: 40px;\n border: 0;\n margin-top: 10px;\n font-size: 14px;\n padding-left: 5px;\n}*/\n.msgapi .markdown img {\n max-width: 100%;\n}\n.msgapi .markdown svg {\n max-height: 100%;\n}\n.msgapi .markdown input,\n.msgapi .markdown select,\n.msgapi .markdown textarea,\n.msgapi .markdown fieldset {\n font-family: inherit;\n font-size: 1rem;\n box-sizing: border-box;\n margin-top: 0;\n margin-bottom: 0;\n}\n.msgapi .markdown label {\n vertical-align: middle;\n}\n.msgapi .markdown h1,\n.msgapi .markdown h2,\n.msgapi .markdown h3,\n.msgapi .markdown h4,\n.msgapi .markdown h5,\n.msgapi .markdown h6 {\n font-family: inherit;\n font-weight: bold;\n line-height: 1.25;\n margin-top: 1em;\n margin-bottom: .5em;\n}\n.msgapi .markdown h1 {\n font-size: 2rem;\n}\n.msgapi .markdown h2 {\n font-size: 1.5rem;\n}\n.msgapi .markdown h3 {\n font-size: 1.25rem;\n}\n.msgapi .markdown h4 {\n font-size: 1rem;\n}\n.msgapi .markdown h5 {\n font-size: 0.875rem;\n}\n.msgapi .markdown h6 {\n font-size: 0.75rem;\n}\n.msgapi .markdown p {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n.msgapi .markdown strong {\n font-weight: bold;\n}\n.msgapi .markdown em {\n font-style: italic;\n}\n.msgapi .markdown small {\n font-size: 80%;\n}\n.msgapi .markdown mark {\n color: #000;\n background: #ff0;\n}\n.msgapi .markdown u {\n text-decoration: underline;\n}\n.msgapi .markdown s {\n text-decoration: line-through;\n}\n.msgapi .markdown dl,\n.msgapi .markdown ol,\n.msgapi .markdown ul {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n.msgapi .markdown ol {\n list-style: decimal inside;\n}\n.msgapi .markdown ul {\n list-style: disc inside;\n}\n.msgapi .markdown pre,\n.msgapi .markdown code,\n.msgapi .markdown samp {\n font-family: monospace;\n font-size: inherit;\n}\n.msgapi .markdown pre {\n margin-top: 0;\n margin-bottom: 1rem;\n overflow-x: scroll;\n}\n.msgapi .markdown a {\n color: #68ADFE;\n text-decoration: none;\n}\n.msgapi .markdown a:hover {\n text-decoration: underline;\n}\n.msgapi .markdown pre,\n.msgapi .markdown code {\n background-color: transparent;\n border-radius: 3px;\n}\n.msgapi .markdown hr {\n border: 0;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n border-bottom-color: rgba(0, 0, 0, 0.125);\n}\n.msgapi .markdown .left-align {\n text-align: left;\n}\n.msgapi .markdown .center {\n text-align: center;\n}\n.msgapi .markdown .right-align {\n text-align: right;\n}\n.msgapi .markdown .justify {\n text-align: justify;\n}\n.msgapi .markdown .truncate {\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.msgapi .markdown ol.upper-roman {\n list-style-type: upper-roman;\n}\n.msgapi .markdown ol.lower-alpha {\n list-style-type: lower-alpha;\n}\n.msgapi .markdown ul.circle {\n list-style-type: circle;\n}\n.msgapi .markdown ul.square {\n list-style-type: square;\n}\n.msgapi .markdown .list-reset {\n list-style: none;\n padding-left: 0;\n}\n.msgapi .floating {\n pointer-events: auto;\n position: absolute;\n border-radius: 15px;\n background-color: rgba(47, 53, 60, 0.8);\n}\n.msgapi .floating-horizontal {\n pointer-events: auto;\n position: absolute;\n border-radius: 15px;\n background-color: rgba(47, 53, 60, 0.8);\n padding-left: 5px;\n padding-right: 5px;\n}\n.msgapi .floating-vertical {\n pointer-events: auto;\n position: absolute;\n border-radius: 15px;\n background-color: rgba(47, 53, 60, 0.8);\n padding-top: 5px;\n padding-bottom: 5px;\n}\n@media print {\n .msgapi .floating {\n display: none;\n }\n}\n.msgapi .distance-legend {\n pointer-events: auto;\n position: absolute;\n border-radius: 15px;\n background-color: rgba(47, 53, 60, 0.8);\n padding-left: 5px;\n padding-right: 5px;\n right: 25px;\n bottom: 30px;\n height: 30px;\n width: 125px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n box-sizing: content-box;\n}\n.msgapi .distance-legend-label {\n display: inline-block;\n font-family: 'Roboto', sans-serif;\n font-size: 14px;\n font-weight: lighter;\n line-height: 30px;\n color: #ffffff;\n width: 125px;\n text-align: center;\n}\n.msgapi .distance-legend-scale-bar {\n border-left: 1px solid #ffffff;\n border-right: 1px solid #ffffff;\n border-bottom: 1px solid #ffffff;\n position: absolute;\n height: 10px;\n top: 15px;\n}\n@media print {\n .msgapi .distance-legend {\n display: none;\n }\n}\n@media screen and (max-width: 700px), screen and (max-height: 420px) {\n .msgapi .distance-legend {\n display: none;\n }\n}\n.msgapi .navigation-controls {\n position: absolute;\n right: 30px;\n top: 210px;\n width: 30px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n font-weight: 300;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.msgapi .navigation-control {\n cursor: pointer;\n border-bottom: 1px solid #555555;\n}\n.msgapi .naviagation-control:active {\n color: #FFF;\n}\n.msgapi .navigation-control-last {\n cursor: pointer;\n border-bottom: 1px solid #555555;\n border-bottom: 0;\n}\n.msgapi .navigation-control-icon-zoom-in {\n position: relative;\n text-align: center;\n font-size: 20px;\n color: #ffffff;\n padding-bottom: 4px;\n}\n.msgapi .navigation-control-icon-zoom-out {\n position: relative;\n text-align: center;\n font-size: 20px;\n color: #ffffff;\n}\n.msgapi .navigation-control-icon-reset {\n position: relative;\n left: 10px;\n width: 10px;\n height: 10px;\n fill: rgba(255, 255, 255, 0.8);\n padding-top: 6px;\n padding-bottom: 6px;\n box-sizing: content-box;\n}\n.msgapi .compass {\n pointer-events: auto;\n position: absolute;\n right: 0px;\n top: 100px;\n width: 95px;\n height: 95px;\n overflow: hidden;\n}\n.msgapi .compass-outer-ring {\n position: absolute;\n top: 0;\n width: 95px;\n height: 95px;\n fill: rgba(255, 255, 255, 0.5);\n}\n.msgapi .compass-outer-ring-background {\n position: absolute;\n top: 14px;\n left: 14px;\n width: 44px;\n height: 44px;\n border-radius: 44px;\n border: 12px solid rgba(47, 53, 60, 0.8);\n box-sizing: content-box;\n}\n.msgapi .compass-gyro {\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 95px;\n height: 95px;\n fill: #CCC;\n}\n.msgapi .compass-gyro-active {\n fill: #68adfe;\n}\n.msgapi .compass-gyro-background {\n position: absolute;\n top: 30px;\n left: 30px;\n width: 33px;\n height: 33px;\n border-radius: 33px;\n background-color: rgba(47, 53, 60, 0.8);\n border: 1px solid rgba(255, 255, 255, 0.2);\n box-sizing: content-box;\n}\n.msgapi .compass-gyro-background:hover + .compass-gyro {\n fill: #68adfe;\n}\n.msgapi .compass-rotation-marker {\n position: absolute;\n top: 0;\n width: 95px;\n height: 95px;\n fill: #68adfe;\n}\n@media screen and (max-width: 700px), screen and (max-height: 420px) {\n .msgapi .navigation-controls {\n display: none;\n }\n .msgapi .compass {\n display: none;\n }\n}\n@media print {\n .msgapi .navigation-controls {\n display: none;\n }\n .msgapi .compass {\n display: none;\n }\n}\n",""]);const o=r},25925:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(923645),r=n.n(i)()((function(e){return e[1]}));r.push([e.id,'/* packages/widgets/Source/shared.css */\n.msgapi .cesium-svgPath-svg {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.msgapi .cesium-button {\n display: inline-block;\n position: relative;\n background: #303336;\n border: 1px solid #444;\n color: #edffff;\n fill: #edffff;\n border-radius: 4px;\n padding: 5px 12px;\n margin: 2px 3px;\n cursor: pointer;\n overflow: hidden;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.msgapi .cesium-button:focus {\n color: #fff;\n fill: #fff;\n border-color: #ea4;\n outline: none;\n}\n.msgapi .cesium-button:hover {\n color: #fff;\n fill: #fff;\n background: #48b;\n border-color: #aef;\n box-shadow: 0 0 8px #fff;\n}\n.msgapi .cesium-button:active {\n color: #000;\n fill: #000;\n background: #adf;\n border-color: #fff;\n box-shadow: 0 0 8px #fff;\n}\n.msgapi .cesium-button:disabled,\n.msgapi .cesium-button-disabled,\n.msgapi .cesium-button-disabled:focus,\n.msgapi .cesium-button-disabled:hover,\n.msgapi .cesium-button-disabled:active {\n background: #303336;\n border-color: #444;\n color: #646464;\n fill: #646464;\n box-shadow: none;\n cursor: default;\n}\n.msgapi .cesium-button option {\n background-color: #000;\n color: #eee;\n}\n.msgapi .cesium-button option:disabled {\n color: #777;\n}\n.msgapi .cesium-button input,\n.msgapi .cesium-button label {\n cursor: pointer;\n}\n.msgapi .cesium-button input {\n vertical-align: sub;\n}\n.msgapi .cesium-toolbar-button {\n box-sizing: border-box;\n width: 32px;\n height: 32px;\n border-radius: 14%;\n padding: 0;\n vertical-align: middle;\n z-index: 0;\n}\n.msgapi .cesium-performanceDisplay-defaultContainer {\n position: absolute;\n top: 50px;\n right: 10px;\n text-align: right;\n}\n.msgapi .cesium-performanceDisplay {\n background-color: rgba(40, 40, 40, 0.7);\n padding: 7px;\n border-radius: 5px;\n border: 1px solid #444;\n font: bold 12px sans-serif;\n}\n.msgapi .cesium-performanceDisplay-fps {\n color: #e52;\n}\n.msgapi .cesium-performanceDisplay-throttled {\n color: #a42;\n}\n.msgapi .cesium-performanceDisplay-ms {\n color: #de3;\n}\n\n/* packages/widgets/Source/Animation/Animation.css */\n.msgapi .cesium-animation-theme {\n visibility: hidden;\n display: block;\n position: absolute;\n z-index: -100;\n}\n.msgapi .cesium-animation-themeNormal {\n color: #222;\n}\n.msgapi .cesium-animation-themeHover {\n color: #4488b0;\n}\n.msgapi .cesium-animation-themeSelect {\n color: #242;\n}\n.msgapi .cesium-animation-themeDisabled {\n color: #333;\n}\n.msgapi .cesium-animation-themeKnob {\n color: #222;\n}\n.msgapi .cesium-animation-themePointer {\n color: #2e2;\n}\n.msgapi .cesium-animation-themeSwoosh {\n color: #8ac;\n}\n.msgapi .cesium-animation-themeSwooshHover {\n color: #aef;\n}\n.msgapi .cesium-animation-svgText {\n fill: #edffff;\n font-family: Sans-Serif;\n font-size: 15px;\n text-anchor: middle;\n}\n.msgapi .cesium-animation-blank {\n fill: #000;\n fill-opacity: 0.01;\n stroke: none;\n}\n.msgapi .cesium-animation-rectButton {\n cursor: pointer;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.msgapi .cesium-animation-rectButton .cesium-animation-buttonGlow {\n fill: #fff;\n stroke: none;\n display: none;\n}\n.msgapi .cesium-animation-rectButton:hover .cesium-animation-buttonGlow {\n display: block;\n}\n.msgapi .cesium-animation-rectButton .cesium-animation-buttonPath {\n fill: #edffff;\n}\n.msgapi .cesium-animation-rectButton .cesium-animation-buttonMain {\n stroke: #444;\n stroke-width: 1.2;\n}\n.msgapi .cesium-animation-rectButton:hover .cesium-animation-buttonMain {\n stroke: #aef;\n}\n.msgapi .cesium-animation-rectButton:active .cesium-animation-buttonMain {\n fill: #abd6ff;\n}\n.msgapi .cesium-animation-buttonDisabled {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.msgapi .cesium-animation-buttonDisabled .cesium-animation-buttonMain {\n stroke: #555;\n}\n.msgapi .cesium-animation-buttonDisabled .cesium-animation-buttonPath {\n fill: #818181;\n}\n.msgapi .cesium-animation-buttonDisabled .cesium-animation-buttonGlow {\n display: none;\n}\n.msgapi .cesium-animation-buttonToggled .cesium-animation-buttonGlow {\n display: block;\n fill: #2e2;\n}\n.msgapi .cesium-animation-buttonToggled .cesium-animation-buttonMain {\n stroke: #2e2;\n}\n.msgapi .cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow {\n fill: #fff;\n}\n.msgapi .cesium-animation-buttonToggled:hover .cesium-animation-buttonMain {\n stroke: #2e2;\n}\n.msgapi .cesium-animation-shuttleRingG {\n cursor: pointer;\n}\n.msgapi .cesium-animation-shuttleRingPointer {\n cursor: pointer;\n}\n.msgapi .cesium-animation-shuttleRingPausePointer {\n cursor: pointer;\n}\n.msgapi .cesium-animation-shuttleRingBack {\n fill: #181818;\n fill-opacity: 0.8;\n stroke: #333;\n stroke-width: 1.2;\n}\n.msgapi .cesium-animation-shuttleRingSwoosh line {\n stroke: #8ac;\n stroke-width: 3;\n stroke-opacity: 0.2;\n stroke-linecap: round;\n}\n.msgapi .cesium-animation-knobOuter {\n cursor: pointer;\n stroke: #444;\n stroke-width: 1.2;\n}\n.msgapi .cesium-animation-knobInner {\n cursor: pointer;\n}\n\n/* packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.css */\n.msgapi .cesium-baseLayerPicker-selected {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n}\n.msgapi .cesium-baseLayerPicker-dropDown {\n display: block;\n position: absolute;\n box-sizing: content-box;\n top: auto;\n right: 0;\n width: 320px;\n max-height: 500px;\n margin-top: 5px;\n background-color: rgba(38, 38, 38, 0.75);\n border: 1px solid #444;\n padding: 6px;\n overflow: auto;\n border-radius: 10px;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n transform: translate(0, -20%);\n visibility: hidden;\n opacity: 0;\n transition:\n visibility 0s 0.2s,\n opacity 0.2s ease-in,\n transform 0.2s ease-in;\n}\n.msgapi .cesium-baseLayerPicker-dropDown-visible {\n transform: translate(0, 0);\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s ease-out, transform 0.2s ease-out;\n}\n.msgapi .cesium-baseLayerPicker-sectionTitle {\n display: block;\n font-family: sans-serif;\n font-size: 16pt;\n text-align: left;\n color: #edffff;\n margin-bottom: 4px;\n}\n.msgapi .cesium-baseLayerPicker-choices {\n margin-bottom: 5px;\n}\n.msgapi .cesium-baseLayerPicker-categoryTitle {\n color: #edffff;\n font-size: 11pt;\n}\n.msgapi .cesium-baseLayerPicker-choices {\n display: block;\n border: 1px solid #888;\n border-radius: 5px;\n padding: 5px 0;\n}\n.msgapi .cesium-baseLayerPicker-item {\n display: inline-block;\n vertical-align: top;\n margin: 2px 5px;\n width: 64px;\n text-align: center;\n cursor: pointer;\n}\n.msgapi .cesium-baseLayerPicker-itemLabel {\n display: block;\n font-family: sans-serif;\n font-size: 8pt;\n text-align: center;\n vertical-align: middle;\n color: #edffff;\n cursor: pointer;\n word-wrap: break-word;\n}\n.msgapi .cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel,\n.msgapi .cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel {\n text-decoration: underline;\n}\n.msgapi .cesium-baseLayerPicker-itemIcon {\n display: inline-block;\n position: relative;\n width: inherit;\n height: auto;\n background-size: 100% 100%;\n border: solid 1px #444;\n border-radius: 9px;\n color: #edffff;\n margin: 0;\n padding: 0;\n cursor: pointer;\n box-sizing: border-box;\n}\n.msgapi .cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon {\n border-color: #fff;\n box-shadow: 0 0 8px #fff, 0 0 8px #fff;\n}\n.msgapi .cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel {\n color: rgb(189, 236, 248);\n}\n.msgapi .cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon {\n border: double 4px rgb(189, 236, 248);\n}\n\n/* packages/engine/Source/Widget/CesiumWidget.css */\n.msgapi .cesium-widget {\n font-family: sans-serif;\n font-size: 16px;\n overflow: hidden;\n display: block;\n position: relative;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.msgapi .cesium-widget,\n.msgapi .cesium-widget canvas {\n width: 100%;\n height: 100%;\n touch-action: none;\n}\n.msgapi .cesium-widget-credits {\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n color: #fff;\n font-size: 10px;\n text-shadow: 0px 0px 2px #000000;\n padding-right: 5px;\n}\n.msgapi .cesium-widget-credits a,\n.msgapi .cesium-widget-credits a:visited {\n color: #fff;\n}\n.msgapi .cesium-widget-errorPanel {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n text-align: center;\n background: rgba(0, 0, 0, 0.7);\n z-index: 99999;\n}\n.msgapi .cesium-widget-errorPanel:before {\n display: inline-block;\n vertical-align: middle;\n height: 100%;\n content: "";\n}\n.msgapi .cesium-widget-errorPanel-content {\n width: 75%;\n max-width: 500px;\n display: inline-block;\n text-align: left;\n vertical-align: middle;\n border: 1px solid #510c00;\n border-radius: 7px;\n background-color: #f0d9d5;\n font-size: 14px;\n color: #510c00;\n}\n.msgapi .cesium-widget-errorPanel-content.expanded {\n max-width: 75%;\n}\n.msgapi .cesium-widget-errorPanel-header {\n font-size: 18px;\n font-family:\n "Open Sans",\n Verdana,\n Geneva,\n sans-serif;\n background: #d69d93;\n border-bottom: 2px solid #510c00;\n padding-bottom: 10px;\n border-radius: 3px 3px 0 0;\n padding: 15px;\n}\n.msgapi .cesium-widget-errorPanel-scroll {\n overflow: auto;\n font-family:\n "Open Sans",\n Verdana,\n Geneva,\n sans-serif;\n white-space: pre-wrap;\n padding: 0 15px;\n margin: 10px 0 20px 0;\n}\n.msgapi .cesium-widget-errorPanel-buttonPanel {\n padding: 0 15px;\n margin: 10px 0 20px 0;\n text-align: right;\n}\n.msgapi .cesium-widget-errorPanel-buttonPanel button {\n border-color: #510c00;\n background: #d69d93;\n color: #202020;\n margin: 0;\n}\n.msgapi .cesium-widget-errorPanel-buttonPanel button:focus {\n border-color: #510c00;\n background: #f0d9d5;\n color: #510c00;\n}\n.msgapi .cesium-widget-errorPanel-buttonPanel button:hover {\n border-color: #510c00;\n background: #f0d9d5;\n color: #510c00;\n}\n.msgapi .cesium-widget-errorPanel-buttonPanel button:active {\n border-color: #510c00;\n background: #b17b72;\n color: #510c00;\n}\n.msgapi .cesium-widget-errorPanel-more-details {\n text-decoration: underline;\n cursor: pointer;\n}\n.msgapi .cesium-widget-errorPanel-more-details:hover {\n color: #2b0700;\n}\n\n/* packages/widgets/Source/CesiumInspector/CesiumInspector.css */\n.msgapi .cesium-cesiumInspector {\n border-radius: 5px;\n transition: width ease-in-out 0.25s;\n background: rgba(48, 51, 54, 0.8);\n border: 1px solid #444;\n color: #edffff;\n display: inline-block;\n position: relative;\n padding: 4px 12px;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n}\n.msgapi .cesium-cesiumInspector-button {\n text-align: center;\n font-size: 11pt;\n}\n.msgapi .cesium-cesiumInspector-visible .cesium-cesiumInspector-button {\n border-bottom: 1px solid #aaa;\n padding-bottom: 3px;\n}\n.msgapi .cesium-cesiumInspector input:enabled,\n.msgapi .cesium-cesiumInspector-button {\n cursor: pointer;\n}\n.msgapi .cesium-cesiumInspector-visible {\n width: 185px;\n height: auto;\n}\n.msgapi .cesium-cesiumInspector-hidden {\n width: 122px;\n height: 17px;\n}\n.msgapi .cesium-cesiumInspector-sectionContent {\n max-height: 600px;\n}\n.msgapi .cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent {\n max-height: 0;\n padding: 0 !important;\n overflow: hidden;\n}\n.msgapi .cesium-cesiumInspector-dropDown {\n margin: 5px 0;\n font-family: sans-serif;\n font-size: 10pt;\n width: 185px;\n}\n.msgapi .cesium-cesiumInspector-frustumStatistics {\n padding-left: 10px;\n padding: 5px;\n background-color: rgba(80, 80, 80, 0.75);\n}\n.msgapi .cesium-cesiumInspector-pickButton {\n background-color: rgba(0, 0, 0, 0.3);\n border: 1px solid #444;\n color: #edffff;\n border-radius: 5px;\n padding: 3px 7px;\n cursor: pointer;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n margin: 0 auto;\n}\n.msgapi .cesium-cesiumInspector-pickButton:focus {\n outline: none;\n}\n.msgapi .cesium-cesiumInspector-pickButton:active,\n.msgapi .cesium-cesiumInspector-pickButtonHighlight {\n color: #000;\n background: #adf;\n border-color: #fff;\n box-shadow: 0 0 8px #fff;\n}\n.msgapi .cesium-cesiumInspector-center {\n text-align: center;\n}\n.msgapi .cesium-cesiumInspector-sectionHeader {\n font-weight: bold;\n font-size: 10pt;\n margin: 0;\n cursor: pointer;\n}\n.msgapi .cesium-cesiumInspector-pickSection {\n border: 1px solid #aaa;\n border-radius: 5px;\n padding: 3px;\n margin-bottom: 5px;\n}\n.msgapi .cesium-cesiumInspector-sectionContent {\n margin-bottom: 10px;\n transition: max-height 0.25s;\n}\n.msgapi .cesium-cesiumInspector-tileText {\n padding-bottom: 10px;\n border-bottom: 1px solid #aaa;\n}\n.msgapi .cesium-cesiumInspector-relativeText {\n padding-top: 10px;\n}\n.msgapi .cesium-cesiumInspector-sectionHeader::before {\n margin-right: 5px;\n content: "-";\n width: 1ch;\n display: inline-block;\n}\n.msgapi .cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader::before {\n content: "+";\n}\n\n/* packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.css */\n.msgapi ul.cesium-cesiumInspector-statistics {\n margin: 0;\n padding-top: 3px;\n padding-bottom: 3px;\n}\n.msgapi ul.cesium-cesiumInspector-statistics + ul.cesium-cesiumInspector-statistics {\n border-top: 1px solid #aaa;\n}\n.msgapi .cesium-cesiumInspector-slider {\n margin-top: 5px;\n}\n.msgapi .cesium-cesiumInspector-slider input[type=number] {\n text-align: left;\n background-color: #222;\n outline: none;\n border: 1px solid #444;\n color: #edffff;\n width: 100px;\n border-radius: 3px;\n padding: 1px;\n margin-left: 10px;\n cursor: auto;\n}\n.msgapi .cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button,\n.msgapi .cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.msgapi .cesium-cesiumInspector-slider input[type=range] {\n margin-left: 5px;\n vertical-align: middle;\n}\n.msgapi .cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor {\n display: none;\n}\n.msgapi .cesium-cesiumInspector-styleEditor {\n padding: 10px;\n border-radius: 5px;\n background: rgba(48, 51, 54, 0.8);\n border: 1px solid #444;\n}\n.msgapi .cesium-cesiumInspector-styleEditor textarea {\n width: 100%;\n height: 300px;\n background: transparent;\n color: #edffff;\n border: none;\n padding: 0;\n white-space: pre;\n overflow-wrap: normal;\n overflow-x: auto;\n}\n.msgapi .cesium-3DTilesInspector {\n width: 300px;\n pointer-events: all;\n}\n.msgapi .cesium-3DTilesInspector-statistics {\n font-size: 11px;\n}\n.msgapi .cesium-3DTilesInspector-disabledElementsInfo {\n margin: 5px 0 0 0;\n padding: 0 0 0 20px;\n color: #eed202;\n}\n.msgapi .cesium-3DTilesInspector div,\n.msgapi .cesium-3DTilesInspector input[type=range] {\n width: 100%;\n box-sizing: border-box;\n}\n.msgapi .cesium-cesiumInspector-error {\n color: #ff9e9e;\n overflow: auto;\n}\n.msgapi .cesium-3DTilesInspector .cesium-cesiumInspector-section {\n margin-top: 3px;\n}\n.msgapi .cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader + .cesium-cesiumInspector-show {\n border-top: 1px solid white;\n}\n.msgapi input.cesium-cesiumInspector-url {\n overflow: hidden;\n white-space: nowrap;\n overflow-x: scroll;\n background-color: transparent;\n color: white;\n outline: none;\n border: none;\n height: 1em;\n width: 100%;\n}\n.msgapi .cesium-cesiumInspector .field-group {\n display: table;\n}\n.msgapi .cesium-cesiumInspector .field-group > label {\n display: table-cell;\n font-weight: bold;\n}\n.msgapi .cesium-cesiumInspector .field-group > .field {\n display: table-cell;\n width: 100%;\n}\n\n/* packages/widgets/Source/VoxelInspector/VoxelInspector.css */\n.msgapi .cesium-VoxelInspector {\n width: 300px;\n pointer-events: all;\n}\n.msgapi .cesium-VoxelInspector div,\n.msgapi .cesium-VoxelInspector input[type=range] {\n width: 100%;\n box-sizing: border-box;\n}\n.msgapi .cesium-VoxelInspector .cesium-cesiumInspector-section {\n margin-top: 3px;\n}\n.msgapi .cesium-VoxelInspector .cesium-cesiumInspector-sectionHeader + .cesium-cesiumInspector-show {\n border-top: 1px solid white;\n}\n\n/* packages/widgets/Source/FullscreenButton/FullscreenButton.css */\n.msgapi .cesium-button.cesium-fullscreenButton {\n display: block;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0;\n}\n\n/* packages/widgets/Source/VRButton/VRButton.css */\n.msgapi .cesium-button.cesium-vrButton {\n display: block;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0;\n}\n\n/* packages/widgets/Source/Geocoder/Geocoder.css */\n.msgapi .cesium-viewer-geocoderContainer .cesium-geocoder-input {\n border: solid 1px #444;\n background-color: rgba(40, 40, 40, 0.7);\n color: white;\n display: inline-block;\n vertical-align: middle;\n width: 0;\n height: 32px;\n margin: 0;\n padding: 0 32px 0 0;\n border-radius: 0;\n box-sizing: border-box;\n transition: width ease-in-out 0.25s, background-color 0.2s ease-in-out;\n -webkit-appearance: none;\n}\n.msgapi .cesium-viewer-geocoderContainer:hover .cesium-geocoder-input {\n border-color: #aef;\n box-shadow: 0 0 8px #fff;\n}\n.msgapi .cesium-viewer-geocoderContainer .cesium-geocoder-input:focus {\n border-color: #ea4;\n background-color: rgba(15, 15, 15, 0.9);\n box-shadow: none;\n outline: none;\n}\n.msgapi .cesium-viewer-geocoderContainer:hover .cesium-geocoder-input,\n.msgapi .cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,\n.msgapi .cesium-viewer-geocoderContainer .cesium-geocoder-input-wide {\n padding-left: 4px;\n width: 250px;\n}\n.msgapi .cesium-viewer-geocoderContainer .search-results {\n position: absolute;\n background-color: #000;\n color: #eee;\n overflow-y: auto;\n opacity: 0.8;\n width: 100%;\n}\n.msgapi .cesium-viewer-geocoderContainer .search-results ul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.msgapi .cesium-viewer-geocoderContainer .search-results ul li {\n font-size: 14px;\n padding: 3px 10px;\n}\n.msgapi .cesium-viewer-geocoderContainer .search-results ul li:hover {\n cursor: pointer;\n}\n.msgapi .cesium-viewer-geocoderContainer .search-results ul li.active {\n background: #48b;\n}\n.msgapi .cesium-geocoder-searchButton {\n background-color: #303336;\n display: inline-block;\n position: absolute;\n cursor: pointer;\n width: 32px;\n top: 1px;\n right: 1px;\n height: 30px;\n vertical-align: middle;\n fill: #edffff;\n}\n.msgapi .cesium-geocoder-searchButton:hover {\n background-color: #48b;\n}\n\n/* packages/widgets/Source/InfoBox/InfoBox.css */\n.msgapi .cesium-infoBox {\n display: block;\n position: absolute;\n top: 50px;\n right: 0;\n width: 40%;\n max-width: 480px;\n background: rgba(38, 38, 38, 0.95);\n color: #edffff;\n border: 1px solid #444;\n border-right: none;\n border-top-left-radius: 7px;\n border-bottom-left-radius: 7px;\n box-shadow: 0 0 10px 1px #000;\n transform: translate(100%, 0);\n visibility: hidden;\n opacity: 0;\n transition:\n visibility 0s 0.2s,\n opacity 0.2s ease-in,\n transform 0.2s ease-in;\n}\n.msgapi .cesium-infoBox-visible {\n transform: translate(0, 0);\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s ease-out, transform 0.2s ease-out;\n}\n.msgapi .cesium-infoBox-title {\n display: block;\n height: 20px;\n padding: 5px 30px 5px 25px;\n background: rgba(84, 84, 84, 1);\n border-top-left-radius: 7px;\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n box-sizing: content-box;\n}\n.msgapi .cesium-infoBox-bodyless .cesium-infoBox-title {\n border-bottom-left-radius: 7px;\n}\n.msgapi button.cesium-infoBox-camera {\n display: block;\n position: absolute;\n top: 4px;\n left: 4px;\n width: 22px;\n height: 22px;\n background: transparent;\n border-color: transparent;\n border-radius: 3px;\n padding: 0 5px;\n margin: 0;\n}\n.msgapi button.cesium-infoBox-close {\n display: block;\n position: absolute;\n top: 5px;\n right: 5px;\n height: 20px;\n background: transparent;\n border: none;\n border-radius: 2px;\n font-weight: bold;\n font-size: 16px;\n padding: 0 5px;\n margin: 0;\n color: #edffff;\n}\n.msgapi button.cesium-infoBox-close:focus {\n background: rgba(238, 136, 0, 0.44);\n outline: none;\n}\n.msgapi button.cesium-infoBox-close:hover {\n background: #888;\n color: #000;\n}\n.msgapi button.cesium-infoBox-close:active {\n background: #a00;\n color: #000;\n}\n.msgapi .cesium-infoBox-bodyless .cesium-infoBox-iframe {\n display: none;\n}\n.msgapi .cesium-infoBox-iframe {\n border: none;\n width: 100%;\n width: calc(100% - 2px);\n}\n\n/* packages/widgets/Source/SceneModePicker/SceneModePicker.css */\n.msgapi span.cesium-sceneModePicker-wrapper {\n display: inline-block;\n position: relative;\n margin: 0 3px;\n}\n.msgapi .cesium-sceneModePicker-visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.25s linear;\n}\n.msgapi .cesium-sceneModePicker-hidden {\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 0.25s, opacity 0.25s linear;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none {\n display: none;\n}\n.msgapi .cesium-sceneModePicker-slide-svg {\n transition: left 2s;\n top: 0;\n left: 0;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon {\n box-sizing: border-box;\n padding: 0;\n margin: 3px 0;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView,\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D {\n margin: 0 0 3px 0;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D {\n left: 100%;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView {\n left: 200%;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D {\n left: -200%;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D {\n left: -100%;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D {\n left: -100%;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView {\n left: 100%;\n}\n.msgapi .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected {\n border-color: #2e2;\n box-shadow: 0 0 8px #fff, 0 0 8px #fff;\n}\n\n/* packages/widgets/Source/ProjectionPicker/ProjectionPicker.css */\n.msgapi span.cesium-projectionPicker-wrapper {\n display: inline-block;\n position: relative;\n margin: 0 3px;\n}\n.msgapi .cesium-projectionPicker-visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.25s linear;\n}\n.msgapi .cesium-projectionPicker-hidden {\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 0.25s, opacity 0.25s linear;\n}\n.msgapi .cesium-projectionPicker-wrapper .cesium-projectionPicker-none {\n display: none;\n}\n.msgapi .cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon {\n box-sizing: border-box;\n padding: 0;\n margin: 3px 0;\n}\n.msgapi .cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective,\n.msgapi .cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic {\n margin: 0 0 3px 0;\n}\n.msgapi .cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic {\n left: 100%;\n}\n.msgapi .cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective {\n left: -100%;\n}\n.msgapi .cesium-projectionPicker-wrapper .cesium-projectionPicker-selected {\n border-color: #2e2;\n box-shadow: 0 0 8px #fff, 0 0 8px #fff;\n}\n\n/* packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdog.css */\n.msgapi .cesium-performance-watchdog-message-area {\n position: relative;\n background-color: yellow;\n color: black;\n padding: 10px;\n}\n.msgapi .cesium-performance-watchdog-message {\n margin-right: 30px;\n}\n.msgapi .cesium-performance-watchdog-message-dismiss {\n position: absolute;\n right: 0;\n margin: 0 10px 0 0;\n}\n\n/* packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.css */\n.msgapi .cesium-navigationHelpButton-wrapper {\n position: relative;\n display: inline-block;\n}\n.msgapi .cesium-navigation-help {\n visibility: hidden;\n position: absolute;\n top: 38px;\n right: 2px;\n width: 250px;\n border-radius: 10px;\n transform: scale(0.01);\n transform-origin: 234px -10px;\n transition: visibility 0s 0.25s, transform 0.25s ease-in;\n}\n.msgapi .cesium-navigation-help-visible {\n visibility: visible;\n transform: scale(1);\n transition: transform 0.25s ease-out;\n}\n.msgapi .cesium-navigation-help-instructions {\n border: 1px solid #444;\n background-color: rgba(38, 38, 38, 0.75);\n padding-bottom: 5px;\n border-radius: 0 0 10px 10px;\n}\n.msgapi .cesium-click-navigation-help {\n display: none;\n}\n.msgapi .cesium-touch-navigation-help {\n display: none;\n padding-top: 5px;\n}\n.msgapi .cesium-click-navigation-help-visible {\n display: block;\n}\n.msgapi .cesium-touch-navigation-help-visible {\n display: block;\n}\n.msgapi .cesium-navigation-help-pan {\n color: #66ccff;\n font-weight: bold;\n}\n.msgapi .cesium-navigation-help-zoom {\n color: #65fd00;\n font-weight: bold;\n}\n.msgapi .cesium-navigation-help-rotate {\n color: #ffd800;\n font-weight: bold;\n}\n.msgapi .cesium-navigation-help-tilt {\n color: #d800d8;\n font-weight: bold;\n}\n.msgapi .cesium-navigation-help-details {\n color: #ffffff;\n}\n.msgapi .cesium-navigation-button {\n color: #fff;\n background-color: transparent;\n border-bottom: none;\n border-top: 1px solid #444;\n border-right: 1px solid #444;\n margin: 0;\n width: 50%;\n cursor: pointer;\n}\n.msgapi .cesium-navigation-button-icon {\n vertical-align: middle;\n padding: 5px 1px;\n}\n.msgapi .cesium-navigation-button:focus {\n outline: none;\n}\n.msgapi .cesium-navigation-button-left {\n border-radius: 10px 0 0 0;\n border-left: 1px solid #444;\n}\n.msgapi .cesium-navigation-button-right {\n border-radius: 0 10px 0 0;\n border-left: none;\n}\n.msgapi .cesium-navigation-button-selected {\n background-color: rgba(38, 38, 38, 0.75);\n}\n.msgapi .cesium-navigation-button-unselected {\n background-color: rgba(0, 0, 0, 0.75);\n}\n.msgapi .cesium-navigation-button-unselected:hover {\n background-color: rgba(76, 76, 76, 0.75);\n}\n\n/* packages/widgets/Source/SelectionIndicator/SelectionIndicator.css */\n.msgapi .cesium-selection-wrapper {\n position: absolute;\n width: 160px;\n height: 160px;\n pointer-events: none;\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 0.2s, opacity 0.2s ease-in;\n}\n.msgapi .cesium-selection-wrapper-visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s ease-out;\n}\n.msgapi .cesium-selection-wrapper svg {\n fill: #2e2;\n stroke: #000;\n stroke-width: 1.1px;\n}\n\n/* packages/widgets/Source/Timeline/Timeline.css */\n.msgapi .cesium-timeline-main {\n position: relative;\n left: 0;\n bottom: 0;\n overflow: hidden;\n border: solid 1px #888;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.msgapi .cesium-timeline-trackContainer {\n width: 100%;\n overflow: auto;\n border-top: solid 1px #888;\n position: relative;\n top: 0;\n left: 0;\n}\n.msgapi .cesium-timeline-tracks {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n}\n.msgapi .cesium-timeline-needle {\n position: absolute;\n left: 0;\n top: 1.7em;\n bottom: 0;\n width: 1px;\n background: #f00;\n}\n.msgapi .cesium-timeline-bar {\n position: relative;\n left: 0;\n top: 0;\n overflow: hidden;\n cursor: pointer;\n width: 100%;\n height: 1.7em;\n background: linear-gradient(to bottom, rgba(116, 117, 119, 0.8) 0%, rgba(58, 68, 82, 0.8) 11%, rgba(46, 50, 56, 0.8) 46%, rgba(53, 53, 53, 0.8) 81%, rgba(53, 53, 53, 0.8) 100%);\n}\n.msgapi .cesium-timeline-ruler {\n visibility: hidden;\n white-space: nowrap;\n font-size: 80%;\n z-index: -200;\n}\n.msgapi .cesium-timeline-highlight {\n position: absolute;\n bottom: 0;\n left: 0;\n background: #08f;\n}\n.msgapi .cesium-timeline-ticLabel {\n position: absolute;\n top: 0;\n left: 0;\n white-space: nowrap;\n font-size: 80%;\n color: #eee;\n}\n.msgapi .cesium-timeline-ticMain {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 1px;\n height: 50%;\n background: #eee;\n}\n.msgapi .cesium-timeline-ticSub {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 1px;\n height: 33%;\n background: #aaa;\n}\n.msgapi .cesium-timeline-ticTiny {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 1px;\n height: 25%;\n background: #888;\n}\n.msgapi .cesium-timeline-icon16 {\n display: block;\n position: absolute;\n width: 16px;\n height: 16px;\n background-image: url(data:text/plain;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sIDBITKIVzLEMAAAKNSURBVEjHxdXNSxRhHAfw7zzrqhuoWJnSkrippUVSEKsHI9BTUYdAJA/RoYMREV26rAdn6tAfUARi16hQqkOBQRgUEYFWEC3OwczMjdZd92VmdWfmeelgTjO7q7gb0VzmmZnn85vvPPPMM8B/3qTcE2PPpuTZKB1eWuUQACgXYACYwVFbCTTVeZXB/i55o4LFelcAZfStYD4vpAoPGAGo4GBcQEgSOAUMQyAezwK6iQfDPXnhS/FkHZ+/8VLMWxxqWkfH3gbMRNOYi2roavbja0zHQmoFPYf8ED4Ko4aivm9MOG/u9I8mwrafeK7a/tVrNc/bARYN5noadeq7q0342vXw9CIMU6BmW8rVP9cPBPe52uu+v3O/y9sB4gkTWs6Qsk0mj5ExXMelejvA8WafYmkmGPHanTijdtvif8rx5RiCjdWKs2Cp3jWRDl96KhrbqlBeJqBOLyLQXg0IgbkZDS0dO8EZxZfPSTA9jvDDK3mT0OmP1FXh3XwEEAKdTX5MRWLgjCK4pwH3xt/YnjgLHAv4lHTCAKMMu/wV+KZGob6PoKyMQ0+sgBpZVJZn0NterxQaVqef/DRn+/EXYds/mZx2eVeAW9d65dhCEsaKCb7K8HH0gqTevyh9GDkn0VULRiaLzJKGBu9swfdaiie5RVo9ESURN8E8BE0n7ggACJy8KzghSCzp6DmwWxkaCm24EBXr8wI8Hrkq06QBiRC0t24HALS11IBTCyJl4vb1AXmzpbVYTwoVOXN0h7L8Mwtm8bXPybIQ/5FCX3dA2cr6XowvGCA02CvztAnz9+JiZk1AMxG6fEreSoBiPNmoyNnuWiWVzAIAtISO08E6pZi/3N96AIDn4E3h3P8L/wshP+txtEs4JAAAAABJRU5ErkJggg==);\n background-repeat: no-repeat;\n}\n\n/* packages/widgets/Source/Viewer/Viewer.css */\n.msgapi .cesium-viewer {\n font-family: sans-serif;\n font-size: 16px;\n overflow: hidden;\n display: block;\n position: relative;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.msgapi .cesium-viewer-cesiumWidgetContainer {\n width: 100%;\n height: 100%;\n}\n.msgapi .cesium-viewer-bottom {\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n padding-right: 5px;\n}\n.msgapi .cesium-viewer .cesium-widget-credits {\n display: inline;\n position: static;\n bottom: auto;\n left: auto;\n padding-right: 0;\n color: #ffffff;\n font-size: 10px;\n text-shadow: 0 0 2px #000000;\n}\n.msgapi .cesium-viewer-timelineContainer {\n position: absolute;\n bottom: 0;\n left: 169px;\n right: 29px;\n height: 27px;\n padding: 0;\n margin: 0;\n overflow: hidden;\n font-size: 14px;\n}\n.msgapi .cesium-viewer-animationContainer {\n position: absolute;\n bottom: 0;\n left: 0;\n padding: 0;\n width: 169px;\n height: 112px;\n}\n.msgapi .cesium-viewer-fullscreenContainer {\n position: absolute;\n bottom: 0;\n right: 0;\n padding: 0;\n width: 29px;\n height: 29px;\n overflow: hidden;\n}\n.msgapi .cesium-viewer-vrContainer {\n position: absolute;\n bottom: 0;\n right: 0;\n padding: 0;\n width: 29px;\n height: 29px;\n overflow: hidden;\n}\n.msgapi .cesium-viewer-toolbar {\n display: block;\n position: absolute;\n top: 5px;\n right: 5px;\n}\n.msgapi .cesium-viewer-cesiumInspectorContainer {\n display: block;\n position: absolute;\n top: 50px;\n right: 10px;\n}\n.msgapi .cesium-viewer-geocoderContainer {\n position: relative;\n display: inline-block;\n margin: 0 3px;\n}\n.msgapi .cesium-viewer-cesium3DTilesInspectorContainer {\n display: block;\n position: absolute;\n top: 50px;\n right: 10px;\n max-height: calc(100% - 120px);\n box-sizing: border-box;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.msgapi .cesium-viewer-voxelInspectorContainer {\n display: block;\n position: absolute;\n top: 50px;\n right: 10px;\n max-height: calc(100% - 120px);\n box-sizing: border-box;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n/* packages/widgets/Source/widgets.css */\n',""]);const o=r},270752:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},250840:(e,t,n)=>{var i;!function(r,o,a,s){"use strict";var c,u=["","webkit","Moz","MS","ms","o"],l=o.createElement("div"),p="function",d=Math.round,h=Math.abs,f=Date.now;function m(e,t,n){return setTimeout(w(e,n),t)}function g(e,t,n){return!!Array.isArray(e)&&(b(e,n[t],n),!0)}function b(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==s)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),e.apply(this,arguments)}}c="function"!=typeof Object.assign?function(e){if(e===s||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function S(e){return e.trim().split(/\s+/g)}function M(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;in[t]})):i.sort()),i}function P(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=ie(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,c=a?a.center:o.center,u=t.center=re(i);t.timeStamp=f(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=ce(c,u),t.distance=se(c,u),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==j&&o.eventType!==V||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=ae(t.deltaX,t.deltaY);var l,p,d=oe(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=h(d.x)>h(d.y)?d.x:d.y,t.scale=a?(l=a.pointers,se((p=i)[0],p[1],ee)/se(l[0],l[1],ee)):1,t.rotation=a?function(e,t){return ce(t[1],t[0],ee)+ce(e[1],e[0],ee)}(a.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,r,o,a=e.lastInterval||t,c=t.timeStamp-a.timeStamp;if(t.eventType!=$&&(c>Z||a.velocity===s)){var u=t.deltaX-a.deltaX,l=t.deltaY-a.deltaY,p=oe(c,u,l);i=p.x,r=p.y,n=h(p.x)>h(p.y)?p.x:p.y,o=ae(u,l),e.lastInterval=t}else n=a.velocity,i=a.velocityX,r=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}(n,t);var m=e.element;D(t.srcEvent.target,m)&&(m=t.srcEvent.target),t.target=m}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function ie(e){for(var t=[],n=0;n=h(t)?e<0?H:W:t<0?Y:G}function se(e,t,n){n||(n=Q);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function ce(e,t,n){n||(n=Q);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}te.prototype={handler:function(){},init:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(z(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&A(this.element,this.evEl,this.domHandler),this.evTarget&&A(this.target,this.evTarget,this.domHandler),this.evWin&&A(z(this.element),this.evWin,this.domHandler)}};var ue={mousedown:j,mousemove:2,mouseup:V},le="mousedown",pe="mousemove mouseup";function de(){this.evEl=le,this.evWin=pe,this.pressed=!1,te.apply(this,arguments)}k(de,te,{handler:function(e){var t=ue[e.type];t&j&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=V),this.pressed&&(t&V&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:B,srcEvent:e}))}});var he={pointerdown:j,pointermove:2,pointerup:V,pointercancel:$,pointerout:$},fe={2:q,3:"pen",4:B,5:"kinect"},me="pointerdown",ge="pointermove pointerup pointercancel";function be(){this.evEl=me,this.evWin=ge,te.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(me="MSPointerDown",ge="MSPointerMove MSPointerUp MSPointerCancel"),k(be,te,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=he[i],o=fe[e.pointerType]||e.pointerType,a=o==q,s=M(t,e.pointerId,"pointerId");r&j&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):r&(V|$)&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var ve={touchstart:j,touchmove:2,touchend:V,touchcancel:$};function ye(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,te.apply(this,arguments)}function xe(e,t){var n=L(e.touches),i=L(e.changedTouches);return t&(V|$)&&(n=F(n.concat(i),"identifier",!0)),[n,i]}k(ye,te,{handler:function(e){var t=ve[e.type];if(t===j&&(this.started=!0),this.started){var n=xe.call(this,e,t);t&(V|$)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:q,srcEvent:e})}}});var ke={touchstart:j,touchmove:2,touchend:V,touchcancel:$},we="touchstart touchmove touchend touchcancel";function _e(){this.evTarget=we,this.targetIds={},te.apply(this,arguments)}function Ce(e,t){var n=L(e.touches),i=this.targetIds;if(t&(2|j)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=L(e.changedTouches),s=[],c=this.target;if(o=n.filter((function(e){return D(e.target,c)})),t===j)for(r=0;r-1&&i.splice(e,1)}),Ee)}}function Se(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+Ve(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+Ve(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Ze},canEmit:function(){for(var e=0;et.threshold&&r&t.direction},attrTest:function(e){return He.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=$e(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),k(Ye,He,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ze]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),k(Ge,je,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Pe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distancet.time;if(this._input=e,!i||!n||e.eventType&(V|$)&&!r)this.reset();else if(e.eventType&j)this.reset(),this._timer=m((function(){this.state=8,this.tryEmit()}),t.time,this);else if(e.eventType&V)return 8;return Ze},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&V?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),k(Xe,He,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ze]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),k(Je,He,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:X|J,pointers:1},getTouchAction:function(){return We.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(X|J)?t=e.overallVelocity:n&X?t=e.overallVelocityX:n&J&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&h(t)>this.options.velocity&&e.eventType&V},emit:function(e){var t=$e(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),k(Ke,je,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ie]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance{!function(t,n,i){var r=Object.getOwnPropertyNames,o="object"==typeof window?Object.getOwnPropertyNames(window):[],a=Object.defineProperty,s=Function.prototype.toString,c=Object.create,u=Object.prototype.hasOwnProperty,l=/^\n?function\s?(\w*)?_?\(/;function p(e,t,n){return"function"==typeof t&&(t=d(n=t).replace(/_$/,"")),a(e,t,{configurable:!0,writable:!0,value:n})}function d(e){return"function"!=typeof e?"":"_name"in e?e._name:"name"in e?e.name:s.call(e).match(l)[1]}function h(e,t){return t._name=e,t}var f=function(){var e={value:{writable:!0,value:i}},t=c(null),n=function(){var e=Math.random().toString(36).slice(2);return e in t?n():t[e]=e},s=n();function l(){var t=n(),i={};this.unlock=function(n){var r=function(e){if(u.call(e,s))return e[s];if(!Object.isExtensible(e))throw new TypeError("Object must be extensible");var t=c(null);return a(e,s,{value:t}),t}(n);if(u.call(r,t))return r[t](i);var o=c(null,e);return a(r,t,{value:function(e){if(e===i)return o}}),o}}return p(Object,h("getOwnPropertyNames",(function(e){var t,n=Object(e);if(n!==Window.prototype&&"toString"in n&&"[object Window]"===n.toString())try{t=r(e)}catch(e){t=o}else t=r(e);return u.call(e,s)&&t.splice(t.indexOf(s),1),t}))),p(l.prototype,h("get",(function(e){return this.unlock(e).value}))),p(l.prototype,h("set",(function(e,t){this.unlock(e).value=t}))),l}(),m=function(e){var r=function(e){if(null==e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Invalid WeakMap key")},o=function(t){var n=e.unlock(t).value;if(!n)throw new TypeError("WeakMap is not generic");return n};function a(n){if(this===t||null==this||this===a.prototype)return new a(n);!function(t,n){var i=e.unlock(t);if(i.value)throw new TypeError("Object is already a WeakMap");i.value=n}(this,new f),function(e,t){null!==t&&"object"==typeof t&&"function"==typeof t.forEach&&t.forEach((function(n,i){n instanceof Array&&2===n.length&&c.call(e,t[i][0],t[i][1])}))}(this,n)}function s(e){r(e);var t=o(this).get(e);return t===n?i:t}function c(e,t){r(e),o(this).set(e,t===i?n:t)}function u(e){return r(e),o(this).get(e)!==i}function l(){return o(this),"[object WeakMap]"}s._name="get",c._name="set",u._name="has",l._name="toString";var m=(""+Object).split("Object"),g=h("toString",(function(){return m[0]+d(this)+m[1]}));p(g,g);var b={__proto__:[]}instanceof Array?function(e){e.__proto__=g}:function(e){p(e,g)};return b(a),[l,s,c,u,function(e){r(e);var t=o(this),n=t.get(e)!==i;return t.set(e,i),n}].forEach((function(e){p(a.prototype,e),b(e)})),a}(new f),g=Object.create?function(){return Object.create(null)}:function(){return{}};function b(e){var t=new m;return e||(e=g),function(n,r){return r||2===arguments.length?t.set(n,r):(r=t.get(n))===i&&(r=e(n),t.set(n,r)),r}}e.exports=m,m.createStorage=b,t.WeakMap&&(t.WeakMap.createStorage=b)}(function(){return this}())},857023:function(e,t,n){!function(t,i){"use strict";var r,o;function a(e,t){if(!e||"object"!=typeof e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");return function(e){return!!e&&"object"==typeof e&&e.constructor===Object}(t)?(t.deep=t.deep||!1,t.fields=t.fields||Object.getOwnPropertyNames(e),t.lazy=t.lazy||!1,d(e,t.fields,t)):d(e,t||Object.getOwnPropertyNames(e),{}),e}var s,c,u=/^function\s*([^\s(]+)/;function l(e,t,n){var o=r.isObservable(e),a=!o&&Array.isArray(e),s=o?e:a?r.observableArray(e):r.observable(e);return n[t]=function(){return s},(a||o&&"push"in s)&&g(r,s),{configurable:!0,enumerable:!0,get:s,set:r.isWriteableObservable(s)?s:i}}function p(e,t,n){if(r.isObservable(e))return l(e,t,n);var i;function o(e,t){return i?t?i(e):i:Array.isArray(e)?(i=r.observableArray(e),g(r,i),i):i=r.observable(e)}return n[t]=function(){return o(e)},{configurable:!0,enumerable:!0,get:function(){return o(e)()},set:function(e){o(e,!0)}}}function d(e,t,n){if(t.length){var i=h(e,!0),r={};t.forEach((function(t){if(!(t in i)&&!1!==Object.getOwnPropertyDescriptor(e,t).configurable){var o=e[t];r[t]=(n.lazy?p:l)(o,t,i),n.deep&&function(e){return e&&"object"==typeof e&&"Object"===((t=e.constructor).name?t.name:(t.toString().trim().match(u)||[])[1]);var t}(o)&&d(o,Object.keys(o),n)}})),Object.defineProperties(e,r)}}function h(e,t){s||(s=o());var n=s.get(e);return!n&&t&&(n={},s.set(e,n)),n}function f(e,t){if(s)if(1===arguments.length)s.delete(e);else{var n=h(e,!1);n&&t.forEach((function(e){delete n[e]}))}}function m(e,t,n){var i={owner:e,deferEvaluation:!0};if("function"==typeof n)i.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof n.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');i.read=n.get,i.write=n.set}return e[t]=this.computed(i),a.call(this,e,[t]),e}function g(e,t){var n=null;e.computed((function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=function(e,t,n){var i=function(e,t){c||(c=o());var n=c.get(t);if(!n){n=new e.subscribable,c.set(t,n);var i={};!function(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(i){var r=e[i];e[i]=function(){var e=r.apply(this,arguments);return!0!==n.pause&&t.notifySubscribers(this),e}}))}(t,n,i),function(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;i.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),o}})}))}(e,t,n,i)}return n}(e,n);return i.subscribe(t)}(e,t,i))}))}function b(e,t){if(!e||"object"!=typeof e)return null;var n=h(e,!1);return n&&t in n?n[t]():null}function v(e,t){if(!e||"object"!=typeof e)return!1;var n=h(e,!1);return!!n&&t in n}function y(e,t){var n=b(e,t);n&&n.valueHasMutated()}!function(){r=n(448527);var i=t.WeakMap||n(735335);!function(e){e.track=a,e.untrack=f,e.getObservable=b,e.valueHasMutated=y,e.defineProperty=m,e.es5={getAllObservablesForObject:h,notifyWhenPresentOrFutureArrayValuesMutate:g,isTracked:v}}(r),o=function(){return new i},e.exports=r}()}("undefined"!=typeof window?window:void 0!==n.g?n.g:this)},448527:(e,t,n)=>{var i,r,o;!function(a){var s=this||(0,eval)("this"),c=s.document,u=s.navigator,l=s.jQuery,p=s.JSON;l||"undefined"==typeof jQuery||(l=jQuery),function(a){r=[t,n],void 0===(o="function"==typeof(i=a)?i.apply(t,r):i)||(e.exports=o)}((function(e,t){function n(e,t){return(null===e||typeof e in k)&&e===t}function i(e,t){var n;return function(){n||(n=x.a.setTimeout((function(){n=a,e()}),t))}}function r(e,t){var n;return function(){clearTimeout(n),n=x.a.setTimeout(e,t)}}function o(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function d(e,t){null!==t&&t.s&&t.s()}function h(e,t){var n=this.qd,i=n[A];i.ra||(this.Qb&&this.mb[t]?(n.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):i.I[t]||n.uc(t,e,i.J?{da:e}:n.$c(e)),e.Ja&&e.gd())}var f,m,g,b,v,y,x=void 0!==e?e:{};x.b=function(e,t){for(var n=e.split("."),i=x,r=0;rx.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,n){var i=[];if(e)for(var r=0,o=e.length;ri?n&&e.push(t):n||e.splice(i,1)},Ba:o,extend:t,setPrototypeOf:n,Ab:o?n:t,P:e,Ga:function(e,t,n){if(!e)return e;var i,o={};for(i in e)r.call(e,i)&&(o[i]=t.call(n,e[i],i,e));return o},Tb:function(e){for(;e.firstChild;)x.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=x.a.la(e))[0]&&e[0].ownerDocument||c).createElement("div"),n=0,i=e.length;nb?e.setAttribute("selected",t):e.selected=t},Db:function(e){return null===e||e===a?"":e.trim?e.trim():e.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return!(16&~t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return x.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!x.a.Lb(e,x.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return x.onError?function(){try{return e.apply(this,arguments)}catch(e){throw x.onError&&x.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(x.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw x.onError&&x.onError(e),e}),0)},B:function(e,t,n){var i=x.a.Ac(n);if(n=g[t],x.options.useOnlyNativeEvents||n||!l)if(n||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var r=function(t){i.call(e,t)},o="on"+t;e.attachEvent(o,r),x.a.K.za(e,(function(){e.detachEvent(o,r)}))}else e.addEventListener(t,i,!1);else m||(m="function"==typeof l(e).on?"on":"bind"),l(e)[m](t,i)},Fb:function(e,t){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var n;if(n=!("input"!==x.a.R(e)||!e.type||"click"!=t.toLowerCase()||"checkbox"!=(n=e.type)&&"radio"!=n),x.options.useOnlyNativeEvents||!l||n)if("function"==typeof c.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(n=c.createEvent(f[t]||"HTMLEvents")).initEvent(t,!0,!0,s,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(n)}else if(n&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+t)}else l(e).trigger(t)},f:function(e){return x.O(e)?e():e},bc:function(e){return x.O(e)?e.v():e},Eb:function(e,t,n){var r;t&&("object"==typeof e.classList?(r=e.classList[n?"add":"remove"],x.a.D(t.match(v),(function(t){r.call(e.classList,t)}))):"string"==typeof e.className.baseVal?i(e.className,"baseVal",t,n):i(e,"className",t,n))},Bb:function(e,t){var n=x.a.f(t);null!==n&&n!==a||(n="");var i=x.h.firstChild(e);!i||3!=i.nodeType||x.h.nextSibling(i)?x.h.va(e,[e.ownerDocument.createTextNode(n)]):i.data=n,x.a.Ad(e)},Yc:function(e,t){if(e.name=t,7>=b)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(c.createElement(""),!1)}catch(e){}},Ad:function(e){9<=b&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(b){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=x.a.f(e),t=x.a.f(t);for(var n=[],i=e;i<=t;i++)n.push(i);return n},la:function(e){for(var t=[],n=0,i=e.length;n",""],tbody:m,tfoot:m,tr:[2,"","
"],td:g=[3,"","
"],th:g,option:b=[1,""],optgroup:b},y=8>=x.a.W,x.a.ua=function(e,t){var n;if(l){if(l.parseHTML)n=l.parseHTML(e,t)||[];else if((n=l.clean([e],t))&&n[0]){for(var i=n[0];i.parentNode&&11!==i.parentNode.nodeType;)i=i.parentNode;i.parentNode&&i.parentNode.removeChild(i)}}else{(n=t)||(n=c),i=n.parentWindow||n.defaultView||s;var r,o=x.a.Db(e).toLowerCase(),a=n.createElement("div");for(r=(o=o.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&v[o[1]]||f,o=r[0],r="ignored
"+r[1]+e+r[2]+"
","function"==typeof i.innerShiv?a.appendChild(i.innerShiv(r)):(y&&n.body.appendChild(a),a.innerHTML=r,y&&a.parentNode.removeChild(a));o--;)a=a.lastChild;n=x.a.la(a.lastChild.childNodes)}return n},x.a.Md=function(e,t){var n=x.a.ua(e,t);return n.length&&n[0].parentElement||x.a.Yb(n)},x.a.fc=function(e,t){if(x.a.Tb(e),null!==(t=x.a.f(t))&&t!==a)if("string"!=typeof t&&(t=t.toString()),l)l(e).html(t);else for(var n=x.a.ua(t,e.ownerDocument),i=0;it){if(5e3<=++n){a=r,x.a.Gc(Error("'Too much recursion' after processing "+n+" task groups."));break}t=r}try{e()}catch(e){x.a.Gc(e)}}}function t(){e(),a=r=i.length=0}var n,i=[],r=0,o=1,a=0;return n=s.MutationObserver?function(e){var t=c.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(t):c&&"onreadystatechange"in c.createElement("script")?function(e){var t=c.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,c.documentElement.removeChild(t),t=null,e()},c.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},{scheduler:n,zb:function(e){return r||x.na.scheduler(t),i[r++]=e,o++},cancel:function(e){(e-=o-r)>=a&&en[0]?o+n[0]:n[0]),o),o=1===a?o:Math.min(t+(n[1]||0),o),a=t+a-2,l=Math.max(o,a);for(var p=[],d=[],h=2;tt;t++)e=e();return e}))},x.toJSON=function(e,t,n){return e=x.ad(e),x.a.hc(e,t,n)},t.prototype={constructor:t,save:function(e,t){var n=x.a.A(this.keys,e);0<=n?this.values[n]=t:(this.keys.push(e),this.values.push(t))},get:function(e){return 0<=(e=x.a.A(this.keys,e))?this.values[e]:a}}}(),x.b("toJS",x.ad),x.b("toJSON",x.toJSON),x.Wd=function(e,t,n){function i(t){var i=x.xb(e,n).extend({ma:"always"}),r=i.subscribe((function(e){e&&(r.s(),t(e))}));return i.notifySubscribers(i.v()),r}return"function"!=typeof Promise||t?i(t.bind(n)):new Promise(i)},x.b("when",x.Wd),x.w={M:function(e){switch(x.a.R(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?x.a.g.get(e,x.c.options.$b):7>=x.a.W?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?x.w.M(e.options[e.selectedIndex]):a;default:return e.value}},cb:function(e,t,n){switch(x.a.R(e)){case"option":"string"==typeof t?(x.a.g.set(e,x.c.options.$b,a),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=t):(x.a.g.set(e,x.c.options.$b,t),e.__ko__hasDomDataOptionValue__=!0,e.value="number"==typeof t?t:"");break;case"select":""!==t&&null!==t||(t=a);for(var i,r=-1,o=0,s=e.options.length;o=c){n.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=c=0,s=[];continue}}else if(58===p){if(!c&&!t&&1===s.length){t=s.pop();continue}}else{if(47===p&&1arguments.length){if(!(t=c.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!t||1!==t.nodeType&&8!==t.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(f(e,n),t)},x.Dc=function(e){return!e||1!==e.nodeType&&8!==e.nodeType?a:x.Td(e)},x.Ec=function(e){return(e=x.Dc(e))?e.$data:a},x.b("bindingHandlers",x.c),x.b("bindingEvent",x.i),x.b("bindingEvent.subscribe",x.i.subscribe),x.b("bindingEvent.startPossiblyAsyncContentBinding",x.i.Cb),x.b("applyBindings",x.vc),x.b("applyBindingsToDescendants",x.Oa),x.b("applyBindingAccessorsToNode",x.ib),x.b("applyBindingsToNode",x.ld),x.b("contextFor",x.Dc),x.b("dataFor",x.Ec)}(),function(e){function t(t,i){var a,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(i):((s=r[t]=new x.T).subscribe(i),n(t,(function(e,n){var i=!(!n||!n.synchronous);o[t]={definition:e,Gd:i},delete r[t],a||i?s.notifySubscribers(e):x.na.zb((function(){s.notifySubscribers(e)}))})),a=!0)}function n(e,t){i("getConfig",[e],(function(n){n?i("loadComponent",[e,n],(function(e){t(e,n)})):t(null,null)}))}function i(t,n,r,o){o||(o=x.j.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var c=!1;if(s.apply(a,n.concat((function(e){c?r(null):null!==e?r(e):i(t,n,r,o)})))!==e&&(c=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else i(t,n,r,o)}else r(null)}var r={},o={};x.j={get:function(n,i){var r=Object.prototype.hasOwnProperty.call(o,n)?o[n]:e;r?r.Gd?x.u.G((function(){i(r.definition)})):x.na.zb((function(){i(r.definition)})):t(n,i)},Bc:function(e){delete o[e]},oc:i},x.j.loaders=[],x.b("components",x.j),x.b("components.get",x.j.get),x.b("components.clearCachedDefinition",x.j.Bc)}(),function(){function e(e,t,n,i){function r(){0==--s&&i(a)}var a={},s=2,c=n.template;n=n.viewModel,c?o(t,c,(function(t){x.j.oc("loadTemplate",[e,t],(function(e){a.template=e,r()}))})):r(),n?o(t,n,(function(t){x.j.oc("loadViewModel",[e,t],(function(e){a[l]=e,r()}))})):r()}function n(e,t,i){if("function"==typeof t)i((function(e){return new t(e)}));else if("function"==typeof t[l])i(t[l]);else if("instance"in t){var r=t.instance;i((function(){return r}))}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function i(e){switch(x.a.R(e)){case"script":return x.a.ua(e.text);case"textarea":return x.a.ua(e.value);case"template":if(r(e.content))return x.a.Ca(e.content.childNodes)}return x.a.Ca(e.childNodes)}function r(e){return s.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function o(e,n,i){"string"==typeof n.require?t||s.require?(t||s.require)([n.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),i(e)})):e("Uses require, but no AMD loader is present"):i(n)}function a(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};x.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(x.j.tb(e))throw Error("Component "+e+" is already registered");u[e]=t},x.j.tb=function(e){return Object.prototype.hasOwnProperty.call(u,e)},x.j.unregister=function(e){delete u[e],x.j.Bc(e)},x.j.Fc={getConfig:function(e,t){t(x.j.tb(e)?u[e]:null)},loadComponent:function(t,n,i){var r=a(t);o(r,n,(function(n){e(t,r,n,i)}))},loadTemplate:function(e,t,n){if(e=a(e),"string"==typeof t)n(x.a.ua(t));else if(t instanceof Array)n(t);else if(r(t))n(x.a.la(t.childNodes));else if(t.element)if(t=t.element,s.HTMLElement?t instanceof HTMLElement:t&&t.tagName&&1===t.nodeType)n(i(t));else if("string"==typeof t){var o=c.getElementById(t);o?n(i(o)):e("Cannot find element with ID "+t)}else e("Unknown element type: "+t);else e("Unknown template value: "+t)},loadViewModel:function(e,t,i){n(a(e),t,i)}};var l="createViewModel";x.b("components.register",x.j.register),x.b("components.isRegistered",x.j.tb),x.b("components.unregister",x.j.unregister),x.b("components.defaultLoader",x.j.Fc),x.j.loaders.push(x.j.Fc),x.j.dd=u}(),function(){function e(e,n){if(i=e.getAttribute("params")){var i=t.parseBindingsString(i,n,e,{valueAccessors:!0,bindingParams:!0}),r=(i=x.a.Ga(i,(function(t){return x.o(t,null,{l:e})})),x.a.Ga(i,(function(t){var n=t.v();return t.ja()?x.o({read:function(){return x.a.f(t())},write:x.Za(n)&&function(e){t()(e)},l:e}):n})));return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=i),r}return{$raw:{}}}x.j.getComponentNameForNode=function(e){var t=x.a.R(e);if(x.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=x.a.W&&e.tagName===t))return t},x.j.tc=function(t,n,i,r){if(1===n.nodeType){var o=x.j.getComponentNameForNode(n);if(o){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(n,i)};t.component=r?function(){return a}:a}}return t};var t=new x.ga;9>x.a.W&&(x.j.register=function(e){return function(t){return e.apply(this,arguments)}}(x.j.register),c.createDocumentFragment=function(e){return function(){var t,n=e(),i=x.j.dd;for(t in i);return n}}(c.createDocumentFragment))}(),function(){var e=0;x.c.component={init:function(t,n,i,r,o){function a(){var e=s&&s.dispose;"function"==typeof e&&e.call(s),u&&u.s(),c=s=u=null}var s,c,u,l=x.a.la(x.h.childNodes(t));return x.h.Ea(t),x.a.K.za(t,a),x.o((function(){var i,r,p=x.a.f(n());if("string"==typeof p?i=p:(i=x.a.f(p.name),r=x.a.f(p.params)),!i)throw Error("No component name specified");var d=x.i.Cb(t,o),h=c=++e;x.j.get(i,(function(e){if(c===h){if(a(),!e)throw Error("Unknown component '"+i+"'");!function(e,t,n){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=x.a.Ca(t),x.h.va(n,e)}(i,e,t);var n=function(e,t,n){var i=e.createViewModel;return i?i.call(e,t,n):t}(e,r,{element:t,templateNodes:l});e=d.createChildContext(n,{extend:function(e){e.$component=n,e.$componentTemplateNodes=l}}),n&&n.koDescendantsComplete&&(u=x.i.subscribe(t,x.i.pa,n.koDescendantsComplete,n)),s=n,x.Oa(e,t)}}))}),null,{l:t}),{controlsDescendantBindings:!0}}},x.h.ea.component=!0}();var L={class:"className",for:"htmlFor"};x.c.attr={update:function(e,t){var n=x.a.f(t())||{};x.a.P(n,(function(t,n){n=x.a.f(n);var i=t.indexOf(":"),r=(i="lookupNamespaceURI"in e&&0=x.a.W&&t in L?(t=L[t],r?e.removeAttribute(t):e[t]=n):r||(i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)),"name"===t&&x.a.Yc(e,r?"":n)}))}},x.c.checked={after:["value","attr"],init:function(e,t,n){function i(){var i=e.checked,c=r();if(!x.S.Ya()&&(i||!s&&!x.S.qa())){var p=x.u.G(t);if(u){var h=l?p.v():p,f=d;d=c,f!==c?i&&(x.a.Na(h,c,!0),x.a.Na(h,f,!1)):x.a.Na(h,c,i),l&&x.Za(p)&&p(h)}else o&&(c===a?c=i:i||(c=a)),x.m.eb(p,n,"checked",c,!0)}}var r=x.xb((function(){return n.has("checkedValue")?x.a.f(n.get("checkedValue")):p?n.has("value")?x.a.f(n.get("value")):e.value:void 0})),o="checkbox"==e.type,s="radio"==e.type;if(o||s){var c=t(),u=o&&x.a.f(c)instanceof Array,l=!(u&&c.push&&c.splice),p=s||u,d=u?r():a;s&&!e.name&&x.c.uniqueName.init(e,(function(){return!0})),x.o(i,null,{l:e}),x.a.B(e,"click",i),x.o((function(){var n=x.a.f(t()),i=r();u?(e.checked=0<=x.a.A(n,i),d=i):e.checked=o&&i===a?!!n:r()===n}),null,{l:e}),c=a}}},x.m.wa.checked=!0,x.c.checkedValue={update:function(e,t){e.value=x.a.f(t())}},x.c.class={update:function(e,t){var n=x.a.Db(x.a.f(t()));x.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=n,x.a.Eb(e,n,!0)}},x.c.css={update:function(e,t){var n=x.a.f(t());null!==n&&"object"==typeof n?x.a.P(n,(function(t,n){n=x.a.f(n),x.a.Eb(e,t,n)})):x.c.class.update(e,t)}},x.c.enable={update:function(e,t){var n=x.a.f(t());n&&e.disabled?e.removeAttribute("disabled"):n||e.disabled||(e.disabled=!0)}},x.c.disable={update:function(e,t){x.c.enable.update(e,(function(){return!x.a.f(t())}))}},x.c.event={init:function(e,t,n,i,r){var o=t()||{};x.a.P(o,(function(o){"string"==typeof o&&x.a.B(e,o,(function(e){var a,s=t()[o];if(s){try{var c=x.a.la(arguments);i=r.$data,c.unshift(i),a=s.apply(i,c)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===n.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},x.c.foreach={Rc:function(e){return function(){var t=e(),n=x.a.bc(t);return n&&"number"!=typeof n.length?(x.a.f(t),{foreach:n.data,as:n.as,noChildContext:n.noChildContext,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:x.ba.Ma}):{foreach:t,templateEngine:x.ba.Ma}}},init:function(e,t){return x.c.template.init(e,x.c.foreach.Rc(t))},update:function(e,t,n,i,r){return x.c.template.update(e,x.c.foreach.Rc(t),n,i,r)}},x.m.Ra.foreach=!1,x.h.ea.foreach=!0,x.c.hasfocus={init:function(e,t,n){function i(i){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch(e){o=r.body}i=o===e}r=t(),x.m.eb(r,n,"hasfocus",i,!0),e.__ko_hasfocusLastValue=i,e.__ko_hasfocusUpdating=!1}var r=i.bind(null,!0),o=i.bind(null,!1);x.a.B(e,"focus",r),x.a.B(e,"focusin",r),x.a.B(e,"blur",o),x.a.B(e,"focusout",o),e.__ko_hasfocusLastValue=!1},update:function(e,t){var n=!!x.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===n||(n?e.focus():e.blur(),!n&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),x.u.G(x.a.Fb,null,[e,n?"focusin":"focusout"]))}},x.m.wa.hasfocus=!0,x.c.hasFocus=x.c.hasfocus,x.m.wa.hasFocus="hasfocus",x.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){x.a.fc(e,t())}},function(){function e(e,t,n){x.c[e]={init:function(e,i,r,o,a){var s,c,u,l,p,d={};if(t){o=r.get("as");var h=r.get("noChildContext");d={as:o,noChildContext:h,exportDependencies:p=!(o&&h)}}return l=(u="render"==r.get("completeOn"))||r.has(x.i.pa),x.o((function(){var r,o=x.a.f(i()),h=!n!=!o,f=!c;(p||h!==s)&&(l&&(a=x.i.Cb(e,a)),h&&(t&&!p||(d.dataDependency=x.S.o()),r=t?a.createChildContext("function"==typeof o?o:i,d):x.S.qa()?a.extend(null,d):a),f&&x.S.qa()&&(c=x.a.Ca(x.h.childNodes(e),!0)),h?(f||x.h.va(e,x.a.Ca(c)),x.Oa(r,e)):(x.h.Ea(e),u||x.i.ma(e,x.i.H)),s=h)}),null,{l:e}),{controlsDescendantBindings:!0}}},x.m.Ra[e]=!1,x.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),x.c.let={init:function(e,t,n,i,r){return t=r.extend(t),x.Oa(t,e),{controlsDescendantBindings:!0}}},x.h.ea.let=!0;var F={};x.c.options={init:function(e){if("select"!==x.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0i)var u=x.a.g.Z(),l=x.a.g.Z(),p=function(e){var t=this.activeElement;(t=t&&x.a.g.get(t,l))&&t(e)},d=function(e,t){var n=e.ownerDocument;x.a.g.get(n,u)||(x.a.g.set(n,u,!0),x.a.B(n,"selectionchange",p)),x.a.g.set(e,l,t)};x.c.textInput={init:function(o,s,c){function u(e,t){x.a.B(o,e,t)}function l(){h||(f=o.value,h=x.a.setTimeout(p,4))}function p(){clearTimeout(h),f=h=a;var e=o.value;m!==e&&(m=e,x.m.eb(s(),c,"textInput",e))}var h,f,m=o.value,g=9==x.a.W?l:p,b=!1;i&&u("keypress",p),11>i&&u("propertychange",(function(e){b||"value"!==e.propertyName||g(e)})),8==i&&(u("keyup",p),u("keydown",p)),d&&(d(o,g),u("dragend",l)),(!i||9<=i)&&u("input",g),5>t&&"textarea"===x.a.R(o)?(u("keydown",l),u("paste",l),u("cut",l)):11>e?u("keydown",l):4>n?(u("DOMAutoComplete",p),u("dragdrop",p),u("drop",p)):r&&"number"===o.type&&u("keydown",l),u("change",p),u("blur",p),x.o((function e(){var t=x.a.f(s());null!==t&&t!==a||(t=""),f!==a&&t===f?x.a.setTimeout(e,4):o.value!==t&&(b=!0,o.value=t,b=!1,m=o.value)}),null,{l:o})}},x.m.wa.textInput=!0,x.c.textinput={preprocess:function(e,t,n){n("textInput",e)}}}(),x.c.uniqueName={init:function(e,t){if(t()){var n="ko_unique_"+ ++x.c.uniqueName.rd;x.a.Yc(e,n)}}},x.c.uniqueName.rd=0,x.c.using={init:function(e,t,n,i,r){var o;return n.has("as")&&(o={as:n.get("as"),noChildContext:n.get("noChildContext")}),t=r.createChildContext(t,o),x.Oa(t,e),{controlsDescendantBindings:!0}}},x.h.ea.using=!0,x.c.value={init:function(e,t,n){var i=x.a.R(e),r="input"==i;if(!r||"checkbox"!=e.type&&"radio"!=e.type){var o=[],s=n.get("valueUpdate"),c=!1,u=null;s&&(o="string"==typeof s?[s]:x.a.wc(s),x.a.Pa(o,"change"));var l,p,d=function(){u=null,c=!1;var i=t(),r=x.w.M(e);x.m.eb(i,n,"value",r)};!x.a.W||!r||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=x.a.A(o,"propertychange")||(x.a.B(e,"propertychange",(function(){c=!0})),x.a.B(e,"focus",(function(){c=!1})),x.a.B(e,"blur",(function(){c&&d()}))),x.a.D(o,(function(t){var n=d;x.a.Ud(t,"after")&&(n=function(){u=x.w.M(e),x.a.setTimeout(d,0)},t=t.substring(5)),x.a.B(e,t,n)})),l=r&&"file"==e.type?function(){var n=x.a.f(t());null===n||n===a||""===n?e.value="":x.u.G(d)}:function(){var r=x.a.f(t()),o=x.w.M(e);null!==u&&r===u?x.a.setTimeout(l,0):r===o&&o!==a||("select"===i?(o=n.get("valueAllowUnset"),x.w.cb(e,r,o),o||r===x.w.M(e)||x.u.G(d)):x.w.cb(e,r))},"select"===i?x.i.subscribe(e,x.i.H,(function(){p?n.get("valueAllowUnset")?l():d():(x.a.B(e,"change",d),p=x.o(l,null,{l:e}))}),null,{notifyImmediately:!0}):(x.a.B(e,"change",d),x.o(l,null,{l:e}))}else x.ib(e,{checkedValue:t})},update:function(){}},x.m.wa.value=!0,x.c.visible={update:function(e,t){var n=x.a.f(t()),i="none"!=e.style.display;n&&!i?e.style.display="":!n&&i&&(e.style.display="none")}},x.c.hidden={update:function(e,t){x.c.visible.update(e,(function(){return!x.a.f(t())}))}},function(e){x.c[e]={init:function(t,n,i,r,o){return x.c.event.init.call(this,t,(function(){var t={};return t[e]=n(),t}),i,r,o)}}}("click"),x.ca=function(){},x.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},x.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},x.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||c).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new x.C.F(n)}if(1==e.nodeType||8==e.nodeType)return new x.C.ia(e);throw Error("Unknown template type: "+e)},x.ca.prototype.renderTemplate=function(e,t,n,i){return e=this.makeTemplateSource(e,i),this.renderTemplateSource(e,t,n,i)},x.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},x.ca.prototype.rewriteTemplate=function(e,t,n){t=t((e=this.makeTemplateSource(e,n)).text()),e.text(t),e.data("isRewritten",!0)},x.b("templateEngine",x.ca),x.kc=function(){function e(e,t,n,i){e=x.m.ac(e);for(var r=x.m.Ra,o=0;o]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,n){t.isTemplateRewritten(e,n)||t.rewriteTemplate(e,(function(e){return x.kc.Ld(e,t)}),n)},Ld:function(i,r){return i.replace(t,(function(t,n,i,o,a){return e(a,n,i,r)})).replace(n,(function(t,n){return e(n,"\x3c!-- ko --\x3e","#comment",r)}))},md:function(e,t){return x.aa.Xb((function(n,i){var r=n.nextSibling;r&&r.nodeName.toLowerCase()===t&&x.ib(r,e,i)}))}}}(),x.b("__tr_ambtns",x.kc.md),function(){x.C={},x.C.F=function(e){if(this.F=e){var t=x.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},x.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?x.a.fc(this.F,t):this.F[e]=t};var e=x.a.g.Z()+"_";x.C.F.prototype.data=function(t){if(1===arguments.length)return x.a.g.get(this.F,e+t);x.a.g.set(this.F,e+t,arguments[1])};var t=x.a.g.Z();x.C.F.prototype.nodes=function(){var e=this.F;if(0==arguments.length){var n=x.a.g.get(e,t)||{},i=n.lb||(3===this.ab?e.content:4===this.ab?e:a);if(!i||n.jd){var r=this.text();r&&r!==n.bb&&(i=x.a.Md(r,e.ownerDocument),x.a.g.set(e,t,{lb:i,bb:r,jd:!0}))}return i}n=arguments[0],this.ab!==a&&this.text(""),x.a.g.set(e,t,{lb:n})},x.C.ia=function(e){this.F=e},x.C.ia.prototype=new x.C.F,x.C.ia.prototype.constructor=x.C.ia,x.C.ia.prototype.text=function(){if(0==arguments.length){var e=x.a.g.get(this.F,t)||{};return e.bb===a&&e.lb&&(e.bb=e.lb.innerHTML),e.bb}x.a.g.set(this.F,t,{bb:arguments[0]})},x.b("templateSources",x.C),x.b("templateSources.domElement",x.C.F),x.b("templateSources.anonymousTemplate",x.C.ia)}(),function(){function e(e,t,n){var i;for(t=x.h.nextSibling(t);e&&(i=e)!==t;)n(i,e=x.h.nextSibling(i))}function t(t,n){if(t.length){var i=t[0],r=t[t.length-1],o=i.parentNode,a=x.ga.instance,s=a.preprocessNode;if(s){if(e(i,r,(function(e,t){var n=e.previousSibling,o=s.call(a,e);o&&(e===i&&(i=o[0]||t),e===r&&(r=o[o.length-1]||n))})),t.length=0,!i)return;i===r?t.push(i):(t.push(i,r),x.a.Ua(t,o))}e(i,r,(function(e){1!==e.nodeType&&8!==e.nodeType||x.vc(n,e)})),e(i,r,(function(e){1!==e.nodeType&&8!==e.nodeType||x.aa.cd(e,[n])})),x.a.Ua(t,o)}}function n(e){return e.nodeType?e:0x.a.W||!e.nodes?null:e.nodes())?x.a.la(t.cloneNode(!0).childNodes):(e=e.text(),x.a.ua(e,i))},x.ba.Ma=new x.ba,x.gc(x.ba.Ma),x.b("nativeTemplateEngine",x.ba),function(){x.$a=function(){var e=this.Hd=function(){if(!l||!l.tmpl)return 0;try{if(0<=l.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,n,i,r){if(r=r||c,i=i||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var o=t.data("precompiled");return o||(o=t.text()||"",o=l.template(null,"{{ko_with $item.koBindingContext}}"+o+"{{/ko_with}}"),t.data("precompiled",o)),t=[n.$data],n=l.extend({koBindingContext:n},i.templateOptions),(n=l.tmpl(o,t,n)).appendTo(r.createElement("div")),l.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){c.write("