@bimdata/viewer 2.16.2-beta.2 → 2.16.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1381,7 +1381,7 @@ Fragment shader:
1381
1381
  } catch (error) {
1382
1382
  console.error(error);
1383
1383
  throw error;
1384
- }`}function Y$(t,e=!0,i){const o=i||new Set;if(t){if(X$(t))o.add(t);else if(X$(t.buffer))o.add(t.buffer);else if(!ArrayBuffer.isView(t)&&e&&typeof t=="object")for(const r in t)Y$(t[r],e,o)}return i===void 0?Array.from(o):[]}function X$(t){return t?t instanceof ArrayBuffer||typeof MessagePort<"u"&&t instanceof MessagePort||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas:!1}const uS=()=>{};class hS{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&Ga||typeof cS<"u"&&!Ga}constructor(e){const{name:i,source:o,url:r}=e;wc(o||r),this.name=i,this.source=o,this.url=r,this.onMessage=uS,this.onError=n=>console.log(n),this.worker=Ga?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=uS,this.onError=uS,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,i){i=i||Y$(e),this.worker.postMessage(e,i)}_getErrorFromErrorEvent(e){let i="Failed to load ";return i+=`worker ${this.name} from ${this.url}. `,e.message&&(i+=`${e.message} in `),e.lineno&&(i+=`:${e.lineno}:${e.colno}`),new Error(i)}_createBrowserWorker(){this._loadableURL=wDt({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=i=>{i.data?this.onMessage(i.data):this.onError(new Error("No data received"))},e.onerror=i=>{this.onError(this._getErrorFromErrorEvent(i)),this.terminated=!0},e.onmessageerror=i=>console.error(i),e}_createNodeWorker(){let e;if(this.url){const i=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new cS(i,{eval:!1})}else if(this.source)e=new cS(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",i=>{this.onMessage(i)}),e.on("error",i=>{this.onError(i)}),e.on("exit",i=>{}),e}}class kDt{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return hS.isSupported()}constructor(e){this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,i=(r,n,a)=>r.done(a),o=(r,n)=>r.error(n)){const r=new Promise(n=>(this.jobQueue.push({name:e,onMessage:i,onError:o,onStart:n}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const i=this.jobQueue.shift();if(i){this.onDebug({message:"Starting job",name:i.name,workerThread:e,backlog:this.jobQueue.length});const o=new bDt(i.name,e);e.onMessage=r=>i.onMessage(o,r.type,r.payload),e.onError=r=>i.onError(o,r),i.onStart(o);try{await o.result}catch(r){console.error(`Worker exception: ${r}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!Ga||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new hS({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return yDt?this.maxMobileConcurrency:this.maxConcurrency}}const MDt={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class gu{props;workerPools=new Map;static _workerFarm;static isSupported(){return hS.isSupported()}static getWorkerFarm(e={}){return gu._workerFarm=gu._workerFarm||new gu({}),gu._workerFarm.setProps(e),gu._workerFarm}constructor(e){this.props={...MDt},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const i of this.workerPools.values())i.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:i,source:o,url:r}=e;let n=this.workerPools.get(i);return n||(n=new kDt({name:i,source:o,url:r}),n.setProps(this._getWorkerPoolProps()),this.workerPools.set(i,n)),n}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function EDt(t,e={}){const i=e[t.id]||{},o=Ga?`${t.id}-worker.js`:`${t.id}-worker-node.js`;let r=i.workerUrl;if(!r&&t.id==="compression"&&(r=e.workerUrl),e._workerType==="test"&&(Ga?r=`modules/${t.module}/dist/${o}`:r=`modules/${t.module}/src/workers/${t.id}-worker-node.ts`),!r){let n=t.version;n==="latest"&&(n=mDt);const a=n?`@${n}`:"";r=`https://unpkg.com/@loaders.gl/${t.module}${a}/dist/${o}`}return wc(r),r}function BDt(t,e=J$){wc(t,"no worker provided");const i=t.version;return!(!e||!i)}const pS={};async function xh(t,e=null,i={},o=null){return e&&(t=PDt(t,e,i,o)),pS[t]=pS[t]||IDt(t),await pS[t]}function PDt(t,e,i={},o=null){if(!i.useLocalLibraries&&t.startsWith("http"))return t;o=o||t;const r=i.modules||{};return r[o]?r[o]:Ga?i.CDN?(wc(i.CDN.startsWith("http")),`${i.CDN}/${e}@${J$}/dist/libs/${o}`):lS?`../src/libs/${o}`:`modules/${e}/src/libs/${o}`:`modules/${e}/dist/libs/${o}`}async function IDt(t){if(t.endsWith("wasm"))return await TDt(t);if(!Ga)try{const{requireFromFile:i}=globalThis.loaders||{};return await i?.(t)}catch(i){return console.error(i),null}if(lS)return importScripts(t);const e=await DDt(t);return SDt(e,t)}function SDt(t,e){if(!Ga){const{requireFromString:o}=globalThis.loaders||{};return o?.(t,e)}if(lS)return eval.call(globalThis,t),null;const i=document.createElement("script");i.id=e;try{i.appendChild(document.createTextNode(t))}catch{i.text=t}return document.body.appendChild(i),null}async function TDt(t){const{readFileAsArrayBuffer:e}=globalThis.loaders||{};return Ga||!e||t.startsWith("http")?await(await fetch(t)).arrayBuffer():await e(t)}async function DDt(t){const{readFileAsText:e}=globalThis.loaders||{};return Ga||!e||t.startsWith("http")?await(await fetch(t)).text():await e(t)}function RDt(t,e){return!gu.isSupported()||!Ga&&!e?._nodeWorkers?!1:t.worker&&e?.worker}async function LDt(t,e,i,o,r){const n=t.id,a=EDt(t,i),s=gu.getWorkerFarm(i).getWorkerPool({name:n,url:a});i=JSON.parse(JSON.stringify(i)),o=JSON.parse(JSON.stringify(o||{}));const l=await s.startJob("process-on-worker",_Dt.bind(null,r));return l.postMessage("process",{input:e,options:i,context:o}),await(await l.result).result}async function _Dt(t,e,i,o){switch(i){case"done":e.done(o);break;case"error":e.error(new Error(o.error));break;case"process":const{id:r,input:n,options:a}=o;try{const s=await t(n,a);e.postMessage("done",{id:r,result:s})}catch(s){const l=s instanceof Error?s.message:"unknown error";e.postMessage("error",{id:r,error:l})}break;default:console.warn(`parse-with-worker unknown message ${i}`)}}function FDt(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?$$(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?$$(t,0,e):""}function $$(t,e,i){if(t.byteLength<=e+i)return"";const o=new DataView(t);let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(o.getUint8(e+n));return r}function ODt(t){try{return JSON.parse(t)}catch{throw new Error(`Failed to parse JSON from data starting with "${FDt(t)}"`)}}function UDt(t,e,i){if(i=i||t.byteLength,t.byteLength<i||e.byteLength<i)return!1;const o=new Uint8Array(t),r=new Uint8Array(e);for(let n=0;n<o.length;++n)if(o[n]!==r[n])return!1;return!0}function NDt(...t){return jDt(t)}function jDt(t){const e=t.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),i=e.reduce((n,a)=>n+a.byteLength,0),o=new Uint8Array(i);let r=0;for(const n of e)o.set(n,r),r+=n.byteLength;return o.buffer}function eee(t,e,i){const o=i!==void 0?new Uint8Array(t).subarray(e,e+i):new Uint8Array(t).subarray(e);return new Uint8Array(o).buffer}function z3(t,e){return bc(t>=0),bc(e>0),t+(e-1)&-4}function VDt(t,e,i){let o;if(t instanceof ArrayBuffer)o=new Uint8Array(t);else{const r=t.byteOffset,n=t.byteLength;o=new Uint8Array(t.buffer||t.arrayBuffer,r,n)}return e.set(o,i),i+z3(o.byteLength,4)}async function zDt(t){const e=[];for await(const i of t)e.push(i);return NDt(...e)}let HDt="";const tee={};function qDt(t){for(const e in tee)if(t.startsWith(e)){const i=tee[e];t=t.replace(e,i)}return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`${HDt}${t}`),t}function QDt(t){return t&&typeof t=="object"&&t.isBuffer}function iee(t){if(QDt(t)||t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if(typeof t=="string"){const e=t;return new TextEncoder().encode(e).buffer}if(t&&typeof t=="object"&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function oee(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function GDt(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}const KDt=t=>typeof t=="boolean",H3=t=>typeof t=="function",q3=t=>t!==null&&typeof t=="object",ree=t=>q3(t)&&t.constructor==={}.constructor,JDt=t=>!!t&&typeof t[Symbol.iterator]=="function",ZDt=t=>t&&typeof t[Symbol.asyncIterator]=="function",kh=t=>typeof Response<"u"&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,Q1=t=>typeof Blob<"u"&&t instanceof Blob,WDt=t=>t&&typeof t=="object"&&t.isBuffer,YDt=t=>typeof ReadableStream<"u"&&t instanceof ReadableStream||q3(t)&&H3(t.tee)&&H3(t.cancel)&&H3(t.getReader),XDt=t=>q3(t)&&H3(t.read)&&H3(t.pipe)&&KDt(t.readable),nee=t=>YDt(t)||XDt(t);class $Dt extends Error{constructor(e,i){super(e),this.reason=i.reason,this.url=i.url,this.response=i.response}reason;url;response}const eRt=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,tRt=/^([-\w.]+\/[-\w.+]+)/;function aee(t,e){return t.toLowerCase()===e.toLowerCase()}function iRt(t){const e=tRt.exec(t);return e?e[1]:t}function see(t){const e=eRt.exec(t);return e?e[1]:""}const lee=/\?.*/;function oRt(t){const e=t.match(lee);return e&&e[0]}function fS(t){return t.replace(lee,"")}function rRt(t){if(t.length<50)return t;const e=t.slice(t.length-15);return`${t.substr(0,32)}...${e}`}function Pb(t){return kh(t)?t.url:Q1(t)?t.name||"":typeof t=="string"?t:""}function AS(t){if(kh(t)){const e=t,i=e.headers.get("content-type")||"",o=fS(e.url);return iRt(i)||see(o)}return Q1(t)?t.type||"":typeof t=="string"?see(t):""}function nRt(t){return kh(t)?t.headers["content-length"]||-1:Q1(t)?t.size:typeof t=="string"?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}async function cee(t){if(kh(t))return t;const e={},i=nRt(t);i>=0&&(e["content-length"]=String(i));const o=Pb(t),r=AS(t);r&&(e["content-type"]=r);const n=await lRt(t);n&&(e["x-first-bytes"]=n),typeof t=="string"&&(t=new TextEncoder().encode(t));const a=new Response(t,{headers:e});return Object.defineProperty(a,"url",{value:o}),a}async function aRt(t){if(!t.ok)throw await sRt(t)}async function sRt(t){const e=rRt(t.url);let i=`Failed to fetch resource (${t.status}) ${t.statusText}: ${e}`;i=i.length>100?`${i.slice(0,100)}...`:i;const o={reason:t.statusText,url:t.url,response:t};try{const r=t.headers.get("Content-Type");o.reason=!t.bodyUsed&&r?.includes("application/json")?await t.json():await t.text()}catch{}return new $Dt(i,o)}async function lRt(t){if(typeof t=="string")return`data:,${t.slice(0,5)}`;if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(i=>{const o=new FileReader;o.onload=r=>i(r?.target?.result),o.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=t.slice(0,5);return`data:base64,${cRt(e)}`}return null}function cRt(t){let e="";const i=new Uint8Array(t);for(let o=0;o<i.byteLength;o++)e+=String.fromCharCode(i[o]);return btoa(e)}function dRt(t){return!uRt(t)&&!hRt(t)}function uRt(t){return t.startsWith("http:")||t.startsWith("https:")}function hRt(t){return t.startsWith("data:")}async function dee(t,e){if(typeof t=="string"){const i=qDt(t);return dRt(i)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(i,e):await fetch(i,e)}return await cee(t)}const uee=new aS({id:"loaders.gl"});class pRt{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class fRt{console;constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}}const hee={fetch:null,mimeType:void 0,nothrow:!1,log:new fRt,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:Eb,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},ARt={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function pee(){globalThis.loaders=globalThis.loaders||{};const{loaders:t}=globalThis;return t._state||(t._state={}),t._state}function fee(){const t=pee();return t.globalOptions=t.globalOptions||{...hee},t.globalOptions}function gRt(t,e,i,o){return i=i||[],i=Array.isArray(i)?i:[i],mRt(t,i),yRt(e,t,o)}function mRt(t,e){Aee(t,null,hee,ARt,e);for(const i of e){const o=t&&t[i.id]||{},r=i.options&&i.options[i.id]||{},n=i.deprecatedOptions&&i.deprecatedOptions[i.id]||{};Aee(o,i.id,r,n,e)}}function Aee(t,e,i,o,r){const n=e||"Top level",a=e?`${e}.`:"";for(const s in t){const l=!e&&q3(t[s]),c=s==="baseUri"&&!e,d=s==="workerUrl"&&e;if(!(s in i)&&!c&&!d){if(s in o)uee.warn(`${n} loader option '${a}${s}' no longer supported, use '${o[s]}'`)();else if(!l){const u=vRt(s,r);uee.warn(`${n} loader option '${a}${s}' not recognized. ${u}`)()}}}}function vRt(t,e){const i=t.toLowerCase();let o="";for(const r of e)for(const n in r.options){if(t===n)return`Did you mean '${r.id}.${n}'?`;const a=n.toLowerCase();(i.startsWith(a)||a.startsWith(i))&&(o=o||`Did you mean '${r.id}.${n}'?`)}return o}function yRt(t,e,i){const o={...t.options||{}};return bRt(o,i),o.log===null&&(o.log=new pRt),gee(o,fee()),gee(o,e),o}function gee(t,e){for(const i in e)if(i in e){const o=e[i];ree(o)&&ree(t[i])?t[i]={...t[i],...e[i]}:t[i]=e[i]}}function bRt(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}function mee(t){return t?(Array.isArray(t)&&(t=t[0]),Array.isArray(t?.extensions)):!1}function vee(t){bc(t,"null loader"),bc(mee(t),"invalid loader");let e;return Array.isArray(t)&&(e=t[1],t=t[0],t={...t,options:{...t.options,...e}}),(t?.parseTextSync||t?.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}const wRt=()=>{const t=pee();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function CRt(){return wRt()}const xRt=/\.([^.]+)$/;async function kRt(t,e=[],i,o){if(!bee(t))return null;let r=yee(t,e,{...i,nothrow:!0},o);if(r)return r;if(Q1(t)&&(t=await t.slice(0,10).arrayBuffer(),r=yee(t,e,i,o)),!r&&!i?.nothrow)throw new Error(wee(t));return r}function yee(t,e=[],i,o){if(!bee(t))return null;if(e&&!Array.isArray(e))return vee(e);let r=[];e&&(r=r.concat(e)),i?.ignoreRegisteredLoaders||r.push(...CRt()),ERt(r);const n=MRt(t,r,i,o);if(!n&&!i?.nothrow)throw new Error(wee(t));return n}function MRt(t,e,i,o){const r=Pb(t),n=AS(t),a=fS(r)||o?.url;let s=null,l="";return i?.mimeType&&(s=gS(e,i?.mimeType),l=`match forced by supplied MIME type ${i?.mimeType}`),s=s||BRt(e,a),l=l||(s?`matched url ${a}`:""),s=s||gS(e,n),l=l||(s?`matched MIME type ${n}`:""),s=s||IRt(e,t),l=l||(s?`matched initial data ${xee(t)}`:""),i?.fallbackMimeType&&(s=s||gS(e,i?.fallbackMimeType),l=l||(s?`matched fallback MIME type ${n}`:"")),l&&pDt.log(1,`selectLoader selected ${s?.name}: ${l}.`),s}function bee(t){return!(t instanceof Response&&t.status===204)}function wee(t){const e=Pb(t),i=AS(t);let o="No valid loader found (";o+=e?`${oee(e)}, `:"no url provided, ",o+=`MIME type: ${i?`"${i}"`:"not provided"}, `;const r=t?xee(t):"";return o+=r?` first bytes: "${r}"`:"first bytes: not available",o+=")",o}function ERt(t){for(const e of t)vee(e)}function BRt(t,e){const i=e&&xRt.exec(e),o=i&&i[1];return o?PRt(t,o):null}function PRt(t,e){e=e.toLowerCase();for(const i of t)for(const o of i.extensions)if(o.toLowerCase()===e)return i;return null}function gS(t,e){for(const i of t)if(i.mimeTypes?.some(o=>aee(e,o))||aee(e,`application/x.${i.id}`))return i;return null}function IRt(t,e){if(!e)return null;for(const i of t)if(typeof e=="string"){if(SRt(e,i))return i}else if(ArrayBuffer.isView(e)){if(Cee(e.buffer,e.byteOffset,i))return i}else if(e instanceof ArrayBuffer&&Cee(e,0,i))return i;return null}function SRt(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some(i=>t.startsWith(i))}function Cee(t,e,i){return(Array.isArray(i.tests)?i.tests:[i.tests]).some(o=>TRt(t,e,i,o))}function TRt(t,e,i,o){if(o instanceof ArrayBuffer)return UDt(o,t,o.byteLength);switch(typeof o){case"function":return o(t);case"string":const r=mS(t,e,o.length);return o===r;default:return!1}}function xee(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?mS(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?mS(t,0,e):""}function mS(t,e,i){if(t.byteLength<e+i)return"";const o=new DataView(t);let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(o.getUint8(e+n));return r}const DRt=256*1024;function*RRt(t,e){const i=e?.chunkSize||DRt;let o=0;const r=new TextEncoder;for(;o<t.length;){const n=Math.min(t.length-o,i),a=t.slice(o,o+n);o+=n,yield r.encode(a)}}const LRt=256*1024;function*_Rt(t,e={}){const{chunkSize:i=LRt}=e;let o=0;for(;o<t.byteLength;){const r=Math.min(t.byteLength-o,i),n=new ArrayBuffer(r),a=new Uint8Array(t,o,r);new Uint8Array(n).set(a),o+=r,yield n}}const FRt=1024*1024;async function*ORt(t,e){const i=e?.chunkSize||FRt;let o=0;for(;o<t.size;){const r=o+i,n=await t.slice(o,r).arrayBuffer();o=r,yield n}}function kee(t,e){return Eb?URt(t,e):NRt(t)}async function*URt(t,e){const i=t.getReader();let o;try{for(;;){const r=o||i.read();e?._streamReadAhead&&(o=i.read());const{done:n,value:a}=await r;if(n)return;yield iee(a)}}catch{i.releaseLock()}}async function*NRt(t,e){for await(const i of t)yield iee(i)}function jRt(t,e){if(typeof t=="string")return RRt(t,e);if(t instanceof ArrayBuffer)return _Rt(t,e);if(Q1(t))return ORt(t,e);if(nee(t))return kee(t,e);if(kh(t))return kee(t.body,e);throw new Error("makeIterator")}const Mee="Cannot convert supplied data type";function VRt(t,e,i){if(e.text&&typeof t=="string")return t;if(WDt(t)&&(t=t.buffer),t instanceof ArrayBuffer){const o=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(o):o}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let o=t.buffer;const r=t.byteLength||t.length;return(t.byteOffset!==0||r!==o.byteLength)&&(o=o.slice(t.byteOffset,t.byteOffset+r)),o}throw new Error(Mee)}async function zRt(t,e,i){const o=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if(typeof t=="string"||o)return VRt(t,e);if(Q1(t)&&(t=await cee(t)),kh(t)){const r=t;return await aRt(r),e.binary?await r.arrayBuffer():await r.text()}if(nee(t)&&(t=jRt(t,i)),JDt(t)||ZDt(t))return zDt(t);throw new Error(Mee)}function HRt(t,e){const i=fee(),o=t||i;return typeof o.fetch=="function"?o.fetch:q3(o.fetch)?r=>dee(r,o.fetch):e?.fetch?e?.fetch:dee}function qRt(t,e,i){if(i)return i;const o={fetch:HRt(e,t),...t};if(o.url){const r=fS(o.url);o.baseUrl=r,o.queryString=oRt(o.url),o.filename=oee(r),o.baseUrl=GDt(r)}return Array.isArray(o.loaders)||(o.loaders=null),o}function QRt(t,e){if(t&&!Array.isArray(t))return t;let i;if(t&&(i=Array.isArray(t)?t:[t]),e&&e.loaders){const o=Array.isArray(e.loaders)?e.loaders:[e.loaders];i=i?[...i,...o]:o}return i&&i.length?i:void 0}async function vS(t,e,i,o){e&&!Array.isArray(e)&&!mee(e)&&(o=void 0,i=e,e=void 0),t=await t,i=i||{};const r=Pb(t),n=QRt(e,o),a=await kRt(t,n,i);return a?(i=gRt(i,a,n,r),o=qRt({url:r,_parse:vS,loaders:n},i,o||null),await GRt(a,t,i,o)):null}async function GRt(t,e,i,o){if(BDt(t),i=fDt(t.options,i),kh(e)){const n=e,{ok:a,redirected:s,status:l,statusText:c,type:d,url:u}=n,h=Object.fromEntries(n.headers.entries());o.response={headers:h,ok:a,redirected:s,status:l,statusText:c,type:d,url:u}}e=await zRt(e,t,i);const r=t;if(r.parseTextSync&&typeof e=="string")return r.parseTextSync(e,i,o);if(RDt(t,i))return await LDt(t,e,i,o,vS);if(r.parseText&&typeof e=="string")return await r.parseText(e,i,o);if(r.parse)return await r.parse(e,i,o);throw wc(!r.parseSync),new Error(`${t.id} loader - no parser found and worker is disabled`)}function KRt(t){switch(t.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function JRt(t){let e=1/0,i=1/0,o=1/0,r=-1/0,n=-1/0,a=-1/0;const s=t.POSITION?t.POSITION.value:[],l=s&&s.length;for(let c=0;c<l;c+=3){const d=s[c],u=s[c+1],h=s[c+2];e=d<e?d:e,i=u<i?u:i,o=h<o?h:o,r=d>r?d:r,n=u>n?u:n,a=h>a?h:a}return[[e,i,o],[r,n,a]]}function ZRt(t,e,i){const o=KRt(e.value),r=i||WRt(e);return{name:t,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:o}]},nullable:!1,metadata:r}}function WRt(t){const e={};return"byteOffset"in t&&(e.byteOffset=t.byteOffset.toString(10)),"byteStride"in t&&(e.byteStride=t.byteStride.toString(10)),"normalized"in t&&(e.normalized=t.normalized.toString()),e}const YRt="4.3.3",XRt=globalThis.loaders?.parseImageNode,yS=typeof Image<"u",bS=typeof ImageBitmap<"u",$Rt=!!XRt,wS=Eb?!0:$Rt;function eLt(t){switch(t){case"auto":return bS||yS||wS;case"imagebitmap":return bS;case"image":return yS;case"data":return wS;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}function tLt(){if(bS)return"imagebitmap";if(yS)return"image";if(wS)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function iLt(t){const e=oLt(t);if(!e)throw new Error("Not an image");return e}function Eee(t){switch(iLt(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new Error("getImageData");return e.width=t.width,e.height=t.height,i.drawImage(t,0,0),i.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function oLt(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&t instanceof Image?"image":t&&typeof t=="object"&&t.data&&t.width&&t.height?"data":null}const rLt=/^data:image\/svg\+xml/,nLt=/\.svg((\?|#).*)?$/;function CS(t){return t&&(rLt.test(t)||nLt.test(t))}function aLt(t,e){if(CS(e)){let i=new TextDecoder().decode(t);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(i=unescape(encodeURIComponent(i)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(i)}`}return Bee(t,e)}function Bee(t,e){if(CS(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function Pee(t,e,i){const o=aLt(t,i),r=self.URL||self.webkitURL,n=typeof o!="string"&&r.createObjectURL(o);try{return await sLt(n||o,e)}finally{n&&r.revokeObjectURL(n)}}async function sLt(t,e){const i=new Image;return i.src=t,e.image&&e.image.decode&&i.decode?(await i.decode(),i):await new Promise((o,r)=>{try{i.onload=()=>o(i),i.onerror=n=>{const a=n instanceof Error?n.message:"error";r(new Error(a))}}catch(n){r(n)}})}const lLt={};let Iee=!0;async function cLt(t,e,i){let o;CS(i)?o=await Pee(t,e,i):o=Bee(t,i);const r=e&&e.imagebitmap;return await dLt(o,r)}async function dLt(t,e=null){if((uLt(e)||!Iee)&&(e=null),e)try{return await createImageBitmap(t,e)}catch(i){console.warn(i),Iee=!1}return await createImageBitmap(t)}function uLt(t){for(const e in t||lLt)return!1;return!0}function hLt(t){return!gLt(t,"ftyp",4)||(t[8]&96)===0?null:pLt(t)}function pLt(t){switch(fLt(t,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function fLt(t,e,i){return String.fromCharCode(...t.slice(e,i))}function ALt(t){return[...t].map(e=>e.charCodeAt(0))}function gLt(t,e,i=0){const o=ALt(e);for(let r=0;r<o.length;++r)if(o[r]!==t[r+i])return!1;return!0}const yl=!1,Q3=!0;function xS(t){const e=G3(t);return vLt(e)||wLt(e)||yLt(e)||bLt(e)||mLt(e)}function mLt(t){const e=new Uint8Array(t instanceof DataView?t.buffer:t),i=hLt(e);return i?{mimeType:i.mimeType,width:0,height:0}:null}function vLt(t){const e=G3(t);return e.byteLength>=24&&e.getUint32(0,yl)===2303741511?{mimeType:"image/png",width:e.getUint32(16,yl),height:e.getUint32(20,yl)}:null}function yLt(t){const e=G3(t);return e.byteLength>=10&&e.getUint32(0,yl)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,Q3),height:e.getUint16(8,Q3)}:null}function bLt(t){const e=G3(t);return e.byteLength>=14&&e.getUint16(0,yl)===16973&&e.getUint32(2,Q3)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,Q3),height:e.getUint32(22,Q3)}:null}function wLt(t){const e=G3(t);if(!(e.byteLength>=3&&e.getUint16(0,yl)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:i,sofMarkers:o}=CLt();let r=2;for(;r+9<e.byteLength;){const n=e.getUint16(r,yl);if(o.has(n))return{mimeType:"image/jpeg",height:e.getUint16(r+5,yl),width:e.getUint16(r+7,yl)};if(!i.has(n))return null;r+=2,r+=e.getUint16(r,yl)}return null}function CLt(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);return{tableMarkers:t,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function G3(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}async function xLt(t,e){const{mimeType:i}=xS(t)||{},o=globalThis.loaders?.parseImageNode;return bc(o),await o(t,i)}async function kLt(t,e,i){e=e||{};const o=(e.image||{}).type||"auto",{url:r}=i||{},n=MLt(o);let a;switch(n){case"imagebitmap":a=await cLt(t,e,r);break;case"image":a=await Pee(t,e,r);break;case"data":a=await xLt(t);break;default:bc(!1)}return o==="data"&&(a=Eee(a)),a}function MLt(t){switch(t){case"auto":case"data":return tLt();default:return eLt(t),t}}const ELt=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],BLt=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],PLt={image:{type:"auto",decode:!0}},ILt={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:YRt,mimeTypes:BLt,extensions:ELt,parse:kLt,tests:[t=>!!xS(new DataView(t))],options:PLt},kS={};function SLt(t){if(kS[t]===void 0){const e=Eb?DLt(t):TLt(t);kS[t]=e}return kS[t]}function TLt(t){const e=["image/png","image/jpeg","image/gif"],i=globalThis.loaders?.imageFormatsNode||e;return!!globalThis.loaders?.parseImageNode&&i.includes(t)}function DLt(t){switch(t){case"image/avif":case"image/webp":return RLt(t);default:return!0}}function RLt(t){try{return document.createElement("canvas").toDataURL(t).indexOf(`data:${t}`)===0}catch{return!1}}function wa(t,e){if(!t)throw new Error(e||"assert failed: gltf")}const See={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Tee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Dee=["SCALAR","VEC2","VEC3","VEC4"],LLt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],_Lt=new Map(LLt),FLt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},OLt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},ULt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Ree(t){return Dee[t-1]||Dee[0]}function Ib(t){const e=_Lt.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function MS(t,e){const i=ULt[t.componentType],o=FLt[t.type],r=OLt[t.componentType],n=t.count*o,a=t.count*o*r;wa(a>=0&&a<=e.byteLength);const s=Tee[t.componentType],l=See[t.type];return{ArrayType:i,length:n,byteLength:a,componentByteSize:s,numberOfComponentsInElement:l}}function NLt(t,e,i){const o=t.bufferViews[i];wa(o);const r=o.buffer,n=e[r];wa(n);const a=(o.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,a,o.byteLength)}function jLt(t,e,i){const o=typeof i=="number"?t.accessors?.[i]:i;if(!o)throw new Error(`No gltf accessor ${JSON.stringify(i)}`);const r=t.bufferViews?.[o.bufferView||0];if(!r)throw new Error(`No gltf buffer view for accessor ${r}`);const{arrayBuffer:n,byteOffset:a}=e[r.buffer],s=(a||0)+(o.byteOffset||0)+(r.byteOffset||0),{ArrayType:l,length:c,componentByteSize:d,numberOfComponentsInElement:u}=MS(o,r),h=d*u,p=r.byteStride||h;if(typeof r.byteStride>"u"||r.byteStride===h)return new l(n,s,c);const A=new l(c);for(let f=0;f<o.count;f++){const m=new l(n,s+f*p,u);A.set(m,f*u)}return A}function VLt(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class Ir{gltf;sourceBuffers;byteLength;constructor(e){this.gltf={json:e?.json||VLt(),buffers:e?.buffers||[],images:e?.images||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const i=this.getUsedExtensions().find(r=>r===e),o=this.getRequiredExtensions().find(r=>r===e);return typeof i=="string"||typeof o=="string"}getExtension(e){const i=this.getUsedExtensions().find(r=>r===e),o=this.json.extensions||{};return i?o[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(i=>i===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,i){return(e.extensions||{})[i]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,i){if(typeof i=="object")return i;const o=this.json[e]&&this.json[e][i];if(!o)throw new Error(`glTF file error: Could not find ${e}[${i}]`);return o}getTypedArrayForBufferView(e){e=this.getBufferView(e);const i=e.buffer,o=this.gltf.buffers[i];wa(o);const r=(e.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,r,e.byteLength)}getTypedArrayForAccessor(e){const i=this.getAccessor(e);return jLt(this.gltf.json,this.gltf.buffers,i)}getTypedArrayForImageData(e){e=this.getAccessor(e);const i=this.getBufferView(e.bufferView),o=this.getBuffer(i.buffer).data,r=i.byteOffset||0;return new Uint8Array(o,r,i.byteLength)}addApplicationData(e,i){return this.json[e]=i,this}addExtraData(e,i){return this.json.extras=this.json.extras||{},this.json.extras[e]=i,this}addObjectExtension(e,i,o){return e.extensions=e.extensions||{},e.extensions[i]=o,this.registerUsedExtension(i),this}setObjectExtension(e,i,o){const r=e.extensions||{};r[i]=o}removeObjectExtension(e,i){const o=e?.extensions||{};if(o[i]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const r=this.json.extensionsRemoved;r.includes(i)||r.push(i)}delete o[i]}addExtension(e,i={}){return wa(i),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=i,this.registerUsedExtension(e),i}addRequiredExtension(e,i={}){return wa(i),this.addExtension(e,i),this.registerRequiredExtension(e),i}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(i=>i===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(i=>i===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const i=this.json.extensionsRemoved;i.includes(e)||i.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:i}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:i}),this.json.scenes.length-1}addNode(e){const{meshIndex:i,matrix:o}=e;this.json.nodes=this.json.nodes||[];const r={mesh:i};return o&&(r.matrix=o),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(e){const{attributes:i,indices:o,material:r,mode:n=4}=e,a={primitives:[{attributes:this._addAttributes(i),mode:n}]};if(o){const s=this._addIndices(o);a.primitives[0].indices=s}return Number.isFinite(r)&&(a.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){const i={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addImage(e,i){const o=xS(e),r=i||o?.mimeType,n={bufferView:this.addBufferView(e),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(n),this.json.images.length-1}addBufferView(e,i=0,o=this.byteLength){const r=e.byteLength;wa(Number.isFinite(r)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const n={buffer:i,byteOffset:o,byteLength:r};return this.byteLength+=z3(r,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}addAccessor(e,i){const o={bufferView:e,type:Ree(i.size),componentType:i.componentType,count:i.count,max:i.max,min:i.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(o),this.json.accessors.length-1}addBinaryBuffer(e,i={size:3}){const o=this.addBufferView(e);let r={min:i.min,max:i.max};(!r.min||!r.max)&&(r=this._getAccessorMinMax(e,i.size));const n={size:i.size,componentType:Ib(e),count:Math.round(e.length/i.size),min:r.min,max:r.max};return this.addAccessor(o,Object.assign(n,i))}addTexture(e){const{imageIndex:i}=e,o={source:i};return this.json.textures=this.json.textures||[],this.json.textures.push(o),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){const e=this.byteLength,i=new ArrayBuffer(e),o=new Uint8Array(i);let r=0;for(const n of this.sourceBuffers||[])r=VDt(n,o,r);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=i,this.sourceBuffers=[i],this.gltf.buffers=[{arrayBuffer:i,byteOffset:0,byteLength:i.byteLength}]}_removeStringFromArray(e,i){let o=!0;for(;o;){const r=e.indexOf(i);r>-1?e.splice(r,1):o=!1}}_addAttributes(e={}){const i={};for(const o in e){const r=e[o],n=this._getGltfAttributeName(o),a=this.addBinaryBuffer(r.value,r);i[n]=a}return i}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,i){const o={min:null,max:null};if(e.length<i)return o;o.min=[],o.max=[];const r=e.subarray(0,i);for(const n of r)o.min.push(n),o.max.push(n);for(let n=i;n<e.length;n+=i)for(let a=0;a<i;a++)o.min[0+a]=Math.min(o.min[0+a],e[n+a]),o.max[0+a]=Math.max(o.max[0+a],e[n+a]);return o}}function Lee(t){return(t%1+1)%1}const _ee={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},zLt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},Fee={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function ES(t,e){return Fee[e]*_ee[t]}function Sb(t,e,i,o){if(i!=="UINT8"&&i!=="UINT16"&&i!=="UINT32"&&i!=="UINT64")return null;const r=t.getTypedArrayForBufferView(e),n=Tb(r,"SCALAR",i,o+1);return n instanceof BigInt64Array||n instanceof BigUint64Array?null:n}function Tb(t,e,i,o=1){const r=_ee[e],n=zLt[i],a=Fee[i],s=o*r,l=s*a;let c=t.buffer,d=t.byteOffset;return d%a!==0&&(c=new Uint8Array(c).slice(d,d+l).buffer,d=0),new n(c,d,s)}function BS(t,e,i){const o=`TEXCOORD_${e.texCoord||0}`,r=i.attributes[o],n=t.getTypedArrayForAccessor(r),a=t.gltf.json,s=e.index,l=a.textures?.[s]?.source;if(typeof l<"u"){const c=a.images?.[l]?.mimeType,d=t.gltf.images?.[l];if(d&&typeof d.width<"u"){const u=[];for(let h=0;h<n.length;h+=2){const p=HLt(d,c,n,h,e.channels);u.push(p)}return u}}return[]}function Oee(t,e,i,o,r){if(!i?.length)return;const n=[];for(const d of i){let u=o.findIndex(h=>h===d);u===-1&&(u=o.push(d)-1),n.push(u)}const a=new Uint32Array(n),s=t.gltf.buffers.push({arrayBuffer:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength})-1,l=t.addBufferView(a,s,0),c=t.addAccessor(l,{size:1,componentType:Ib(a),count:a.length});r.attributes[e]=c}function HLt(t,e,i,o,r=[0]){const n={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},a=i[o],s=i[o+1];let l=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(l=4);const c=qLt(a,s,t,l);let d=0;for(const u of r){const h=typeof u=="number"?Object.values(n)[u]:n[u],p=c+h.offset,A=Eee(t);if(A.data.length<=p)throw new Error(`${A.data.length} <= ${p}`);const f=A.data[p];d|=f<<h.shift}return d}function qLt(t,e,i,o=1){const r=i.width,n=Lee(t)*(r-1),a=Math.round(n),s=i.height,l=Lee(e)*(s-1),c=Math.round(l),d=i.components?i.components:o;return(c*r+a)*d}function Uee(t,e,i,o,r){const n=[];for(let a=0;a<e;a++){const s=i[a],l=i[a+1]-i[a];if(l+s>o)break;const c=s/r,d=l/r;n.push(t.slice(c,c+d))}return n}function Nee(t,e,i){const o=[];for(let r=0;r<e;r++){const n=r*i;o.push(t.slice(n,n+i))}return o}function jee(t,e,i,o){if(i)throw new Error("Not implemented - arrayOffsets for strings is specified");if(o){const r=[],n=new TextDecoder("utf8");let a=0;for(let s=0;s<t;s++){const l=o[s+1]-o[s];if(l+a<=e.length){const c=e.subarray(a,l+a),d=n.decode(c);r.push(d),a+=l}}return r}return[]}const G1="EXT_mesh_features",QLt=G1;async function GLt(t,e){const i=new Ir(t);JLt(i,e)}function KLt(t,e){const i=new Ir(t);return WLt(i),i.createBinaryChunk(),i.gltf}function JLt(t,e){const i=t.gltf.json;if(i.meshes)for(const o of i.meshes)for(const r of o.primitives)ZLt(t,r,e)}function ZLt(t,e,i){if(!i?.gltf?.loadBuffers)return;const o=e.extensions?.[G1]?.featureIds;if(o)for(const r of o){let n;if(typeof r.attribute<"u"){const a=`_FEATURE_ID_${r.attribute}`,s=e.attributes[a];n=t.getTypedArrayForAccessor(s)}else typeof r.texture<"u"&&i?.gltf?.loadImages?n=BS(t,r.texture,e):n=[];r.data=n}}function WLt(t,e){const i=t.gltf.json.meshes;if(i)for(const o of i)for(const r of o.primitives)XLt(t,r)}function YLt(t,e,i,o){e.extensions||(e.extensions={});let r=e.extensions[G1];r||(r={featureIds:[]},e.extensions[G1]=r);const{featureIds:n}=r,a={featureCount:i.length,propertyTable:o,data:i};n.push(a),t.addObjectExtension(e,G1,r)}function XLt(t,e){const i=e.extensions?.[G1];if(!i)return;const o=i.featureIds;o.forEach((r,n)=>{if(r.data){const{accessorKey:a,index:s}=$Lt(e.attributes),l=new Uint32Array(r.data);o[n]={featureCount:l.length,propertyTable:r.propertyTable,attribute:s},t.gltf.buffers.push({arrayBuffer:l.buffer,byteOffset:l.byteOffset,byteLength:l.byteLength});const c=t.addBufferView(l),d=t.addAccessor(c,{size:1,componentType:Ib(l),count:l.length});e.attributes[a]=d}})}function $Lt(t){const e="_FEATURE_ID_",i=Object.keys(t).filter(r=>r.indexOf(e)===0);let o=-1;for(const r of i){const n=Number(r.substring(e.length));n>o&&(o=n)}return o++,{accessorKey:`${e}${o}`,index:o}}const e_t=Object.freeze(Object.defineProperty({__proto__:null,createExtMeshFeatures:YLt,decode:GLt,encode:KLt,name:QLt},Symbol.toStringTag,{value:"Module"})),K1="EXT_structural_metadata",t_t=K1;async function i_t(t,e){const i=new Ir(t);r_t(i,e)}function o_t(t,e){const i=new Ir(t);return b_t(i),i.createBinaryChunk(),i.gltf}function r_t(t,e){if(!e.gltf?.loadBuffers)return;const i=t.getExtension(K1);i&&(e.gltf?.loadImages&&n_t(t,i),a_t(t,i))}function n_t(t,e){const i=e.propertyTextures,o=t.gltf.json;if(i&&o.meshes)for(const r of o.meshes)for(const n of r.primitives)l_t(t,i,n,e)}function a_t(t,e){const i=e.schema;if(!i)return;const o=i.classes,r=e.propertyTables;if(o&&r)for(const n in o){const a=s_t(r,n);a&&d_t(t,i,a)}}function s_t(t,e){for(const i of t)if(i.class===e)return i;return null}function l_t(t,e,i,o){if(!e)return;const r=i.extensions?.[K1]?.propertyTextures;if(r)for(const n of r){const a=e[n];c_t(t,a,i,o)}}function c_t(t,e,i,o){if(!e.properties)return;o.dataAttributeNames||(o.dataAttributeNames=[]);const r=e.class;for(const n in e.properties){const a=`${r}_${n}`,s=e.properties?.[n];if(!s)continue;s.data||(s.data=[]);const l=s.data,c=BS(t,s,i);c!==null&&(Oee(t,a,c,l,i),s.data=l,o.dataAttributeNames.push(a))}}function d_t(t,e,i){const o=e.classes?.[i.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${i.class}`);const r=i.count;for(const n in o.properties){const a=o.properties[n],s=i.properties?.[n];if(s){const l=u_t(t,e,a,r,s);s.data=l}}}function u_t(t,e,i,o,r){let n=[];const a=r.values,s=t.getTypedArrayForBufferView(a),l=h_t(t,i,r,o),c=p_t(t,r,o);switch(i.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{n=f_t(i,o,s,l);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${i.type}`);case"STRING":{n=jee(o,s,l,c);break}case"ENUM":{n=A_t(e,i,o,s,l);break}default:throw new Error(`Unknown classProperty type ${i.type}`)}return n}function h_t(t,e,i,o){return e.array&&typeof e.count>"u"&&typeof i.arrayOffsets<"u"?Sb(t,i.arrayOffsets,i.arrayOffsetType||"UINT32",o):null}function p_t(t,e,i){return typeof e.stringOffsets<"u"?Sb(t,e.stringOffsets,e.stringOffsetType||"UINT32",i):null}function f_t(t,e,i,o){const r=t.array,n=t.count,a=ES(t.type,t.componentType),s=i.byteLength/a;let l;return t.componentType?l=Tb(i,t.type,t.componentType,s):l=i,r?o?Uee(l,e,o,i.length,a):n?Nee(l,e,n):[]:l}function A_t(t,e,i,o,r){const n=e.enumType;if(!n)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const a=t.enums?.[n];if(!a)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${n}`);const s=a.valueType||"UINT16",l=ES(e.type,s),c=o.byteLength/l;let d=Tb(o,e.type,s,c);if(d||(d=o),e.array){if(r)return g_t({valuesData:d,numberOfElements:i,arrayOffsets:r,valuesDataBytesLength:o.length,elementSize:l,enumEntry:a});const u=e.count;return u?m_t(d,i,u,a):[]}return PS(d,0,i,a)}function g_t(t){const{valuesData:e,numberOfElements:i,arrayOffsets:o,valuesDataBytesLength:r,elementSize:n,enumEntry:a}=t,s=[];for(let l=0;l<i;l++){const c=o[l],d=o[l+1]-o[l];if(d+c>r)break;const u=c/n,h=d/n,p=PS(e,u,h,a);s.push(p)}return s}function m_t(t,e,i,o){const r=[];for(let n=0;n<e;n++){const a=i*n,s=PS(t,a,i,o);r.push(s)}return r}function PS(t,e,i,o){const r=[];for(let n=0;n<i;n++)if(t instanceof BigInt64Array||t instanceof BigUint64Array)r.push("");else{const a=t[e+n],s=v_t(o,a);s?r.push(s.name):r.push("")}return r}function v_t(t,e){for(const i of t.values)if(i.value===e)return i;return null}const y_t="schemaClassId";function b_t(t,e){const i=t.getExtension(K1);if(i&&i.propertyTables)for(const o of i.propertyTables){const r=o.class,n=i.schema?.classes?.[r];o.properties&&n&&w_t(o,n,t)}}function w_t(t,e,i){for(const o in t.properties){const r=t.properties[o].data;if(r){const n=e.properties[o];if(n){const a=M_t(r,n,i);t.properties[o]=a}}}}function C_t(t,e,i=y_t){let o=t.getExtension(K1);o||(o=t.addExtension(K1)),o.schema=x_t(e,i,o.schema);const r=k_t(e,i,o.schema);return o.propertyTables||(o.propertyTables=[]),o.propertyTables.push(r)-1}function x_t(t,e,i){const o=i??{id:"schema_id"},r={properties:{}};for(const n of t){const a={type:n.elementType,componentType:n.componentType};r.properties[n.name]=a}return o.classes={},o.classes[e]=r,o}function k_t(t,e,i){const o={class:e,count:0};let r=0;const n=i.classes?.[e];for(const a of t){if(r===0&&(r=a.values.length),r!==a.values.length&&a.values.length)throw new Error("Illegal values in attributes");n?.properties[a.name]&&(o.properties||(o.properties={}),o.properties[a.name]={values:0,data:a.values})}return o.count=r,o}function M_t(t,e,i){const o={values:0};if(e.type==="STRING"){const{stringData:r,stringOffsets:n}=P_t(t);o.stringOffsets=IS(n,i),o.values=IS(r,i)}else if(e.type==="SCALAR"&&e.componentType){const r=B_t(t,e.componentType);o.values=IS(r,i)}return o}const E_t={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:Int32Array,UINT64:Uint32Array,FLOAT32:Float32Array,FLOAT64:Float64Array};function B_t(t,e){const i=[];for(const r of t)i.push(Number(r));const o=E_t[e];if(!o)throw new Error("Illegal component type");return new o(i)}function P_t(t){const e=new TextEncoder,i=[];let o=0;for(const l of t){const c=e.encode(l);o+=c.length,i.push(c)}const r=new Uint8Array(o),n=[];let a=0;for(const l of i)r.set(l,a),n.push(a),a+=l.length;n.push(a);const s=new Uint32Array(n);return{stringData:r,stringOffsets:s}}function IS(t,e){return e.gltf.buffers.push({arrayBuffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}),e.addBufferView(t)}const I_t=Object.freeze(Object.defineProperty({__proto__:null,createExtStructuralMetadata:C_t,decode:i_t,encode:o_t,name:t_t},Symbol.toStringTag,{value:"Module"})),Vee="EXT_feature_metadata",S_t=Vee;async function T_t(t,e){const i=new Ir(t);D_t(i,e)}function D_t(t,e){if(!e.gltf?.loadBuffers)return;const i=t.getExtension(Vee);i&&(e.gltf?.loadImages&&R_t(t,i),L_t(t,i))}function R_t(t,e){const i=e.schema;if(!i)return;const o=i.classes,{featureTextures:r}=e;if(o&&r)for(const n in o){const a=o[n],s=F_t(r,n);s&&U_t(t,s,a)}}function L_t(t,e){const i=e.schema;if(!i)return;const o=i.classes,r=e.featureTables;if(o&&r)for(const n in o){const a=__t(r,n);a&&O_t(t,i,a)}}function __t(t,e){for(const i in t){const o=t[i];if(o.class===e)return o}return null}function F_t(t,e){for(const i in t){const o=t[i];if(o.class===e)return o}return null}function O_t(t,e,i){if(!i.class)return;const o=e.classes?.[i.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${i.class}`);const r=i.count;for(const n in o.properties){const a=o.properties[n],s=i.properties?.[n];if(s){const l=N_t(t,e,a,r,s);s.data=l}}}function U_t(t,e,i){const o=e.class;for(const r in i.properties){const n=e?.properties?.[r];if(n){const a=q_t(t,n,o);n.data=a}}}function N_t(t,e,i,o,r){let n=[];const a=r.bufferView,s=t.getTypedArrayForBufferView(a),l=j_t(t,i,r,o),c=V_t(t,i,r,o);return i.type==="STRING"||i.componentType==="STRING"?n=jee(o,s,l,c):z_t(i)&&(n=H_t(i,o,s,l)),n}function j_t(t,e,i,o){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof i.arrayOffsetBufferView<"u"?Sb(t,i.arrayOffsetBufferView,i.offsetType||"UINT32",o):null}function V_t(t,e,i,o){return typeof i.stringOffsetBufferView<"u"?Sb(t,i.stringOffsetBufferView,i.offsetType||"UINT32",o):null}function z_t(t){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(t.type)||typeof t.componentType<"u"&&e.includes(t.componentType)}function H_t(t,e,i,o){const r=t.type==="ARRAY",n=t.componentCount,a="SCALAR",s=t.componentType||t.type,l=ES(a,s),c=i.byteLength/l,d=Tb(i,a,s,c);return r?o?Uee(d,e,o,i.length,l):n?Nee(d,e,n):[]:d}function q_t(t,e,i){const o=t.gltf.json;if(!o.meshes)return[];const r=[];for(const n of o.meshes)for(const a of n.primitives)Q_t(t,i,e,r,a);return r}function Q_t(t,e,i,o,r){const n={channels:i.channels,...i.texture},a=BS(t,n,r);a&&Oee(t,e,a,o,r)}const G_t=Object.freeze(Object.defineProperty({__proto__:null,decode:T_t,name:S_t},Symbol.toStringTag,{value:"Module"})),K_t="4.3.3",J_t="4.3.3",Db={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let zee;async function Hee(t){return ADt(t.modules),gDt("basis")||(zee||=Z_t(t),await zee)}async function Z_t(t){let e=null,i=null;return[e,i]=await Promise.all([await xh(Db.TRANSCODER,"textures",t),await xh(Db.TRANSCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await W_t(e,i)}function W_t(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t(i).then(r=>{const{BasisFile:n,initializeBasis:a}=r;a(),o({BasisFile:n})})})}let SS;async function qee(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(SS=SS||Y_t(t),await SS)}async function Y_t(t){let e=null,i=null;return[e,i]=await Promise.all([await xh(Db.ENCODER,"textures",t),await xh(Db.ENCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await X_t(e,i)}function X_t(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t(i).then(r=>{const{BasisFile:n,KTX2File:a,initializeBasis:s,BasisEncoder:l}=r;s(),o({BasisFile:n,KTX2File:a,BasisEncoder:l})})})}const J1={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_ASTC_4X4_KHR:37808},$_t=["","WEBKIT_","MOZ_"],Qee={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let Rb=null;function eFt(t){if(!Rb){t=t||tFt()||void 0,Rb=new Set;for(const e of $_t)for(const i in Qee)if(t&&t.getExtension(`${e}${i}`)){const o=Qee[i];Rb.add(o)}}return Rb}function tFt(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}const Ca=[171,75,84,88,32,50,48,187,13,10,26,10];function iFt(t){const e=new Uint8Array(t);return!(e.byteLength<Ca.length||e[0]!==Ca[0]||e[1]!==Ca[1]||e[2]!==Ca[2]||e[3]!==Ca[3]||e[4]!==Ca[4]||e[5]!==Ca[5]||e[6]!==Ca[6]||e[7]!==Ca[7]||e[8]!==Ca[8]||e[9]!==Ca[9]||e[10]!==Ca[10]||e[11]!==Ca[11])}const oFt={etc1:{basisFormat:0,compressed:!0,format:J1.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:J1.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:J1.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:J1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:J1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:J1.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function rFt(t,e){if(e.basis.containerFormat==="auto"){if(iFt(t)){const o=await qee(e);return Gee(o.KTX2File,t,e)}const{BasisFile:i}=await Hee(e);return TS(i,t,e)}if(e.basis.module==="encoder"){const i=await qee(e);return e.basis.containerFormat==="ktx2"?Gee(i.KTX2File,t,e):TS(i.BasisFile,t,e)}else{const{BasisFile:i}=await Hee(e);return TS(i,t,e)}}function TS(t,e,i){const o=new t(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("Failed to start basis transcoding");const r=o.getNumImages(),n=[];for(let a=0;a<r;a++){const s=o.getNumLevels(a),l=[];for(let c=0;c<s;c++)l.push(nFt(o,a,c,i));n.push(l)}return n}finally{o.close(),o.delete()}}function nFt(t,e,i,o){const r=t.getImageWidth(e,i),n=t.getImageHeight(e,i),a=t.getHasAlpha(),{compressed:s,format:l,basisFormat:c}=Kee(o,a),d=t.getImageTranscodedSizeInBytes(e,i,c),u=new Uint8Array(d);if(!t.transcodeImage(u,e,i,c,0,0))throw new Error("failed to start Basis transcoding");return{width:r,height:n,data:u,compressed:s,format:l,hasAlpha:a}}function Gee(t,e,i){const o=new t(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("failed to start KTX2 transcoding");const r=o.getLevels(),n=[];for(let a=0;a<r;a++)n.push(aFt(o,a,i));return[n]}finally{o.close(),o.delete()}}function aFt(t,e,i){const{alphaFlag:o,height:r,width:n}=t.getImageLevelInfo(e,0,0),{compressed:a,format:s,basisFormat:l}=Kee(i,o),c=t.getImageTranscodedSizeInBytes(e,0,0,l),d=new Uint8Array(c);if(!t.transcodeImage(d,e,0,0,l,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:n,height:r,data:d,compressed:a,levelSize:c,hasAlpha:o,format:s}}function Kee(t,e){let i=t&&t.basis&&t.basis.format;return i==="auto"&&(i=Jee()),typeof i=="object"&&(i=e?i.alpha:i.noAlpha),i=i.toLowerCase(),oFt[i]}function Jee(){const t=eFt();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const sFt={dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:J_t,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},lFt={...sFt,parse:rFt},Z1=!0,Zee=1735152710,DS=12,Lb=8,cFt=1313821514,dFt=5130562,uFt=0,hFt=0,pFt=1;function fFt(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}function AFt(t,e=0,i={}){const o=new DataView(t),{magic:r=Zee}=i,n=o.getUint32(e,!1);return n===r||n===Zee}function gFt(t,e,i=0,o={}){const r=new DataView(e),n=fFt(r,i+0),a=r.getUint32(i+4,Z1),s=r.getUint32(i+8,Z1);switch(Object.assign(t,{header:{byteOffset:i,byteLength:s,hasBinChunk:!1},type:n,version:a,json:{},binChunks:[]}),i+=DS,t.version){case 1:return mFt(t,r,i);case 2:return vFt(t,r,i,o={});default:throw new Error(`Invalid GLB version ${t.version}. Only supports version 1 and 2.`)}}function mFt(t,e,i){bc(t.header.byteLength>DS+Lb);const o=e.getUint32(i+0,Z1),r=e.getUint32(i+4,Z1);return i+=Lb,bc(r===uFt),RS(t,e,i,o),i+=o,i+=LS(t,e,i,t.header.byteLength),i}function vFt(t,e,i,o){return bc(t.header.byteLength>DS+Lb),yFt(t,e,i,o),i+t.header.byteLength}function yFt(t,e,i,o){for(;i+8<=t.header.byteLength;){const r=e.getUint32(i+0,Z1),n=e.getUint32(i+4,Z1);switch(i+=Lb,n){case cFt:RS(t,e,i,r);break;case dFt:LS(t,e,i,r);break;case hFt:o.strict||RS(t,e,i,r);break;case pFt:o.strict||LS(t,e,i,r);break}i+=z3(r,4)}return i}function RS(t,e,i,o){const r=new Uint8Array(e.buffer,i,o),n=new TextDecoder("utf8").decode(r);return t.json=JSON.parse(n),z3(o,4)}function LS(t,e,i,o){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:i,byteLength:o,arrayBuffer:e.buffer}),z3(o,4)}function Wee(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const i=e.baseUri||e.uri;if(!i)throw new Error(`'baseUri' must be provided to resolve relative url ${t}`);return i.substr(0,i.lastIndexOf("/")+1)+t}const bFt="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",wFt="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",CFt=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),xFt=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),kFt={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},MFt={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function EFt(t,e,i,o,r,n="NONE"){const a=await BFt();SFt(a,a.exports[MFt[r]],t,e,i,o,a.exports[kFt[n||"NONE"]])}let _S;async function BFt(){return _S||(_S=PFt()),_S}async function PFt(){let t=bFt;WebAssembly.validate(CFt)&&(t=wFt,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(IFt(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function IFt(t){const e=new Uint8Array(t.length);for(let o=0;o<t.length;++o){const r=t.charCodeAt(o);e[o]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let i=0;for(let o=0;o<t.length;++o)e[i++]=e[o]<60?xFt[e[o]]:(e[o]-60)*64+e[++o];return e.buffer.slice(0,i)}function SFt(t,e,i,o,r,n,a){const s=t.exports.sbrk,l=o+3&-4,c=s(l*r),d=s(n.length),u=new Uint8Array(t.exports.memory.buffer);u.set(n,d);const h=e(c,o,r,d,n.length);if(h===0&&a&&a(c,l,r),i.set(u.subarray(c,c+o*r)),s(c-s(0)),h!==0)throw new Error(`Malformed buffer data: ${h}`)}const _b="EXT_meshopt_compression",TFt=_b;async function DFt(t,e){const i=new Ir(t);if(!e?.gltf?.decompressMeshes||!e.gltf?.loadBuffers)return;const o=[];for(const r of t.json.bufferViews||[])o.push(RFt(i,r));await Promise.all(o),i.removeExtension(_b)}async function RFt(t,e){const i=t.getObjectExtension(e,_b);if(i){const{byteOffset:o=0,byteLength:r=0,byteStride:n,count:a,mode:s,filter:l="NONE",buffer:c}=i,d=t.gltf.buffers[c],u=new Uint8Array(d.arrayBuffer,d.byteOffset+o,r),h=new Uint8Array(t.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await EFt(h,a,n,u,s,l),t.removeObjectExtension(e,_b)}}const LFt=Object.freeze(Object.defineProperty({__proto__:null,decode:DFt,name:TFt},Symbol.toStringTag,{value:"Module"})),W1="EXT_texture_webp",_Ft=W1;function FFt(t,e){const i=new Ir(t);if(!SLt("image/webp")){if(i.getRequiredExtensions().includes(W1))throw new Error(`gltf: Required extension ${W1} not supported by browser`);return}const{json:o}=i;for(const r of o.textures||[]){const n=i.getObjectExtension(r,W1);n&&(r.source=n.source),i.removeObjectExtension(r,W1)}i.removeExtension(W1)}const OFt=Object.freeze(Object.defineProperty({__proto__:null,name:_Ft,preprocess:FFt},Symbol.toStringTag,{value:"Module"})),Fb="KHR_texture_basisu",UFt=Fb;function NFt(t,e){const i=new Ir(t),{json:o}=i;for(const r of o.textures||[]){const n=i.getObjectExtension(r,Fb);n&&(r.source=n.source,i.removeObjectExtension(r,Fb))}i.removeExtension(Fb)}const jFt=Object.freeze(Object.defineProperty({__proto__:null,name:UFt,preprocess:NFt},Symbol.toStringTag,{value:"Module"})),VFt="4.3.3",zFt={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:VFt,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function HFt(t,e,i){const o=Xee(e.metadata),r=[],n=qFt(e.attributes);for(const a in t){const s=t[a],l=Yee(a,s,n[a]);r.push(l)}if(i){const a=Yee("indices",i);r.push(a)}return{fields:r,metadata:o}}function qFt(t){const e={};for(const i in t){const o=t[i];e[o.name||"undefined"]=o}return e}function Yee(t,e,i){const o=i?Xee(i.metadata):void 0;return ZRt(t,e,o)}function Xee(t){Object.entries(t);const e={};for(const i in t)e[`${i}.string`]=JSON.stringify(t[i]);return e}const $ee={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},QFt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},GFt=4;class KFt{draco;decoder;metadataQuerier;constructor(e){this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,i={}){const o=new this.draco.DecoderBuffer;o.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(i);const r=this.decoder.GetEncodedGeometryType(o),n=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let a;switch(r){case this.draco.TRIANGULAR_MESH:a=this.decoder.DecodeBufferToMesh(o,n);break;case this.draco.POINT_CLOUD:a=this.decoder.DecodeBufferToPointCloud(o,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!a.ok()||!n.ptr){const u=`DRACO decompression failed: ${a.error_msg()}`;throw new Error(u)}const s=this._getDracoLoaderData(n,r,i),l=this._getMeshData(n,s,i),c=JRt(l.attributes),d=HFt(l.attributes,s,l.indices);return{loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:c},...l,schema:d}}finally{this.draco.destroy(o),n&&this.draco.destroy(n)}}_getDracoLoaderData(e,i,o){const r=this._getTopLevelMetadata(e),n=this._getDracoAttributes(e,o);return{geometry_type:i,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:n}}_getDracoAttributes(e,i){const o={};for(let r=0;r<e.num_attributes();r++){const n=this.decoder.GetAttribute(e,r),a=this._getAttributeMetadata(e,r);o[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:r,metadata:a};const s=this._getQuantizationTransform(n,i);s&&(o[n.unique_id()].quantization_transform=s);const l=this._getOctahedronTransform(n,i);l&&(o[n.unique_id()].octahedron_transform=l)}return o}_getMeshData(e,i,o){const r=this._getMeshAttributes(i,e,o);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");return e instanceof this.draco.Mesh?o.topology==="triangle-strip"?{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(e),size:1}}:{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(e),size:1}}:{topology:"point-list",mode:0,attributes:r}}_getMeshAttributes(e,i,o){const r={};for(const n of Object.values(e.attributes)){const a=this._deduceAttributeName(n,o);n.name=a;const s=this._getAttributeValues(i,n);if(s){const{value:l,size:c}=s;r[a]={value:l,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}}return r}_getTriangleListIndices(e){const i=e.num_faces()*3,o=i*GFt,r=this.draco._malloc(o);try{return this.decoder.GetTrianglesUInt32Array(e,o,r),new Uint32Array(this.draco.HEAPF32.buffer,r,i).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(e){const i=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,i),WFt(i)}finally{this.draco.destroy(i)}}_getAttributeValues(e,i){const o=QFt[i.data_type];if(!o)return console.warn(`DRACO: Unsupported attribute type ${i.data_type}`),null;const r=i.num_components,n=e.num_points()*r,a=n*o.BYTES_PER_ELEMENT,s=JFt(this.draco,o);let l;const c=this.draco._malloc(a);try{const d=this.decoder.GetAttribute(e,i.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,d,s,a,c),l=new o(this.draco.HEAPF32.buffer,c,n).slice()}finally{this.draco._free(c)}return{value:l,size:r}}_deduceAttributeName(e,i){const o=e.unique_id;for(const[a,s]of Object.entries(i.extraAttributes||{}))if(s===o)return a;const r=e.attribute_type;for(const a in $ee)if(this.draco[a]===r)return $ee[a];const n=i.attributeNameEntry||"name";return e.metadata[n]?e.metadata[n].string:`CUSTOM_ATTRIBUTE_${o}`}_getTopLevelMetadata(e){const i=this.decoder.GetMetadata(e);return this._getDracoMetadata(i)}_getAttributeMetadata(e,i){const o=this.decoder.GetAttributeMetadata(e,i);return this._getDracoMetadata(o)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const i={},o=this.metadataQuerier.NumEntries(e);for(let r=0;r<o;r++){const n=this.metadataQuerier.GetEntryName(e,r);i[n]=this._getDracoMetadataField(e,n)}return i}_getDracoMetadataField(e,i){const o=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,i,o);const r=ZFt(o);return{int:this.metadataQuerier.GetIntEntry(e,i),string:this.metadataQuerier.GetStringEntry(e,i),double:this.metadataQuerier.GetDoubleEntry(e,i),intArray:r}}finally{this.draco.destroy(o)}}_disableAttributeTransforms(e){const{quantizedAttributes:i=[],octahedronAttributes:o=[]}=e,r=[...i,...o];for(const n of r)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(e,i){const{quantizedAttributes:o=[]}=i,r=e.attribute_type();if(o.map(n=>this.decoder[n]).includes(r)){const n=new this.draco.AttributeQuantizationTransform;try{if(n.InitFromAttribute(e))return{quantization_bits:n.quantization_bits(),range:n.range(),min_values:new Float32Array([1,2,3]).map(a=>n.min_value(a))}}finally{this.draco.destroy(n)}}return null}_getOctahedronTransform(e,i){const{octahedronAttributes:o=[]}=i,r=e.attribute_type();if(o.map(n=>this.decoder[n]).includes(r)){const n=new this.draco.AttributeQuantizationTransform;try{if(n.InitFromAttribute(e))return{quantization_bits:n.quantization_bits()}}finally{this.draco.destroy(n)}}return null}}function JFt(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}function ZFt(t){const e=t.size(),i=new Int32Array(e);for(let o=0;o<e;o++)i[o]=t.GetValue(o);return i}function WFt(t){const e=t.size(),i=new Int32Array(e);for(let o=0;o<e;o++)i[o]=t.GetValue(o);return i}const YFt="1.5.6",XFt="1.4.1",FS=`https://www.gstatic.com/draco/versioned/decoders/${YFt}`,ea={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},OS={[ea.DECODER]:`${FS}/${ea.DECODER}`,[ea.DECODER_WASM]:`${FS}/${ea.DECODER_WASM}`,[ea.FALLBACK_DECODER]:`${FS}/${ea.FALLBACK_DECODER}`,[ea.ENCODER]:`https://raw.githubusercontent.com/google/draco/${XFt}/javascript/${ea.ENCODER}`};let US;async function $Ft(t){const e=t.modules||{};return e.draco3d?US||=e.draco3d.createDecoderModule({}).then(i=>({draco:i})):US||=eOt(t),await US}async function eOt(t){let e,i;return(t.draco&&t.draco.decoderType)==="js"?e=await xh(OS[ea.FALLBACK_DECODER],"draco",t,ea.FALLBACK_DECODER):[e,i]=await Promise.all([await xh(OS[ea.DECODER],"draco",t,ea.DECODER),await xh(OS[ea.DECODER_WASM],"draco",t,ea.DECODER_WASM)]),e=e||globalThis.DracoDecoderModule,await tOt(e,i)}function tOt(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t({...i,onModuleLoaded:r=>o({draco:r})})})}const iOt={...zFt,parse:oOt};async function oOt(t,e){const{draco:i}=await $Ft(e),o=new KFt(i);try{return o.parseSync(t,e?.draco)}finally{o.destroy()}}function rOt(t){const e={};for(const i in t){const o=t[i];if(i!=="indices"){const r=ete(o);e[i]=r}}return e}function ete(t){const{buffer:e,size:i,count:o}=nOt(t);return{value:e,size:i,byteOffset:0,count:o,type:Ree(i),componentType:Ib(e)}}function nOt(t){let e=t,i=1,o=0;return t&&t.value&&(e=t.value,i=t.size||1),e&&(ArrayBuffer.isView(e)||(e=aOt(e,Float32Array)),o=e.length/i),{buffer:e,size:i,count:o}}function aOt(t,e,i=!1){return t?Array.isArray(t)?new e(t):i&&!(t instanceof e)?new e(t):t:null}const Vd="KHR_draco_mesh_compression",sOt=Vd;function lOt(t,e,i){const o=new Ir(t);for(const r of tte(o))o.getObjectExtension(r,Vd)}async function cOt(t,e,i){if(!e?.gltf?.decompressMeshes)return;const o=new Ir(t),r=[];for(const n of tte(o))o.getObjectExtension(n,Vd)&&r.push(uOt(o,n,e,i));await Promise.all(r),o.removeExtension(Vd)}function dOt(t,e={}){const i=new Ir(t);for(const o of i.json.meshes||[])hOt(o),i.addRequiredExtension(Vd)}async function uOt(t,e,i,o){const r=t.getObjectExtension(e,Vd);if(!r)return;const n=t.getTypedArrayForBufferView(r.bufferView),a=eee(n.buffer,n.byteOffset),s={...i};delete s["3d-tiles"];const l=await O$(a,iOt,s,o),c=rOt(l.attributes);for(const[d,u]of Object.entries(c))if(d in e.attributes){const h=e.attributes[d],p=t.getAccessor(h);p?.min&&p?.max&&(u.min=p.min,u.max=p.max)}e.attributes=c,l.indices&&(e.indices=ete(l.indices)),t.removeObjectExtension(e,Vd),pOt(e)}function hOt(t,e,i=4,o,r){if(!o.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const n=o.DracoWriter.encodeSync({attributes:t}),a=r?.parseSync?.({attributes:t}),s=o._addFauxAttributes(a.attributes),l=o.addBufferView(n);return{primitives:[{attributes:s,mode:i,extensions:{[Vd]:{bufferView:l,attributes:s}}}]}}function pOt(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*tte(t){for(const e of t.json.meshes||[])for(const i of e.primitives)yield i}const fOt=Object.freeze(Object.defineProperty({__proto__:null,decode:cOt,encode:dOt,name:sOt,preprocess:lOt},Symbol.toStringTag,{value:"Module"})),AOt={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...AOt}};const Ka=globalThis.mathgl.config;function gOt(t,{precision:e=Ka.precision}={}){return t=mOt(t),`${parseFloat(t.toPrecision(e))}`}function Ob(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ite(t,e,i){const o=Ka.EPSILON;try{if(t===e)return!0;if(Ob(t)&&Ob(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!ite(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):typeof t=="number"&&typeof e=="number"?Math.abs(t-e)<=Ka.EPSILON*Math.max(1,Math.abs(t),Math.abs(e)):!1}finally{Ka.EPSILON=o}}function mOt(t){return Math.round(t/Ka.EPSILON)*Ka.EPSILON}class ote extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,i=0){for(let o=0;o<this.ELEMENTS;++o)this[o]=e[o+i];return this.check()}toArray(e=[],i=0){for(let o=0;o<this.ELEMENTS;++o)e[i+o]=this[o];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:Ob(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(Ka)}formatString(e){let i="";for(let o=0;o<this.ELEMENTS;++o)i+=(o>0?", ":"")+gOt(this[o],e);return`${e.printTypes?this.constructor.name:""}[${i}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let i=0;i<this.ELEMENTS;++i)if(!ite(this[i],e[i]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let i=0;i<this.ELEMENTS;++i)if(this[i]!==e[i])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,i,o){if(o===void 0)return this.lerp(this,e,i);for(let r=0;r<this.ELEMENTS;++r){const n=e[r],a=typeof i=="number"?i:i[r];this[r]=n+o*(a-n)}return this.check()}min(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=Math.min(e[i],this[i]);return this.check()}max(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=Math.max(e[i],this[i]);return this.check()}clamp(e,i){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e[o]),i[o]);return this.check()}add(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}subtract(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}scale(e){if(typeof e=="number")for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;else for(let i=0;i<this.ELEMENTS&&i<e.length;++i)this[i]*=e[i];return this.check()}multiplyByScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;return this.check()}check(){if(Ka.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let e=this.length===this.ELEMENTS;for(let i=0;i<this.ELEMENTS;++i)e=e&&Number.isFinite(this[i]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=e;return this.check()}addScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,i){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e),i);return this.check()}get elements(){return this}}function vOt(t,e){if(t.length!==e)return!1;for(let i=0;i<t.length;++i)if(!Number.isFinite(t[i]))return!1;return!0}function xa(t){if(!Number.isFinite(t))throw new Error(`Invalid number ${JSON.stringify(t)}`);return t}function yOt(t,e,i=""){if(Ka.debug&&!vOt(t,e))throw new Error(`math.gl: ${i} some fields set to invalid numbers'`);return t}function rte(t,e){if(!t)throw new Error(`math.gl assertion ${e}`)}class bOt extends ote{get x(){return this[0]}set x(e){this[0]=xa(e)}get y(){return this[1]}set y(e){this[1]=xa(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let i=0;i<this.ELEMENTS;++i)e+=this[i]*this[i];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let i=0;for(let o=0;o<this.ELEMENTS;++o){const r=this[o]-e[o];i+=r*r}return xa(i)}dot(e){let i=0;for(let o=0;o<this.ELEMENTS;++o)i+=this[o]*e[o];return xa(i)}normalize(){const e=this.magnitude();if(e!==0)for(let i=0;i<this.ELEMENTS;++i)this[i]/=e;return this.check()}multiply(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}divide(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return rte(e>=0&&e<this.ELEMENTS,"index is out of range"),xa(this[e])}setComponent(e,i){return rte(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=i,this.check()}addVectors(e,i){return this.copy(e).add(i)}subVectors(e,i){return this.copy(e).subtract(i)}multiplyVectors(e,i){return this.copy(e).multiply(i)}addScaledVector(e,i){return this.add(new this.constructor(e).multiplyScalar(i))}}let Ub=typeof Float32Array<"u"?Float32Array:Array;function wOt(){const t=new Ub(2);return Ub!=Float32Array&&(t[0]=0,t[1]=0),t}function COt(t,e,i){const o=e[0],r=e[1];return t[0]=i[0]*o+i[3]*r+i[6],t[1]=i[1]*o+i[4]*r+i[7],t}(function(){const t=wOt();return function(e,i,o,r,n,a){let s,l;for(i||(i=2),o||(o=0),r?l=Math.min(r*i+o,e.length):l=e.length,s=o;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],n(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}})();function xOt(t,e,i){const o=e[0],r=e[1],n=e[2],a=i[3]*o+i[7]*r+i[11]*n||1;return t[0]=(i[0]*o+i[4]*r+i[8]*n)/a,t[1]=(i[1]*o+i[5]*r+i[9]*n)/a,t[2]=(i[2]*o+i[6]*r+i[10]*n)/a,t}function kOt(t,e,i){const o=e[0],r=e[1];return t[0]=i[0]*o+i[2]*r,t[1]=i[1]*o+i[3]*r,t[2]=e[2],t}function MOt(t,e,i){const o=e[0],r=e[1],n=e[2];return t[0]=i[0]*o+i[3]*r+i[6]*n,t[1]=i[1]*o+i[4]*r+i[7]*n,t[2]=i[2]*o+i[5]*r+i[8]*n,t[3]=e[3],t}function EOt(){const t=new Ub(3);return Ub!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function BOt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function POt(t,e,i){const o=e[0],r=e[1],n=e[2],a=i[0],s=i[1],l=i[2];return t[0]=r*l-n*s,t[1]=n*a-o*l,t[2]=o*s-r*a,t}function IOt(t,e,i){const o=e[0],r=e[1],n=e[2];let a=i[3]*o+i[7]*r+i[11]*n+i[15];return a=a||1,t[0]=(i[0]*o+i[4]*r+i[8]*n+i[12])/a,t[1]=(i[1]*o+i[5]*r+i[9]*n+i[13])/a,t[2]=(i[2]*o+i[6]*r+i[10]*n+i[14])/a,t}function nte(t,e,i){const o=e[0],r=e[1],n=e[2];return t[0]=o*i[0]+r*i[3]+n*i[6],t[1]=o*i[1]+r*i[4]+n*i[7],t[2]=o*i[2]+r*i[5]+n*i[8],t}function SOt(t,e,i){const o=i[0],r=i[1],n=i[2],a=i[3],s=e[0],l=e[1],c=e[2];let d=r*c-n*l,u=n*s-o*c,h=o*l-r*s,p=r*h-n*u,A=n*d-o*h,f=o*u-r*d;const m=a*2;return d*=m,u*=m,h*=m,p*=2,A*=2,f*=2,t[0]=s+d+p,t[1]=l+u+A,t[2]=c+h+f,t}function TOt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[0],n[1]=r[1]*Math.cos(o)-r[2]*Math.sin(o),n[2]=r[1]*Math.sin(o)+r[2]*Math.cos(o),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function DOt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[2]*Math.sin(o)+r[0]*Math.cos(o),n[1]=r[1],n[2]=r[2]*Math.cos(o)-r[0]*Math.sin(o),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function ROt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[0]*Math.cos(o)-r[1]*Math.sin(o),n[1]=r[0]*Math.sin(o)+r[1]*Math.cos(o),n[2]=r[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function LOt(t,e){const i=t[0],o=t[1],r=t[2],n=e[0],a=e[1],s=e[2],l=Math.sqrt((i*i+o*o+r*r)*(n*n+a*a+s*s)),c=l&&BOt(t,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}(function(){const t=EOt();return function(e,i,o,r,n,a){let s,l;for(i||(i=3),o||(o=0),r?l=Math.min(r*i+o,e.length):l=e.length,s=o;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],n(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}})();const NS=[0,0,0];let Nb,_Ot=class t2e extends bOt{static get ZERO(){return Nb||(Nb=new t2e(0,0,0),Object.freeze(Nb)),Nb}constructor(e=0,i=0,o=0){super(-0,-0,-0),arguments.length===1&&Ob(e)?this.copy(e):(Ka.debug&&(xa(e),xa(i),xa(o)),this[0]=e,this[1]=i,this[2]=o)}set(e,i,o){return this[0]=e,this[1]=i,this[2]=o,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return Ka.debug&&(xa(e.x),xa(e.y),xa(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=xa(e)}angle(e){return LOt(this,e)}cross(e){return POt(this,this,e),this.check()}rotateX({radians:e,origin:i=NS}){return TOt(this,this,i,e),this.check()}rotateY({radians:e,origin:i=NS}){return DOt(this,this,i,e),this.check()}rotateZ({radians:e,origin:i=NS}){return ROt(this,this,i,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return IOt(this,this,e),this.check()}transformAsVector(e){return xOt(this,this,e),this.check()}transformByMatrix3(e){return nte(this,this,e),this.check()}transformByMatrix2(e){return kOt(this,this,e),this.check()}transformByQuaternion(e){return SOt(this,this,e),this.check()}};class FOt extends ote{toString(){let e="[";if(Ka.printRowMajor){e+="row-major:";for(let i=0;i<this.RANK;++i)for(let o=0;o<this.RANK;++o)e+=` ${this[o*this.RANK+i]}`}else{e+="column-major:";for(let i=0;i<this.ELEMENTS;++i)e+=` ${this[i]}`}return e+="]",e}getElementIndex(e,i){return i*this.RANK+e}getElement(e,i){return this[i*this.RANK+e]}setElement(e,i,o){return this[i*this.RANK+e]=xa(o),this}getColumn(e,i=new Array(this.RANK).fill(-0)){const o=e*this.RANK;for(let r=0;r<this.RANK;++r)i[r]=this[o+r];return i}setColumn(e,i){const o=e*this.RANK;for(let r=0;r<this.RANK;++r)this[o+r]=i[r];return this}}function OOt(t,e){if(t===e){const i=e[1],o=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=i,t[5]=e[7],t[6]=o,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function UOt(t,e){const i=e[0],o=e[1],r=e[2],n=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=d*a-s*c,h=-d*n+s*l,p=c*n-a*l;let A=i*u+o*h+r*p;return A?(A=1/A,t[0]=u*A,t[1]=(-d*o+r*c)*A,t[2]=(s*o-r*a)*A,t[3]=h*A,t[4]=(d*i-r*l)*A,t[5]=(-s*i+r*n)*A,t[6]=p*A,t[7]=(-c*i+o*l)*A,t[8]=(a*i-o*n)*A,t):null}function NOt(t){const e=t[0],i=t[1],o=t[2],r=t[3],n=t[4],a=t[5],s=t[6],l=t[7],c=t[8];return e*(c*n-a*l)+i*(-c*r+a*s)+o*(l*r-n*s)}function ate(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=i[0],p=i[1],A=i[2],f=i[3],m=i[4],g=i[5],y=i[6],v=i[7],b=i[8];return t[0]=h*o+p*a+A*c,t[1]=h*r+p*s+A*d,t[2]=h*n+p*l+A*u,t[3]=f*o+m*a+g*c,t[4]=f*r+m*s+g*d,t[5]=f*n+m*l+g*u,t[6]=y*o+v*a+b*c,t[7]=y*r+v*s+b*d,t[8]=y*n+v*l+b*u,t}function jOt(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=i[0],p=i[1];return t[0]=o,t[1]=r,t[2]=n,t[3]=a,t[4]=s,t[5]=l,t[6]=h*o+p*a+c,t[7]=h*r+p*s+d,t[8]=h*n+p*l+u,t}function VOt(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=Math.sin(i),p=Math.cos(i);return t[0]=p*o+h*a,t[1]=p*r+h*s,t[2]=p*n+h*l,t[3]=p*a-h*o,t[4]=p*s-h*r,t[5]=p*l-h*n,t[6]=c,t[7]=d,t[8]=u,t}function ste(t,e,i){const o=i[0],r=i[1];return t[0]=o*e[0],t[1]=o*e[1],t[2]=o*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function zOt(t,e){const i=e[0],o=e[1],r=e[2],n=e[3],a=i+i,s=o+o,l=r+r,c=i*a,d=o*a,u=o*s,h=r*a,p=r*s,A=r*l,f=n*a,m=n*s,g=n*l;return t[0]=1-u-A,t[3]=d-g,t[6]=h+m,t[1]=d+g,t[4]=1-c-A,t[7]=p-f,t[2]=h-m,t[5]=p+f,t[8]=1-c-u,t}var jS;(function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL1ROW0=3]="COL1ROW0",t[t.COL1ROW1=4]="COL1ROW1",t[t.COL1ROW2=5]="COL1ROW2",t[t.COL2ROW0=6]="COL2ROW0",t[t.COL2ROW1=7]="COL2ROW1",t[t.COL2ROW2=8]="COL2ROW2"})(jS||(jS={}));const HOt=Object.freeze([1,0,0,0,1,0,0,0,1]);let K3=class extends FOt{static get IDENTITY(){return QOt()}static get ZERO(){return qOt()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return jS}constructor(t,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(t)?this.copy(t):e.length>0?this.copy([t,...e]):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}identity(){return this.copy(HOt)}fromObject(t){return this.check()}fromQuaternion(t){return zOt(this,t),this.check()}set(t,e,i,o,r,n,a,s,l){return this[0]=t,this[1]=e,this[2]=i,this[3]=o,this[4]=r,this[5]=n,this[6]=a,this[7]=s,this[8]=l,this.check()}setRowMajor(t,e,i,o,r,n,a,s,l){return this[0]=t,this[1]=o,this[2]=a,this[3]=e,this[4]=r,this[5]=s,this[6]=i,this[7]=n,this[8]=l,this.check()}determinant(){return NOt(this)}transpose(){return OOt(this,this),this.check()}invert(){return UOt(this,this),this.check()}multiplyLeft(t){return ate(this,t,this),this.check()}multiplyRight(t){return ate(this,this,t),this.check()}rotate(t){return VOt(this,this,t),this.check()}scale(t){return Array.isArray(t)?ste(this,this,t):ste(this,this,[t,t]),this.check()}translate(t){return jOt(this,this,t),this.check()}transform(t,e){let i;switch(t.length){case 2:i=COt(e||[-0,-0],t,this);break;case 3:i=nte(e||[-0,-0,-0],t,this);break;case 4:i=MOt(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return yOt(i,t.length),i}transformVector(t,e){return this.transform(t,e)}transformVector2(t,e){return this.transform(t,e)}transformVector3(t,e){return this.transform(t,e)}},jb,Vb=null;function qOt(){return jb||(jb=new K3([0,0,0,0,0,0,0,0,0]),Object.freeze(jb)),jb}function QOt(){return Vb||(Vb=new K3,Object.freeze(Vb)),Vb}const zb="KHR_texture_transform",GOt=zb,Hb=new _Ot,KOt=new K3,JOt=new K3;async function ZOt(t,e){if(!new Ir(t).hasExtension(zb)||!e.gltf?.loadBuffers)return;const i=t.json.materials||[];for(let o=0;o<i.length;o++)WOt(o,t)}function WOt(t,e){const i=e.json.materials?.[t],o=[i?.pbrMetallicRoughness?.baseColorTexture,i?.emissiveTexture,i?.normalTexture,i?.occlusionTexture,i?.pbrMetallicRoughness?.metallicRoughnessTexture],r=[];for(const n of o)n&&n?.extensions?.[zb]&&YOt(e,t,n,r)}function YOt(t,e,i,o){const r=XOt(i,o);if(!r)return;const n=t.json.meshes||[];for(const a of n)for(const s of a.primitives){const l=s.material;Number.isFinite(l)&&e===l&&$Ot(t,s,r)}}function XOt(t,e){const i=t.extensions?.[zb],{texCoord:o=0}=t,{texCoord:r=o}=i;if(e.findIndex(([n,a])=>n===o&&a===r)===-1){const n=iUt(i);return o!==r&&(t.texCoord=r),e.push([o,r]),{originalTexCoord:o,texCoord:r,matrix:n}}return null}function $Ot(t,e,i){const{originalTexCoord:o,texCoord:r,matrix:n}=i,a=e.attributes[`TEXCOORD_${o}`];if(Number.isFinite(a)){const s=t.json.accessors?.[a];if(s&&s.bufferView){const l=t.json.bufferViews?.[s.bufferView];if(l){const{arrayBuffer:c,byteOffset:d}=t.buffers[l.buffer],u=(d||0)+(s.byteOffset||0)+(l.byteOffset||0),{ArrayType:h,length:p}=MS(s,l),A=Tee[s.componentType],f=See[s.type],m=l.byteStride||A*f,g=new Float32Array(p);for(let y=0;y<s.count;y++){const v=new h(c,u+y*m,2);Hb.set(v[0],v[1],1),Hb.transformByMatrix3(n),g.set([Hb[0],Hb[1]],y*f)}o===r?eUt(s,l,t.buffers,g):tUt(r,s,e,t,g)}}}}function eUt(t,e,i,o){t.componentType=5126,i.push({arrayBuffer:o.buffer,byteOffset:0,byteLength:o.buffer.byteLength}),e.buffer=i.length-1,e.byteLength=o.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function tUt(t,e,i,o,r){o.buffers.push({arrayBuffer:r.buffer,byteOffset:0,byteLength:r.buffer.byteLength});const n=o.json.bufferViews;if(!n)return;n.push({buffer:o.buffers.length-1,byteLength:r.buffer.byteLength,byteOffset:0});const a=o.json.accessors;a&&(a.push({bufferView:n?.length-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),i.attributes[`TEXCOORD_${t}`]=a.length-1)}function iUt(t){const{offset:e=[0,0],rotation:i=0,scale:o=[1,1]}=t,r=new K3().set(1,0,0,0,1,0,e[0],e[1],1),n=KOt.set(Math.cos(i),Math.sin(i),0,-Math.sin(i),Math.cos(i),0,0,0,1),a=JOt.set(o[0],0,0,0,o[1],0,0,0,1);return r.multiplyRight(n).multiplyRight(a)}const oUt=Object.freeze(Object.defineProperty({__proto__:null,decode:ZOt,name:GOt},Symbol.toStringTag,{value:"Module"})),Mh="KHR_lights_punctual",rUt=Mh;async function nUt(t){const e=new Ir(t),{json:i}=e,o=e.getExtension(Mh);o&&(e.json.lights=o.lights,e.removeExtension(Mh));for(const r of i.nodes||[]){const n=e.getObjectExtension(r,Mh);n&&(r.light=n.light),e.removeObjectExtension(r,Mh)}}async function aUt(t){const e=new Ir(t),{json:i}=e;if(i.lights){const o=e.addExtension(Mh);wa(!o.lights),o.lights=i.lights,delete i.lights}if(e.json.lights){for(const o of e.json.lights){const r=o.node;e.addObjectExtension(r,Mh,o)}delete e.json.lights}}const sUt=Object.freeze(Object.defineProperty({__proto__:null,decode:nUt,encode:aUt,name:rUt},Symbol.toStringTag,{value:"Module"})),J3="KHR_materials_unlit",lUt=J3;async function cUt(t){const e=new Ir(t),{json:i}=e;for(const o of i.materials||[])o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),e.removeObjectExtension(o,J3);e.removeExtension(J3)}function dUt(t){const e=new Ir(t),{json:i}=e;if(e.materials)for(const o of i.materials||[])o.unlit&&(delete o.unlit,e.addObjectExtension(o,J3,{}),e.addExtension(J3))}const uUt=Object.freeze(Object.defineProperty({__proto__:null,decode:cUt,encode:dUt,name:lUt},Symbol.toStringTag,{value:"Module"})),Z3="KHR_techniques_webgl",hUt=Z3;async function pUt(t){const e=new Ir(t),{json:i}=e,o=e.getExtension(Z3);if(o){const r=AUt(o,e);for(const n of i.materials||[]){const a=e.getObjectExtension(n,Z3);a&&(n.technique=Object.assign({},a,r[a.technique]),n.technique.values=gUt(n.technique,e)),e.removeObjectExtension(n,Z3)}e.removeExtension(Z3)}}async function fUt(t,e){}function AUt(t,e){const{programs:i=[],shaders:o=[],techniques:r=[]}=t,n=new TextDecoder;return o.forEach(a=>{if(Number.isFinite(a.bufferView))a.code=n.decode(e.getTypedArrayForBufferView(a.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),i.forEach(a=>{a.fragmentShader=o[a.fragmentShader],a.vertexShader=o[a.vertexShader]}),r.forEach(a=>{a.program=i[a.program]}),r}function gUt(t,e){const i=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(o=>{t.uniforms[o].value&&!(o in i)&&(i[o]=t.uniforms[o].value)}),Object.keys(i).forEach(o=>{typeof i[o]=="object"&&i[o].index!==void 0&&(i[o].texture=e.getTexture(i[o].index))}),i}const mUt=Object.freeze(Object.defineProperty({__proto__:null,decode:pUt,encode:fUt,name:hUt},Symbol.toStringTag,{value:"Module"})),lte=[I_t,e_t,LFt,OFt,jFt,fOt,sUt,uUt,mUt,oUt,G_t];function vUt(t,e={},i){const o=lte.filter(r=>cte(r.name,e));for(const r of o)r.preprocess?.(t,e,i)}async function yUt(t,e={},i){const o=lte.filter(r=>cte(r.name,e));for(const r of o)await r.decode?.(t,e,i)}function cte(t,e){const i=e?.gltf?.excludeExtensions||{};return!(t in i&&!i[t])}const VS="KHR_binary_glTF";function bUt(t){const e=new Ir(t),{json:i}=e;for(const o of i.images||[]){const r=e.getObjectExtension(o,VS);r&&Object.assign(o,r),e.removeObjectExtension(o,VS)}i.buffers&&i.buffers[0]&&delete i.buffers[0].uri,e.removeExtension(VS)}const dte={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},wUt={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class CUt{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,i){this.json=e.json;const o=e.json;switch(o.asset&&o.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${o.asset.version}`);return}if(!i.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(o),this._convertTopLevelObjectsToArrays(o),bUt(e),this._convertObjectIdsToArrayIndices(o),this._updateObjects(o),this._updateMaterial(o)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const i in dte)this._convertTopLevelObjectToArray(e,i)}_convertTopLevelObjectToArray(e,i){const o=e[i];if(!(!o||Array.isArray(o))){e[i]=[];for(const r in o){const n=o[r];n.id=n.id||r;const a=e[i].length;e[i].push(n),this.idToIndexMap[i][r]=a}}}_convertObjectIdsToArrayIndices(e){for(const i in dte)this._convertIdsToIndices(e,i);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const i of e.textures)this._convertTextureIds(i);for(const i of e.meshes)this._convertMeshIds(i);for(const i of e.nodes)this._convertNodeIds(i);for(const i of e.scenes)this._convertSceneIds(i)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const i of e.primitives){const{attributes:o,indices:r,material:n}=i;for(const a in o)o[a]=this._convertIdToIndex(o[a],"accessor");r&&(i.indices=this._convertIdToIndex(r,"accessor")),n&&(i.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(i=>this._convertIdToIndex(i,"node"))),e.meshes&&(e.meshes=e.meshes.map(i=>this._convertIdToIndex(i,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(i=>this._convertIdToIndex(i,"node")))}_convertIdsToIndices(e,i){e[i]||(console.warn(`gltf v1: json doesn't contain attribute ${i}`),e[i]=[]);for(const o of e[i])for(const r in o){const n=o[r],a=this._convertIdToIndex(n,r);o[r]=a}}_convertIdToIndex(e,i){const o=wUt[i];if(o in this.idToIndexMap){const r=this.idToIndexMap[o][e];if(!Number.isFinite(r))throw new Error(`gltf v1: failed to resolve ${i} with id ${e}`);return r}return e}_updateObjects(e){for(const i of this.json.buffers)delete i.type}_updateMaterial(e){for(const i of e.materials){i.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const o=i.values?.tex||i.values?.texture2d_0||i.values?.diffuseTex,r=e.textures.findIndex(n=>n.id===o);r!==-1&&(i.pbrMetallicRoughness.baseColorTexture={index:r})}}}function xUt(t,e={}){return new CUt().normalize(t,e)}async function kUt(t,e,i=0,o,r){return MUt(t,e,i,o),xUt(t,{normalize:o?.gltf?.normalize}),vUt(t,o,r),o?.gltf?.loadBuffers&&t.json.buffers&&await EUt(t,o,r),o?.gltf?.loadImages&&await BUt(t,o,r),await yUt(t,o,r),t}function MUt(t,e,i,o){if(o.uri&&(t.baseUri=o.uri),e instanceof ArrayBuffer&&!AFt(e,i,o)&&(e=new TextDecoder().decode(e)),typeof e=="string")t.json=ODt(e);else if(e instanceof ArrayBuffer){const a={};i=gFt(a,e,i,o.glb),wa(a.type==="glTF",`Invalid GLB magic string ${a.type}`),t._glb=a,t.json=a.json}else wa(!1,"GLTF: must be ArrayBuffer or string");const r=t.json.buffers||[];if(t.buffers=new Array(r.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:a}=t._glb;t.buffers[0]={arrayBuffer:a[0].arrayBuffer,byteOffset:a[0].byteOffset,byteLength:a[0].byteLength}}const n=t.json.images||[];t.images=new Array(n.length).fill({})}async function EUt(t,e,i){const o=t.json.buffers||[];for(let r=0;r<o.length;++r){const n=o[r];if(n.uri){const{fetch:a}=i;wa(a);const s=Wee(n.uri,e),l=await(await i?.fetch?.(s))?.arrayBuffer?.();t.buffers[r]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete n.uri}else t.buffers[r]===null&&(t.buffers[r]={arrayBuffer:new ArrayBuffer(n.byteLength),byteOffset:0,byteLength:n.byteLength})}}async function BUt(t,e,i){const o=PUt(t),r=t.json.images||[],n=[];for(const a of o)n.push(IUt(t,r[a],a,e,i));return await Promise.all(n)}function PUt(t){const e=new Set,i=t.json.textures||[];for(const o of i)o.source!==void 0&&e.add(o.source);return Array.from(e).sort()}async function IUt(t,e,i,o,r){let n;if(e.uri&&!e.hasOwnProperty("bufferView")){const s=Wee(e.uri,o),{fetch:l}=r;n=await(await l(s)).arrayBuffer(),e.bufferView={data:n}}if(Number.isFinite(e.bufferView)){const s=NLt(t.json,t.buffers,e.bufferView);n=eee(s.buffer,s.byteOffset,s.byteLength)}wa(n,"glTF image has no data");let a=await O$(n,[ILt,lFt],{...o,mimeType:e.mimeType,basis:o.basis||{format:Jee()}},r);a&&a[0]&&(a={compressed:!0,mipmaps:!1,width:a[0].width,height:a[0].height,data:a[0]}),t.images=t.images||[],t.images[i]=a}const zS={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:K_t,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:SUt,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function SUt(t,e={},i){e={...zS.options,...e},e.gltf={...zS.options.gltf,...e.gltf};const{byteOffset:o=0}=e;return await kUt({},t,o,e,i)}const TUt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},DUt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ja={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},RUt={magFilter:Ja.TEXTURE_MAG_FILTER,minFilter:Ja.TEXTURE_MIN_FILTER,wrapS:Ja.TEXTURE_WRAP_S,wrapT:Ja.TEXTURE_WRAP_T},LUt={[Ja.TEXTURE_MAG_FILTER]:Ja.LINEAR,[Ja.TEXTURE_MIN_FILTER]:Ja.NEAREST_MIPMAP_LINEAR,[Ja.TEXTURE_WRAP_S]:Ja.REPEAT,[Ja.TEXTURE_WRAP_T]:Ja.REPEAT};function _Ut(){return{id:"default-sampler",parameters:LUt}}function FUt(t){return DUt[t]}function OUt(t){return TUt[t]}class UUt{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,i={}){const{json:o,buffers:r=[],images:n=[]}=e,{baseUri:a=""}=e;return wa(o),this.baseUri=a,this.buffers=r,this.images=n,this.jsonUnprocessed=o,this.json=this._resolveTree(e.json,i),this.json}_resolveTree(e,i={}){const o={...e};return this.json=o,e.bufferViews&&(o.bufferViews=e.bufferViews.map((r,n)=>this._resolveBufferView(r,n))),e.images&&(o.images=e.images.map((r,n)=>this._resolveImage(r,n))),e.samplers&&(o.samplers=e.samplers.map((r,n)=>this._resolveSampler(r,n))),e.textures&&(o.textures=e.textures.map((r,n)=>this._resolveTexture(r,n))),e.accessors&&(o.accessors=e.accessors.map((r,n)=>this._resolveAccessor(r,n))),e.materials&&(o.materials=e.materials.map((r,n)=>this._resolveMaterial(r,n))),e.meshes&&(o.meshes=e.meshes.map((r,n)=>this._resolveMesh(r,n))),e.nodes&&(o.nodes=e.nodes.map((r,n)=>this._resolveNode(r,n)),o.nodes=o.nodes.map((r,n)=>this._resolveNodeChildren(r))),e.skins&&(o.skins=e.skins.map((r,n)=>this._resolveSkin(r,n))),e.scenes&&(o.scenes=e.scenes.map((r,n)=>this._resolveScene(r,n))),typeof this.json.scene=="number"&&o.scenes&&(o.scene=o.scenes[this.json.scene]),o}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,i){if(typeof i=="object")return i;const o=e&&e[i];return o||console.warn(`glTF file error: Could not find ${e}[${i}]`),o}_resolveScene(e,i){return{...e,id:e.id||`scene-${i}`,nodes:(e.nodes||[]).map(o=>this.getNode(o))}}_resolveNode(e,i){const o={...e,id:e?.id||`node-${i}`};return e.mesh!==void 0&&(o.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(o.camera=this.getCamera(e.camera)),e.skin!==void 0&&(o.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(o.mesh=e.meshes.reduce((r,n)=>{const a=this.getMesh(n);return r.id=a.id,r.primitives=r.primitives.concat(a.primitives),r},{primitives:[]})),o}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(i=>this.getNode(i))),e}_resolveSkin(e,i){const o=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${i}`,inverseBindMatrices:o}}_resolveMesh(e,i){const o={...e,id:e.id||`mesh-${i}`,primitives:[]};return e.primitives&&(o.primitives=e.primitives.map(r=>{const n={...r,attributes:{},indices:void 0,material:void 0},a=r.attributes;for(const s in a)n.attributes[s]=this.getAccessor(a[s]);return r.indices!==void 0&&(n.indices=this.getAccessor(r.indices)),r.material!==void 0&&(n.material=this.getMaterial(r.material)),n})),o}_resolveMaterial(e,i){const o={...e,id:e.id||`material-${i}`};if(o.normalTexture&&(o.normalTexture={...o.normalTexture},o.normalTexture.texture=this.getTexture(o.normalTexture.index)),o.occlusionTexture&&(o.occlusionTexture={...o.occlusionTexture},o.occlusionTexture.texture=this.getTexture(o.occlusionTexture.index)),o.emissiveTexture&&(o.emissiveTexture={...o.emissiveTexture},o.emissiveTexture.texture=this.getTexture(o.emissiveTexture.index)),o.emissiveFactor||(o.emissiveFactor=o.emissiveTexture?[1,1,1]:[0,0,0]),o.pbrMetallicRoughness){o.pbrMetallicRoughness={...o.pbrMetallicRoughness};const r=o.pbrMetallicRoughness;r.baseColorTexture&&(r.baseColorTexture={...r.baseColorTexture},r.baseColorTexture.texture=this.getTexture(r.baseColorTexture.index)),r.metallicRoughnessTexture&&(r.metallicRoughnessTexture={...r.metallicRoughnessTexture},r.metallicRoughnessTexture.texture=this.getTexture(r.metallicRoughnessTexture.index))}return o}_resolveAccessor(e,i){const o=FUt(e.componentType),r=OUt(e.type),n=o*r,a={...e,id:e.id||`accessor-${i}`,bytesPerComponent:o,components:r,bytesPerElement:n,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(a.bufferView=this.getBufferView(e.bufferView)),a.bufferView){const s=a.bufferView.buffer,{ArrayType:l,byteLength:c}=MS(a,a.bufferView),d=(a.bufferView.byteOffset||0)+(a.byteOffset||0)+s.byteOffset;let u=s.arrayBuffer.slice(d,d+c);a.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(s,d,a.bufferView.byteStride,a.bytesPerElement,a.count)),a.value=new l(u)}return a}_getValueFromInterleavedBuffer(e,i,o,r,n){const a=new Uint8Array(n*r);for(let s=0;s<n;s++){const l=i+s*o;a.set(new Uint8Array(e.arrayBuffer.slice(l,l+r)),s*r)}return a.buffer}_resolveTexture(e,i){return{...e,id:e.id||`texture-${i}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):_Ut(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,i){const o={id:e.id||`sampler-${i}`,...e,parameters:{}};for(const r in o){const n=this._enumSamplerParameter(r);n!==void 0&&(o.parameters[n]=o[r])}return o}_enumSamplerParameter(e){return RUt[e]}_resolveImage(e,i){const o={...e,id:e.id||`image-${i}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},r=this.images[i];return r&&(o.image=r),o}_resolveBufferView(e,i){const o=e.buffer,r=this.buffers[o].arrayBuffer;let n=this.buffers[o].byteOffset||0;return e.byteOffset&&(n+=e.byteOffset),{id:`bufferView-${i}`,...e,buffer:this.buffers[o],data:new Uint8Array(r,n,e.byteLength)}}_resolveCamera(e,i){const o={...e,id:e.id||`camera-${i}`};return o.perspective,o.orthographic,o}}function NUt(t,e){return new UUt().postProcess(t,e)}class jUt{constructor(e){}load(e,i,o,r,n,a,s){r=r||{},VUt(e,i,o,r,n,function(){uo.scheduleTask(function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1)}),a&&a()},function(l){e.error(l),s&&s(l),n.fire("error",l)})}parse(e,i,o,r,n,a,s){r=r||{},HS(e,"",i,o,r,n,function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1),a&&a()},function(l){n.error(l),n.fire("error",l),s&&s(l)})}}function VUt(t,e,i,o,r,n,a){const s=t.viewer.scene.canvas.spinner;s.processes++,e.split(".").pop()==="glb"?t.dataSource.getGLB(e,l=>{o.basePath=ute(e),HS(t,e,l,i,o,r,n,a),s.processes--},l=>{s.processes--,a(l)}):t.dataSource.getGLTF(e,l=>{o.basePath=ute(e),HS(t,e,l,i,o,r,n,a),s.processes--},l=>{s.processes--,a(l)})}function ute(t){const e=t.lastIndexOf("/");return e!==0?t.substring(0,e+1):""}function HS(t,e,i,o,r,n,a,s){const l=t.viewer.scene.canvas.spinner;l.processes++,vS(i,zS,{baseUri:r.basePath}).then(c=>{const d=NUt(c),u={entityId:r.entityId,autoMetaModel:r.autoMetaModel,globalizeObjectIds:r.globalizeObjectIds,metaObjects:[],loadBuffer:r.loadBuffer,basePath:r.basePath,handlenode:r.handlenode,backfaces:!!r.backfaces,gltfData:d,scene:n.scene,plugin:t,sceneModel:n,numObjects:0,nextId:0};zUt(u),qUt(u),r.autoMetaModel&&u.metaObjects.push({id:n.id,type:"Default",name:n.id}),KUt(u),n.finalize(),r.autoMetaModel&&t.viewer.metaScene.createMetaModel(n.id,{metaObjects:u.metaObjects}),l.processes--,a()}).catch(c=>{s&&s(c)})}function zUt(t){const e=t.gltfData.textures;if(e)for(let i=0,o=e.length;i<o;i++)HUt(t,e[i])}function HUt(t,e){if(!e.source||!e.source.image)return;const i=`texture-${t.nextId++}`;let o=w1;switch(e.sampler.minFilter){case 9728:o=Ah;break;case 9729:o=un;break;case 9984:o=a3;break;case 9985:o=s3;break;case 9986:o=w1;break;case 9987:o=C1;break}let r=un;switch(e.sampler.magFilter){case 9728:r=Ah;break;case 9729:r=un;break}let n=Co;switch(e.sampler.wrapS){case 33071:n=dn;break;case 33648:n=uc;break;case 10497:n=Co;break}let a=Co;switch(e.sampler.wrapT){case 33071:a=dn;break;case 33648:a=uc;break;case 10497:a=Co;break}let s=Co;switch(e.sampler.wrapR){case 33071:s=dn;break;case 33648:s=uc;break;case 10497:s=Co;break}t.sceneModel.createTexture({id:i,image:e.source.image,flipY:!!e.flipY,minFilter:o,magFilter:r,wrapS:n,wrapT:a,wrapR:s,encoding:ho}),e._textureId=i}function qUt(t){const e=t.gltfData.materials;if(e)for(let i=0,o=e.length;i<o;i++){const r=e[i];r._textureSetId=QUt(t,r),r._attributes=GUt(t,r)}}function QUt(t,e){const i={};switch(e.normalTexture&&(i.normalTextureId=e.normalTexture.texture._textureId),e.occlusionTexture&&(i.occlusionTextureId=e.occlusionTexture.texture._textureId),e.emissiveTexture&&(i.emissiveTextureId=e.emissiveTexture.texture._textureId),e.alphaMode){case"OPAQUE":break;case"MASK":const n=e.alphaCutoff;i.alphaCutoff=n!==void 0?n:.5;break}const o=e.pbrMetallicRoughness;if(e.pbrMetallicRoughness){const n=e.pbrMetallicRoughness,a=n.baseColorTexture||n.colorTexture;a&&(a.texture?i.colorTextureId=a.texture._textureId:i.colorTextureId=t.gltfData.textures[a.index]._textureId),o.metallicRoughnessTexture&&(i.metallicRoughnessTextureId=o.metallicRoughnessTexture.texture._textureId)}const r=e.extensions;if(r){const n=r.KHR_materials_pbrSpecularGlossiness;if(n){n.specularTexture;const a=n.specularColorTexture;a!=null&&(i.colorTextureId=t.gltfData.textures[a.index]._textureId)}}return i.normalTextureId!==void 0||i.occlusionTextureId!==void 0||i.emissiveTextureId!==void 0||i.colorTextureId!==void 0||i.metallicRoughnessTextureId!==void 0?(i.id=`textureSet-${t.nextId++};`,t.sceneModel.createTextureSet(i),i.id):null}function GUt(t,e){const i=e.extensions,o={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(i){const n=i.KHR_materials_pbrSpecularGlossiness;if(n){const s=n.diffuseFactor;s!=null&&o.color.set(s)}const a=i.KHR_materials_common;if(a){const s=a.technique,l=a.values||{},c=s==="BLINN",d=s==="PHONG",u=s==="LAMBERT",h=l.diffuse;h&&(c||d||u)&&(mt.isString(h)||o.color.set(h));const p=l.transparency;p!=null&&(o.opacity=p);const A=l.transparent;A!=null&&(o.opacity=A)}}const r=e.pbrMetallicRoughness;if(r){const n=r.baseColorFactor;n&&(o.color[0]=n[0],o.color[1]=n[1],o.color[2]=n[2],o.opacity=n[3]);const a=r.metallicFactor;a!=null&&(o.metallic=a);const s=r.roughnessFactor;s!=null&&(o.roughness=s)}return o.doubleSided=e.doubleSided!==!1,o}function KUt(t){const e=t.gltfData,i=e.scene||e.scenes[0];if(!i){WUt(t,"glTF has no default scene");return}const o=i.nodes;if(!o)return;(function a(s){s.forEach(l=>{const c=l.mesh;c&&(c.instances||=0,c.instances+=1),l.children&&a(l.children)})})(o);const r=[];let n=null;(function a(s,l,c){s.forEach(d=>{const u=d.name;let h=u!=null&&u||l===0&&"entity-"+t.nextId++;if(h){for(;t.sceneModel.objects[h];)h="entity-"+t.nextId++;r.push(n),n=[]}const p=JUt(d,c);if(d.mesh&&ZUt(d,t,p,n),d.children&&a(d.children,l+1,p),h){if(n.length>0){const A=t.globalizeObjectIds?C.globalizeObjectId(t.sceneModel.id,h):h;t.sceneModel.createEntity({id:A,meshIds:n,isObject:!0}),t.autoMetaModel&&t.metaObjects.push({id:A,type:"Default",name:A,parent:t.sceneModel.id})}n=r.pop()}})})(o,0,null)}function JUt(t,e){let i;return t.matrix&&(i=t.matrix,e?e=C.mulMat4(e,i,C.mat4()):e=i),t.translation&&(i=C.translationMat4v(t.translation),e?e=C.mulMat4(e,i,C.mat4()):e=i),t.rotation&&(i=C.quaternionToMat4(t.rotation),e?e=C.mulMat4(e,i,C.mat4()):e=i),t.scale&&(i=C.scalingMat4v(t.scale),e?e=C.mulMat4(e,i,C.mat4()):e=i),e}function ZUt(t,e,i,o){const r=t.mesh;if(!r)return;const n=r.primitives.length;if(n>0)for(let a=0;a<n;a++){const s=r.primitives[a];if(s.mode<4)continue;const l={id:e.sceneModel.id+"."+e.numObjects++},c=s.material;c?(l.textureSetId=c._textureSetId,l.color=c._attributes.color,l.opacity=c._attributes.opacity,l.metallic=c._attributes.metallic,l.roughness=c._attributes.roughness):(l.color=new Float32Array([1,1,1]),l.opacity=1);const d=e.backfaces!==!1||c&&c.doubleSided!==!1;switch(s.mode){case 0:l.primitive="points";break;case 1:l.primitive="lines";break;case 2:l.primitive="lines";break;case 3:l.primitive="lines";break;case 4:l.primitive=d?"triangles":"solid";break;case 5:l.primitive=d?"triangles":"solid";break;case 6:l.primitive=d?"triangles":"solid";break;default:l.primitive=d?"triangles":"solid"}const u=s.attributes.POSITION;if(!u)continue;l.localPositions=u.value,l.positions=new Float64Array(l.localPositions.length),s.attributes.NORMAL&&(l.normals=s.attributes.NORMAL.value),s.attributes.TEXCOORD_0&&(l.uv=s.attributes.TEXCOORD_0.value),s.indices&&(l.indices=s.indices.value),i?C.transformPositions3(i,l.localPositions,l.positions):l.positions.set(l.localPositions);const h=C.vec3();m7(l.positions,l.positions,h)&&(l.origin=h),e.sceneModel.createMesh(l),o.push(l.id)}}function WUt(t,e){t.plugin.error(e)}const hte={DEFAULT:{}};class qS extends qa{constructor(e,i={}){super("GLTFLoader",e,i),this._sceneModelLoader=new jUt(this,i),this.dataSource=i.dataSource,this.objectDefaults=i.objectDefaults}set dataSource(e){this._dataSource=e||new F$}get dataSource(){return this._dataSource}set objectDefaults(e){this._objectDefaults=e||hte}get objectDefaults(){return this._objectDefaults}load(e={}){e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id);const i=new I3(this.viewer.scene,mt.apply(e,{isModel:!0,dtxEnabled:e.dtxEnabled})),o=i.id;if(!e.src&&!e.gltf)return this.error("load() param expected: src or gltf"),i;if(e.metaModelSrc||e.metaModelJSON){const r=n=>{this.viewer.metaScene.createMetaModel(o,n,{}),this.viewer.scene.canvas.spinner.processes--,e.src?this._sceneModelLoader.load(this,e.src,n,e,i):this._sceneModelLoader.parse(this,e.gltf,n,e,i)};if(e.metaModelSrc){const n=e.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(n,a=>{this.viewer.scene.canvas.spinner.processes--,r(a)},a=>{this.error(`load(): Failed to load model metadata for model '${o} from '${n}' - ${a}`),this.viewer.scene.canvas.spinner.processes--})}else e.metaModelJSON&&r(e.metaModelJSON)}else e.src?this._sceneModelLoader.load(this,e.src,null,e,i):this._sceneModelLoader.parse(this,e.gltf,null,e,i);return i.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(o)}),i}destroy(){super.destroy()}}function YUt(t,e,i={}){const o="lightgrey",r=i.hoverColor||"rgba(0,0,0,0.4)",n=i.textColor||"black",a=i.canvasElement||document.body,s=500,l=s+s/3,c=l/24,d=[{boundary:[6,6,6,6],color:i.frontColor||i.color||"#55FF55"},{boundary:[18,6,6,6],color:i.backColor||i.color||"#55FF55"},{boundary:[12,6,6,6],color:i.rightColor||i.color||"#FF5555"},{boundary:[0,6,6,6],color:i.leftColor||i.color||"#FF5555"},{boundary:[6,0,6,6],color:i.topColor||i.color||"#7777FF"},{boundary:[6,12,6,6],color:i.bottomColor||i.color||"#7777FF"}],u=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];i.frontColor||i.color,i.backColor||i.color,i.rightColor||i.color,i.leftColor||i.color,i.topColor||i.color,i.bottomColor||i.color;const h=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let y=0,v=u.length;y<v;y++)C.normalizeVec3(u[y].dir,u[y].dir),C.normalizeVec3(u[y].up,u[y].up);for(let y=0,v=h.length;y<v;y++)C.normalizeVec3(h[y].dir,h[y].dir),C.normalizeVec3(h[y].up,h[y].up);var p=h;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=l,this._textureCanvas.height=s,this._textureCanvas.style.width=l+"px",this._textureCanvas.style.height=s+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=o,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.visibility="hidden",this._textureCanvas.style["z-index"]=2e6,a.appendChild(this._textureCanvas);const A=this._textureCanvas.getContext("2d");let f=!1;function m(){for(let k=0,E=d.length;k<E;k++){const B=d[k],P=B.boundary,T=Math.round(P[0]*c),S=Math.round(P[1]*c),R=Math.round(P[2]*c),F=Math.round(P[3]*c);A.fillStyle=B.color,A.fillRect(T,S,R,F)}for(let k=0,E=p.length;k<E;k++){let B,P,T,S;const R=p[k],F=R.boundaries;for(var y=0,v=F.length;y<v;y++){const U=F[y];B=Math.round(U[0]*c),P=Math.round(U[1]*c),T=Math.round(U[2]*c),S=Math.round(U[3]*c),R.highlighted&&(A.fillStyle=R.highlighted?r:R.color||o,A.fillRect(B,P,T,S))}if(R.label){A.fillStyle=n,A.font="60px sans-serif",A.textAlign="center";var b=B+T*.5,x=P+S*.7;A.fillText(g(R.label),b,x,80)}}e.glRedraw()}const g=(function(){const y={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},v={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},b={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"};return function(x){const k=f?v:y,E=k?k[x]:null;return E?t.localeService.translate(E)||b[E]||E:x}})();this.setZUp=function(){f=!0,p=u,this.clear()},this.setYUp=function(){f=!1,p=h,this.clear()},this.clear=function(){A.fillStyle=o,A.fillRect(0,0,l,s);for(var y=0,v=p.length;y<v;y++){const b=p[y];b.highlighted=!1}m()},this.getArea=function(y){const v=y[0]*l,b=s-y[1]*s;for(var x=0,k=p.length;x<k;x++){const P=p[x].boundaries;for(var E=0,B=P.length;E<B;E++){const T=P[E];if(v>=T[0]*c&&v<=(T[0]+T[2])*c&&b>=T[1]*c&&b<=(T[1]+T[3])*c)return x}}return-1},this.setAreaHighlighted=function(y,v){var b=p[y];if(!b)throw"Area not found: "+y;b.highlighted=!!v,m()},this.getAreaDir=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.dir},this.getAreaUp=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const pte=C.vec3(),fte=C.vec3();C.mat4();class QS extends qa{constructor(e,i={}){super("NavCube",e,i),e.navCube=this;try{this._navCubeScene=new ob(e,{canvasId:i.canvasId,canvasElement:i.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(g){this.error(g);return}const o=this._navCubeScene;o.clearLights(),new xs(o,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new xs(o,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new xs(o,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=o.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,o.edgeMaterial.edgeColor=[.2,.2,.2],o.edgeMaterial.edgeAlpha=.6,this._zUp=!!e.camera.zUp;var r=this;this.setIsProjectNorth(i.isProjectNorth),this.setProjectNorthOffsetAngle(i.projectNorthOffsetAngle);const n=(function(){const g=C.mat4();return function(y,v,b){return C.identityMat4(g),C.rotationMat4v(y*r._projectNorthOffsetAngle*C.DEGTORAD,[0,1,0],g),C.transformVec3(g,v,b)}})();this._synchCamera=(function(){var g=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),y=C.vec3(),v=C.vec3(),b=C.vec3();return function(){var x=e.camera.eye,k=e.camera.look,E=e.camera.up;y=C.mulVec3Scalar(C.normalizeVec3(C.subVec3(x,k,y)),5),r._isProjectNorth&&r._projectNorthOffsetAngle&&(y=n(-1,y,pte),E=n(-1,E,fte)),r._zUp?(C.transformVec3(g,y,v),C.transformVec3(g,E,b),r._navCubeCamera.look=[0,0,0],r._navCubeCamera.eye=C.transformVec3(g,y,v),r._navCubeCamera.up=C.transformPoint3(g,E,b)):(r._navCubeCamera.look=[0,0,0],r._navCubeCamera.eye=y,r._navCubeCamera.up=E)}})(),this._cubeTextureCanvas=new YUt(e,o,i),this._cubeSampler=new x1(o,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:dn,wrapT:dn}),this._cubeMesh=new vi(o,{geometry:new go(o,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new mo(o,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=i.shadowVisible===!1?null:new vi(o,{geometry:new go(o,v1({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new mo(o,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())}),this._onCameraFOV=e.camera.perspective.on("fov",g=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=g)}),this._onCameraProjection=e.camera.on("projection",g=>{this._synchProjection&&(this._navCubeCamera.projection=g==="ortho"||g==="perspective"?g:"perspective")});var a=-1;function s(g,y){var v=(g-A)*-p,b=(y-f)*-p;e.camera.orbitYaw(v),e.camera.orbitPitch(-b),A=g,f=y}function l(g){const{left:y,top:v}=r._navCubeCanvas.getBoundingClientRect();return[g.clientX-y,g.clientY-v]}{var c=null,d=null,u=!1,h=!1,p=.5,A,f;r._navCubeCanvas.addEventListener("mouseenter",r._onMouseEnter=function(g){h=!0}),r._navCubeCanvas.addEventListener("mouseleave",r._onMouseLeave=function(g){h=!1}),r._navCubeCanvas.addEventListener("mousedown",r._onMouseDown=function(g){if(g.which===1){c=g.x,d=g.y,A=g.clientX,f=g.clientY;var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}}),r._navCubeCanvas.addEventListener("mouseup",r._onMouseUp=function(g){if(g.which===1&&(u=!1,c!==null)){var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y,pickSurface:!0});if(v&&v.uv){var b=r._cubeTextureCanvas.getArea(v.uv);if(b>=0&&(r._navCubeCanvas.style.cursor="pointer",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),b>=0)){if(r._cubeTextureCanvas.setAreaHighlighted(b,!0),a=b,r._repaint(),g.x<c-3||g.x>c+3||g.y<d-3||g.y>d+3)return;var x=r._cubeTextureCanvas.getAreaDir(b);if(x){var k=r._cubeTextureCanvas.getAreaUp(b);r._isProjectNorth&&r._projectNorthOffsetAngle&&(x=n(1,x,pte),k=n(1,k,fte)),m(x,k,function(){a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),r._navCubeCanvas.style.cursor="pointer",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),b>=0&&(r._cubeTextureCanvas.setAreaHighlighted(b,!1),a=-1,r._repaint())})}}}}}),r._navCubeCanvas.addEventListener("mousemove",r._onMouseMove=function(g){if(a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),!(g.buttons===1&&!u)){if(u){var y=g.clientX,v=g.clientY;r._navCubeCanvas.style.cursor="move",s(y,v);return}if(h){var b=l({clientX:g.clientX,clientY:g.clientY}),x=o.pick({canvasPos:b,pickSurface:!0});if(x){if(x.uv){r._navCubeCanvas.style.cursor="pointer";var k=r._cubeTextureCanvas.getArea(x.uv);if(k===a)return;a>=0&&r._cubeTextureCanvas.setAreaHighlighted(a,!1),k>=0&&(r._cubeTextureCanvas.setAreaHighlighted(k,!0),r._repaint(),a=k)}}else r._navCubeCanvas.style.cursor="default",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1)}}}),r._navCubeCanvas.addEventListener("touchstart",r._onTouchStart=function(g){if(g.touches.length>0){c=g.touches[0].clientX,d=g.touches[0].clientY,A=g.touches[0].clientX,f=g.touches[0].clientY;var y=l({clientX:g.touches[0].clientX,clientY:g.touches[0].clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}},{passive:!1}),r._navCubeCanvas.addEventListener("touchmove",r._onTouchMove=function(g){g.preventDefault();var y=g.touches[0],v=y.clientX,b=y.clientY,x=document.elementFromPoint(v,b);if(h=r._navCubeCanvas===x,!!h&&u){s(v,b);return}},{passive:!1}),r._navCubeCanvas.addEventListener("touchend",r._onTouchEnd=function(g){u=!1});var m=(function(){var g=C.vec3();return function(y,v,b){var x=r._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,k=C.getAABB3Diag(x);C.getAABB3Center(x,g);var E=Math.abs(k/Math.tan(r._cameraFitFOV*C.DEGTORAD));e.cameraControl.pivotPos=g,r._cameraFly?e.cameraFlight.flyTo({look:g,eye:[g[0]-E*y[0],g[1]-E*y[1],g[2]-E*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:r._cameraFitFOV,duration:r._cameraFlyDuration},b):e.cameraFlight.jumpTo({look:g,eye:[g[0]-E*y[0],g[1]-E*y[1],g[2]-E*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:r._cameraFitFOV},b)}})()}this._onUpdated=e.localeService.on("updated",()=>{this._cubeTextureCanvas.clear(),this._repaint()}),this.setVisible(i.visible),this.setCameraFitFOV(i.cameraFitFOV),this.setCameraFly(i.cameraFly),this.setCameraFlyDuration(i.cameraFlyDuration),this.setFitVisible(i.fitVisible),this.setSynchProjection(i.synchProjection)}send(e,i){e==="language"&&(this._cubeTextureCanvas.clear(),this._repaint())}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return this._navCubeCanvas?this._cubeMesh.visible:!1}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),this._navCubeCanvas.removeEventListener("mousemove",this._onMouseMove),this._navCubeCanvas.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas.removeEventListener("touchstart",this._onTouchStart),this._navCubeCanvas.removeEventListener("touchmove",this._onTouchMove),this._navCubeCanvas.removeEventListener("touchend",this._onTouchEnd),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null,this._onTouchStart=null,this._onTouchMove=null,this._onTouchEnd=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}class XUt{constructor(e){const i=e.cameraControl,o=e.scene,r=o.canvas.canvas,n=!1,a=1,s=.09,l=.01,c=new n3(o,{position:[0,0,0],scale:[5,5,5],isObject:!1}),d=C.vec3();this._setPosition=(function(){const x=C.vec3(),k=C.vec3();return function(E){d.set(E),fh(E,x,k),c.origin=x,c.position=k}})(),this._setQuaternion=x=>{c.quaternion=x};const u=(x,k)=>new go(c,v1({radiusTop:.001,radiusBottom:x,radialSegments:32,heightSegments:1,height:k,openEnded:!1})),h=(x,k,E)=>new go(c,v1({radiusTop:x,radiusBottom:x,radialSegments:E,heightSegments:1,height:k,openEnded:!1})),p=(x,k,E)=>new go(c,xP({radius:a-.2,tube:x,radialSegments:64,tubeSegments:E,arc:Math.PI*2*k})),A={curve:p(l,.25,14),curveHandle:p(s,.25,14),hoop:p(l,1,8),arrowHead:u(.07,.2),arrowHeadBig:u(.09,.25),arrowHeadHandle:h(s,.37,8),axis:h(l,a,20),axisHandle:h(s,a,20)},f=x=>new mo(c,{diffuse:x,emissive:x,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),m=(x,k)=>new Ac(c,{edges:!1,fill:!0,fillColor:x,fillAlpha:k}),g=new mo(c,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),y={},v=(x,k)=>{C.mulVec3Scalar(x,-1,C.vec3());const E=f(x),B=C.quaternionToRotationMat4(k,C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),B,B);const P=C.scaleMat4v([.6,.6,.6],C.identityMat4()),T=(ee,ae)=>{const Ee=C.translateMat4v(ee,C.identityMat4()),pe=C.identityMat4();return C.mulMat4(Ee,ae,pe),C.mulMat4(B,pe,pe),C.mulMat4(pe,P,C.identityMat4())},S=c.addChild(new vi(c,{geometry:A.curve,material:E,matrix:B,pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),n),R=c.addChild(new vi(c,{geometry:A.curveHandle,material:g,matrix:B,pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),n),F=c.addChild(new vi(c,{geometry:A.arrowHead,material:E,matrix:T([.8,.07,0],C.rotationMat4v(180*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),U=c.addChild(new vi(c,{geometry:A.arrowHead,material:E,matrix:T([.07,.8,0],C.rotationMat4v(90*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),q=c.addChild(new vi(c,{geometry:A.hoop,material:E,highlighted:!0,highlightMaterial:m(x,.6),matrix:B,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),V=C.quaternionToRotationMat4(C.vec3PairToQuaternion([0,1,0],x),C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),V,V);const W=ee=>C.mulMat4(V,C.translateMat4c(0,ee,0,C.identityMat4()),C.identityMat4()),Y=W(a+.1),$=W(a/2),fe=c.addChild(new vi(c,{geometry:A.arrowHead,material:E,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Me=c.addChild(new vi(c,{geometry:A.arrowHeadHandle,material:g,matrix:Y,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Se=c.addChild(new vi(c,{geometry:A.axis,material:E,matrix:$,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),qe=c.addChild(new vi(c,{geometry:A.axisHandle,material:g,matrix:$,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Qe=c.addChild(new vi(c,{geometry:A.arrowHeadBig,material:E,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Ce=(ee,ae)=>C.vec3ApplyQuaternion(c.quaternion,ee,ae),Le=(function(){const ee=C.vec3(),ae=C.vec3(),Ee=C.vec3();return(pe,Q)=>{Ce(x,ee);const Z=d,ie=ee;C.canvasPosToWorldRay(r,o.camera.viewMatrix,o.camera.projMatrix,o.camera.projection,pe,ae,Ee);const re=C.dotVec3(ie,Ee),ne=C.subVec3(ae,Z,Q),G=C.dotVec3(ne,ie),J=C.dotVec3(ne,Ee),ue=1-re*re;if(Math.abs(ue)>1e-10){const xe=(G-re*J)/ue;return C.addVec3(Z,C.mulVec3Scalar(ie,xe,Q),Q),!0}else return!1}})(),Fe=C.vec3(),ve=C.vec3();y[Me.id]=y[qe.id]={setActivated:ee=>Qe.visible=ee,initDragAction:ee=>Le(ee,Fe)&&C.subVec3(Fe,d,Fe)&&(ae=>{Le(ae,ve)&&(C.subVec3(ve,Fe,ve),this._setPosition(ve),this._handlers&&this._handlers.onPosition(ve))})},y[R.id]={setActivated:ee=>q.visible=ee,initDragAction:ee=>{const ae=(function(){const pe=o.camera.projectWorldPos(d);Ce(x,ve),C.transformVec3(o.camera.normalMatrix,ve,ve);const Q=Math.sign(ve[2]);return Z=>{const ie=Z[0]-pe[0],re=Z[1]-pe[1];return Q*Math.atan2(-re,ie)}})();let Ee=ae(ee);return pe=>{const Q=ae(pe);c.rotate(x,(Q-Ee)*180/Math.PI),this._handlers&&this._handlers.onQuaternion(c.quaternion),Ee=Q}}};let me=!1,we=!1,Re=!1;const We=()=>{const ee=Re&&me;Me.visible=qe.visible=fe.visible=Se.visible=!!ee,ee||(Qe.visible=!1)},H=()=>{const ee=Re&&we;R.visible=S.visible=F.visible=U.visible=!!ee,ee||(q.visible=!1)};return{setPositionActive:ee=>{me=ee,We()},setRotationActive:ee=>{we=ee,H()},set visible(ee){Re=ee,We(),H()}}};this._displayMeshes={center:c.addChild(new vi(c,{geometry:new go(c,y1({radius:.05})),material:new mo(c,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),pickable:!1,collidable:!0,clippable:!1,visible:!1,isObject:!1}),n),x:v([1,0,0],C.vec3PairToQuaternion([1,0,0],[0,0,1])),y:v([0,1,0],C.eulerToQuaternion([90,0,0],"XYZ")),z:v([0,0,1],C.identityQuaternion())};const b=[];{let x=-1;const k=B=>{c.scale[0]!==B&&(c.scale=[B,B,B],this._handlers&&this._handlers.onScreenScale&&this._handlers.onScreenScale(c.scale))},E=o.on("tick",()=>{const B=o.camera,P=Math.abs(C.distVec3(B.eye,d));B.projection==="perspective"?P!==x&&k(.07*P*Math.tan(B.perspective.fov*C.DEGTORAD)):B.projection==="ortho"&&k(B.ortho.scale/10),x=P});b.push(()=>o.off(E))}{let x=null,k=null;b.push(()=>{k&&k.cleanup()});const E=C.vec2(),B=(F,U)=>{U[0]=F.pageX,U[1]=F.pageY,gl(r.ownerDocument.documentElement,r,U)},P=F=>{B(F,E);const U=o.pick({canvasPos:E}),q=U&&U.entity,V=q&&q.id;return V in y&&y[V]},T=(F,U)=>{const q=P(U(F));if(q){k&&k.cleanup();const V=q.initDragAction(E);return V&&(i.pointerEnabled=!1,q.setActivated(!0),k={onChange:W=>{const Y=U(W);Y&&(B(Y,E),V(E))},cleanup:function(){k=null,i.pointerEnabled=!0,q.setActivated(!1)}}),!!V}else return!1},S=(F,U)=>{r.addEventListener(F,U),b.push(()=>r.removeEventListener(F,U))},R=F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation()};S("mousedown",F=>{F.which===1&&T(F,U=>U.which===1&&U)&&R(F)}),S("mousemove",F=>{if(k)k.onChange(F),R(F);else{x&&x();const U=P(F);U?(U.setActivated(!0),x=()=>U.setActivated(!1)):x=null}}),S("mouseup",F=>{k&&(k.onChange(F),k.cleanup())}),S("touchstart",F=>{if(F.preventDefault(),F.touches.length===1){const U=F.touches[0].identifier;T(F,q=>[...q.changedTouches].find(V=>V.identifier===U))&&R(F)}}),S("touchmove",F=>{k&&(k.onChange(F),R(F))}),S("touchend",F=>{k&&(k.onChange(F),k.cleanup())})}this.__destroy=()=>{b.forEach(x=>x()),c.destroy();for(let x in y)delete y[x]}}destroy(){this.__destroy()}setHandlers(e){Object.values(this._displayMeshes).forEach(i=>i.visible=!!e),this._handlers=e,this._displayMeshes.x.setPositionActive(e&&e.onPosition),this._displayMeshes.y.setPositionActive(e&&e.onPosition),this._displayMeshes.z.setPositionActive(e&&e.onPosition),this._displayMeshes.x.setRotationActive(e&&e.onQuaternion),this._displayMeshes.y.setRotationActive(e&&e.onQuaternion),this._displayMeshes.z.setRotationActive(e&&e.onQuaternion)}setPosition(e){this._setPosition(e)}setQuaternion(e){this._setQuaternion(e)}}let $Ut=class{constructor(t,e,i){this.id=i.id,this._sectionPlane=i,this._mesh=new vi(e,{id:i.id,geometry:new go(e,bP({xSize:.5,ySize:.5,zSize:.001})),material:new mo(e,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new YP(e,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Ac(e,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Ac(e,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const o=C.vec3([0,0,0]),r=C.vec3(),n=C.vec3([0,0,1]),a=C.vec4(4),s=C.vec3(),l=()=>{const c=this._sectionPlane.scene.center,d=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];C.subVec3(c,this._sectionPlane.pos,o);const u=-C.dotVec3(d,o);C.normalizeVec3(d),C.mulVec3Scalar(d,u,r);const h=C.vec3PairToQuaternion(n,this._sectionPlane.dir,a);s[0]=r[0]*.1,s[1]=r[1]*.1,s[2]=r[2]*.1,this._mesh.quaternion=h,this._mesh.position=s};this._onSectionPlanePos=this._sectionPlane.on("pos",l),this._onSectionPlaneDir=this._sectionPlane.on("dir",l)}this._highlighted=!1,this._selected=!1}setHighlighted(t){this._highlighted=!!t,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=t?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(t){this._selected=!!t,this._mesh.edgeMaterial.edgeWidth=t?3:1,this._mesh.highlightMaterial.edgeWidth=t?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}};class eNt{constructor(e,i){if(!i.onHoverEnterPlane||!i.onHoverLeavePlane||!i.onClickedNothing||!i.onClickedPlane)throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=i.onHoverEnterPlane,this._onHoverLeavePlane=i.onHoverLeavePlane,this._onClickedNothing=i.onClickedNothing,this._onClickedPlane=i.onClickedPlane,this._visible=!0,this._planes={},this._canvas=i.overviewCanvas,this._scene=new ob(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new xs(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new xs(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new xs(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const r=this._scene.camera,n=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),a=C.vec3(),s=C.vec3(),l=C.vec3();this._synchCamera=()=>{const c=this._viewer.camera.eye,d=this._viewer.camera.look,u=this._viewer.camera.up;C.mulVec3Scalar(C.normalizeVec3(C.subVec3(c,d,a)),7),this._zUp?(C.transformVec3(n,a,s),C.transformVec3(n,u,l),r.look=[0,0,0],r.eye=C.transformVec3(n,a,s),r.up=C.transformPoint3(n,u,l)):(r.look=[0,0,0],r.eye=a,r.up=u)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",r=>{this._scene.camera.perspective.fov=r});{var o=null;this._onInputMouseMove=this._scene.input.on("mousemove",r=>{const n=this._scene.pick({canvasPos:r});n?(!o||n.entity.id!==o.id)&&(o&&this._planes[o.id]&&this._onHoverLeavePlane(o.id),o=n.entity,this._planes[o.id]&&this._onHoverEnterPlane(o.id)):o&&(this._onHoverLeavePlane(o.id),o=null)}),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{o?this._planes[o.id]&&this._onClickedPlane(o.id):this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{o&&(this._onHoverLeavePlane(o.id),o=null)})}this.setVisible(i.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new $Ut(this,this._scene,e)}setPlaneHighlighted(e,i){const o=this._planes[e];o&&o.setHighlighted(i)}setPlaneSelected(e,i){const o=this._planes[e];o&&o.setSelected(i)}removeSectionPlane(e){const i=this._planes[e.id];i&&(i.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const Cc=C.AABB3(),Eh=C.vec3();class tNt extends qa{constructor(e,i={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,i.overviewCanvasId!==null&&i.overviewCanvasId!==void 0){const o=document.getElementById(i.overviewCanvasId);o?this._overview=new eNt(this,{overviewCanvas:o,visible:i.overviewVisible,onHoverEnterPlane:(r=>{this._overview.setPlaneHighlighted(r,!0)}),onHoverLeavePlane:(r=>{this._overview.setPlaneHighlighted(r,!1)}),onClickedPlane:(r=>{if(this.getShownControl()===r){this.hideControl();return}this.showControl(r);const n=this.sectionPlanes[r].pos;Cc.set(this.viewer.scene.aabb),C.getAABB3Center(Cc,Eh),Cc[0]+=n[0]-Eh[0],Cc[1]+=n[1]-Eh[1],Cc[2]+=n[2]-Eh[2],Cc[3]+=n[0]-Eh[0],Cc[4]+=n[1]-Eh[1],Cc[5]+=n[2]-Eh[2],this.viewer.cameraFlight.flyTo({aabb:Cc,fitFOV:65})}),onClickedNothing:(()=>{this.hideControl()})}):this.warn("Can't find overview canvas: '"+i.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",o=>{this._sectionPlaneCreated(o)})}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){return e.id!==void 0&&e.id!==null&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),new II(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const i=this._freeControls.length>0?this._freeControls.pop():(()=>{const o=this.viewer.scene,r=(function(){const u=new n3(o,{isObject:!1});return u.addChild(new vi(u,{geometry:new go(u,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new mo(u,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Ac(u,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1],isObject:!1})),u.addChild(new vi(u,{geometry:new go(u,xP({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:Math.PI*2})),material:new mo(u,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Ac(u,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45],isObject:!1})),{setPosition:(function(){const h=C.vec3(),p=C.vec3();return function(A){fh(A,h,p),u.origin=h,u.position=p}})(),setQuaternion:h=>{u.quaternion=h},setScale:h=>{u.scale=h},setVisible:h=>{u.visible=h},destroy:()=>{u.destroy()}}})();let n=()=>{};const a=new XUt(this.viewer);let s=!1,l=!1,c=null;const d=()=>{const u=l&&!s;r.setVisible(u),a.setHandlers(u&&c)};return{_destroy:()=>{n(),a.destroy(),r.destroy()},setCulled:u=>{s=u,d()},setVisible:u=>{l=u,d()},_setSectionPlane:u=>{if(n(),u){let h=!1;c={onPosition:g=>{r.setPosition(g),u.pos=g},onQuaternion:g=>{r.setQuaternion(g),h=!0,u.quaternion=g},onScreenScale:g=>{r.setScale(g)}};const p=()=>{r.setPosition(u.pos),a.setPosition(u.pos)},A=()=>{r.setQuaternion(u.quaternion),a.setQuaternion(u.quaternion)};p(),A();const f=u.on("pos",p),m=u.on("dir",()=>{h?h=!1:A()});n=()=>{u.off(f),u.off(m),n=()=>{}}}}}})();i._setSectionPlane(e),i.setVisible(!1),this._controls[e.id]=i,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",()=>{this._sectionPlaneDestroyed(e)})}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let i in e)e[i].flipDir()}showControl(e){const i=this._controls[e];if(!i){this.error("Control not found: "+e);return}this.hideControl(),i.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var i=this.viewer.scene.sectionPlanes[e];if(!i){this.error("SectionPlane not found: "+e);return}this._sectionPlaneDestroyed(i),i.destroy(),e===this._shownControlId&&(this._shownControlId=null)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const i=this._controls[e.id];i&&(i.setVisible(!1),i._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(i))}clear(){const e=Object.keys(this._sectionPlanes);for(var i=0,o=e.length;i<o;i++)this.destroySectionPlane(e[i])}send(e,i){switch(e){case"snapshotStarting":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!0);break;case"snapshotFinished":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!1);break;case"clearSectionPlanes":this.clear();break}}destroy(){this.clear(),this._overview&&this._overview.destroy(),this._destroyFreeControls(),super.destroy()}_destroyFreeControls(){for(var e=this._freeControls.pop();e;)e._destroy(),e=this._freeControls.pop();this.viewer.scene.off(this._onSceneSectionPlaneCreated)}}class Ate{constructor(e={}){this.cacheBuster=e.cacheBuster!==!1}_cacheBusterURL(e){if(!this.cacheBuster)return e;const i=new Date().getTime();return e.indexOf("?")>-1?e+"&_="+i:e+"?_="+i}getManifest(e,i,o){mt.loadJSON(this._cacheBusterURL(e),r=>{i(r)},function(r){o(r)})}getMetaModel(e,i,o){mt.loadJSON(this._cacheBusterURL(e),r=>{i(r)},function(r){o(r)})}getXKT(e,i,o){var r=()=>{};i=i||r,o=o||r;const n=/^data:(.*?)(;base64)?,(.*)$/,a=e.match(n);if(a){const c=!!a[2];var s=a[3];s=window.decodeURIComponent(s),c&&(s=window.atob(s));try{const d=new ArrayBuffer(s.length),u=new Uint8Array(d);for(var l=0;l<s.length;l++)u[l]=s.charCodeAt(l);i(d)}catch(d){o(d)}}else{const c=new XMLHttpRequest;c.open("GET",this._cacheBusterURL(e),!0),c.responseType="arraybuffer",c.onreadystatechange=function(){c.readyState===4&&(c.status===200?i(c.response):o("getXKT error : "+c.response))},c.send(null)}}}var qb={exports:{}},iNt=qb.exports,gte;function oNt(){return gte||(gte=1,(function(t,e){(function(i,o){o(e)})(iNt,(function(i){function o(L){let X=L.length;for(;--X>=0;)L[X]=0}const r=256,n=286,a=30,s=15,l=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]),c=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]),d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);o(h);const p=new Array(60);o(p);const A=new Array(512);o(A);const f=new Array(256);o(f);const m=new Array(29);o(m);const g=new Array(a);function y(L,X,O,ke,ye){this.static_tree=L,this.extra_bits=X,this.extra_base=O,this.elems=ke,this.max_length=ye,this.has_stree=L&&L.length}let v,b,x;function k(L,X){this.dyn_tree=L,this.max_code=0,this.stat_desc=X}o(g);const E=L=>L<256?A[L]:A[256+(L>>>7)],B=(L,X)=>{L.pending_buf[L.pending++]=255&X,L.pending_buf[L.pending++]=X>>>8&255},P=(L,X,O)=>{L.bi_valid>16-O?(L.bi_buf|=X<<L.bi_valid&65535,B(L,L.bi_buf),L.bi_buf=X>>16-L.bi_valid,L.bi_valid+=O-16):(L.bi_buf|=X<<L.bi_valid&65535,L.bi_valid+=O)},T=(L,X,O)=>{P(L,O[2*X],O[2*X+1])},S=(L,X)=>{let O=0;do O|=1&L,L>>>=1,O<<=1;while(--X>0);return O>>>1},R=(L,X,O)=>{const ke=new Array(16);let ye,ge,tt=0;for(ye=1;ye<=s;ye++)tt=tt+O[ye-1]<<1,ke[ye]=tt;for(ge=0;ge<=X;ge++){let Oe=L[2*ge+1];Oe!==0&&(L[2*ge]=S(ke[Oe]++,Oe))}},F=L=>{let X;for(X=0;X<n;X++)L.dyn_ltree[2*X]=0;for(X=0;X<a;X++)L.dyn_dtree[2*X]=0;for(X=0;X<19;X++)L.bl_tree[2*X]=0;L.dyn_ltree[512]=1,L.opt_len=L.static_len=0,L.sym_next=L.matches=0},U=L=>{L.bi_valid>8?B(L,L.bi_buf):L.bi_valid>0&&(L.pending_buf[L.pending++]=L.bi_buf),L.bi_buf=0,L.bi_valid=0},q=(L,X,O,ke)=>{const ye=2*X,ge=2*O;return L[ye]<L[ge]||L[ye]===L[ge]&&ke[X]<=ke[O]},V=(L,X,O)=>{const ke=L.heap[O];let ye=O<<1;for(;ye<=L.heap_len&&(ye<L.heap_len&&q(X,L.heap[ye+1],L.heap[ye],L.depth)&&ye++,!q(X,ke,L.heap[ye],L.depth));)L.heap[O]=L.heap[ye],O=ye,ye<<=1;L.heap[O]=ke},W=(L,X,O)=>{let ke,ye,ge,tt,Oe=0;if(L.sym_next!==0)do ke=255&L.pending_buf[L.sym_buf+Oe++],ke+=(255&L.pending_buf[L.sym_buf+Oe++])<<8,ye=L.pending_buf[L.sym_buf+Oe++],ke===0?T(L,ye,X):(ge=f[ye],T(L,ge+r+1,X),tt=l[ge],tt!==0&&(ye-=m[ge],P(L,ye,tt)),ke--,ge=E(ke),T(L,ge,O),tt=c[ge],tt!==0&&(ke-=g[ge],P(L,ke,tt)));while(Oe<L.sym_next);T(L,256,X)},Y=(L,X)=>{const O=X.dyn_tree,ke=X.stat_desc.static_tree,ye=X.stat_desc.has_stree,ge=X.stat_desc.elems;let tt,Oe,wt,Ve=-1;for(L.heap_len=0,L.heap_max=573,tt=0;tt<ge;tt++)O[2*tt]!==0?(L.heap[++L.heap_len]=Ve=tt,L.depth[tt]=0):O[2*tt+1]=0;for(;L.heap_len<2;)wt=L.heap[++L.heap_len]=Ve<2?++Ve:0,O[2*wt]=1,L.depth[wt]=0,L.opt_len--,ye&&(L.static_len-=ke[2*wt+1]);for(X.max_code=Ve,tt=L.heap_len>>1;tt>=1;tt--)V(L,O,tt);wt=ge;do tt=L.heap[1],L.heap[1]=L.heap[L.heap_len--],V(L,O,1),Oe=L.heap[1],L.heap[--L.heap_max]=tt,L.heap[--L.heap_max]=Oe,O[2*wt]=O[2*tt]+O[2*Oe],L.depth[wt]=(L.depth[tt]>=L.depth[Oe]?L.depth[tt]:L.depth[Oe])+1,O[2*tt+1]=O[2*Oe+1]=wt,L.heap[1]=wt++,V(L,O,1);while(L.heap_len>=2);L.heap[--L.heap_max]=L.heap[1],((et,ii)=>{const zt=ii.dyn_tree,Ct=ii.max_code,Xo=ii.stat_desc.static_tree,Si=ii.stat_desc.has_stree,Qt=ii.stat_desc.extra_bits,Oi=ii.stat_desc.extra_base,ti=ii.stat_desc.max_length;let kt,ei,Ui,Pt,Bi,oi,Gt=0;for(Pt=0;Pt<=s;Pt++)et.bl_count[Pt]=0;for(zt[2*et.heap[et.heap_max]+1]=0,kt=et.heap_max+1;kt<573;kt++)ei=et.heap[kt],Pt=zt[2*zt[2*ei+1]+1]+1,Pt>ti&&(Pt=ti,Gt++),zt[2*ei+1]=Pt,ei>Ct||(et.bl_count[Pt]++,Bi=0,ei>=Oi&&(Bi=Qt[ei-Oi]),oi=zt[2*ei],et.opt_len+=oi*(Pt+Bi),Si&&(et.static_len+=oi*(Xo[2*ei+1]+Bi)));if(Gt!==0){do{for(Pt=ti-1;et.bl_count[Pt]===0;)Pt--;et.bl_count[Pt]--,et.bl_count[Pt+1]+=2,et.bl_count[ti]--,Gt-=2}while(Gt>0);for(Pt=ti;Pt!==0;Pt--)for(ei=et.bl_count[Pt];ei!==0;)Ui=et.heap[--kt],Ui>Ct||(zt[2*Ui+1]!==Pt&&(et.opt_len+=(Pt-zt[2*Ui+1])*zt[2*Ui],zt[2*Ui+1]=Pt),ei--)}})(L,X),R(O,Ve,L.bl_count)},$=(L,X,O)=>{let ke,ye,ge=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),X[2*(O+1)+1]=65535,ke=0;ke<=O;ke++)ye=tt,tt=X[2*(ke+1)+1],++Oe<wt&&ye===tt||(Oe<Ve?L.bl_tree[2*ye]+=Oe:ye!==0?(ye!==ge&&L.bl_tree[2*ye]++,L.bl_tree[32]++):Oe<=10?L.bl_tree[34]++:L.bl_tree[36]++,Oe=0,ge=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4))},fe=(L,X,O)=>{let ke,ye,ge=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),ke=0;ke<=O;ke++)if(ye=tt,tt=X[2*(ke+1)+1],!(++Oe<wt&&ye===tt)){if(Oe<Ve)do T(L,ye,L.bl_tree);while(--Oe!=0);else ye!==0?(ye!==ge&&(T(L,ye,L.bl_tree),Oe--),T(L,16,L.bl_tree),P(L,Oe-3,2)):Oe<=10?(T(L,17,L.bl_tree),P(L,Oe-3,3)):(T(L,18,L.bl_tree),P(L,Oe-11,7));Oe=0,ge=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4)}};let Me=!1;const Se=(L,X,O,ke)=>{P(L,0+(ke?1:0),3),U(L),B(L,O),B(L,~O),O&&L.pending_buf.set(L.window.subarray(X,X+O),L.pending),L.pending+=O};var qe=(L,X,O,ke)=>{let ye,ge,tt=0;L.level>0?(L.strm.data_type===2&&(L.strm.data_type=(Oe=>{let wt,Ve=4093624447;for(wt=0;wt<=31;wt++,Ve>>>=1)if(1&Ve&&Oe.dyn_ltree[2*wt]!==0)return 0;if(Oe.dyn_ltree[18]!==0||Oe.dyn_ltree[20]!==0||Oe.dyn_ltree[26]!==0)return 1;for(wt=32;wt<r;wt++)if(Oe.dyn_ltree[2*wt]!==0)return 1;return 0})(L)),Y(L,L.l_desc),Y(L,L.d_desc),tt=(Oe=>{let wt;for($(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),$(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),Y(Oe,Oe.bl_desc),wt=18;wt>=3&&Oe.bl_tree[2*u[wt]+1]===0;wt--);return Oe.opt_len+=3*(wt+1)+5+5+4,wt})(L),ye=L.opt_len+3+7>>>3,ge=L.static_len+3+7>>>3,ge<=ye&&(ye=ge)):ye=ge=O+5,O+4<=ye&&X!==-1?Se(L,X,O,ke):L.strategy===4||ge===ye?(P(L,2+(ke?1:0),3),W(L,h,p)):(P(L,4+(ke?1:0),3),((Oe,wt,Ve,et)=>{let ii;for(P(Oe,wt-257,5),P(Oe,Ve-1,5),P(Oe,et-4,4),ii=0;ii<et;ii++)P(Oe,Oe.bl_tree[2*u[ii]+1],3);fe(Oe,Oe.dyn_ltree,wt-1),fe(Oe,Oe.dyn_dtree,Ve-1)})(L,L.l_desc.max_code+1,L.d_desc.max_code+1,tt+1),W(L,L.dyn_ltree,L.dyn_dtree)),F(L),ke&&U(L)},Qe={_tr_init:L=>{Me||((()=>{let X,O,ke,ye,ge;const tt=new Array(16);for(ke=0,ye=0;ye<28;ye++)for(m[ye]=ke,X=0;X<1<<l[ye];X++)f[ke++]=ye;for(f[ke-1]=ye,ge=0,ye=0;ye<16;ye++)for(g[ye]=ge,X=0;X<1<<c[ye];X++)A[ge++]=ye;for(ge>>=7;ye<a;ye++)for(g[ye]=ge<<7,X=0;X<1<<c[ye]-7;X++)A[256+ge++]=ye;for(O=0;O<=s;O++)tt[O]=0;for(X=0;X<=143;)h[2*X+1]=8,X++,tt[8]++;for(;X<=255;)h[2*X+1]=9,X++,tt[9]++;for(;X<=279;)h[2*X+1]=7,X++,tt[7]++;for(;X<=287;)h[2*X+1]=8,X++,tt[8]++;for(R(h,287,tt),X=0;X<a;X++)p[2*X+1]=5,p[2*X]=S(X,5);v=new y(h,l,257,n,s),b=new y(p,c,0,a,s),x=new y(new Array(0),d,0,19,7)})(),Me=!0),L.l_desc=new k(L.dyn_ltree,v),L.d_desc=new k(L.dyn_dtree,b),L.bl_desc=new k(L.bl_tree,x),L.bi_buf=0,L.bi_valid=0,F(L)},_tr_stored_block:Se,_tr_flush_block:qe,_tr_tally:(L,X,O)=>(L.pending_buf[L.sym_buf+L.sym_next++]=X,L.pending_buf[L.sym_buf+L.sym_next++]=X>>8,L.pending_buf[L.sym_buf+L.sym_next++]=O,X===0?L.dyn_ltree[2*O]++:(L.matches++,X--,L.dyn_ltree[2*(f[O]+r+1)]++,L.dyn_dtree[2*E(X)]++),L.sym_next===L.sym_end),_tr_align:L=>{P(L,2,3),T(L,256,h),(X=>{X.bi_valid===16?(B(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):X.bi_valid>=8&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)})(L)}},Ce=(L,X,O,ke)=>{let ye=65535&L|0,ge=L>>>16&65535|0,tt=0;for(;O!==0;){tt=O>2e3?2e3:O,O-=tt;do ye=ye+X[ke++]|0,ge=ge+ye|0;while(--tt);ye%=65521,ge%=65521}return ye|ge<<16|0};const Le=new Uint32Array((()=>{let L,X=[];for(var O=0;O<256;O++){L=O;for(var ke=0;ke<8;ke++)L=1&L?3988292384^L>>>1:L>>>1;X[O]=L}return X})());var Fe=(L,X,O,ke)=>{const ye=Le,ge=ke+O;L^=-1;for(let tt=ke;tt<ge;tt++)L=L>>>8^ye[255&(L^X[tt])];return-1^L},ve={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"},me={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:we,_tr_stored_block:Re,_tr_flush_block:We,_tr_tally:H,_tr_align:ee}=Qe,{Z_NO_FLUSH:ae,Z_PARTIAL_FLUSH:Ee,Z_FULL_FLUSH:pe,Z_FINISH:Q,Z_BLOCK:Z,Z_OK:ie,Z_STREAM_END:re,Z_STREAM_ERROR:ne,Z_DATA_ERROR:G,Z_BUF_ERROR:J,Z_DEFAULT_COMPRESSION:ue,Z_FILTERED:xe,Z_HUFFMAN_ONLY:oe,Z_RLE:Be,Z_FIXED:je,Z_DEFAULT_STRATEGY:he,Z_UNKNOWN:Ne,Z_DEFLATED:Pe}=me,He=258,rt=262,At=42,ft=113,ct=666,ut=(L,X)=>(L.msg=ve[X],X),Te=L=>2*L-(L>4?9:0),st=L=>{let X=L.length;for(;--X>=0;)L[X]=0},dt=L=>{let X,O,ke,ye=L.w_size;X=L.hash_size,ke=X;do O=L.head[--ke],L.head[ke]=O>=ye?O-ye:0;while(--X);X=ye,ke=X;do O=L.prev[--ke],L.prev[ke]=O>=ye?O-ye:0;while(--X)};let Ye=(L,X,O)=>(X<<L.hash_shift^O)&L.hash_mask;const Ae=L=>{const X=L.state;let O=X.pending;O>L.avail_out&&(O=L.avail_out),O!==0&&(L.output.set(X.pending_buf.subarray(X.pending_out,X.pending_out+O),L.next_out),L.next_out+=O,X.pending_out+=O,L.total_out+=O,L.avail_out-=O,X.pending-=O,X.pending===0&&(X.pending_out=0))},be=(L,X)=>{We(L,L.block_start>=0?L.block_start:-1,L.strstart-L.block_start,X),L.block_start=L.strstart,Ae(L.strm)},$e=(L,X)=>{L.pending_buf[L.pending++]=X},ht=(L,X)=>{L.pending_buf[L.pending++]=X>>>8&255,L.pending_buf[L.pending++]=255&X},St=(L,X,O,ke)=>{let ye=L.avail_in;return ye>ke&&(ye=ke),ye===0?0:(L.avail_in-=ye,X.set(L.input.subarray(L.next_in,L.next_in+ye),O),L.state.wrap===1?L.adler=Ce(L.adler,X,ye,O):L.state.wrap===2&&(L.adler=Fe(L.adler,X,ye,O)),L.next_in+=ye,L.total_in+=ye,ye)},xt=(L,X)=>{let O,ke,ye=L.max_chain_length,ge=L.strstart,tt=L.prev_length,Oe=L.nice_match;const wt=L.strstart>L.w_size-rt?L.strstart-(L.w_size-rt):0,Ve=L.window,et=L.w_mask,ii=L.prev,zt=L.strstart+He;let Ct=Ve[ge+tt-1],Xo=Ve[ge+tt];L.prev_length>=L.good_match&&(ye>>=2),Oe>L.lookahead&&(Oe=L.lookahead);do if(O=X,Ve[O+tt]===Xo&&Ve[O+tt-1]===Ct&&Ve[O]===Ve[ge]&&Ve[++O]===Ve[ge+1]){ge+=2,O++;do;while(Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&ge<zt);if(ke=He-(zt-ge),ge=zt-He,ke>tt){if(L.match_start=X,tt=ke,ke>=Oe)break;Ct=Ve[ge+tt-1],Xo=Ve[ge+tt]}}while((X=ii[X&et])>wt&&--ye!=0);return tt<=L.lookahead?tt:L.lookahead},yi=L=>{const X=L.w_size;let O,ke,ye;do{if(ke=L.window_size-L.lookahead-L.strstart,L.strstart>=X+(X-rt)&&(L.window.set(L.window.subarray(X,X+X-ke),0),L.match_start-=X,L.strstart-=X,L.block_start-=X,L.insert>L.strstart&&(L.insert=L.strstart),dt(L),ke+=X),L.strm.avail_in===0)break;if(O=St(L.strm,L.window,L.strstart+L.lookahead,ke),L.lookahead+=O,L.lookahead+L.insert>=3)for(ye=L.strstart-L.insert,L.ins_h=L.window[ye],L.ins_h=Ye(L,L.ins_h,L.window[ye+1]);L.insert&&(L.ins_h=Ye(L,L.ins_h,L.window[ye+3-1]),L.prev[ye&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=ye,ye++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<rt&&L.strm.avail_in!==0)},Gi=(L,X)=>{let O,ke,ye,ge=L.pending_buf_size-5>L.w_size?L.w_size:L.pending_buf_size-5,tt=0,Oe=L.strm.avail_in;do{if(O=65535,ye=L.bi_valid+42>>3,L.strm.avail_out<ye||(ye=L.strm.avail_out-ye,ke=L.strstart-L.block_start,O>ke+L.strm.avail_in&&(O=ke+L.strm.avail_in),O>ye&&(O=ye),O<ge&&(O===0&&X!==Q||X===ae||O!==ke+L.strm.avail_in)))break;tt=X===Q&&O===ke+L.strm.avail_in?1:0,Re(L,0,0,tt),L.pending_buf[L.pending-4]=O,L.pending_buf[L.pending-3]=O>>8,L.pending_buf[L.pending-2]=~O,L.pending_buf[L.pending-1]=~O>>8,Ae(L.strm),ke&&(ke>O&&(ke=O),L.strm.output.set(L.window.subarray(L.block_start,L.block_start+ke),L.strm.next_out),L.strm.next_out+=ke,L.strm.avail_out-=ke,L.strm.total_out+=ke,L.block_start+=ke,O-=ke),O&&(St(L.strm,L.strm.output,L.strm.next_out,O),L.strm.next_out+=O,L.strm.avail_out-=O,L.strm.total_out+=O)}while(tt===0);return Oe-=L.strm.avail_in,Oe&&(Oe>=L.w_size?(L.matches=2,L.window.set(L.strm.input.subarray(L.strm.next_in-L.w_size,L.strm.next_in),0),L.strstart=L.w_size,L.insert=L.strstart):(L.window_size-L.strstart<=Oe&&(L.strstart-=L.w_size,L.window.set(L.window.subarray(L.w_size,L.w_size+L.strstart),0),L.matches<2&&L.matches++,L.insert>L.strstart&&(L.insert=L.strstart)),L.window.set(L.strm.input.subarray(L.strm.next_in-Oe,L.strm.next_in),L.strstart),L.strstart+=Oe,L.insert+=Oe>L.w_size-L.insert?L.w_size-L.insert:Oe),L.block_start=L.strstart),L.high_water<L.strstart&&(L.high_water=L.strstart),tt?4:X!==ae&&X!==Q&&L.strm.avail_in===0&&L.strstart===L.block_start?2:(ye=L.window_size-L.strstart,L.strm.avail_in>ye&&L.block_start>=L.w_size&&(L.block_start-=L.w_size,L.strstart-=L.w_size,L.window.set(L.window.subarray(L.w_size,L.w_size+L.strstart),0),L.matches<2&&L.matches++,ye+=L.w_size,L.insert>L.strstart&&(L.insert=L.strstart)),ye>L.strm.avail_in&&(ye=L.strm.avail_in),ye&&(St(L.strm,L.window,L.strstart,ye),L.strstart+=ye,L.insert+=ye>L.w_size-L.insert?L.w_size-L.insert:ye),L.high_water<L.strstart&&(L.high_water=L.strstart),ye=L.bi_valid+42>>3,ye=L.pending_buf_size-ye>65535?65535:L.pending_buf_size-ye,ge=ye>L.w_size?L.w_size:ye,ke=L.strstart-L.block_start,(ke>=ge||(ke||X===Q)&&X!==ae&&L.strm.avail_in===0&&ke<=ye)&&(O=ke>ye?ye:ke,tt=X===Q&&L.strm.avail_in===0&&O===ke?1:0,Re(L,L.block_start,O,tt),L.block_start+=O,Ae(L.strm)),tt?3:1)},Do=(L,X)=>{let O,ke;for(;;){if(L.lookahead<rt){if(yi(L),L.lookahead<rt&&X===ae)return 1;if(L.lookahead===0)break}if(O=0,L.lookahead>=3&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),O!==0&&L.strstart-O<=L.w_size-rt&&(L.match_length=xt(L,O)),L.match_length>=3)if(ke=H(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){L.match_length--;do L.strstart++,L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart;while(--L.match_length!=0);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+1]);else ke=H(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(ke&&(be(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,X===Q?(be(L,!0),L.strm.avail_out===0?3:4):L.sym_next&&(be(L,!1),L.strm.avail_out===0)?1:2},ao=(L,X)=>{let O,ke,ye;for(;;){if(L.lookahead<rt){if(yi(L),L.lookahead<rt&&X===ae)return 1;if(L.lookahead===0)break}if(O=0,L.lookahead>=3&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,O!==0&&L.prev_length<L.max_lazy_match&&L.strstart-O<=L.w_size-rt&&(L.match_length=xt(L,O),L.match_length<=5&&(L.strategy===xe||L.match_length===3&&L.strstart-L.match_start>4096)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){ye=L.strstart+L.lookahead-3,ke=H(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;do++L.strstart<=ye&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart);while(--L.prev_length!=0);if(L.match_available=0,L.match_length=2,L.strstart++,ke&&(be(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if(ke=H(L,0,L.window[L.strstart-1]),ke&&be(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(ke=H(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,X===Q?(be(L,!0),L.strm.avail_out===0?3:4):L.sym_next&&(be(L,!1),L.strm.avail_out===0)?1:2};function mr(L,X,O,ke,ye){this.good_length=L,this.max_lazy=X,this.nice_length=O,this.max_chain=ke,this.func=ye}const Ki=[new mr(0,0,0,0,Gi),new mr(4,4,8,4,Do),new mr(4,5,16,8,Do),new mr(4,6,32,32,Do),new mr(4,4,16,16,ao),new mr(8,16,32,32,ao),new mr(8,16,128,128,ao),new mr(8,32,128,256,ao),new mr(32,128,258,1024,ao),new mr(32,258,258,4096,ao)];function tp(){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=Pe,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),st(this.dyn_ltree),st(this.dyn_dtree),st(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),st(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),st(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Us=L=>{if(!L)return 1;const X=L.state;return!X||X.strm!==L||X.status!==At&&X.status!==57&&X.status!==69&&X.status!==73&&X.status!==91&&X.status!==103&&X.status!==ft&&X.status!==ct?1:0},hm=L=>{if(Us(L))return ut(L,ne);L.total_in=L.total_out=0,L.data_type=Ne;const X=L.state;return X.pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap===2?57:X.wrap?At:ft,L.adler=X.wrap===2?0:1,X.last_flush=-2,we(X),ie},mu=L=>{const X=hm(L);var O;return X===ie&&((O=L.state).window_size=2*O.w_size,st(O.head),O.max_lazy_match=Ki[O.level].max_lazy,O.good_match=Ki[O.level].good_length,O.nice_match=Ki[O.level].nice_length,O.max_chain_length=Ki[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=2,O.match_available=0,O.ins_h=0),X},pm=(L,X,O,ke,ye,ge)=>{if(!L)return ne;let tt=1;if(X===ue&&(X=6),ke<0?(tt=0,ke=-ke):ke>15&&(tt=2,ke-=16),ye<1||ye>9||O!==Pe||ke<8||ke>15||X<0||X>9||ge<0||ge>je||ke===8&&tt!==1)return ut(L,ne);ke===8&&(ke=9);const Oe=new tp;return L.state=Oe,Oe.strm=L,Oe.status=At,Oe.wrap=tt,Oe.gzhead=null,Oe.w_bits=ke,Oe.w_size=1<<Oe.w_bits,Oe.w_mask=Oe.w_size-1,Oe.hash_bits=ye+7,Oe.hash_size=1<<Oe.hash_bits,Oe.hash_mask=Oe.hash_size-1,Oe.hash_shift=~~((Oe.hash_bits+3-1)/3),Oe.window=new Uint8Array(2*Oe.w_size),Oe.head=new Uint16Array(Oe.hash_size),Oe.prev=new Uint16Array(Oe.w_size),Oe.lit_bufsize=1<<ye+6,Oe.pending_buf_size=4*Oe.lit_bufsize,Oe.pending_buf=new Uint8Array(Oe.pending_buf_size),Oe.sym_buf=Oe.lit_bufsize,Oe.sym_end=3*(Oe.lit_bufsize-1),Oe.level=X,Oe.strategy=ge,Oe.method=O,mu(L)};var qc={deflateInit:(L,X)=>pm(L,X,Pe,15,8,he),deflateInit2:pm,deflateReset:mu,deflateResetKeep:hm,deflateSetHeader:(L,X)=>Us(L)||L.state.wrap!==2?ne:(L.state.gzhead=X,ie),deflate:(L,X)=>{if(Us(L)||X>Z||X<0)return L?ut(L,ne):ne;const O=L.state;if(!L.output||L.avail_in!==0&&!L.input||O.status===ct&&X!==Q)return ut(L,L.avail_out===0?J:ne);const ke=O.last_flush;if(O.last_flush=X,O.pending!==0){if(Ae(L),L.avail_out===0)return O.last_flush=-1,ie}else if(L.avail_in===0&&Te(X)<=Te(ke)&&X!==Q)return ut(L,J);if(O.status===ct&&L.avail_in!==0)return ut(L,J);if(O.status===At&&O.wrap===0&&(O.status=ft),O.status===At){let ye=Pe+(O.w_bits-8<<4)<<8,ge=-1;if(ge=O.strategy>=oe||O.level<2?0:O.level<6?1:O.level===6?2:3,ye|=ge<<6,O.strstart!==0&&(ye|=32),ye+=31-ye%31,ht(O,ye),O.strstart!==0&&(ht(O,L.adler>>>16),ht(O,65535&L.adler)),L.adler=1,O.status=ft,Ae(L),O.pending!==0)return O.last_flush=-1,ie}if(O.status===57){if(L.adler=0,$e(O,31),$e(O,139),$e(O,8),O.gzhead)$e(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),$e(O,255&O.gzhead.time),$e(O,O.gzhead.time>>8&255),$e(O,O.gzhead.time>>16&255),$e(O,O.gzhead.time>>24&255),$e(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),$e(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&($e(O,255&O.gzhead.extra.length),$e(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(L.adler=Fe(L.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69;else if($e(O,0),$e(O,0),$e(O,0),$e(O,0),$e(O,0),$e(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),$e(O,3),O.status=ft,Ae(L),O.pending!==0)return O.last_flush=-1,ie}if(O.status===69){if(O.gzhead.extra){let ye=O.pending,ge=(65535&O.gzhead.extra.length)-O.gzindex;for(;O.pending+ge>O.pending_buf_size;){let Oe=O.pending_buf_size-O.pending;if(O.pending_buf.set(O.gzhead.extra.subarray(O.gzindex,O.gzindex+Oe),O.pending),O.pending=O.pending_buf_size,O.gzhead.hcrc&&O.pending>ye&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex+=Oe,Ae(L),O.pending!==0)return O.last_flush=-1,ie;ye=0,ge-=Oe}let tt=new Uint8Array(O.gzhead.extra);O.pending_buf.set(tt.subarray(O.gzindex,O.gzindex+ge),O.pending),O.pending+=ge,O.gzhead.hcrc&&O.pending>ye&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex=0}O.status=73}if(O.status===73){if(O.gzhead.name){let ye,ge=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>ge&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ge,ge)),Ae(L),O.pending!==0)return O.last_flush=-1,ie;ge=0}ye=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,$e(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>ge&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ge,ge)),O.gzindex=0}O.status=91}if(O.status===91){if(O.gzhead.comment){let ye,ge=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>ge&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ge,ge)),Ae(L),O.pending!==0)return O.last_flush=-1,ie;ge=0}ye=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,$e(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>ge&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ge,ge))}O.status=103}if(O.status===103){if(O.gzhead.hcrc){if(O.pending+2>O.pending_buf_size&&(Ae(L),O.pending!==0))return O.last_flush=-1,ie;$e(O,255&L.adler),$e(O,L.adler>>8&255),L.adler=0}if(O.status=ft,Ae(L),O.pending!==0)return O.last_flush=-1,ie}if(L.avail_in!==0||O.lookahead!==0||X!==ae&&O.status!==ct){let ye=O.level===0?Gi(O,X):O.strategy===oe?((ge,tt)=>{let Oe;for(;;){if(ge.lookahead===0&&(yi(ge),ge.lookahead===0)){if(tt===ae)return 1;break}if(ge.match_length=0,Oe=H(ge,0,ge.window[ge.strstart]),ge.lookahead--,ge.strstart++,Oe&&(be(ge,!1),ge.strm.avail_out===0))return 1}return ge.insert=0,tt===Q?(be(ge,!0),ge.strm.avail_out===0?3:4):ge.sym_next&&(be(ge,!1),ge.strm.avail_out===0)?1:2})(O,X):O.strategy===Be?((ge,tt)=>{let Oe,wt,Ve,et;const ii=ge.window;for(;;){if(ge.lookahead<=He){if(yi(ge),ge.lookahead<=He&&tt===ae)return 1;if(ge.lookahead===0)break}if(ge.match_length=0,ge.lookahead>=3&&ge.strstart>0&&(Ve=ge.strstart-1,wt=ii[Ve],wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve])){et=ge.strstart+He;do;while(wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&Ve<et);ge.match_length=He-(et-Ve),ge.match_length>ge.lookahead&&(ge.match_length=ge.lookahead)}if(ge.match_length>=3?(Oe=H(ge,1,ge.match_length-3),ge.lookahead-=ge.match_length,ge.strstart+=ge.match_length,ge.match_length=0):(Oe=H(ge,0,ge.window[ge.strstart]),ge.lookahead--,ge.strstart++),Oe&&(be(ge,!1),ge.strm.avail_out===0))return 1}return ge.insert=0,tt===Q?(be(ge,!0),ge.strm.avail_out===0?3:4):ge.sym_next&&(be(ge,!1),ge.strm.avail_out===0)?1:2})(O,X):Ki[O.level].func(O,X);if(ye!==3&&ye!==4||(O.status=ct),ye===1||ye===3)return L.avail_out===0&&(O.last_flush=-1),ie;if(ye===2&&(X===Ee?ee(O):X!==Z&&(Re(O,0,0,!1),X===pe&&(st(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),Ae(L),L.avail_out===0))return O.last_flush=-1,ie}return X!==Q?ie:O.wrap<=0?re:(O.wrap===2?($e(O,255&L.adler),$e(O,L.adler>>8&255),$e(O,L.adler>>16&255),$e(O,L.adler>>24&255),$e(O,255&L.total_in),$e(O,L.total_in>>8&255),$e(O,L.total_in>>16&255),$e(O,L.total_in>>24&255)):(ht(O,L.adler>>>16),ht(O,65535&L.adler)),Ae(L),O.wrap>0&&(O.wrap=-O.wrap),O.pending!==0?ie:re)},deflateEnd:L=>{if(Us(L))return ne;const X=L.state.status;return L.state=null,X===ft?ut(L,G):ie},deflateSetDictionary:(L,X)=>{let O=X.length;if(Us(L))return ne;const ke=L.state,ye=ke.wrap;if(ye===2||ye===1&&ke.status!==At||ke.lookahead)return ne;if(ye===1&&(L.adler=Ce(L.adler,X,O,0)),ke.wrap=0,O>=ke.w_size){ye===0&&(st(ke.head),ke.strstart=0,ke.block_start=0,ke.insert=0);let wt=new Uint8Array(ke.w_size);wt.set(X.subarray(O-ke.w_size,O),0),X=wt,O=ke.w_size}const ge=L.avail_in,tt=L.next_in,Oe=L.input;for(L.avail_in=O,L.next_in=0,L.input=X,yi(ke);ke.lookahead>=3;){let wt=ke.strstart,Ve=ke.lookahead-2;do ke.ins_h=Ye(ke,ke.ins_h,ke.window[wt+3-1]),ke.prev[wt&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=wt,wt++;while(--Ve);ke.strstart=wt,ke.lookahead=2,yi(ke)}return ke.strstart+=ke.lookahead,ke.block_start=ke.strstart,ke.insert=ke.lookahead,ke.lookahead=0,ke.match_length=ke.prev_length=2,ke.match_available=0,L.next_in=tt,L.input=Oe,L.avail_in=ge,ke.wrap=ye,ie},deflateInfo:"pako deflate (from Nodeca project)"};const qw=(L,X)=>Object.prototype.hasOwnProperty.call(L,X);var n5=function(L){const X=Array.prototype.slice.call(arguments,1);for(;X.length;){const O=X.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(const ke in O)qw(O,ke)&&(L[ke]=O[ke])}}return L},a5=L=>{let X=0;for(let ke=0,ye=L.length;ke<ye;ke++)X+=L[ke].length;const O=new Uint8Array(X);for(let ke=0,ye=0,ge=L.length;ke<ge;ke++){let tt=L[ke];O.set(tt,ye),ye+=tt.length}return O};let s5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s5=!1}const vu=new Uint8Array(256);for(let L=0;L<256;L++)vu[L]=L>=252?6:L>=248?5:L>=240?4:L>=224?3:L>=192?2:1;vu[254]=vu[254]=1;var fm=L=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(L);let X,O,ke,ye,ge,tt=L.length,Oe=0;for(ye=0;ye<tt;ye++)O=L.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=L.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),Oe+=O<128?1:O<2048?2:O<65536?3:4;for(X=new Uint8Array(Oe),ge=0,ye=0;ge<Oe;ye++)O=L.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=L.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),O<128?X[ge++]=O:O<2048?(X[ge++]=192|O>>>6,X[ge++]=128|63&O):O<65536?(X[ge++]=224|O>>>12,X[ge++]=128|O>>>6&63,X[ge++]=128|63&O):(X[ge++]=240|O>>>18,X[ge++]=128|O>>>12&63,X[ge++]=128|O>>>6&63,X[ge++]=128|63&O);return X},se=(L,X)=>{const O=X||L.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(L.subarray(0,X));let ke,ye;const ge=new Array(2*O);for(ye=0,ke=0;ke<O;){let tt=L[ke++];if(tt<128){ge[ye++]=tt;continue}let Oe=vu[tt];if(Oe>4)ge[ye++]=65533,ke+=Oe-1;else{for(tt&=Oe===2?31:Oe===3?15:7;Oe>1&&ke<O;)tt=tt<<6|63&L[ke++],Oe--;Oe>1?ge[ye++]=65533:tt<65536?ge[ye++]=tt:(tt-=65536,ge[ye++]=55296|tt>>10&1023,ge[ye++]=56320|1023&tt)}}return((tt,Oe)=>{if(Oe<65534&&tt.subarray&&s5)return String.fromCharCode.apply(null,tt.length===Oe?tt:tt.subarray(0,Oe));let wt="";for(let Ve=0;Ve<Oe;Ve++)wt+=String.fromCharCode(tt[Ve]);return wt})(ge,ye)},Ke=(L,X)=>{(X=X||L.length)>L.length&&(X=L.length);let O=X-1;for(;O>=0&&(192&L[O])==128;)O--;return O<0||O===0?X:O+vu[L[O]]>X?O:X},nt=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 at=Object.prototype.toString,{Z_NO_FLUSH:Ge,Z_SYNC_FLUSH:bt,Z_FULL_FLUSH:Lt,Z_FINISH:Nt,Z_OK:Ot,Z_STREAM_END:Yt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:Xt,Z_DEFLATED:Ei}=me;function Fi(L){this.options=n5({level:$t,method:Ei,chunkSize:16384,windowBits:15,memLevel:8,strategy:Xt},L||{});let X=this.options;X.raw&&X.windowBits>0?X.windowBits=-X.windowBits:X.gzip&&X.windowBits>0&&X.windowBits<16&&(X.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=qc.deflateInit2(this.strm,X.level,X.method,X.windowBits,X.memLevel,X.strategy);if(O!==Ot)throw new Error(ve[O]);if(X.header&&qc.deflateSetHeader(this.strm,X.header),X.dictionary){let ke;if(ke=typeof X.dictionary=="string"?fm(X.dictionary):at.call(X.dictionary)==="[object ArrayBuffer]"?new Uint8Array(X.dictionary):X.dictionary,O=qc.deflateSetDictionary(this.strm,ke),O!==Ot)throw new Error(ve[O]);this._dict_set=!0}}function to(L,X){const O=new Fi(X);if(O.push(L,!0),O.err)throw O.msg||ve[O.err];return O.result}Fi.prototype.push=function(L,X){const O=this.strm,ke=this.options.chunkSize;let ye,ge;if(this.ended)return!1;for(ge=X===~~X?X:X===!0?Nt:Ge,typeof L=="string"?O.input=fm(L):at.call(L)==="[object ArrayBuffer]"?O.input=new Uint8Array(L):O.input=L,O.next_in=0,O.avail_in=O.input.length;;)if(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),(ge===bt||ge===Lt)&&O.avail_out<=6)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else{if(ye=qc.deflate(O,ge),ye===Yt)return O.next_out>0&&this.onData(O.output.subarray(0,O.next_out)),ye=qc.deflateEnd(this.strm),this.onEnd(ye),this.ended=!0,ye===Ot;if(O.avail_out!==0){if(ge>0&&O.next_out>0)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else if(O.avail_in===0)break}else this.onData(O.output)}return!0},Fi.prototype.onData=function(L){this.chunks.push(L)},Fi.prototype.onEnd=function(L){L===Ot&&(this.result=a5(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};var ko={Deflate:Fi,deflate:to,deflateRaw:function(L,X){return(X=X||{}).raw=!0,to(L,X)},gzip:function(L,X){return(X=X||{}).gzip=!0,to(L,X)}};const ji=16209;var qt=function(L,X){let O,ke,ye,ge,tt,Oe,wt,Ve,et,ii,zt,Ct,Xo,Si,Qt,Oi,ti,kt,ei,Ui,Pt,Bi,oi,Gt;const gi=L.state;O=L.next_in,oi=L.input,ke=O+(L.avail_in-5),ye=L.next_out,Gt=L.output,ge=ye-(X-L.avail_out),tt=ye+(L.avail_out-257),Oe=gi.dmax,wt=gi.wsize,Ve=gi.whave,et=gi.wnext,ii=gi.window,zt=gi.hold,Ct=gi.bits,Xo=gi.lencode,Si=gi.distcode,Qt=(1<<gi.lenbits)-1,Oi=(1<<gi.distbits)-1;e:do{Ct<15&&(zt+=oi[O++]<<Ct,Ct+=8,zt+=oi[O++]<<Ct,Ct+=8),ti=Xo[zt&Qt];t:for(;;){if(kt=ti>>>24,zt>>>=kt,Ct-=kt,kt=ti>>>16&255,kt===0)Gt[ye++]=65535&ti;else{if(!(16&kt)){if((64&kt)==0){ti=Xo[(65535&ti)+(zt&(1<<kt)-1)];continue t}if(32&kt){gi.mode=16191;break e}L.msg="invalid literal/length code",gi.mode=ji;break e}ei=65535&ti,kt&=15,kt&&(Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8),ei+=zt&(1<<kt)-1,zt>>>=kt,Ct-=kt),Ct<15&&(zt+=oi[O++]<<Ct,Ct+=8,zt+=oi[O++]<<Ct,Ct+=8),ti=Si[zt&Oi];i:for(;;){if(kt=ti>>>24,zt>>>=kt,Ct-=kt,kt=ti>>>16&255,!(16&kt)){if((64&kt)==0){ti=Si[(65535&ti)+(zt&(1<<kt)-1)];continue i}L.msg="invalid distance code",gi.mode=ji;break e}if(Ui=65535&ti,kt&=15,Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8,Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8)),Ui+=zt&(1<<kt)-1,Ui>Oe){L.msg="invalid distance too far back",gi.mode=ji;break e}if(zt>>>=kt,Ct-=kt,kt=ye-ge,Ui>kt){if(kt=Ui-kt,kt>Ve&&gi.sane){L.msg="invalid distance too far back",gi.mode=ji;break e}if(Pt=0,Bi=ii,et===0){if(Pt+=wt-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Ui,Bi=Gt}}else if(et<kt){if(Pt+=wt+et-kt,kt-=et,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);if(Pt=0,et<ei){kt=et,ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Ui,Bi=Gt}}}else if(Pt+=et-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Ui,Bi=Gt}for(;ei>2;)Gt[ye++]=Bi[Pt++],Gt[ye++]=Bi[Pt++],Gt[ye++]=Bi[Pt++],ei-=3;ei&&(Gt[ye++]=Bi[Pt++],ei>1&&(Gt[ye++]=Bi[Pt++]))}else{Pt=ye-Ui;do Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],ei-=3;while(ei>2);ei&&(Gt[ye++]=Gt[Pt++],ei>1&&(Gt[ye++]=Gt[Pt++]))}break}}break}}while(O<ke&&ye<tt);ei=Ct>>3,O-=ei,Ct-=ei<<3,zt&=(1<<Ct)-1,L.next_in=O,L.next_out=ye,L.avail_in=O<ke?ke-O+5:5-(O-ke),L.avail_out=ye<tt?tt-ye+257:257-(ye-tt),gi.hold=zt,gi.bits=Ct};const Ho=15,is=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),na=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Qc=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),gn=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var os=(L,X,O,ke,ye,ge,tt,Oe)=>{const wt=Oe.bits;let Ve,et,ii,zt,Ct,Xo,Si=0,Qt=0,Oi=0,ti=0,kt=0,ei=0,Ui=0,Pt=0,Bi=0,oi=0,Gt=null;const gi=new Uint16Array(16),mn=new Uint16Array(16);let vm,h5,p5,f5=null;for(Si=0;Si<=Ho;Si++)gi[Si]=0;for(Qt=0;Qt<ke;Qt++)gi[X[O+Qt]]++;for(kt=wt,ti=Ho;ti>=1&&gi[ti]===0;ti--);if(kt>ti&&(kt=ti),ti===0)return ye[ge++]=20971520,ye[ge++]=20971520,Oe.bits=1,0;for(Oi=1;Oi<ti&&gi[Oi]===0;Oi++);for(kt<Oi&&(kt=Oi),Pt=1,Si=1;Si<=Ho;Si++)if(Pt<<=1,Pt-=gi[Si],Pt<0)return-1;if(Pt>0&&(L===0||ti!==1))return-1;for(mn[1]=0,Si=1;Si<Ho;Si++)mn[Si+1]=mn[Si]+gi[Si];for(Qt=0;Qt<ke;Qt++)X[O+Qt]!==0&&(tt[mn[X[O+Qt]]++]=Qt);if(L===0?(Gt=f5=tt,Xo=20):L===1?(Gt=is,f5=na,Xo=257):(Gt=Qc,f5=gn,Xo=0),oi=0,Qt=0,Si=Oi,Ct=ge,ei=kt,Ui=0,ii=-1,Bi=1<<kt,zt=Bi-1,L===1&&Bi>852||L===2&&Bi>592)return 1;for(;;){vm=Si-Ui,tt[Qt]+1<Xo?(h5=0,p5=tt[Qt]):tt[Qt]>=Xo?(h5=f5[tt[Qt]-Xo],p5=Gt[tt[Qt]-Xo]):(h5=96,p5=0),Ve=1<<Si-Ui,et=1<<ei,Oi=et;do et-=Ve,ye[Ct+(oi>>Ui)+et]=vm<<24|h5<<16|p5|0;while(et!==0);for(Ve=1<<Si-1;oi&Ve;)Ve>>=1;if(Ve!==0?(oi&=Ve-1,oi+=Ve):oi=0,Qt++,--gi[Si]==0){if(Si===ti)break;Si=X[O+tt[Qt]]}if(Si>kt&&(oi&zt)!==ii){for(Ui===0&&(Ui=kt),Ct+=Oi,ei=Si-Ui,Pt=1<<ei;ei+Ui<ti&&(Pt-=gi[ei+Ui],!(Pt<=0));)ei++,Pt<<=1;if(Bi+=1<<ei,L===1&&Bi>852||L===2&&Bi>592)return 1;ii=oi&zt,ye[ii]=kt<<24|ei<<16|Ct-ge|0}}return oi!==0&&(ye[Ct+oi]=Si-Ui<<24|64<<16|0),Oe.bits=kt,0};const{Z_FINISH:vo,Z_BLOCK:jn,Z_TREES:Or,Z_OK:Mo,Z_STREAM_END:aa,Z_NEED_DICT:Am,Z_STREAM_ERROR:cr,Z_DATA_ERROR:DF,Z_MEM_ERROR:RF,Z_BUF_ERROR:j2e,Z_DEFLATED:LF}=me,l5=16180,c5=16190,Rl=16191,Qw=16192,Gw=16194,d5=16199,u5=16200,Kw=16206,Ro=16209,_F=L=>(L>>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24);function V2e(){this.strm=null,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 yu=L=>{if(!L)return 1;const X=L.state;return!X||X.strm!==L||X.mode<l5||X.mode>16211?1:0},FF=L=>{if(yu(L))return cr;const X=L.state;return L.total_in=L.total_out=X.total=0,L.msg="",X.wrap&&(L.adler=1&X.wrap),X.mode=l5,X.last=0,X.havedict=0,X.flags=-1,X.dmax=32768,X.head=null,X.hold=0,X.bits=0,X.lencode=X.lendyn=new Int32Array(852),X.distcode=X.distdyn=new Int32Array(592),X.sane=1,X.back=-1,Mo},OF=L=>{if(yu(L))return cr;const X=L.state;return X.wsize=0,X.whave=0,X.wnext=0,FF(L)},UF=(L,X)=>{let O;if(yu(L))return cr;const ke=L.state;return X<0?(O=0,X=-X):(O=5+(X>>4),X<48&&(X&=15)),X&&(X<8||X>15)?cr:(ke.window!==null&&ke.wbits!==X&&(ke.window=null),ke.wrap=O,ke.wbits=X,OF(L))},NF=(L,X)=>{if(!L)return cr;const O=new V2e;L.state=O,O.strm=L,O.window=null,O.mode=l5;const ke=UF(L,X);return ke!==Mo&&(L.state=null),ke};let Jw,Zw,jF=!0;const z2e=L=>{if(jF){Jw=new Int32Array(512),Zw=new Int32Array(32);let X=0;for(;X<144;)L.lens[X++]=8;for(;X<256;)L.lens[X++]=9;for(;X<280;)L.lens[X++]=7;for(;X<288;)L.lens[X++]=8;for(os(1,L.lens,0,288,Jw,0,L.work,{bits:9}),X=0;X<32;)L.lens[X++]=5;os(2,L.lens,0,32,Zw,0,L.work,{bits:5}),jF=!1}L.lencode=Jw,L.lenbits=9,L.distcode=Zw,L.distbits=5},VF=(L,X,O,ke)=>{let ye;const ge=L.state;return ge.window===null&&(ge.wsize=1<<ge.wbits,ge.wnext=0,ge.whave=0,ge.window=new Uint8Array(ge.wsize)),ke>=ge.wsize?(ge.window.set(X.subarray(O-ge.wsize,O),0),ge.wnext=0,ge.whave=ge.wsize):(ye=ge.wsize-ge.wnext,ye>ke&&(ye=ke),ge.window.set(X.subarray(O-ke,O-ke+ye),ge.wnext),(ke-=ye)?(ge.window.set(X.subarray(O-ke,O),0),ge.wnext=ke,ge.whave=ge.wsize):(ge.wnext+=ye,ge.wnext===ge.wsize&&(ge.wnext=0),ge.whave<ge.wsize&&(ge.whave+=ye))),0};var Ll={inflateReset:OF,inflateReset2:UF,inflateResetKeep:FF,inflateInit:L=>NF(L,15),inflateInit2:NF,inflate:(L,X)=>{let O,ke,ye,ge,tt,Oe,wt,Ve,et,ii,zt,Ct,Xo,Si,Qt,Oi,ti,kt,ei,Ui,Pt,Bi,oi=0;const Gt=new Uint8Array(4);let gi,mn;const vm=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(yu(L)||!L.output||!L.input&&L.avail_in!==0)return cr;O=L.state,O.mode===Rl&&(O.mode=Qw),tt=L.next_out,ye=L.output,wt=L.avail_out,ge=L.next_in,ke=L.input,Oe=L.avail_in,Ve=O.hold,et=O.bits,ii=Oe,zt=wt,Bi=Mo;e:for(;;)switch(O.mode){case l5:if(O.wrap===0){O.mode=Qw;break}for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(2&O.wrap&&Ve===35615){O.wbits===0&&(O.wbits=15),O.check=0,Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0),Ve=0,et=0,O.mode=16181;break}if(O.head&&(O.head.done=!1),!(1&O.wrap)||(((255&Ve)<<8)+(Ve>>8))%31){L.msg="incorrect header check",O.mode=Ro;break}if((15&Ve)!==LF){L.msg="unknown compression method",O.mode=Ro;break}if(Ve>>>=4,et-=4,Pt=8+(15&Ve),O.wbits===0&&(O.wbits=Pt),Pt>15||Pt>O.wbits){L.msg="invalid window size",O.mode=Ro;break}O.dmax=1<<O.wbits,O.flags=0,L.adler=O.check=1,O.mode=512&Ve?16189:Rl,Ve=0,et=0;break;case 16181:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(O.flags=Ve,(255&O.flags)!==LF){L.msg="unknown compression method",O.mode=Ro;break}if(57344&O.flags){L.msg="unknown header flags set",O.mode=Ro;break}O.head&&(O.head.text=Ve>>8&1),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16182;case 16182:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.head&&(O.head.time=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,Gt[2]=Ve>>>16&255,Gt[3]=Ve>>>24&255,O.check=Fe(O.check,Gt,4,0)),Ve=0,et=0,O.mode=16183;case 16183:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.head&&(O.head.xflags=255&Ve,O.head.os=Ve>>8),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16184;case 16184:if(1024&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.length=Ve,O.head&&(O.head.extra_len=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0}else O.head&&(O.head.extra=null);O.mode=16185;case 16185:if(1024&O.flags&&(Ct=O.length,Ct>Oe&&(Ct=Oe),Ct&&(O.head&&(Pt=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Uint8Array(O.head.extra_len)),O.head.extra.set(ke.subarray(ge,ge+Ct),Pt)),512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,ge)),Oe-=Ct,ge+=Ct,O.length-=Ct),O.length))break e;O.length=0,O.mode=16186;case 16186:if(2048&O.flags){if(Oe===0)break e;Ct=0;do Pt=ke[ge+Ct++],O.head&&Pt&&O.length<65536&&(O.head.name+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,ge)),Oe-=Ct,ge+=Ct,Pt)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=16187;case 16187:if(4096&O.flags){if(Oe===0)break e;Ct=0;do Pt=ke[ge+Ct++],O.head&&Pt&&O.length<65536&&(O.head.comment+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,ge)),Oe-=Ct,ge+=Ct,Pt)break e}else O.head&&(O.head.comment=null);O.mode=16188;case 16188:if(512&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(4&O.wrap&&Ve!==(65535&O.check)){L.msg="header crc mismatch",O.mode=Ro;break}Ve=0,et=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),L.adler=O.check=0,O.mode=Rl;break;case 16189:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}L.adler=O.check=_F(Ve),Ve=0,et=0,O.mode=c5;case c5:if(O.havedict===0)return L.next_out=tt,L.avail_out=wt,L.next_in=ge,L.avail_in=Oe,O.hold=Ve,O.bits=et,Am;L.adler=O.check=1,O.mode=Rl;case Rl:if(X===jn||X===Or)break e;case Qw:if(O.last){Ve>>>=7&et,et-=7&et,O.mode=Kw;break}for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}switch(O.last=1&Ve,Ve>>>=1,et-=1,3&Ve){case 0:O.mode=16193;break;case 1:if(z2e(O),O.mode=d5,X===Or){Ve>>>=2,et-=2;break e}break;case 2:O.mode=16196;break;case 3:L.msg="invalid block type",O.mode=Ro}Ve>>>=2,et-=2;break;case 16193:for(Ve>>>=7&et,et-=7&et;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if((65535&Ve)!=(Ve>>>16^65535)){L.msg="invalid stored block lengths",O.mode=Ro;break}if(O.length=65535&Ve,Ve=0,et=0,O.mode=Gw,X===Or)break e;case Gw:O.mode=16195;case 16195:if(Ct=O.length,Ct){if(Ct>Oe&&(Ct=Oe),Ct>wt&&(Ct=wt),Ct===0)break e;ye.set(ke.subarray(ge,ge+Ct),tt),Oe-=Ct,ge+=Ct,wt-=Ct,tt+=Ct,O.length-=Ct;break}O.mode=Rl;break;case 16196:for(;et<14;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(O.nlen=257+(31&Ve),Ve>>>=5,et-=5,O.ndist=1+(31&Ve),Ve>>>=5,et-=5,O.ncode=4+(15&Ve),Ve>>>=4,et-=4,O.nlen>286||O.ndist>30){L.msg="too many length or distance symbols",O.mode=Ro;break}O.have=0,O.mode=16197;case 16197:for(;O.have<O.ncode;){for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.lens[vm[O.have++]]=7&Ve,Ve>>>=3,et-=3}for(;O.have<19;)O.lens[vm[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,gi={bits:O.lenbits},Bi=os(0,O.lens,0,19,O.lencode,0,O.work,gi),O.lenbits=gi.bits,Bi){L.msg="invalid code lengths set",O.mode=Ro;break}O.have=0,O.mode=16198;case 16198:for(;O.have<O.nlen+O.ndist;){for(;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(ti<16)Ve>>>=Qt,et-=Qt,O.lens[O.have++]=ti;else{if(ti===16){for(mn=Qt+2;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(Ve>>>=Qt,et-=Qt,O.have===0){L.msg="invalid bit length repeat",O.mode=Ro;break}Pt=O.lens[O.have-1],Ct=3+(3&Ve),Ve>>>=2,et-=2}else if(ti===17){for(mn=Qt+3;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=3+(7&Ve),Ve>>>=3,et-=3}else{for(mn=Qt+7;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=11+(127&Ve),Ve>>>=7,et-=7}if(O.have+Ct>O.nlen+O.ndist){L.msg="invalid bit length repeat",O.mode=Ro;break}for(;Ct--;)O.lens[O.have++]=Pt}}if(O.mode===Ro)break;if(O.lens[256]===0){L.msg="invalid code -- missing end-of-block",O.mode=Ro;break}if(O.lenbits=9,gi={bits:O.lenbits},Bi=os(1,O.lens,0,O.nlen,O.lencode,0,O.work,gi),O.lenbits=gi.bits,Bi){L.msg="invalid literal/lengths set",O.mode=Ro;break}if(O.distbits=6,O.distcode=O.distdyn,gi={bits:O.distbits},Bi=os(2,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,gi),O.distbits=gi.bits,Bi){L.msg="invalid distances set",O.mode=Ro;break}if(O.mode=d5,X===Or)break e;case d5:O.mode=u5;case u5:if(Oe>=6&&wt>=258){L.next_out=tt,L.avail_out=wt,L.next_in=ge,L.avail_in=Oe,O.hold=Ve,O.bits=et,qt(L,zt),tt=L.next_out,ye=L.output,wt=L.avail_out,ge=L.next_in,ke=L.input,Oe=L.avail_in,Ve=O.hold,et=O.bits,O.mode===Rl&&(O.back=-1);break}for(O.back=0;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(Oi&&(240&Oi)==0){for(kt=Qt,ei=Oi,Ui=ti;oi=O.lencode[Ui+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,O.length=ti,Oi===0){O.mode=16205;break}if(32&Oi){O.back=-1,O.mode=Rl;break}if(64&Oi){L.msg="invalid literal/length code",O.mode=Ro;break}O.extra=15&Oi,O.mode=16201;case 16201:if(O.extra){for(mn=O.extra;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.length+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=16202;case 16202:for(;oi=O.distcode[Ve&(1<<O.distbits)-1],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if((240&Oi)==0){for(kt=Qt,ei=Oi,Ui=ti;oi=O.distcode[Ui+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,64&Oi){L.msg="invalid distance code",O.mode=Ro;break}O.offset=ti,O.extra=15&Oi,O.mode=16203;case 16203:if(O.extra){for(mn=O.extra;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.offset+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){L.msg="invalid distance too far back",O.mode=Ro;break}O.mode=16204;case 16204:if(wt===0)break e;if(Ct=zt-wt,O.offset>Ct){if(Ct=O.offset-Ct,Ct>O.whave&&O.sane){L.msg="invalid distance too far back",O.mode=Ro;break}Ct>O.wnext?(Ct-=O.wnext,Xo=O.wsize-Ct):Xo=O.wnext-Ct,Ct>O.length&&(Ct=O.length),Si=O.window}else Si=ye,Xo=tt-O.offset,Ct=O.length;Ct>wt&&(Ct=wt),wt-=Ct,O.length-=Ct;do ye[tt++]=Si[Xo++];while(--Ct);O.length===0&&(O.mode=u5);break;case 16205:if(wt===0)break e;ye[tt++]=O.length,wt--,O.mode=u5;break;case Kw:if(O.wrap){for(;et<32;){if(Oe===0)break e;Oe--,Ve|=ke[ge++]<<et,et+=8}if(zt-=wt,L.total_out+=zt,O.total+=zt,4&O.wrap&&zt&&(L.adler=O.check=O.flags?Fe(O.check,ye,zt,tt-zt):Ce(O.check,ye,zt,tt-zt)),zt=wt,4&O.wrap&&(O.flags?Ve:_F(Ve))!==O.check){L.msg="incorrect data check",O.mode=Ro;break}Ve=0,et=0}O.mode=16207;case 16207:if(O.wrap&&O.flags){for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(4&O.wrap&&Ve!==(4294967295&O.total)){L.msg="incorrect length check",O.mode=Ro;break}Ve=0,et=0}O.mode=16208;case 16208:Bi=aa;break e;case Ro:Bi=DF;break e;case 16210:return RF;default:return cr}return L.next_out=tt,L.avail_out=wt,L.next_in=ge,L.avail_in=Oe,O.hold=Ve,O.bits=et,(O.wsize||zt!==L.avail_out&&O.mode<Ro&&(O.mode<Kw||X!==vo))&&VF(L,L.output,L.next_out,zt-L.avail_out),ii-=L.avail_in,zt-=L.avail_out,L.total_in+=ii,L.total_out+=zt,O.total+=zt,4&O.wrap&&zt&&(L.adler=O.check=O.flags?Fe(O.check,ye,zt,L.next_out-zt):Ce(O.check,ye,zt,L.next_out-zt)),L.data_type=O.bits+(O.last?64:0)+(O.mode===Rl?128:0)+(O.mode===d5||O.mode===Gw?256:0),(ii===0&&zt===0||X===vo)&&Bi===Mo&&(Bi=j2e),Bi},inflateEnd:L=>{if(yu(L))return cr;let X=L.state;return X.window&&(X.window=null),L.state=null,Mo},inflateGetHeader:(L,X)=>{if(yu(L))return cr;const O=L.state;return(2&O.wrap)==0?cr:(O.head=X,X.done=!1,Mo)},inflateSetDictionary:(L,X)=>{const O=X.length;let ke,ye,ge;return yu(L)?cr:(ke=L.state,ke.wrap!==0&&ke.mode!==c5?cr:ke.mode===c5&&(ye=1,ye=Ce(ye,X,O,0),ye!==ke.check)?DF:(ge=VF(L,X,O,O),ge?(ke.mode=16210,RF):(ke.havedict=1,Mo)))},inflateInfo:"pako inflate (from Nodeca project)"},H2e=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 zF=Object.prototype.toString,{Z_NO_FLUSH:q2e,Z_FINISH:Q2e,Z_OK:gm,Z_STREAM_END:Ww,Z_NEED_DICT:Yw,Z_STREAM_ERROR:G2e,Z_DATA_ERROR:HF,Z_MEM_ERROR:K2e}=me;function mm(L){this.options=n5({chunkSize:65536,windowBits:15,to:""},L||{});const X=this.options;X.raw&&X.windowBits>=0&&X.windowBits<16&&(X.windowBits=-X.windowBits,X.windowBits===0&&(X.windowBits=-15)),!(X.windowBits>=0&&X.windowBits<16)||L&&L.windowBits||(X.windowBits+=32),X.windowBits>15&&X.windowBits<48&&(15&X.windowBits)==0&&(X.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=Ll.inflateInit2(this.strm,X.windowBits);if(O!==gm)throw new Error(ve[O]);if(this.header=new H2e,Ll.inflateGetHeader(this.strm,this.header),X.dictionary&&(typeof X.dictionary=="string"?X.dictionary=fm(X.dictionary):zF.call(X.dictionary)==="[object ArrayBuffer]"&&(X.dictionary=new Uint8Array(X.dictionary)),X.raw&&(O=Ll.inflateSetDictionary(this.strm,X.dictionary),O!==gm)))throw new Error(ve[O])}function Xw(L,X){const O=new mm(X);if(O.push(L),O.err)throw O.msg||ve[O.err];return O.result}mm.prototype.push=function(L,X){const O=this.strm,ke=this.options.chunkSize,ye=this.options.dictionary;let ge,tt,Oe;if(this.ended)return!1;for(tt=X===~~X?X:X===!0?Q2e:q2e,zF.call(L)==="[object ArrayBuffer]"?O.input=new Uint8Array(L):O.input=L,O.next_in=0,O.avail_in=O.input.length;;){for(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),ge=Ll.inflate(O,tt),ge===Yw&&ye&&(ge=Ll.inflateSetDictionary(O,ye),ge===gm?ge=Ll.inflate(O,tt):ge===HF&&(ge=Yw));O.avail_in>0&&ge===Ww&&O.state.wrap>0&&L[O.next_in]!==0;)Ll.inflateReset(O),ge=Ll.inflate(O,tt);switch(ge){case G2e:case HF:case Yw:case K2e:return this.onEnd(ge),this.ended=!0,!1}if(Oe=O.avail_out,O.next_out&&(O.avail_out===0||ge===Ww))if(this.options.to==="string"){let wt=Ke(O.output,O.next_out),Ve=O.next_out-wt,et=se(O.output,wt);O.next_out=Ve,O.avail_out=ke-Ve,Ve&&O.output.set(O.output.subarray(wt,wt+Ve),0),this.onData(et)}else this.onData(O.output.length===O.next_out?O.output:O.output.subarray(0,O.next_out));if(ge!==gm||Oe!==0){if(ge===Ww)return ge=Ll.inflateEnd(this.strm),this.onEnd(ge),this.ended=!0,!0;if(O.avail_in===0)break}}return!0},mm.prototype.onData=function(L){this.chunks.push(L)},mm.prototype.onEnd=function(L){L===gm&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a5(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};var J2e={Inflate:mm,inflate:Xw,inflateRaw:function(L,X){return(X=X||{}).raw=!0,Xw(L,X)},ungzip:Xw};const{Deflate:Z2e,deflate:W2e,deflateRaw:Y2e,gzip:X2e}=ko,{Inflate:$2e,inflate:eme,inflateRaw:tme,ungzip:ime}=J2e;var qF=Z2e,QF=W2e,GF=Y2e,KF=X2e,JF=$2e,ZF=eme,WF=tme,YF=ime,XF=me,ome={Deflate:qF,deflate:QF,deflateRaw:GF,gzip:KF,Inflate:JF,inflate:ZF,inflateRaw:WF,ungzip:YF,constants:XF};i.Deflate=qF,i.Inflate=JF,i.constants=XF,i.default=ome,i.deflate=QF,i.deflateRaw=GF,i.gzip=KF,i.inflate=ZF,i.inflateRaw=WF,i.ungzip=YF,Object.defineProperty(i,"__esModule",{value:!0})}))})(qb,qb.exports)),qb.exports}var mte=oNt();const rNt=nv(mte),Es=rme({__proto__:null,default:rNt},[mte]);let Rn=window.pako||Es;Rn.inflate||(Rn=Rn.default);const nNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function aNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],positionsDecodeMatrix:t[11]}}function sNt(t){return{positions:new Uint16Array(Rn.inflate(t.positions).buffer),normals:new Int8Array(Rn.inflate(t.normals).buffer),indices:new Uint32Array(Rn.inflate(t.indices).buffer),edgeIndices:new Uint32Array(Rn.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(Rn.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(Rn.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(Rn.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(Rn.inflate(t.meshColors).buffer),entityIDs:Rn.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(Rn.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(Rn.inflate(t.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(Rn.inflate(t.positionsDecodeMatrix).buffer)}}function lNt(t,e,i,o,r,n){n.getNextId(),o.positionsCompression="precompressed",o.normalsCompression="precompressed";const a=i.positions,s=i.normals,l=i.indices,c=i.edgeIndices,d=i.meshPositions,u=i.meshIndices,h=i.meshEdgesIndices,p=i.meshColors,A=JSON.parse(i.entityIDs),f=i.entityMeshes,m=i.entityIsObjects,g=d.length,y=f.length;for(let v=0;v<y;v++){const b=A[v],x=e.globalizeObjectIds?C.globalizeObjectId(o.id,b):b,k=t.metaScene.metaObjects[x],E={},B={};if(k){if(e.excludeTypesMap&&k.type&&e.excludeTypesMap[k.type]||e.includeTypesMap&&k.type&&!e.includeTypesMap[k.type])continue;const S=e.objectDefaults?e.objectDefaults[k.type]||e.objectDefaults.DEFAULT:null;S&&(S.visible===!1&&(E.visible=!1),S.pickable===!1&&(E.pickable=!1),S.colorize&&(B.color=S.colorize),S.opacity!==void 0&&S.opacity!==null&&(B.opacity=S.opacity))}else if(e.excludeUnclassifiedObjects)continue;const P=v===y-1,T=[];for(let S=f[v],R=P?f.length:f[v+1];S<R;S++){const F=S===g-1,U=x+".mesh."+S,q=nNt(p.subarray(S*4,S*4+3)),V=p[S*4+3]/255;o.createMesh(mt.apply(B,{id:U,primitive:"triangles",positionsCompressed:a.subarray(d[S],F?a.length:d[S+1]),normalsCompressed:s.subarray(d[S],F?a.length:d[S+1]),indices:l.subarray(u[S],F?l.length:u[S+1]),edgeIndices:c.subarray(h[S],F?c.length:h[S+1]),positionsDecodeMatrix:i.positionsDecodeMatrix,color:q,opacity:V})),T.push(U)}o.createEntity(mt.apply(E,{id:x,isObject:m[v]===1,meshIds:T}))}}const vte={version:1,parse:function(t,e,i,o,r,n){const a=aNt(i),s=sNt(a);lNt(t,e,s,o,r,n)}};let Sr=window.pako||Es;Sr.inflate||(Sr=Sr.default);function cNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],positionsDecodeMatrix:t[11],entityMeshIds:t[12],entityMatrices:t[13],entityUsesInstancing:t[14]}}function dNt(t){return{positions:new Uint16Array(Sr.inflate(t.positions).buffer),normals:new Int8Array(Sr.inflate(t.normals).buffer),indices:new Uint32Array(Sr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(Sr.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(Sr.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(Sr.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(Sr.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(Sr.inflate(t.meshColors).buffer),entityIDs:Sr.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(Sr.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(Sr.inflate(t.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(Sr.inflate(t.positionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(Sr.inflate(t.entityMeshIds).buffer),entityMatrices:new Float32Array(Sr.inflate(t.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(Sr.inflate(t.entityUsesInstancing).buffer)}}const uNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function hNt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.meshPositions,h=i.meshIndices,p=i.meshEdgesIndices,A=i.meshColors,f=JSON.parse(i.entityIDs),m=i.entityMeshes,g=i.entityIsObjects,y=i.entityMeshIds,v=i.entityMatrices,b=i.entityUsesInstancing,x=u.length,k=m.length,E={};for(let B=0;B<k;B++){const P=f[B],T=e.globalizeObjectIds?C.globalizeObjectId(o.id,P):P,S=t.metaScene.metaObjects[T],R={},F={},U=v.subarray(B*16,B*16+16);if(S){if(e.excludeTypesMap&&S.type&&e.excludeTypesMap[S.type]||e.includeTypesMap&&S.type&&!e.includeTypesMap[S.type])continue;const W=e.objectDefaults?e.objectDefaults[S.type]||e.objectDefaults.DEFAULT:null;W&&(W.visible===!1&&(R.visible=!1),W.pickable===!1&&(R.pickable=!1),W.colorize&&(F.color=W.colorize),W.opacity!==void 0&&W.opacity!==null&&(F.opacity=W.opacity))}else if(e.excludeUnclassifiedObjects)continue;const q=B===k-1,V=[];for(let W=m[B],Y=q?y.length:m[B+1];W<Y;W++){const $=y[W],fe=$===x-1,Me=n.getNextId(),Se=uNt(A.subarray($*4,$*4+3)),qe=A[$*4+3]/255,Qe=s.subarray(u[$],fe?s.length:u[$+1]),Ce=l.subarray(u[$],fe?s.length:u[$+1]),Le=c.subarray(h[$],fe?c.length:h[$+1]),Fe=d.subarray(p[$],fe?d.length:p[$+1]);if(b[B]===1){const ve=`${a}.geometry.${Me}.${$}`;ve in E||(o.createGeometry({id:ve,positionsCompressed:Qe,normalsCompressed:Ce,indices:Le,edgeIndices:Fe,primitive:"triangles",positionsDecodeMatrix:i.positionsDecodeMatrix}),E[ve]=!0),o.createMesh(mt.apply(F,{id:Me,color:Se,opacity:qe,matrix:U,geometryId:ve})),V.push(Me)}else o.createMesh(mt.apply(F,{id:Me,primitive:"triangles",positionsCompressed:Qe,normalsCompressed:Ce,indices:Le,edgeIndices:Fe,positionsDecodeMatrix:i.positionsDecodeMatrix,color:Se,opacity:qe})),V.push(Me)}V.length&&o.createEntity(mt.apply(R,{id:T,isObject:g[B]===1,meshIds:V}))}}const yte={version:2,parse:function(t,e,i,o,r,n){const a=cNt(i),s=dNt(a);hNt(t,e,s,o,r,n)}};let br=window.pako||Es;br.inflate||(br=br.default);function pNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],instancedPositionsDecodeMatrix:t[11],batchedPositionsDecodeMatrix:t[12],entityMeshIds:t[13],entityMatrices:t[14],entityUsesInstancing:t[15]}}function fNt(t){return{positions:new Uint16Array(br.inflate(t.positions).buffer),normals:new Int8Array(br.inflate(t.normals).buffer),indices:new Uint32Array(br.inflate(t.indices).buffer),edgeIndices:new Uint32Array(br.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(br.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(br.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(br.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(br.inflate(t.meshColors).buffer),entityIDs:br.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(br.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(br.inflate(t.entityIsObjects).buffer),instancedPositionsDecodeMatrix:new Float32Array(br.inflate(t.instancedPositionsDecodeMatrix).buffer),batchedPositionsDecodeMatrix:new Float32Array(br.inflate(t.batchedPositionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(br.inflate(t.entityMeshIds).buffer),entityMatrices:new Float32Array(br.inflate(t.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(br.inflate(t.entityUsesInstancing).buffer)}}const ANt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function gNt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.meshPositions,h=i.meshIndices,p=i.meshEdgesIndices,A=i.meshColors,f=JSON.parse(i.entityIDs),m=i.entityMeshes,g=i.entityIsObjects,y=i.entityMeshIds,v=i.entityMatrices,b=i.entityUsesInstancing,x=u.length,k=m.length,E={};for(let F=0;F<k;F++){const U=f[F],q=e.globalizeObjectIds?C.globalizeObjectId(o.id,U):U,V=t.metaScene.metaObjects[q],W={},Y={},$=v.subarray(F*16,F*16+16);if(V){if(e.excludeTypesMap&&V.type&&e.excludeTypesMap[V.type]||e.includeTypesMap&&V.type&&!e.includeTypesMap[V.type])continue;const Se=e.objectDefaults?e.objectDefaults[V.type]||e.objectDefaults.DEFAULT:null;Se&&(Se.visible===!1&&(W.visible=!1),Se.pickable===!1&&(W.pickable=!1),Se.colorize&&(Y.color=Se.colorize),Se.opacity!==void 0&&Se.opacity!==null&&(Y.opacity=Se.opacity))}else if(e.excludeUnclassifiedObjects)continue;const fe=F===k-1,Me=[];for(let Se=m[F],qe=fe?y.length:m[F+1];Se<qe;Se++){var B=y[Se];const Qe=B===x-1,Ce=`${a}.${q}.mesh.${B}`,Le=ANt(A.subarray(B*4,B*4+3)),Fe=A[B*4+3]/255;var P=s.subarray(u[B],Qe?s.length:u[B+1]),T=l.subarray(u[B],Qe?s.length:u[B+1]),S=c.subarray(h[B],Qe?c.length:h[B+1]),R=d.subarray(p[B],Qe?d.length:p[B+1]);if(b[F]===1){const ve=`${a}.geometry.${Ce}.${B}`;ve in E||(o.createGeometry({id:ve,positionsCompressed:P,normalsCompressed:T,indices:S,edgeIndices:R,primitive:"triangles",positionsDecodeMatrix:i.instancedPositionsDecodeMatrix}),E[ve]=!0),o.createMesh(mt.apply(Y,{id:Ce,color:Le,opacity:Fe,matrix:$,geometryId:ve})),Me.push(Ce)}else o.createMesh(mt.apply(Y,{id:Ce,primitive:"triangles",positionsCompressed:P,normalsCompressed:T,indices:S,edgeIndices:R,positionsDecodeMatrix:i.batchedPositionsDecodeMatrix,color:Le,opacity:Fe})),Me.push(Ce)}Me.length&&o.createEntity(mt.apply(W,{id:q,isObject:g[F]===1,meshIds:Me}))}}const bte={version:3,parse:function(t,e,i,o,r,n){const a=pNt(i),s=fNt(a);gNt(t,e,s,o,r,n)}};let Tr=window.pako||Es;Tr.inflate||(Tr=Tr.default);function mNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],decodeMatrices:t[4],matrices:t[5],eachPrimitivePositionsAndNormalsPortion:t[6],eachPrimitiveIndicesPortion:t[7],eachPrimitiveEdgeIndicesPortion:t[8],eachPrimitiveDecodeMatricesPortion:t[9],eachPrimitiveColor:t[10],primitiveInstances:t[11],eachEntityId:t[12],eachEntityPrimitiveInstancesPortion:t[13],eachEntityMatricesPortion:t[14],eachEntityMatrix:t[15]}}function vNt(t){return{positions:new Uint16Array(Tr.inflate(t.positions).buffer),normals:new Int8Array(Tr.inflate(t.normals).buffer),indices:new Uint32Array(Tr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(Tr.inflate(t.edgeIndices).buffer),decodeMatrices:new Float32Array(Tr.inflate(t.decodeMatrices).buffer),matrices:new Float32Array(Tr.inflate(t.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Tr.inflate(t.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Tr.inflate(t.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Tr.inflate(t.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveDecodeMatricesPortion:new Uint32Array(Tr.inflate(t.eachPrimitiveDecodeMatricesPortion).buffer),eachPrimitiveColor:new Uint8Array(Tr.inflate(t.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Tr.inflate(t.primitiveInstances).buffer),eachEntityId:Tr.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Tr.inflate(t.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Tr.inflate(t.eachEntityMatricesPortion).buffer)}}const yNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function bNt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.decodeMatrices,h=i.matrices,p=i.eachPrimitivePositionsAndNormalsPortion,A=i.eachPrimitiveIndicesPortion,f=i.eachPrimitiveEdgeIndicesPortion,m=i.eachPrimitiveDecodeMatricesPortion,g=i.eachPrimitiveColor,y=i.primitiveInstances,v=JSON.parse(i.eachEntityId),b=i.eachEntityPrimitiveInstancesPortion,x=i.eachEntityMatricesPortion,k=p.length,E=y.length,B=new Uint8Array(k),P=new Uint32Array(k),T=v.length;for(let F=0;F<k;F++)P[F]=F;P.sort((F,U)=>m[F]<m[U]?-1:m[F]>m[U]?1:0);for(let F=0;F<E;F++){const U=y[F];B[U]++}const S={};for(let F=0;F<T;F++){const U=T-1,q=F===U,V=b[F],W=q?b[U]:b[F+1];for(let Y=V;Y<W;Y++){const $=y[Y];B[$]>1||(S[$]=F)}}for(let F=0;F<k;F++){const U=P[F],q=U===k-1,V=B[U]>1,W=yNt(g.subarray(U*4,U*4+3)),Y=g[U*4+3]/255,$=s.subarray(p[U],q?s.length:p[U+1]),fe=l.subarray(p[U],q?l.length:p[U+1]),Me=c.subarray(A[U],q?c.length:A[U+1]),Se=d.subarray(f[U],q?d.length:f[U+1]),qe=u.subarray(m[U],m[U]+16);if(V){const Qe=`${a}-geometry.${U}`;o.createGeometry({id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:fe,indices:Me,edgeIndices:Se,positionsDecodeMatrix:qe})}else{const Qe=`${a}-${U}`,Ce=S[U];v[Ce];const Le={};o.createMesh(mt.apply(Le,{id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:fe,indices:Me,edgeIndices:Se,positionsDecodeMatrix:qe,color:W,opacity:Y}))}}let R=0;for(let F=0;F<T;F++){const U=T-1,q=F===U,V=v[F],W=b[F],Y=q?b[U]:b[F+1],$=[];for(let fe=W;fe<Y;fe++){const Me=y[fe];if(B[Me]>1){const Se={},qe=`${a}-instance.${R++}`,Qe=`${a}-geometry.${Me}`,Ce=x[F]*16,Le=h.subarray(Ce,Ce+16);o.createMesh(mt.apply(Se,{id:qe,geometryId:Qe,matrix:Le})),$.push(qe)}else $.push(Me)}if($.length>0){const fe={};o.createEntity(mt.apply(fe,{id:V,isObject:!0,meshIds:$}))}}}const wte={version:4,parse:function(t,e,i,o,r,n){const a=mNt(i),s=vNt(a);bNt(t,e,s,o,r,n)}};let pn=window.pako||Es;pn.inflate||(pn=pn.default);function wNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],matrices:t[4],eachPrimitivePositionsAndNormalsPortion:t[5],eachPrimitiveIndicesPortion:t[6],eachPrimitiveEdgeIndicesPortion:t[7],eachPrimitiveColor:t[8],primitiveInstances:t[9],eachEntityId:t[10],eachEntityPrimitiveInstancesPortion:t[11],eachEntityMatricesPortion:t[12]}}function CNt(t){return{positions:new Float32Array(pn.inflate(t.positions).buffer),normals:new Int8Array(pn.inflate(t.normals).buffer),indices:new Uint32Array(pn.inflate(t.indices).buffer),edgeIndices:new Uint32Array(pn.inflate(t.edgeIndices).buffer),matrices:new Float32Array(pn.inflate(t.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(pn.inflate(t.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(pn.inflate(t.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(pn.inflate(t.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(pn.inflate(t.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(pn.inflate(t.primitiveInstances).buffer),eachEntityId:pn.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(pn.inflate(t.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(pn.inflate(t.eachEntityMatricesPortion).buffer)}}const xNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function kNt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="disabled",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.matrices,h=i.eachPrimitivePositionsAndNormalsPortion,p=i.eachPrimitiveIndicesPortion,A=i.eachPrimitiveEdgeIndicesPortion,f=i.eachPrimitiveColor,m=i.primitiveInstances,g=JSON.parse(i.eachEntityId),y=i.eachEntityPrimitiveInstancesPortion,v=i.eachEntityMatricesPortion,b=h.length,x=m.length,k=new Uint8Array(b),E=g.length;for(let T=0;T<x;T++){const S=m[T];k[S]++}const B={};for(let T=0;T<E;T++){const S=E-1,R=T===S,F=y[T],U=R?y[S]:y[T+1];for(let q=F;q<U;q++){const V=m[q];k[V]>1||(B[V]=T)}}for(let T=0;T<b;T++){const S=T===b-1,R=k[T]>1,F=xNt(f.subarray(T*4,T*4+3)),U=f[T*4+3]/255,q=s.subarray(h[T],S?s.length:h[T+1]),V=l.subarray(h[T],S?l.length:h[T+1]),W=c.subarray(p[T],S?c.length:p[T+1]),Y=d.subarray(A[T],S?d.length:A[T+1]);if(R){const $=`${a}-geometry.${T}`;o.createGeometry({id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y})}else{const $=T,fe=B[T];g[fe];const Me={};o.createMesh(mt.apply(Me,{id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y,color:F,opacity:U}))}}let P=0;for(let T=0;T<E;T++){const S=E-1,R=T===S,F=g[T],U=y[T],q=R?y[S]:y[T+1],V=[];for(let W=U;W<q;W++){const Y=m[W];if(k[Y]>1){const $={},fe="instance."+P++,Me="geometry"+Y,Se=v[T]*16,qe=u.subarray(Se,Se+16);o.createMesh(mt.apply($,{id:fe,geometryId:Me,matrix:qe})),V.push(fe)}else V.push(Y)}if(V.length>0){const W={};o.createEntity(mt.apply(W,{id:F,isObject:!0,meshIds:V}))}}}const Cte={version:5,parse:function(t,e,i,o,r,n){const a=wNt(i),s=CNt(a);kNt(t,e,s,o,r,n)}};let W3=window.pako||Es;W3.inflate||(W3=W3.default);function MNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],matrices:t[4],reusedPrimitivesDecodeMatrix:t[5],eachPrimitivePositionsAndNormalsPortion:t[6],eachPrimitiveIndicesPortion:t[7],eachPrimitiveEdgeIndicesPortion:t[8],eachPrimitiveColorAndOpacity:t[9],primitiveInstances:t[10],eachEntityId:t[11],eachEntityPrimitiveInstancesPortion:t[12],eachEntityMatricesPortion:t[13],eachTileAABB:t[14],eachTileEntitiesPortion:t[15]}}function ENt(t){function e(i,o){return i.length===0?[]:W3.inflate(i,o).buffer}return{positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(e(t.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(e(t.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(e(t.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(e(t.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(e(t.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(e(t.primitiveInstances)),eachEntityId:W3.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(e(t.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(e(t.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const BNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function PNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.matrices,h=i.reusedPrimitivesDecodeMatrix,p=i.eachPrimitivePositionsAndNormalsPortion,A=i.eachPrimitiveIndicesPortion,f=i.eachPrimitiveEdgeIndicesPortion,m=i.eachPrimitiveColorAndOpacity,g=i.primitiveInstances,y=JSON.parse(i.eachEntityId),v=i.eachEntityPrimitiveInstancesPortion,b=i.eachEntityMatricesPortion,x=i.eachTileAABB,k=i.eachTileEntitiesPortion,E=p.length,B=g.length,P=y.length,T=k.length,S=new Uint32Array(E);for(let U=0;U<B;U++){const q=g[U];S[q]!==void 0?S[q]++:S[q]=1}const R=C.vec3(),F=C.AABB3();for(let U=0;U<T;U++){const q=T-1,V=U===q,W=k[U],Y=V?P:k[U+1],$=U*6,fe=x.subarray($,$+6);C.getAABB3Center(fe,R),F[0]=fe[0]-R[0],F[1]=fe[1]-R[1],F[2]=fe[2]-R[2],F[3]=fe[3]-R[0],F[4]=fe[4]-R[1],F[5]=fe[5]-R[2];const Me=Jt.createPositionsDecodeMatrix(F),Se={};for(let qe=W;qe<Y;qe++){const Qe=y[qe],Ce=e.globalizeObjectIds?C.globalizeObjectId(o.id,Qe):Qe,Le=b[qe],Fe=u.slice(Le,Le+16),ve=P-1,me=qe===ve,we=v[qe],Re=me?g.length:v[qe+1],We=[],H=t.metaScene.metaObjects[Ce],ee={},ae={};if(H){if(e.excludeTypesMap&&H.type&&e.excludeTypesMap[H.type]||e.includeTypesMap&&H.type&&!e.includeTypesMap[H.type]||e.includeIdsMap&&H.id&&!e.includeIdsMap[H.id])continue;const Ee=e.objectDefaults?e.objectDefaults[H.type]||e.objectDefaults.DEFAULT:null;Ee&&(Ee.visible===!1&&(ee.visible=!1),Ee.pickable===!1&&(ee.pickable=!1),Ee.colorize&&(ae.color=Ee.colorize),Ee.opacity!==void 0&&Ee.opacity!==null&&(ae.opacity=Ee.opacity))}else if(e.excludeUnclassifiedObjects)continue;for(let Ee=we;Ee<Re;Ee++){const pe=g[Ee],Q=S[pe]>1,Z=pe===E-1,ie=s.subarray(p[pe],Z?s.length:p[pe+1]),re=l.subarray(p[pe],Z?l.length:p[pe+1]),ne=c.subarray(A[pe],Z?c.length:A[pe+1]),G=d.subarray(f[pe],Z?d.length:f[pe+1]),J=BNt(m.subarray(pe*4,pe*4+3)),ue=m[pe*4+3]/255,xe=n.getNextId();if(Q){const oe=`${a}-geometry.${U}.${pe}`;Se[oe]||(o.createGeometry({id:oe,primitive:"triangles",positionsCompressed:ie,indices:ne,edgeIndices:G,positionsDecodeMatrix:h}),Se[oe]=!0),o.createMesh(mt.apply(ae,{id:xe,geometryId:oe,origin:R,matrix:Fe,color:J,opacity:ue})),We.push(xe)}else o.createMesh(mt.apply(ae,{id:xe,origin:R,primitive:"triangles",positionsCompressed:ie,normalsCompressed:re,indices:ne,edgeIndices:G,positionsDecodeMatrix:Me,color:J,opacity:ue})),We.push(xe)}We.length>0&&o.createEntity(mt.apply(ee,{id:Ce,isObject:!0,meshIds:We}))}}}const xte={version:6,parse:function(t,e,i,o,r,n){const a=MNt(i),s=ENt(a);PNt(t,e,s,o,r,n)}};let Y3=window.pako||Es;Y3.inflate||(Y3=Y3.default);function INt(t){return{positions:t[0],normals:t[1],colors:t[2],indices:t[3],edgeIndices:t[4],matrices:t[5],reusedGeometriesDecodeMatrix:t[6],eachGeometryPrimitiveType:t[7],eachGeometryPositionsPortion:t[8],eachGeometryNormalsPortion:t[9],eachGeometryColorsPortion:t[10],eachGeometryIndicesPortion:t[11],eachGeometryEdgeIndicesPortion:t[12],eachMeshGeometriesPortion:t[13],eachMeshMatricesPortion:t[14],eachMeshMaterial:t[15],eachEntityId:t[16],eachEntityMeshesPortion:t[17],eachTileAABB:t[18],eachTileEntitiesPortion:t[19]}}function SNt(t){function e(i,o){return i.length===0?[]:Y3.inflate(i,o).buffer}return{positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityId:Y3.inflate(t.eachEntityId,{to:"string"}),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const TNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function kte(t){const e=[];for(let i=0,o=t.length;i<o;i+=3)e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]),e.push(1);return e}function DNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.positions,l=i.normals,c=i.colors,d=i.indices,u=i.edgeIndices,h=i.matrices,p=i.reusedGeometriesDecodeMatrix,A=i.eachGeometryPrimitiveType,f=i.eachGeometryPositionsPortion,m=i.eachGeometryNormalsPortion,g=i.eachGeometryColorsPortion,y=i.eachGeometryIndicesPortion,v=i.eachGeometryEdgeIndicesPortion,b=i.eachMeshGeometriesPortion,x=i.eachMeshMatricesPortion,k=i.eachMeshMaterial,E=JSON.parse(i.eachEntityId),B=i.eachEntityMeshesPortion,P=i.eachTileAABB,T=i.eachTileEntitiesPortion,S=f.length,R=b.length,F=E.length,U=T.length,q=new Uint32Array(S);for(let Y=0;Y<R;Y++){const $=b[Y];q[$]!==void 0?q[$]++:q[$]=1}const V=C.vec3(),W=C.AABB3();for(let Y=0;Y<U;Y++){const $=U-1,fe=Y===$,Me=T[Y],Se=fe?F:T[Y+1],qe=Y*6,Qe=P.subarray(qe,qe+6);C.getAABB3Center(Qe,V),W[0]=Qe[0]-V[0],W[1]=Qe[1]-V[1],W[2]=Qe[2]-V[2],W[3]=Qe[3]-V[0],W[4]=Qe[4]-V[1],W[5]=Qe[5]-V[2];const Ce=Jt.createPositionsDecodeMatrix(W),Le={};for(let Fe=Me;Fe<Se;Fe++){const ve=E[Fe],me=e.globalizeObjectIds?C.globalizeObjectId(o.id,ve):ve,we=F-1,Re=Fe===we,We=B[Fe],H=Re?b.length:B[Fe+1],ee=[],ae=t.metaScene.metaObjects[me],Ee={},pe={};if(ae){if(e.excludeTypesMap&&ae.type&&e.excludeTypesMap[ae.type]||e.includeTypesMap&&ae.type&&!e.includeTypesMap[ae.type]||e.includeIdsMap&&ae.id&&!e.includeIdsMap[ae.id])continue;const Q=e.objectDefaults?e.objectDefaults[ae.type]||e.objectDefaults.DEFAULT:null;Q&&(Q.visible===!1&&(Ee.visible=!1),Q.pickable===!1&&(Ee.pickable=!1),Q.colorize&&(pe.color=Q.colorize),Q.opacity!==void 0&&Q.opacity!==null&&(pe.opacity=Q.opacity),Q.metallic!==void 0&&Q.metallic!==null&&(pe.metallic=Q.metallic),Q.roughness!==void 0&&Q.roughness!==null&&(pe.roughness=Q.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let Q=We;Q<H;Q++){const Z=b[Q],ie=q[Z]>1,re=Z===S-1,ne=TNt(k.subarray(Q*6,Q*6+3)),G=k[Q*6+3]/255,J=k[Q*6+4]/255,ue=k[Q*6+5]/255,xe=n.getNextId();if(ie){const oe=x[Q],Be=h.slice(oe,oe+16),je=`${a}-geometry.${Y}.${Z}`;if(!Le[je]){const he=A[Z];let Ne,Pe,He,rt,At,ft;switch(he){case 0:Ne="solid",Pe=s.subarray(f[Z],re?s.length:f[Z+1]),He=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Ne="surface",Pe=s.subarray(f[Z],re?s.length:f[Z+1]),He=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Ne="points",Pe=s.subarray(f[Z],re?s.length:f[Z+1]),rt=kte(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Ne="lines",Pe=s.subarray(f[Z],re?s.length:f[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createGeometry({id:je,primitive:Ne,positionsCompressed:Pe,normalsCompressed:He,colors:rt,indices:At,edgeIndices:ft,positionsDecodeMatrix:p}),Le[je]=!0}o.createMesh(mt.apply(pe,{id:xe,geometryId:je,origin:V,matrix:Be,color:ne,metallic:J,roughness:ue,opacity:G})),ee.push(xe)}else{const oe=A[Z];let Be,je,he,Ne,Pe,He;switch(oe){case 0:Be="solid",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Pe=d.subarray(y[Z],re?d.length:y[Z+1]),He=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Be="surface",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Pe=d.subarray(y[Z],re?d.length:y[Z+1]),He=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Be="points",je=s.subarray(f[Z],re?s.length:f[Z+1]),Ne=kte(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Be="lines",je=s.subarray(f[Z],re?s.length:f[Z+1]),Pe=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createMesh(mt.apply(pe,{id:xe,origin:V,primitive:Be,positionsCompressed:je,normalsCompressed:he,colors:Ne,indices:Pe,edgeIndices:He,positionsDecodeMatrix:Ce,color:ne,metallic:J,roughness:ue,opacity:G})),ee.push(xe)}}ee.length>0&&o.createEntity(mt.apply(Ee,{id:me,isObject:!0,meshIds:ee}))}}}const Mte={version:7,parse:function(t,e,i,o,r,n){const a=INt(i),s=SNt(a);DNt(t,e,s,o,r,n)}};let Bh=window.pako||Es;Bh.inflate||(Bh=Bh.default);const xc=C.vec4(),Ete=C.vec4();function RNt(t){return{types:t[0],eachMetaObjectId:t[1],eachMetaObjectType:t[2],eachMetaObjectName:t[3],eachMetaObjectParent:t[4],positions:t[5],normals:t[6],colors:t[7],indices:t[8],edgeIndices:t[9],matrices:t[10],reusedGeometriesDecodeMatrix:t[11],eachGeometryPrimitiveType:t[12],eachGeometryPositionsPortion:t[13],eachGeometryNormalsPortion:t[14],eachGeometryColorsPortion:t[15],eachGeometryIndicesPortion:t[16],eachGeometryEdgeIndicesPortion:t[17],eachMeshGeometriesPortion:t[18],eachMeshMatricesPortion:t[19],eachMeshMaterial:t[20],eachEntityMetaObject:t[21],eachEntityMeshesPortion:t[22],eachTileAABB:t[23],eachTileEntitiesPortion:t[24]}}function LNt(t){function e(i,o){return i.length===0?[]:Bh.inflate(i,o).buffer}return{types:Bh.inflate(t.types,{to:"string"}),eachMetaObjectId:Bh.inflate(t.eachMetaObjectId,{to:"string"}),eachMetaObjectType:new Uint32Array(e(t.eachMetaObjectType)),eachMetaObjectName:Bh.inflate(t.eachMetaObjectName,{to:"string"}),eachMetaObjectParent:new Uint32Array(e(t.eachMetaObjectParent)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityMetaObject:new Uint32Array(e(t.eachEntityMetaObject)),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const _Nt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function Bte(t){const e=[];for(let i=0,o=t.length;i<o;i+=3)e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]),e.push(1);return e}function FNt(t,e,i,o,r,n){const a=n.getNextId(),s=JSON.parse(i.types),l=JSON.parse(i.eachMetaObjectId),c=i.eachMetaObjectType,d=JSON.parse(i.eachMetaObjectName),u=i.eachMetaObjectParent,h=i.positions,p=i.normals,A=i.colors,f=i.indices,m=i.edgeIndices,g=i.matrices,y=i.reusedGeometriesDecodeMatrix,v=i.eachGeometryPrimitiveType,b=i.eachGeometryPositionsPortion,x=i.eachGeometryNormalsPortion,k=i.eachGeometryColorsPortion,E=i.eachGeometryIndicesPortion,B=i.eachGeometryEdgeIndicesPortion,P=i.eachMeshGeometriesPortion,T=i.eachMeshMatricesPortion,S=i.eachMeshMaterial,R=i.eachEntityMetaObject,F=i.eachEntityMeshesPortion,U=i.eachTileAABB,q=i.eachTileEntitiesPortion,V=l.length,W=b.length,Y=P.length,$=R.length,fe=q.length;if(r){const Ce={metaObjects:[]};for(let Le=0;Le<V;Le++){const Fe=l[Le],ve=c[Le],me=s[ve]||"default",we=d[Le],Re=u[Le],We=Re!==Le?l[Re]:null;Ce.metaObjects.push({id:Fe,type:me,name:we,parent:We})}r.loadData(Ce,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds})}const Me=new Uint32Array(W);for(let Ce=0;Ce<Y;Ce++){const Le=P[Ce];Me[Le]!==void 0?Me[Le]++:Me[Le]=1}const Se=C.vec3(),qe=C.AABB3(),Qe={};for(let Ce=0;Ce<fe;Ce++){const Le=fe-1,Fe=Ce===Le,ve=q[Ce],me=Fe?$:q[Ce+1],we=Ce*6,Re=U.subarray(we,we+6);C.getAABB3Center(Re,Se),qe[0]=Re[0]-Se[0],qe[1]=Re[1]-Se[1],qe[2]=Re[2]-Se[2],qe[3]=Re[3]-Se[0],qe[4]=Re[4]-Se[1],qe[5]=Re[5]-Se[2];const We=Jt.createPositionsDecodeMatrix(qe),H={};for(let ee=ve;ee<me;ee++){const ae=R[ee],Ee=l[ae],pe=e.globalizeObjectIds?C.globalizeObjectId(o.id,Ee):Ee,Q=$-1,Z=ee===Q,ie=F[ee],re=Z?P.length:F[ee+1],ne=[],G=t.metaScene.metaObjects[pe],J={},ue={};if(G){if(e.excludeTypesMap&&G.type&&e.excludeTypesMap[G.type]||e.includeTypesMap&&G.type&&!e.includeTypesMap[G.type]||e.includeIdsMap&&G.id&&!e.includeIdsMap[G.id])continue;const xe=e.objectDefaults?e.objectDefaults[G.type]||e.objectDefaults.DEFAULT:null;xe&&(xe.visible===!1&&(J.visible=!1),xe.pickable===!1&&(J.pickable=!1),xe.colorize&&(ue.color=xe.colorize),xe.opacity!==void 0&&xe.opacity!==null&&(ue.opacity=xe.opacity),xe.metallic!==void 0&&xe.metallic!==null&&(ue.metallic=xe.metallic),xe.roughness!==void 0&&xe.roughness!==null&&(ue.roughness=xe.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let xe=ie;xe<re;xe++){const oe=P[xe],Be=Me[oe]>1,je=oe===W-1,he=_Nt(S.subarray(xe*6,xe*6+3)),Ne=S[xe*6+3]/255,Pe=S[xe*6+4]/255,He=S[xe*6+5]/255,rt=n.getNextId();if(Be){const At=T[xe],ft=g.slice(At,At+16),ct=`${a}-geometry.${Ce}.${oe}`;let ut=Qe[ct];if(!ut){ut={batchThisMesh:!e.reuseGeometries};const Te=v[oe];let st=!1;switch(Te){case 0:ut.primitiveName="solid",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),ut.geometryEdgeIndices=m.subarray(B[oe],je?m.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 1:ut.primitiveName="surface",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),ut.geometryEdgeIndices=m.subarray(B[oe],je?m.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 2:ut.primitiveName="points",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryColors=Bte(A.subarray(k[oe],je?A.length:k[oe+1])),st=ut.geometryPositions.length>0;break;case 3:ut.primitiveName="lines",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;default:continue}if(st||(ut=null),ut&&(ut.geometryPositions.length>1e3,ut.batchThisMesh)){ut.decompressedPositions=new Float32Array(ut.geometryPositions.length);const dt=ut.geometryPositions,Ye=ut.decompressedPositions;for(let Ae=0,be=dt.length;Ae<be;Ae+=3)Ye[Ae+0]=dt[Ae+0]*y[0]+y[12],Ye[Ae+1]=dt[Ae+1]*y[5]+y[13],Ye[Ae+2]=dt[Ae+2]*y[10]+y[14];ut.geometryPositions=null,Qe[ct]=ut}}if(ut)if(ut.batchThisMesh){const Te=ut.decompressedPositions,st=new Uint16Array(Te.length);for(let dt=0,Ye=Te.length;dt<Ye;dt+=3)xc[0]=Te[dt+0],xc[1]=Te[dt+1],xc[2]=Te[dt+2],xc[3]=1,C.transformVec4(ft,xc,Ete),Jt.compressPosition(Ete,qe,xc),st[dt+0]=xc[0],st[dt+1]=xc[1],st[dt+2]=xc[2];o.createMesh(mt.apply(ue,{id:rt,origin:Se,primitive:ut.primitiveName,positionsCompressed:st,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:We,color:he,metallic:Pe,roughness:He,opacity:Ne})),ne.push(rt)}else H[ct]||(o.createGeometry({id:ct,primitive:ut.primitiveName,positionsCompressed:ut.geometryPositions,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:y}),H[ct]=!0),o.createMesh(mt.apply(ue,{id:rt,geometryId:ct,origin:Se,matrix:ft,color:he,metallic:Pe,roughness:He,opacity:Ne})),ne.push(rt)}else{const At=v[oe];let ft,ct,ut,Te,st,dt,Ye=!1;switch(At){case 0:ft="solid",ct=h.subarray(b[oe],je?h.length:b[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),dt=m.subarray(B[oe],je?m.length:B[oe+1]),Ye=ct.length>0&&st.length>0;break;case 1:ft="surface",ct=h.subarray(b[oe],je?h.length:b[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),dt=m.subarray(B[oe],je?m.length:B[oe+1]),Ye=ct.length>0&&st.length>0;break;case 2:ft="points",ct=h.subarray(b[oe],je?h.length:b[oe+1]),Te=Bte(A.subarray(k[oe],je?A.length:k[oe+1])),Ye=ct.length>0;break;case 3:ft="lines",ct=h.subarray(b[oe],je?h.length:b[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),Ye=ct.length>0&&st.length>0;break;default:continue}Ye&&(o.createMesh(mt.apply(ue,{id:rt,origin:Se,primitive:ft,positionsCompressed:ct,normalsCompressed:ut,colorsCompressed:Te,indices:st,edgeIndices:dt,positionsDecodeMatrix:We,color:he,metallic:Pe,roughness:He,opacity:Ne})),ne.push(rt))}}ne.length>0&&o.createEntity(mt.apply(J,{id:pe,isObject:!0,meshIds:ne}))}}}const Pte={version:8,parse:function(t,e,i,o,r,n){const a=RNt(i),s=LNt(a);FNt(t,e,s,o,r,n)}};let Y1=window.pako||Es;Y1.inflate||(Y1=Y1.default);const kc=C.vec4(),Ite=C.vec4();function ONt(t){return{metadata:t[0],positions:t[1],normals:t[2],colors:t[3],indices:t[4],edgeIndices:t[5],matrices:t[6],reusedGeometriesDecodeMatrix:t[7],eachGeometryPrimitiveType:t[8],eachGeometryPositionsPortion:t[9],eachGeometryNormalsPortion:t[10],eachGeometryColorsPortion:t[11],eachGeometryIndicesPortion:t[12],eachGeometryEdgeIndicesPortion:t[13],eachMeshGeometriesPortion:t[14],eachMeshMatricesPortion:t[15],eachMeshMaterial:t[16],eachEntityId:t[17],eachEntityMeshesPortion:t[18],eachTileAABB:t[19],eachTileEntitiesPortion:t[20]}}function UNt(t){function e(i,o){return i.length===0?[]:Y1.inflate(i,o).buffer}return{metadata:JSON.parse(Y1.inflate(t.metadata,{to:"string"})),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityId:JSON.parse(Y1.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const NNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function jNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.positions,c=i.normals,d=i.colors,u=i.indices,h=i.edgeIndices,p=i.matrices,A=i.reusedGeometriesDecodeMatrix,f=i.eachGeometryPrimitiveType,m=i.eachGeometryPositionsPortion,g=i.eachGeometryNormalsPortion,y=i.eachGeometryColorsPortion,v=i.eachGeometryIndicesPortion,b=i.eachGeometryEdgeIndicesPortion,x=i.eachMeshGeometriesPortion,k=i.eachMeshMatricesPortion,E=i.eachMeshMaterial,B=i.eachEntityId,P=i.eachEntityMeshesPortion,T=i.eachTileAABB,S=i.eachTileEntitiesPortion,R=m.length,F=x.length,U=P.length,q=S.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});const V=new Uint32Array(R);for(let fe=0;fe<F;fe++){const Me=x[fe];V[Me]!==void 0?V[Me]++:V[Me]=1}const W=C.vec3(),Y=C.AABB3(),$={};for(let fe=0;fe<q;fe++){const Me=q-1,Se=fe===Me,qe=S[fe],Qe=Se?U-1:S[fe+1]-1,Ce=fe*6,Le=T.subarray(Ce,Ce+6);C.getAABB3Center(Le,W),Y[0]=Le[0]-W[0],Y[1]=Le[1]-W[1],Y[2]=Le[2]-W[2],Y[3]=Le[3]-W[0],Y[4]=Le[4]-W[1],Y[5]=Le[5]-W[2];const Fe=Jt.createPositionsDecodeMatrix(Y),ve={};for(let me=qe;me<=Qe;me++){const we=B[me],Re=e.globalizeObjectIds?C.globalizeObjectId(o.id,we):we,We=U-1,H=me===We,ee=P[me],ae=H?x.length-1:P[me+1]-1,Ee=[],pe=t.metaScene.metaObjects[Re],Q={},Z={};if(!(e.includeIdsMap&&we&&!e.includeIdsMap[we])){if(pe){if(e.excludeTypesMap&&pe.type&&e.excludeTypesMap[pe.type]||e.includeTypesMap&&pe.type&&!e.includeTypesMap[pe.type]||e.includeIdsMap&&pe.id&&!e.includeIdsMap[pe.id])continue;const ie=e.objectDefaults?e.objectDefaults[pe.type]||e.objectDefaults.DEFAULT:null;ie&&(ie.visible===!1&&(Q.visible=!1),ie.pickable===!1&&(Q.pickable=!1),ie.colorize&&(Z.color=ie.colorize),ie.opacity!==void 0&&ie.opacity!==null&&(Z.opacity=ie.opacity),ie.metallic!==void 0&&ie.metallic!==null&&(Z.metallic=ie.metallic),ie.roughness!==void 0&&ie.roughness!==null&&(Z.roughness=ie.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let ie=ee;ie<=ae;ie++){const re=x[ie],ne=V[re]>1,G=re===R-1,J=NNt(E.subarray(ie*6,ie*6+3)),ue=E[ie*6+3]/255,xe=E[ie*6+4]/255,oe=E[ie*6+5]/255,Be=n.getNextId();if(ne){const je=k[ie],he=p.slice(je,je+16),Ne=`${a}-geometry.${fe}.${re}`;let Pe=$[Ne];if(!Pe){Pe={batchThisMesh:!e.reuseGeometries};const He=f[re];let rt=!1;switch(He){case 0:Pe.primitiveName="solid",Pe.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Pe.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Pe.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Pe.geometryEdgeIndices=h.subarray(b[re],G?h.length:b[re+1]),rt=Pe.geometryPositions.length>0&&Pe.geometryIndices.length>0;break;case 1:Pe.primitiveName="surface",Pe.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Pe.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Pe.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Pe.geometryEdgeIndices=h.subarray(b[re],G?h.length:b[re+1]),rt=Pe.geometryPositions.length>0&&Pe.geometryIndices.length>0;break;case 2:Pe.primitiveName="points",Pe.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Pe.geometryColors=d.subarray(y[re],G?d.length:y[re+1]),rt=Pe.geometryPositions.length>0;break;case 3:Pe.primitiveName="lines",Pe.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Pe.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),rt=Pe.geometryPositions.length>0&&Pe.geometryIndices.length>0;break;default:continue}if(rt||(Pe=null),Pe&&(Pe.geometryPositions.length>1e3,Pe.batchThisMesh)){Pe.decompressedPositions=new Float32Array(Pe.geometryPositions.length),Pe.transformedAndRecompressedPositions=new Uint16Array(Pe.geometryPositions.length);const At=Pe.geometryPositions,ft=Pe.decompressedPositions;for(let ct=0,ut=At.length;ct<ut;ct+=3)ft[ct+0]=At[ct+0]*A[0]+A[12],ft[ct+1]=At[ct+1]*A[5]+A[13],ft[ct+2]=At[ct+2]*A[10]+A[14];Pe.geometryPositions=null,$[Ne]=Pe}}if(Pe)if(Pe.batchThisMesh){const He=Pe.decompressedPositions,rt=Pe.transformedAndRecompressedPositions;for(let At=0,ft=He.length;At<ft;At+=3)kc[0]=He[At+0],kc[1]=He[At+1],kc[2]=He[At+2],kc[3]=1,C.transformVec4(he,kc,Ite),Jt.compressPosition(Ite,Y,kc),rt[At+0]=kc[0],rt[At+1]=kc[1],rt[At+2]=kc[2];o.createMesh(mt.apply(Z,{id:Be,origin:W,primitive:Pe.primitiveName,positionsCompressed:rt,normalsCompressed:Pe.geometryNormals,colorsCompressed:Pe.geometryColors,indices:Pe.geometryIndices,edgeIndices:Pe.geometryEdgeIndices,positionsDecodeMatrix:Fe,color:J,metallic:xe,roughness:oe,opacity:ue})),Ee.push(Be)}else ve[Ne]||(o.createGeometry({id:Ne,primitive:Pe.primitiveName,positionsCompressed:Pe.geometryPositions,normalsCompressed:Pe.geometryNormals,colorsCompressed:Pe.geometryColors,indices:Pe.geometryIndices,edgeIndices:Pe.geometryEdgeIndices,positionsDecodeMatrix:A}),ve[Ne]=!0),o.createMesh(mt.apply(Z,{id:Be,geometryId:Ne,origin:W,matrix:he,color:J,metallic:xe,roughness:oe,opacity:ue})),Ee.push(Be)}else{const je=f[re];let he,Ne,Pe,He,rt,At,ft=!1;switch(je){case 0:he="solid",Ne=l.subarray(m[re],G?l.length:m[re+1]),Pe=c.subarray(g[re],G?c.length:g[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(b[re],G?h.length:b[re+1]),ft=Ne.length>0&&rt.length>0;break;case 1:he="surface",Ne=l.subarray(m[re],G?l.length:m[re+1]),Pe=c.subarray(g[re],G?c.length:g[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(b[re],G?h.length:b[re+1]),ft=Ne.length>0&&rt.length>0;break;case 2:he="points",Ne=l.subarray(m[re],G?l.length:m[re+1]),He=d.subarray(y[re],G?d.length:y[re+1]),ft=Ne.length>0;break;case 3:he="lines",Ne=l.subarray(m[re],G?l.length:m[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),ft=Ne.length>0&&rt.length>0;break;default:continue}ft&&(o.createMesh(mt.apply(Z,{id:Be,origin:W,primitive:he,positionsCompressed:Ne,normalsCompressed:Pe,colorsCompressed:He,indices:rt,edgeIndices:At,positionsDecodeMatrix:Fe,color:J,metallic:xe,roughness:oe,opacity:ue})),Ee.push(Be))}}Ee.length>0&&o.createEntity(mt.apply(Q,{id:Re,isObject:!0,meshIds:Ee}))}}}}const Ste={version:9,parse:function(t,e,i,o,r,n){const a=ONt(i),s=UNt(a);jNt(t,e,s,o,r,n)}};let X1=window.pako||Es;X1.inflate||(X1=X1.default);const Mc=C.vec4(),Tte=C.vec4(),VNt=9;function zNt(t){let e=0;return{metadata:t[e++],textureData:t[e++],eachTextureDataPortion:t[e++],eachTextureAttributes:t[e++],positions:t[e++],normals:t[e++],colors:t[e++],uvs:t[e++],indices:t[e++],edgeIndices:t[e++],eachTextureSetTextures:t[e++],matrices:t[e++],reusedGeometriesDecodeMatrix:t[e++],eachGeometryPrimitiveType:t[e++],eachGeometryPositionsPortion:t[e++],eachGeometryNormalsPortion:t[e++],eachGeometryColorsPortion:t[e++],eachGeometryUVsPortion:t[e++],eachGeometryIndicesPortion:t[e++],eachGeometryEdgeIndicesPortion:t[e++],eachMeshGeometriesPortion:t[e++],eachMeshMatricesPortion:t[e++],eachMeshTextureSet:t[e++],eachMeshMaterialAttributes:t[e++],eachEntityId:t[e++],eachEntityMeshesPortion:t[e++],eachTileAABB:t[e++],eachTileEntitiesPortion:t[e++]}}function HNt(t){function e(i,o){return i.length===0?[]:X1.inflate(i,o).buffer}return{metadata:JSON.parse(X1.inflate(t.metadata,{to:"string"})),textureData:new Uint8Array(e(t.textureData)),eachTextureDataPortion:new Uint32Array(e(t.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(t.eachTextureAttributes)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),uvs:new Float32Array(e(t.uvs)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),eachTextureSetTextures:new Int32Array(e(t.eachTextureSetTextures)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(t.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(t.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(t.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(X1.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const qNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function QNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryPositionsPortion,k=i.eachGeometryNormalsPortion,E=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,T=i.eachGeometryEdgeIndicesPortion,S=i.eachMeshGeometriesPortion,R=i.eachMeshMatricesPortion,F=i.eachMeshTextureSet,U=i.eachMeshMaterialAttributes,q=i.eachEntityId,V=i.eachEntityMeshesPortion,W=i.eachTileAABB,Y=i.eachTileEntitiesPortion,$=c.length,fe=g.length/5,Me=x.length,Se=S.length,qe=V.length,Qe=Y.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let me=0;me<$;me++){const we=me===$-1,Re=c[me],We=we?l.length:c[me+1],H=We-Re>0,ee=me*VNt,ae=d[ee+0]===1,Ee=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Re,We)).buffer,G=`${a}-texture-${me}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const J=Ee===E7?"image/jpeg":Ee===B7?"image/png":"image/gif",ue=new Blob([ne],{type:J}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let me=0;me<fe;me++){const we=me*5,Re=`${a}-textureSet-${me}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Ee=g[we+4];o.createTextureSet({id:Re,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Ee>=0?`${a}-texture-${Ee}`:null})}const Ce=new Uint32Array(Me);for(let me=0;me<Se;me++){const we=S[me];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const Le=C.vec3(),Fe=C.AABB3(),ve={};for(let me=0;me<Qe;me++){const we=Qe-1,Re=me===we,We=Y[me],H=Re?qe-1:Y[me+1]-1,ee=me*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,Le),Fe[0]=ae[0]-Le[0],Fe[1]=ae[1]-Le[1],Fe[2]=ae[2]-Le[2],Fe[3]=ae[3]-Le[0],Fe[4]=ae[4]-Le[1],Fe[5]=ae[5]-Le[2];const Ee=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],J=ne?S.length-1:V[Q+1]-1,ue=[],xe=t.metaScene.metaObjects[ie],oe={},Be={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Be.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Be.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Be.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Be.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=J;je++){const he=S[je],Ne=Ce[he]>1,Pe=he===Me-1,He=F[je],rt=He>=0?`${a}-textureSet-${He}`:null,At=qNt(U.subarray(je*6,je*6+3)),ft=U[je*6+3]/255,ct=U[je*6+4]/255,ut=U[je*6+5]/255,Te=n.getNextId();if(Ne){const st=R[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${me}.${he}`;let Ae=ve[Ye];if(!Ae){Ae={batchThisMesh:!e.reuseGeometries};const be=b[he];let $e=!1;switch(be){case 0:Ae.primitiveName="solid",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryNormals=h.subarray(k[he],Pe?h.length:k[he+1]),Ae.geometryUVs=A.subarray(B[he],Pe?A.length:B[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),Ae.geometryEdgeIndices=m.subarray(T[he],Pe?m.length:T[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 1:Ae.primitiveName="surface",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryNormals=h.subarray(k[he],Pe?h.length:k[he+1]),Ae.geometryUVs=A.subarray(B[he],Pe?A.length:B[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),Ae.geometryEdgeIndices=m.subarray(T[he],Pe?m.length:T[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 2:Ae.primitiveName="points",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryColors=p.subarray(E[he],Pe?p.length:E[he+1]),$e=Ae.geometryPositions.length>0;break;case 3:Ae.primitiveName="lines",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 4:Ae.primitiveName="lines",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryIndices=Dte(Ae.geometryPositions,f.subarray(P[he],Pe?f.length:P[he+1])),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;default:continue}if($e||(Ae=null),Ae&&(Ae.geometryPositions.length>1e3,Ae.batchThisMesh)){Ae.decompressedPositions=new Float32Array(Ae.geometryPositions.length),Ae.transformedAndRecompressedPositions=new Uint16Array(Ae.geometryPositions.length);const ht=Ae.geometryPositions,St=Ae.decompressedPositions;for(let xt=0,yi=ht.length;xt<yi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];Ae.geometryPositions=null,ve[Ye]=Ae}}if(Ae)if(Ae.batchThisMesh){const be=Ae.decompressedPositions,$e=Ae.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)Mc[0]=be[ht+0],Mc[1]=be[ht+1],Mc[2]=be[ht+2],Mc[3]=1,C.transformVec4(dt,Mc,Tte),Jt.compressPosition(Tte,Fe,Mc),$e[ht+0]=Mc[0],$e[ht+1]=Mc[1],$e[ht+2]=Mc[2];o.createMesh(mt.apply(Be,{id:Te,textureSetId:rt,origin:Le,primitive:Ae.primitiveName,positionsCompressed:$e,normalsCompressed:Ae.geometryNormals,uv:Ae.geometryUVs,colorsCompressed:Ae.geometryColors,indices:Ae.geometryIndices,edgeIndices:Ae.geometryEdgeIndices,positionsDecodeMatrix:Ee,color:At,metallic:ct,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:Ae.primitiveName,positionsCompressed:Ae.geometryPositions,normalsCompressed:Ae.geometryNormals,uv:Ae.geometryUVs,colorsCompressed:Ae.geometryColors,indices:Ae.geometryIndices,edgeIndices:Ae.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Be,{id:Te,geometryId:Ye,textureSetId:rt,matrix:dt,color:At,metallic:ct,roughness:ut,opacity:ft,origin:Le})),ue.push(Te)}else{const st=b[he];let dt,Ye,Ae,be,$e,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),Ae=h.subarray(k[he],Pe?h.length:k[he+1]),be=A.subarray(B[he],Pe?A.length:B[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),St=m.subarray(T[he],Pe?m.length:T[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),Ae=h.subarray(k[he],Pe?h.length:k[he+1]),be=A.subarray(B[he],Pe?A.length:B[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),St=m.subarray(T[he],Pe?m.length:T[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),$e=p.subarray(E[he],Pe?p.length:E[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),ht=Dte(Ye,f.subarray(P[he],Pe?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Be,{id:Te,textureSetId:rt,origin:Le,primitive:dt,positionsCompressed:Ye,normalsCompressed:Ae,uv:be&&be.length>0?be:null,colorsCompressed:$e,indices:ht,edgeIndices:St,positionsDecodeMatrix:Ee,color:At,metallic:ct,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function Dte(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const Rte={version:10,parse:function(t,e,i,o,r,n){const a=zNt(i),s=HNt(a);QNt(t,e,s,o,r,n)}},Ec=C.vec4(),Lte=C.vec4(),GNt=9;function KNt(t){const e=(function(){const r=new ArrayBuffer(2);return new Uint16Array(r)[0]=1,new Uint8Array(r)[0]!==1})(),i=(function(){let r=0;const n=new DataView(t);return function(a){const s=1+2*r++,l=n.getUint32(s*4,!0),c=n.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(t,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(t,l,c/d)}})(),o=(function(){const r=new TextDecoder;return()=>JSON.parse(r.decode(i(Uint8Array)))})();return{metadata:o(),textureData:i(Uint8Array),eachTextureDataPortion:i(Uint32Array),eachTextureAttributes:i(Uint16Array),positions:i(Uint16Array),normals:i(Int8Array),colors:i(Uint8Array),uvs:i(Float32Array),indices:i(Uint32Array),edgeIndices:i(Uint32Array),eachTextureSetTextures:i(Int32Array),matrices:i(Float32Array),reusedGeometriesDecodeMatrix:i(Float32Array),eachGeometryPrimitiveType:i(Uint8Array),eachGeometryPositionsPortion:i(Uint32Array),eachGeometryNormalsPortion:i(Uint32Array),eachGeometryColorsPortion:i(Uint32Array),eachGeometryUVsPortion:i(Uint32Array),eachGeometryIndicesPortion:i(Uint32Array),eachGeometryEdgeIndicesPortion:i(Uint32Array),eachMeshGeometriesPortion:i(Uint32Array),eachMeshMatricesPortion:i(Uint32Array),eachMeshTextureSet:i(Int32Array),eachMeshMaterialAttributes:i(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:i(Uint32Array),eachTileAABB:i(Float64Array),eachTileEntitiesPortion:i(Uint32Array)}}const JNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function ZNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryPositionsPortion,k=i.eachGeometryNormalsPortion,E=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,T=i.eachGeometryEdgeIndicesPortion,S=i.eachMeshGeometriesPortion,R=i.eachMeshMatricesPortion,F=i.eachMeshTextureSet,U=i.eachMeshMaterialAttributes,q=i.eachEntityId,V=i.eachEntityMeshesPortion,W=i.eachTileAABB,Y=i.eachTileEntitiesPortion,$=c.length,fe=g.length/5,Me=x.length,Se=S.length,qe=V.length,Qe=Y.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let me=0;me<$;me++){const we=me===$-1,Re=c[me],We=we?l.length:c[me+1],H=We-Re>0,ee=me*GNt,ae=d[ee+0]===1,Ee=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Re,We)).buffer,G=`${a}-texture-${me}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const J=Ee===E7?"image/jpeg":Ee===B7?"image/png":"image/gif",ue=new Blob([ne],{type:J}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let me=0;me<fe;me++){const we=me*5,Re=`${a}-textureSet-${me}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Ee=g[we+4];o.createTextureSet({id:Re,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Ee>=0?`${a}-texture-${Ee}`:null})}const Ce=new Uint32Array(Me);for(let me=0;me<Se;me++){const we=S[me];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const Le=C.vec3(),Fe=C.AABB3(),ve={};for(let me=0;me<Qe;me++){const we=Qe-1,Re=me===we,We=Y[me],H=Re?qe-1:Y[me+1]-1,ee=me*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,Le),Fe[0]=ae[0]-Le[0],Fe[1]=ae[1]-Le[1],Fe[2]=ae[2]-Le[2],Fe[3]=ae[3]-Le[0],Fe[4]=ae[4]-Le[1],Fe[5]=ae[5]-Le[2];const Ee=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],J=ne?S.length-1:V[Q+1]-1,ue=[],xe=t.metaScene.metaObjects[ie],oe={},Be={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Be.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Be.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Be.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Be.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=J;je++){const he=S[je],Ne=Ce[he]>1,Pe=he===Me-1,He=F[je],rt=He>=0?`${a}-textureSet-${He}`:null,At=JNt(U.subarray(je*6,je*6+3)),ft=U[je*6+3]/255,ct=U[je*6+4]/255,ut=U[je*6+5]/255,Te=n.getNextId();if(Ne){const st=R[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${me}.${he}`;let Ae=ve[Ye];if(!Ae){Ae={batchThisMesh:!e.reuseGeometries};const be=b[he];let $e=!1;switch(be){case 0:Ae.primitiveName="solid",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryNormals=h.subarray(k[he],Pe?h.length:k[he+1]),Ae.geometryUVs=A.subarray(B[he],Pe?A.length:B[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),Ae.geometryEdgeIndices=m.subarray(T[he],Pe?m.length:T[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 1:Ae.primitiveName="surface",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryNormals=h.subarray(k[he],Pe?h.length:k[he+1]),Ae.geometryUVs=A.subarray(B[he],Pe?A.length:B[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),Ae.geometryEdgeIndices=m.subarray(T[he],Pe?m.length:T[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 2:Ae.primitiveName="points",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryColors=p.subarray(E[he],Pe?p.length:E[he+1]),$e=Ae.geometryPositions.length>0;break;case 3:Ae.primitiveName="lines",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 4:Ae.primitiveName="lines",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryIndices=_te(Ae.geometryPositions,f.subarray(P[he],Pe?f.length:P[he+1])),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;default:continue}if($e||(Ae=null),Ae&&(Ae.geometryPositions.length>1e3,Ae.batchThisMesh)){Ae.decompressedPositions=new Float32Array(Ae.geometryPositions.length),Ae.transformedAndRecompressedPositions=new Uint16Array(Ae.geometryPositions.length);const ht=Ae.geometryPositions,St=Ae.decompressedPositions;for(let xt=0,yi=ht.length;xt<yi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];Ae.geometryPositions=null,ve[Ye]=Ae}}if(Ae)if(Ae.batchThisMesh){const be=Ae.decompressedPositions,$e=Ae.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)Ec[0]=be[ht+0],Ec[1]=be[ht+1],Ec[2]=be[ht+2],Ec[3]=1,C.transformVec4(dt,Ec,Lte),Jt.compressPosition(Lte,Fe,Ec),$e[ht+0]=Ec[0],$e[ht+1]=Ec[1],$e[ht+2]=Ec[2];o.createMesh(mt.apply(Be,{id:Te,textureSetId:rt,origin:Le,primitive:Ae.primitiveName,positionsCompressed:$e,normalsCompressed:Ae.geometryNormals,uv:Ae.geometryUVs,colorsCompressed:Ae.geometryColors,indices:Ae.geometryIndices,edgeIndices:Ae.geometryEdgeIndices,positionsDecodeMatrix:Ee,color:At,metallic:ct,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:Ae.primitiveName,positionsCompressed:Ae.geometryPositions,normalsCompressed:Ae.geometryNormals,uv:Ae.geometryUVs,colorsCompressed:Ae.geometryColors,indices:Ae.geometryIndices,edgeIndices:Ae.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Be,{id:Te,geometryId:Ye,textureSetId:rt,matrix:dt,color:At,metallic:ct,roughness:ut,opacity:ft,origin:Le})),ue.push(Te)}else{const st=b[he];let dt,Ye,Ae,be,$e,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),Ae=h.subarray(k[he],Pe?h.length:k[he+1]),be=A.subarray(B[he],Pe?A.length:B[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),St=m.subarray(T[he],Pe?m.length:T[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),Ae=h.subarray(k[he],Pe?h.length:k[he+1]),be=A.subarray(B[he],Pe?A.length:B[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),St=m.subarray(T[he],Pe?m.length:T[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),$e=p.subarray(E[he],Pe?p.length:E[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),ht=_te(Ye,f.subarray(P[he],Pe?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Be,{id:Te,textureSetId:rt,origin:Le,primitive:dt,positionsCompressed:Ye,normalsCompressed:Ae,uv:be&&be.length>0?be:null,colorsCompressed:$e,indices:ht,edgeIndices:St,positionsDecodeMatrix:Ee,color:At,metallic:ct,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function _te(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const Fte={version:11,parseArrayBuffer:function(t,e,i,o,r,n){const a=KNt(i);ZNt(t,e,a,o,r,n)}};let Ph=window.pako||Es;Ph.inflate||(Ph=Ph.default);const Bc=C.vec4(),Ote=C.vec4(),WNt=9;function YNt(t){const e=(function(){const r=new ArrayBuffer(2);return new Uint16Array(r)[0]=1,new Uint8Array(r)[0]!==1})(),i=(function(){let r=0;const n=new DataView(t);return function(a){const s=1+2*r++,l=n.getUint32(s*4,!0),c=n.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(t,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(t,l,c/d)}})(),o=(function(){const r=new TextDecoder;return()=>JSON.parse(r.decode(i(Uint8Array)))})();return{metadata:o(),textureData:i(Uint8Array),eachTextureDataPortion:i(Uint32Array),eachTextureAttributes:i(Uint16Array),positions:i(Uint16Array),normals:i(Int8Array),colors:i(Uint8Array),uvs:i(Float32Array),indices:i(Uint32Array),edgeIndices:i(Uint32Array),eachTextureSetTextures:i(Int32Array),matrices:i(Float32Array),reusedGeometriesDecodeMatrix:i(Float32Array),eachGeometryPrimitiveType:i(Uint8Array),eachGeometryAxisLabel:o(),eachGeometryPositionsPortion:i(Uint32Array),eachGeometryNormalsPortion:i(Uint32Array),eachGeometryColorsPortion:i(Uint32Array),eachGeometryUVsPortion:i(Uint32Array),eachGeometryIndicesPortion:i(Uint32Array),eachGeometryEdgeIndicesPortion:i(Uint32Array),eachMeshGeometriesPortion:i(Uint32Array),eachMeshMatricesPortion:i(Uint32Array),eachMeshTextureSet:i(Int32Array),eachMeshMaterialAttributes:i(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:i(Uint32Array),eachTileAABB:i(Float64Array),eachTileEntitiesPortion:i(Uint32Array)}}function XNt(t){let e=0;return{metadata:t[e++],textureData:t[e++],eachTextureDataPortion:t[e++],eachTextureAttributes:t[e++],positions:t[e++],normals:t[e++],colors:t[e++],uvs:t[e++],indices:t[e++],edgeIndices:t[e++],eachTextureSetTextures:t[e++],matrices:t[e++],reusedGeometriesDecodeMatrix:t[e++],eachGeometryPrimitiveType:t[e++],eachGeometryAxisLabel:t[e++],eachGeometryPositionsPortion:t[e++],eachGeometryNormalsPortion:t[e++],eachGeometryColorsPortion:t[e++],eachGeometryUVsPortion:t[e++],eachGeometryIndicesPortion:t[e++],eachGeometryEdgeIndicesPortion:t[e++],eachMeshGeometriesPortion:t[e++],eachMeshMatricesPortion:t[e++],eachMeshTextureSet:t[e++],eachMeshMaterialAttributes:t[e++],eachEntityId:t[e++],eachEntityMeshesPortion:t[e++],eachTileAABB:t[e++],eachTileEntitiesPortion:t[e++]}}function $Nt(t){function e(i,o){return i.length===0?[]:Ph.inflate(i,o).buffer}return{metadata:JSON.parse(Ph.inflate(t.metadata,{to:"string"})),textureData:new Uint8Array(e(t.textureData)),eachTextureDataPortion:new Uint32Array(e(t.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(t.eachTextureAttributes)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),uvs:new Float32Array(e(t.uvs)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),eachTextureSetTextures:new Int32Array(e(t.eachTextureSetTextures)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryAxisLabel:JSON.parse(Ph.inflate(t.eachGeometryAxisLabel,{to:"string"})),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(t.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(t.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(t.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Ph.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const ejt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function Ute(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryAxisLabel,k=i.eachGeometryPositionsPortion,E=i.eachGeometryNormalsPortion,B=i.eachGeometryColorsPortion,P=i.eachGeometryUVsPortion,T=i.eachGeometryIndicesPortion,S=i.eachGeometryEdgeIndicesPortion,R=i.eachMeshGeometriesPortion,F=i.eachMeshMatricesPortion,U=i.eachMeshTextureSet,q=i.eachMeshMaterialAttributes,V=i.eachEntityId,W=i.eachEntityMeshesPortion,Y=i.eachTileAABB,$=i.eachTileEntitiesPortion,fe=c.length,Me=g.length/5,Se=k.length,qe=R.length,Qe=W.length,Ce=$.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let we=0;we<fe;we++){const Re=we===fe-1,We=c[we],H=Re?l.length:c[we+1],ee=H-We>0,ae=we*WNt,Ee=d[ae+0]===1,pe=d[ae+1];d[ae+2],d[ae+3];const Q=d[ae+4],Z=d[ae+5],ie=d[ae+6],re=d[ae+7],ne=d[ae+8];if(ee){const G=new Uint8Array(l.subarray(We,H)).buffer,J=`${a}-texture-${we}`;if(Ee)o.createTexture({id:J,buffers:[G],minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne});else{const ue=pe===E7?"image/jpeg":pe===B7?"image/png":"image/gif",xe=new Blob([G],{type:ue}),oe=(window.URL||window.webkitURL).createObjectURL(xe),Be=document.createElement("img");Be.src=oe,o.createTexture({id:J,image:Be,minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne})}}}for(let we=0;we<Me;we++){const Re=we*5,We=`${a}-textureSet-${we}`,H=g[Re+0],ee=g[Re+1],ae=g[Re+2],Ee=g[Re+3],pe=g[Re+4];o.createTextureSet({id:We,colorTextureId:H>=0?`${a}-texture-${H}`:null,normalsTextureId:ae>=0?`${a}-texture-${ae}`:null,metallicRoughnessTextureId:ee>=0?`${a}-texture-${ee}`:null,emissiveTextureId:Ee>=0?`${a}-texture-${Ee}`:null,occlusionTextureId:pe>=0?`${a}-texture-${pe}`:null})}const Le=new Uint32Array(Se);for(let we=0;we<qe;we++){const Re=R[we];Le[Re]!==void 0?Le[Re]++:Le[Re]=1}const Fe=C.vec3(),ve=C.AABB3(),me={};for(let we=0;we<Ce;we++){const Re=Ce-1,We=we===Re,H=$[we],ee=We?Qe-1:$[we+1]-1,ae=we*6,Ee=Y.subarray(ae,ae+6);C.getAABB3Center(Ee,Fe),ve[0]=Ee[0]-Fe[0],ve[1]=Ee[1]-Fe[1],ve[2]=Ee[2]-Fe[2],ve[3]=Ee[3]-Fe[0],ve[4]=Ee[4]-Fe[1],ve[5]=Ee[5]-Fe[2];const pe=Jt.createPositionsDecodeMatrix(ve),Q={};for(let Z=H;Z<=ee;Z++){const ie=V[Z],re=e.globalizeObjectIds?C.globalizeObjectId(o.id,ie):ie,ne=Qe-1,G=Z===ne,J=W[Z],ue=G?R.length-1:W[Z+1]-1,xe=[],oe=t.metaScene.metaObjects[re],Be={},je={};if(!(e.includeIdsMap&&ie&&!e.includeIdsMap[ie])){if(oe){if(e.excludeTypesMap&&oe.type&&e.excludeTypesMap[oe.type]||e.includeTypesMap&&oe.type&&!e.includeTypesMap[oe.type]||e.includeIdsMap&&oe.id&&!e.includeIdsMap[oe.id])continue;const he=e.objectDefaults?e.objectDefaults[oe.type]||e.objectDefaults.DEFAULT:null;he&&(he.visible===!1&&(Be.visible=!1),he.pickable===!1&&(Be.pickable=!1),he.colorize&&(je.color=he.colorize),he.opacity!==void 0&&he.opacity!==null&&(je.opacity=he.opacity),he.metallic!==void 0&&he.metallic!==null&&(je.metallic=he.metallic),he.roughness!==void 0&&he.roughness!==null&&(je.roughness=he.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let he=J;he<=ue;he++){const Ne=R[he],Pe=Le[Ne]>1,He=Ne===Se-1,rt=U[he],At=rt>=0?`${a}-textureSet-${rt}`:null,ft=ejt(q.subarray(he*6,he*6+3)),ct=q[he*6+3]/255,ut=q[he*6+4]/255,Te=q[he*6+5]/255,st=n.getNextId();if(Pe){const dt=F[he],Ye=y.slice(dt,dt+16),Ae=`${a}-geometry.${we}.${Ne}`;let be=me[Ae];if(!be){be={batchThisMesh:!e.reuseGeometries};const $e=b[Ne],ht=x[Ne];let St=!1,xt;switch($e){case 0:be.primitiveName="solid",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryNormals=h.subarray(E[Ne],He?h.length:E[Ne+1]),be.geometryUVs=A.subarray(P[Ne],He?A.length:P[Ne+1]),be.geometryIndices=f.subarray(T[Ne],He?f.length:T[Ne+1]),be.geometryEdgeIndices=m.subarray(S[Ne],He?m.length:S[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 1:be.primitiveName="surface",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryNormals=h.subarray(E[Ne],He?h.length:E[Ne+1]),be.geometryUVs=A.subarray(P[Ne],He?A.length:P[Ne+1]),be.geometryIndices=f.subarray(T[Ne],He?f.length:T[Ne+1]),be.geometryEdgeIndices=m.subarray(S[Ne],He?m.length:S[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 2:be.primitiveName="points",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryColors=p.subarray(B[Ne],He?p.length:B[Ne+1]),St=be.geometryPositions.length>0;break;case 3:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryIndices=f.subarray(T[Ne],He?f.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 4:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryIndices=Nte(be.geometryPositions,f.subarray(T[Ne],He?f.length:T[Ne+1])),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 7:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.decompressedPositions=Jt.decompressPositions(be.geometryPositions,v),xt=b1({origin:be.decompressedPositions,text:ht,size:2}),be.decompressedPositions=xt.positions,be.geometryIndices=xt.indices,be.geometryPositions=null,St=be.decompressedPositions.length>0&&be.geometryIndices.length>0;break;default:continue}if(St||(be=null),be&&(be.geometryPositions&&be.geometryPositions.length>1e3,be.batchThisMesh)){if($e===7)be.transformedAndRecompressedPositions=new Uint16Array(be.decompressedPositions.length);else{be.decompressedPositions=new Float32Array(be.geometryPositions.length),be.transformedAndRecompressedPositions=new Uint16Array(be.geometryPositions.length);const yi=be.geometryPositions,Gi=be.decompressedPositions;for(let Do=0,ao=yi.length;Do<ao;Do+=3)Gi[Do+0]=yi[Do+0]*v[0]+v[12],Gi[Do+1]=yi[Do+1]*v[5]+v[13],Gi[Do+2]=yi[Do+2]*v[10]+v[14];be.geometryPositions=null}me[Ae]=be}}if(be)if(be.batchThisMesh){const $e=be.decompressedPositions,ht=be.transformedAndRecompressedPositions;for(let St=0,xt=$e.length;St<xt;St+=3)Bc[0]=$e[St+0],Bc[1]=$e[St+1],Bc[2]=$e[St+2],Bc[3]=1,C.transformVec4(Ye,Bc,Ote),Jt.compressPosition(Ote,ve,Bc),ht[St+0]=Bc[0],ht[St+1]=Bc[1],ht[St+2]=Bc[2];o.createMesh(mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:be.primitiveName,positionsCompressed:ht,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices,positionsDecodeMatrix:pe,color:ft,metallic:ut,roughness:Te,opacity:ct})),xe.push(st)}else{if(!Q[Ae]){let $e={id:Ae,primitive:be.primitiveName,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices};be.geometryPositions?$e={...$e,positionsCompressed:be.geometryPositions,positionsDecodeMatrix:v}:$e={...$e,positions:be.decompressedPositions},o.createGeometry($e),Q[Ae]=!0}o.createMesh(mt.apply(je,{id:st,geometryId:Ae,textureSetId:At,matrix:Ye,color:ft,metallic:ut,roughness:Te,opacity:ct,origin:Fe})),xe.push(st)}}else{const dt=b[Ne],Ye=x[Ne];let Ae,be,$e,ht,St,xt,yi,Gi=!1,Do;switch(dt){case 0:Ae="solid",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),$e=h.subarray(E[Ne],He?h.length:E[Ne+1]),ht=A.subarray(P[Ne],He?A.length:P[Ne+1]),xt=f.subarray(T[Ne],He?f.length:T[Ne+1]),yi=m.subarray(S[Ne],He?m.length:S[Ne+1]),Gi=be.length>0&&xt.length>0;break;case 1:Ae="surface",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),$e=h.subarray(E[Ne],He?h.length:E[Ne+1]),ht=A.subarray(P[Ne],He?A.length:P[Ne+1]),xt=f.subarray(T[Ne],He?f.length:T[Ne+1]),yi=m.subarray(S[Ne],He?m.length:S[Ne+1]),Gi=be.length>0&&xt.length>0;break;case 2:Ae="points",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),St=p.subarray(B[Ne],He?p.length:B[Ne+1]),Gi=be.length>0;break;case 3:Ae="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),xt=f.subarray(T[Ne],He?f.length:T[Ne+1]),Gi=be.length>0&&xt.length>0;break;case 4:Ae="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),xt=Nte(be,f.subarray(T[Ne],He?f.length:T[Ne+1])),Gi=be.length>0&&xt.length>0;break;case 7:Ae="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),be=Jt.decompressPositions(be,pe),Do=b1({origin:be,text:Ye,size:2}),be=Do.positions,xt=Do.indices,Gi=be.length>0&&xt.length>0;break;default:continue}if(Gi){let ao=mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:Ae,normalsCompressed:$e,uv:ht&&ht.length>0?ht:null,colorsCompressed:St,indices:xt,edgeIndices:yi,color:ft,metallic:ut,roughness:Te,opacity:ct});dt!==7?ao={...ao,positionsCompressed:be,positionsDecodeMatrix:pe}:ao={...ao,positions:be},o.createMesh(ao),xe.push(st)}}}xe.length>0&&o.createEntity(mt.apply(Be,{id:re,isObject:!0,meshIds:xe}))}}}}function Nte(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const jte={version:12,parseArrayBuffer:function(t,e,i,o,r,n){const a=YNt(i);Ute(t,e,a,o,r,n)},parse:function(t,e,i,o,r,n){const a=XNt(i),s=$Nt(a);Ute(t,e,s,o,r,n)}},Ln={};Ln[vte.version]=vte,Ln[yte.version]=yte,Ln[bte.version]=bte,Ln[wte.version]=wte,Ln[Cte.version]=Cte,Ln[xte.version]=xte,Ln[Mte.version]=Mte,Ln[Pte.version]=Pte,Ln[Ste.version]=Ste,Ln[Rte.version]=Rte,Ln[Fte.version]=Fte,Ln[jte.version]=jte;class Qb extends qa{constructor(e,i={}){super("XKTLoader",e,i),this._maxGeometryBatchSize=i.maxGeometryBatchSize,this.textureTranscoder=i.textureTranscoder,this.dataSource=i.dataSource,this.objectDefaults=i.objectDefaults,this.includeTypes=i.includeTypes,this.excludeTypes=i.excludeTypes,this.excludeUnclassifiedObjects=i.excludeUnclassifiedObjects,this.reuseGeometries=i.reuseGeometries}get supportedVersions(){return Object.keys(Ln)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new Ate}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||hte}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get includeIds(){return this._includeIds}set includeIds(e){this._includeIds=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=e!==!1}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc&&!e.manifest)throw new Error("XKTLoaderPlugin: load() param expected: src, xkt, manifestSrc or manifestData");const i={},o=e.includeTypes||this._includeTypes,r=e.excludeTypes||this._excludeTypes,n=e.includeIds||this._includeIds,a=e.objectDefaults||this._objectDefaults;if(i.reuseGeometries=e.reuseGeometries!==null&&e.reuseGeometries!==void 0?e.reuseGeometries:this._reuseGeometries!==!1,o){i.includeTypesMap={};for(let A=0,f=o.length;A<f;A++)i.includeTypesMap[o[A]]=!0}if(r){i.excludeTypesMap={};for(let A=0,f=r.length;A<f;A++)i.excludeTypesMap[r[A]]=!0}if(n){i.includeIdsMap={};for(let A=0,f=n.length;A<f;A++)i.includeIdsMap[n[A]]=!0}a&&(i.objectDefaults=a),i.excludeUnclassifiedObjects=e.excludeUnclassifiedObjects!==void 0?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,i.globalizeObjectIds=e.globalizeObjectIds!==void 0&&e.globalizeObjectIds!==null?!!e.globalizeObjectIds:this._globalizeObjectIds;const s=new I3(this.viewer.scene,mt.apply(e,{isModel:!0,textureTranscoder:this._textureTranscoder,maxGeometryBatchSize:this._maxGeometryBatchSize,origin:e.origin,disableVertexWelding:e.disableVertexWelding||!1,disableIndexRebucketing:e.disableIndexRebucketing||!1,dtxEnabled:e.dtxEnabled,renderOrder:e.renderOrder})),l=s.id,c=new A$({metaScene:this.viewer.metaScene,id:l});this.viewer.scene.canvas.spinner.processes++;const d=()=>{s.destroyed||(s.finalize(),c.finalize(),this.viewer.scene.canvas.spinner.processes--,s.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(c.id)}),this.scheduleTask(()=>{s.destroyed||(s.scene.fire("modelLoaded",s.id),s.fire("loaded",!0,!1))}))},u=A=>{this.viewer.scene.canvas.spinner.processes--,this.error(A),s.fire("error",A)};let h=0;const p={getNextId:()=>`${l}.${h++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const A=e.metaModelSrc;this._dataSource.getMetaModel(A,f=>{s.destroyed||(c.loadData(f,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),e.src?this._loadModel(e.src,i,s,null,p,d,u):(this._parseModel(e.xkt,i,s,null,p),d()))},f=>{u(`load(): Failed to load model metadata for model '${l} from '${A}' - ${f}`)})}else e.metaModelData&&(c.loadData(e.metaModelData,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),e.src?this._loadModel(e.src,i,s,null,p,d,u):(this._parseModel(e.xkt,i,s,null,p),d()));else if(e.src)this._loadModel(e.src,i,s,c,p,d,u);else if(e.xkt)this._parseModel(e.xkt,i,s,c,p),d();else if(e.manifestSrc||e.manifest){const A=e.manifestSrc?tjt(e.manifestSrc):"",f=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getMetaModel(`${A}${y[x]}`,E=>{c.loadData(E,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),x++,this.scheduleTask(k,200)},b)};k()},m=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,E=>{this._parseModel(E,i,s,null,p),s.preFinalize(),x++,this.scheduleTask(k,200)},b)};k()},g=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,E=>{this._parseModel(E,i,s,c,p),s.preFinalize(),x++,this.scheduleTask(k,200)},b)};k()};if(e.manifest){const y=e.manifest,v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const b=y.metaModelFiles;b?f(b,()=>{m(v,d,u)},u):g(v,d,u)}else this._dataSource.getManifest(e.manifestSrc,y=>{if(s.destroyed)return;const v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const b=y.metaModelFiles;b?f(b,()=>{m(v,d,u)},u):g(v,d,u)},u)}return s}_loadModel(e,i,o,r,n,a,s){this._dataSource.getXKT(e,l=>{this._parseModel(l,i,o,r,n),o.preFinalize(),a()},s)}async _parseModel(e,i,o,r,n){if(o.destroyed)return;const a=new DataView(e),s=new Uint8Array(e),l=a.getUint32(0,!0),c=l&2147483647,d=c<11||c>=12&&l>>>31,u=Ln[c];if(!u){this.error("Unsupported .XKT file version: "+c+" - this XKTLoaderPlugin supports versions "+Object.keys(Ln));return}if(!d){u.parseArrayBuffer(this.viewer,i,e,o,r,n);return}const h=a.getUint32(4,!0),p=[];let A=(h+2)*4;for(let f=0;f<h;f++){const m=a.getUint32((f+2)*4,!0);p.push(s.subarray(A,A+m)),A+=m}u.parse(this.viewer,i,p,o,r,n)}}function tjt(t){t.indexOf("?")>-1&&(t=t.split("?")[0]);const e=t.split("/");return e.pop(),e.join("/")+"/"}let ijt=1;class TF{constructor(e,i,o=null){this.tileset=e,this.computePriority=e.plugin.computePriority,this.distanceFactorToFreeData=e.plugin.distanceFactorToFreeData,this.src=i.content?.uri??null;const r=this.src?new URL(this.src).pathname:null;this.name=`${e.name}_${r?r.substring(r.lastIndexOf("/")+1):`tileWithNoContent_${ijt++}`}`,this.parent=o,this.refine=i.refine,this.data=null,this.fetching=null,this.depth=o?o.depth+1:1,this.model=null,this.loadProcess=null,this.loading=!1,this.currentDistanceFromCamera=null,this._visible=!o,this.priority=1,this.geometricError=i.geometricError;const[n,a,s,l,c,d,u,h,p,A,f,m]=i.boundingVolume.box,g=[n,s,-a];e.rootTransform&&(g[0]+=e.rootTransform[12],g[1]+=e.rootTransform[14],g[2]-=e.rootTransform[13]),this.center=Object.freeze(g);const y=[l,c,d],v=[-u,-h,-p],b=[A,f,m];this.xSize=C.lenVec3(y),this.ySize=C.lenVec3(b),this.zSize=C.lenVec3(v),this.volume=this.xSize*2*this.ySize*2*this.zSize*2,this.children=i.children?.map(x=>new TF(e,x,this))??[],e.tiles.add(this)}get visible(){return this._visible}set visible(e){this._visible!==e&&(this._visible=e,e?this.tileset.visibleTiles.add(this):this.tileset.visibleTiles.delete(this))}get loaded(){return!!this.model}get viewDistance(){return this.tileset.sensitivity*this.geometricError}get isWithinCameraVisibleRange(){return this.currentDistanceFromCamera<=this.viewDistance}updateVisibility(e){this.currentDistanceFromCamera=C.distVec3(this.center,e),this.parent&&(this.visible=this.isWithinCameraVisibleRange,this.currentDistanceFromCamera>this.viewDistance*this.distanceFactorToFreeData&&(this.data=null)),this.visible&&this.children.forEach(i=>i.updateVisibility(e)),this.priority=this.computePriority(this)}fetchData(){return this.data?this.data:this.src?(this.fetching||(this.fetching=new Promise((e,i)=>{fetch(this.src).then(o=>{o.ok?o.arrayBuffer().then(r=>{this.data=r,this.fetching=null,e(this.data)}):i(o)})})),this.fetching):null}showBoundingBox(){const{viewer:e}=this.tileset.plugin,{xSize:i,ySize:o,zSize:r,center:n}=this,a=1/this.depth;this.boxLines=new vi(e.scene,{geometry:new go(e.scene,wP({center:n,xSize:i,ySize:o,zSize:r})),material:new mo(e.scene,{emissive:[1-a,a,(1-a)/2]})})}async load(){if(this.loading)return this.loadProcess;if(this.loaded)return this.model;if(this.loading=!0,!this.data)try{await this.fetchData()}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to fetch data of tile "${this.name}".`,e),this.loading=!1,null}if(!this.visible)return this.loading=!1,null;this.tileset.plugin.debugMode&&this.showBoundingBox();try{const e=new Promise(i=>{const o=this.tileset.plugin.loader.load({id:this.name,xkt:this.data,metaModelData:{metaObjects:[{id:"metaModelRoot"}]}});o.once("loaded",()=>{this.loading=!1,this.loadProcess=null,this.model=o,this.tileset.destroyed||!this.visible?(this.unload(),i(null)):(this.tileset.loadedTiles.add(this),i(o))}),o.once("destroyed",()=>{this.loading=!1,this.loadProcess=null,i(null)})});return this.loadProcess=e,this.loadProcess}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to load tile "${this.name}".`,e),null}}unload(){this.boxLines&&(this.boxLines.destroy(),this.boxLines=null),this.model&&(this.model.destroy(),this.model=null),this.tileset.loadedTiles.delete(this),this.children.forEach(e=>{e.loaded&&e.unload()})}}function ojt(t,e,i){const o=Array.from(t),r=o.splice(0,e),n=async a=>{if(await i(a),o.length>0){const s=o.shift();n(s)}};r.forEach(n)}function rjt(t){let e=!1;return{cancel(){e=!0},async run(i){for(let o of t){if(e)break;await new Promise(r=>setTimeout(()=>(i(o)||Promise.resolve()).then(r)))}}}}let njt=0;class ajt{constructor(e,i){this.plugin=e,this.name=i.name||`tileset-${njt++}`,this.tiles=new Set,this.visibleTiles=new Set,this.loadedTiles=new Set,this.queue=null,this.renderNeeded=!0,this.destroyed=!1,this._sensitivity=e.sensitivity,i.root.transform&&(this.rootTransform=i.root.transform),this.root=new TF(this,i.root),this.root.load().then(o=>e.viewer.cameraFlight.flyTo(o))}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.updateVisibility()}updateVisibility(){this.tiles.forEach(e=>{e!==this.root&&(e.visible=!1)}),this.root.updateVisibility(this.plugin.viewer.camera.eye),this.renderNeeded=!0}render(){if(!this.renderNeeded)return;this.queue&&this.queue.cancel(),this.loadedTiles.forEach(i=>{i.visible||i.unload()});const e=Array.from(this.visibleTiles).filter(i=>!i.loaded).sort((i,o)=>i.priority-o.priority);ojt(e,40,i=>i.fetchData()),this.queue=rjt(e),this.queue.run(i=>i.load()),this.renderNeeded=!1}destroy(){this.queue&&this.queue.cancel(),this.loadedTiles.forEach(e=>e.unload()),this.destroyed=!0,this.plugin.tilesets.delete(this)}}function sjt(t){return t.depth}class Vte extends qa{constructor(e,i={}){super("TilesetLoader",e);const{computePriority:o=sjt,sensitivity:r=50,distanceFactorToFreeData:n=3,debugMode:a=!1}=i;this._sensitivity=r,this.distanceFactorToFreeData=n,this.computePriority=o,this.debugMode=a,this.tilesets=new Set,e.camera.on("matrix",this.updateTilesetsVisibilityCallback=()=>this.updateTilesetsVisibility()),e.scene.on("tick",this.renderTilesetsCallback=()=>this.renderTilesets()),this.loader=new Qb(e)}load(e){const i=new ajt(this,e);return this.tilesets.add(i),i}updateTilesetsVisibility(){this.tilesets.forEach(e=>e.updateVisibility())}renderTilesets(){this.tilesets.forEach(e=>e.render())}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.tilesets.forEach(i=>i.sensitivity=this._sensitivity)}destroy(){this.viewer.camera.off(this.updateTilesetsVisibilityCallback),this.viewer.scene.off(this.renderTilesetsCallback),this.tilesets.forEach(e=>e.destroy()),super.destroy()}}const ljt="2.6.90";typeof window<"u"&&(window.__XEOKIT__?console.warn("WARNING: Multiple instances of xeokit-sdk being imported."):window.__XEOKIT__=ljt);const Pc=Object.freeze(Object.defineProperty({__proto__:null,AlphaFormat:CW,AmbientLight:MI,AngleMeasurementEditMouseControl:FTt,AngleMeasurementEditTouchControl:OTt,AngleMeasurementsControl:$I,AngleMeasurementsMouseControl:M$,AngleMeasurementsPlugin:fb,AngleMeasurementsTouchControl:_Tt,AnnotationsPlugin:tS,AxisGizmoPlugin:zTt,BCFViewpointsPlugin:bb,Bitmap:oY,ByteType:hW,CameraMemento:BIt,CameraPath:$xt,CameraPathAnimation:Fr,ClampToEdgeWrapping:dn,Component:si,CompressedMediaType:xkt,Configs:_7,ContextMenu:gxt,CubicBezierCurve:SIt,Curve:o3,DefaultLoadingManager:cX,DepthFormat:EW,DepthStencilFormat:BW,DirLight:xs,DistanceMeasurementEditControl:oS,DistanceMeasurementEditMouseControl:WTt,DistanceMeasurementEditTouchControl:YTt,DistanceMeasurementsControl:iS,DistanceMeasurementsMouseControl:S$,DistanceMeasurementsPlugin:T$,DistanceMeasurementsTouchControl:ZTt,EdgeMaterial:YP,EmphasisMaterial:Ac,FastNavPlugin:_$,FloatType:mW,Fresnel:gMt,Frustum:va,FrustumPlane:uh,GIFMediaType:Ckt,GLTFDefaultDataSource:F$,GLTFLoaderPlugin:qS,HalfFloatType:vW,ImagePlane:lMt,IntType:AW,JPEGMediaType:E7,KTX2TextureTranscoder:Fs,LOD:IX,LambertMaterial:cMt,LightMap:MIt,LineSet:xX,LinearEncoding:Zn,LinearFilter:un,LinearMipMapLinearFilter:C1,LinearMipMapNearestFilter:s3,LinearMipmapLinearFilter:gh,LinearMipmapNearestFilter:wkt,Loader:dX,LoadingManager:lX,LocaleService:GZ,LuminanceAlphaFormat:MW,LuminanceFormat:kW,Map:Ha,Marker:T3,MarqueePicker:Dl,MarqueePickerMouseControl:Xxt,Mesh:vi,MeshSurfaceArea:lY,MeshVolume:nY,MetallicMaterial:hMt,MirroredRepeatWrapping:uc,ModelMemento:PIt,NavCubePlugin:QS,NearestFilter:Ah,NearestMipMapLinearFilter:w1,NearestMipMapNearestFilter:a3,NearestMipmapLinearFilter:uW,NearestMipmapNearestFilter:dW,Node:n3,ObjectsKdTree3:bxt,ObjectsMemento:IIt,PNGMediaType:B7,Path:TIt,PerformanceModel:RIt,PhongMaterial:mo,PickResult:X7,Plugin:qa,PointLight:CIt,PointerCircle:fP,PointerLens:mxt,QuadraticBezierCurve:DIt,Queue:FZ,RGBAFormat:l3,RGBAIntegerFormat:DW,RGBA_ASTC_10x10_Format:UP,RGBA_ASTC_10x5_Format:_P,RGBA_ASTC_10x6_Format:FP,RGBA_ASTC_10x8_Format:OP,RGBA_ASTC_12x10_Format:NP,RGBA_ASTC_12x12_Format:jP,RGBA_ASTC_4x4_Format:k7,RGBA_ASTC_5x4_Format:PP,RGBA_ASTC_5x5_Format:IP,RGBA_ASTC_6x5_Format:SP,RGBA_ASTC_6x6_Format:TP,RGBA_ASTC_8x5_Format:DP,RGBA_ASTC_8x6_Format:RP,RGBA_ASTC_8x8_Format:LP,RGBA_BPTC_Format:M7,RGBA_ETC2_EAC_Format:x7,RGBA_PVRTC_2BPPV1_Format:EP,RGBA_PVRTC_4BPPV1_Format:w7,RGBA_S3TC_DXT1_Format:v7,RGBA_S3TC_DXT3_Format:y7,RGBA_S3TC_DXT5_Format:d3,RGBFormat:xW,RGB_ETC1_Format:BP,RGB_ETC2_Format:C7,RGB_PVRTC_2BPPV1_Format:MP,RGB_PVRTC_4BPPV1_Format:b7,RGB_S3TC_DXT1_Format:c3,RGFormat:SW,RGIntegerFormat:TW,ReadableGeometry:go,RedFormat:PW,RedIntegerFormat:IW,ReflectionMap:kIt,RepeatWrapping:Co,SceneModel:I3,SceneModelMesh:dY,SceneModelTransform:gX,SectionPlane:II,SectionPlanesPlugin:tNt,ShortType:pW,SpecularMaterial:AMt,SplineCurve:h7,SpriteMarker:EIt,Texture:x1,TextureTranscoder:FIt,TilesetLoaderPlugin:Vte,UnsignedByteType:kP,UnsignedInt248Type:wW,UnsignedIntType:gW,UnsignedShort4444Type:yW,UnsignedShort5551Type:bW,UnsignedShortType:fW,VBOGeometry:$Z,VFC:zX,Viewer:k$,WorkerPool:hX,XKTDefaultDataSource:Ate,XKTLoaderPlugin:Qb,buildBoxGeometry:bP,buildBoxLinesGeometry:wP,buildBoxLinesGeometryFromAABB:gkt,buildCylinderGeometry:v1,buildGridGeometry:eW,buildLineGeometry:iW,buildPlaneGeometry:CP,buildPolylineGeometry:tW,buildPolylineGeometryFromCurve:vkt,buildSphereGeometry:y1,buildTorusGeometry:xP,buildVectorTextGeometry:b1,createCombinedTexture:TTt,createRTCViewMat:Ni,createSkyboxMesh:DTt,createSphereMapMesh:RTt,frustumIntersectsAABB3:u7,getKTX2TextureTranscoder:pX,getPlaneRTCPos:Wo,isTriangleMeshSolid:rY,load3DSGeometry:fkt,loadOBJGeometry:Akt,math:C,meshSurfaceArea:f3,meshVolume:M1,os:LI,rtcToWorldPos:bkt,sRGBEncoding:ho,setFrustum:QZ,stats:Ii,utils:mt,worldToRTCPos:fh,worldToRTCPositions:m7},Symbol.toStringTag,{value:"Module"}));function $1(t){let e=t.substring(1);const i=[];let o=null;for(;e.length>0;)o=e.substring(0,2),e=e.substring(2),i.push(parseInt(o,16)/255);return i}function zte(t){let e="";return e+=Math.round(t[0]*255).toString(16).padStart(2,"0"),e+=Math.round(t[1]*255).toString(16).padStart(2,"0"),e+=Math.round(t[2]*255).toString(16).padStart(2,"0"),`#${e}`}const cjt={class:"annotations-3d"},djt={__name:"Annotations3D",setup(t){const e=lt("$viewer"),{localContext:i}=e,{xeokit:o}=i.viewer,r=o.scene.canvas.canvas,n=o7(),a=xr(new WeakSet),s=De(()=>n.value.filter(u=>a.has(u))),l=new Map;pt(n,()=>{n.value.forEach(u=>{if(!l.has(u.id)){const{x:h,y:p,z:A}=u,f=new T3(o.scene,{worldPos:[h,A,p]});l.set(u.id,f);const[m,g]=f.canvasPos;f.style=le(`left: ${m}px; top: ${g}px;`),f.on("canvasPos",([b,x])=>{f.style.value=`left: ${b}px; top: ${x}px;`}),f.on("visible",b=>b?a.add(u):a.delete(u)),f.on("destroyed",()=>{e.state.hub.off(v),e.state.hub.off(y)});const y=e.state.hub.on("annotation-updated",({annotation:b})=>{if(b.id===u.id){const{x,y:k,z:E}=b;f.worldPos=[x,E,k],f._update(),o.scene._renderer._occlusionTester._occlusionTestListDirty=!0}}),v=e.state.hub.on("annotation-removed",({annotation:b})=>{b.id===u.id&&(l.delete(u.id),f.destroy())})}})},{flush:"sync"});const c=(u,h)=>{const{clientX:p,clientY:A}=h,{x:f,y:m}=r.getBoundingClientRect(),g=o.scene.pick({pickSurface:!0,canvasPos:[p-f,A-m]});if(g){const[y,v,b]=g.worldPos;Object.assign(u,{x:y,y:b,z:v})}},d=u=>l.get(u.id).style.value;return(u,h)=>(M(),_("div",cjt,[(M(!0),_(Xe,null,Mt(s.value,p=>(M(),K(r7,{key:p.instanceId,annotation:p,canvas:it(r),style:de(d(p)),onAnnotationDrag:A=>c(p,A)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),128))]))}},Hte=j(djt,[["__scopeId","data-v-10ceb001"]]),ujt={setup(){const t=lt("$viewer"),e=t.localContext.pluginComponentInstances.get("viewer3d"),{math:i}=e.xeokitSdk,o=()=>{const n=e.xeokit,a=[0,0,-1],s=n.scene.aabb,l=i.getAABB3Diag(s),c=i.vec3();i.getAABB3Center(s,c);const d=45,u=Math.abs(l/Math.tan(d*i.DEGTORAD));n.cameraControl.pivotPos=c,n.cameraFlight.jumpTo({look:c,eye:[c[0]-u*a[0],c[1]-u*a[1],c[2]-u*a[2]],up:[0,1,0],orthoScale:l*1.1,fitFOV:d})},r=()=>{const n=t.localContext.loadedModels.flatMap(a=>a.objects.filter(s=>s.visible===!1).map(s=>s.id));t.state.showObjects(n)};return{onClick:()=>{o(),r(),e.reintegrateObjects()}}}};function hjt(t,e,i,o,r,n){const a=I("BIMDataIconHome"),s=I("BIMDataButton");return M(),K(s,{color:"default",ghost:"",rounded:"",icon:"",onClick:o.onClick},{default:N(()=>[D(a,{size:"xs"})]),_:1},8,["onClick"])}const pjt=j(ujt,[["render",hjt]]),fjt={computed:{active(){return this.$viewer.localContext.pluginComponentInstances.has("navigationVersionsModel")?this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").isOpen.value:!1}},methods:{onClick(){this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").toggle()}}};function Ajt(t,e,i,o,r,n){const a=I("BIMDataIcon"),s=I("BIMDataButton"),l=I("BIMDataTooltip");return M(),K(l,{text:t.$t("navigationVersionsModel.tooltip")},{default:N(()=>[D(s,{class:ce(["bimdata-navigation-versions-model",{active:n.active}]),color:"primary",ghost:"",rounded:"",icon:"",onClick:n.onClick},{default:N(()=>[D(a,{name:"versioning",fill:"",color:"primary",size:"xxs"})]),_:1},8,["class","onClick"])]),_:1},8,["text"])}const gjt=j(fjt,[["render",Ajt],["__scopeId","data-v-ced27a96"]]),mjt={key:0,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vjt={key:1,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yjt={__name:"KeyboardNavigate",setup(t){const e=lt("$viewer").i18n.locale==="fr";return(i,o)=>e?(M(),_("svg",mjt,[...o[0]||(o[0]=[tn('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M82.5998 38.834V40H76.6759V38.834H82.5998ZM82.465 32.377L77.2209 40H76.2365V39.0684L81.4982 31.4688H82.465V32.377ZM81.9201 31.4688V32.6406H76.2716V31.4688H81.9201Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M37.3036 81.9744L39.5478 83.7556L38.5927 84.5935L36.3896 82.8298L37.3036 81.9744ZM39.5653 78.6111V79.0798C39.5653 79.7244 39.4814 80.3025 39.3134 80.8142C39.1454 81.3259 38.9052 81.7615 38.5927 82.1208C38.2802 82.4802 37.9071 82.7556 37.4735 82.947C37.04 83.1345 36.5595 83.2283 36.0321 83.2283C35.5087 83.2283 35.0302 83.1345 34.5966 82.947C34.1669 82.7556 33.7939 82.4802 33.4775 82.1208C33.161 81.7615 32.915 81.3259 32.7392 80.8142C32.5673 80.3025 32.4814 79.7244 32.4814 79.0798V78.6111C32.4814 77.9666 32.5673 77.3904 32.7392 76.8826C32.911 76.3708 33.1532 75.9353 33.4657 75.5759C33.7821 75.2126 34.1552 74.9373 34.5849 74.7498C35.0185 74.5583 35.497 74.4626 36.0204 74.4626C36.5478 74.4626 37.0282 74.5583 37.4618 74.7498C37.8993 74.9373 38.2743 75.2126 38.5868 75.5759C38.8993 75.9353 39.1396 76.3708 39.3075 76.8826C39.4794 77.3904 39.5653 77.9666 39.5653 78.6111ZM38.0888 79.0798V78.5994C38.0888 78.1228 38.0419 77.7029 37.9482 77.3396C37.8583 76.9724 37.7235 76.6658 37.5439 76.4197C37.3681 76.1697 37.1513 75.9822 36.8935 75.8572C36.6396 75.7283 36.3485 75.6638 36.0204 75.6638C35.7001 75.6638 35.413 75.7283 35.1591 75.8572C34.9052 75.9822 34.6884 76.1697 34.5087 76.4197C34.329 76.6658 34.1923 76.9724 34.0985 77.3396C34.0048 77.7029 33.9579 78.1228 33.9579 78.5994V79.0798C33.9579 79.5564 34.0048 79.9783 34.0985 80.3455C34.1923 80.7126 34.329 81.0232 34.5087 81.2771C34.6923 81.5271 34.911 81.7166 35.165 81.8455C35.4228 81.9705 35.7118 82.033 36.0321 82.033C36.3603 82.033 36.6513 81.9705 36.9052 81.8455C37.1591 81.7166 37.3739 81.5271 37.5497 81.2771C37.7255 81.0232 37.8583 80.7126 37.9482 80.3455C38.0419 79.9783 38.0888 79.5564 38.0888 79.0798Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])])):(M(),_("svg",vjt,[...o[1]||(o[1]=[tn('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M77.1095 38.084L78.8088 31.4688H79.6994L79.5998 33.1738L77.7834 40H76.8576L77.1095 38.084ZM75.838 31.4688L77.215 38.0312L77.338 40H76.3537L74.3791 31.4688H75.838ZM81.6271 38.0137L82.9865 31.4688H84.4513L82.4767 40H81.4923L81.6271 38.0137ZM80.0451 31.4688L81.7267 38.1016L81.9728 40H81.047L79.2599 33.1738L79.1662 31.4688H80.0451Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M36.2665 75.7166L33.7177 83.1111H32.1767L35.3876 74.5798H36.372L36.2665 75.7166ZM38.3993 83.1111L35.8446 75.7166L35.7333 74.5798H36.7235L39.9462 83.1111H38.3993ZM38.2763 79.947V81.113H33.6357V79.947H38.2763Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])]))}},bjt={key:0,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wjt={key:1,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Cjt={__name:"KeyboardStorey",setup(t){const e=lt("$viewer"),i=De(()=>e.i18n.locale==="fr");return(o,r)=>i.value?(M(),_("svg",bjt,[...r[0]||(r[0]=[tn('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M15.7763 88.3063L17.4755 81.691H18.3661L18.2665 83.3961L16.4501 90.2223H15.5243L15.7763 88.3063ZM14.5048 81.691L15.8817 88.2535L16.0048 90.2223H15.0204L13.0458 81.691H14.5048ZM20.2939 88.236L21.6532 81.691H23.1181L21.1435 90.2223H20.1591L20.2939 88.236ZM18.7118 81.691L20.3935 88.3239L20.6396 90.2223H19.7138L17.9267 83.3961L17.8329 81.691H18.7118Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])])):(M(),_("svg",wjt,[...r[1]||(r[1]=[tn('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M21.2665 89.0563V90.2223H15.3427V89.0563H21.2665ZM21.1317 82.5992L15.8876 90.2223H14.9032V89.2906L20.165 81.691H21.1317V82.5992ZM20.5868 81.691V82.8629H14.9384V81.691H20.5868Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])]))}},xjt={},kjt={width:"174",height:"130",viewBox:"0 0 174 130",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mjt(t,e){return M(),_("svg",kjt,[...e[0]||(e[0]=[tn('<path d="M33.1118 0.382324H131.606L141.853 99.4882H23.4L33.1118 0.382324Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22.9412 99.8706H142.235L131.988 0.305882V0H32.8059L23.0176 99.4882L22.9412 99.8706ZM141.394 99.1059H23.7823L33.4941 0.764706H131.3L141.394 99.1059Z" fill="#9E9E9E"></path><path d="M62.1705 9.86475L60.7941 46.953H103.771V9.86475H62.1705Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M60.4117 47.3354H104.153H104.229V9.48242H61.8647L60.4117 47.3354ZM103.388 46.5707H61.1764L62.5529 10.2471H103.388V46.5707Z" fill="#9E9E9E"></path><path d="M60.7942 46.9529L64.5412 61.7882H100.1L103.771 46.9529H60.7942Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M64.2353 62.1706H100.406L104.306 46.5706H60.3353L64.2353 62.1706ZM99.7942 61.4059H64.8471L61.3294 47.3353H103.312L99.7942 61.4059Z" fill="#9E9E9E"></path><path d="M85.2648 34.7939L85.0354 53.8351L90.0825 49.0175L97.806 49.5528L85.2648 34.7939Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M83.8118 57.5823L83.7354 31.5823L100.406 51.4646L90.3883 49.9352L83.8118 57.5823ZM85.8765 37.3176L85.953 51.9235L89.6236 47.6411L95.2824 48.4823L85.8765 37.3176Z" fill="black"></path><path d="M26.3059 128.241H25.9236C17.5883 128.241 10.7059 121.359 10.7059 113.024V100.253C10.7059 91.9178 17.5883 85.0354 25.9236 85.0354H26.3059C34.6412 85.0354 41.5236 91.9178 41.5236 100.253V113.024C41.5236 121.359 34.6412 128.241 26.3059 128.241Z" fill="white"></path><path d="M137.188 128.241H136.806C128.471 128.241 121.588 121.359 121.588 113.024V100.253C121.588 91.9178 128.471 85.0354 136.806 85.0354H137.188C145.524 85.0354 152.406 91.9178 152.406 100.253V113.024C152.406 121.359 145.524 128.241 137.188 128.241Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M25.4647 129.159H26.9942C35.6353 129.159 42.6706 122.2 42.5942 113.559V99.6413C42.5942 91.0766 35.6353 84.0413 26.9942 84.0413H25.4647C16.9 84.0413 9.86475 91.0001 9.86475 99.6413V113.559C9.86475 122.124 16.8236 129.159 25.4647 129.159ZM12.1589 99.5648C12.1589 92.2236 18.1236 86.2589 25.4647 86.2589H26.9942C34.3353 86.2589 40.3 92.2236 40.3 99.5648V113.482C40.3 120.824 34.3353 126.788 26.9942 126.788H25.4647C18.1236 126.788 12.1589 120.824 12.1589 113.482V99.5648Z" fill="#30374B"></path><path d="M26.3823 104.459C25.5411 104.459 24.8529 103.771 24.8529 102.929V98.4176C24.8529 97.5764 25.5411 96.8882 26.3823 96.8882C27.2235 96.8882 27.9117 97.5764 27.9117 98.4176V102.929C27.9117 103.771 27.2235 104.459 26.3823 104.459Z" fill="#30374B"></path><path d="M15.3706 84.1177C14.8353 84.1177 14.3765 83.6589 14.3765 83.1236V75.4765C14.3765 74.9412 14.8353 74.4824 15.3706 74.4824C15.9059 74.4824 16.3647 74.9412 16.3647 75.4765V83.1236C16.3647 83.6589 15.9059 84.1177 15.3706 84.1177Z" fill="#F8C62C"></path><path d="M9.63529 90.3884C9.63529 90.9237 9.17647 91.3825 8.64118 91.3825H0.994118C0.458824 91.3825 0 90.9237 0 90.3884C0 89.8531 0.458824 89.3943 0.994118 89.3943H8.64118C9.17647 89.3943 9.63529 89.8531 9.63529 90.3884Z" fill="#F8C62C"></path><path d="M11.9294 86.4117C11.5471 86.7941 10.8589 86.7941 10.4765 86.4117L3.74709 79.6823C3.36474 79.3 3.36474 78.6117 3.74709 78.2294C4.12944 77.847 4.81768 77.847 5.20003 78.2294L11.9294 84.9588C12.3118 85.3412 12.3118 86.0294 11.9294 86.4117Z" fill="#F8C62C"></path><path d="M87.7117 105.682H82.9706V100.941H80.8294V105.682H76.1647V107.747H80.8294V112.488H82.9706V107.747H87.7117V105.682Z" fill="#F8C62C"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.194 129.159H137.724C146.365 129.159 153.4 122.2 153.324 113.559V99.6413C153.324 91.0766 146.365 84.0413 137.724 84.0413H136.194C127.629 84.0413 120.594 91.0001 120.594 99.6413V113.559C120.594 122.124 127.553 129.159 136.194 129.159ZM122.888 99.5648C122.888 92.2236 128.853 86.2589 136.194 86.2589H137.724C145.065 86.2589 151.029 92.2236 151.029 99.5648V113.482C151.029 120.824 145.065 126.788 137.724 126.788H136.194C128.853 126.788 122.888 120.824 122.888 113.482V99.5648Z" fill="#30374B"></path><path d="M137.112 104.459C136.271 104.459 135.582 103.771 135.582 102.929V98.4176C135.582 97.5764 136.271 96.8882 137.112 96.8882C137.953 96.8882 138.641 97.5764 138.641 98.4176V102.929C138.641 103.771 137.953 104.459 137.112 104.459Z" fill="#30374B"></path><path d="M102.776 106.753L108.129 101.4C108.588 100.941 108.588 100.253 108.129 99.7941C107.671 99.3352 106.982 99.3352 106.524 99.7941L100.406 105.912C100.176 106.141 100.1 106.447 100.1 106.753C100.1 107.059 100.176 107.365 100.406 107.594L106.524 113.712C106.982 114.171 107.671 114.171 108.129 113.712C108.588 113.253 108.588 112.565 108.129 112.106L102.776 106.753Z" fill="#F8C62C"></path><path d="M171.218 106.753L165.865 101.4C165.406 100.941 165.406 100.253 165.865 99.7941C166.324 99.3352 167.012 99.3352 167.471 99.7941L173.588 105.912C173.818 106.141 173.894 106.447 173.894 106.753C173.894 107.059 173.818 107.365 173.588 107.594L167.471 113.712C167.012 114.171 166.324 114.171 165.865 113.712C165.406 113.253 165.406 112.565 165.865 112.106L171.218 106.753Z" fill="#F8C62C"></path>',20)])])}const Ejt=j(xjt,[["render",Mjt]]),Bjt={},Pjt={width:"42",height:"55",viewBox:"0 0 42 55",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ijt(t,e){return M(),_("svg",Pjt,[...e[0]||(e[0]=[tn('<path d="M1.7192 47.4914L0.501465 10.6013H40.8298L40.3284 47.4914H1.7192Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.36104 47.8495H40.6866L41.188 10.2432H0.143311L1.36104 47.8495ZM39.9703 47.1332H2.07735L0.859623 10.9595H40.4717L39.9703 47.1332Z" fill="#9E9E9E"></path><path d="M4.29792 0.429688L0.501465 10.6013H40.8298L37.5348 0.429688H4.29792Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 10.9596H41.3312L37.7496 0H4.01135L0 10.9596ZM40.3284 10.2433H1.00284L4.51277 0.716312H37.2482L40.3284 10.2433Z" fill="#9E9E9E"></path><path d="M18.9312 23.0255C19.4326 23.0255 19.8624 22.5957 19.8624 22.0943V14.9312C19.8624 14.4298 19.4326 14 18.9312 14C18.4298 14 18 14.4298 18 14.9312V22.0943C18 22.5957 18.4298 23.0255 18.9312 23.0255Z" fill="#F8C62C"></path><path d="M24.3035 28.9708C24.3035 29.4722 24.7333 29.902 25.2347 29.902H32.3978C32.8992 29.902 33.329 29.4722 33.329 28.9708C33.329 28.4693 32.8992 28.0395 32.3978 28.0395H25.2347C24.7333 27.9679 24.3035 28.3977 24.3035 28.9708Z" fill="#F8C62C"></path><path d="M22.1546 25.2461C22.5128 25.6043 23.1575 25.6043 23.5156 25.2461L29.8192 18.9426C30.1773 18.5844 30.1773 17.9398 29.8192 17.5816C29.461 17.2234 28.8163 17.2234 28.4582 17.5816L22.1546 23.8852C21.7248 24.2433 21.7248 24.8164 22.1546 25.2461Z" fill="#F8C62C"></path><path d="M21.5855 31.4087L21.3477 51.0688L26.5798 46.0745L34.5865 46.6294L21.5855 31.4087Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M20.0793 54.9534L20 28L37.2819 48.6114L26.8969 47.0259L20.0793 54.9534ZM22.2197 33.9456L22.299 49.087L26.1041 44.6477L31.9705 45.5197L22.2197 33.9456Z" fill="black"></path>',9)])])}const Sjt=j(Bjt,[["render",Ijt]]),Tjt={},Djt={width:"124",height:"152",viewBox:"0 0 124 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Rjt(t,e){return M(),_("svg",Djt,[...e[0]||(e[0]=[tn('<path d="M10.5436 0.396484H112.649L123.272 103.216H0.475708L10.5436 0.396484Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 103.612H123.668L113.046 0.317098V0H10.2264L0.0792746 103.216L0 103.612ZM122.876 102.819H0.951324L10.9399 0.792766H112.332L122.876 102.819Z" fill="#9E9E9E"></path><path d="M40.7472 10.2266L39.241 48.6747H83.7933V10.2266H40.7472Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M38.8446 49.071H84.1897H84.269V9.83008H40.3508L38.8446 49.071ZM83.4762 48.2783H39.7166L41.0643 10.6228H83.4762V48.2783Z" fill="#9E9E9E"></path><path d="M39.2408 48.6748L43.1253 64.0541H79.988L83.7932 48.6748H39.2408Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M42.8083 64.4503H80.3052L84.3482 48.2783H38.7653L42.8083 64.4503ZM79.671 63.6576H43.4425L39.7958 49.0711H83.3176L79.671 63.6576Z" fill="#9E9E9E"></path><path d="M64.6088 36.1494L64.371 55.8095L69.6031 50.8152L77.6098 51.3701L64.6088 36.1494Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.1026 59.6938L63.0233 32.7405L80.3052 53.3519L69.9202 51.7664L63.1026 59.6938ZM65.243 38.6861L65.3223 53.8275L69.1275 49.3881L74.9938 50.2602L65.243 38.6861Z" fill="black"></path><path d="M61.7549 130.724H61.3585C52.7176 130.724 45.5829 123.589 45.5829 114.948V101.709C45.5829 93.0686 52.7176 85.9338 61.3585 85.9338H61.7549C70.3958 85.9338 77.5306 93.0686 77.5306 101.709V114.948C77.5306 123.589 70.4751 130.724 61.7549 130.724Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.7902 114.79C44.7902 124.144 52.4005 131.754 61.7549 131.754C71.1093 131.754 78.7197 124.065 78.7197 114.79V101.947C78.7197 92.5928 71.1093 84.9824 61.7549 84.9824C52.4005 84.9824 44.7902 92.5928 44.7902 101.947V114.79ZM47.1684 101.868C47.1684 93.8612 53.6689 87.2814 61.7549 87.2814C69.7617 87.2814 76.3415 93.7819 76.3415 101.868V114.71C76.3415 122.717 69.8409 129.297 61.7549 129.297C53.7482 129.297 47.1684 122.796 47.1684 114.71V101.868Z" fill="#30374B"></path><path d="M61.8341 106.069C60.9621 106.069 60.2487 105.356 60.2487 104.484V100.996C60.2487 100.124 60.9621 99.4104 61.8341 99.4104C62.7062 99.4104 63.4196 100.124 63.4196 100.996V104.484C63.4196 105.356 62.7062 106.069 61.8341 106.069Z" fill="#30374B"></path><path d="M61.8341 97.7457C60.9621 97.7457 60.2487 97.0322 60.2487 96.1602C60.2487 95.2882 60.9621 94.5747 61.8341 94.5747C62.7062 94.5747 63.4196 95.2882 63.4196 96.1602C63.4196 97.0322 62.7062 97.7457 61.8341 97.7457Z" fill="#30374B"></path><path d="M61.8341 110.826C60.9621 110.826 60.2487 110.113 60.2487 109.241C60.2487 108.369 60.9621 107.655 61.8341 107.655C62.7062 107.655 63.4196 108.369 63.4196 109.241C63.4196 110.113 62.7062 110.826 61.8341 110.826Z" fill="#30374B"></path><path d="M61.8342 142.298L67.3834 136.749C67.859 136.273 68.5725 136.273 69.0481 136.749C69.5238 137.224 69.5238 137.938 69.0481 138.414L62.7062 144.756C62.4684 144.993 62.1513 145.073 61.8342 145.073C61.5171 145.073 61.2 144.993 60.9621 144.756L54.6202 138.414C54.1445 137.938 54.1445 137.224 54.6202 136.749C55.0958 136.273 55.8093 136.273 56.2849 136.749L61.8342 142.298Z" fill="#F8C62C"></path><path d="M61.8342 149.195L67.3834 143.646C67.859 143.17 68.5725 143.17 69.0481 143.646C69.5238 144.121 69.5238 144.835 69.0481 145.311L62.7062 151.653C62.4684 151.89 62.1513 151.97 61.8342 151.97C61.5171 151.97 61.2 151.89 60.9621 151.653L54.6202 145.311C54.1445 144.835 54.1445 144.121 54.6202 143.646C55.0958 143.17 55.8093 143.17 56.2849 143.646L61.8342 149.195Z" fill="#F8C62C"></path>',15)])])}const Ljt=j(Tjt,[["render",Rjt]]),_jt={name:"FirstPersonViewHelper",components:{KeyboardNavigate:yjt,KeyboardStorey:Cjt,MouseMove:Ejt,MouseStorey:Sjt,MouseZoom:Ljt},emits:["close"],methods:{close(){this.$emit("close")},clear(){localStorage.setItem("firstPersonViewHelper","false"),this.close()}}},Fjt={class:"bimdata-first-person-view-helper"},Ojt={class:"bimdata-first-person-view-helper__header"},Ujt={class:"bimdata-first-person-view-helper__content"},Njt={class:"bimdata-first-person-view-helper__content__main"},jjt={class:"bimdata-first-person-view-helper__content__main__left"},Vjt={class:"bimdata-first-person-view-helper__content__main__left__element"},zjt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},Hjt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},qjt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},Qjt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Gjt={class:"bimdata-first-person-view-helper__content__main__left__element"},Kjt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},Jjt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},Zjt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},Wjt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Yjt={class:"bimdata-first-person-view-helper__content__main__left__element"},Xjt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},$jt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},eVt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},tVt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},iVt={class:"bimdata-first-person-view-helper__content__main__right"},oVt={class:"bimdata-first-person-view-helper__content__main__right__title"},rVt={class:"bimdata-first-person-view-helper__content__main__right__content"},nVt={class:"bimdata-first-person-view-helper__content__main__right__content__picture"},aVt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},sVt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},lVt={class:"bimdata-first-person-view-helper__content__main__right__content__text"},cVt={class:"bimdata-first-person-view-helper__content__footer"},dVt={class:"bimdata-first-person-view-helper__footer-buttons"};function uVt(t,e,i,o,r,n){const a=I("KeyboardNavigate"),s=I("MouseMove"),l=I("MouseZoom"),c=I("MouseStorey"),d=I("KeyboardStorey"),u=I("BIMDataButton");return M(),_("div",Fjt,[w("h1",Ojt,z(t.$t("viewer3d.firstPersonViewHelper.title")),1),w("div",Ujt,[w("div",Njt,[w("div",jjt,[w("div",Vjt,[w("div",zjt,[D(a)]),w("div",Hjt,[w("h4",qjt,z(t.$t("viewer3d.firstPersonViewHelper.keyboardUsage")),1),w("ul",Qjt,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.forward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.backward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.left")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.right")),1)])])]),w("div",Gjt,[w("div",Kjt,[D(s)]),w("div",Jjt,[w("h4",Zjt,z(t.$t("viewer3d.firstPersonViewHelper.mouseOrientation")),1),w("ul",Wjt,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.pressLeft")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseMove")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseVertical")),1)])])]),w("div",Yjt,[w("div",Xjt,[D(l)]),w("div",$jt,[w("h4",eVt,z(t.$t("viewer3d.firstPersonViewHelper.mouseZoom")),1),w("ul",tVt,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseWheelForward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseWheelBackward")),1)])])])]),w("div",iVt,[w("h4",oVt,z(t.$t("viewer3d.firstPersonViewHelper.changeStorey")),1),w("div",rVt,[w("div",nVt,[w("div",aVt,[D(c)]),w("div",sVt,[D(d)])]),w("div",lVt,[w("ul",null,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.storeyClick")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.moveCameraToObject")),1)]),w("ul",null,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.keyboardStoreyChange")),1)])])])])]),w("div",cVt,z(t.$t("viewer3d.firstPersonViewHelper.contentFooter")),1)]),w("div",dVt,[D(u,{color:"primary",fill:"",radius:"",width:"200px",onClick:n.close},{default:N(()=>[Je(z(t.$t("viewer3d.firstPersonViewHelper.understand")),1)]),_:1},8,["onClick"]),D(u,{color:"primary",outline:"",radius:"",width:"200px",onClick:n.clear},{default:N(()=>[Je(z(t.$t("viewer3d.firstPersonViewHelper.noRecall")),1)]),_:1},8,["onClick"])])])}const qte=j(_jt,[["render",uVt],["__scopeId","data-v-77cce9d5"]]),hVt={components:{ShortcutsModal:i7,FirstPersonViewHelper:qte},data(){const t=this.$t;return{tabs:[{id:0,get label(){return t("viewer3d.modals.3d")}},{id:1,get label(){return t("viewer3d.modals.firstPerson")}}],activeTab:0,elements:[{image:"shortcutRotate",title:this.$t("shortcuts-helper.title_rotate"),text:this.$t("shortcuts-helper.text_rotate")},{image:"shortcutZoom",title:this.$t("shortcuts-helper.title_zoom"),text:this.$t("shortcuts-helper.text_zoom")},{image:"shortcutOpen",title:this.$t("shortcuts-helper.title_open"),text:this.$t("shortcuts-helper.text_open")}],shortcuts:[{letter:"F",text:this.$t("context_menu.fit_view")},{letter:"C",text:this.$t("context_menu.select_all")},{letter:"V",text:this.$t("context_menu.deselect_all")},{letter:"H",text:this.$t("context_menu.hide")},{letter:"Y",text:this.$t("context_menu.select_similar")},{letter:"I",text:this.$t("context_menu.isolate")},{letter:"U",text:this.$t("context_menu.reintegrate")},{letter:"R",text:this.$t("context_menu.show_all")},{letter:"1",text:this.$t("shortcuts-helper.shortcut_1")},{letter:"2",text:this.$t("shortcuts-helper.shortcut_2")},{letter:"3",text:this.$t("shortcuts-helper.shortcut_3")},{letter:"4",text:this.$t("shortcuts-helper.shortcut_4")},{letter:"5",text:this.$t("shortcuts-helper.shortcut_5")},{letter:"6",text:this.$t("shortcuts-helper.shortcut_6")},{maj:!0,text:this.$t("shortcuts-helper.shortcut_pan"),illustration:"click"},{alt:!0,text:this.$t("shortcuts-helper.shortcut_open"),illustration:"click"},{shift:!0,text:this.$t("shortcuts-helper.shortcut_multiselect"),illustration:"click"}]}}},pVt={class:"bimdata-shortcuts-helper__header"};function fVt(t,e,i,o,r,n){const a=I("BIMDataTabs"),s=I("ShortcutsModal"),l=I("FirstPersonViewHelper");return M(),_("div",null,[w("div",pVt,[D(a,{tabs:r.tabs,width:"490px",height:"44px",tabSize:"245",onTabSelected:e[0]||(e[0]=c=>r.activeTab=r.tabs.indexOf(c)),selected:r.activeTab},null,8,["tabs","selected"])]),r.activeTab===0?(M(),K(s,{key:0,elements:r.elements,shortcuts:r.shortcuts,onClose:e[1]||(e[1]=c=>t.$emit("close"))},{title:N(()=>[Je(z(t.$t("shortcuts-helper.title_modal")),1)]),_:1},8,["elements","shortcuts"])):(M(),K(l,{key:1,onClose:e[2]||(e[2]=c=>t.$emit("close"))}))])}const AVt=j(hVt,[["render",fVt],["__scopeId","data-v-a26872a0"]]),gVt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M1.20102%2023.5V24.5H2.20102H10.261C11.4116%2029.9278%2016.2295%2034%2022%2034C27.7705%2034%2032.5884%2029.9278%2033.739%2024.5H41.799H42.799V23.5V20.5V19.5H41.799H33.739C32.5884%2014.0722%2027.7705%2010%2022%2010C16.2295%2010%2011.4116%2014.0722%2010.261%2019.5H2.20102H1.20102V20.5V23.5ZM14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",mVt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M6.23222%2034.2322L5.52512%2034.9393L6.23222%2035.6464L8.35354%2037.7678L9.06065%2038.4749L9.76776%2037.7678L15.4677%2032.0678C17.3477%2033.2898%2019.592%2034%2022%2034C24.408%2034%2026.6523%2033.2898%2028.5323%2032.0678L34.2322%2037.7678L34.9393%2038.4749L35.6464%2037.7678L37.7678%2035.6465L38.4749%2034.9393L37.7678%2034.2322L32.0678%2028.5323C33.2898%2026.6523%2034%2024.408%2034%2022C34%2019.592%2033.2898%2017.3477%2032.0678%2015.4677L37.7678%209.76776L38.4749%209.06065L37.7678%208.35354L35.6464%206.23222L34.9393%205.52512L34.2322%206.23222L28.5322%2011.9322C26.6523%2010.7102%2024.408%2010%2022%2010C19.592%2010%2017.3477%2010.7102%2015.4677%2011.9322L9.76776%206.23224L9.06065%205.52513L8.35354%206.23224L6.23222%208.35356L5.52512%209.06066L6.23222%209.76777L11.9322%2015.4678C10.7102%2017.3477%2010%2019.592%2010%2022C10%2024.408%2010.7102%2026.6523%2011.9322%2028.5323L6.23222%2034.2322ZM14.619%2022C14.619%2017.9236%2017.9236%2014.6191%2022%2014.6191C26.0764%2014.6191%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",vVt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",yVt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C23.8642%2014.619%2025.5667%2015.3094%2026.8665%2016.4504L14.7593%2023.4405C14.6673%2022.9751%2014.619%2022.4935%2014.619%2022ZM29.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C20.0879%2029.381%2018.3459%2028.6547%2017.0341%2027.4608L29.2136%2020.4289C29.3232%2020.9347%2029.381%2021.4602%2029.381%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",bVt="data:image/svg+xml,%3csvg%20width='33'%20height='33'%20viewBox='0%200%2033%2033'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.70001%2016.8667V17.3667H2.20001H7.33335H7.83335V16.8667V16.1333V15.6333H7.33335L2.20001%2015.6333H1.70001V16.1333L1.70001%2016.8667ZM30.8%2017.3667H31.3V16.8667V16.1333V15.6333H30.8L25.6667%2015.6333H25.1667V16.1333V16.8667V17.3667H25.6667H30.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3cpath%20d='M16.1333%201.70001L15.6333%201.70001L15.6333%202.20001L15.6333%207.33335L15.6333%207.83335L16.1333%207.83335L16.8667%207.83335L17.3667%207.83335L17.3667%207.33335L17.3667%202.20001L17.3667%201.70001L16.8667%201.70001L16.1333%201.70001ZM15.6333%2030.8L15.6333%2031.3L16.1333%2031.3L16.8667%2031.3L17.3667%2031.3L17.3667%2030.8L17.3667%2025.6667L17.3667%2025.1667L16.8667%2025.1667L16.1333%2025.1667L15.6333%2025.1667L15.6333%2025.6667L15.6333%2030.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3c/svg%3e",wVt={0:{positions:[36.5625,31.640625,36.5625,19.51171875,36.42067337036133,16.11605453491211,35.99519348144531,13.020120620727539,35.28605651855469,10.223917961120605,34.293270111083984,7.727446556091309,33.01683044433594,5.530706882476807,30.959993362426758,3.3593661785125732,28.725576400756836,1.6479235887527466,26.31357765197754,.39637935161590576,23.723995208740234,-.39526674151420593,20.956830978393555,-.7270146012306213,20.3203125,-.73828125,17.307449340820312,-.5108020901679993,14.569392204284668,.17163534462451935,12.106142044067383,1.3090311288833618,9.917699813842773,2.9013850688934326,8.174575805664062,5.153988838195801,6.733142375946045,7.555612087249756,5.593398094177246,10.106253623962402,4.755343437194824,12.805914878845215,4.218978404998779,15.654594421386719,3.9843032360076904,18.652292251586914,3.97265625,19.51171875,3.97265625,31.640625,4.115384578704834,35.0230827331543,4.543569564819336,38.11090850830078,5.257210731506348,40.904109954833984,6.256308555603027,43.40268325805664,7.540863037109375,45.606624603271484,9.608292579650879,47.79111099243164,11.846480369567871,49.51402282714844,14.255425453186035,50.775352478027344,16.835128784179688,51.57510757446289,19.585588455200195,51.91328811645508,20.25,51.92578125,23.26165771484375,51.697608947753906,25.997068405151367,51.013092041015625,28.456228256225586,49.872230529785156,30.639141082763672,48.2750244140625,32.375572204589844,46.0158576965332,33.81153869628906,43.60895538330078,34.947044372558594,41.0543212890625,35.78208923339844,38.35194778442383,36.31666946411133,35.5018424987793,36.55078887939453,32.50400161743164,36.5625,31.640625,29.63671875,18.10546875,29.63671875,33.1171875,29.450082778930664,36.561954498291016,28.89017677307129,39.497215270996094,27.956998825073242,41.92298126220703,25.967069625854492,44.22639083862305,23.724157333374023,45.72625732421875,21.228260040283203,46.422576904296875,20.25,46.4765625,17.354780197143555,46.07659912109375,14.97888469696045,44.876708984375,13.33356761932373,42.470394134521484,12.110569953918457,39.9057731628418,11.309891700744629,37.1828498840332,10.931534767150879,34.30161666870117,10.8984375,33.1171875,10.8984375,18.10546875,11.085087776184082,14.669450759887695,11.645040512084961,11.733874320983887,12.578293800354004,9.298736572265625,14.569818496704102,6.974865436553955,16.804428100585938,5.454482555389404,19.282119750976562,4.737586975097656,20.3203125,4.67578125,23.212167739868164,5.077450752258301,25.581016540527344,6.282459735870361,27.21183204650879,8.69408893585205,28.425546646118164,11.263723373413086,29.2221622467041,13.991360664367676,29.6016788482666,16.877002716064453],indices:[0,2,1,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,63,62,61,24,62,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,0,45,0,4,2,4,8,6,8,12,10,12,16,14,16,20,18,20,24,22,24,64,63,60,24,61,24,28,26,28,32,30,32,36,34,36,40,38,40,44,42,44,4,0,4,12,8,12,20,16,20,64,24,59,24,60,24,32,28,32,40,36,40,4,44,20,65,64,58,24,59,20,66,65,57,24,58,12,66,20,57,32,24,12,67,66,56,32,57,12,68,67,55,32,56,12,69,68,54,32,55,12,70,69,53,32,54,12,71,70,53,40,32,4,71,12,52,40,53,4,72,71,51,40,52,4,73,72,50,40,51,4,74,73,49,40,50,4,75,74,48,40,49,4,76,75,47,40,48,40,76,4,76,40,47],width:32.58984375},1:{positions:[23.94140625,51.1875,23.94140625,0,17.015625,0,17.015625,44.4375,6.5390625,44.296875,6.5390625,49.2890625],indices:[0,2,1,3,5,4,0,3,2,3,0,5],width:17.40234375},2:{positions:[37.3359375,5.4140625,37.3359375,0,4.1484375,0,4.1484375,4.74609375,20.91796875,23.37890625,23.33412742614746,26.180971145629883,25.239078521728516,28.61744499206543,26.632823944091797,30.68832778930664,27.938528060913086,33.606327056884766,28.560094833374023,36.34145736694336,28.6171875,37.40625,28.23740577697754,40.36100769042969,27.09806251525879,42.90309143066406,24.87748908996582,45.0150146484375,22.4631290435791,46.19827651977539,20.4609375,46.4765625,17.237478256225586,46.17487716674805,14.632962226867676,45.26981735229492,12.647390365600586,43.76138687133789,11.200069427490234,41.599464416503906,10.360716819763184,38.91020965576172,10.125,36.10546875,3.48046875,36.10546875,3.41015625,36.31640625,3.580944538116455,39.24900436401367,4.255249977111816,41.95781326293945,5.433072566986084,44.442840576171875,7.114412784576416,46.704078674316406,9.256887435913086,48.52997589111328,11.61109447479248,49.96455383300781,14.177034378051758,51.007816314697266,16.954708099365234,51.659759521484375,19.944114685058594,51.920387268066406,20.4609375,51.92578125,23.575925827026367,51.698787689208984,26.37569808959961,51.01780319213867,28.86025619506836,49.88283157348633,31.029598236083984,48.29386901855469,32.93091583251953,46.07616424560547,34.31552505493164,43.65195846557617,35.18342971801758,41.0212516784668,35.53462600708008,38.18403625488281,35.54296875,37.65234375,35.271297454833984,34.8802490234375,34.45627975463867,32.10430145263672,33.097923278808594,29.324501037597656,31.655981063842773,27.067161560058594,29.948768615722656,24.73398208618164,27.976285934448242,22.324962615966797,26.12109375,20.25,12.65625,5.58984375,12.7265625,5.4140625],indices:[51,1,0,1,3,2,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,51,3,1,19,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,3,51,18,22,19,22,30,26,30,38,34,38,46,42,46,3,50,18,30,22,46,4,3,17,30,18,46,5,4,16,30,17,46,6,5,15,30,16,46,7,6,14,30,15,46,8,7,13,30,14,38,8,46,13,38,30,38,9,8,12,38,13,38,10,9,11,38,12,38,11,10],width:33.92578125},3:{positions:[13.640625,23.37890625,13.640625,28.79296875,19.6875,28.79296875,22.903934478759766,29.15167236328125,25.282482147216797,30.227783203125,26.954715728759766,32.621280670166016,27.896883010864258,35.25688171386719,28.125,37.51171875,27.781084060668945,40.67007064819336,26.749338150024414,43.162776947021484,24.544097900390625,45.051876068115234,22.03769302368164,46.1552734375,19.51171875,46.4765625,16.51466941833496,46.0916633605957,14.03652286529541,44.93696212768555,12.056009292602539,42.62509536743164,10.906388282775879,40.13740539550781,10.58203125,37.79296875,3.9375,37.79296875,3.8671875,38.00390625,4.073190689086914,40.847023010253906,4.870357036590576,43.464176177978516,6.258687496185303,45.85536193847656,8.649903297424316,47.949581146240234,11.105090141296387,49.6024169921875,13.624245643615723,50.81385803222656,16.207372665405273,51.58391189575195,18.854469299316406,51.912574768066406,19.51171875,51.92578125,22.69034194946289,51.71705627441406,25.550539016723633,51.090885162353516,28.09231185913086,50.04726028442383,30.315656661987305,48.58618927001953,32.206153869628906,46.54783248901367,33.6175651550293,44.22849655151367,34.54988479614258,41.62818145751953,35.00312423706055,38.74688720703125,35.05078125,37.37109375,34.68306350708008,34.60222244262695,33.579917907714844,31.84009552001953,31.788928985595703,29.416330337524414,29.652488708496094,27.526569366455078,27.38671875,26.26171875,30.2706241607666,24.998523712158203,32.5009765625,23.31671142578125,34.190120697021484,20.399517059326172,35.28596115112305,17.665790557861328,35.78849792480469,15.115530967712402,35.82421875,14.2734375,35.583168029785156,11.223187446594238,34.860015869140625,8.486950874328613,33.65475845336914,6.064727306365967,31.9674015045166,3.9565165042877197,29.64410972595215,2.185784339904785,27.159265518188477,.8323085308074951,24.512863159179688,-.10391119122505188,21.704906463623047,-.6228747963905334,19.51171875,-.73828125,16.397254943847656,-.535150945186615,13.541664123535156,.07424008101224899,10.9449462890625,1.089891791343689,8.607102394104004,2.5118041038513184,6.504549980163574,4.569301605224609,4.957869052886963,6.847413539886475,3.9670591354370117,9.34614086151123,3.5321204662323,12.065483093261719,3.515625,13.2890625,3.62109375,13.5,10.23046875,13.5,10.628458976745605,10.52513313293457,11.822431564331055,8.080921173095703,14.14232063293457,6.207763671875,16.670166015625,5.072887420654297,19.405969619750977,4.6762919425964355,19.51171875,4.67578125,22.593053817749023,5.02486515045166,25.119962692260742,6.072116374969482,27.08766746520996,8.277663230895996,28.33972930908203,10.727699279785156,28.876150131225586,13.422224998474121,28.8984375,14.1328125,28.579307556152344,17.37627601623535,27.621917724609375,19.90043067932129,25.462261199951172,21.754257202148438,22.976253509521484,22.91082000732422,20.163896560668945,23.3701229095459,19.6875,23.37890625],indices:[86,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,50,52,51,52,54,53,54,56,55,56,58,57,58,60,59,60,62,61,62,64,63,64,66,65,66,68,67,85,1,86,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,54,52,54,58,56,58,62,60,62,66,64,66,69,68,84,1,85,14,18,15,18,26,22,26,34,30,34,42,38,42,50,46,50,58,54,58,66,62,66,70,69,83,1,84,14,26,18,58,70,66,83,2,1,13,26,14,58,71,70,82,2,83,12,26,13,58,72,71,82,3,2,11,26,12,58,73,72,82,4,3,10,26,11,58,74,73,81,4,82,10,34,26,58,75,74,9,34,10,50,75,58,8,34,9,50,76,75,7,34,8,50,77,76,6,34,7,50,78,77,5,34,6,50,79,78,5,42,34,50,80,79,4,42,5,50,81,80,81,42,4,42,81,50],width:32.30859375},4:{positions:[31.81640625,51.1875,31.81640625,17.2265625,38.8828125,17.2265625,38.8828125,11.8125,31.81640625,11.8125,31.81640625,0,24.92578125,0,24.92578125,11.8125,1.93359375,11.8125,1.93359375,15.71484375,24.50390625,51.1875,31.81640625,51.1875,24.046875,39.515625,9.31640625,17.2265625,24.92578125,17.2265625,24.92578125,41.23828125,24.71484375,41.2734375],indices:[1,3,2,4,6,5,7,9,8,9,14,13,16,13,12,13,10,9,10,1,0,1,4,3,4,7,6,7,14,9,16,10,13,10,4,1,4,14,7,15,10,16,4,15,14,15,4,10],width:36.94921875},5:{positions:[11.91796875,22.5,6.15234375,23.09765625,9.10546875,51.1875,34.734375,51.1875,34.734375,45.03515625,14.9765625,45.03515625,13.2890625,30.65625,14.99853515625,31.75048828125,16.892578125,32.642578125,19.03271484375,33.25341796875,21.48046875,33.50390625,21.48046875,33.50390625,24.524171829223633,33.29277038574219,27.260135650634766,32.595733642578125,29.6883602142334,31.412792205810547,31.808847427368164,29.743946075439453,33.53106689453125,27.481525421142578,34.8779411315918,25.034576416015625,35.84947204589844,22.40309715270996,36.44565963745117,19.58709144592285,36.66650390625,16.586557388305664,36.66796875,16.3125,36.47660446166992,13.1383056640625,35.90251541137695,10.244234085083008,34.94569778442383,7.630287170410156,33.60615158081055,5.296463966369629,31.54420280456543,3.2312631607055664,29.28870391845703,1.597025990486145,26.839656829833984,.3937528729438782,24.197057723999023,-.3785564601421356,21.360912322998047,-.7199019193649292,20.49609375,-.73828125,17.404800415039062,-.5199803113937378,14.58151912689209,.13492262363433838,12.026251792907715,1.226427435874939,9.738997459411621,2.7545342445373535,7.902623653411865,4.662389278411865,6.586172580718994,6.943535327911377,5.78964376449585,9.59797191619873,5.513038158416748,12.625699043273926,5.51953125,13.25390625,5.58984375,13.46484375,11.84765625,13.46484375,12.231374740600586,10.424592018127441,13.382529258728027,7.983725547790527,15.769926071166992,6.059262275695801,18.29474449157715,4.960567474365234,20.49609375,4.67578125,23.407373428344727,5.077446937561035,25.80744171142578,6.282444000244141,27.603513717651367,8.744783401489258,28.85628890991211,11.317317962646484,29.565767288208008,14.000046730041504,29.7421875,16.2421875,29.464466094970703,19.35067367553711,28.631298065185547,22.06241226196289,26.50613021850586,24.628503799438477,24.30402374267578,26.380647659301758,22.024982452392578,27.31884002685547,20.49609375,27.4921875,17.11406707763672,27.2115478515625,14.758378028869629,26.369632720947266,13.049945831298828,24.7330322265625],indices:[2,4,3,6,8,7,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,2,5,4,6,9,8,12,16,14,16,20,18,20,24,22,24,28,26,28,32,30,32,36,34,36,40,38,40,43,42,1,5,2,12,20,16,20,28,24,28,36,32,36,43,40,1,6,5,36,44,43,1,9,6,36,45,44,28,45,36,28,46,45,28,47,46,28,48,47,28,49,48,20,49,28,20,50,49,20,51,50,20,52,51,20,53,52,20,54,53,20,55,54,12,55,20,12,56,55,12,57,56,12,58,57,12,59,58,12,60,59,12,61,60,1,11,9,11,61,12,62,1,0,1,61,11,61,1,62],width:31.154930591583252},6:{positions:[23.73046875,51.92578125,23.73046875,51.92578125,26.35400390625,51.7763671875,28.951171875,51.328125,31.31103515625,50.6513671875,33.22265625,49.81640625,33.22265625,49.81640625,31.74609375,44.5078125,29.98388671875,45.30322265625,28.142578125,45.931640625,26.09912109375,46.34033203125,23.73046875,46.4765625,23.73046875,46.4765625,20.900758743286133,46.15056610107422,18.386611938476562,45.17258071899414,16.18802833557129,43.5426025390625,14.465424537658691,41.076210021972656,13.138894081115723,38.50679397583008,12.208439826965332,35.8343505859375,11.67405891418457,33.05888366699219,11.53125,30.62109375,11.53125,29.8125,13.904020309448242,31.542055130004883,16.591995239257812,32.85417938232422,19.408527374267578,33.66147994995117,22.372249603271484,33.98829650878906,22.921875,33.99609375,25.913307189941406,33.7476806640625,28.614002227783203,33.002437591552734,31.023962020874023,31.7603702545166,33.143184661865234,30.021472930908203,34.91127014160156,27.67707633972168,36.273963928222656,25.183759689331055,37.23126983642578,22.541519165039062,37.783180236816406,19.750356674194336,37.93359375,17.2265625,37.749637603759766,14.08007526397705,37.19777297973633,11.182336807250977,36.27799606323242,8.533347129821777,34.99031066894531,6.1331071853637695,32.81218719482422,3.8232548236846924,30.5310001373291,1.9849358797073364,28.146751403808594,.6181499361991882,25.65943717956543,-.2771027684211731,23.069063186645508,-.7008222937583923,22.0078125,-.73828125,19.07733154296875,-.5163767337799072,16.358732223510742,.14933684468269348,13.852017402648926,1.2588595151901245,11.557185173034668,2.8121912479400635,9.638298988342285,5.0737128257751465,8.030496597290039,7.450648784637451,6.733777046203613,9.942998886108398,5.748140335083008,12.550763130187988,5.073586463928223,15.273941993713379,4.710115432739258,18.112533569335938,4.640625,20.07421875,4.640625,29.84765625,4.791966915130615,33.015262603759766,5.245992183685303,35.97719955444336,6.0027008056640625,38.73346710205078,7.062093257904053,41.28406524658203,8.424168586730957,43.62899398803711,10.08892822265625,45.768253326416016,12.196839332580566,47.81597900390625,14.478988647460938,49.4511604309082,16.93537712097168,50.673797607421875,19.56600570678711,51.483890533447266,22.370872497558594,51.881439208984375,21.375,28.828125,21.375,28.828125,18.29266357421875,28.514667510986328,15.669046401977539,27.57429313659668,13.216089248657227,25.754901885986328,11.53125,23.5546875,11.53125,23.5546875,11.53125,19.40625,11.72034740447998,16.05575180053711,12.287637710571289,13.114592552185059,13.233122825622559,10.582772254943848,15.422850608825684,7.959404945373535,17.641748428344727,6.1007585525512695,19.889812469482422,5.006833076477051,22.0078125,4.67578125,24.755970001220703,5.117502212524414,27.043012619018555,6.4426655769348145,28.768321990966797,9.139809608459473,30.00419807434082,11.825053215026855,30.75064468383789,14.498397827148438,31.007658004760742,17.15984344482422,31.0078125,17.2265625,30.737268447875977,20.334959030151367,29.925634384155273,23.062726974487305,28.57291030883789,25.409866333007812,26.557069778442383,27.331403732299805,24.112672805786133,28.470571517944336],indices:[2,4,3,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,65,67,66,21,25,23,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,61,59,61,65,63,65,68,67,21,29,25,29,37,33,37,45,41,45,53,49,57,65,61,57,68,65,73,57,74,68,2,1,2,6,4,6,8,7,53,75,57,72,57,73,68,6,2,6,9,8,53,76,75,71,57,72,68,9,6,53,77,76,70,57,71,68,10,9,53,78,77,68,12,10,53,79,78,68,13,12,45,79,53,68,14,13,45,80,79,68,15,14,45,81,80,57,15,68,45,82,81,57,16,15,45,83,82,57,17,16,45,84,83,57,18,17,37,84,45,57,19,18,37,85,84,57,20,19,37,86,85,57,21,20,37,87,86,70,21,57,37,88,87,70,29,21,37,89,88,95,29,70,37,90,89,94,29,95,29,90,37,93,29,94,29,91,90,92,29,93,29,92,91],width:33.29296875},7:{positions:[37.3359375,51.1875,37.3359375,45.73828125,35.06884002685547,42.96620559692383,32.99747848510742,40.27573776245117,31.121856689453125,37.666873931884766,29.441970825195312,35.13961410522461,27.957822799682617,32.6939582824707,26.669410705566406,30.329906463623047,25.576738357543945,28.047460556030273,24.585519790649414,25.34857940673828,23.679515838623047,22.592660903930664,22.85872459411621,19.779708862304688,22.123149871826172,16.909719467163086,21.47278594970703,13.982696533203125,20.907638549804688,10.998638153076172,20.427703857421875,7.957544803619385,20.109375,5.51953125,19.546875,0,12.62109375,0,13.18359375,5.51953125,13.624162673950195,8.682632446289062,14.162458419799805,11.7554292678833,14.798481941223145,14.737921714782715,15.532232284545898,17.630107879638672,16.363710403442383,20.431991577148438,17.29291534423828,23.14356803894043,18.319847106933594,25.764841079711914,19.59184455871582,28.50404167175293,20.94556999206543,31.184146881103516,22.381019592285156,33.80515670776367,23.898197174072266,36.367069244384766,25.497098922729492,38.86988830566406,27.17772674560547,41.31361389160156,28.940080642700195,43.6982421875,30.55078125,45.73828125,2.70703125,45.73828125,2.70703125,51.1875],indices:[36,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,1,36,14,18,15,18,26,22,26,34,30,34,2,1,13,18,14,18,34,26,34,3,2,12,18,13,34,4,3,11,18,12,34,5,4,10,18,11,34,6,5,9,18,10,34,7,6,8,18,9,34,8,7,8,34,18],width:34.62890625},8:{positions:[35.5078125,37.828125,35.5078125,37.828125,35.171749114990234,34.87995147705078,34.16355895996094,32.23108673095703,32.111854553222656,29.74087905883789,29.926387786865234,27.833354949951172,27.60715675354004,26.50851058959961,27.17578125,26.33203125,29.95149040222168,25.094419479370117,32.32651901245117,23.460092544555664,34.43555450439453,20.72713279724121,35.900413513183594,18.128986358642578,36.721099853515625,15.665656089782715,36.9140625,13.8515625,36.669769287109375,10.764041900634766,35.936893463134766,8.031349182128906,34.71543502807617,5.653482913970947,33.00539016723633,3.630444288253784,30.672534942626953,1.9876797199249268,28.159135818481445,.7305349111557007,25.465194702148438,-.14099019765853882,22.590709686279297,-.6268956065177917,20.28515625,-.73828125,17.073928833007812,-.5518752932548523,14.154998779296875,.007342617027461529,11.52836799621582,.9393724799156189,9.194035530090332,2.2442142963409424,7.087226867675781,4.249664306640625,5.474374294281006,6.483748912811279,4.355478763580322,8.946466445922852,3.730539560317993,11.637818336486816,3.5859375,13.8515625,3.9077277183532715,16.76708984375,4.873098373413086,19.430402755737305,6.983664512634277,21.999971389770508,9.1663179397583,24.03520965576172,11.421058654785156,25.536113739013672,13.21875,26.33203125,10.521642684936523,27.690086364746094,8.310940742492676,29.498327255249023,6.554880142211914,32.2148551940918,5.462681293487549,34.86786651611328,5.034343719482422,37.45735549926758,5.02734375,37.828125,5.274991512298584,40.936737060546875,6.0179338455200195,43.679622650146484,7.256171703338623,46.056785583496094,8.989704132080078,48.0682258605957,11.195730209350586,49.67716598510742,13.679861068725586,50.85453796386719,16.442096710205078,51.60033416748047,19.482437133789062,51.914554595947266,20.21484375,51.92578125,23.33972930908203,51.71018600463867,26.17371940612793,51.06340789794922,28.716812133789062,49.98543930053711,30.96900749206543,48.476287841796875,32.855812072753906,46.481101989746094,34.23870849609375,44.16929626464844,35.11769485473633,41.54087829589844,35.49277114868164,38.5958366394043,30.0234375,13.9921875,30.0234375,13.9921875,29.64218521118164,16.91078758239746,28.498428344726562,19.414352416992188,26.08045768737793,21.54735565185547,23.622779846191406,22.934738159179688,21.125396728515625,23.576496124267578,20.21484375,23.625,17.24955177307129,23.25731658935547,14.728343963623047,22.15427017211914,12.576437950134277,19.76153564453125,11.184748649597168,17.31914710998535,10.553275108337402,14.827102661132812,10.51171875,13.9921875,10.887092590332031,10.988458633422852,12.013215065002441,8.51321792602539,14.405669212341309,6.533318519592285,16.906885147094727,5.263905048370361,19.516860961914062,4.704977512359619,20.28515625,4.67578125,23.29867172241211,5.026233196258545,25.858081817626953,6.077588081359863,28.013742446899414,8.338984489440918,29.392438888549805,10.737264633178711,29.994173049926758,13.27242660522461,28.58203125,37.6875,28.58203125,37.6875,28.174694061279297,40.610374450683594,26.952680587768555,43.08668899536133,24.61227035522461,45.108375549316406,22.137697219848633,46.228328704833984,20.21484375,46.4765625,17.313322067260742,46.03565979003906,14.926724433898926,44.71294403076172,13.154691696166992,42.36640930175781,12.172061920166016,39.77567672729492,11.953125,37.6875,12.353304862976074,34.70274353027344,13.553845405578613,32.25563430786133,15.877814292907715,30.335918426513672,18.399682998657227,29.288454055786133,20.28515625,29.07421875,23.187891006469727,29.511512756347656,25.59459114074707,30.82339859008789,27.39614486694336,33.1435661315918,28.379940032958984,35.7212028503418],indices:[96,43,97,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,1,60,1,3,2,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,75,74,73,31,74,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,98,97,95,43,96,43,47,45,47,51,49,51,55,53,55,59,57,59,3,1,3,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,76,75,72,31,73,31,35,33,37,41,39,41,98,43,94,43,95,43,51,47,51,59,55,59,7,3,7,15,11,15,23,19,23,31,27,31,77,76,71,31,72,31,37,35,37,98,41,94,51,43,23,77,31,70,31,71,37,99,98,93,51,94,23,78,77,70,37,31,37,100,99,92,51,93,23,79,78,69,37,70,37,101,100,91,51,92,23,80,79,68,37,69,37,102,101,90,51,91,23,81,80,67,37,68,37,103,102,89,51,90,15,81,23,66,37,67,89,59,51,15,82,81,66,103,37,88,59,89,15,83,82,65,103,66,87,59,88,15,84,83,64,103,65,106,59,87,15,85,84,64,104,103,105,59,106,15,62,85,63,104,64,104,59,105,15,63,62,104,7,59,7,63,15,63,7,104],width:33.328125},9:{positions:[17.96484375,4.67578125,17.96484375,4.67578125,20.832611083984375,5.023819923400879,23.333181381225586,6.067935943603516,25.466554641723633,7.80812931060791,26.91764259338379,9.993691444396973,28.0020751953125,12.483912467956543,28.7198543548584,15.278792381286621,29.070980072021484,18.378332138061523,29.109375,19.8984375,29.109375,22.21875,27.17138671875,20.02587890625,24.802734375,18.439453125,22.097061157226562,17.482282638549805,19.10603904724121,17.156333923339844,19.0546875,17.15625,15.962648391723633,17.374753952026367,13.161947250366211,18.030263900756836,10.65258502960205,19.12278175354004,8.43455982208252,20.652305603027344,6.556478023529053,22.870075225830078,5.067807197570801,25.25521469116211,3.968548536300659,27.80772590637207,3.2587015628814697,30.527606964111328,2.9382660388946533,33.414859771728516,2.91796875,34.3828125,3.1171858310699463,37.45964050292969,3.7148373126983643,40.29710006713867,4.710922718048096,42.89520263671875,6.105442523956299,45.253936767578125,8.45276927947998,47.5704231262207,10.840720176696777,49.39479446411133,13.269293785095215,50.72705078125,15.738492012023926,51.56719207763672,18.248313903808594,51.915218353271484,18.7734375,51.92578125,21.87710189819336,51.72084045410156,24.703197479248047,51.10601806640625,27.25172233581543,50.0813102722168,29.52267837524414,48.646724700927734,31.40683364868164,46.456634521484375,32.97002410888672,44.11880111694336,34.212249755859375,41.63322067260742,35.133514404296875,38.99989700317383,35.73381423950195,36.21882629394531,36.01314926147461,33.29001235961914,36.03515625,32.16796875,36.03515625,19.96875,35.885276794433594,16.642547607421875,35.435638427734375,13.59611988067627,34.686241149902344,10.8294677734375,33.6370849609375,8.34259033203125,32.28816604614258,6.135488033294678,30.066654205322266,3.964623212814331,27.738887786865234,2.2044835090637207,25.30486488342285,.8550683259963989,22.764589309692383,-.08362190425395966,20.118059158325195,-.6115872859954834,17.96484375,-.73828125,15.23583984375,-.61083984375,12.462890625,-.228515625,9.81298828125,.41748046875,7.453125,1.3359375,7.453125,1.3359375,8.5078125,6.64453125,10.62158203125,5.71728515625,12.814453125,5.115234375,15.21826171875,4.78564453125,17.96484375,4.67578125,19.0546875,22.5703125,19.0546875,22.5703125,22.15691566467285,22.88543701171875,24.769695281982422,23.830808639526367,27.256725311279297,25.793380737304688,28.883312225341797,27.970977783203125,29.109375,28.44140625,29.109375,32.87109375,28.917926788330078,36.28435516357422,28.34358024597168,39.213134765625,27.386337280273438,41.657432556152344,25.37175941467285,43.94849395751953,23.127288818359375,45.50687026977539,20.652921676635742,46.33256530761719,18.984375,46.4765625,16.33090591430664,46.012935638427734,13.984920501708984,44.62206268310547,12.139910697937012,42.07911682128906,10.835031509399414,39.48687744140625,10.070281982421875,36.84534454345703,9.84375,34.3828125,10.09748363494873,31.21339988708496,10.858684539794922,28.454280853271484,12.127352714538574,26.105453491210938,14.162574768066406,24.085222244262695,16.57485580444336,22.90838050842285],indices:[60,63,61,63,65,64,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,89,25,88,25,89,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,63,60,63,66,65,10,14,12,14,18,16,18,22,20,22,89,24,87,25,88,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,63,59,63,67,66,10,18,14,18,89,22,86,25,87,25,33,29,33,41,37,41,49,45,49,57,53,57,67,63,18,90,89,85,25,86,57,1,67,18,91,90,85,33,25,57,2,1,18,92,91,84,33,85,57,3,2,18,93,92,83,33,84,49,3,57,18,94,93,82,33,83,49,4,3,18,70,94,81,33,82,49,5,4,10,70,18,80,33,81,49,6,5,10,71,70,80,41,33,49,7,6,10,72,71,79,41,80,41,7,49,10,73,72,78,41,79,41,8,7,10,74,73,77,41,78,41,9,8,10,75,74,76,41,77,41,10,9,75,41,76,41,75,10],width:33.1171875},".":{positions:[12.5859375,7.1015625,12.5859375,0,5.66015625,0,5.66015625,7.1015625],indices:[3,1,0,1,3,2],width:6.92578125},m:{positions:[5.02734375,38.0390625,11.21484375,38.0390625,11.70703125,33.046875,13.634581565856934,35.28191375732422,15.986680030822754,37.00302505493164,18.700471878051758,38.111698150634766,21.567134857177734,38.6696662902832,23.09765625,38.7421875,26.139192581176758,38.42292022705078,28.791221618652344,37.465118408203125,31.15591812133789,35.599586486816406,32.90284729003906,33.37240219116211,33.71484375,31.7109375,35.408084869384766,34.171592712402344,37.503177642822266,36.16951370239258,40.22900390625,37.6488037109375,42.961280822753906,38.50468063354492,45.3515625,38.7421875,48.32835006713867,38.446842193603516,50.9460334777832,37.5608024597168,53.204620361328125,36.084068298339844,54.8843879699707,33.86517333984375,56.19401931762695,31.434070587158203,57.133506774902344,28.79076385498047,57.70286178588867,25.93524932861328,57.90207290649414,22.867528915405273,57.90234375,22.74609375,57.90234375,0,50.9765625,0,50.9765625,22.81640625,50.74445724487305,26.319555282592773,50.04814529418945,29.033550262451172,47.956382751464844,31.33014678955078,45.659942626953125,32.691036224365234,43.27734375,33.1171875,40.4267463684082,32.6451530456543,38.09538650512695,31.229045867919922,36.33670425415039,28.815231323242188,35.26606750488281,26.190664291381836,34.9453125,24.43359375,34.9453125,24.15234375,34.9453125,0,27.984375,0,27.984375,22.81640625,27.73810386657715,26.2243709564209,26.99928855895996,28.921852111816406,24.89556121826172,31.278352737426758,22.623031616210938,32.67652893066406,20.28515625,33.1171875,17.40234375,32.7919921875,15.08203125,31.81640625,13.2802734375,30.251953125,11.953125,28.16015625,11.953125,28.16015625,11.953125,0,5.02734375,0],indices:[55,1,0,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,40,42,41,54,1,55,2,6,4,6,10,8,12,16,14,16,20,18,20,24,22,24,28,26,39,42,40,54,2,1,2,10,6,12,20,16,20,28,24,38,42,39,20,29,28,38,43,42,20,30,29,37,43,38,20,31,30,36,43,37,20,32,31,36,44,43,20,33,32,35,44,36,20,34,33,35,45,44,12,34,20,12,35,34,12,45,35,10,45,12,10,46,45,10,47,46,10,48,47,2,48,10,2,49,48,2,50,49,2,51,50,2,53,51,53,2,54],width:52.875},c:{positions:[20.49609375,4.67578125,20.49609375,4.67578125,23.36757469177246,5.087423801422119,25.919267654418945,6.322350978851318,28.055252075195312,8.557517051696777,29.08038330078125,10.95840835571289,29.1796875,12.0234375,35.40234375,12.0234375,35.47265625,11.8125,35.209197998046875,9.178794860839844,34.224666595458984,6.713964939117432,32.519065856933594,4.418010711669922,29.943574905395508,2.4374680519104004,27.361528396606445,.9345490336418152,24.772926330566406,-.0907462015748024,22.177766799926758,-.6384177803993225,20.49609375,-.73828125,17.386640548706055,-.5293084979057312,14.578433990478516,.09760986268520355,12.071474075317383,1.142473816871643,9.86575984954834,2.605283260345459,7.9612932205200195,4.4860382080078125,6.3618083000183105,6.765913009643555,5.107275009155273,9.241913795471191,4.197693824768066,11.914040565490723,3.633063793182373,14.782294273376465,3.4133858680725098,17.8466739654541,3.41015625,18.28125,3.41015625,19.7578125,3.5838754177093506,22.87480926513672,4.105032920837402,25.780019760131836,4.973628997802734,28.473445892333984,6.189663410186768,30.95508575439453,7.753136157989502,33.22494125366211,9.646564483642578,35.16857147216797,11.828062057495117,36.69178771972656,14.297628402709961,37.79460144042969,17.05526351928711,38.47700500488281,20.100967407226562,38.73899841308594,20.49609375,38.7421875,23.570213317871094,38.5140495300293,26.36119842529297,37.82963943481445,28.869049072265625,36.6889533996582,31.093765258789062,35.09199523925781,33.085479736328125,32.87481689453125,34.484825134277344,30.467679977416992,35.29180145263672,27.87058448791504,35.5078125,25.13671875,35.4375,24.92578125,29.1796875,24.92578125,28.72093391418457,27.737882614135742,27.34467315673828,30.163320541381836,24.98297119140625,32.04195022583008,22.43872833251953,33.074039459228516,20.49609375,33.29296875,17.510202407836914,32.94111633300781,15.082853317260742,31.88556480407715,13.214049339294434,30.12630844116211,11.89155101776123,27.541250228881836,10.979540824890137,24.808610916137695,10.478017807006836,21.928388595581055,10.37109375,19.7578125,10.37109375,18.28125,10.565627098083496,15.065240859985352,11.149227142333984,12.176401138305664,12.121894836425781,9.614731788635254,13.855029106140137,7.324370861053467,15.960027694702148,5.741883754730225,18.4368896484375,4.867271423339844],indices:[5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,4,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,35,33,35,39,37,39,43,41,43,47,45,47,50,49,3,7,4,7,15,11,15,23,19,23,31,27,31,39,35,39,47,43,47,51,50,3,15,7,39,51,47,2,15,3,39,52,51,39,53,52,39,54,53,39,55,54,31,55,39,31,56,55,31,57,56,31,58,57,23,58,31,23,59,58,23,60,59,23,61,60,23,62,61,23,63,62,23,64,63,23,65,64,23,66,65,15,66,23,15,67,66,15,68,67,15,1,68,1,15,2],width:32.09765625},k:{positions:[28.828125,0,16.48828125,17.54296875,11.98828125,17.54296875,11.98828125,0,5.0625,0,5.0625,54.84375,11.98828125,54.84375,11.98828125,23.0625,16.41796875,23.0625,26.82421875,38.0390625,35.12109375,38.0390625,22.11328125,20.7421875,36.984375,0],indices:[12,1,0,2,4,3,4,6,5,8,10,9,11,1,12,4,7,6,8,11,10,11,2,1,2,7,4,7,11,8,11,7,2],width:31.921875},t:{positions:[0,0,30,0],indices:[0,2,1],width:30}," ":{width:16,positions:[],indices:[]}};function CVt({text:t,size:e=1,zOffset:i=0}){const o=[],r=[];let n=0,a=0;const s=10;e/=100;for(const l of t){const c=wVt[l];if(!c)throw new Error("Unknown character: "+l);const d=a;for(let h=0;h<c.positions.length;h+=2)o.push(c.positions[h]*e+d,c.positions[h+1]*e,i);const u=n===0?0:n+1;for(const h of c.indices)r.push(h+u),n=Math.max(n,h+u);a+=(c.width+s)*e}return{positions:o,indices:r,primitive:"triangles"}}function Qte(t,{content:e,size:i,matrix:o,offset:r=0}){const{material:n,origin:a,plugin:s}=t,{textSizeRatio:l,textBottomMarginRatio:c,xeokitSdk:d,viewer:u}=s,{Mesh:h,VBOGeometry:p,math:A}=d,{scene:f}=u,{primitive:m,positions:g,indices:y}=CVt({text:e,size:i*l,zOffset:r});let v=g[0],b=g[0];for(let P=0;P<g.length;P+=3){const T=g[P];T<v&&(v=T),T>b&&(b=T)}const x=-(b-v)/2,k=A.mat4(),E=A.translationMat4v([x,i*c,0]);A.mulMat4(o,A.rotationMat4v(Math.PI,[0,1,0],A.mat4()),k),A.mulMat4(o,E),A.mulMat4(k,E);const B=new p(f,{primitive:m,positions:g,indices:y});return[new h(f,{geometry:B,material:n,pickable:!1,origin:a,matrix:o}),new h(f,{geometry:B,material:n,pickable:!1,origin:a,matrix:k})]}class xVt{constructor(e,i,o){this.plugin=e;const{viewer:r}=e;this.line=null,this.texts=null,this.length=0;const{math:n,worldToRTCPos:a,Node:s,PhongMaterial:l}=e.xeokitSdk,c=n.vec3(),d=n.vec3();a(i,d,c),this.material=new l(r.scene,{emissive:$1(e.defaultColor)}),this.node=new s(r.scene,{pickable:!1,origin:d,children:[]}),this.origin=d,this.p1=c,this.normal=o}move(e,i){const{arrowSizeRatio:o,offsetRatio:r,xeokitSdk:n,viewer:a}=this.plugin,{math:s,Mesh:l,VBOGeometry:c}=n,{scene:d}=a,u=this.p1;this.p2=s.subVec3(e,this.origin),this.node.removeChildren(),this.line?.destroy();const h=s.subVec3(e,u,s.vec3());if(h.every(Ce=>Ce===0))return;const p=s.normalizeVec3(h,s.vec3()),A=s.mulVec3Scalar(p,-1,s.vec3()),f=s.lenVec3(h);this.length=f;const m=r*f;let g=0;const y=s.mulVec3Scalar(h,.5,s.vec3()),v=s.addVec3(u,y,s.vec3());let b=s.normalizeVec3(s.cross3Vec3(i,s.normalizeVec3(h,s.vec3()),s.vec3()));const x=s.dotVec3(i,this.normal)>.999,k=s.vec3([0,1,0]),E=s.dotVec3(p,k);if(x){const Ce=Math.abs(E)<.01;g=m;let Le=null;if(Ce){const{look:Fe,up:ve,eye:me}=d.camera,we=s.normalizeVec3(s.subVec3(Fe,me,s.vec3())),Re=s.cross3Vec3(we,ve);Le=s.dotVec3(p,Re)}else{const Fe=s.cross3Vec3(k,i,s.vec3());Le=s.dotVec3(p,Fe)}Le<0&&(b=s.negateVec3(b),g=-g)}else if(Math.abs(E)>.99){const{look:Ce,eye:Le}=d.camera,Fe=s.normalizeVec3(s.subVec3(Ce,Le,s.vec3()));b=s.normalizeVec3(s.cross3Vec3(p,Fe,s.vec3())),i=s.normalizeVec3(s.cross3Vec3(b,p,s.vec3()))}else i=s.normalizeVec3(s.cross3Vec3(k,p,s.vec3())),b=s.normalizeVec3(s.cross3Vec3(p,i,s.vec3())),s.dotVec3(b,k)<0&&(b=s.negateVec3(b));const B=s.negateVec3(b,s.vec3()),P=s.mulVec3Scalar(b,f*o,s.vec3()),T=s.mulVec3Scalar(B,f*o,s.vec3()),S=s.addVec3(u,P,s.vec3()),R=s.addVec3(u,T,s.vec3()),F=s.addVec3(e,P,s.vec3()),U=s.addVec3(e,T,s.vec3()),q=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(b,p,s.vec3())),f*o*Math.SQRT2),V=s.addVec3(u,q,s.vec3()),W=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(B,p,s.vec3())),f*o*Math.SQRT2),Y=s.addVec3(u,W,s.vec3()),$=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(b,A,s.vec3())),f*o*Math.SQRT2),fe=s.addVec3(e,$,s.vec3()),Me=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(B,A,s.vec3())),f*o*Math.SQRT2),Se=s.addVec3(e,Me,s.vec3()),qe=s.translationMat4v(s.mulVec3Scalar(i,m,s.vec3()));this.line=new l(a.scene,{geometry:new c(a.scene,{primitive:"lines",positions:[...u,...e,...S,...R,...F,...U,...V,...Y,...fe,...Se],indices:[0,1,0,2,0,3,0,6,0,7,1,4,1,5,1,8,1,9]}),material:this.material,matrix:qe,pickable:!1,origin:this.origin}),this.node.addChild(this.line),this.texts?.forEach(Ce=>Ce.destroy());const Qe=s.mat4([...p,0,...b,0,...i,0,...v,1]);this.texts=this._makeTexts(f.toFixed(2)+" m",f,Qe,g),this.texts.forEach(Ce=>this.node.addChild(Ce))}_makeTexts(e,i,o,r=0){return Qte(this,{content:e,size:i,matrix:o,offset:r})}destroy(){this.node.destroy(),this.line?.destroy(),this.texts?.forEach(e=>e.destroy()),this.plugin.measurements=this.plugin.measurements.filter(e=>e!==this)}get visible(){return this.node.visible}set visible(e){this.node.visible=e}get color(){return zte(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=$1(e)}}class Gte{constructor(e,i,o={}){this.viewer=e,this.xeokitSdk=i,this.arrowSizeRatio=o.arrowSizeRatio??.04,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.02,this.offsetRatio=o.offsetRatio??.003,this.snapPickRadius=o.snapPickRadius??15,this.defaultColor=o.defaultColor??"#ffffff";const r=document.createElement("img"),n=e.scene.canvas.canvas;n.parentNode.insertBefore(r,n),r.style.width="28px",r.style.height="28px",r.style.position="absolute",r.style.pointerEvents="none",r.style.transform="translate(-50%, -50%)",r.style.display="none",this.imgElement=r,this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new kVt(this)}on(e,i){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=i,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class kVt{constructor(e){this.plugin=e,this.currentMeasurement=null,this.lastPosition=null,this.mouseDown=!1,this.dragging=!1,this.activated=!1}_updateCursor(e){const{imgElement:i,viewer:o}=this.plugin,{scene:r}=o;r.canvas.canvas.style.cursor=`url("${bVt}") 16 16, auto`;const n=r.pick({canvasPos:e,snapRadius:this.plugin.snapPickRadius,snapToEdge:!0,snapToVertex:!0});if(n?.snappedWorldPos||n?.worldPos){if(n.snappedCanvasPos)i.style.left=`${n.snappedCanvasPos[0]}px`,i.style.top=`${n.snappedCanvasPos[1]}px`,i.src=n.snapType==="vertex"?mVt:gVt;else{const a=n.canvasPos;i.style.left=`${a[0]}px`,i.style.top=`${a[1]}px`,i.src=vVt}this.lastPosition=n.snappedWorldPos??n.worldPos,this.lastPosition.worldNormal=n.snappedWorldNormal??n.worldNormal}else i.style.left=`${e[0]}px`,i.style.top=`${e[1]}px`,i.src=yVt,this.lastPosition=null}_onMouseMove(e){this.mouseDown&&(this.dragging=!0),e.preventDefault(),this._updateCursor([e.offsetX,e.offsetY]),this.lastPosition&&this.currentMeasurement?.move(this.lastPosition,this.lastPosition.worldNormal)}_onMouseDown(){this.mouseDown=!0}_onMouseUp(){this.mouseDown=!1;const e=this.dragging;this.dragging=!1,!e&&this.lastPosition&&(this.currentMeasurement?(this.plugin.measurements.push(this.currentMeasurement),Object.values(this.plugin.measurementEndCallbacks).forEach(i=>i?.(this.currentMeasurement)),this.currentMeasurement=null):this.currentMeasurement=new xVt(this.plugin,this.lastPosition,this.lastPosition.worldNormal))}activate(){if(this.activated)return;const{canvas:e}=this.plugin.viewer.scene.canvas;this.plugin.imgElement.style.display="block";const i=this._onMouseMove.bind(this),o=this._onMouseDown.bind(this),r=this._onMouseUp.bind(this);e.addEventListener("mousemove",i),e.addEventListener("mousedown",o),document.addEventListener("mouseup",r),this._unsubscribe=()=>{e.removeEventListener("mousemove",i),e.removeEventListener("mousedown",o),document.removeEventListener("mouseup",r)},this.activated=!0}deactivate(){this.activated&&(this._unsubscribe?.(),this.currentMeasurement?.destroy(),this.currentMeasurement=null,this.lastPosition=null,this.plugin.imgElement.style.display="none",this.activated=!1)}}class MVt{constructor(e,i){this.plugin=e;const{xeokitSdk:o,viewer:r}=e,{Mesh:n,ReadableGeometry:a,buildSphereGeometry:s,PhongMaterial:l,Node:c,math:d,worldToRTCPos:u}=o,h=d.vec3(),p=d.vec3();this._length=0;const{entity:A,worldPos:f}=i;u(f,p,h);const m=new l(r.scene,{emissive:$1(e.defaultColor),diffuse:[0,0,0]}),g=(k=!0)=>new n(r.scene,{geometry:new a(r.scene,s({radius:.03})),material:m,pickable:!1,visible:k,origin:p}),y=g(),v=g(!1),b=new n(r.scene,{geometry:new a(r.scene,{primitive:"lines",positions:[0,0,0,0,0,0],indices:[0,1]}),material:m,pickable:!1,visible:!1,origin:p}),x=new c(r.scene,{pickable:!1,visible:!0,position:h,origin:p,children:[y,b,v]});this.origin=p,this.modelId=A.model.id,this.node=x,this.toSphere=v,this.fromSphere=y,this.line=b,this.material=m}show(e){const{node:i,fromSphere:o,toSphere:r,line:n,texts:a,plugin:s}=this,{math:l}=s.xeokitSdk;i.position=l.subVec3(e.worldPos,i.origin,l.vec3()),i.visible=!0;const{viewer:c}=s,d=c.scene.pick({pickSurface:!0,origin:e.worldPos,direction:e.worldNormal});if(a&&(a.forEach(u=>u.destroy()),this.texts=null),d){r.visible=!0,n.visible=!0,r.position=l.subVec3(d.worldPos,r.origin,l.vec3()),r.position=l.subVec3(r.position,i.position,l.vec3()),n.position=l.vec3().set(i.position),n.geometry.positions=[0,0,0,...r.position];const u=l.lenVec3(r.position);this._length=u;const h=o.position,p=r.position,A=l.subVec3(p,h,l.vec3()),f=l.normalizeVec3(A,l.vec3()),m=l.mulVec3Scalar(A,.5,l.vec3()),g=l.addVec3(h,m,l.vec3()),y=[0,1,0],v=l.dotVec3(f,y),b=Math.abs(v)>.9;let x;if(b){const k=l.normalizeVec3(l.subVec3(c.scene.camera.eye,c.scene.camera.look,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(k,f,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(E,f,l.vec3()),l.vec3());x=l.mat4([...f,0,...E,0,...B,0,...g,1])}else{const k=l.normalizeVec3(l.cross3Vec3(y,f,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(f,k,l.vec3()),l.vec3());x=l.mat4([...f,0,...E,0,...k,0,...g,1])}this.texts=this._makeTexts(u.toFixed(2)+" m",u,x),this.texts.forEach(k=>i.addChild(k))}else r.visible=!1,n.visible=!1,this._length=0}hide(){this.node.visible=!1}destroy(){this.node.destroy(),this.line.destroy(),this.fromSphere.destroy(),this.toSphere.destroy(),this.texts?.forEach(e=>e.destroy())}set length(e){this._length=e}get length(){return this.visible?this._length:0}get visible(){return this.node.visible===!0}set visible(e){this.node.visible=!!e}get color(){return zte(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=$1(e)}_makeTexts(e,i,o){return Qte(this,{content:e,size:i,matrix:o})}}class Kte{constructor(e,i,o={}){this.viewer=e,this.xeokitSdk=i,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.01,this.defaultColor=o.defaultColor??"#ffffff",this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new EVt(this)}on(e,i){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=i,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class EVt{constructor(e){this.plugin=e,this.currentMeasure=null,this.pickedSpaceMeasureSubscription=null,this.hitHelperMouseMoveSubscription=null}activate(){const{plugin:e}=this,{viewer:i}=e;this.pickedSpaceMeasureSubscription=i.scene.input.on("mouseclicked",()=>{if(!this.currentMeasure?.length)return;const o=this.currentMeasure;this.currentMeasure=null,Object.values(this.plugin.measurementEndCallbacks).forEach(r=>r(o))}),this.hitHelperMouseMoveSubscription=i.scene.input.on("mousemove",o=>{const r=i.scene.pick({canvasPos:o,pickSurface:!0});r?.entity?.model&&(r?((!this.currentMeasure||this.currentMeasure.modelId!==r.entity.model.id)&&(this.currentMeasure?.destroy(),this.currentMeasure=new MVt(this.plugin,r)),this.currentMeasure.show(r)):this.currentMeasure?.hide())})}deactivate(){const{viewer:e}=this.plugin;this.currentMeasure?.destroy(),this.currentMeasure=null,e.scene.input.off(this.pickedSpaceMeasureSubscription),e.scene.input.off(this.hitHelperMouseMoveSubscription)}}const BVt=`onmessage = async event => {
1384
+ }`}function Y$(t,e=!0,i){const o=i||new Set;if(t){if(X$(t))o.add(t);else if(X$(t.buffer))o.add(t.buffer);else if(!ArrayBuffer.isView(t)&&e&&typeof t=="object")for(const r in t)Y$(t[r],e,o)}return i===void 0?Array.from(o):[]}function X$(t){return t?t instanceof ArrayBuffer||typeof MessagePort<"u"&&t instanceof MessagePort||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas:!1}const uS=()=>{};class hS{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&Ga||typeof cS<"u"&&!Ga}constructor(e){const{name:i,source:o,url:r}=e;wc(o||r),this.name=i,this.source=o,this.url=r,this.onMessage=uS,this.onError=n=>console.log(n),this.worker=Ga?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=uS,this.onError=uS,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,i){i=i||Y$(e),this.worker.postMessage(e,i)}_getErrorFromErrorEvent(e){let i="Failed to load ";return i+=`worker ${this.name} from ${this.url}. `,e.message&&(i+=`${e.message} in `),e.lineno&&(i+=`:${e.lineno}:${e.colno}`),new Error(i)}_createBrowserWorker(){this._loadableURL=wDt({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=i=>{i.data?this.onMessage(i.data):this.onError(new Error("No data received"))},e.onerror=i=>{this.onError(this._getErrorFromErrorEvent(i)),this.terminated=!0},e.onmessageerror=i=>console.error(i),e}_createNodeWorker(){let e;if(this.url){const i=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new cS(i,{eval:!1})}else if(this.source)e=new cS(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",i=>{this.onMessage(i)}),e.on("error",i=>{this.onError(i)}),e.on("exit",i=>{}),e}}class kDt{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return hS.isSupported()}constructor(e){this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,i=(r,n,a)=>r.done(a),o=(r,n)=>r.error(n)){const r=new Promise(n=>(this.jobQueue.push({name:e,onMessage:i,onError:o,onStart:n}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const i=this.jobQueue.shift();if(i){this.onDebug({message:"Starting job",name:i.name,workerThread:e,backlog:this.jobQueue.length});const o=new bDt(i.name,e);e.onMessage=r=>i.onMessage(o,r.type,r.payload),e.onError=r=>i.onError(o,r),i.onStart(o);try{await o.result}catch(r){console.error(`Worker exception: ${r}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!Ga||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new hS({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return yDt?this.maxMobileConcurrency:this.maxConcurrency}}const MDt={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class gu{props;workerPools=new Map;static _workerFarm;static isSupported(){return hS.isSupported()}static getWorkerFarm(e={}){return gu._workerFarm=gu._workerFarm||new gu({}),gu._workerFarm.setProps(e),gu._workerFarm}constructor(e){this.props={...MDt},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const i of this.workerPools.values())i.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:i,source:o,url:r}=e;let n=this.workerPools.get(i);return n||(n=new kDt({name:i,source:o,url:r}),n.setProps(this._getWorkerPoolProps()),this.workerPools.set(i,n)),n}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function EDt(t,e={}){const i=e[t.id]||{},o=Ga?`${t.id}-worker.js`:`${t.id}-worker-node.js`;let r=i.workerUrl;if(!r&&t.id==="compression"&&(r=e.workerUrl),e._workerType==="test"&&(Ga?r=`modules/${t.module}/dist/${o}`:r=`modules/${t.module}/src/workers/${t.id}-worker-node.ts`),!r){let n=t.version;n==="latest"&&(n=mDt);const a=n?`@${n}`:"";r=`https://unpkg.com/@loaders.gl/${t.module}${a}/dist/${o}`}return wc(r),r}function BDt(t,e=J$){wc(t,"no worker provided");const i=t.version;return!(!e||!i)}const pS={};async function xh(t,e=null,i={},o=null){return e&&(t=PDt(t,e,i,o)),pS[t]=pS[t]||IDt(t),await pS[t]}function PDt(t,e,i={},o=null){if(!i.useLocalLibraries&&t.startsWith("http"))return t;o=o||t;const r=i.modules||{};return r[o]?r[o]:Ga?i.CDN?(wc(i.CDN.startsWith("http")),`${i.CDN}/${e}@${J$}/dist/libs/${o}`):lS?`../src/libs/${o}`:`modules/${e}/src/libs/${o}`:`modules/${e}/dist/libs/${o}`}async function IDt(t){if(t.endsWith("wasm"))return await TDt(t);if(!Ga)try{const{requireFromFile:i}=globalThis.loaders||{};return await i?.(t)}catch(i){return console.error(i),null}if(lS)return importScripts(t);const e=await DDt(t);return SDt(e,t)}function SDt(t,e){if(!Ga){const{requireFromString:o}=globalThis.loaders||{};return o?.(t,e)}if(lS)return eval.call(globalThis,t),null;const i=document.createElement("script");i.id=e;try{i.appendChild(document.createTextNode(t))}catch{i.text=t}return document.body.appendChild(i),null}async function TDt(t){const{readFileAsArrayBuffer:e}=globalThis.loaders||{};return Ga||!e||t.startsWith("http")?await(await fetch(t)).arrayBuffer():await e(t)}async function DDt(t){const{readFileAsText:e}=globalThis.loaders||{};return Ga||!e||t.startsWith("http")?await(await fetch(t)).text():await e(t)}function RDt(t,e){return!gu.isSupported()||!Ga&&!e?._nodeWorkers?!1:t.worker&&e?.worker}async function LDt(t,e,i,o,r){const n=t.id,a=EDt(t,i),s=gu.getWorkerFarm(i).getWorkerPool({name:n,url:a});i=JSON.parse(JSON.stringify(i)),o=JSON.parse(JSON.stringify(o||{}));const l=await s.startJob("process-on-worker",_Dt.bind(null,r));return l.postMessage("process",{input:e,options:i,context:o}),await(await l.result).result}async function _Dt(t,e,i,o){switch(i){case"done":e.done(o);break;case"error":e.error(new Error(o.error));break;case"process":const{id:r,input:n,options:a}=o;try{const s=await t(n,a);e.postMessage("done",{id:r,result:s})}catch(s){const l=s instanceof Error?s.message:"unknown error";e.postMessage("error",{id:r,error:l})}break;default:console.warn(`parse-with-worker unknown message ${i}`)}}function FDt(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?$$(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?$$(t,0,e):""}function $$(t,e,i){if(t.byteLength<=e+i)return"";const o=new DataView(t);let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(o.getUint8(e+n));return r}function ODt(t){try{return JSON.parse(t)}catch{throw new Error(`Failed to parse JSON from data starting with "${FDt(t)}"`)}}function UDt(t,e,i){if(i=i||t.byteLength,t.byteLength<i||e.byteLength<i)return!1;const o=new Uint8Array(t),r=new Uint8Array(e);for(let n=0;n<o.length;++n)if(o[n]!==r[n])return!1;return!0}function NDt(...t){return jDt(t)}function jDt(t){const e=t.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),i=e.reduce((n,a)=>n+a.byteLength,0),o=new Uint8Array(i);let r=0;for(const n of e)o.set(n,r),r+=n.byteLength;return o.buffer}function eee(t,e,i){const o=i!==void 0?new Uint8Array(t).subarray(e,e+i):new Uint8Array(t).subarray(e);return new Uint8Array(o).buffer}function z3(t,e){return bc(t>=0),bc(e>0),t+(e-1)&-4}function VDt(t,e,i){let o;if(t instanceof ArrayBuffer)o=new Uint8Array(t);else{const r=t.byteOffset,n=t.byteLength;o=new Uint8Array(t.buffer||t.arrayBuffer,r,n)}return e.set(o,i),i+z3(o.byteLength,4)}async function zDt(t){const e=[];for await(const i of t)e.push(i);return NDt(...e)}let HDt="";const tee={};function qDt(t){for(const e in tee)if(t.startsWith(e)){const i=tee[e];t=t.replace(e,i)}return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`${HDt}${t}`),t}function QDt(t){return t&&typeof t=="object"&&t.isBuffer}function iee(t){if(QDt(t)||t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if(typeof t=="string"){const e=t;return new TextEncoder().encode(e).buffer}if(t&&typeof t=="object"&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function oee(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function GDt(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}const KDt=t=>typeof t=="boolean",H3=t=>typeof t=="function",q3=t=>t!==null&&typeof t=="object",ree=t=>q3(t)&&t.constructor==={}.constructor,JDt=t=>!!t&&typeof t[Symbol.iterator]=="function",ZDt=t=>t&&typeof t[Symbol.asyncIterator]=="function",kh=t=>typeof Response<"u"&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,Q1=t=>typeof Blob<"u"&&t instanceof Blob,WDt=t=>t&&typeof t=="object"&&t.isBuffer,YDt=t=>typeof ReadableStream<"u"&&t instanceof ReadableStream||q3(t)&&H3(t.tee)&&H3(t.cancel)&&H3(t.getReader),XDt=t=>q3(t)&&H3(t.read)&&H3(t.pipe)&&KDt(t.readable),nee=t=>YDt(t)||XDt(t);class $Dt extends Error{constructor(e,i){super(e),this.reason=i.reason,this.url=i.url,this.response=i.response}reason;url;response}const eRt=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,tRt=/^([-\w.]+\/[-\w.+]+)/;function aee(t,e){return t.toLowerCase()===e.toLowerCase()}function iRt(t){const e=tRt.exec(t);return e?e[1]:t}function see(t){const e=eRt.exec(t);return e?e[1]:""}const lee=/\?.*/;function oRt(t){const e=t.match(lee);return e&&e[0]}function fS(t){return t.replace(lee,"")}function rRt(t){if(t.length<50)return t;const e=t.slice(t.length-15);return`${t.substr(0,32)}...${e}`}function Pb(t){return kh(t)?t.url:Q1(t)?t.name||"":typeof t=="string"?t:""}function AS(t){if(kh(t)){const e=t,i=e.headers.get("content-type")||"",o=fS(e.url);return iRt(i)||see(o)}return Q1(t)?t.type||"":typeof t=="string"?see(t):""}function nRt(t){return kh(t)?t.headers["content-length"]||-1:Q1(t)?t.size:typeof t=="string"?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}async function cee(t){if(kh(t))return t;const e={},i=nRt(t);i>=0&&(e["content-length"]=String(i));const o=Pb(t),r=AS(t);r&&(e["content-type"]=r);const n=await lRt(t);n&&(e["x-first-bytes"]=n),typeof t=="string"&&(t=new TextEncoder().encode(t));const a=new Response(t,{headers:e});return Object.defineProperty(a,"url",{value:o}),a}async function aRt(t){if(!t.ok)throw await sRt(t)}async function sRt(t){const e=rRt(t.url);let i=`Failed to fetch resource (${t.status}) ${t.statusText}: ${e}`;i=i.length>100?`${i.slice(0,100)}...`:i;const o={reason:t.statusText,url:t.url,response:t};try{const r=t.headers.get("Content-Type");o.reason=!t.bodyUsed&&r?.includes("application/json")?await t.json():await t.text()}catch{}return new $Dt(i,o)}async function lRt(t){if(typeof t=="string")return`data:,${t.slice(0,5)}`;if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(i=>{const o=new FileReader;o.onload=r=>i(r?.target?.result),o.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=t.slice(0,5);return`data:base64,${cRt(e)}`}return null}function cRt(t){let e="";const i=new Uint8Array(t);for(let o=0;o<i.byteLength;o++)e+=String.fromCharCode(i[o]);return btoa(e)}function dRt(t){return!uRt(t)&&!hRt(t)}function uRt(t){return t.startsWith("http:")||t.startsWith("https:")}function hRt(t){return t.startsWith("data:")}async function dee(t,e){if(typeof t=="string"){const i=qDt(t);return dRt(i)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(i,e):await fetch(i,e)}return await cee(t)}const uee=new aS({id:"loaders.gl"});class pRt{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class fRt{console;constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}}const hee={fetch:null,mimeType:void 0,nothrow:!1,log:new fRt,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:Eb,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},ARt={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function pee(){globalThis.loaders=globalThis.loaders||{};const{loaders:t}=globalThis;return t._state||(t._state={}),t._state}function fee(){const t=pee();return t.globalOptions=t.globalOptions||{...hee},t.globalOptions}function gRt(t,e,i,o){return i=i||[],i=Array.isArray(i)?i:[i],mRt(t,i),yRt(e,t,o)}function mRt(t,e){Aee(t,null,hee,ARt,e);for(const i of e){const o=t&&t[i.id]||{},r=i.options&&i.options[i.id]||{},n=i.deprecatedOptions&&i.deprecatedOptions[i.id]||{};Aee(o,i.id,r,n,e)}}function Aee(t,e,i,o,r){const n=e||"Top level",a=e?`${e}.`:"";for(const s in t){const l=!e&&q3(t[s]),c=s==="baseUri"&&!e,d=s==="workerUrl"&&e;if(!(s in i)&&!c&&!d){if(s in o)uee.warn(`${n} loader option '${a}${s}' no longer supported, use '${o[s]}'`)();else if(!l){const u=vRt(s,r);uee.warn(`${n} loader option '${a}${s}' not recognized. ${u}`)()}}}}function vRt(t,e){const i=t.toLowerCase();let o="";for(const r of e)for(const n in r.options){if(t===n)return`Did you mean '${r.id}.${n}'?`;const a=n.toLowerCase();(i.startsWith(a)||a.startsWith(i))&&(o=o||`Did you mean '${r.id}.${n}'?`)}return o}function yRt(t,e,i){const o={...t.options||{}};return bRt(o,i),o.log===null&&(o.log=new pRt),gee(o,fee()),gee(o,e),o}function gee(t,e){for(const i in e)if(i in e){const o=e[i];ree(o)&&ree(t[i])?t[i]={...t[i],...e[i]}:t[i]=e[i]}}function bRt(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}function mee(t){return t?(Array.isArray(t)&&(t=t[0]),Array.isArray(t?.extensions)):!1}function vee(t){bc(t,"null loader"),bc(mee(t),"invalid loader");let e;return Array.isArray(t)&&(e=t[1],t=t[0],t={...t,options:{...t.options,...e}}),(t?.parseTextSync||t?.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}const wRt=()=>{const t=pee();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function CRt(){return wRt()}const xRt=/\.([^.]+)$/;async function kRt(t,e=[],i,o){if(!bee(t))return null;let r=yee(t,e,{...i,nothrow:!0},o);if(r)return r;if(Q1(t)&&(t=await t.slice(0,10).arrayBuffer(),r=yee(t,e,i,o)),!r&&!i?.nothrow)throw new Error(wee(t));return r}function yee(t,e=[],i,o){if(!bee(t))return null;if(e&&!Array.isArray(e))return vee(e);let r=[];e&&(r=r.concat(e)),i?.ignoreRegisteredLoaders||r.push(...CRt()),ERt(r);const n=MRt(t,r,i,o);if(!n&&!i?.nothrow)throw new Error(wee(t));return n}function MRt(t,e,i,o){const r=Pb(t),n=AS(t),a=fS(r)||o?.url;let s=null,l="";return i?.mimeType&&(s=gS(e,i?.mimeType),l=`match forced by supplied MIME type ${i?.mimeType}`),s=s||BRt(e,a),l=l||(s?`matched url ${a}`:""),s=s||gS(e,n),l=l||(s?`matched MIME type ${n}`:""),s=s||IRt(e,t),l=l||(s?`matched initial data ${xee(t)}`:""),i?.fallbackMimeType&&(s=s||gS(e,i?.fallbackMimeType),l=l||(s?`matched fallback MIME type ${n}`:"")),l&&pDt.log(1,`selectLoader selected ${s?.name}: ${l}.`),s}function bee(t){return!(t instanceof Response&&t.status===204)}function wee(t){const e=Pb(t),i=AS(t);let o="No valid loader found (";o+=e?`${oee(e)}, `:"no url provided, ",o+=`MIME type: ${i?`"${i}"`:"not provided"}, `;const r=t?xee(t):"";return o+=r?` first bytes: "${r}"`:"first bytes: not available",o+=")",o}function ERt(t){for(const e of t)vee(e)}function BRt(t,e){const i=e&&xRt.exec(e),o=i&&i[1];return o?PRt(t,o):null}function PRt(t,e){e=e.toLowerCase();for(const i of t)for(const o of i.extensions)if(o.toLowerCase()===e)return i;return null}function gS(t,e){for(const i of t)if(i.mimeTypes?.some(o=>aee(e,o))||aee(e,`application/x.${i.id}`))return i;return null}function IRt(t,e){if(!e)return null;for(const i of t)if(typeof e=="string"){if(SRt(e,i))return i}else if(ArrayBuffer.isView(e)){if(Cee(e.buffer,e.byteOffset,i))return i}else if(e instanceof ArrayBuffer&&Cee(e,0,i))return i;return null}function SRt(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some(i=>t.startsWith(i))}function Cee(t,e,i){return(Array.isArray(i.tests)?i.tests:[i.tests]).some(o=>TRt(t,e,i,o))}function TRt(t,e,i,o){if(o instanceof ArrayBuffer)return UDt(o,t,o.byteLength);switch(typeof o){case"function":return o(t);case"string":const r=mS(t,e,o.length);return o===r;default:return!1}}function xee(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?mS(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?mS(t,0,e):""}function mS(t,e,i){if(t.byteLength<e+i)return"";const o=new DataView(t);let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(o.getUint8(e+n));return r}const DRt=256*1024;function*RRt(t,e){const i=e?.chunkSize||DRt;let o=0;const r=new TextEncoder;for(;o<t.length;){const n=Math.min(t.length-o,i),a=t.slice(o,o+n);o+=n,yield r.encode(a)}}const LRt=256*1024;function*_Rt(t,e={}){const{chunkSize:i=LRt}=e;let o=0;for(;o<t.byteLength;){const r=Math.min(t.byteLength-o,i),n=new ArrayBuffer(r),a=new Uint8Array(t,o,r);new Uint8Array(n).set(a),o+=r,yield n}}const FRt=1024*1024;async function*ORt(t,e){const i=e?.chunkSize||FRt;let o=0;for(;o<t.size;){const r=o+i,n=await t.slice(o,r).arrayBuffer();o=r,yield n}}function kee(t,e){return Eb?URt(t,e):NRt(t)}async function*URt(t,e){const i=t.getReader();let o;try{for(;;){const r=o||i.read();e?._streamReadAhead&&(o=i.read());const{done:n,value:a}=await r;if(n)return;yield iee(a)}}catch{i.releaseLock()}}async function*NRt(t,e){for await(const i of t)yield iee(i)}function jRt(t,e){if(typeof t=="string")return RRt(t,e);if(t instanceof ArrayBuffer)return _Rt(t,e);if(Q1(t))return ORt(t,e);if(nee(t))return kee(t,e);if(kh(t))return kee(t.body,e);throw new Error("makeIterator")}const Mee="Cannot convert supplied data type";function VRt(t,e,i){if(e.text&&typeof t=="string")return t;if(WDt(t)&&(t=t.buffer),t instanceof ArrayBuffer){const o=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(o):o}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let o=t.buffer;const r=t.byteLength||t.length;return(t.byteOffset!==0||r!==o.byteLength)&&(o=o.slice(t.byteOffset,t.byteOffset+r)),o}throw new Error(Mee)}async function zRt(t,e,i){const o=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if(typeof t=="string"||o)return VRt(t,e);if(Q1(t)&&(t=await cee(t)),kh(t)){const r=t;return await aRt(r),e.binary?await r.arrayBuffer():await r.text()}if(nee(t)&&(t=jRt(t,i)),JDt(t)||ZDt(t))return zDt(t);throw new Error(Mee)}function HRt(t,e){const i=fee(),o=t||i;return typeof o.fetch=="function"?o.fetch:q3(o.fetch)?r=>dee(r,o.fetch):e?.fetch?e?.fetch:dee}function qRt(t,e,i){if(i)return i;const o={fetch:HRt(e,t),...t};if(o.url){const r=fS(o.url);o.baseUrl=r,o.queryString=oRt(o.url),o.filename=oee(r),o.baseUrl=GDt(r)}return Array.isArray(o.loaders)||(o.loaders=null),o}function QRt(t,e){if(t&&!Array.isArray(t))return t;let i;if(t&&(i=Array.isArray(t)?t:[t]),e&&e.loaders){const o=Array.isArray(e.loaders)?e.loaders:[e.loaders];i=i?[...i,...o]:o}return i&&i.length?i:void 0}async function vS(t,e,i,o){e&&!Array.isArray(e)&&!mee(e)&&(o=void 0,i=e,e=void 0),t=await t,i=i||{};const r=Pb(t),n=QRt(e,o),a=await kRt(t,n,i);return a?(i=gRt(i,a,n,r),o=qRt({url:r,_parse:vS,loaders:n},i,o||null),await GRt(a,t,i,o)):null}async function GRt(t,e,i,o){if(BDt(t),i=fDt(t.options,i),kh(e)){const n=e,{ok:a,redirected:s,status:l,statusText:c,type:d,url:u}=n,h=Object.fromEntries(n.headers.entries());o.response={headers:h,ok:a,redirected:s,status:l,statusText:c,type:d,url:u}}e=await zRt(e,t,i);const r=t;if(r.parseTextSync&&typeof e=="string")return r.parseTextSync(e,i,o);if(RDt(t,i))return await LDt(t,e,i,o,vS);if(r.parseText&&typeof e=="string")return await r.parseText(e,i,o);if(r.parse)return await r.parse(e,i,o);throw wc(!r.parseSync),new Error(`${t.id} loader - no parser found and worker is disabled`)}function KRt(t){switch(t.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function JRt(t){let e=1/0,i=1/0,o=1/0,r=-1/0,n=-1/0,a=-1/0;const s=t.POSITION?t.POSITION.value:[],l=s&&s.length;for(let c=0;c<l;c+=3){const d=s[c],u=s[c+1],h=s[c+2];e=d<e?d:e,i=u<i?u:i,o=h<o?h:o,r=d>r?d:r,n=u>n?u:n,a=h>a?h:a}return[[e,i,o],[r,n,a]]}function ZRt(t,e,i){const o=KRt(e.value),r=i||WRt(e);return{name:t,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:o}]},nullable:!1,metadata:r}}function WRt(t){const e={};return"byteOffset"in t&&(e.byteOffset=t.byteOffset.toString(10)),"byteStride"in t&&(e.byteStride=t.byteStride.toString(10)),"normalized"in t&&(e.normalized=t.normalized.toString()),e}const YRt="4.3.3",XRt=globalThis.loaders?.parseImageNode,yS=typeof Image<"u",bS=typeof ImageBitmap<"u",$Rt=!!XRt,wS=Eb?!0:$Rt;function eLt(t){switch(t){case"auto":return bS||yS||wS;case"imagebitmap":return bS;case"image":return yS;case"data":return wS;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}function tLt(){if(bS)return"imagebitmap";if(yS)return"image";if(wS)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function iLt(t){const e=oLt(t);if(!e)throw new Error("Not an image");return e}function Eee(t){switch(iLt(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new Error("getImageData");return e.width=t.width,e.height=t.height,i.drawImage(t,0,0),i.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function oLt(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&t instanceof Image?"image":t&&typeof t=="object"&&t.data&&t.width&&t.height?"data":null}const rLt=/^data:image\/svg\+xml/,nLt=/\.svg((\?|#).*)?$/;function CS(t){return t&&(rLt.test(t)||nLt.test(t))}function aLt(t,e){if(CS(e)){let i=new TextDecoder().decode(t);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(i=unescape(encodeURIComponent(i)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(i)}`}return Bee(t,e)}function Bee(t,e){if(CS(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function Pee(t,e,i){const o=aLt(t,i),r=self.URL||self.webkitURL,n=typeof o!="string"&&r.createObjectURL(o);try{return await sLt(n||o,e)}finally{n&&r.revokeObjectURL(n)}}async function sLt(t,e){const i=new Image;return i.src=t,e.image&&e.image.decode&&i.decode?(await i.decode(),i):await new Promise((o,r)=>{try{i.onload=()=>o(i),i.onerror=n=>{const a=n instanceof Error?n.message:"error";r(new Error(a))}}catch(n){r(n)}})}const lLt={};let Iee=!0;async function cLt(t,e,i){let o;CS(i)?o=await Pee(t,e,i):o=Bee(t,i);const r=e&&e.imagebitmap;return await dLt(o,r)}async function dLt(t,e=null){if((uLt(e)||!Iee)&&(e=null),e)try{return await createImageBitmap(t,e)}catch(i){console.warn(i),Iee=!1}return await createImageBitmap(t)}function uLt(t){for(const e in t||lLt)return!1;return!0}function hLt(t){return!gLt(t,"ftyp",4)||(t[8]&96)===0?null:pLt(t)}function pLt(t){switch(fLt(t,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function fLt(t,e,i){return String.fromCharCode(...t.slice(e,i))}function ALt(t){return[...t].map(e=>e.charCodeAt(0))}function gLt(t,e,i=0){const o=ALt(e);for(let r=0;r<o.length;++r)if(o[r]!==t[r+i])return!1;return!0}const yl=!1,Q3=!0;function xS(t){const e=G3(t);return vLt(e)||wLt(e)||yLt(e)||bLt(e)||mLt(e)}function mLt(t){const e=new Uint8Array(t instanceof DataView?t.buffer:t),i=hLt(e);return i?{mimeType:i.mimeType,width:0,height:0}:null}function vLt(t){const e=G3(t);return e.byteLength>=24&&e.getUint32(0,yl)===2303741511?{mimeType:"image/png",width:e.getUint32(16,yl),height:e.getUint32(20,yl)}:null}function yLt(t){const e=G3(t);return e.byteLength>=10&&e.getUint32(0,yl)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,Q3),height:e.getUint16(8,Q3)}:null}function bLt(t){const e=G3(t);return e.byteLength>=14&&e.getUint16(0,yl)===16973&&e.getUint32(2,Q3)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,Q3),height:e.getUint32(22,Q3)}:null}function wLt(t){const e=G3(t);if(!(e.byteLength>=3&&e.getUint16(0,yl)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:i,sofMarkers:o}=CLt();let r=2;for(;r+9<e.byteLength;){const n=e.getUint16(r,yl);if(o.has(n))return{mimeType:"image/jpeg",height:e.getUint16(r+5,yl),width:e.getUint16(r+7,yl)};if(!i.has(n))return null;r+=2,r+=e.getUint16(r,yl)}return null}function CLt(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);return{tableMarkers:t,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function G3(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}async function xLt(t,e){const{mimeType:i}=xS(t)||{},o=globalThis.loaders?.parseImageNode;return bc(o),await o(t,i)}async function kLt(t,e,i){e=e||{};const o=(e.image||{}).type||"auto",{url:r}=i||{},n=MLt(o);let a;switch(n){case"imagebitmap":a=await cLt(t,e,r);break;case"image":a=await Pee(t,e,r);break;case"data":a=await xLt(t);break;default:bc(!1)}return o==="data"&&(a=Eee(a)),a}function MLt(t){switch(t){case"auto":case"data":return tLt();default:return eLt(t),t}}const ELt=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],BLt=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],PLt={image:{type:"auto",decode:!0}},ILt={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:YRt,mimeTypes:BLt,extensions:ELt,parse:kLt,tests:[t=>!!xS(new DataView(t))],options:PLt},kS={};function SLt(t){if(kS[t]===void 0){const e=Eb?DLt(t):TLt(t);kS[t]=e}return kS[t]}function TLt(t){const e=["image/png","image/jpeg","image/gif"],i=globalThis.loaders?.imageFormatsNode||e;return!!globalThis.loaders?.parseImageNode&&i.includes(t)}function DLt(t){switch(t){case"image/avif":case"image/webp":return RLt(t);default:return!0}}function RLt(t){try{return document.createElement("canvas").toDataURL(t).indexOf(`data:${t}`)===0}catch{return!1}}function wa(t,e){if(!t)throw new Error(e||"assert failed: gltf")}const See={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Tee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Dee=["SCALAR","VEC2","VEC3","VEC4"],LLt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],_Lt=new Map(LLt),FLt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},OLt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},ULt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Ree(t){return Dee[t-1]||Dee[0]}function Ib(t){const e=_Lt.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function MS(t,e){const i=ULt[t.componentType],o=FLt[t.type],r=OLt[t.componentType],n=t.count*o,a=t.count*o*r;wa(a>=0&&a<=e.byteLength);const s=Tee[t.componentType],l=See[t.type];return{ArrayType:i,length:n,byteLength:a,componentByteSize:s,numberOfComponentsInElement:l}}function NLt(t,e,i){const o=t.bufferViews[i];wa(o);const r=o.buffer,n=e[r];wa(n);const a=(o.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,a,o.byteLength)}function jLt(t,e,i){const o=typeof i=="number"?t.accessors?.[i]:i;if(!o)throw new Error(`No gltf accessor ${JSON.stringify(i)}`);const r=t.bufferViews?.[o.bufferView||0];if(!r)throw new Error(`No gltf buffer view for accessor ${r}`);const{arrayBuffer:n,byteOffset:a}=e[r.buffer],s=(a||0)+(o.byteOffset||0)+(r.byteOffset||0),{ArrayType:l,length:c,componentByteSize:d,numberOfComponentsInElement:u}=MS(o,r),h=d*u,p=r.byteStride||h;if(typeof r.byteStride>"u"||r.byteStride===h)return new l(n,s,c);const A=new l(c);for(let f=0;f<o.count;f++){const m=new l(n,s+f*p,u);A.set(m,f*u)}return A}function VLt(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class Ir{gltf;sourceBuffers;byteLength;constructor(e){this.gltf={json:e?.json||VLt(),buffers:e?.buffers||[],images:e?.images||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const i=this.getUsedExtensions().find(r=>r===e),o=this.getRequiredExtensions().find(r=>r===e);return typeof i=="string"||typeof o=="string"}getExtension(e){const i=this.getUsedExtensions().find(r=>r===e),o=this.json.extensions||{};return i?o[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(i=>i===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,i){return(e.extensions||{})[i]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,i){if(typeof i=="object")return i;const o=this.json[e]&&this.json[e][i];if(!o)throw new Error(`glTF file error: Could not find ${e}[${i}]`);return o}getTypedArrayForBufferView(e){e=this.getBufferView(e);const i=e.buffer,o=this.gltf.buffers[i];wa(o);const r=(e.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,r,e.byteLength)}getTypedArrayForAccessor(e){const i=this.getAccessor(e);return jLt(this.gltf.json,this.gltf.buffers,i)}getTypedArrayForImageData(e){e=this.getAccessor(e);const i=this.getBufferView(e.bufferView),o=this.getBuffer(i.buffer).data,r=i.byteOffset||0;return new Uint8Array(o,r,i.byteLength)}addApplicationData(e,i){return this.json[e]=i,this}addExtraData(e,i){return this.json.extras=this.json.extras||{},this.json.extras[e]=i,this}addObjectExtension(e,i,o){return e.extensions=e.extensions||{},e.extensions[i]=o,this.registerUsedExtension(i),this}setObjectExtension(e,i,o){const r=e.extensions||{};r[i]=o}removeObjectExtension(e,i){const o=e?.extensions||{};if(o[i]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const r=this.json.extensionsRemoved;r.includes(i)||r.push(i)}delete o[i]}addExtension(e,i={}){return wa(i),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=i,this.registerUsedExtension(e),i}addRequiredExtension(e,i={}){return wa(i),this.addExtension(e,i),this.registerRequiredExtension(e),i}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(i=>i===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(i=>i===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const i=this.json.extensionsRemoved;i.includes(e)||i.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:i}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:i}),this.json.scenes.length-1}addNode(e){const{meshIndex:i,matrix:o}=e;this.json.nodes=this.json.nodes||[];const r={mesh:i};return o&&(r.matrix=o),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(e){const{attributes:i,indices:o,material:r,mode:n=4}=e,a={primitives:[{attributes:this._addAttributes(i),mode:n}]};if(o){const s=this._addIndices(o);a.primitives[0].indices=s}return Number.isFinite(r)&&(a.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){const i={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addImage(e,i){const o=xS(e),r=i||o?.mimeType,n={bufferView:this.addBufferView(e),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(n),this.json.images.length-1}addBufferView(e,i=0,o=this.byteLength){const r=e.byteLength;wa(Number.isFinite(r)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const n={buffer:i,byteOffset:o,byteLength:r};return this.byteLength+=z3(r,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}addAccessor(e,i){const o={bufferView:e,type:Ree(i.size),componentType:i.componentType,count:i.count,max:i.max,min:i.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(o),this.json.accessors.length-1}addBinaryBuffer(e,i={size:3}){const o=this.addBufferView(e);let r={min:i.min,max:i.max};(!r.min||!r.max)&&(r=this._getAccessorMinMax(e,i.size));const n={size:i.size,componentType:Ib(e),count:Math.round(e.length/i.size),min:r.min,max:r.max};return this.addAccessor(o,Object.assign(n,i))}addTexture(e){const{imageIndex:i}=e,o={source:i};return this.json.textures=this.json.textures||[],this.json.textures.push(o),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){const e=this.byteLength,i=new ArrayBuffer(e),o=new Uint8Array(i);let r=0;for(const n of this.sourceBuffers||[])r=VDt(n,o,r);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=i,this.sourceBuffers=[i],this.gltf.buffers=[{arrayBuffer:i,byteOffset:0,byteLength:i.byteLength}]}_removeStringFromArray(e,i){let o=!0;for(;o;){const r=e.indexOf(i);r>-1?e.splice(r,1):o=!1}}_addAttributes(e={}){const i={};for(const o in e){const r=e[o],n=this._getGltfAttributeName(o),a=this.addBinaryBuffer(r.value,r);i[n]=a}return i}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,i){const o={min:null,max:null};if(e.length<i)return o;o.min=[],o.max=[];const r=e.subarray(0,i);for(const n of r)o.min.push(n),o.max.push(n);for(let n=i;n<e.length;n+=i)for(let a=0;a<i;a++)o.min[0+a]=Math.min(o.min[0+a],e[n+a]),o.max[0+a]=Math.max(o.max[0+a],e[n+a]);return o}}function Lee(t){return(t%1+1)%1}const _ee={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},zLt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},Fee={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function ES(t,e){return Fee[e]*_ee[t]}function Sb(t,e,i,o){if(i!=="UINT8"&&i!=="UINT16"&&i!=="UINT32"&&i!=="UINT64")return null;const r=t.getTypedArrayForBufferView(e),n=Tb(r,"SCALAR",i,o+1);return n instanceof BigInt64Array||n instanceof BigUint64Array?null:n}function Tb(t,e,i,o=1){const r=_ee[e],n=zLt[i],a=Fee[i],s=o*r,l=s*a;let c=t.buffer,d=t.byteOffset;return d%a!==0&&(c=new Uint8Array(c).slice(d,d+l).buffer,d=0),new n(c,d,s)}function BS(t,e,i){const o=`TEXCOORD_${e.texCoord||0}`,r=i.attributes[o],n=t.getTypedArrayForAccessor(r),a=t.gltf.json,s=e.index,l=a.textures?.[s]?.source;if(typeof l<"u"){const c=a.images?.[l]?.mimeType,d=t.gltf.images?.[l];if(d&&typeof d.width<"u"){const u=[];for(let h=0;h<n.length;h+=2){const p=HLt(d,c,n,h,e.channels);u.push(p)}return u}}return[]}function Oee(t,e,i,o,r){if(!i?.length)return;const n=[];for(const d of i){let u=o.findIndex(h=>h===d);u===-1&&(u=o.push(d)-1),n.push(u)}const a=new Uint32Array(n),s=t.gltf.buffers.push({arrayBuffer:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength})-1,l=t.addBufferView(a,s,0),c=t.addAccessor(l,{size:1,componentType:Ib(a),count:a.length});r.attributes[e]=c}function HLt(t,e,i,o,r=[0]){const n={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},a=i[o],s=i[o+1];let l=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(l=4);const c=qLt(a,s,t,l);let d=0;for(const u of r){const h=typeof u=="number"?Object.values(n)[u]:n[u],p=c+h.offset,A=Eee(t);if(A.data.length<=p)throw new Error(`${A.data.length} <= ${p}`);const f=A.data[p];d|=f<<h.shift}return d}function qLt(t,e,i,o=1){const r=i.width,n=Lee(t)*(r-1),a=Math.round(n),s=i.height,l=Lee(e)*(s-1),c=Math.round(l),d=i.components?i.components:o;return(c*r+a)*d}function Uee(t,e,i,o,r){const n=[];for(let a=0;a<e;a++){const s=i[a],l=i[a+1]-i[a];if(l+s>o)break;const c=s/r,d=l/r;n.push(t.slice(c,c+d))}return n}function Nee(t,e,i){const o=[];for(let r=0;r<e;r++){const n=r*i;o.push(t.slice(n,n+i))}return o}function jee(t,e,i,o){if(i)throw new Error("Not implemented - arrayOffsets for strings is specified");if(o){const r=[],n=new TextDecoder("utf8");let a=0;for(let s=0;s<t;s++){const l=o[s+1]-o[s];if(l+a<=e.length){const c=e.subarray(a,l+a),d=n.decode(c);r.push(d),a+=l}}return r}return[]}const G1="EXT_mesh_features",QLt=G1;async function GLt(t,e){const i=new Ir(t);JLt(i,e)}function KLt(t,e){const i=new Ir(t);return WLt(i),i.createBinaryChunk(),i.gltf}function JLt(t,e){const i=t.gltf.json;if(i.meshes)for(const o of i.meshes)for(const r of o.primitives)ZLt(t,r,e)}function ZLt(t,e,i){if(!i?.gltf?.loadBuffers)return;const o=e.extensions?.[G1]?.featureIds;if(o)for(const r of o){let n;if(typeof r.attribute<"u"){const a=`_FEATURE_ID_${r.attribute}`,s=e.attributes[a];n=t.getTypedArrayForAccessor(s)}else typeof r.texture<"u"&&i?.gltf?.loadImages?n=BS(t,r.texture,e):n=[];r.data=n}}function WLt(t,e){const i=t.gltf.json.meshes;if(i)for(const o of i)for(const r of o.primitives)XLt(t,r)}function YLt(t,e,i,o){e.extensions||(e.extensions={});let r=e.extensions[G1];r||(r={featureIds:[]},e.extensions[G1]=r);const{featureIds:n}=r,a={featureCount:i.length,propertyTable:o,data:i};n.push(a),t.addObjectExtension(e,G1,r)}function XLt(t,e){const i=e.extensions?.[G1];if(!i)return;const o=i.featureIds;o.forEach((r,n)=>{if(r.data){const{accessorKey:a,index:s}=$Lt(e.attributes),l=new Uint32Array(r.data);o[n]={featureCount:l.length,propertyTable:r.propertyTable,attribute:s},t.gltf.buffers.push({arrayBuffer:l.buffer,byteOffset:l.byteOffset,byteLength:l.byteLength});const c=t.addBufferView(l),d=t.addAccessor(c,{size:1,componentType:Ib(l),count:l.length});e.attributes[a]=d}})}function $Lt(t){const e="_FEATURE_ID_",i=Object.keys(t).filter(r=>r.indexOf(e)===0);let o=-1;for(const r of i){const n=Number(r.substring(e.length));n>o&&(o=n)}return o++,{accessorKey:`${e}${o}`,index:o}}const e_t=Object.freeze(Object.defineProperty({__proto__:null,createExtMeshFeatures:YLt,decode:GLt,encode:KLt,name:QLt},Symbol.toStringTag,{value:"Module"})),K1="EXT_structural_metadata",t_t=K1;async function i_t(t,e){const i=new Ir(t);r_t(i,e)}function o_t(t,e){const i=new Ir(t);return b_t(i),i.createBinaryChunk(),i.gltf}function r_t(t,e){if(!e.gltf?.loadBuffers)return;const i=t.getExtension(K1);i&&(e.gltf?.loadImages&&n_t(t,i),a_t(t,i))}function n_t(t,e){const i=e.propertyTextures,o=t.gltf.json;if(i&&o.meshes)for(const r of o.meshes)for(const n of r.primitives)l_t(t,i,n,e)}function a_t(t,e){const i=e.schema;if(!i)return;const o=i.classes,r=e.propertyTables;if(o&&r)for(const n in o){const a=s_t(r,n);a&&d_t(t,i,a)}}function s_t(t,e){for(const i of t)if(i.class===e)return i;return null}function l_t(t,e,i,o){if(!e)return;const r=i.extensions?.[K1]?.propertyTextures;if(r)for(const n of r){const a=e[n];c_t(t,a,i,o)}}function c_t(t,e,i,o){if(!e.properties)return;o.dataAttributeNames||(o.dataAttributeNames=[]);const r=e.class;for(const n in e.properties){const a=`${r}_${n}`,s=e.properties?.[n];if(!s)continue;s.data||(s.data=[]);const l=s.data,c=BS(t,s,i);c!==null&&(Oee(t,a,c,l,i),s.data=l,o.dataAttributeNames.push(a))}}function d_t(t,e,i){const o=e.classes?.[i.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${i.class}`);const r=i.count;for(const n in o.properties){const a=o.properties[n],s=i.properties?.[n];if(s){const l=u_t(t,e,a,r,s);s.data=l}}}function u_t(t,e,i,o,r){let n=[];const a=r.values,s=t.getTypedArrayForBufferView(a),l=h_t(t,i,r,o),c=p_t(t,r,o);switch(i.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{n=f_t(i,o,s,l);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${i.type}`);case"STRING":{n=jee(o,s,l,c);break}case"ENUM":{n=A_t(e,i,o,s,l);break}default:throw new Error(`Unknown classProperty type ${i.type}`)}return n}function h_t(t,e,i,o){return e.array&&typeof e.count>"u"&&typeof i.arrayOffsets<"u"?Sb(t,i.arrayOffsets,i.arrayOffsetType||"UINT32",o):null}function p_t(t,e,i){return typeof e.stringOffsets<"u"?Sb(t,e.stringOffsets,e.stringOffsetType||"UINT32",i):null}function f_t(t,e,i,o){const r=t.array,n=t.count,a=ES(t.type,t.componentType),s=i.byteLength/a;let l;return t.componentType?l=Tb(i,t.type,t.componentType,s):l=i,r?o?Uee(l,e,o,i.length,a):n?Nee(l,e,n):[]:l}function A_t(t,e,i,o,r){const n=e.enumType;if(!n)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const a=t.enums?.[n];if(!a)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${n}`);const s=a.valueType||"UINT16",l=ES(e.type,s),c=o.byteLength/l;let d=Tb(o,e.type,s,c);if(d||(d=o),e.array){if(r)return g_t({valuesData:d,numberOfElements:i,arrayOffsets:r,valuesDataBytesLength:o.length,elementSize:l,enumEntry:a});const u=e.count;return u?m_t(d,i,u,a):[]}return PS(d,0,i,a)}function g_t(t){const{valuesData:e,numberOfElements:i,arrayOffsets:o,valuesDataBytesLength:r,elementSize:n,enumEntry:a}=t,s=[];for(let l=0;l<i;l++){const c=o[l],d=o[l+1]-o[l];if(d+c>r)break;const u=c/n,h=d/n,p=PS(e,u,h,a);s.push(p)}return s}function m_t(t,e,i,o){const r=[];for(let n=0;n<e;n++){const a=i*n,s=PS(t,a,i,o);r.push(s)}return r}function PS(t,e,i,o){const r=[];for(let n=0;n<i;n++)if(t instanceof BigInt64Array||t instanceof BigUint64Array)r.push("");else{const a=t[e+n],s=v_t(o,a);s?r.push(s.name):r.push("")}return r}function v_t(t,e){for(const i of t.values)if(i.value===e)return i;return null}const y_t="schemaClassId";function b_t(t,e){const i=t.getExtension(K1);if(i&&i.propertyTables)for(const o of i.propertyTables){const r=o.class,n=i.schema?.classes?.[r];o.properties&&n&&w_t(o,n,t)}}function w_t(t,e,i){for(const o in t.properties){const r=t.properties[o].data;if(r){const n=e.properties[o];if(n){const a=M_t(r,n,i);t.properties[o]=a}}}}function C_t(t,e,i=y_t){let o=t.getExtension(K1);o||(o=t.addExtension(K1)),o.schema=x_t(e,i,o.schema);const r=k_t(e,i,o.schema);return o.propertyTables||(o.propertyTables=[]),o.propertyTables.push(r)-1}function x_t(t,e,i){const o=i??{id:"schema_id"},r={properties:{}};for(const n of t){const a={type:n.elementType,componentType:n.componentType};r.properties[n.name]=a}return o.classes={},o.classes[e]=r,o}function k_t(t,e,i){const o={class:e,count:0};let r=0;const n=i.classes?.[e];for(const a of t){if(r===0&&(r=a.values.length),r!==a.values.length&&a.values.length)throw new Error("Illegal values in attributes");n?.properties[a.name]&&(o.properties||(o.properties={}),o.properties[a.name]={values:0,data:a.values})}return o.count=r,o}function M_t(t,e,i){const o={values:0};if(e.type==="STRING"){const{stringData:r,stringOffsets:n}=P_t(t);o.stringOffsets=IS(n,i),o.values=IS(r,i)}else if(e.type==="SCALAR"&&e.componentType){const r=B_t(t,e.componentType);o.values=IS(r,i)}return o}const E_t={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:Int32Array,UINT64:Uint32Array,FLOAT32:Float32Array,FLOAT64:Float64Array};function B_t(t,e){const i=[];for(const r of t)i.push(Number(r));const o=E_t[e];if(!o)throw new Error("Illegal component type");return new o(i)}function P_t(t){const e=new TextEncoder,i=[];let o=0;for(const l of t){const c=e.encode(l);o+=c.length,i.push(c)}const r=new Uint8Array(o),n=[];let a=0;for(const l of i)r.set(l,a),n.push(a),a+=l.length;n.push(a);const s=new Uint32Array(n);return{stringData:r,stringOffsets:s}}function IS(t,e){return e.gltf.buffers.push({arrayBuffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}),e.addBufferView(t)}const I_t=Object.freeze(Object.defineProperty({__proto__:null,createExtStructuralMetadata:C_t,decode:i_t,encode:o_t,name:t_t},Symbol.toStringTag,{value:"Module"})),Vee="EXT_feature_metadata",S_t=Vee;async function T_t(t,e){const i=new Ir(t);D_t(i,e)}function D_t(t,e){if(!e.gltf?.loadBuffers)return;const i=t.getExtension(Vee);i&&(e.gltf?.loadImages&&R_t(t,i),L_t(t,i))}function R_t(t,e){const i=e.schema;if(!i)return;const o=i.classes,{featureTextures:r}=e;if(o&&r)for(const n in o){const a=o[n],s=F_t(r,n);s&&U_t(t,s,a)}}function L_t(t,e){const i=e.schema;if(!i)return;const o=i.classes,r=e.featureTables;if(o&&r)for(const n in o){const a=__t(r,n);a&&O_t(t,i,a)}}function __t(t,e){for(const i in t){const o=t[i];if(o.class===e)return o}return null}function F_t(t,e){for(const i in t){const o=t[i];if(o.class===e)return o}return null}function O_t(t,e,i){if(!i.class)return;const o=e.classes?.[i.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${i.class}`);const r=i.count;for(const n in o.properties){const a=o.properties[n],s=i.properties?.[n];if(s){const l=N_t(t,e,a,r,s);s.data=l}}}function U_t(t,e,i){const o=e.class;for(const r in i.properties){const n=e?.properties?.[r];if(n){const a=q_t(t,n,o);n.data=a}}}function N_t(t,e,i,o,r){let n=[];const a=r.bufferView,s=t.getTypedArrayForBufferView(a),l=j_t(t,i,r,o),c=V_t(t,i,r,o);return i.type==="STRING"||i.componentType==="STRING"?n=jee(o,s,l,c):z_t(i)&&(n=H_t(i,o,s,l)),n}function j_t(t,e,i,o){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof i.arrayOffsetBufferView<"u"?Sb(t,i.arrayOffsetBufferView,i.offsetType||"UINT32",o):null}function V_t(t,e,i,o){return typeof i.stringOffsetBufferView<"u"?Sb(t,i.stringOffsetBufferView,i.offsetType||"UINT32",o):null}function z_t(t){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(t.type)||typeof t.componentType<"u"&&e.includes(t.componentType)}function H_t(t,e,i,o){const r=t.type==="ARRAY",n=t.componentCount,a="SCALAR",s=t.componentType||t.type,l=ES(a,s),c=i.byteLength/l,d=Tb(i,a,s,c);return r?o?Uee(d,e,o,i.length,l):n?Nee(d,e,n):[]:d}function q_t(t,e,i){const o=t.gltf.json;if(!o.meshes)return[];const r=[];for(const n of o.meshes)for(const a of n.primitives)Q_t(t,i,e,r,a);return r}function Q_t(t,e,i,o,r){const n={channels:i.channels,...i.texture},a=BS(t,n,r);a&&Oee(t,e,a,o,r)}const G_t=Object.freeze(Object.defineProperty({__proto__:null,decode:T_t,name:S_t},Symbol.toStringTag,{value:"Module"})),K_t="4.3.3",J_t="4.3.3",Db={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let zee;async function Hee(t){return ADt(t.modules),gDt("basis")||(zee||=Z_t(t),await zee)}async function Z_t(t){let e=null,i=null;return[e,i]=await Promise.all([await xh(Db.TRANSCODER,"textures",t),await xh(Db.TRANSCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await W_t(e,i)}function W_t(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t(i).then(r=>{const{BasisFile:n,initializeBasis:a}=r;a(),o({BasisFile:n})})})}let SS;async function qee(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(SS=SS||Y_t(t),await SS)}async function Y_t(t){let e=null,i=null;return[e,i]=await Promise.all([await xh(Db.ENCODER,"textures",t),await xh(Db.ENCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await X_t(e,i)}function X_t(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t(i).then(r=>{const{BasisFile:n,KTX2File:a,initializeBasis:s,BasisEncoder:l}=r;s(),o({BasisFile:n,KTX2File:a,BasisEncoder:l})})})}const J1={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_ASTC_4X4_KHR:37808},$_t=["","WEBKIT_","MOZ_"],Qee={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let Rb=null;function eFt(t){if(!Rb){t=t||tFt()||void 0,Rb=new Set;for(const e of $_t)for(const i in Qee)if(t&&t.getExtension(`${e}${i}`)){const o=Qee[i];Rb.add(o)}}return Rb}function tFt(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}const Ca=[171,75,84,88,32,50,48,187,13,10,26,10];function iFt(t){const e=new Uint8Array(t);return!(e.byteLength<Ca.length||e[0]!==Ca[0]||e[1]!==Ca[1]||e[2]!==Ca[2]||e[3]!==Ca[3]||e[4]!==Ca[4]||e[5]!==Ca[5]||e[6]!==Ca[6]||e[7]!==Ca[7]||e[8]!==Ca[8]||e[9]!==Ca[9]||e[10]!==Ca[10]||e[11]!==Ca[11])}const oFt={etc1:{basisFormat:0,compressed:!0,format:J1.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:J1.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:J1.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:J1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:J1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:J1.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function rFt(t,e){if(e.basis.containerFormat==="auto"){if(iFt(t)){const o=await qee(e);return Gee(o.KTX2File,t,e)}const{BasisFile:i}=await Hee(e);return TS(i,t,e)}if(e.basis.module==="encoder"){const i=await qee(e);return e.basis.containerFormat==="ktx2"?Gee(i.KTX2File,t,e):TS(i.BasisFile,t,e)}else{const{BasisFile:i}=await Hee(e);return TS(i,t,e)}}function TS(t,e,i){const o=new t(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("Failed to start basis transcoding");const r=o.getNumImages(),n=[];for(let a=0;a<r;a++){const s=o.getNumLevels(a),l=[];for(let c=0;c<s;c++)l.push(nFt(o,a,c,i));n.push(l)}return n}finally{o.close(),o.delete()}}function nFt(t,e,i,o){const r=t.getImageWidth(e,i),n=t.getImageHeight(e,i),a=t.getHasAlpha(),{compressed:s,format:l,basisFormat:c}=Kee(o,a),d=t.getImageTranscodedSizeInBytes(e,i,c),u=new Uint8Array(d);if(!t.transcodeImage(u,e,i,c,0,0))throw new Error("failed to start Basis transcoding");return{width:r,height:n,data:u,compressed:s,format:l,hasAlpha:a}}function Gee(t,e,i){const o=new t(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("failed to start KTX2 transcoding");const r=o.getLevels(),n=[];for(let a=0;a<r;a++)n.push(aFt(o,a,i));return[n]}finally{o.close(),o.delete()}}function aFt(t,e,i){const{alphaFlag:o,height:r,width:n}=t.getImageLevelInfo(e,0,0),{compressed:a,format:s,basisFormat:l}=Kee(i,o),c=t.getImageTranscodedSizeInBytes(e,0,0,l),d=new Uint8Array(c);if(!t.transcodeImage(d,e,0,0,l,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:n,height:r,data:d,compressed:a,levelSize:c,hasAlpha:o,format:s}}function Kee(t,e){let i=t&&t.basis&&t.basis.format;return i==="auto"&&(i=Jee()),typeof i=="object"&&(i=e?i.alpha:i.noAlpha),i=i.toLowerCase(),oFt[i]}function Jee(){const t=eFt();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const sFt={dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:J_t,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},lFt={...sFt,parse:rFt},Z1=!0,Zee=1735152710,DS=12,Lb=8,cFt=1313821514,dFt=5130562,uFt=0,hFt=0,pFt=1;function fFt(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}function AFt(t,e=0,i={}){const o=new DataView(t),{magic:r=Zee}=i,n=o.getUint32(e,!1);return n===r||n===Zee}function gFt(t,e,i=0,o={}){const r=new DataView(e),n=fFt(r,i+0),a=r.getUint32(i+4,Z1),s=r.getUint32(i+8,Z1);switch(Object.assign(t,{header:{byteOffset:i,byteLength:s,hasBinChunk:!1},type:n,version:a,json:{},binChunks:[]}),i+=DS,t.version){case 1:return mFt(t,r,i);case 2:return vFt(t,r,i,o={});default:throw new Error(`Invalid GLB version ${t.version}. Only supports version 1 and 2.`)}}function mFt(t,e,i){bc(t.header.byteLength>DS+Lb);const o=e.getUint32(i+0,Z1),r=e.getUint32(i+4,Z1);return i+=Lb,bc(r===uFt),RS(t,e,i,o),i+=o,i+=LS(t,e,i,t.header.byteLength),i}function vFt(t,e,i,o){return bc(t.header.byteLength>DS+Lb),yFt(t,e,i,o),i+t.header.byteLength}function yFt(t,e,i,o){for(;i+8<=t.header.byteLength;){const r=e.getUint32(i+0,Z1),n=e.getUint32(i+4,Z1);switch(i+=Lb,n){case cFt:RS(t,e,i,r);break;case dFt:LS(t,e,i,r);break;case hFt:o.strict||RS(t,e,i,r);break;case pFt:o.strict||LS(t,e,i,r);break}i+=z3(r,4)}return i}function RS(t,e,i,o){const r=new Uint8Array(e.buffer,i,o),n=new TextDecoder("utf8").decode(r);return t.json=JSON.parse(n),z3(o,4)}function LS(t,e,i,o){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:i,byteLength:o,arrayBuffer:e.buffer}),z3(o,4)}function Wee(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const i=e.baseUri||e.uri;if(!i)throw new Error(`'baseUri' must be provided to resolve relative url ${t}`);return i.substr(0,i.lastIndexOf("/")+1)+t}const bFt="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",wFt="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",CFt=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),xFt=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),kFt={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},MFt={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function EFt(t,e,i,o,r,n="NONE"){const a=await BFt();SFt(a,a.exports[MFt[r]],t,e,i,o,a.exports[kFt[n||"NONE"]])}let _S;async function BFt(){return _S||(_S=PFt()),_S}async function PFt(){let t=bFt;WebAssembly.validate(CFt)&&(t=wFt,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(IFt(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function IFt(t){const e=new Uint8Array(t.length);for(let o=0;o<t.length;++o){const r=t.charCodeAt(o);e[o]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let i=0;for(let o=0;o<t.length;++o)e[i++]=e[o]<60?xFt[e[o]]:(e[o]-60)*64+e[++o];return e.buffer.slice(0,i)}function SFt(t,e,i,o,r,n,a){const s=t.exports.sbrk,l=o+3&-4,c=s(l*r),d=s(n.length),u=new Uint8Array(t.exports.memory.buffer);u.set(n,d);const h=e(c,o,r,d,n.length);if(h===0&&a&&a(c,l,r),i.set(u.subarray(c,c+o*r)),s(c-s(0)),h!==0)throw new Error(`Malformed buffer data: ${h}`)}const _b="EXT_meshopt_compression",TFt=_b;async function DFt(t,e){const i=new Ir(t);if(!e?.gltf?.decompressMeshes||!e.gltf?.loadBuffers)return;const o=[];for(const r of t.json.bufferViews||[])o.push(RFt(i,r));await Promise.all(o),i.removeExtension(_b)}async function RFt(t,e){const i=t.getObjectExtension(e,_b);if(i){const{byteOffset:o=0,byteLength:r=0,byteStride:n,count:a,mode:s,filter:l="NONE",buffer:c}=i,d=t.gltf.buffers[c],u=new Uint8Array(d.arrayBuffer,d.byteOffset+o,r),h=new Uint8Array(t.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await EFt(h,a,n,u,s,l),t.removeObjectExtension(e,_b)}}const LFt=Object.freeze(Object.defineProperty({__proto__:null,decode:DFt,name:TFt},Symbol.toStringTag,{value:"Module"})),W1="EXT_texture_webp",_Ft=W1;function FFt(t,e){const i=new Ir(t);if(!SLt("image/webp")){if(i.getRequiredExtensions().includes(W1))throw new Error(`gltf: Required extension ${W1} not supported by browser`);return}const{json:o}=i;for(const r of o.textures||[]){const n=i.getObjectExtension(r,W1);n&&(r.source=n.source),i.removeObjectExtension(r,W1)}i.removeExtension(W1)}const OFt=Object.freeze(Object.defineProperty({__proto__:null,name:_Ft,preprocess:FFt},Symbol.toStringTag,{value:"Module"})),Fb="KHR_texture_basisu",UFt=Fb;function NFt(t,e){const i=new Ir(t),{json:o}=i;for(const r of o.textures||[]){const n=i.getObjectExtension(r,Fb);n&&(r.source=n.source,i.removeObjectExtension(r,Fb))}i.removeExtension(Fb)}const jFt=Object.freeze(Object.defineProperty({__proto__:null,name:UFt,preprocess:NFt},Symbol.toStringTag,{value:"Module"})),VFt="4.3.3",zFt={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:VFt,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function HFt(t,e,i){const o=Xee(e.metadata),r=[],n=qFt(e.attributes);for(const a in t){const s=t[a],l=Yee(a,s,n[a]);r.push(l)}if(i){const a=Yee("indices",i);r.push(a)}return{fields:r,metadata:o}}function qFt(t){const e={};for(const i in t){const o=t[i];e[o.name||"undefined"]=o}return e}function Yee(t,e,i){const o=i?Xee(i.metadata):void 0;return ZRt(t,e,o)}function Xee(t){Object.entries(t);const e={};for(const i in t)e[`${i}.string`]=JSON.stringify(t[i]);return e}const $ee={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},QFt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},GFt=4;class KFt{draco;decoder;metadataQuerier;constructor(e){this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,i={}){const o=new this.draco.DecoderBuffer;o.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(i);const r=this.decoder.GetEncodedGeometryType(o),n=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let a;switch(r){case this.draco.TRIANGULAR_MESH:a=this.decoder.DecodeBufferToMesh(o,n);break;case this.draco.POINT_CLOUD:a=this.decoder.DecodeBufferToPointCloud(o,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!a.ok()||!n.ptr){const u=`DRACO decompression failed: ${a.error_msg()}`;throw new Error(u)}const s=this._getDracoLoaderData(n,r,i),l=this._getMeshData(n,s,i),c=JRt(l.attributes),d=HFt(l.attributes,s,l.indices);return{loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:c},...l,schema:d}}finally{this.draco.destroy(o),n&&this.draco.destroy(n)}}_getDracoLoaderData(e,i,o){const r=this._getTopLevelMetadata(e),n=this._getDracoAttributes(e,o);return{geometry_type:i,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:n}}_getDracoAttributes(e,i){const o={};for(let r=0;r<e.num_attributes();r++){const n=this.decoder.GetAttribute(e,r),a=this._getAttributeMetadata(e,r);o[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:r,metadata:a};const s=this._getQuantizationTransform(n,i);s&&(o[n.unique_id()].quantization_transform=s);const l=this._getOctahedronTransform(n,i);l&&(o[n.unique_id()].octahedron_transform=l)}return o}_getMeshData(e,i,o){const r=this._getMeshAttributes(i,e,o);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");return e instanceof this.draco.Mesh?o.topology==="triangle-strip"?{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(e),size:1}}:{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(e),size:1}}:{topology:"point-list",mode:0,attributes:r}}_getMeshAttributes(e,i,o){const r={};for(const n of Object.values(e.attributes)){const a=this._deduceAttributeName(n,o);n.name=a;const s=this._getAttributeValues(i,n);if(s){const{value:l,size:c}=s;r[a]={value:l,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}}return r}_getTriangleListIndices(e){const i=e.num_faces()*3,o=i*GFt,r=this.draco._malloc(o);try{return this.decoder.GetTrianglesUInt32Array(e,o,r),new Uint32Array(this.draco.HEAPF32.buffer,r,i).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(e){const i=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,i),WFt(i)}finally{this.draco.destroy(i)}}_getAttributeValues(e,i){const o=QFt[i.data_type];if(!o)return console.warn(`DRACO: Unsupported attribute type ${i.data_type}`),null;const r=i.num_components,n=e.num_points()*r,a=n*o.BYTES_PER_ELEMENT,s=JFt(this.draco,o);let l;const c=this.draco._malloc(a);try{const d=this.decoder.GetAttribute(e,i.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,d,s,a,c),l=new o(this.draco.HEAPF32.buffer,c,n).slice()}finally{this.draco._free(c)}return{value:l,size:r}}_deduceAttributeName(e,i){const o=e.unique_id;for(const[a,s]of Object.entries(i.extraAttributes||{}))if(s===o)return a;const r=e.attribute_type;for(const a in $ee)if(this.draco[a]===r)return $ee[a];const n=i.attributeNameEntry||"name";return e.metadata[n]?e.metadata[n].string:`CUSTOM_ATTRIBUTE_${o}`}_getTopLevelMetadata(e){const i=this.decoder.GetMetadata(e);return this._getDracoMetadata(i)}_getAttributeMetadata(e,i){const o=this.decoder.GetAttributeMetadata(e,i);return this._getDracoMetadata(o)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const i={},o=this.metadataQuerier.NumEntries(e);for(let r=0;r<o;r++){const n=this.metadataQuerier.GetEntryName(e,r);i[n]=this._getDracoMetadataField(e,n)}return i}_getDracoMetadataField(e,i){const o=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,i,o);const r=ZFt(o);return{int:this.metadataQuerier.GetIntEntry(e,i),string:this.metadataQuerier.GetStringEntry(e,i),double:this.metadataQuerier.GetDoubleEntry(e,i),intArray:r}}finally{this.draco.destroy(o)}}_disableAttributeTransforms(e){const{quantizedAttributes:i=[],octahedronAttributes:o=[]}=e,r=[...i,...o];for(const n of r)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(e,i){const{quantizedAttributes:o=[]}=i,r=e.attribute_type();if(o.map(n=>this.decoder[n]).includes(r)){const n=new this.draco.AttributeQuantizationTransform;try{if(n.InitFromAttribute(e))return{quantization_bits:n.quantization_bits(),range:n.range(),min_values:new Float32Array([1,2,3]).map(a=>n.min_value(a))}}finally{this.draco.destroy(n)}}return null}_getOctahedronTransform(e,i){const{octahedronAttributes:o=[]}=i,r=e.attribute_type();if(o.map(n=>this.decoder[n]).includes(r)){const n=new this.draco.AttributeQuantizationTransform;try{if(n.InitFromAttribute(e))return{quantization_bits:n.quantization_bits()}}finally{this.draco.destroy(n)}}return null}}function JFt(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}function ZFt(t){const e=t.size(),i=new Int32Array(e);for(let o=0;o<e;o++)i[o]=t.GetValue(o);return i}function WFt(t){const e=t.size(),i=new Int32Array(e);for(let o=0;o<e;o++)i[o]=t.GetValue(o);return i}const YFt="1.5.6",XFt="1.4.1",FS=`https://www.gstatic.com/draco/versioned/decoders/${YFt}`,ea={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},OS={[ea.DECODER]:`${FS}/${ea.DECODER}`,[ea.DECODER_WASM]:`${FS}/${ea.DECODER_WASM}`,[ea.FALLBACK_DECODER]:`${FS}/${ea.FALLBACK_DECODER}`,[ea.ENCODER]:`https://raw.githubusercontent.com/google/draco/${XFt}/javascript/${ea.ENCODER}`};let US;async function $Ft(t){const e=t.modules||{};return e.draco3d?US||=e.draco3d.createDecoderModule({}).then(i=>({draco:i})):US||=eOt(t),await US}async function eOt(t){let e,i;return(t.draco&&t.draco.decoderType)==="js"?e=await xh(OS[ea.FALLBACK_DECODER],"draco",t,ea.FALLBACK_DECODER):[e,i]=await Promise.all([await xh(OS[ea.DECODER],"draco",t,ea.DECODER),await xh(OS[ea.DECODER_WASM],"draco",t,ea.DECODER_WASM)]),e=e||globalThis.DracoDecoderModule,await tOt(e,i)}function tOt(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t({...i,onModuleLoaded:r=>o({draco:r})})})}const iOt={...zFt,parse:oOt};async function oOt(t,e){const{draco:i}=await $Ft(e),o=new KFt(i);try{return o.parseSync(t,e?.draco)}finally{o.destroy()}}function rOt(t){const e={};for(const i in t){const o=t[i];if(i!=="indices"){const r=ete(o);e[i]=r}}return e}function ete(t){const{buffer:e,size:i,count:o}=nOt(t);return{value:e,size:i,byteOffset:0,count:o,type:Ree(i),componentType:Ib(e)}}function nOt(t){let e=t,i=1,o=0;return t&&t.value&&(e=t.value,i=t.size||1),e&&(ArrayBuffer.isView(e)||(e=aOt(e,Float32Array)),o=e.length/i),{buffer:e,size:i,count:o}}function aOt(t,e,i=!1){return t?Array.isArray(t)?new e(t):i&&!(t instanceof e)?new e(t):t:null}const Vd="KHR_draco_mesh_compression",sOt=Vd;function lOt(t,e,i){const o=new Ir(t);for(const r of tte(o))o.getObjectExtension(r,Vd)}async function cOt(t,e,i){if(!e?.gltf?.decompressMeshes)return;const o=new Ir(t),r=[];for(const n of tte(o))o.getObjectExtension(n,Vd)&&r.push(uOt(o,n,e,i));await Promise.all(r),o.removeExtension(Vd)}function dOt(t,e={}){const i=new Ir(t);for(const o of i.json.meshes||[])hOt(o),i.addRequiredExtension(Vd)}async function uOt(t,e,i,o){const r=t.getObjectExtension(e,Vd);if(!r)return;const n=t.getTypedArrayForBufferView(r.bufferView),a=eee(n.buffer,n.byteOffset),s={...i};delete s["3d-tiles"];const l=await O$(a,iOt,s,o),c=rOt(l.attributes);for(const[d,u]of Object.entries(c))if(d in e.attributes){const h=e.attributes[d],p=t.getAccessor(h);p?.min&&p?.max&&(u.min=p.min,u.max=p.max)}e.attributes=c,l.indices&&(e.indices=ete(l.indices)),t.removeObjectExtension(e,Vd),pOt(e)}function hOt(t,e,i=4,o,r){if(!o.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const n=o.DracoWriter.encodeSync({attributes:t}),a=r?.parseSync?.({attributes:t}),s=o._addFauxAttributes(a.attributes),l=o.addBufferView(n);return{primitives:[{attributes:s,mode:i,extensions:{[Vd]:{bufferView:l,attributes:s}}}]}}function pOt(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*tte(t){for(const e of t.json.meshes||[])for(const i of e.primitives)yield i}const fOt=Object.freeze(Object.defineProperty({__proto__:null,decode:cOt,encode:dOt,name:sOt,preprocess:lOt},Symbol.toStringTag,{value:"Module"})),AOt={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...AOt}};const Ka=globalThis.mathgl.config;function gOt(t,{precision:e=Ka.precision}={}){return t=mOt(t),`${parseFloat(t.toPrecision(e))}`}function Ob(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ite(t,e,i){const o=Ka.EPSILON;try{if(t===e)return!0;if(Ob(t)&&Ob(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!ite(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):typeof t=="number"&&typeof e=="number"?Math.abs(t-e)<=Ka.EPSILON*Math.max(1,Math.abs(t),Math.abs(e)):!1}finally{Ka.EPSILON=o}}function mOt(t){return Math.round(t/Ka.EPSILON)*Ka.EPSILON}class ote extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,i=0){for(let o=0;o<this.ELEMENTS;++o)this[o]=e[o+i];return this.check()}toArray(e=[],i=0){for(let o=0;o<this.ELEMENTS;++o)e[i+o]=this[o];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:Ob(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(Ka)}formatString(e){let i="";for(let o=0;o<this.ELEMENTS;++o)i+=(o>0?", ":"")+gOt(this[o],e);return`${e.printTypes?this.constructor.name:""}[${i}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let i=0;i<this.ELEMENTS;++i)if(!ite(this[i],e[i]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let i=0;i<this.ELEMENTS;++i)if(this[i]!==e[i])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,i,o){if(o===void 0)return this.lerp(this,e,i);for(let r=0;r<this.ELEMENTS;++r){const n=e[r],a=typeof i=="number"?i:i[r];this[r]=n+o*(a-n)}return this.check()}min(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=Math.min(e[i],this[i]);return this.check()}max(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=Math.max(e[i],this[i]);return this.check()}clamp(e,i){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e[o]),i[o]);return this.check()}add(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}subtract(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}scale(e){if(typeof e=="number")for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;else for(let i=0;i<this.ELEMENTS&&i<e.length;++i)this[i]*=e[i];return this.check()}multiplyByScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;return this.check()}check(){if(Ka.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let e=this.length===this.ELEMENTS;for(let i=0;i<this.ELEMENTS;++i)e=e&&Number.isFinite(this[i]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=e;return this.check()}addScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,i){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e),i);return this.check()}get elements(){return this}}function vOt(t,e){if(t.length!==e)return!1;for(let i=0;i<t.length;++i)if(!Number.isFinite(t[i]))return!1;return!0}function xa(t){if(!Number.isFinite(t))throw new Error(`Invalid number ${JSON.stringify(t)}`);return t}function yOt(t,e,i=""){if(Ka.debug&&!vOt(t,e))throw new Error(`math.gl: ${i} some fields set to invalid numbers'`);return t}function rte(t,e){if(!t)throw new Error(`math.gl assertion ${e}`)}class bOt extends ote{get x(){return this[0]}set x(e){this[0]=xa(e)}get y(){return this[1]}set y(e){this[1]=xa(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let i=0;i<this.ELEMENTS;++i)e+=this[i]*this[i];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let i=0;for(let o=0;o<this.ELEMENTS;++o){const r=this[o]-e[o];i+=r*r}return xa(i)}dot(e){let i=0;for(let o=0;o<this.ELEMENTS;++o)i+=this[o]*e[o];return xa(i)}normalize(){const e=this.magnitude();if(e!==0)for(let i=0;i<this.ELEMENTS;++i)this[i]/=e;return this.check()}multiply(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}divide(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return rte(e>=0&&e<this.ELEMENTS,"index is out of range"),xa(this[e])}setComponent(e,i){return rte(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=i,this.check()}addVectors(e,i){return this.copy(e).add(i)}subVectors(e,i){return this.copy(e).subtract(i)}multiplyVectors(e,i){return this.copy(e).multiply(i)}addScaledVector(e,i){return this.add(new this.constructor(e).multiplyScalar(i))}}let Ub=typeof Float32Array<"u"?Float32Array:Array;function wOt(){const t=new Ub(2);return Ub!=Float32Array&&(t[0]=0,t[1]=0),t}function COt(t,e,i){const o=e[0],r=e[1];return t[0]=i[0]*o+i[3]*r+i[6],t[1]=i[1]*o+i[4]*r+i[7],t}(function(){const t=wOt();return function(e,i,o,r,n,a){let s,l;for(i||(i=2),o||(o=0),r?l=Math.min(r*i+o,e.length):l=e.length,s=o;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],n(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}})();function xOt(t,e,i){const o=e[0],r=e[1],n=e[2],a=i[3]*o+i[7]*r+i[11]*n||1;return t[0]=(i[0]*o+i[4]*r+i[8]*n)/a,t[1]=(i[1]*o+i[5]*r+i[9]*n)/a,t[2]=(i[2]*o+i[6]*r+i[10]*n)/a,t}function kOt(t,e,i){const o=e[0],r=e[1];return t[0]=i[0]*o+i[2]*r,t[1]=i[1]*o+i[3]*r,t[2]=e[2],t}function MOt(t,e,i){const o=e[0],r=e[1],n=e[2];return t[0]=i[0]*o+i[3]*r+i[6]*n,t[1]=i[1]*o+i[4]*r+i[7]*n,t[2]=i[2]*o+i[5]*r+i[8]*n,t[3]=e[3],t}function EOt(){const t=new Ub(3);return Ub!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function BOt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function POt(t,e,i){const o=e[0],r=e[1],n=e[2],a=i[0],s=i[1],l=i[2];return t[0]=r*l-n*s,t[1]=n*a-o*l,t[2]=o*s-r*a,t}function IOt(t,e,i){const o=e[0],r=e[1],n=e[2];let a=i[3]*o+i[7]*r+i[11]*n+i[15];return a=a||1,t[0]=(i[0]*o+i[4]*r+i[8]*n+i[12])/a,t[1]=(i[1]*o+i[5]*r+i[9]*n+i[13])/a,t[2]=(i[2]*o+i[6]*r+i[10]*n+i[14])/a,t}function nte(t,e,i){const o=e[0],r=e[1],n=e[2];return t[0]=o*i[0]+r*i[3]+n*i[6],t[1]=o*i[1]+r*i[4]+n*i[7],t[2]=o*i[2]+r*i[5]+n*i[8],t}function SOt(t,e,i){const o=i[0],r=i[1],n=i[2],a=i[3],s=e[0],l=e[1],c=e[2];let d=r*c-n*l,u=n*s-o*c,h=o*l-r*s,p=r*h-n*u,A=n*d-o*h,f=o*u-r*d;const m=a*2;return d*=m,u*=m,h*=m,p*=2,A*=2,f*=2,t[0]=s+d+p,t[1]=l+u+A,t[2]=c+h+f,t}function TOt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[0],n[1]=r[1]*Math.cos(o)-r[2]*Math.sin(o),n[2]=r[1]*Math.sin(o)+r[2]*Math.cos(o),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function DOt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[2]*Math.sin(o)+r[0]*Math.cos(o),n[1]=r[1],n[2]=r[2]*Math.cos(o)-r[0]*Math.sin(o),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function ROt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[0]*Math.cos(o)-r[1]*Math.sin(o),n[1]=r[0]*Math.sin(o)+r[1]*Math.cos(o),n[2]=r[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function LOt(t,e){const i=t[0],o=t[1],r=t[2],n=e[0],a=e[1],s=e[2],l=Math.sqrt((i*i+o*o+r*r)*(n*n+a*a+s*s)),c=l&&BOt(t,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}(function(){const t=EOt();return function(e,i,o,r,n,a){let s,l;for(i||(i=3),o||(o=0),r?l=Math.min(r*i+o,e.length):l=e.length,s=o;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],n(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}})();const NS=[0,0,0];let Nb,_Ot=class t2e extends bOt{static get ZERO(){return Nb||(Nb=new t2e(0,0,0),Object.freeze(Nb)),Nb}constructor(e=0,i=0,o=0){super(-0,-0,-0),arguments.length===1&&Ob(e)?this.copy(e):(Ka.debug&&(xa(e),xa(i),xa(o)),this[0]=e,this[1]=i,this[2]=o)}set(e,i,o){return this[0]=e,this[1]=i,this[2]=o,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return Ka.debug&&(xa(e.x),xa(e.y),xa(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=xa(e)}angle(e){return LOt(this,e)}cross(e){return POt(this,this,e),this.check()}rotateX({radians:e,origin:i=NS}){return TOt(this,this,i,e),this.check()}rotateY({radians:e,origin:i=NS}){return DOt(this,this,i,e),this.check()}rotateZ({radians:e,origin:i=NS}){return ROt(this,this,i,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return IOt(this,this,e),this.check()}transformAsVector(e){return xOt(this,this,e),this.check()}transformByMatrix3(e){return nte(this,this,e),this.check()}transformByMatrix2(e){return kOt(this,this,e),this.check()}transformByQuaternion(e){return SOt(this,this,e),this.check()}};class FOt extends ote{toString(){let e="[";if(Ka.printRowMajor){e+="row-major:";for(let i=0;i<this.RANK;++i)for(let o=0;o<this.RANK;++o)e+=` ${this[o*this.RANK+i]}`}else{e+="column-major:";for(let i=0;i<this.ELEMENTS;++i)e+=` ${this[i]}`}return e+="]",e}getElementIndex(e,i){return i*this.RANK+e}getElement(e,i){return this[i*this.RANK+e]}setElement(e,i,o){return this[i*this.RANK+e]=xa(o),this}getColumn(e,i=new Array(this.RANK).fill(-0)){const o=e*this.RANK;for(let r=0;r<this.RANK;++r)i[r]=this[o+r];return i}setColumn(e,i){const o=e*this.RANK;for(let r=0;r<this.RANK;++r)this[o+r]=i[r];return this}}function OOt(t,e){if(t===e){const i=e[1],o=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=i,t[5]=e[7],t[6]=o,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function UOt(t,e){const i=e[0],o=e[1],r=e[2],n=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=d*a-s*c,h=-d*n+s*l,p=c*n-a*l;let A=i*u+o*h+r*p;return A?(A=1/A,t[0]=u*A,t[1]=(-d*o+r*c)*A,t[2]=(s*o-r*a)*A,t[3]=h*A,t[4]=(d*i-r*l)*A,t[5]=(-s*i+r*n)*A,t[6]=p*A,t[7]=(-c*i+o*l)*A,t[8]=(a*i-o*n)*A,t):null}function NOt(t){const e=t[0],i=t[1],o=t[2],r=t[3],n=t[4],a=t[5],s=t[6],l=t[7],c=t[8];return e*(c*n-a*l)+i*(-c*r+a*s)+o*(l*r-n*s)}function ate(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=i[0],p=i[1],A=i[2],f=i[3],m=i[4],g=i[5],y=i[6],v=i[7],b=i[8];return t[0]=h*o+p*a+A*c,t[1]=h*r+p*s+A*d,t[2]=h*n+p*l+A*u,t[3]=f*o+m*a+g*c,t[4]=f*r+m*s+g*d,t[5]=f*n+m*l+g*u,t[6]=y*o+v*a+b*c,t[7]=y*r+v*s+b*d,t[8]=y*n+v*l+b*u,t}function jOt(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=i[0],p=i[1];return t[0]=o,t[1]=r,t[2]=n,t[3]=a,t[4]=s,t[5]=l,t[6]=h*o+p*a+c,t[7]=h*r+p*s+d,t[8]=h*n+p*l+u,t}function VOt(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=Math.sin(i),p=Math.cos(i);return t[0]=p*o+h*a,t[1]=p*r+h*s,t[2]=p*n+h*l,t[3]=p*a-h*o,t[4]=p*s-h*r,t[5]=p*l-h*n,t[6]=c,t[7]=d,t[8]=u,t}function ste(t,e,i){const o=i[0],r=i[1];return t[0]=o*e[0],t[1]=o*e[1],t[2]=o*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function zOt(t,e){const i=e[0],o=e[1],r=e[2],n=e[3],a=i+i,s=o+o,l=r+r,c=i*a,d=o*a,u=o*s,h=r*a,p=r*s,A=r*l,f=n*a,m=n*s,g=n*l;return t[0]=1-u-A,t[3]=d-g,t[6]=h+m,t[1]=d+g,t[4]=1-c-A,t[7]=p-f,t[2]=h-m,t[5]=p+f,t[8]=1-c-u,t}var jS;(function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL1ROW0=3]="COL1ROW0",t[t.COL1ROW1=4]="COL1ROW1",t[t.COL1ROW2=5]="COL1ROW2",t[t.COL2ROW0=6]="COL2ROW0",t[t.COL2ROW1=7]="COL2ROW1",t[t.COL2ROW2=8]="COL2ROW2"})(jS||(jS={}));const HOt=Object.freeze([1,0,0,0,1,0,0,0,1]);let K3=class extends FOt{static get IDENTITY(){return QOt()}static get ZERO(){return qOt()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return jS}constructor(t,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(t)?this.copy(t):e.length>0?this.copy([t,...e]):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}identity(){return this.copy(HOt)}fromObject(t){return this.check()}fromQuaternion(t){return zOt(this,t),this.check()}set(t,e,i,o,r,n,a,s,l){return this[0]=t,this[1]=e,this[2]=i,this[3]=o,this[4]=r,this[5]=n,this[6]=a,this[7]=s,this[8]=l,this.check()}setRowMajor(t,e,i,o,r,n,a,s,l){return this[0]=t,this[1]=o,this[2]=a,this[3]=e,this[4]=r,this[5]=s,this[6]=i,this[7]=n,this[8]=l,this.check()}determinant(){return NOt(this)}transpose(){return OOt(this,this),this.check()}invert(){return UOt(this,this),this.check()}multiplyLeft(t){return ate(this,t,this),this.check()}multiplyRight(t){return ate(this,this,t),this.check()}rotate(t){return VOt(this,this,t),this.check()}scale(t){return Array.isArray(t)?ste(this,this,t):ste(this,this,[t,t]),this.check()}translate(t){return jOt(this,this,t),this.check()}transform(t,e){let i;switch(t.length){case 2:i=COt(e||[-0,-0],t,this);break;case 3:i=nte(e||[-0,-0,-0],t,this);break;case 4:i=MOt(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return yOt(i,t.length),i}transformVector(t,e){return this.transform(t,e)}transformVector2(t,e){return this.transform(t,e)}transformVector3(t,e){return this.transform(t,e)}},jb,Vb=null;function qOt(){return jb||(jb=new K3([0,0,0,0,0,0,0,0,0]),Object.freeze(jb)),jb}function QOt(){return Vb||(Vb=new K3,Object.freeze(Vb)),Vb}const zb="KHR_texture_transform",GOt=zb,Hb=new _Ot,KOt=new K3,JOt=new K3;async function ZOt(t,e){if(!new Ir(t).hasExtension(zb)||!e.gltf?.loadBuffers)return;const i=t.json.materials||[];for(let o=0;o<i.length;o++)WOt(o,t)}function WOt(t,e){const i=e.json.materials?.[t],o=[i?.pbrMetallicRoughness?.baseColorTexture,i?.emissiveTexture,i?.normalTexture,i?.occlusionTexture,i?.pbrMetallicRoughness?.metallicRoughnessTexture],r=[];for(const n of o)n&&n?.extensions?.[zb]&&YOt(e,t,n,r)}function YOt(t,e,i,o){const r=XOt(i,o);if(!r)return;const n=t.json.meshes||[];for(const a of n)for(const s of a.primitives){const l=s.material;Number.isFinite(l)&&e===l&&$Ot(t,s,r)}}function XOt(t,e){const i=t.extensions?.[zb],{texCoord:o=0}=t,{texCoord:r=o}=i;if(e.findIndex(([n,a])=>n===o&&a===r)===-1){const n=iUt(i);return o!==r&&(t.texCoord=r),e.push([o,r]),{originalTexCoord:o,texCoord:r,matrix:n}}return null}function $Ot(t,e,i){const{originalTexCoord:o,texCoord:r,matrix:n}=i,a=e.attributes[`TEXCOORD_${o}`];if(Number.isFinite(a)){const s=t.json.accessors?.[a];if(s&&s.bufferView){const l=t.json.bufferViews?.[s.bufferView];if(l){const{arrayBuffer:c,byteOffset:d}=t.buffers[l.buffer],u=(d||0)+(s.byteOffset||0)+(l.byteOffset||0),{ArrayType:h,length:p}=MS(s,l),A=Tee[s.componentType],f=See[s.type],m=l.byteStride||A*f,g=new Float32Array(p);for(let y=0;y<s.count;y++){const v=new h(c,u+y*m,2);Hb.set(v[0],v[1],1),Hb.transformByMatrix3(n),g.set([Hb[0],Hb[1]],y*f)}o===r?eUt(s,l,t.buffers,g):tUt(r,s,e,t,g)}}}}function eUt(t,e,i,o){t.componentType=5126,i.push({arrayBuffer:o.buffer,byteOffset:0,byteLength:o.buffer.byteLength}),e.buffer=i.length-1,e.byteLength=o.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function tUt(t,e,i,o,r){o.buffers.push({arrayBuffer:r.buffer,byteOffset:0,byteLength:r.buffer.byteLength});const n=o.json.bufferViews;if(!n)return;n.push({buffer:o.buffers.length-1,byteLength:r.buffer.byteLength,byteOffset:0});const a=o.json.accessors;a&&(a.push({bufferView:n?.length-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),i.attributes[`TEXCOORD_${t}`]=a.length-1)}function iUt(t){const{offset:e=[0,0],rotation:i=0,scale:o=[1,1]}=t,r=new K3().set(1,0,0,0,1,0,e[0],e[1],1),n=KOt.set(Math.cos(i),Math.sin(i),0,-Math.sin(i),Math.cos(i),0,0,0,1),a=JOt.set(o[0],0,0,0,o[1],0,0,0,1);return r.multiplyRight(n).multiplyRight(a)}const oUt=Object.freeze(Object.defineProperty({__proto__:null,decode:ZOt,name:GOt},Symbol.toStringTag,{value:"Module"})),Mh="KHR_lights_punctual",rUt=Mh;async function nUt(t){const e=new Ir(t),{json:i}=e,o=e.getExtension(Mh);o&&(e.json.lights=o.lights,e.removeExtension(Mh));for(const r of i.nodes||[]){const n=e.getObjectExtension(r,Mh);n&&(r.light=n.light),e.removeObjectExtension(r,Mh)}}async function aUt(t){const e=new Ir(t),{json:i}=e;if(i.lights){const o=e.addExtension(Mh);wa(!o.lights),o.lights=i.lights,delete i.lights}if(e.json.lights){for(const o of e.json.lights){const r=o.node;e.addObjectExtension(r,Mh,o)}delete e.json.lights}}const sUt=Object.freeze(Object.defineProperty({__proto__:null,decode:nUt,encode:aUt,name:rUt},Symbol.toStringTag,{value:"Module"})),J3="KHR_materials_unlit",lUt=J3;async function cUt(t){const e=new Ir(t),{json:i}=e;for(const o of i.materials||[])o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),e.removeObjectExtension(o,J3);e.removeExtension(J3)}function dUt(t){const e=new Ir(t),{json:i}=e;if(e.materials)for(const o of i.materials||[])o.unlit&&(delete o.unlit,e.addObjectExtension(o,J3,{}),e.addExtension(J3))}const uUt=Object.freeze(Object.defineProperty({__proto__:null,decode:cUt,encode:dUt,name:lUt},Symbol.toStringTag,{value:"Module"})),Z3="KHR_techniques_webgl",hUt=Z3;async function pUt(t){const e=new Ir(t),{json:i}=e,o=e.getExtension(Z3);if(o){const r=AUt(o,e);for(const n of i.materials||[]){const a=e.getObjectExtension(n,Z3);a&&(n.technique=Object.assign({},a,r[a.technique]),n.technique.values=gUt(n.technique,e)),e.removeObjectExtension(n,Z3)}e.removeExtension(Z3)}}async function fUt(t,e){}function AUt(t,e){const{programs:i=[],shaders:o=[],techniques:r=[]}=t,n=new TextDecoder;return o.forEach(a=>{if(Number.isFinite(a.bufferView))a.code=n.decode(e.getTypedArrayForBufferView(a.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),i.forEach(a=>{a.fragmentShader=o[a.fragmentShader],a.vertexShader=o[a.vertexShader]}),r.forEach(a=>{a.program=i[a.program]}),r}function gUt(t,e){const i=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(o=>{t.uniforms[o].value&&!(o in i)&&(i[o]=t.uniforms[o].value)}),Object.keys(i).forEach(o=>{typeof i[o]=="object"&&i[o].index!==void 0&&(i[o].texture=e.getTexture(i[o].index))}),i}const mUt=Object.freeze(Object.defineProperty({__proto__:null,decode:pUt,encode:fUt,name:hUt},Symbol.toStringTag,{value:"Module"})),lte=[I_t,e_t,LFt,OFt,jFt,fOt,sUt,uUt,mUt,oUt,G_t];function vUt(t,e={},i){const o=lte.filter(r=>cte(r.name,e));for(const r of o)r.preprocess?.(t,e,i)}async function yUt(t,e={},i){const o=lte.filter(r=>cte(r.name,e));for(const r of o)await r.decode?.(t,e,i)}function cte(t,e){const i=e?.gltf?.excludeExtensions||{};return!(t in i&&!i[t])}const VS="KHR_binary_glTF";function bUt(t){const e=new Ir(t),{json:i}=e;for(const o of i.images||[]){const r=e.getObjectExtension(o,VS);r&&Object.assign(o,r),e.removeObjectExtension(o,VS)}i.buffers&&i.buffers[0]&&delete i.buffers[0].uri,e.removeExtension(VS)}const dte={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},wUt={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class CUt{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,i){this.json=e.json;const o=e.json;switch(o.asset&&o.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${o.asset.version}`);return}if(!i.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(o),this._convertTopLevelObjectsToArrays(o),bUt(e),this._convertObjectIdsToArrayIndices(o),this._updateObjects(o),this._updateMaterial(o)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const i in dte)this._convertTopLevelObjectToArray(e,i)}_convertTopLevelObjectToArray(e,i){const o=e[i];if(!(!o||Array.isArray(o))){e[i]=[];for(const r in o){const n=o[r];n.id=n.id||r;const a=e[i].length;e[i].push(n),this.idToIndexMap[i][r]=a}}}_convertObjectIdsToArrayIndices(e){for(const i in dte)this._convertIdsToIndices(e,i);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const i of e.textures)this._convertTextureIds(i);for(const i of e.meshes)this._convertMeshIds(i);for(const i of e.nodes)this._convertNodeIds(i);for(const i of e.scenes)this._convertSceneIds(i)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const i of e.primitives){const{attributes:o,indices:r,material:n}=i;for(const a in o)o[a]=this._convertIdToIndex(o[a],"accessor");r&&(i.indices=this._convertIdToIndex(r,"accessor")),n&&(i.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(i=>this._convertIdToIndex(i,"node"))),e.meshes&&(e.meshes=e.meshes.map(i=>this._convertIdToIndex(i,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(i=>this._convertIdToIndex(i,"node")))}_convertIdsToIndices(e,i){e[i]||(console.warn(`gltf v1: json doesn't contain attribute ${i}`),e[i]=[]);for(const o of e[i])for(const r in o){const n=o[r],a=this._convertIdToIndex(n,r);o[r]=a}}_convertIdToIndex(e,i){const o=wUt[i];if(o in this.idToIndexMap){const r=this.idToIndexMap[o][e];if(!Number.isFinite(r))throw new Error(`gltf v1: failed to resolve ${i} with id ${e}`);return r}return e}_updateObjects(e){for(const i of this.json.buffers)delete i.type}_updateMaterial(e){for(const i of e.materials){i.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const o=i.values?.tex||i.values?.texture2d_0||i.values?.diffuseTex,r=e.textures.findIndex(n=>n.id===o);r!==-1&&(i.pbrMetallicRoughness.baseColorTexture={index:r})}}}function xUt(t,e={}){return new CUt().normalize(t,e)}async function kUt(t,e,i=0,o,r){return MUt(t,e,i,o),xUt(t,{normalize:o?.gltf?.normalize}),vUt(t,o,r),o?.gltf?.loadBuffers&&t.json.buffers&&await EUt(t,o,r),o?.gltf?.loadImages&&await BUt(t,o,r),await yUt(t,o,r),t}function MUt(t,e,i,o){if(o.uri&&(t.baseUri=o.uri),e instanceof ArrayBuffer&&!AFt(e,i,o)&&(e=new TextDecoder().decode(e)),typeof e=="string")t.json=ODt(e);else if(e instanceof ArrayBuffer){const a={};i=gFt(a,e,i,o.glb),wa(a.type==="glTF",`Invalid GLB magic string ${a.type}`),t._glb=a,t.json=a.json}else wa(!1,"GLTF: must be ArrayBuffer or string");const r=t.json.buffers||[];if(t.buffers=new Array(r.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:a}=t._glb;t.buffers[0]={arrayBuffer:a[0].arrayBuffer,byteOffset:a[0].byteOffset,byteLength:a[0].byteLength}}const n=t.json.images||[];t.images=new Array(n.length).fill({})}async function EUt(t,e,i){const o=t.json.buffers||[];for(let r=0;r<o.length;++r){const n=o[r];if(n.uri){const{fetch:a}=i;wa(a);const s=Wee(n.uri,e),l=await(await i?.fetch?.(s))?.arrayBuffer?.();t.buffers[r]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete n.uri}else t.buffers[r]===null&&(t.buffers[r]={arrayBuffer:new ArrayBuffer(n.byteLength),byteOffset:0,byteLength:n.byteLength})}}async function BUt(t,e,i){const o=PUt(t),r=t.json.images||[],n=[];for(const a of o)n.push(IUt(t,r[a],a,e,i));return await Promise.all(n)}function PUt(t){const e=new Set,i=t.json.textures||[];for(const o of i)o.source!==void 0&&e.add(o.source);return Array.from(e).sort()}async function IUt(t,e,i,o,r){let n;if(e.uri&&!e.hasOwnProperty("bufferView")){const s=Wee(e.uri,o),{fetch:l}=r;n=await(await l(s)).arrayBuffer(),e.bufferView={data:n}}if(Number.isFinite(e.bufferView)){const s=NLt(t.json,t.buffers,e.bufferView);n=eee(s.buffer,s.byteOffset,s.byteLength)}wa(n,"glTF image has no data");let a=await O$(n,[ILt,lFt],{...o,mimeType:e.mimeType,basis:o.basis||{format:Jee()}},r);a&&a[0]&&(a={compressed:!0,mipmaps:!1,width:a[0].width,height:a[0].height,data:a[0]}),t.images=t.images||[],t.images[i]=a}const zS={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:K_t,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:SUt,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function SUt(t,e={},i){e={...zS.options,...e},e.gltf={...zS.options.gltf,...e.gltf};const{byteOffset:o=0}=e;return await kUt({},t,o,e,i)}const TUt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},DUt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ja={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},RUt={magFilter:Ja.TEXTURE_MAG_FILTER,minFilter:Ja.TEXTURE_MIN_FILTER,wrapS:Ja.TEXTURE_WRAP_S,wrapT:Ja.TEXTURE_WRAP_T},LUt={[Ja.TEXTURE_MAG_FILTER]:Ja.LINEAR,[Ja.TEXTURE_MIN_FILTER]:Ja.NEAREST_MIPMAP_LINEAR,[Ja.TEXTURE_WRAP_S]:Ja.REPEAT,[Ja.TEXTURE_WRAP_T]:Ja.REPEAT};function _Ut(){return{id:"default-sampler",parameters:LUt}}function FUt(t){return DUt[t]}function OUt(t){return TUt[t]}class UUt{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,i={}){const{json:o,buffers:r=[],images:n=[]}=e,{baseUri:a=""}=e;return wa(o),this.baseUri=a,this.buffers=r,this.images=n,this.jsonUnprocessed=o,this.json=this._resolveTree(e.json,i),this.json}_resolveTree(e,i={}){const o={...e};return this.json=o,e.bufferViews&&(o.bufferViews=e.bufferViews.map((r,n)=>this._resolveBufferView(r,n))),e.images&&(o.images=e.images.map((r,n)=>this._resolveImage(r,n))),e.samplers&&(o.samplers=e.samplers.map((r,n)=>this._resolveSampler(r,n))),e.textures&&(o.textures=e.textures.map((r,n)=>this._resolveTexture(r,n))),e.accessors&&(o.accessors=e.accessors.map((r,n)=>this._resolveAccessor(r,n))),e.materials&&(o.materials=e.materials.map((r,n)=>this._resolveMaterial(r,n))),e.meshes&&(o.meshes=e.meshes.map((r,n)=>this._resolveMesh(r,n))),e.nodes&&(o.nodes=e.nodes.map((r,n)=>this._resolveNode(r,n)),o.nodes=o.nodes.map((r,n)=>this._resolveNodeChildren(r))),e.skins&&(o.skins=e.skins.map((r,n)=>this._resolveSkin(r,n))),e.scenes&&(o.scenes=e.scenes.map((r,n)=>this._resolveScene(r,n))),typeof this.json.scene=="number"&&o.scenes&&(o.scene=o.scenes[this.json.scene]),o}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,i){if(typeof i=="object")return i;const o=e&&e[i];return o||console.warn(`glTF file error: Could not find ${e}[${i}]`),o}_resolveScene(e,i){return{...e,id:e.id||`scene-${i}`,nodes:(e.nodes||[]).map(o=>this.getNode(o))}}_resolveNode(e,i){const o={...e,id:e?.id||`node-${i}`};return e.mesh!==void 0&&(o.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(o.camera=this.getCamera(e.camera)),e.skin!==void 0&&(o.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(o.mesh=e.meshes.reduce((r,n)=>{const a=this.getMesh(n);return r.id=a.id,r.primitives=r.primitives.concat(a.primitives),r},{primitives:[]})),o}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(i=>this.getNode(i))),e}_resolveSkin(e,i){const o=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${i}`,inverseBindMatrices:o}}_resolveMesh(e,i){const o={...e,id:e.id||`mesh-${i}`,primitives:[]};return e.primitives&&(o.primitives=e.primitives.map(r=>{const n={...r,attributes:{},indices:void 0,material:void 0},a=r.attributes;for(const s in a)n.attributes[s]=this.getAccessor(a[s]);return r.indices!==void 0&&(n.indices=this.getAccessor(r.indices)),r.material!==void 0&&(n.material=this.getMaterial(r.material)),n})),o}_resolveMaterial(e,i){const o={...e,id:e.id||`material-${i}`};if(o.normalTexture&&(o.normalTexture={...o.normalTexture},o.normalTexture.texture=this.getTexture(o.normalTexture.index)),o.occlusionTexture&&(o.occlusionTexture={...o.occlusionTexture},o.occlusionTexture.texture=this.getTexture(o.occlusionTexture.index)),o.emissiveTexture&&(o.emissiveTexture={...o.emissiveTexture},o.emissiveTexture.texture=this.getTexture(o.emissiveTexture.index)),o.emissiveFactor||(o.emissiveFactor=o.emissiveTexture?[1,1,1]:[0,0,0]),o.pbrMetallicRoughness){o.pbrMetallicRoughness={...o.pbrMetallicRoughness};const r=o.pbrMetallicRoughness;r.baseColorTexture&&(r.baseColorTexture={...r.baseColorTexture},r.baseColorTexture.texture=this.getTexture(r.baseColorTexture.index)),r.metallicRoughnessTexture&&(r.metallicRoughnessTexture={...r.metallicRoughnessTexture},r.metallicRoughnessTexture.texture=this.getTexture(r.metallicRoughnessTexture.index))}return o}_resolveAccessor(e,i){const o=FUt(e.componentType),r=OUt(e.type),n=o*r,a={...e,id:e.id||`accessor-${i}`,bytesPerComponent:o,components:r,bytesPerElement:n,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(a.bufferView=this.getBufferView(e.bufferView)),a.bufferView){const s=a.bufferView.buffer,{ArrayType:l,byteLength:c}=MS(a,a.bufferView),d=(a.bufferView.byteOffset||0)+(a.byteOffset||0)+s.byteOffset;let u=s.arrayBuffer.slice(d,d+c);a.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(s,d,a.bufferView.byteStride,a.bytesPerElement,a.count)),a.value=new l(u)}return a}_getValueFromInterleavedBuffer(e,i,o,r,n){const a=new Uint8Array(n*r);for(let s=0;s<n;s++){const l=i+s*o;a.set(new Uint8Array(e.arrayBuffer.slice(l,l+r)),s*r)}return a.buffer}_resolveTexture(e,i){return{...e,id:e.id||`texture-${i}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):_Ut(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,i){const o={id:e.id||`sampler-${i}`,...e,parameters:{}};for(const r in o){const n=this._enumSamplerParameter(r);n!==void 0&&(o.parameters[n]=o[r])}return o}_enumSamplerParameter(e){return RUt[e]}_resolveImage(e,i){const o={...e,id:e.id||`image-${i}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},r=this.images[i];return r&&(o.image=r),o}_resolveBufferView(e,i){const o=e.buffer,r=this.buffers[o].arrayBuffer;let n=this.buffers[o].byteOffset||0;return e.byteOffset&&(n+=e.byteOffset),{id:`bufferView-${i}`,...e,buffer:this.buffers[o],data:new Uint8Array(r,n,e.byteLength)}}_resolveCamera(e,i){const o={...e,id:e.id||`camera-${i}`};return o.perspective,o.orthographic,o}}function NUt(t,e){return new UUt().postProcess(t,e)}class jUt{constructor(e){}load(e,i,o,r,n,a,s){r=r||{},VUt(e,i,o,r,n,function(){uo.scheduleTask(function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1)}),a&&a()},function(l){e.error(l),s&&s(l),n.fire("error",l)})}parse(e,i,o,r,n,a,s){r=r||{},HS(e,"",i,o,r,n,function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1),a&&a()},function(l){n.error(l),n.fire("error",l),s&&s(l)})}}function VUt(t,e,i,o,r,n,a){const s=t.viewer.scene.canvas.spinner;s.processes++,e.split(".").pop()==="glb"?t.dataSource.getGLB(e,l=>{o.basePath=ute(e),HS(t,e,l,i,o,r,n,a),s.processes--},l=>{s.processes--,a(l)}):t.dataSource.getGLTF(e,l=>{o.basePath=ute(e),HS(t,e,l,i,o,r,n,a),s.processes--},l=>{s.processes--,a(l)})}function ute(t){const e=t.lastIndexOf("/");return e!==0?t.substring(0,e+1):""}function HS(t,e,i,o,r,n,a,s){const l=t.viewer.scene.canvas.spinner;l.processes++,vS(i,zS,{baseUri:r.basePath}).then(c=>{const d=NUt(c),u={entityId:r.entityId,autoMetaModel:r.autoMetaModel,globalizeObjectIds:r.globalizeObjectIds,metaObjects:[],loadBuffer:r.loadBuffer,basePath:r.basePath,handlenode:r.handlenode,backfaces:!!r.backfaces,gltfData:d,scene:n.scene,plugin:t,sceneModel:n,numObjects:0,nextId:0};zUt(u),qUt(u),r.autoMetaModel&&u.metaObjects.push({id:n.id,type:"Default",name:n.id}),KUt(u),n.finalize(),r.autoMetaModel&&t.viewer.metaScene.createMetaModel(n.id,{metaObjects:u.metaObjects}),l.processes--,a()}).catch(c=>{s&&s(c)})}function zUt(t){const e=t.gltfData.textures;if(e)for(let i=0,o=e.length;i<o;i++)HUt(t,e[i])}function HUt(t,e){if(!e.source||!e.source.image)return;const i=`texture-${t.nextId++}`;let o=w1;switch(e.sampler.minFilter){case 9728:o=Ah;break;case 9729:o=un;break;case 9984:o=a3;break;case 9985:o=s3;break;case 9986:o=w1;break;case 9987:o=C1;break}let r=un;switch(e.sampler.magFilter){case 9728:r=Ah;break;case 9729:r=un;break}let n=Co;switch(e.sampler.wrapS){case 33071:n=dn;break;case 33648:n=uc;break;case 10497:n=Co;break}let a=Co;switch(e.sampler.wrapT){case 33071:a=dn;break;case 33648:a=uc;break;case 10497:a=Co;break}let s=Co;switch(e.sampler.wrapR){case 33071:s=dn;break;case 33648:s=uc;break;case 10497:s=Co;break}t.sceneModel.createTexture({id:i,image:e.source.image,flipY:!!e.flipY,minFilter:o,magFilter:r,wrapS:n,wrapT:a,wrapR:s,encoding:ho}),e._textureId=i}function qUt(t){const e=t.gltfData.materials;if(e)for(let i=0,o=e.length;i<o;i++){const r=e[i];r._textureSetId=QUt(t,r),r._attributes=GUt(t,r)}}function QUt(t,e){const i={};switch(e.normalTexture&&(i.normalTextureId=e.normalTexture.texture._textureId),e.occlusionTexture&&(i.occlusionTextureId=e.occlusionTexture.texture._textureId),e.emissiveTexture&&(i.emissiveTextureId=e.emissiveTexture.texture._textureId),e.alphaMode){case"OPAQUE":break;case"MASK":const n=e.alphaCutoff;i.alphaCutoff=n!==void 0?n:.5;break}const o=e.pbrMetallicRoughness;if(e.pbrMetallicRoughness){const n=e.pbrMetallicRoughness,a=n.baseColorTexture||n.colorTexture;a&&(a.texture?i.colorTextureId=a.texture._textureId:i.colorTextureId=t.gltfData.textures[a.index]._textureId),o.metallicRoughnessTexture&&(i.metallicRoughnessTextureId=o.metallicRoughnessTexture.texture._textureId)}const r=e.extensions;if(r){const n=r.KHR_materials_pbrSpecularGlossiness;if(n){n.specularTexture;const a=n.specularColorTexture;a!=null&&(i.colorTextureId=t.gltfData.textures[a.index]._textureId)}}return i.normalTextureId!==void 0||i.occlusionTextureId!==void 0||i.emissiveTextureId!==void 0||i.colorTextureId!==void 0||i.metallicRoughnessTextureId!==void 0?(i.id=`textureSet-${t.nextId++};`,t.sceneModel.createTextureSet(i),i.id):null}function GUt(t,e){const i=e.extensions,o={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(i){const n=i.KHR_materials_pbrSpecularGlossiness;if(n){const s=n.diffuseFactor;s!=null&&o.color.set(s)}const a=i.KHR_materials_common;if(a){const s=a.technique,l=a.values||{},c=s==="BLINN",d=s==="PHONG",u=s==="LAMBERT",h=l.diffuse;h&&(c||d||u)&&(mt.isString(h)||o.color.set(h));const p=l.transparency;p!=null&&(o.opacity=p);const A=l.transparent;A!=null&&(o.opacity=A)}}const r=e.pbrMetallicRoughness;if(r){const n=r.baseColorFactor;n&&(o.color[0]=n[0],o.color[1]=n[1],o.color[2]=n[2],o.opacity=n[3]);const a=r.metallicFactor;a!=null&&(o.metallic=a);const s=r.roughnessFactor;s!=null&&(o.roughness=s)}return o.doubleSided=e.doubleSided!==!1,o}function KUt(t){const e=t.gltfData,i=e.scene||e.scenes[0];if(!i){WUt(t,"glTF has no default scene");return}const o=i.nodes;if(!o)return;(function a(s){s.forEach(l=>{const c=l.mesh;c&&(c.instances||=0,c.instances+=1),l.children&&a(l.children)})})(o);const r=[];let n=null;(function a(s,l,c){s.forEach(d=>{const u=d.name;let h=u!=null&&u||l===0&&"entity-"+t.nextId++;if(h){for(;t.sceneModel.objects[h];)h="entity-"+t.nextId++;r.push(n),n=[]}const p=JUt(d,c);if(d.mesh&&ZUt(d,t,p,n),d.children&&a(d.children,l+1,p),h){if(n.length>0){const A=t.globalizeObjectIds?C.globalizeObjectId(t.sceneModel.id,h):h;t.sceneModel.createEntity({id:A,meshIds:n,isObject:!0}),t.autoMetaModel&&t.metaObjects.push({id:A,type:"Default",name:A,parent:t.sceneModel.id})}n=r.pop()}})})(o,0,null)}function JUt(t,e){let i;return t.matrix&&(i=t.matrix,e?e=C.mulMat4(e,i,C.mat4()):e=i),t.translation&&(i=C.translationMat4v(t.translation),e?e=C.mulMat4(e,i,C.mat4()):e=i),t.rotation&&(i=C.quaternionToMat4(t.rotation),e?e=C.mulMat4(e,i,C.mat4()):e=i),t.scale&&(i=C.scalingMat4v(t.scale),e?e=C.mulMat4(e,i,C.mat4()):e=i),e}function ZUt(t,e,i,o){const r=t.mesh;if(!r)return;const n=r.primitives.length;if(n>0)for(let a=0;a<n;a++){const s=r.primitives[a];if(s.mode<4)continue;const l={id:e.sceneModel.id+"."+e.numObjects++},c=s.material;c?(l.textureSetId=c._textureSetId,l.color=c._attributes.color,l.opacity=c._attributes.opacity,l.metallic=c._attributes.metallic,l.roughness=c._attributes.roughness):(l.color=new Float32Array([1,1,1]),l.opacity=1);const d=e.backfaces!==!1||c&&c.doubleSided!==!1;switch(s.mode){case 0:l.primitive="points";break;case 1:l.primitive="lines";break;case 2:l.primitive="lines";break;case 3:l.primitive="lines";break;case 4:l.primitive=d?"triangles":"solid";break;case 5:l.primitive=d?"triangles":"solid";break;case 6:l.primitive=d?"triangles":"solid";break;default:l.primitive=d?"triangles":"solid"}const u=s.attributes.POSITION;if(!u)continue;l.localPositions=u.value,l.positions=new Float64Array(l.localPositions.length),s.attributes.NORMAL&&(l.normals=s.attributes.NORMAL.value),s.attributes.TEXCOORD_0&&(l.uv=s.attributes.TEXCOORD_0.value),s.indices&&(l.indices=s.indices.value),i?C.transformPositions3(i,l.localPositions,l.positions):l.positions.set(l.localPositions);const h=C.vec3();m7(l.positions,l.positions,h)&&(l.origin=h),e.sceneModel.createMesh(l),o.push(l.id)}}function WUt(t,e){t.plugin.error(e)}const hte={DEFAULT:{}};class qS extends qa{constructor(e,i={}){super("GLTFLoader",e,i),this._sceneModelLoader=new jUt(this,i),this.dataSource=i.dataSource,this.objectDefaults=i.objectDefaults}set dataSource(e){this._dataSource=e||new F$}get dataSource(){return this._dataSource}set objectDefaults(e){this._objectDefaults=e||hte}get objectDefaults(){return this._objectDefaults}load(e={}){e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id);const i=new I3(this.viewer.scene,mt.apply(e,{isModel:!0,dtxEnabled:e.dtxEnabled})),o=i.id;if(!e.src&&!e.gltf)return this.error("load() param expected: src or gltf"),i;if(e.metaModelSrc||e.metaModelJSON){const r=n=>{this.viewer.metaScene.createMetaModel(o,n,{}),this.viewer.scene.canvas.spinner.processes--,e.src?this._sceneModelLoader.load(this,e.src,n,e,i):this._sceneModelLoader.parse(this,e.gltf,n,e,i)};if(e.metaModelSrc){const n=e.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(n,a=>{this.viewer.scene.canvas.spinner.processes--,r(a)},a=>{this.error(`load(): Failed to load model metadata for model '${o} from '${n}' - ${a}`),this.viewer.scene.canvas.spinner.processes--})}else e.metaModelJSON&&r(e.metaModelJSON)}else e.src?this._sceneModelLoader.load(this,e.src,null,e,i):this._sceneModelLoader.parse(this,e.gltf,null,e,i);return i.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(o)}),i}destroy(){super.destroy()}}function YUt(t,e,i={}){const o="lightgrey",r=i.hoverColor||"rgba(0,0,0,0.4)",n=i.textColor||"black",a=i.canvasElement||document.body,s=500,l=s+s/3,c=l/24,d=[{boundary:[6,6,6,6],color:i.frontColor||i.color||"#55FF55"},{boundary:[18,6,6,6],color:i.backColor||i.color||"#55FF55"},{boundary:[12,6,6,6],color:i.rightColor||i.color||"#FF5555"},{boundary:[0,6,6,6],color:i.leftColor||i.color||"#FF5555"},{boundary:[6,0,6,6],color:i.topColor||i.color||"#7777FF"},{boundary:[6,12,6,6],color:i.bottomColor||i.color||"#7777FF"}],u=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];i.frontColor||i.color,i.backColor||i.color,i.rightColor||i.color,i.leftColor||i.color,i.topColor||i.color,i.bottomColor||i.color;const h=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let y=0,v=u.length;y<v;y++)C.normalizeVec3(u[y].dir,u[y].dir),C.normalizeVec3(u[y].up,u[y].up);for(let y=0,v=h.length;y<v;y++)C.normalizeVec3(h[y].dir,h[y].dir),C.normalizeVec3(h[y].up,h[y].up);var p=h;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=l,this._textureCanvas.height=s,this._textureCanvas.style.width=l+"px",this._textureCanvas.style.height=s+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=o,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.visibility="hidden",this._textureCanvas.style["z-index"]=2e6,a.appendChild(this._textureCanvas);const A=this._textureCanvas.getContext("2d");let f=!1;function m(){for(let k=0,E=d.length;k<E;k++){const B=d[k],P=B.boundary,T=Math.round(P[0]*c),S=Math.round(P[1]*c),R=Math.round(P[2]*c),F=Math.round(P[3]*c);A.fillStyle=B.color,A.fillRect(T,S,R,F)}for(let k=0,E=p.length;k<E;k++){let B,P,T,S;const R=p[k],F=R.boundaries;for(var y=0,v=F.length;y<v;y++){const U=F[y];B=Math.round(U[0]*c),P=Math.round(U[1]*c),T=Math.round(U[2]*c),S=Math.round(U[3]*c),R.highlighted&&(A.fillStyle=R.highlighted?r:R.color||o,A.fillRect(B,P,T,S))}if(R.label){A.fillStyle=n,A.font="60px sans-serif",A.textAlign="center";var b=B+T*.5,x=P+S*.7;A.fillText(g(R.label),b,x,80)}}e.glRedraw()}const g=(function(){const y={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},v={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},b={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"};return function(x){const k=f?v:y,E=k?k[x]:null;return E?t.localeService.translate(E)||b[E]||E:x}})();this.setZUp=function(){f=!0,p=u,this.clear()},this.setYUp=function(){f=!1,p=h,this.clear()},this.clear=function(){A.fillStyle=o,A.fillRect(0,0,l,s);for(var y=0,v=p.length;y<v;y++){const b=p[y];b.highlighted=!1}m()},this.getArea=function(y){const v=y[0]*l,b=s-y[1]*s;for(var x=0,k=p.length;x<k;x++){const P=p[x].boundaries;for(var E=0,B=P.length;E<B;E++){const T=P[E];if(v>=T[0]*c&&v<=(T[0]+T[2])*c&&b>=T[1]*c&&b<=(T[1]+T[3])*c)return x}}return-1},this.setAreaHighlighted=function(y,v){var b=p[y];if(!b)throw"Area not found: "+y;b.highlighted=!!v,m()},this.getAreaDir=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.dir},this.getAreaUp=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const pte=C.vec3(),fte=C.vec3();C.mat4();class QS extends qa{constructor(e,i={}){super("NavCube",e,i),e.navCube=this;try{this._navCubeScene=new ob(e,{canvasId:i.canvasId,canvasElement:i.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(g){this.error(g);return}const o=this._navCubeScene;o.clearLights(),new xs(o,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new xs(o,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new xs(o,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=o.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,o.edgeMaterial.edgeColor=[.2,.2,.2],o.edgeMaterial.edgeAlpha=.6,this._zUp=!!e.camera.zUp;var r=this;this.setIsProjectNorth(i.isProjectNorth),this.setProjectNorthOffsetAngle(i.projectNorthOffsetAngle);const n=(function(){const g=C.mat4();return function(y,v,b){return C.identityMat4(g),C.rotationMat4v(y*r._projectNorthOffsetAngle*C.DEGTORAD,[0,1,0],g),C.transformVec3(g,v,b)}})();this._synchCamera=(function(){var g=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),y=C.vec3(),v=C.vec3(),b=C.vec3();return function(){var x=e.camera.eye,k=e.camera.look,E=e.camera.up;y=C.mulVec3Scalar(C.normalizeVec3(C.subVec3(x,k,y)),5),r._isProjectNorth&&r._projectNorthOffsetAngle&&(y=n(-1,y,pte),E=n(-1,E,fte)),r._zUp?(C.transformVec3(g,y,v),C.transformVec3(g,E,b),r._navCubeCamera.look=[0,0,0],r._navCubeCamera.eye=C.transformVec3(g,y,v),r._navCubeCamera.up=C.transformPoint3(g,E,b)):(r._navCubeCamera.look=[0,0,0],r._navCubeCamera.eye=y,r._navCubeCamera.up=E)}})(),this._cubeTextureCanvas=new YUt(e,o,i),this._cubeSampler=new x1(o,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:dn,wrapT:dn}),this._cubeMesh=new vi(o,{geometry:new go(o,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new mo(o,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=i.shadowVisible===!1?null:new vi(o,{geometry:new go(o,v1({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new mo(o,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())}),this._onCameraFOV=e.camera.perspective.on("fov",g=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=g)}),this._onCameraProjection=e.camera.on("projection",g=>{this._synchProjection&&(this._navCubeCamera.projection=g==="ortho"||g==="perspective"?g:"perspective")});var a=-1;function s(g,y){var v=(g-A)*-p,b=(y-f)*-p;e.camera.orbitYaw(v),e.camera.orbitPitch(-b),A=g,f=y}function l(g){const{left:y,top:v}=r._navCubeCanvas.getBoundingClientRect();return[g.clientX-y,g.clientY-v]}{var c=null,d=null,u=!1,h=!1,p=.5,A,f;r._navCubeCanvas.addEventListener("mouseenter",r._onMouseEnter=function(g){h=!0}),r._navCubeCanvas.addEventListener("mouseleave",r._onMouseLeave=function(g){h=!1}),r._navCubeCanvas.addEventListener("mousedown",r._onMouseDown=function(g){if(g.which===1){c=g.x,d=g.y,A=g.clientX,f=g.clientY;var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}}),r._navCubeCanvas.addEventListener("mouseup",r._onMouseUp=function(g){if(g.which===1&&(u=!1,c!==null)){var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y,pickSurface:!0});if(v&&v.uv){var b=r._cubeTextureCanvas.getArea(v.uv);if(b>=0&&(r._navCubeCanvas.style.cursor="pointer",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),b>=0)){if(r._cubeTextureCanvas.setAreaHighlighted(b,!0),a=b,r._repaint(),g.x<c-3||g.x>c+3||g.y<d-3||g.y>d+3)return;var x=r._cubeTextureCanvas.getAreaDir(b);if(x){var k=r._cubeTextureCanvas.getAreaUp(b);r._isProjectNorth&&r._projectNorthOffsetAngle&&(x=n(1,x,pte),k=n(1,k,fte)),m(x,k,function(){a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),r._navCubeCanvas.style.cursor="pointer",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),b>=0&&(r._cubeTextureCanvas.setAreaHighlighted(b,!1),a=-1,r._repaint())})}}}}}),r._navCubeCanvas.addEventListener("mousemove",r._onMouseMove=function(g){if(a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),!(g.buttons===1&&!u)){if(u){var y=g.clientX,v=g.clientY;r._navCubeCanvas.style.cursor="move",s(y,v);return}if(h){var b=l({clientX:g.clientX,clientY:g.clientY}),x=o.pick({canvasPos:b,pickSurface:!0});if(x){if(x.uv){r._navCubeCanvas.style.cursor="pointer";var k=r._cubeTextureCanvas.getArea(x.uv);if(k===a)return;a>=0&&r._cubeTextureCanvas.setAreaHighlighted(a,!1),k>=0&&(r._cubeTextureCanvas.setAreaHighlighted(k,!0),r._repaint(),a=k)}}else r._navCubeCanvas.style.cursor="default",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1)}}}),r._navCubeCanvas.addEventListener("touchstart",r._onTouchStart=function(g){if(g.touches.length>0){c=g.touches[0].clientX,d=g.touches[0].clientY,A=g.touches[0].clientX,f=g.touches[0].clientY;var y=l({clientX:g.touches[0].clientX,clientY:g.touches[0].clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}},{passive:!1}),r._navCubeCanvas.addEventListener("touchmove",r._onTouchMove=function(g){g.preventDefault();var y=g.touches[0],v=y.clientX,b=y.clientY,x=document.elementFromPoint(v,b);if(h=r._navCubeCanvas===x,!!h&&u){s(v,b);return}},{passive:!1}),r._navCubeCanvas.addEventListener("touchend",r._onTouchEnd=function(g){u=!1});var m=(function(){var g=C.vec3();return function(y,v,b){var x=r._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,k=C.getAABB3Diag(x);C.getAABB3Center(x,g);var E=Math.abs(k/Math.tan(r._cameraFitFOV*C.DEGTORAD));e.cameraControl.pivotPos=g,r._cameraFly?e.cameraFlight.flyTo({look:g,eye:[g[0]-E*y[0],g[1]-E*y[1],g[2]-E*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:r._cameraFitFOV,duration:r._cameraFlyDuration},b):e.cameraFlight.jumpTo({look:g,eye:[g[0]-E*y[0],g[1]-E*y[1],g[2]-E*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:r._cameraFitFOV},b)}})()}this._onUpdated=e.localeService.on("updated",()=>{this._cubeTextureCanvas.clear(),this._repaint()}),this.setVisible(i.visible),this.setCameraFitFOV(i.cameraFitFOV),this.setCameraFly(i.cameraFly),this.setCameraFlyDuration(i.cameraFlyDuration),this.setFitVisible(i.fitVisible),this.setSynchProjection(i.synchProjection)}send(e,i){e==="language"&&(this._cubeTextureCanvas.clear(),this._repaint())}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return this._navCubeCanvas?this._cubeMesh.visible:!1}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),this._navCubeCanvas.removeEventListener("mousemove",this._onMouseMove),this._navCubeCanvas.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas.removeEventListener("touchstart",this._onTouchStart),this._navCubeCanvas.removeEventListener("touchmove",this._onTouchMove),this._navCubeCanvas.removeEventListener("touchend",this._onTouchEnd),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null,this._onTouchStart=null,this._onTouchMove=null,this._onTouchEnd=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}class XUt{constructor(e){const i=e.cameraControl,o=e.scene,r=o.canvas.canvas,n=!1,a=1,s=.09,l=.01,c=new n3(o,{position:[0,0,0],scale:[5,5,5],isObject:!1}),d=C.vec3();this._setPosition=(function(){const x=C.vec3(),k=C.vec3();return function(E){d.set(E),fh(E,x,k),c.origin=x,c.position=k}})(),this._setQuaternion=x=>{c.quaternion=x};const u=(x,k)=>new go(c,v1({radiusTop:.001,radiusBottom:x,radialSegments:32,heightSegments:1,height:k,openEnded:!1})),h=(x,k,E)=>new go(c,v1({radiusTop:x,radiusBottom:x,radialSegments:E,heightSegments:1,height:k,openEnded:!1})),p=(x,k,E)=>new go(c,xP({radius:a-.2,tube:x,radialSegments:64,tubeSegments:E,arc:Math.PI*2*k})),A={curve:p(l,.25,14),curveHandle:p(s,.25,14),hoop:p(l,1,8),arrowHead:u(.07,.2),arrowHeadBig:u(.09,.25),arrowHeadHandle:h(s,.37,8),axis:h(l,a,20),axisHandle:h(s,a,20)},f=x=>new mo(c,{diffuse:x,emissive:x,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),m=(x,k)=>new Ac(c,{edges:!1,fill:!0,fillColor:x,fillAlpha:k}),g=new mo(c,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),y={},v=(x,k)=>{C.mulVec3Scalar(x,-1,C.vec3());const E=f(x),B=C.quaternionToRotationMat4(k,C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),B,B);const P=C.scaleMat4v([.6,.6,.6],C.identityMat4()),T=(ee,ae)=>{const Ee=C.translateMat4v(ee,C.identityMat4()),pe=C.identityMat4();return C.mulMat4(Ee,ae,pe),C.mulMat4(B,pe,pe),C.mulMat4(pe,P,C.identityMat4())},S=c.addChild(new vi(c,{geometry:A.curve,material:E,matrix:B,pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),n),R=c.addChild(new vi(c,{geometry:A.curveHandle,material:g,matrix:B,pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),n),F=c.addChild(new vi(c,{geometry:A.arrowHead,material:E,matrix:T([.8,.07,0],C.rotationMat4v(180*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),U=c.addChild(new vi(c,{geometry:A.arrowHead,material:E,matrix:T([.07,.8,0],C.rotationMat4v(90*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),q=c.addChild(new vi(c,{geometry:A.hoop,material:E,highlighted:!0,highlightMaterial:m(x,.6),matrix:B,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),V=C.quaternionToRotationMat4(C.vec3PairToQuaternion([0,1,0],x),C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),V,V);const W=ee=>C.mulMat4(V,C.translateMat4c(0,ee,0,C.identityMat4()),C.identityMat4()),Y=W(a+.1),$=W(a/2),fe=c.addChild(new vi(c,{geometry:A.arrowHead,material:E,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Me=c.addChild(new vi(c,{geometry:A.arrowHeadHandle,material:g,matrix:Y,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Se=c.addChild(new vi(c,{geometry:A.axis,material:E,matrix:$,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),qe=c.addChild(new vi(c,{geometry:A.axisHandle,material:g,matrix:$,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Qe=c.addChild(new vi(c,{geometry:A.arrowHeadBig,material:E,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Ce=(ee,ae)=>C.vec3ApplyQuaternion(c.quaternion,ee,ae),Le=(function(){const ee=C.vec3(),ae=C.vec3(),Ee=C.vec3();return(pe,Q)=>{Ce(x,ee);const Z=d,ie=ee;C.canvasPosToWorldRay(r,o.camera.viewMatrix,o.camera.projMatrix,o.camera.projection,pe,ae,Ee);const re=C.dotVec3(ie,Ee),ne=C.subVec3(ae,Z,Q),G=C.dotVec3(ne,ie),J=C.dotVec3(ne,Ee),ue=1-re*re;if(Math.abs(ue)>1e-10){const xe=(G-re*J)/ue;return C.addVec3(Z,C.mulVec3Scalar(ie,xe,Q),Q),!0}else return!1}})(),Fe=C.vec3(),ve=C.vec3();y[Me.id]=y[qe.id]={setActivated:ee=>Qe.visible=ee,initDragAction:ee=>Le(ee,Fe)&&C.subVec3(Fe,d,Fe)&&(ae=>{Le(ae,ve)&&(C.subVec3(ve,Fe,ve),this._setPosition(ve),this._handlers&&this._handlers.onPosition(ve))})},y[R.id]={setActivated:ee=>q.visible=ee,initDragAction:ee=>{const ae=(function(){const pe=o.camera.projectWorldPos(d);Ce(x,ve),C.transformVec3(o.camera.normalMatrix,ve,ve);const Q=Math.sign(ve[2]);return Z=>{const ie=Z[0]-pe[0],re=Z[1]-pe[1];return Q*Math.atan2(-re,ie)}})();let Ee=ae(ee);return pe=>{const Q=ae(pe);c.rotate(x,(Q-Ee)*180/Math.PI),this._handlers&&this._handlers.onQuaternion(c.quaternion),Ee=Q}}};let me=!1,we=!1,Re=!1;const We=()=>{const ee=Re&&me;Me.visible=qe.visible=fe.visible=Se.visible=!!ee,ee||(Qe.visible=!1)},H=()=>{const ee=Re&&we;R.visible=S.visible=F.visible=U.visible=!!ee,ee||(q.visible=!1)};return{setPositionActive:ee=>{me=ee,We()},setRotationActive:ee=>{we=ee,H()},set visible(ee){Re=ee,We(),H()}}};this._displayMeshes={center:c.addChild(new vi(c,{geometry:new go(c,y1({radius:.05})),material:new mo(c,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),pickable:!1,collidable:!0,clippable:!1,visible:!1,isObject:!1}),n),x:v([1,0,0],C.vec3PairToQuaternion([1,0,0],[0,0,1])),y:v([0,1,0],C.eulerToQuaternion([90,0,0],"XYZ")),z:v([0,0,1],C.identityQuaternion())};const b=[];{let x=-1;const k=B=>{c.scale[0]!==B&&(c.scale=[B,B,B],this._handlers&&this._handlers.onScreenScale&&this._handlers.onScreenScale(c.scale))},E=o.on("tick",()=>{const B=o.camera,P=Math.abs(C.distVec3(B.eye,d));B.projection==="perspective"?P!==x&&k(.07*P*Math.tan(B.perspective.fov*C.DEGTORAD)):B.projection==="ortho"&&k(B.ortho.scale/10),x=P});b.push(()=>o.off(E))}{let x=null,k=null;b.push(()=>{k&&k.cleanup()});const E=C.vec2(),B=(F,U)=>{U[0]=F.pageX,U[1]=F.pageY,gl(r.ownerDocument.documentElement,r,U)},P=F=>{B(F,E);const U=o.pick({canvasPos:E}),q=U&&U.entity,V=q&&q.id;return V in y&&y[V]},T=(F,U)=>{const q=P(U(F));if(q){k&&k.cleanup();const V=q.initDragAction(E);return V&&(i.pointerEnabled=!1,q.setActivated(!0),k={onChange:W=>{const Y=U(W);Y&&(B(Y,E),V(E))},cleanup:function(){k=null,i.pointerEnabled=!0,q.setActivated(!1)}}),!!V}else return!1},S=(F,U)=>{r.addEventListener(F,U),b.push(()=>r.removeEventListener(F,U))},R=F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation()};S("mousedown",F=>{F.which===1&&T(F,U=>U.which===1&&U)&&R(F)}),S("mousemove",F=>{if(k)k.onChange(F),R(F);else{x&&x();const U=P(F);U?(U.setActivated(!0),x=()=>U.setActivated(!1)):x=null}}),S("mouseup",F=>{k&&(k.onChange(F),k.cleanup())}),S("touchstart",F=>{if(F.preventDefault(),F.touches.length===1){const U=F.touches[0].identifier;T(F,q=>[...q.changedTouches].find(V=>V.identifier===U))&&R(F)}}),S("touchmove",F=>{k&&(k.onChange(F),R(F))}),S("touchend",F=>{k&&(k.onChange(F),k.cleanup())})}this.__destroy=()=>{b.forEach(x=>x()),c.destroy();for(let x in y)delete y[x]}}destroy(){this.__destroy()}setHandlers(e){Object.values(this._displayMeshes).forEach(i=>i.visible=!!e),this._handlers=e,this._displayMeshes.x.setPositionActive(e&&e.onPosition),this._displayMeshes.y.setPositionActive(e&&e.onPosition),this._displayMeshes.z.setPositionActive(e&&e.onPosition),this._displayMeshes.x.setRotationActive(e&&e.onQuaternion),this._displayMeshes.y.setRotationActive(e&&e.onQuaternion),this._displayMeshes.z.setRotationActive(e&&e.onQuaternion)}setPosition(e){this._setPosition(e)}setQuaternion(e){this._setQuaternion(e)}}let $Ut=class{constructor(t,e,i){this.id=i.id,this._sectionPlane=i,this._mesh=new vi(e,{id:i.id,geometry:new go(e,bP({xSize:.5,ySize:.5,zSize:.001})),material:new mo(e,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new YP(e,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Ac(e,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Ac(e,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const o=C.vec3([0,0,0]),r=C.vec3(),n=C.vec3([0,0,1]),a=C.vec4(4),s=C.vec3(),l=()=>{const c=this._sectionPlane.scene.center,d=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];C.subVec3(c,this._sectionPlane.pos,o);const u=-C.dotVec3(d,o);C.normalizeVec3(d),C.mulVec3Scalar(d,u,r);const h=C.vec3PairToQuaternion(n,this._sectionPlane.dir,a);s[0]=r[0]*.1,s[1]=r[1]*.1,s[2]=r[2]*.1,this._mesh.quaternion=h,this._mesh.position=s};this._onSectionPlanePos=this._sectionPlane.on("pos",l),this._onSectionPlaneDir=this._sectionPlane.on("dir",l)}this._highlighted=!1,this._selected=!1}setHighlighted(t){this._highlighted=!!t,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=t?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(t){this._selected=!!t,this._mesh.edgeMaterial.edgeWidth=t?3:1,this._mesh.highlightMaterial.edgeWidth=t?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}};class eNt{constructor(e,i){if(!i.onHoverEnterPlane||!i.onHoverLeavePlane||!i.onClickedNothing||!i.onClickedPlane)throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=i.onHoverEnterPlane,this._onHoverLeavePlane=i.onHoverLeavePlane,this._onClickedNothing=i.onClickedNothing,this._onClickedPlane=i.onClickedPlane,this._visible=!0,this._planes={},this._canvas=i.overviewCanvas,this._scene=new ob(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new xs(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new xs(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new xs(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const r=this._scene.camera,n=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),a=C.vec3(),s=C.vec3(),l=C.vec3();this._synchCamera=()=>{const c=this._viewer.camera.eye,d=this._viewer.camera.look,u=this._viewer.camera.up;C.mulVec3Scalar(C.normalizeVec3(C.subVec3(c,d,a)),7),this._zUp?(C.transformVec3(n,a,s),C.transformVec3(n,u,l),r.look=[0,0,0],r.eye=C.transformVec3(n,a,s),r.up=C.transformPoint3(n,u,l)):(r.look=[0,0,0],r.eye=a,r.up=u)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",r=>{this._scene.camera.perspective.fov=r});{var o=null;this._onInputMouseMove=this._scene.input.on("mousemove",r=>{const n=this._scene.pick({canvasPos:r});n?(!o||n.entity.id!==o.id)&&(o&&this._planes[o.id]&&this._onHoverLeavePlane(o.id),o=n.entity,this._planes[o.id]&&this._onHoverEnterPlane(o.id)):o&&(this._onHoverLeavePlane(o.id),o=null)}),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{o?this._planes[o.id]&&this._onClickedPlane(o.id):this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{o&&(this._onHoverLeavePlane(o.id),o=null)})}this.setVisible(i.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new $Ut(this,this._scene,e)}setPlaneHighlighted(e,i){const o=this._planes[e];o&&o.setHighlighted(i)}setPlaneSelected(e,i){const o=this._planes[e];o&&o.setSelected(i)}removeSectionPlane(e){const i=this._planes[e.id];i&&(i.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const Cc=C.AABB3(),Eh=C.vec3();class tNt extends qa{constructor(e,i={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,i.overviewCanvasId!==null&&i.overviewCanvasId!==void 0){const o=document.getElementById(i.overviewCanvasId);o?this._overview=new eNt(this,{overviewCanvas:o,visible:i.overviewVisible,onHoverEnterPlane:(r=>{this._overview.setPlaneHighlighted(r,!0)}),onHoverLeavePlane:(r=>{this._overview.setPlaneHighlighted(r,!1)}),onClickedPlane:(r=>{if(this.getShownControl()===r){this.hideControl();return}this.showControl(r);const n=this.sectionPlanes[r].pos;Cc.set(this.viewer.scene.aabb),C.getAABB3Center(Cc,Eh),Cc[0]+=n[0]-Eh[0],Cc[1]+=n[1]-Eh[1],Cc[2]+=n[2]-Eh[2],Cc[3]+=n[0]-Eh[0],Cc[4]+=n[1]-Eh[1],Cc[5]+=n[2]-Eh[2],this.viewer.cameraFlight.flyTo({aabb:Cc,fitFOV:65})}),onClickedNothing:(()=>{this.hideControl()})}):this.warn("Can't find overview canvas: '"+i.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",o=>{this._sectionPlaneCreated(o)})}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){return e.id!==void 0&&e.id!==null&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),new II(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const i=this._freeControls.length>0?this._freeControls.pop():(()=>{const o=this.viewer.scene,r=(function(){const u=new n3(o,{isObject:!1});return u.addChild(new vi(u,{geometry:new go(u,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new mo(u,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Ac(u,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1],isObject:!1})),u.addChild(new vi(u,{geometry:new go(u,xP({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:Math.PI*2})),material:new mo(u,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Ac(u,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45],isObject:!1})),{setPosition:(function(){const h=C.vec3(),p=C.vec3();return function(A){fh(A,h,p),u.origin=h,u.position=p}})(),setQuaternion:h=>{u.quaternion=h},setScale:h=>{u.scale=h},setVisible:h=>{u.visible=h},destroy:()=>{u.destroy()}}})();let n=()=>{};const a=new XUt(this.viewer);let s=!1,l=!1,c=null;const d=()=>{const u=l&&!s;r.setVisible(u),a.setHandlers(u&&c)};return{_destroy:()=>{n(),a.destroy(),r.destroy()},setCulled:u=>{s=u,d()},setVisible:u=>{l=u,d()},_setSectionPlane:u=>{if(n(),u){let h=!1;c={onPosition:g=>{r.setPosition(g),u.pos=g},onQuaternion:g=>{r.setQuaternion(g),h=!0,u.quaternion=g},onScreenScale:g=>{r.setScale(g)}};const p=()=>{r.setPosition(u.pos),a.setPosition(u.pos)},A=()=>{r.setQuaternion(u.quaternion),a.setQuaternion(u.quaternion)};p(),A();const f=u.on("pos",p),m=u.on("dir",()=>{h?h=!1:A()});n=()=>{u.off(f),u.off(m),n=()=>{}}}}}})();i._setSectionPlane(e),i.setVisible(!1),this._controls[e.id]=i,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",()=>{this._sectionPlaneDestroyed(e)})}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let i in e)e[i].flipDir()}showControl(e){const i=this._controls[e];if(!i){this.error("Control not found: "+e);return}this.hideControl(),i.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var i=this.viewer.scene.sectionPlanes[e];if(!i){this.error("SectionPlane not found: "+e);return}this._sectionPlaneDestroyed(i),i.destroy(),e===this._shownControlId&&(this._shownControlId=null)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const i=this._controls[e.id];i&&(i.setVisible(!1),i._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(i))}clear(){const e=Object.keys(this._sectionPlanes);for(var i=0,o=e.length;i<o;i++)this.destroySectionPlane(e[i])}send(e,i){switch(e){case"snapshotStarting":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!0);break;case"snapshotFinished":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!1);break;case"clearSectionPlanes":this.clear();break}}destroy(){this.clear(),this._overview&&this._overview.destroy(),this._destroyFreeControls(),super.destroy()}_destroyFreeControls(){for(var e=this._freeControls.pop();e;)e._destroy(),e=this._freeControls.pop();this.viewer.scene.off(this._onSceneSectionPlaneCreated)}}class Ate{constructor(e={}){this.cacheBuster=e.cacheBuster!==!1}_cacheBusterURL(e){if(!this.cacheBuster)return e;const i=new Date().getTime();return e.indexOf("?")>-1?e+"&_="+i:e+"?_="+i}getManifest(e,i,o){mt.loadJSON(this._cacheBusterURL(e),r=>{i(r)},function(r){o(r)})}getMetaModel(e,i,o){mt.loadJSON(this._cacheBusterURL(e),r=>{i(r)},function(r){o(r)})}getXKT(e,i,o){var r=()=>{};i=i||r,o=o||r;const n=/^data:(.*?)(;base64)?,(.*)$/,a=e.match(n);if(a){const c=!!a[2];var s=a[3];s=window.decodeURIComponent(s),c&&(s=window.atob(s));try{const d=new ArrayBuffer(s.length),u=new Uint8Array(d);for(var l=0;l<s.length;l++)u[l]=s.charCodeAt(l);i(d)}catch(d){o(d)}}else{const c=new XMLHttpRequest;c.open("GET",this._cacheBusterURL(e),!0),c.responseType="arraybuffer",c.onreadystatechange=function(){c.readyState===4&&(c.status===200?i(c.response):o("getXKT error : "+c.response))},c.send(null)}}}var qb={exports:{}},iNt=qb.exports,gte;function oNt(){return gte||(gte=1,(function(t,e){(function(i,o){o(e)})(iNt,(function(i){function o(L){let X=L.length;for(;--X>=0;)L[X]=0}const r=256,n=286,a=30,s=15,l=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]),c=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]),d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);o(h);const p=new Array(60);o(p);const A=new Array(512);o(A);const f=new Array(256);o(f);const m=new Array(29);o(m);const g=new Array(a);function y(L,X,O,ke,ye){this.static_tree=L,this.extra_bits=X,this.extra_base=O,this.elems=ke,this.max_length=ye,this.has_stree=L&&L.length}let v,b,x;function k(L,X){this.dyn_tree=L,this.max_code=0,this.stat_desc=X}o(g);const E=L=>L<256?A[L]:A[256+(L>>>7)],B=(L,X)=>{L.pending_buf[L.pending++]=255&X,L.pending_buf[L.pending++]=X>>>8&255},P=(L,X,O)=>{L.bi_valid>16-O?(L.bi_buf|=X<<L.bi_valid&65535,B(L,L.bi_buf),L.bi_buf=X>>16-L.bi_valid,L.bi_valid+=O-16):(L.bi_buf|=X<<L.bi_valid&65535,L.bi_valid+=O)},T=(L,X,O)=>{P(L,O[2*X],O[2*X+1])},S=(L,X)=>{let O=0;do O|=1&L,L>>>=1,O<<=1;while(--X>0);return O>>>1},R=(L,X,O)=>{const ke=new Array(16);let ye,ge,tt=0;for(ye=1;ye<=s;ye++)tt=tt+O[ye-1]<<1,ke[ye]=tt;for(ge=0;ge<=X;ge++){let Oe=L[2*ge+1];Oe!==0&&(L[2*ge]=S(ke[Oe]++,Oe))}},F=L=>{let X;for(X=0;X<n;X++)L.dyn_ltree[2*X]=0;for(X=0;X<a;X++)L.dyn_dtree[2*X]=0;for(X=0;X<19;X++)L.bl_tree[2*X]=0;L.dyn_ltree[512]=1,L.opt_len=L.static_len=0,L.sym_next=L.matches=0},U=L=>{L.bi_valid>8?B(L,L.bi_buf):L.bi_valid>0&&(L.pending_buf[L.pending++]=L.bi_buf),L.bi_buf=0,L.bi_valid=0},q=(L,X,O,ke)=>{const ye=2*X,ge=2*O;return L[ye]<L[ge]||L[ye]===L[ge]&&ke[X]<=ke[O]},V=(L,X,O)=>{const ke=L.heap[O];let ye=O<<1;for(;ye<=L.heap_len&&(ye<L.heap_len&&q(X,L.heap[ye+1],L.heap[ye],L.depth)&&ye++,!q(X,ke,L.heap[ye],L.depth));)L.heap[O]=L.heap[ye],O=ye,ye<<=1;L.heap[O]=ke},W=(L,X,O)=>{let ke,ye,ge,tt,Oe=0;if(L.sym_next!==0)do ke=255&L.pending_buf[L.sym_buf+Oe++],ke+=(255&L.pending_buf[L.sym_buf+Oe++])<<8,ye=L.pending_buf[L.sym_buf+Oe++],ke===0?T(L,ye,X):(ge=f[ye],T(L,ge+r+1,X),tt=l[ge],tt!==0&&(ye-=m[ge],P(L,ye,tt)),ke--,ge=E(ke),T(L,ge,O),tt=c[ge],tt!==0&&(ke-=g[ge],P(L,ke,tt)));while(Oe<L.sym_next);T(L,256,X)},Y=(L,X)=>{const O=X.dyn_tree,ke=X.stat_desc.static_tree,ye=X.stat_desc.has_stree,ge=X.stat_desc.elems;let tt,Oe,wt,Ve=-1;for(L.heap_len=0,L.heap_max=573,tt=0;tt<ge;tt++)O[2*tt]!==0?(L.heap[++L.heap_len]=Ve=tt,L.depth[tt]=0):O[2*tt+1]=0;for(;L.heap_len<2;)wt=L.heap[++L.heap_len]=Ve<2?++Ve:0,O[2*wt]=1,L.depth[wt]=0,L.opt_len--,ye&&(L.static_len-=ke[2*wt+1]);for(X.max_code=Ve,tt=L.heap_len>>1;tt>=1;tt--)V(L,O,tt);wt=ge;do tt=L.heap[1],L.heap[1]=L.heap[L.heap_len--],V(L,O,1),Oe=L.heap[1],L.heap[--L.heap_max]=tt,L.heap[--L.heap_max]=Oe,O[2*wt]=O[2*tt]+O[2*Oe],L.depth[wt]=(L.depth[tt]>=L.depth[Oe]?L.depth[tt]:L.depth[Oe])+1,O[2*tt+1]=O[2*Oe+1]=wt,L.heap[1]=wt++,V(L,O,1);while(L.heap_len>=2);L.heap[--L.heap_max]=L.heap[1],((et,ii)=>{const zt=ii.dyn_tree,Ct=ii.max_code,Xo=ii.stat_desc.static_tree,Si=ii.stat_desc.has_stree,Qt=ii.stat_desc.extra_bits,Oi=ii.stat_desc.extra_base,ti=ii.stat_desc.max_length;let kt,ei,Ui,Pt,Bi,oi,Gt=0;for(Pt=0;Pt<=s;Pt++)et.bl_count[Pt]=0;for(zt[2*et.heap[et.heap_max]+1]=0,kt=et.heap_max+1;kt<573;kt++)ei=et.heap[kt],Pt=zt[2*zt[2*ei+1]+1]+1,Pt>ti&&(Pt=ti,Gt++),zt[2*ei+1]=Pt,ei>Ct||(et.bl_count[Pt]++,Bi=0,ei>=Oi&&(Bi=Qt[ei-Oi]),oi=zt[2*ei],et.opt_len+=oi*(Pt+Bi),Si&&(et.static_len+=oi*(Xo[2*ei+1]+Bi)));if(Gt!==0){do{for(Pt=ti-1;et.bl_count[Pt]===0;)Pt--;et.bl_count[Pt]--,et.bl_count[Pt+1]+=2,et.bl_count[ti]--,Gt-=2}while(Gt>0);for(Pt=ti;Pt!==0;Pt--)for(ei=et.bl_count[Pt];ei!==0;)Ui=et.heap[--kt],Ui>Ct||(zt[2*Ui+1]!==Pt&&(et.opt_len+=(Pt-zt[2*Ui+1])*zt[2*Ui],zt[2*Ui+1]=Pt),ei--)}})(L,X),R(O,Ve,L.bl_count)},$=(L,X,O)=>{let ke,ye,ge=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),X[2*(O+1)+1]=65535,ke=0;ke<=O;ke++)ye=tt,tt=X[2*(ke+1)+1],++Oe<wt&&ye===tt||(Oe<Ve?L.bl_tree[2*ye]+=Oe:ye!==0?(ye!==ge&&L.bl_tree[2*ye]++,L.bl_tree[32]++):Oe<=10?L.bl_tree[34]++:L.bl_tree[36]++,Oe=0,ge=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4))},fe=(L,X,O)=>{let ke,ye,ge=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),ke=0;ke<=O;ke++)if(ye=tt,tt=X[2*(ke+1)+1],!(++Oe<wt&&ye===tt)){if(Oe<Ve)do T(L,ye,L.bl_tree);while(--Oe!=0);else ye!==0?(ye!==ge&&(T(L,ye,L.bl_tree),Oe--),T(L,16,L.bl_tree),P(L,Oe-3,2)):Oe<=10?(T(L,17,L.bl_tree),P(L,Oe-3,3)):(T(L,18,L.bl_tree),P(L,Oe-11,7));Oe=0,ge=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4)}};let Me=!1;const Se=(L,X,O,ke)=>{P(L,0+(ke?1:0),3),U(L),B(L,O),B(L,~O),O&&L.pending_buf.set(L.window.subarray(X,X+O),L.pending),L.pending+=O};var qe=(L,X,O,ke)=>{let ye,ge,tt=0;L.level>0?(L.strm.data_type===2&&(L.strm.data_type=(Oe=>{let wt,Ve=4093624447;for(wt=0;wt<=31;wt++,Ve>>>=1)if(1&Ve&&Oe.dyn_ltree[2*wt]!==0)return 0;if(Oe.dyn_ltree[18]!==0||Oe.dyn_ltree[20]!==0||Oe.dyn_ltree[26]!==0)return 1;for(wt=32;wt<r;wt++)if(Oe.dyn_ltree[2*wt]!==0)return 1;return 0})(L)),Y(L,L.l_desc),Y(L,L.d_desc),tt=(Oe=>{let wt;for($(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),$(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),Y(Oe,Oe.bl_desc),wt=18;wt>=3&&Oe.bl_tree[2*u[wt]+1]===0;wt--);return Oe.opt_len+=3*(wt+1)+5+5+4,wt})(L),ye=L.opt_len+3+7>>>3,ge=L.static_len+3+7>>>3,ge<=ye&&(ye=ge)):ye=ge=O+5,O+4<=ye&&X!==-1?Se(L,X,O,ke):L.strategy===4||ge===ye?(P(L,2+(ke?1:0),3),W(L,h,p)):(P(L,4+(ke?1:0),3),((Oe,wt,Ve,et)=>{let ii;for(P(Oe,wt-257,5),P(Oe,Ve-1,5),P(Oe,et-4,4),ii=0;ii<et;ii++)P(Oe,Oe.bl_tree[2*u[ii]+1],3);fe(Oe,Oe.dyn_ltree,wt-1),fe(Oe,Oe.dyn_dtree,Ve-1)})(L,L.l_desc.max_code+1,L.d_desc.max_code+1,tt+1),W(L,L.dyn_ltree,L.dyn_dtree)),F(L),ke&&U(L)},Qe={_tr_init:L=>{Me||((()=>{let X,O,ke,ye,ge;const tt=new Array(16);for(ke=0,ye=0;ye<28;ye++)for(m[ye]=ke,X=0;X<1<<l[ye];X++)f[ke++]=ye;for(f[ke-1]=ye,ge=0,ye=0;ye<16;ye++)for(g[ye]=ge,X=0;X<1<<c[ye];X++)A[ge++]=ye;for(ge>>=7;ye<a;ye++)for(g[ye]=ge<<7,X=0;X<1<<c[ye]-7;X++)A[256+ge++]=ye;for(O=0;O<=s;O++)tt[O]=0;for(X=0;X<=143;)h[2*X+1]=8,X++,tt[8]++;for(;X<=255;)h[2*X+1]=9,X++,tt[9]++;for(;X<=279;)h[2*X+1]=7,X++,tt[7]++;for(;X<=287;)h[2*X+1]=8,X++,tt[8]++;for(R(h,287,tt),X=0;X<a;X++)p[2*X+1]=5,p[2*X]=S(X,5);v=new y(h,l,257,n,s),b=new y(p,c,0,a,s),x=new y(new Array(0),d,0,19,7)})(),Me=!0),L.l_desc=new k(L.dyn_ltree,v),L.d_desc=new k(L.dyn_dtree,b),L.bl_desc=new k(L.bl_tree,x),L.bi_buf=0,L.bi_valid=0,F(L)},_tr_stored_block:Se,_tr_flush_block:qe,_tr_tally:(L,X,O)=>(L.pending_buf[L.sym_buf+L.sym_next++]=X,L.pending_buf[L.sym_buf+L.sym_next++]=X>>8,L.pending_buf[L.sym_buf+L.sym_next++]=O,X===0?L.dyn_ltree[2*O]++:(L.matches++,X--,L.dyn_ltree[2*(f[O]+r+1)]++,L.dyn_dtree[2*E(X)]++),L.sym_next===L.sym_end),_tr_align:L=>{P(L,2,3),T(L,256,h),(X=>{X.bi_valid===16?(B(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):X.bi_valid>=8&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)})(L)}},Ce=(L,X,O,ke)=>{let ye=65535&L|0,ge=L>>>16&65535|0,tt=0;for(;O!==0;){tt=O>2e3?2e3:O,O-=tt;do ye=ye+X[ke++]|0,ge=ge+ye|0;while(--tt);ye%=65521,ge%=65521}return ye|ge<<16|0};const Le=new Uint32Array((()=>{let L,X=[];for(var O=0;O<256;O++){L=O;for(var ke=0;ke<8;ke++)L=1&L?3988292384^L>>>1:L>>>1;X[O]=L}return X})());var Fe=(L,X,O,ke)=>{const ye=Le,ge=ke+O;L^=-1;for(let tt=ke;tt<ge;tt++)L=L>>>8^ye[255&(L^X[tt])];return-1^L},ve={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"},me={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:we,_tr_stored_block:Re,_tr_flush_block:We,_tr_tally:H,_tr_align:ee}=Qe,{Z_NO_FLUSH:ae,Z_PARTIAL_FLUSH:Ee,Z_FULL_FLUSH:pe,Z_FINISH:Q,Z_BLOCK:Z,Z_OK:ie,Z_STREAM_END:re,Z_STREAM_ERROR:ne,Z_DATA_ERROR:G,Z_BUF_ERROR:J,Z_DEFAULT_COMPRESSION:ue,Z_FILTERED:xe,Z_HUFFMAN_ONLY:oe,Z_RLE:Be,Z_FIXED:je,Z_DEFAULT_STRATEGY:he,Z_UNKNOWN:Ne,Z_DEFLATED:Pe}=me,He=258,rt=262,At=42,ft=113,ct=666,ut=(L,X)=>(L.msg=ve[X],X),Te=L=>2*L-(L>4?9:0),st=L=>{let X=L.length;for(;--X>=0;)L[X]=0},dt=L=>{let X,O,ke,ye=L.w_size;X=L.hash_size,ke=X;do O=L.head[--ke],L.head[ke]=O>=ye?O-ye:0;while(--X);X=ye,ke=X;do O=L.prev[--ke],L.prev[ke]=O>=ye?O-ye:0;while(--X)};let Ye=(L,X,O)=>(X<<L.hash_shift^O)&L.hash_mask;const Ae=L=>{const X=L.state;let O=X.pending;O>L.avail_out&&(O=L.avail_out),O!==0&&(L.output.set(X.pending_buf.subarray(X.pending_out,X.pending_out+O),L.next_out),L.next_out+=O,X.pending_out+=O,L.total_out+=O,L.avail_out-=O,X.pending-=O,X.pending===0&&(X.pending_out=0))},be=(L,X)=>{We(L,L.block_start>=0?L.block_start:-1,L.strstart-L.block_start,X),L.block_start=L.strstart,Ae(L.strm)},$e=(L,X)=>{L.pending_buf[L.pending++]=X},ht=(L,X)=>{L.pending_buf[L.pending++]=X>>>8&255,L.pending_buf[L.pending++]=255&X},St=(L,X,O,ke)=>{let ye=L.avail_in;return ye>ke&&(ye=ke),ye===0?0:(L.avail_in-=ye,X.set(L.input.subarray(L.next_in,L.next_in+ye),O),L.state.wrap===1?L.adler=Ce(L.adler,X,ye,O):L.state.wrap===2&&(L.adler=Fe(L.adler,X,ye,O)),L.next_in+=ye,L.total_in+=ye,ye)},xt=(L,X)=>{let O,ke,ye=L.max_chain_length,ge=L.strstart,tt=L.prev_length,Oe=L.nice_match;const wt=L.strstart>L.w_size-rt?L.strstart-(L.w_size-rt):0,Ve=L.window,et=L.w_mask,ii=L.prev,zt=L.strstart+He;let Ct=Ve[ge+tt-1],Xo=Ve[ge+tt];L.prev_length>=L.good_match&&(ye>>=2),Oe>L.lookahead&&(Oe=L.lookahead);do if(O=X,Ve[O+tt]===Xo&&Ve[O+tt-1]===Ct&&Ve[O]===Ve[ge]&&Ve[++O]===Ve[ge+1]){ge+=2,O++;do;while(Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&Ve[++ge]===Ve[++O]&&ge<zt);if(ke=He-(zt-ge),ge=zt-He,ke>tt){if(L.match_start=X,tt=ke,ke>=Oe)break;Ct=Ve[ge+tt-1],Xo=Ve[ge+tt]}}while((X=ii[X&et])>wt&&--ye!=0);return tt<=L.lookahead?tt:L.lookahead},yi=L=>{const X=L.w_size;let O,ke,ye;do{if(ke=L.window_size-L.lookahead-L.strstart,L.strstart>=X+(X-rt)&&(L.window.set(L.window.subarray(X,X+X-ke),0),L.match_start-=X,L.strstart-=X,L.block_start-=X,L.insert>L.strstart&&(L.insert=L.strstart),dt(L),ke+=X),L.strm.avail_in===0)break;if(O=St(L.strm,L.window,L.strstart+L.lookahead,ke),L.lookahead+=O,L.lookahead+L.insert>=3)for(ye=L.strstart-L.insert,L.ins_h=L.window[ye],L.ins_h=Ye(L,L.ins_h,L.window[ye+1]);L.insert&&(L.ins_h=Ye(L,L.ins_h,L.window[ye+3-1]),L.prev[ye&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=ye,ye++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<rt&&L.strm.avail_in!==0)},Gi=(L,X)=>{let O,ke,ye,ge=L.pending_buf_size-5>L.w_size?L.w_size:L.pending_buf_size-5,tt=0,Oe=L.strm.avail_in;do{if(O=65535,ye=L.bi_valid+42>>3,L.strm.avail_out<ye||(ye=L.strm.avail_out-ye,ke=L.strstart-L.block_start,O>ke+L.strm.avail_in&&(O=ke+L.strm.avail_in),O>ye&&(O=ye),O<ge&&(O===0&&X!==Q||X===ae||O!==ke+L.strm.avail_in)))break;tt=X===Q&&O===ke+L.strm.avail_in?1:0,Re(L,0,0,tt),L.pending_buf[L.pending-4]=O,L.pending_buf[L.pending-3]=O>>8,L.pending_buf[L.pending-2]=~O,L.pending_buf[L.pending-1]=~O>>8,Ae(L.strm),ke&&(ke>O&&(ke=O),L.strm.output.set(L.window.subarray(L.block_start,L.block_start+ke),L.strm.next_out),L.strm.next_out+=ke,L.strm.avail_out-=ke,L.strm.total_out+=ke,L.block_start+=ke,O-=ke),O&&(St(L.strm,L.strm.output,L.strm.next_out,O),L.strm.next_out+=O,L.strm.avail_out-=O,L.strm.total_out+=O)}while(tt===0);return Oe-=L.strm.avail_in,Oe&&(Oe>=L.w_size?(L.matches=2,L.window.set(L.strm.input.subarray(L.strm.next_in-L.w_size,L.strm.next_in),0),L.strstart=L.w_size,L.insert=L.strstart):(L.window_size-L.strstart<=Oe&&(L.strstart-=L.w_size,L.window.set(L.window.subarray(L.w_size,L.w_size+L.strstart),0),L.matches<2&&L.matches++,L.insert>L.strstart&&(L.insert=L.strstart)),L.window.set(L.strm.input.subarray(L.strm.next_in-Oe,L.strm.next_in),L.strstart),L.strstart+=Oe,L.insert+=Oe>L.w_size-L.insert?L.w_size-L.insert:Oe),L.block_start=L.strstart),L.high_water<L.strstart&&(L.high_water=L.strstart),tt?4:X!==ae&&X!==Q&&L.strm.avail_in===0&&L.strstart===L.block_start?2:(ye=L.window_size-L.strstart,L.strm.avail_in>ye&&L.block_start>=L.w_size&&(L.block_start-=L.w_size,L.strstart-=L.w_size,L.window.set(L.window.subarray(L.w_size,L.w_size+L.strstart),0),L.matches<2&&L.matches++,ye+=L.w_size,L.insert>L.strstart&&(L.insert=L.strstart)),ye>L.strm.avail_in&&(ye=L.strm.avail_in),ye&&(St(L.strm,L.window,L.strstart,ye),L.strstart+=ye,L.insert+=ye>L.w_size-L.insert?L.w_size-L.insert:ye),L.high_water<L.strstart&&(L.high_water=L.strstart),ye=L.bi_valid+42>>3,ye=L.pending_buf_size-ye>65535?65535:L.pending_buf_size-ye,ge=ye>L.w_size?L.w_size:ye,ke=L.strstart-L.block_start,(ke>=ge||(ke||X===Q)&&X!==ae&&L.strm.avail_in===0&&ke<=ye)&&(O=ke>ye?ye:ke,tt=X===Q&&L.strm.avail_in===0&&O===ke?1:0,Re(L,L.block_start,O,tt),L.block_start+=O,Ae(L.strm)),tt?3:1)},Do=(L,X)=>{let O,ke;for(;;){if(L.lookahead<rt){if(yi(L),L.lookahead<rt&&X===ae)return 1;if(L.lookahead===0)break}if(O=0,L.lookahead>=3&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),O!==0&&L.strstart-O<=L.w_size-rt&&(L.match_length=xt(L,O)),L.match_length>=3)if(ke=H(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){L.match_length--;do L.strstart++,L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart;while(--L.match_length!=0);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+1]);else ke=H(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(ke&&(be(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,X===Q?(be(L,!0),L.strm.avail_out===0?3:4):L.sym_next&&(be(L,!1),L.strm.avail_out===0)?1:2},ao=(L,X)=>{let O,ke,ye;for(;;){if(L.lookahead<rt){if(yi(L),L.lookahead<rt&&X===ae)return 1;if(L.lookahead===0)break}if(O=0,L.lookahead>=3&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,O!==0&&L.prev_length<L.max_lazy_match&&L.strstart-O<=L.w_size-rt&&(L.match_length=xt(L,O),L.match_length<=5&&(L.strategy===xe||L.match_length===3&&L.strstart-L.match_start>4096)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){ye=L.strstart+L.lookahead-3,ke=H(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;do++L.strstart<=ye&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart);while(--L.prev_length!=0);if(L.match_available=0,L.match_length=2,L.strstart++,ke&&(be(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if(ke=H(L,0,L.window[L.strstart-1]),ke&&be(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(ke=H(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,X===Q?(be(L,!0),L.strm.avail_out===0?3:4):L.sym_next&&(be(L,!1),L.strm.avail_out===0)?1:2};function mr(L,X,O,ke,ye){this.good_length=L,this.max_lazy=X,this.nice_length=O,this.max_chain=ke,this.func=ye}const Ki=[new mr(0,0,0,0,Gi),new mr(4,4,8,4,Do),new mr(4,5,16,8,Do),new mr(4,6,32,32,Do),new mr(4,4,16,16,ao),new mr(8,16,32,32,ao),new mr(8,16,128,128,ao),new mr(8,32,128,256,ao),new mr(32,128,258,1024,ao),new mr(32,258,258,4096,ao)];function tp(){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=Pe,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),st(this.dyn_ltree),st(this.dyn_dtree),st(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),st(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),st(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Us=L=>{if(!L)return 1;const X=L.state;return!X||X.strm!==L||X.status!==At&&X.status!==57&&X.status!==69&&X.status!==73&&X.status!==91&&X.status!==103&&X.status!==ft&&X.status!==ct?1:0},hm=L=>{if(Us(L))return ut(L,ne);L.total_in=L.total_out=0,L.data_type=Ne;const X=L.state;return X.pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap===2?57:X.wrap?At:ft,L.adler=X.wrap===2?0:1,X.last_flush=-2,we(X),ie},mu=L=>{const X=hm(L);var O;return X===ie&&((O=L.state).window_size=2*O.w_size,st(O.head),O.max_lazy_match=Ki[O.level].max_lazy,O.good_match=Ki[O.level].good_length,O.nice_match=Ki[O.level].nice_length,O.max_chain_length=Ki[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=2,O.match_available=0,O.ins_h=0),X},pm=(L,X,O,ke,ye,ge)=>{if(!L)return ne;let tt=1;if(X===ue&&(X=6),ke<0?(tt=0,ke=-ke):ke>15&&(tt=2,ke-=16),ye<1||ye>9||O!==Pe||ke<8||ke>15||X<0||X>9||ge<0||ge>je||ke===8&&tt!==1)return ut(L,ne);ke===8&&(ke=9);const Oe=new tp;return L.state=Oe,Oe.strm=L,Oe.status=At,Oe.wrap=tt,Oe.gzhead=null,Oe.w_bits=ke,Oe.w_size=1<<Oe.w_bits,Oe.w_mask=Oe.w_size-1,Oe.hash_bits=ye+7,Oe.hash_size=1<<Oe.hash_bits,Oe.hash_mask=Oe.hash_size-1,Oe.hash_shift=~~((Oe.hash_bits+3-1)/3),Oe.window=new Uint8Array(2*Oe.w_size),Oe.head=new Uint16Array(Oe.hash_size),Oe.prev=new Uint16Array(Oe.w_size),Oe.lit_bufsize=1<<ye+6,Oe.pending_buf_size=4*Oe.lit_bufsize,Oe.pending_buf=new Uint8Array(Oe.pending_buf_size),Oe.sym_buf=Oe.lit_bufsize,Oe.sym_end=3*(Oe.lit_bufsize-1),Oe.level=X,Oe.strategy=ge,Oe.method=O,mu(L)};var qc={deflateInit:(L,X)=>pm(L,X,Pe,15,8,he),deflateInit2:pm,deflateReset:mu,deflateResetKeep:hm,deflateSetHeader:(L,X)=>Us(L)||L.state.wrap!==2?ne:(L.state.gzhead=X,ie),deflate:(L,X)=>{if(Us(L)||X>Z||X<0)return L?ut(L,ne):ne;const O=L.state;if(!L.output||L.avail_in!==0&&!L.input||O.status===ct&&X!==Q)return ut(L,L.avail_out===0?J:ne);const ke=O.last_flush;if(O.last_flush=X,O.pending!==0){if(Ae(L),L.avail_out===0)return O.last_flush=-1,ie}else if(L.avail_in===0&&Te(X)<=Te(ke)&&X!==Q)return ut(L,J);if(O.status===ct&&L.avail_in!==0)return ut(L,J);if(O.status===At&&O.wrap===0&&(O.status=ft),O.status===At){let ye=Pe+(O.w_bits-8<<4)<<8,ge=-1;if(ge=O.strategy>=oe||O.level<2?0:O.level<6?1:O.level===6?2:3,ye|=ge<<6,O.strstart!==0&&(ye|=32),ye+=31-ye%31,ht(O,ye),O.strstart!==0&&(ht(O,L.adler>>>16),ht(O,65535&L.adler)),L.adler=1,O.status=ft,Ae(L),O.pending!==0)return O.last_flush=-1,ie}if(O.status===57){if(L.adler=0,$e(O,31),$e(O,139),$e(O,8),O.gzhead)$e(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),$e(O,255&O.gzhead.time),$e(O,O.gzhead.time>>8&255),$e(O,O.gzhead.time>>16&255),$e(O,O.gzhead.time>>24&255),$e(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),$e(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&($e(O,255&O.gzhead.extra.length),$e(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(L.adler=Fe(L.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69;else if($e(O,0),$e(O,0),$e(O,0),$e(O,0),$e(O,0),$e(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),$e(O,3),O.status=ft,Ae(L),O.pending!==0)return O.last_flush=-1,ie}if(O.status===69){if(O.gzhead.extra){let ye=O.pending,ge=(65535&O.gzhead.extra.length)-O.gzindex;for(;O.pending+ge>O.pending_buf_size;){let Oe=O.pending_buf_size-O.pending;if(O.pending_buf.set(O.gzhead.extra.subarray(O.gzindex,O.gzindex+Oe),O.pending),O.pending=O.pending_buf_size,O.gzhead.hcrc&&O.pending>ye&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex+=Oe,Ae(L),O.pending!==0)return O.last_flush=-1,ie;ye=0,ge-=Oe}let tt=new Uint8Array(O.gzhead.extra);O.pending_buf.set(tt.subarray(O.gzindex,O.gzindex+ge),O.pending),O.pending+=ge,O.gzhead.hcrc&&O.pending>ye&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex=0}O.status=73}if(O.status===73){if(O.gzhead.name){let ye,ge=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>ge&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ge,ge)),Ae(L),O.pending!==0)return O.last_flush=-1,ie;ge=0}ye=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,$e(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>ge&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ge,ge)),O.gzindex=0}O.status=91}if(O.status===91){if(O.gzhead.comment){let ye,ge=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>ge&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ge,ge)),Ae(L),O.pending!==0)return O.last_flush=-1,ie;ge=0}ye=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,$e(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>ge&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ge,ge))}O.status=103}if(O.status===103){if(O.gzhead.hcrc){if(O.pending+2>O.pending_buf_size&&(Ae(L),O.pending!==0))return O.last_flush=-1,ie;$e(O,255&L.adler),$e(O,L.adler>>8&255),L.adler=0}if(O.status=ft,Ae(L),O.pending!==0)return O.last_flush=-1,ie}if(L.avail_in!==0||O.lookahead!==0||X!==ae&&O.status!==ct){let ye=O.level===0?Gi(O,X):O.strategy===oe?((ge,tt)=>{let Oe;for(;;){if(ge.lookahead===0&&(yi(ge),ge.lookahead===0)){if(tt===ae)return 1;break}if(ge.match_length=0,Oe=H(ge,0,ge.window[ge.strstart]),ge.lookahead--,ge.strstart++,Oe&&(be(ge,!1),ge.strm.avail_out===0))return 1}return ge.insert=0,tt===Q?(be(ge,!0),ge.strm.avail_out===0?3:4):ge.sym_next&&(be(ge,!1),ge.strm.avail_out===0)?1:2})(O,X):O.strategy===Be?((ge,tt)=>{let Oe,wt,Ve,et;const ii=ge.window;for(;;){if(ge.lookahead<=He){if(yi(ge),ge.lookahead<=He&&tt===ae)return 1;if(ge.lookahead===0)break}if(ge.match_length=0,ge.lookahead>=3&&ge.strstart>0&&(Ve=ge.strstart-1,wt=ii[Ve],wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve])){et=ge.strstart+He;do;while(wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&Ve<et);ge.match_length=He-(et-Ve),ge.match_length>ge.lookahead&&(ge.match_length=ge.lookahead)}if(ge.match_length>=3?(Oe=H(ge,1,ge.match_length-3),ge.lookahead-=ge.match_length,ge.strstart+=ge.match_length,ge.match_length=0):(Oe=H(ge,0,ge.window[ge.strstart]),ge.lookahead--,ge.strstart++),Oe&&(be(ge,!1),ge.strm.avail_out===0))return 1}return ge.insert=0,tt===Q?(be(ge,!0),ge.strm.avail_out===0?3:4):ge.sym_next&&(be(ge,!1),ge.strm.avail_out===0)?1:2})(O,X):Ki[O.level].func(O,X);if(ye!==3&&ye!==4||(O.status=ct),ye===1||ye===3)return L.avail_out===0&&(O.last_flush=-1),ie;if(ye===2&&(X===Ee?ee(O):X!==Z&&(Re(O,0,0,!1),X===pe&&(st(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),Ae(L),L.avail_out===0))return O.last_flush=-1,ie}return X!==Q?ie:O.wrap<=0?re:(O.wrap===2?($e(O,255&L.adler),$e(O,L.adler>>8&255),$e(O,L.adler>>16&255),$e(O,L.adler>>24&255),$e(O,255&L.total_in),$e(O,L.total_in>>8&255),$e(O,L.total_in>>16&255),$e(O,L.total_in>>24&255)):(ht(O,L.adler>>>16),ht(O,65535&L.adler)),Ae(L),O.wrap>0&&(O.wrap=-O.wrap),O.pending!==0?ie:re)},deflateEnd:L=>{if(Us(L))return ne;const X=L.state.status;return L.state=null,X===ft?ut(L,G):ie},deflateSetDictionary:(L,X)=>{let O=X.length;if(Us(L))return ne;const ke=L.state,ye=ke.wrap;if(ye===2||ye===1&&ke.status!==At||ke.lookahead)return ne;if(ye===1&&(L.adler=Ce(L.adler,X,O,0)),ke.wrap=0,O>=ke.w_size){ye===0&&(st(ke.head),ke.strstart=0,ke.block_start=0,ke.insert=0);let wt=new Uint8Array(ke.w_size);wt.set(X.subarray(O-ke.w_size,O),0),X=wt,O=ke.w_size}const ge=L.avail_in,tt=L.next_in,Oe=L.input;for(L.avail_in=O,L.next_in=0,L.input=X,yi(ke);ke.lookahead>=3;){let wt=ke.strstart,Ve=ke.lookahead-2;do ke.ins_h=Ye(ke,ke.ins_h,ke.window[wt+3-1]),ke.prev[wt&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=wt,wt++;while(--Ve);ke.strstart=wt,ke.lookahead=2,yi(ke)}return ke.strstart+=ke.lookahead,ke.block_start=ke.strstart,ke.insert=ke.lookahead,ke.lookahead=0,ke.match_length=ke.prev_length=2,ke.match_available=0,L.next_in=tt,L.input=Oe,L.avail_in=ge,ke.wrap=ye,ie},deflateInfo:"pako deflate (from Nodeca project)"};const qw=(L,X)=>Object.prototype.hasOwnProperty.call(L,X);var n5=function(L){const X=Array.prototype.slice.call(arguments,1);for(;X.length;){const O=X.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(const ke in O)qw(O,ke)&&(L[ke]=O[ke])}}return L},a5=L=>{let X=0;for(let ke=0,ye=L.length;ke<ye;ke++)X+=L[ke].length;const O=new Uint8Array(X);for(let ke=0,ye=0,ge=L.length;ke<ge;ke++){let tt=L[ke];O.set(tt,ye),ye+=tt.length}return O};let s5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s5=!1}const vu=new Uint8Array(256);for(let L=0;L<256;L++)vu[L]=L>=252?6:L>=248?5:L>=240?4:L>=224?3:L>=192?2:1;vu[254]=vu[254]=1;var fm=L=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(L);let X,O,ke,ye,ge,tt=L.length,Oe=0;for(ye=0;ye<tt;ye++)O=L.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=L.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),Oe+=O<128?1:O<2048?2:O<65536?3:4;for(X=new Uint8Array(Oe),ge=0,ye=0;ge<Oe;ye++)O=L.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=L.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),O<128?X[ge++]=O:O<2048?(X[ge++]=192|O>>>6,X[ge++]=128|63&O):O<65536?(X[ge++]=224|O>>>12,X[ge++]=128|O>>>6&63,X[ge++]=128|63&O):(X[ge++]=240|O>>>18,X[ge++]=128|O>>>12&63,X[ge++]=128|O>>>6&63,X[ge++]=128|63&O);return X},se=(L,X)=>{const O=X||L.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(L.subarray(0,X));let ke,ye;const ge=new Array(2*O);for(ye=0,ke=0;ke<O;){let tt=L[ke++];if(tt<128){ge[ye++]=tt;continue}let Oe=vu[tt];if(Oe>4)ge[ye++]=65533,ke+=Oe-1;else{for(tt&=Oe===2?31:Oe===3?15:7;Oe>1&&ke<O;)tt=tt<<6|63&L[ke++],Oe--;Oe>1?ge[ye++]=65533:tt<65536?ge[ye++]=tt:(tt-=65536,ge[ye++]=55296|tt>>10&1023,ge[ye++]=56320|1023&tt)}}return((tt,Oe)=>{if(Oe<65534&&tt.subarray&&s5)return String.fromCharCode.apply(null,tt.length===Oe?tt:tt.subarray(0,Oe));let wt="";for(let Ve=0;Ve<Oe;Ve++)wt+=String.fromCharCode(tt[Ve]);return wt})(ge,ye)},Ke=(L,X)=>{(X=X||L.length)>L.length&&(X=L.length);let O=X-1;for(;O>=0&&(192&L[O])==128;)O--;return O<0||O===0?X:O+vu[L[O]]>X?O:X},nt=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 at=Object.prototype.toString,{Z_NO_FLUSH:Ge,Z_SYNC_FLUSH:bt,Z_FULL_FLUSH:Lt,Z_FINISH:Nt,Z_OK:Ot,Z_STREAM_END:Yt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:Xt,Z_DEFLATED:Ei}=me;function Fi(L){this.options=n5({level:$t,method:Ei,chunkSize:16384,windowBits:15,memLevel:8,strategy:Xt},L||{});let X=this.options;X.raw&&X.windowBits>0?X.windowBits=-X.windowBits:X.gzip&&X.windowBits>0&&X.windowBits<16&&(X.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=qc.deflateInit2(this.strm,X.level,X.method,X.windowBits,X.memLevel,X.strategy);if(O!==Ot)throw new Error(ve[O]);if(X.header&&qc.deflateSetHeader(this.strm,X.header),X.dictionary){let ke;if(ke=typeof X.dictionary=="string"?fm(X.dictionary):at.call(X.dictionary)==="[object ArrayBuffer]"?new Uint8Array(X.dictionary):X.dictionary,O=qc.deflateSetDictionary(this.strm,ke),O!==Ot)throw new Error(ve[O]);this._dict_set=!0}}function to(L,X){const O=new Fi(X);if(O.push(L,!0),O.err)throw O.msg||ve[O.err];return O.result}Fi.prototype.push=function(L,X){const O=this.strm,ke=this.options.chunkSize;let ye,ge;if(this.ended)return!1;for(ge=X===~~X?X:X===!0?Nt:Ge,typeof L=="string"?O.input=fm(L):at.call(L)==="[object ArrayBuffer]"?O.input=new Uint8Array(L):O.input=L,O.next_in=0,O.avail_in=O.input.length;;)if(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),(ge===bt||ge===Lt)&&O.avail_out<=6)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else{if(ye=qc.deflate(O,ge),ye===Yt)return O.next_out>0&&this.onData(O.output.subarray(0,O.next_out)),ye=qc.deflateEnd(this.strm),this.onEnd(ye),this.ended=!0,ye===Ot;if(O.avail_out!==0){if(ge>0&&O.next_out>0)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else if(O.avail_in===0)break}else this.onData(O.output)}return!0},Fi.prototype.onData=function(L){this.chunks.push(L)},Fi.prototype.onEnd=function(L){L===Ot&&(this.result=a5(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};var ko={Deflate:Fi,deflate:to,deflateRaw:function(L,X){return(X=X||{}).raw=!0,to(L,X)},gzip:function(L,X){return(X=X||{}).gzip=!0,to(L,X)}};const ji=16209;var qt=function(L,X){let O,ke,ye,ge,tt,Oe,wt,Ve,et,ii,zt,Ct,Xo,Si,Qt,Oi,ti,kt,ei,Ui,Pt,Bi,oi,Gt;const gi=L.state;O=L.next_in,oi=L.input,ke=O+(L.avail_in-5),ye=L.next_out,Gt=L.output,ge=ye-(X-L.avail_out),tt=ye+(L.avail_out-257),Oe=gi.dmax,wt=gi.wsize,Ve=gi.whave,et=gi.wnext,ii=gi.window,zt=gi.hold,Ct=gi.bits,Xo=gi.lencode,Si=gi.distcode,Qt=(1<<gi.lenbits)-1,Oi=(1<<gi.distbits)-1;e:do{Ct<15&&(zt+=oi[O++]<<Ct,Ct+=8,zt+=oi[O++]<<Ct,Ct+=8),ti=Xo[zt&Qt];t:for(;;){if(kt=ti>>>24,zt>>>=kt,Ct-=kt,kt=ti>>>16&255,kt===0)Gt[ye++]=65535&ti;else{if(!(16&kt)){if((64&kt)==0){ti=Xo[(65535&ti)+(zt&(1<<kt)-1)];continue t}if(32&kt){gi.mode=16191;break e}L.msg="invalid literal/length code",gi.mode=ji;break e}ei=65535&ti,kt&=15,kt&&(Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8),ei+=zt&(1<<kt)-1,zt>>>=kt,Ct-=kt),Ct<15&&(zt+=oi[O++]<<Ct,Ct+=8,zt+=oi[O++]<<Ct,Ct+=8),ti=Si[zt&Oi];i:for(;;){if(kt=ti>>>24,zt>>>=kt,Ct-=kt,kt=ti>>>16&255,!(16&kt)){if((64&kt)==0){ti=Si[(65535&ti)+(zt&(1<<kt)-1)];continue i}L.msg="invalid distance code",gi.mode=ji;break e}if(Ui=65535&ti,kt&=15,Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8,Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8)),Ui+=zt&(1<<kt)-1,Ui>Oe){L.msg="invalid distance too far back",gi.mode=ji;break e}if(zt>>>=kt,Ct-=kt,kt=ye-ge,Ui>kt){if(kt=Ui-kt,kt>Ve&&gi.sane){L.msg="invalid distance too far back",gi.mode=ji;break e}if(Pt=0,Bi=ii,et===0){if(Pt+=wt-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Ui,Bi=Gt}}else if(et<kt){if(Pt+=wt+et-kt,kt-=et,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);if(Pt=0,et<ei){kt=et,ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Ui,Bi=Gt}}}else if(Pt+=et-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Ui,Bi=Gt}for(;ei>2;)Gt[ye++]=Bi[Pt++],Gt[ye++]=Bi[Pt++],Gt[ye++]=Bi[Pt++],ei-=3;ei&&(Gt[ye++]=Bi[Pt++],ei>1&&(Gt[ye++]=Bi[Pt++]))}else{Pt=ye-Ui;do Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],ei-=3;while(ei>2);ei&&(Gt[ye++]=Gt[Pt++],ei>1&&(Gt[ye++]=Gt[Pt++]))}break}}break}}while(O<ke&&ye<tt);ei=Ct>>3,O-=ei,Ct-=ei<<3,zt&=(1<<Ct)-1,L.next_in=O,L.next_out=ye,L.avail_in=O<ke?ke-O+5:5-(O-ke),L.avail_out=ye<tt?tt-ye+257:257-(ye-tt),gi.hold=zt,gi.bits=Ct};const Ho=15,is=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),na=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Qc=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),gn=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var os=(L,X,O,ke,ye,ge,tt,Oe)=>{const wt=Oe.bits;let Ve,et,ii,zt,Ct,Xo,Si=0,Qt=0,Oi=0,ti=0,kt=0,ei=0,Ui=0,Pt=0,Bi=0,oi=0,Gt=null;const gi=new Uint16Array(16),mn=new Uint16Array(16);let vm,h5,p5,f5=null;for(Si=0;Si<=Ho;Si++)gi[Si]=0;for(Qt=0;Qt<ke;Qt++)gi[X[O+Qt]]++;for(kt=wt,ti=Ho;ti>=1&&gi[ti]===0;ti--);if(kt>ti&&(kt=ti),ti===0)return ye[ge++]=20971520,ye[ge++]=20971520,Oe.bits=1,0;for(Oi=1;Oi<ti&&gi[Oi]===0;Oi++);for(kt<Oi&&(kt=Oi),Pt=1,Si=1;Si<=Ho;Si++)if(Pt<<=1,Pt-=gi[Si],Pt<0)return-1;if(Pt>0&&(L===0||ti!==1))return-1;for(mn[1]=0,Si=1;Si<Ho;Si++)mn[Si+1]=mn[Si]+gi[Si];for(Qt=0;Qt<ke;Qt++)X[O+Qt]!==0&&(tt[mn[X[O+Qt]]++]=Qt);if(L===0?(Gt=f5=tt,Xo=20):L===1?(Gt=is,f5=na,Xo=257):(Gt=Qc,f5=gn,Xo=0),oi=0,Qt=0,Si=Oi,Ct=ge,ei=kt,Ui=0,ii=-1,Bi=1<<kt,zt=Bi-1,L===1&&Bi>852||L===2&&Bi>592)return 1;for(;;){vm=Si-Ui,tt[Qt]+1<Xo?(h5=0,p5=tt[Qt]):tt[Qt]>=Xo?(h5=f5[tt[Qt]-Xo],p5=Gt[tt[Qt]-Xo]):(h5=96,p5=0),Ve=1<<Si-Ui,et=1<<ei,Oi=et;do et-=Ve,ye[Ct+(oi>>Ui)+et]=vm<<24|h5<<16|p5|0;while(et!==0);for(Ve=1<<Si-1;oi&Ve;)Ve>>=1;if(Ve!==0?(oi&=Ve-1,oi+=Ve):oi=0,Qt++,--gi[Si]==0){if(Si===ti)break;Si=X[O+tt[Qt]]}if(Si>kt&&(oi&zt)!==ii){for(Ui===0&&(Ui=kt),Ct+=Oi,ei=Si-Ui,Pt=1<<ei;ei+Ui<ti&&(Pt-=gi[ei+Ui],!(Pt<=0));)ei++,Pt<<=1;if(Bi+=1<<ei,L===1&&Bi>852||L===2&&Bi>592)return 1;ii=oi&zt,ye[ii]=kt<<24|ei<<16|Ct-ge|0}}return oi!==0&&(ye[Ct+oi]=Si-Ui<<24|64<<16|0),Oe.bits=kt,0};const{Z_FINISH:vo,Z_BLOCK:jn,Z_TREES:Or,Z_OK:Mo,Z_STREAM_END:aa,Z_NEED_DICT:Am,Z_STREAM_ERROR:cr,Z_DATA_ERROR:DF,Z_MEM_ERROR:RF,Z_BUF_ERROR:j2e,Z_DEFLATED:LF}=me,l5=16180,c5=16190,Rl=16191,Qw=16192,Gw=16194,d5=16199,u5=16200,Kw=16206,Ro=16209,_F=L=>(L>>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24);function V2e(){this.strm=null,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 yu=L=>{if(!L)return 1;const X=L.state;return!X||X.strm!==L||X.mode<l5||X.mode>16211?1:0},FF=L=>{if(yu(L))return cr;const X=L.state;return L.total_in=L.total_out=X.total=0,L.msg="",X.wrap&&(L.adler=1&X.wrap),X.mode=l5,X.last=0,X.havedict=0,X.flags=-1,X.dmax=32768,X.head=null,X.hold=0,X.bits=0,X.lencode=X.lendyn=new Int32Array(852),X.distcode=X.distdyn=new Int32Array(592),X.sane=1,X.back=-1,Mo},OF=L=>{if(yu(L))return cr;const X=L.state;return X.wsize=0,X.whave=0,X.wnext=0,FF(L)},UF=(L,X)=>{let O;if(yu(L))return cr;const ke=L.state;return X<0?(O=0,X=-X):(O=5+(X>>4),X<48&&(X&=15)),X&&(X<8||X>15)?cr:(ke.window!==null&&ke.wbits!==X&&(ke.window=null),ke.wrap=O,ke.wbits=X,OF(L))},NF=(L,X)=>{if(!L)return cr;const O=new V2e;L.state=O,O.strm=L,O.window=null,O.mode=l5;const ke=UF(L,X);return ke!==Mo&&(L.state=null),ke};let Jw,Zw,jF=!0;const z2e=L=>{if(jF){Jw=new Int32Array(512),Zw=new Int32Array(32);let X=0;for(;X<144;)L.lens[X++]=8;for(;X<256;)L.lens[X++]=9;for(;X<280;)L.lens[X++]=7;for(;X<288;)L.lens[X++]=8;for(os(1,L.lens,0,288,Jw,0,L.work,{bits:9}),X=0;X<32;)L.lens[X++]=5;os(2,L.lens,0,32,Zw,0,L.work,{bits:5}),jF=!1}L.lencode=Jw,L.lenbits=9,L.distcode=Zw,L.distbits=5},VF=(L,X,O,ke)=>{let ye;const ge=L.state;return ge.window===null&&(ge.wsize=1<<ge.wbits,ge.wnext=0,ge.whave=0,ge.window=new Uint8Array(ge.wsize)),ke>=ge.wsize?(ge.window.set(X.subarray(O-ge.wsize,O),0),ge.wnext=0,ge.whave=ge.wsize):(ye=ge.wsize-ge.wnext,ye>ke&&(ye=ke),ge.window.set(X.subarray(O-ke,O-ke+ye),ge.wnext),(ke-=ye)?(ge.window.set(X.subarray(O-ke,O),0),ge.wnext=ke,ge.whave=ge.wsize):(ge.wnext+=ye,ge.wnext===ge.wsize&&(ge.wnext=0),ge.whave<ge.wsize&&(ge.whave+=ye))),0};var Ll={inflateReset:OF,inflateReset2:UF,inflateResetKeep:FF,inflateInit:L=>NF(L,15),inflateInit2:NF,inflate:(L,X)=>{let O,ke,ye,ge,tt,Oe,wt,Ve,et,ii,zt,Ct,Xo,Si,Qt,Oi,ti,kt,ei,Ui,Pt,Bi,oi=0;const Gt=new Uint8Array(4);let gi,mn;const vm=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(yu(L)||!L.output||!L.input&&L.avail_in!==0)return cr;O=L.state,O.mode===Rl&&(O.mode=Qw),tt=L.next_out,ye=L.output,wt=L.avail_out,ge=L.next_in,ke=L.input,Oe=L.avail_in,Ve=O.hold,et=O.bits,ii=Oe,zt=wt,Bi=Mo;e:for(;;)switch(O.mode){case l5:if(O.wrap===0){O.mode=Qw;break}for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(2&O.wrap&&Ve===35615){O.wbits===0&&(O.wbits=15),O.check=0,Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0),Ve=0,et=0,O.mode=16181;break}if(O.head&&(O.head.done=!1),!(1&O.wrap)||(((255&Ve)<<8)+(Ve>>8))%31){L.msg="incorrect header check",O.mode=Ro;break}if((15&Ve)!==LF){L.msg="unknown compression method",O.mode=Ro;break}if(Ve>>>=4,et-=4,Pt=8+(15&Ve),O.wbits===0&&(O.wbits=Pt),Pt>15||Pt>O.wbits){L.msg="invalid window size",O.mode=Ro;break}O.dmax=1<<O.wbits,O.flags=0,L.adler=O.check=1,O.mode=512&Ve?16189:Rl,Ve=0,et=0;break;case 16181:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(O.flags=Ve,(255&O.flags)!==LF){L.msg="unknown compression method",O.mode=Ro;break}if(57344&O.flags){L.msg="unknown header flags set",O.mode=Ro;break}O.head&&(O.head.text=Ve>>8&1),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16182;case 16182:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.head&&(O.head.time=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,Gt[2]=Ve>>>16&255,Gt[3]=Ve>>>24&255,O.check=Fe(O.check,Gt,4,0)),Ve=0,et=0,O.mode=16183;case 16183:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.head&&(O.head.xflags=255&Ve,O.head.os=Ve>>8),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16184;case 16184:if(1024&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.length=Ve,O.head&&(O.head.extra_len=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0}else O.head&&(O.head.extra=null);O.mode=16185;case 16185:if(1024&O.flags&&(Ct=O.length,Ct>Oe&&(Ct=Oe),Ct&&(O.head&&(Pt=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Uint8Array(O.head.extra_len)),O.head.extra.set(ke.subarray(ge,ge+Ct),Pt)),512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,ge)),Oe-=Ct,ge+=Ct,O.length-=Ct),O.length))break e;O.length=0,O.mode=16186;case 16186:if(2048&O.flags){if(Oe===0)break e;Ct=0;do Pt=ke[ge+Ct++],O.head&&Pt&&O.length<65536&&(O.head.name+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,ge)),Oe-=Ct,ge+=Ct,Pt)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=16187;case 16187:if(4096&O.flags){if(Oe===0)break e;Ct=0;do Pt=ke[ge+Ct++],O.head&&Pt&&O.length<65536&&(O.head.comment+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,ge)),Oe-=Ct,ge+=Ct,Pt)break e}else O.head&&(O.head.comment=null);O.mode=16188;case 16188:if(512&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(4&O.wrap&&Ve!==(65535&O.check)){L.msg="header crc mismatch",O.mode=Ro;break}Ve=0,et=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),L.adler=O.check=0,O.mode=Rl;break;case 16189:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}L.adler=O.check=_F(Ve),Ve=0,et=0,O.mode=c5;case c5:if(O.havedict===0)return L.next_out=tt,L.avail_out=wt,L.next_in=ge,L.avail_in=Oe,O.hold=Ve,O.bits=et,Am;L.adler=O.check=1,O.mode=Rl;case Rl:if(X===jn||X===Or)break e;case Qw:if(O.last){Ve>>>=7&et,et-=7&et,O.mode=Kw;break}for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}switch(O.last=1&Ve,Ve>>>=1,et-=1,3&Ve){case 0:O.mode=16193;break;case 1:if(z2e(O),O.mode=d5,X===Or){Ve>>>=2,et-=2;break e}break;case 2:O.mode=16196;break;case 3:L.msg="invalid block type",O.mode=Ro}Ve>>>=2,et-=2;break;case 16193:for(Ve>>>=7&et,et-=7&et;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if((65535&Ve)!=(Ve>>>16^65535)){L.msg="invalid stored block lengths",O.mode=Ro;break}if(O.length=65535&Ve,Ve=0,et=0,O.mode=Gw,X===Or)break e;case Gw:O.mode=16195;case 16195:if(Ct=O.length,Ct){if(Ct>Oe&&(Ct=Oe),Ct>wt&&(Ct=wt),Ct===0)break e;ye.set(ke.subarray(ge,ge+Ct),tt),Oe-=Ct,ge+=Ct,wt-=Ct,tt+=Ct,O.length-=Ct;break}O.mode=Rl;break;case 16196:for(;et<14;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(O.nlen=257+(31&Ve),Ve>>>=5,et-=5,O.ndist=1+(31&Ve),Ve>>>=5,et-=5,O.ncode=4+(15&Ve),Ve>>>=4,et-=4,O.nlen>286||O.ndist>30){L.msg="too many length or distance symbols",O.mode=Ro;break}O.have=0,O.mode=16197;case 16197:for(;O.have<O.ncode;){for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.lens[vm[O.have++]]=7&Ve,Ve>>>=3,et-=3}for(;O.have<19;)O.lens[vm[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,gi={bits:O.lenbits},Bi=os(0,O.lens,0,19,O.lencode,0,O.work,gi),O.lenbits=gi.bits,Bi){L.msg="invalid code lengths set",O.mode=Ro;break}O.have=0,O.mode=16198;case 16198:for(;O.have<O.nlen+O.ndist;){for(;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(ti<16)Ve>>>=Qt,et-=Qt,O.lens[O.have++]=ti;else{if(ti===16){for(mn=Qt+2;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(Ve>>>=Qt,et-=Qt,O.have===0){L.msg="invalid bit length repeat",O.mode=Ro;break}Pt=O.lens[O.have-1],Ct=3+(3&Ve),Ve>>>=2,et-=2}else if(ti===17){for(mn=Qt+3;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=3+(7&Ve),Ve>>>=3,et-=3}else{for(mn=Qt+7;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=11+(127&Ve),Ve>>>=7,et-=7}if(O.have+Ct>O.nlen+O.ndist){L.msg="invalid bit length repeat",O.mode=Ro;break}for(;Ct--;)O.lens[O.have++]=Pt}}if(O.mode===Ro)break;if(O.lens[256]===0){L.msg="invalid code -- missing end-of-block",O.mode=Ro;break}if(O.lenbits=9,gi={bits:O.lenbits},Bi=os(1,O.lens,0,O.nlen,O.lencode,0,O.work,gi),O.lenbits=gi.bits,Bi){L.msg="invalid literal/lengths set",O.mode=Ro;break}if(O.distbits=6,O.distcode=O.distdyn,gi={bits:O.distbits},Bi=os(2,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,gi),O.distbits=gi.bits,Bi){L.msg="invalid distances set",O.mode=Ro;break}if(O.mode=d5,X===Or)break e;case d5:O.mode=u5;case u5:if(Oe>=6&&wt>=258){L.next_out=tt,L.avail_out=wt,L.next_in=ge,L.avail_in=Oe,O.hold=Ve,O.bits=et,qt(L,zt),tt=L.next_out,ye=L.output,wt=L.avail_out,ge=L.next_in,ke=L.input,Oe=L.avail_in,Ve=O.hold,et=O.bits,O.mode===Rl&&(O.back=-1);break}for(O.back=0;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(Oi&&(240&Oi)==0){for(kt=Qt,ei=Oi,Ui=ti;oi=O.lencode[Ui+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,O.length=ti,Oi===0){O.mode=16205;break}if(32&Oi){O.back=-1,O.mode=Rl;break}if(64&Oi){L.msg="invalid literal/length code",O.mode=Ro;break}O.extra=15&Oi,O.mode=16201;case 16201:if(O.extra){for(mn=O.extra;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.length+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=16202;case 16202:for(;oi=O.distcode[Ve&(1<<O.distbits)-1],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if((240&Oi)==0){for(kt=Qt,ei=Oi,Ui=ti;oi=O.distcode[Ui+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Oi=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,64&Oi){L.msg="invalid distance code",O.mode=Ro;break}O.offset=ti,O.extra=15&Oi,O.mode=16203;case 16203:if(O.extra){for(mn=O.extra;et<mn;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}O.offset+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){L.msg="invalid distance too far back",O.mode=Ro;break}O.mode=16204;case 16204:if(wt===0)break e;if(Ct=zt-wt,O.offset>Ct){if(Ct=O.offset-Ct,Ct>O.whave&&O.sane){L.msg="invalid distance too far back",O.mode=Ro;break}Ct>O.wnext?(Ct-=O.wnext,Xo=O.wsize-Ct):Xo=O.wnext-Ct,Ct>O.length&&(Ct=O.length),Si=O.window}else Si=ye,Xo=tt-O.offset,Ct=O.length;Ct>wt&&(Ct=wt),wt-=Ct,O.length-=Ct;do ye[tt++]=Si[Xo++];while(--Ct);O.length===0&&(O.mode=u5);break;case 16205:if(wt===0)break e;ye[tt++]=O.length,wt--,O.mode=u5;break;case Kw:if(O.wrap){for(;et<32;){if(Oe===0)break e;Oe--,Ve|=ke[ge++]<<et,et+=8}if(zt-=wt,L.total_out+=zt,O.total+=zt,4&O.wrap&&zt&&(L.adler=O.check=O.flags?Fe(O.check,ye,zt,tt-zt):Ce(O.check,ye,zt,tt-zt)),zt=wt,4&O.wrap&&(O.flags?Ve:_F(Ve))!==O.check){L.msg="incorrect data check",O.mode=Ro;break}Ve=0,et=0}O.mode=16207;case 16207:if(O.wrap&&O.flags){for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[ge++]<<et,et+=8}if(4&O.wrap&&Ve!==(4294967295&O.total)){L.msg="incorrect length check",O.mode=Ro;break}Ve=0,et=0}O.mode=16208;case 16208:Bi=aa;break e;case Ro:Bi=DF;break e;case 16210:return RF;default:return cr}return L.next_out=tt,L.avail_out=wt,L.next_in=ge,L.avail_in=Oe,O.hold=Ve,O.bits=et,(O.wsize||zt!==L.avail_out&&O.mode<Ro&&(O.mode<Kw||X!==vo))&&VF(L,L.output,L.next_out,zt-L.avail_out),ii-=L.avail_in,zt-=L.avail_out,L.total_in+=ii,L.total_out+=zt,O.total+=zt,4&O.wrap&&zt&&(L.adler=O.check=O.flags?Fe(O.check,ye,zt,L.next_out-zt):Ce(O.check,ye,zt,L.next_out-zt)),L.data_type=O.bits+(O.last?64:0)+(O.mode===Rl?128:0)+(O.mode===d5||O.mode===Gw?256:0),(ii===0&&zt===0||X===vo)&&Bi===Mo&&(Bi=j2e),Bi},inflateEnd:L=>{if(yu(L))return cr;let X=L.state;return X.window&&(X.window=null),L.state=null,Mo},inflateGetHeader:(L,X)=>{if(yu(L))return cr;const O=L.state;return(2&O.wrap)==0?cr:(O.head=X,X.done=!1,Mo)},inflateSetDictionary:(L,X)=>{const O=X.length;let ke,ye,ge;return yu(L)?cr:(ke=L.state,ke.wrap!==0&&ke.mode!==c5?cr:ke.mode===c5&&(ye=1,ye=Ce(ye,X,O,0),ye!==ke.check)?DF:(ge=VF(L,X,O,O),ge?(ke.mode=16210,RF):(ke.havedict=1,Mo)))},inflateInfo:"pako inflate (from Nodeca project)"},H2e=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 zF=Object.prototype.toString,{Z_NO_FLUSH:q2e,Z_FINISH:Q2e,Z_OK:gm,Z_STREAM_END:Ww,Z_NEED_DICT:Yw,Z_STREAM_ERROR:G2e,Z_DATA_ERROR:HF,Z_MEM_ERROR:K2e}=me;function mm(L){this.options=n5({chunkSize:65536,windowBits:15,to:""},L||{});const X=this.options;X.raw&&X.windowBits>=0&&X.windowBits<16&&(X.windowBits=-X.windowBits,X.windowBits===0&&(X.windowBits=-15)),!(X.windowBits>=0&&X.windowBits<16)||L&&L.windowBits||(X.windowBits+=32),X.windowBits>15&&X.windowBits<48&&(15&X.windowBits)==0&&(X.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=Ll.inflateInit2(this.strm,X.windowBits);if(O!==gm)throw new Error(ve[O]);if(this.header=new H2e,Ll.inflateGetHeader(this.strm,this.header),X.dictionary&&(typeof X.dictionary=="string"?X.dictionary=fm(X.dictionary):zF.call(X.dictionary)==="[object ArrayBuffer]"&&(X.dictionary=new Uint8Array(X.dictionary)),X.raw&&(O=Ll.inflateSetDictionary(this.strm,X.dictionary),O!==gm)))throw new Error(ve[O])}function Xw(L,X){const O=new mm(X);if(O.push(L),O.err)throw O.msg||ve[O.err];return O.result}mm.prototype.push=function(L,X){const O=this.strm,ke=this.options.chunkSize,ye=this.options.dictionary;let ge,tt,Oe;if(this.ended)return!1;for(tt=X===~~X?X:X===!0?Q2e:q2e,zF.call(L)==="[object ArrayBuffer]"?O.input=new Uint8Array(L):O.input=L,O.next_in=0,O.avail_in=O.input.length;;){for(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),ge=Ll.inflate(O,tt),ge===Yw&&ye&&(ge=Ll.inflateSetDictionary(O,ye),ge===gm?ge=Ll.inflate(O,tt):ge===HF&&(ge=Yw));O.avail_in>0&&ge===Ww&&O.state.wrap>0&&L[O.next_in]!==0;)Ll.inflateReset(O),ge=Ll.inflate(O,tt);switch(ge){case G2e:case HF:case Yw:case K2e:return this.onEnd(ge),this.ended=!0,!1}if(Oe=O.avail_out,O.next_out&&(O.avail_out===0||ge===Ww))if(this.options.to==="string"){let wt=Ke(O.output,O.next_out),Ve=O.next_out-wt,et=se(O.output,wt);O.next_out=Ve,O.avail_out=ke-Ve,Ve&&O.output.set(O.output.subarray(wt,wt+Ve),0),this.onData(et)}else this.onData(O.output.length===O.next_out?O.output:O.output.subarray(0,O.next_out));if(ge!==gm||Oe!==0){if(ge===Ww)return ge=Ll.inflateEnd(this.strm),this.onEnd(ge),this.ended=!0,!0;if(O.avail_in===0)break}}return!0},mm.prototype.onData=function(L){this.chunks.push(L)},mm.prototype.onEnd=function(L){L===gm&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a5(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};var J2e={Inflate:mm,inflate:Xw,inflateRaw:function(L,X){return(X=X||{}).raw=!0,Xw(L,X)},ungzip:Xw};const{Deflate:Z2e,deflate:W2e,deflateRaw:Y2e,gzip:X2e}=ko,{Inflate:$2e,inflate:eme,inflateRaw:tme,ungzip:ime}=J2e;var qF=Z2e,QF=W2e,GF=Y2e,KF=X2e,JF=$2e,ZF=eme,WF=tme,YF=ime,XF=me,ome={Deflate:qF,deflate:QF,deflateRaw:GF,gzip:KF,Inflate:JF,inflate:ZF,inflateRaw:WF,ungzip:YF,constants:XF};i.Deflate=qF,i.Inflate=JF,i.constants=XF,i.default=ome,i.deflate=QF,i.deflateRaw=GF,i.gzip=KF,i.inflate=ZF,i.inflateRaw=WF,i.ungzip=YF,Object.defineProperty(i,"__esModule",{value:!0})}))})(qb,qb.exports)),qb.exports}var mte=oNt();const rNt=nv(mte),Es=rme({__proto__:null,default:rNt},[mte]);let Rn=window.pako||Es;Rn.inflate||(Rn=Rn.default);const nNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function aNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],positionsDecodeMatrix:t[11]}}function sNt(t){return{positions:new Uint16Array(Rn.inflate(t.positions).buffer),normals:new Int8Array(Rn.inflate(t.normals).buffer),indices:new Uint32Array(Rn.inflate(t.indices).buffer),edgeIndices:new Uint32Array(Rn.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(Rn.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(Rn.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(Rn.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(Rn.inflate(t.meshColors).buffer),entityIDs:Rn.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(Rn.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(Rn.inflate(t.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(Rn.inflate(t.positionsDecodeMatrix).buffer)}}function lNt(t,e,i,o,r,n){n.getNextId(),o.positionsCompression="precompressed",o.normalsCompression="precompressed";const a=i.positions,s=i.normals,l=i.indices,c=i.edgeIndices,d=i.meshPositions,u=i.meshIndices,h=i.meshEdgesIndices,p=i.meshColors,A=JSON.parse(i.entityIDs),f=i.entityMeshes,m=i.entityIsObjects,g=d.length,y=f.length;for(let v=0;v<y;v++){const b=A[v],x=e.globalizeObjectIds?C.globalizeObjectId(o.id,b):b,k=t.metaScene.metaObjects[x],E={},B={};if(k){if(e.excludeTypesMap&&k.type&&e.excludeTypesMap[k.type]||e.includeTypesMap&&k.type&&!e.includeTypesMap[k.type])continue;const S=e.objectDefaults?e.objectDefaults[k.type]||e.objectDefaults.DEFAULT:null;S&&(S.visible===!1&&(E.visible=!1),S.pickable===!1&&(E.pickable=!1),S.colorize&&(B.color=S.colorize),S.opacity!==void 0&&S.opacity!==null&&(B.opacity=S.opacity))}else if(e.excludeUnclassifiedObjects)continue;const P=v===y-1,T=[];for(let S=f[v],R=P?f.length:f[v+1];S<R;S++){const F=S===g-1,U=x+".mesh."+S,q=nNt(p.subarray(S*4,S*4+3)),V=p[S*4+3]/255;o.createMesh(mt.apply(B,{id:U,primitive:"triangles",positionsCompressed:a.subarray(d[S],F?a.length:d[S+1]),normalsCompressed:s.subarray(d[S],F?a.length:d[S+1]),indices:l.subarray(u[S],F?l.length:u[S+1]),edgeIndices:c.subarray(h[S],F?c.length:h[S+1]),positionsDecodeMatrix:i.positionsDecodeMatrix,color:q,opacity:V})),T.push(U)}o.createEntity(mt.apply(E,{id:x,isObject:m[v]===1,meshIds:T}))}}const vte={version:1,parse:function(t,e,i,o,r,n){const a=aNt(i),s=sNt(a);lNt(t,e,s,o,r,n)}};let Sr=window.pako||Es;Sr.inflate||(Sr=Sr.default);function cNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],positionsDecodeMatrix:t[11],entityMeshIds:t[12],entityMatrices:t[13],entityUsesInstancing:t[14]}}function dNt(t){return{positions:new Uint16Array(Sr.inflate(t.positions).buffer),normals:new Int8Array(Sr.inflate(t.normals).buffer),indices:new Uint32Array(Sr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(Sr.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(Sr.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(Sr.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(Sr.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(Sr.inflate(t.meshColors).buffer),entityIDs:Sr.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(Sr.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(Sr.inflate(t.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(Sr.inflate(t.positionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(Sr.inflate(t.entityMeshIds).buffer),entityMatrices:new Float32Array(Sr.inflate(t.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(Sr.inflate(t.entityUsesInstancing).buffer)}}const uNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function hNt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.meshPositions,h=i.meshIndices,p=i.meshEdgesIndices,A=i.meshColors,f=JSON.parse(i.entityIDs),m=i.entityMeshes,g=i.entityIsObjects,y=i.entityMeshIds,v=i.entityMatrices,b=i.entityUsesInstancing,x=u.length,k=m.length,E={};for(let B=0;B<k;B++){const P=f[B],T=e.globalizeObjectIds?C.globalizeObjectId(o.id,P):P,S=t.metaScene.metaObjects[T],R={},F={},U=v.subarray(B*16,B*16+16);if(S){if(e.excludeTypesMap&&S.type&&e.excludeTypesMap[S.type]||e.includeTypesMap&&S.type&&!e.includeTypesMap[S.type])continue;const W=e.objectDefaults?e.objectDefaults[S.type]||e.objectDefaults.DEFAULT:null;W&&(W.visible===!1&&(R.visible=!1),W.pickable===!1&&(R.pickable=!1),W.colorize&&(F.color=W.colorize),W.opacity!==void 0&&W.opacity!==null&&(F.opacity=W.opacity))}else if(e.excludeUnclassifiedObjects)continue;const q=B===k-1,V=[];for(let W=m[B],Y=q?y.length:m[B+1];W<Y;W++){const $=y[W],fe=$===x-1,Me=n.getNextId(),Se=uNt(A.subarray($*4,$*4+3)),qe=A[$*4+3]/255,Qe=s.subarray(u[$],fe?s.length:u[$+1]),Ce=l.subarray(u[$],fe?s.length:u[$+1]),Le=c.subarray(h[$],fe?c.length:h[$+1]),Fe=d.subarray(p[$],fe?d.length:p[$+1]);if(b[B]===1){const ve=`${a}.geometry.${Me}.${$}`;ve in E||(o.createGeometry({id:ve,positionsCompressed:Qe,normalsCompressed:Ce,indices:Le,edgeIndices:Fe,primitive:"triangles",positionsDecodeMatrix:i.positionsDecodeMatrix}),E[ve]=!0),o.createMesh(mt.apply(F,{id:Me,color:Se,opacity:qe,matrix:U,geometryId:ve})),V.push(Me)}else o.createMesh(mt.apply(F,{id:Me,primitive:"triangles",positionsCompressed:Qe,normalsCompressed:Ce,indices:Le,edgeIndices:Fe,positionsDecodeMatrix:i.positionsDecodeMatrix,color:Se,opacity:qe})),V.push(Me)}V.length&&o.createEntity(mt.apply(R,{id:T,isObject:g[B]===1,meshIds:V}))}}const yte={version:2,parse:function(t,e,i,o,r,n){const a=cNt(i),s=dNt(a);hNt(t,e,s,o,r,n)}};let br=window.pako||Es;br.inflate||(br=br.default);function pNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],instancedPositionsDecodeMatrix:t[11],batchedPositionsDecodeMatrix:t[12],entityMeshIds:t[13],entityMatrices:t[14],entityUsesInstancing:t[15]}}function fNt(t){return{positions:new Uint16Array(br.inflate(t.positions).buffer),normals:new Int8Array(br.inflate(t.normals).buffer),indices:new Uint32Array(br.inflate(t.indices).buffer),edgeIndices:new Uint32Array(br.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(br.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(br.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(br.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(br.inflate(t.meshColors).buffer),entityIDs:br.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(br.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(br.inflate(t.entityIsObjects).buffer),instancedPositionsDecodeMatrix:new Float32Array(br.inflate(t.instancedPositionsDecodeMatrix).buffer),batchedPositionsDecodeMatrix:new Float32Array(br.inflate(t.batchedPositionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(br.inflate(t.entityMeshIds).buffer),entityMatrices:new Float32Array(br.inflate(t.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(br.inflate(t.entityUsesInstancing).buffer)}}const ANt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function gNt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.meshPositions,h=i.meshIndices,p=i.meshEdgesIndices,A=i.meshColors,f=JSON.parse(i.entityIDs),m=i.entityMeshes,g=i.entityIsObjects,y=i.entityMeshIds,v=i.entityMatrices,b=i.entityUsesInstancing,x=u.length,k=m.length,E={};for(let F=0;F<k;F++){const U=f[F],q=e.globalizeObjectIds?C.globalizeObjectId(o.id,U):U,V=t.metaScene.metaObjects[q],W={},Y={},$=v.subarray(F*16,F*16+16);if(V){if(e.excludeTypesMap&&V.type&&e.excludeTypesMap[V.type]||e.includeTypesMap&&V.type&&!e.includeTypesMap[V.type])continue;const Se=e.objectDefaults?e.objectDefaults[V.type]||e.objectDefaults.DEFAULT:null;Se&&(Se.visible===!1&&(W.visible=!1),Se.pickable===!1&&(W.pickable=!1),Se.colorize&&(Y.color=Se.colorize),Se.opacity!==void 0&&Se.opacity!==null&&(Y.opacity=Se.opacity))}else if(e.excludeUnclassifiedObjects)continue;const fe=F===k-1,Me=[];for(let Se=m[F],qe=fe?y.length:m[F+1];Se<qe;Se++){var B=y[Se];const Qe=B===x-1,Ce=`${a}.${q}.mesh.${B}`,Le=ANt(A.subarray(B*4,B*4+3)),Fe=A[B*4+3]/255;var P=s.subarray(u[B],Qe?s.length:u[B+1]),T=l.subarray(u[B],Qe?s.length:u[B+1]),S=c.subarray(h[B],Qe?c.length:h[B+1]),R=d.subarray(p[B],Qe?d.length:p[B+1]);if(b[F]===1){const ve=`${a}.geometry.${Ce}.${B}`;ve in E||(o.createGeometry({id:ve,positionsCompressed:P,normalsCompressed:T,indices:S,edgeIndices:R,primitive:"triangles",positionsDecodeMatrix:i.instancedPositionsDecodeMatrix}),E[ve]=!0),o.createMesh(mt.apply(Y,{id:Ce,color:Le,opacity:Fe,matrix:$,geometryId:ve})),Me.push(Ce)}else o.createMesh(mt.apply(Y,{id:Ce,primitive:"triangles",positionsCompressed:P,normalsCompressed:T,indices:S,edgeIndices:R,positionsDecodeMatrix:i.batchedPositionsDecodeMatrix,color:Le,opacity:Fe})),Me.push(Ce)}Me.length&&o.createEntity(mt.apply(W,{id:q,isObject:g[F]===1,meshIds:Me}))}}const bte={version:3,parse:function(t,e,i,o,r,n){const a=pNt(i),s=fNt(a);gNt(t,e,s,o,r,n)}};let Tr=window.pako||Es;Tr.inflate||(Tr=Tr.default);function mNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],decodeMatrices:t[4],matrices:t[5],eachPrimitivePositionsAndNormalsPortion:t[6],eachPrimitiveIndicesPortion:t[7],eachPrimitiveEdgeIndicesPortion:t[8],eachPrimitiveDecodeMatricesPortion:t[9],eachPrimitiveColor:t[10],primitiveInstances:t[11],eachEntityId:t[12],eachEntityPrimitiveInstancesPortion:t[13],eachEntityMatricesPortion:t[14],eachEntityMatrix:t[15]}}function vNt(t){return{positions:new Uint16Array(Tr.inflate(t.positions).buffer),normals:new Int8Array(Tr.inflate(t.normals).buffer),indices:new Uint32Array(Tr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(Tr.inflate(t.edgeIndices).buffer),decodeMatrices:new Float32Array(Tr.inflate(t.decodeMatrices).buffer),matrices:new Float32Array(Tr.inflate(t.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Tr.inflate(t.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Tr.inflate(t.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Tr.inflate(t.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveDecodeMatricesPortion:new Uint32Array(Tr.inflate(t.eachPrimitiveDecodeMatricesPortion).buffer),eachPrimitiveColor:new Uint8Array(Tr.inflate(t.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Tr.inflate(t.primitiveInstances).buffer),eachEntityId:Tr.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Tr.inflate(t.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Tr.inflate(t.eachEntityMatricesPortion).buffer)}}const yNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function bNt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.decodeMatrices,h=i.matrices,p=i.eachPrimitivePositionsAndNormalsPortion,A=i.eachPrimitiveIndicesPortion,f=i.eachPrimitiveEdgeIndicesPortion,m=i.eachPrimitiveDecodeMatricesPortion,g=i.eachPrimitiveColor,y=i.primitiveInstances,v=JSON.parse(i.eachEntityId),b=i.eachEntityPrimitiveInstancesPortion,x=i.eachEntityMatricesPortion,k=p.length,E=y.length,B=new Uint8Array(k),P=new Uint32Array(k),T=v.length;for(let F=0;F<k;F++)P[F]=F;P.sort((F,U)=>m[F]<m[U]?-1:m[F]>m[U]?1:0);for(let F=0;F<E;F++){const U=y[F];B[U]++}const S={};for(let F=0;F<T;F++){const U=T-1,q=F===U,V=b[F],W=q?b[U]:b[F+1];for(let Y=V;Y<W;Y++){const $=y[Y];B[$]>1||(S[$]=F)}}for(let F=0;F<k;F++){const U=P[F],q=U===k-1,V=B[U]>1,W=yNt(g.subarray(U*4,U*4+3)),Y=g[U*4+3]/255,$=s.subarray(p[U],q?s.length:p[U+1]),fe=l.subarray(p[U],q?l.length:p[U+1]),Me=c.subarray(A[U],q?c.length:A[U+1]),Se=d.subarray(f[U],q?d.length:f[U+1]),qe=u.subarray(m[U],m[U]+16);if(V){const Qe=`${a}-geometry.${U}`;o.createGeometry({id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:fe,indices:Me,edgeIndices:Se,positionsDecodeMatrix:qe})}else{const Qe=`${a}-${U}`,Ce=S[U];v[Ce];const Le={};o.createMesh(mt.apply(Le,{id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:fe,indices:Me,edgeIndices:Se,positionsDecodeMatrix:qe,color:W,opacity:Y}))}}let R=0;for(let F=0;F<T;F++){const U=T-1,q=F===U,V=v[F],W=b[F],Y=q?b[U]:b[F+1],$=[];for(let fe=W;fe<Y;fe++){const Me=y[fe];if(B[Me]>1){const Se={},qe=`${a}-instance.${R++}`,Qe=`${a}-geometry.${Me}`,Ce=x[F]*16,Le=h.subarray(Ce,Ce+16);o.createMesh(mt.apply(Se,{id:qe,geometryId:Qe,matrix:Le})),$.push(qe)}else $.push(Me)}if($.length>0){const fe={};o.createEntity(mt.apply(fe,{id:V,isObject:!0,meshIds:$}))}}}const wte={version:4,parse:function(t,e,i,o,r,n){const a=mNt(i),s=vNt(a);bNt(t,e,s,o,r,n)}};let pn=window.pako||Es;pn.inflate||(pn=pn.default);function wNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],matrices:t[4],eachPrimitivePositionsAndNormalsPortion:t[5],eachPrimitiveIndicesPortion:t[6],eachPrimitiveEdgeIndicesPortion:t[7],eachPrimitiveColor:t[8],primitiveInstances:t[9],eachEntityId:t[10],eachEntityPrimitiveInstancesPortion:t[11],eachEntityMatricesPortion:t[12]}}function CNt(t){return{positions:new Float32Array(pn.inflate(t.positions).buffer),normals:new Int8Array(pn.inflate(t.normals).buffer),indices:new Uint32Array(pn.inflate(t.indices).buffer),edgeIndices:new Uint32Array(pn.inflate(t.edgeIndices).buffer),matrices:new Float32Array(pn.inflate(t.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(pn.inflate(t.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(pn.inflate(t.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(pn.inflate(t.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(pn.inflate(t.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(pn.inflate(t.primitiveInstances).buffer),eachEntityId:pn.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(pn.inflate(t.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(pn.inflate(t.eachEntityMatricesPortion).buffer)}}const xNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function kNt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="disabled",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.matrices,h=i.eachPrimitivePositionsAndNormalsPortion,p=i.eachPrimitiveIndicesPortion,A=i.eachPrimitiveEdgeIndicesPortion,f=i.eachPrimitiveColor,m=i.primitiveInstances,g=JSON.parse(i.eachEntityId),y=i.eachEntityPrimitiveInstancesPortion,v=i.eachEntityMatricesPortion,b=h.length,x=m.length,k=new Uint8Array(b),E=g.length;for(let T=0;T<x;T++){const S=m[T];k[S]++}const B={};for(let T=0;T<E;T++){const S=E-1,R=T===S,F=y[T],U=R?y[S]:y[T+1];for(let q=F;q<U;q++){const V=m[q];k[V]>1||(B[V]=T)}}for(let T=0;T<b;T++){const S=T===b-1,R=k[T]>1,F=xNt(f.subarray(T*4,T*4+3)),U=f[T*4+3]/255,q=s.subarray(h[T],S?s.length:h[T+1]),V=l.subarray(h[T],S?l.length:h[T+1]),W=c.subarray(p[T],S?c.length:p[T+1]),Y=d.subarray(A[T],S?d.length:A[T+1]);if(R){const $=`${a}-geometry.${T}`;o.createGeometry({id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y})}else{const $=T,fe=B[T];g[fe];const Me={};o.createMesh(mt.apply(Me,{id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y,color:F,opacity:U}))}}let P=0;for(let T=0;T<E;T++){const S=E-1,R=T===S,F=g[T],U=y[T],q=R?y[S]:y[T+1],V=[];for(let W=U;W<q;W++){const Y=m[W];if(k[Y]>1){const $={},fe="instance."+P++,Me="geometry"+Y,Se=v[T]*16,qe=u.subarray(Se,Se+16);o.createMesh(mt.apply($,{id:fe,geometryId:Me,matrix:qe})),V.push(fe)}else V.push(Y)}if(V.length>0){const W={};o.createEntity(mt.apply(W,{id:F,isObject:!0,meshIds:V}))}}}const Cte={version:5,parse:function(t,e,i,o,r,n){const a=wNt(i),s=CNt(a);kNt(t,e,s,o,r,n)}};let W3=window.pako||Es;W3.inflate||(W3=W3.default);function MNt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],matrices:t[4],reusedPrimitivesDecodeMatrix:t[5],eachPrimitivePositionsAndNormalsPortion:t[6],eachPrimitiveIndicesPortion:t[7],eachPrimitiveEdgeIndicesPortion:t[8],eachPrimitiveColorAndOpacity:t[9],primitiveInstances:t[10],eachEntityId:t[11],eachEntityPrimitiveInstancesPortion:t[12],eachEntityMatricesPortion:t[13],eachTileAABB:t[14],eachTileEntitiesPortion:t[15]}}function ENt(t){function e(i,o){return i.length===0?[]:W3.inflate(i,o).buffer}return{positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(e(t.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(e(t.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(e(t.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(e(t.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(e(t.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(e(t.primitiveInstances)),eachEntityId:W3.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(e(t.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(e(t.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const BNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function PNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.matrices,h=i.reusedPrimitivesDecodeMatrix,p=i.eachPrimitivePositionsAndNormalsPortion,A=i.eachPrimitiveIndicesPortion,f=i.eachPrimitiveEdgeIndicesPortion,m=i.eachPrimitiveColorAndOpacity,g=i.primitiveInstances,y=JSON.parse(i.eachEntityId),v=i.eachEntityPrimitiveInstancesPortion,b=i.eachEntityMatricesPortion,x=i.eachTileAABB,k=i.eachTileEntitiesPortion,E=p.length,B=g.length,P=y.length,T=k.length,S=new Uint32Array(E);for(let U=0;U<B;U++){const q=g[U];S[q]!==void 0?S[q]++:S[q]=1}const R=C.vec3(),F=C.AABB3();for(let U=0;U<T;U++){const q=T-1,V=U===q,W=k[U],Y=V?P:k[U+1],$=U*6,fe=x.subarray($,$+6);C.getAABB3Center(fe,R),F[0]=fe[0]-R[0],F[1]=fe[1]-R[1],F[2]=fe[2]-R[2],F[3]=fe[3]-R[0],F[4]=fe[4]-R[1],F[5]=fe[5]-R[2];const Me=Jt.createPositionsDecodeMatrix(F),Se={};for(let qe=W;qe<Y;qe++){const Qe=y[qe],Ce=e.globalizeObjectIds?C.globalizeObjectId(o.id,Qe):Qe,Le=b[qe],Fe=u.slice(Le,Le+16),ve=P-1,me=qe===ve,we=v[qe],Re=me?g.length:v[qe+1],We=[],H=t.metaScene.metaObjects[Ce],ee={},ae={};if(H){if(e.excludeTypesMap&&H.type&&e.excludeTypesMap[H.type]||e.includeTypesMap&&H.type&&!e.includeTypesMap[H.type]||e.includeIdsMap&&H.id&&!e.includeIdsMap[H.id])continue;const Ee=e.objectDefaults?e.objectDefaults[H.type]||e.objectDefaults.DEFAULT:null;Ee&&(Ee.visible===!1&&(ee.visible=!1),Ee.pickable===!1&&(ee.pickable=!1),Ee.colorize&&(ae.color=Ee.colorize),Ee.opacity!==void 0&&Ee.opacity!==null&&(ae.opacity=Ee.opacity))}else if(e.excludeUnclassifiedObjects)continue;for(let Ee=we;Ee<Re;Ee++){const pe=g[Ee],Q=S[pe]>1,Z=pe===E-1,ie=s.subarray(p[pe],Z?s.length:p[pe+1]),re=l.subarray(p[pe],Z?l.length:p[pe+1]),ne=c.subarray(A[pe],Z?c.length:A[pe+1]),G=d.subarray(f[pe],Z?d.length:f[pe+1]),J=BNt(m.subarray(pe*4,pe*4+3)),ue=m[pe*4+3]/255,xe=n.getNextId();if(Q){const oe=`${a}-geometry.${U}.${pe}`;Se[oe]||(o.createGeometry({id:oe,primitive:"triangles",positionsCompressed:ie,indices:ne,edgeIndices:G,positionsDecodeMatrix:h}),Se[oe]=!0),o.createMesh(mt.apply(ae,{id:xe,geometryId:oe,origin:R,matrix:Fe,color:J,opacity:ue})),We.push(xe)}else o.createMesh(mt.apply(ae,{id:xe,origin:R,primitive:"triangles",positionsCompressed:ie,normalsCompressed:re,indices:ne,edgeIndices:G,positionsDecodeMatrix:Me,color:J,opacity:ue})),We.push(xe)}We.length>0&&o.createEntity(mt.apply(ee,{id:Ce,isObject:!0,meshIds:We}))}}}const xte={version:6,parse:function(t,e,i,o,r,n){const a=MNt(i),s=ENt(a);PNt(t,e,s,o,r,n)}};let Y3=window.pako||Es;Y3.inflate||(Y3=Y3.default);function INt(t){return{positions:t[0],normals:t[1],colors:t[2],indices:t[3],edgeIndices:t[4],matrices:t[5],reusedGeometriesDecodeMatrix:t[6],eachGeometryPrimitiveType:t[7],eachGeometryPositionsPortion:t[8],eachGeometryNormalsPortion:t[9],eachGeometryColorsPortion:t[10],eachGeometryIndicesPortion:t[11],eachGeometryEdgeIndicesPortion:t[12],eachMeshGeometriesPortion:t[13],eachMeshMatricesPortion:t[14],eachMeshMaterial:t[15],eachEntityId:t[16],eachEntityMeshesPortion:t[17],eachTileAABB:t[18],eachTileEntitiesPortion:t[19]}}function SNt(t){function e(i,o){return i.length===0?[]:Y3.inflate(i,o).buffer}return{positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityId:Y3.inflate(t.eachEntityId,{to:"string"}),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const TNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function kte(t){const e=[];for(let i=0,o=t.length;i<o;i+=3)e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]),e.push(1);return e}function DNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.positions,l=i.normals,c=i.colors,d=i.indices,u=i.edgeIndices,h=i.matrices,p=i.reusedGeometriesDecodeMatrix,A=i.eachGeometryPrimitiveType,f=i.eachGeometryPositionsPortion,m=i.eachGeometryNormalsPortion,g=i.eachGeometryColorsPortion,y=i.eachGeometryIndicesPortion,v=i.eachGeometryEdgeIndicesPortion,b=i.eachMeshGeometriesPortion,x=i.eachMeshMatricesPortion,k=i.eachMeshMaterial,E=JSON.parse(i.eachEntityId),B=i.eachEntityMeshesPortion,P=i.eachTileAABB,T=i.eachTileEntitiesPortion,S=f.length,R=b.length,F=E.length,U=T.length,q=new Uint32Array(S);for(let Y=0;Y<R;Y++){const $=b[Y];q[$]!==void 0?q[$]++:q[$]=1}const V=C.vec3(),W=C.AABB3();for(let Y=0;Y<U;Y++){const $=U-1,fe=Y===$,Me=T[Y],Se=fe?F:T[Y+1],qe=Y*6,Qe=P.subarray(qe,qe+6);C.getAABB3Center(Qe,V),W[0]=Qe[0]-V[0],W[1]=Qe[1]-V[1],W[2]=Qe[2]-V[2],W[3]=Qe[3]-V[0],W[4]=Qe[4]-V[1],W[5]=Qe[5]-V[2];const Ce=Jt.createPositionsDecodeMatrix(W),Le={};for(let Fe=Me;Fe<Se;Fe++){const ve=E[Fe],me=e.globalizeObjectIds?C.globalizeObjectId(o.id,ve):ve,we=F-1,Re=Fe===we,We=B[Fe],H=Re?b.length:B[Fe+1],ee=[],ae=t.metaScene.metaObjects[me],Ee={},pe={};if(ae){if(e.excludeTypesMap&&ae.type&&e.excludeTypesMap[ae.type]||e.includeTypesMap&&ae.type&&!e.includeTypesMap[ae.type]||e.includeIdsMap&&ae.id&&!e.includeIdsMap[ae.id])continue;const Q=e.objectDefaults?e.objectDefaults[ae.type]||e.objectDefaults.DEFAULT:null;Q&&(Q.visible===!1&&(Ee.visible=!1),Q.pickable===!1&&(Ee.pickable=!1),Q.colorize&&(pe.color=Q.colorize),Q.opacity!==void 0&&Q.opacity!==null&&(pe.opacity=Q.opacity),Q.metallic!==void 0&&Q.metallic!==null&&(pe.metallic=Q.metallic),Q.roughness!==void 0&&Q.roughness!==null&&(pe.roughness=Q.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let Q=We;Q<H;Q++){const Z=b[Q],ie=q[Z]>1,re=Z===S-1,ne=TNt(k.subarray(Q*6,Q*6+3)),G=k[Q*6+3]/255,J=k[Q*6+4]/255,ue=k[Q*6+5]/255,xe=n.getNextId();if(ie){const oe=x[Q],Be=h.slice(oe,oe+16),je=`${a}-geometry.${Y}.${Z}`;if(!Le[je]){const he=A[Z];let Ne,Pe,He,rt,At,ft;switch(he){case 0:Ne="solid",Pe=s.subarray(f[Z],re?s.length:f[Z+1]),He=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Ne="surface",Pe=s.subarray(f[Z],re?s.length:f[Z+1]),He=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Ne="points",Pe=s.subarray(f[Z],re?s.length:f[Z+1]),rt=kte(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Ne="lines",Pe=s.subarray(f[Z],re?s.length:f[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createGeometry({id:je,primitive:Ne,positionsCompressed:Pe,normalsCompressed:He,colors:rt,indices:At,edgeIndices:ft,positionsDecodeMatrix:p}),Le[je]=!0}o.createMesh(mt.apply(pe,{id:xe,geometryId:je,origin:V,matrix:Be,color:ne,metallic:J,roughness:ue,opacity:G})),ee.push(xe)}else{const oe=A[Z];let Be,je,he,Ne,Pe,He;switch(oe){case 0:Be="solid",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Pe=d.subarray(y[Z],re?d.length:y[Z+1]),He=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Be="surface",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Pe=d.subarray(y[Z],re?d.length:y[Z+1]),He=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Be="points",je=s.subarray(f[Z],re?s.length:f[Z+1]),Ne=kte(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Be="lines",je=s.subarray(f[Z],re?s.length:f[Z+1]),Pe=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createMesh(mt.apply(pe,{id:xe,origin:V,primitive:Be,positionsCompressed:je,normalsCompressed:he,colors:Ne,indices:Pe,edgeIndices:He,positionsDecodeMatrix:Ce,color:ne,metallic:J,roughness:ue,opacity:G})),ee.push(xe)}}ee.length>0&&o.createEntity(mt.apply(Ee,{id:me,isObject:!0,meshIds:ee}))}}}const Mte={version:7,parse:function(t,e,i,o,r,n){const a=INt(i),s=SNt(a);DNt(t,e,s,o,r,n)}};let Bh=window.pako||Es;Bh.inflate||(Bh=Bh.default);const xc=C.vec4(),Ete=C.vec4();function RNt(t){return{types:t[0],eachMetaObjectId:t[1],eachMetaObjectType:t[2],eachMetaObjectName:t[3],eachMetaObjectParent:t[4],positions:t[5],normals:t[6],colors:t[7],indices:t[8],edgeIndices:t[9],matrices:t[10],reusedGeometriesDecodeMatrix:t[11],eachGeometryPrimitiveType:t[12],eachGeometryPositionsPortion:t[13],eachGeometryNormalsPortion:t[14],eachGeometryColorsPortion:t[15],eachGeometryIndicesPortion:t[16],eachGeometryEdgeIndicesPortion:t[17],eachMeshGeometriesPortion:t[18],eachMeshMatricesPortion:t[19],eachMeshMaterial:t[20],eachEntityMetaObject:t[21],eachEntityMeshesPortion:t[22],eachTileAABB:t[23],eachTileEntitiesPortion:t[24]}}function LNt(t){function e(i,o){return i.length===0?[]:Bh.inflate(i,o).buffer}return{types:Bh.inflate(t.types,{to:"string"}),eachMetaObjectId:Bh.inflate(t.eachMetaObjectId,{to:"string"}),eachMetaObjectType:new Uint32Array(e(t.eachMetaObjectType)),eachMetaObjectName:Bh.inflate(t.eachMetaObjectName,{to:"string"}),eachMetaObjectParent:new Uint32Array(e(t.eachMetaObjectParent)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityMetaObject:new Uint32Array(e(t.eachEntityMetaObject)),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const _Nt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function Bte(t){const e=[];for(let i=0,o=t.length;i<o;i+=3)e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]),e.push(1);return e}function FNt(t,e,i,o,r,n){const a=n.getNextId(),s=JSON.parse(i.types),l=JSON.parse(i.eachMetaObjectId),c=i.eachMetaObjectType,d=JSON.parse(i.eachMetaObjectName),u=i.eachMetaObjectParent,h=i.positions,p=i.normals,A=i.colors,f=i.indices,m=i.edgeIndices,g=i.matrices,y=i.reusedGeometriesDecodeMatrix,v=i.eachGeometryPrimitiveType,b=i.eachGeometryPositionsPortion,x=i.eachGeometryNormalsPortion,k=i.eachGeometryColorsPortion,E=i.eachGeometryIndicesPortion,B=i.eachGeometryEdgeIndicesPortion,P=i.eachMeshGeometriesPortion,T=i.eachMeshMatricesPortion,S=i.eachMeshMaterial,R=i.eachEntityMetaObject,F=i.eachEntityMeshesPortion,U=i.eachTileAABB,q=i.eachTileEntitiesPortion,V=l.length,W=b.length,Y=P.length,$=R.length,fe=q.length;if(r){const Ce={metaObjects:[]};for(let Le=0;Le<V;Le++){const Fe=l[Le],ve=c[Le],me=s[ve]||"default",we=d[Le],Re=u[Le],We=Re!==Le?l[Re]:null;Ce.metaObjects.push({id:Fe,type:me,name:we,parent:We})}r.loadData(Ce,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds})}const Me=new Uint32Array(W);for(let Ce=0;Ce<Y;Ce++){const Le=P[Ce];Me[Le]!==void 0?Me[Le]++:Me[Le]=1}const Se=C.vec3(),qe=C.AABB3(),Qe={};for(let Ce=0;Ce<fe;Ce++){const Le=fe-1,Fe=Ce===Le,ve=q[Ce],me=Fe?$:q[Ce+1],we=Ce*6,Re=U.subarray(we,we+6);C.getAABB3Center(Re,Se),qe[0]=Re[0]-Se[0],qe[1]=Re[1]-Se[1],qe[2]=Re[2]-Se[2],qe[3]=Re[3]-Se[0],qe[4]=Re[4]-Se[1],qe[5]=Re[5]-Se[2];const We=Jt.createPositionsDecodeMatrix(qe),H={};for(let ee=ve;ee<me;ee++){const ae=R[ee],Ee=l[ae],pe=e.globalizeObjectIds?C.globalizeObjectId(o.id,Ee):Ee,Q=$-1,Z=ee===Q,ie=F[ee],re=Z?P.length:F[ee+1],ne=[],G=t.metaScene.metaObjects[pe],J={},ue={};if(G){if(e.excludeTypesMap&&G.type&&e.excludeTypesMap[G.type]||e.includeTypesMap&&G.type&&!e.includeTypesMap[G.type]||e.includeIdsMap&&G.id&&!e.includeIdsMap[G.id])continue;const xe=e.objectDefaults?e.objectDefaults[G.type]||e.objectDefaults.DEFAULT:null;xe&&(xe.visible===!1&&(J.visible=!1),xe.pickable===!1&&(J.pickable=!1),xe.colorize&&(ue.color=xe.colorize),xe.opacity!==void 0&&xe.opacity!==null&&(ue.opacity=xe.opacity),xe.metallic!==void 0&&xe.metallic!==null&&(ue.metallic=xe.metallic),xe.roughness!==void 0&&xe.roughness!==null&&(ue.roughness=xe.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let xe=ie;xe<re;xe++){const oe=P[xe],Be=Me[oe]>1,je=oe===W-1,he=_Nt(S.subarray(xe*6,xe*6+3)),Ne=S[xe*6+3]/255,Pe=S[xe*6+4]/255,He=S[xe*6+5]/255,rt=n.getNextId();if(Be){const At=T[xe],ft=g.slice(At,At+16),ct=`${a}-geometry.${Ce}.${oe}`;let ut=Qe[ct];if(!ut){ut={batchThisMesh:!e.reuseGeometries};const Te=v[oe];let st=!1;switch(Te){case 0:ut.primitiveName="solid",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),ut.geometryEdgeIndices=m.subarray(B[oe],je?m.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 1:ut.primitiveName="surface",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),ut.geometryEdgeIndices=m.subarray(B[oe],je?m.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 2:ut.primitiveName="points",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryColors=Bte(A.subarray(k[oe],je?A.length:k[oe+1])),st=ut.geometryPositions.length>0;break;case 3:ut.primitiveName="lines",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;default:continue}if(st||(ut=null),ut&&(ut.geometryPositions.length>1e3,ut.batchThisMesh)){ut.decompressedPositions=new Float32Array(ut.geometryPositions.length);const dt=ut.geometryPositions,Ye=ut.decompressedPositions;for(let Ae=0,be=dt.length;Ae<be;Ae+=3)Ye[Ae+0]=dt[Ae+0]*y[0]+y[12],Ye[Ae+1]=dt[Ae+1]*y[5]+y[13],Ye[Ae+2]=dt[Ae+2]*y[10]+y[14];ut.geometryPositions=null,Qe[ct]=ut}}if(ut)if(ut.batchThisMesh){const Te=ut.decompressedPositions,st=new Uint16Array(Te.length);for(let dt=0,Ye=Te.length;dt<Ye;dt+=3)xc[0]=Te[dt+0],xc[1]=Te[dt+1],xc[2]=Te[dt+2],xc[3]=1,C.transformVec4(ft,xc,Ete),Jt.compressPosition(Ete,qe,xc),st[dt+0]=xc[0],st[dt+1]=xc[1],st[dt+2]=xc[2];o.createMesh(mt.apply(ue,{id:rt,origin:Se,primitive:ut.primitiveName,positionsCompressed:st,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:We,color:he,metallic:Pe,roughness:He,opacity:Ne})),ne.push(rt)}else H[ct]||(o.createGeometry({id:ct,primitive:ut.primitiveName,positionsCompressed:ut.geometryPositions,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:y}),H[ct]=!0),o.createMesh(mt.apply(ue,{id:rt,geometryId:ct,origin:Se,matrix:ft,color:he,metallic:Pe,roughness:He,opacity:Ne})),ne.push(rt)}else{const At=v[oe];let ft,ct,ut,Te,st,dt,Ye=!1;switch(At){case 0:ft="solid",ct=h.subarray(b[oe],je?h.length:b[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),dt=m.subarray(B[oe],je?m.length:B[oe+1]),Ye=ct.length>0&&st.length>0;break;case 1:ft="surface",ct=h.subarray(b[oe],je?h.length:b[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),dt=m.subarray(B[oe],je?m.length:B[oe+1]),Ye=ct.length>0&&st.length>0;break;case 2:ft="points",ct=h.subarray(b[oe],je?h.length:b[oe+1]),Te=Bte(A.subarray(k[oe],je?A.length:k[oe+1])),Ye=ct.length>0;break;case 3:ft="lines",ct=h.subarray(b[oe],je?h.length:b[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),Ye=ct.length>0&&st.length>0;break;default:continue}Ye&&(o.createMesh(mt.apply(ue,{id:rt,origin:Se,primitive:ft,positionsCompressed:ct,normalsCompressed:ut,colorsCompressed:Te,indices:st,edgeIndices:dt,positionsDecodeMatrix:We,color:he,metallic:Pe,roughness:He,opacity:Ne})),ne.push(rt))}}ne.length>0&&o.createEntity(mt.apply(J,{id:pe,isObject:!0,meshIds:ne}))}}}const Pte={version:8,parse:function(t,e,i,o,r,n){const a=RNt(i),s=LNt(a);FNt(t,e,s,o,r,n)}};let Y1=window.pako||Es;Y1.inflate||(Y1=Y1.default);const kc=C.vec4(),Ite=C.vec4();function ONt(t){return{metadata:t[0],positions:t[1],normals:t[2],colors:t[3],indices:t[4],edgeIndices:t[5],matrices:t[6],reusedGeometriesDecodeMatrix:t[7],eachGeometryPrimitiveType:t[8],eachGeometryPositionsPortion:t[9],eachGeometryNormalsPortion:t[10],eachGeometryColorsPortion:t[11],eachGeometryIndicesPortion:t[12],eachGeometryEdgeIndicesPortion:t[13],eachMeshGeometriesPortion:t[14],eachMeshMatricesPortion:t[15],eachMeshMaterial:t[16],eachEntityId:t[17],eachEntityMeshesPortion:t[18],eachTileAABB:t[19],eachTileEntitiesPortion:t[20]}}function UNt(t){function e(i,o){return i.length===0?[]:Y1.inflate(i,o).buffer}return{metadata:JSON.parse(Y1.inflate(t.metadata,{to:"string"})),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityId:JSON.parse(Y1.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const NNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function jNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.positions,c=i.normals,d=i.colors,u=i.indices,h=i.edgeIndices,p=i.matrices,A=i.reusedGeometriesDecodeMatrix,f=i.eachGeometryPrimitiveType,m=i.eachGeometryPositionsPortion,g=i.eachGeometryNormalsPortion,y=i.eachGeometryColorsPortion,v=i.eachGeometryIndicesPortion,b=i.eachGeometryEdgeIndicesPortion,x=i.eachMeshGeometriesPortion,k=i.eachMeshMatricesPortion,E=i.eachMeshMaterial,B=i.eachEntityId,P=i.eachEntityMeshesPortion,T=i.eachTileAABB,S=i.eachTileEntitiesPortion,R=m.length,F=x.length,U=P.length,q=S.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});const V=new Uint32Array(R);for(let fe=0;fe<F;fe++){const Me=x[fe];V[Me]!==void 0?V[Me]++:V[Me]=1}const W=C.vec3(),Y=C.AABB3(),$={};for(let fe=0;fe<q;fe++){const Me=q-1,Se=fe===Me,qe=S[fe],Qe=Se?U-1:S[fe+1]-1,Ce=fe*6,Le=T.subarray(Ce,Ce+6);C.getAABB3Center(Le,W),Y[0]=Le[0]-W[0],Y[1]=Le[1]-W[1],Y[2]=Le[2]-W[2],Y[3]=Le[3]-W[0],Y[4]=Le[4]-W[1],Y[5]=Le[5]-W[2];const Fe=Jt.createPositionsDecodeMatrix(Y),ve={};for(let me=qe;me<=Qe;me++){const we=B[me],Re=e.globalizeObjectIds?C.globalizeObjectId(o.id,we):we,We=U-1,H=me===We,ee=P[me],ae=H?x.length-1:P[me+1]-1,Ee=[],pe=t.metaScene.metaObjects[Re],Q={},Z={};if(!(e.includeIdsMap&&we&&!e.includeIdsMap[we])){if(pe){if(e.excludeTypesMap&&pe.type&&e.excludeTypesMap[pe.type]||e.includeTypesMap&&pe.type&&!e.includeTypesMap[pe.type]||e.includeIdsMap&&pe.id&&!e.includeIdsMap[pe.id])continue;const ie=e.objectDefaults?e.objectDefaults[pe.type]||e.objectDefaults.DEFAULT:null;ie&&(ie.visible===!1&&(Q.visible=!1),ie.pickable===!1&&(Q.pickable=!1),ie.colorize&&(Z.color=ie.colorize),ie.opacity!==void 0&&ie.opacity!==null&&(Z.opacity=ie.opacity),ie.metallic!==void 0&&ie.metallic!==null&&(Z.metallic=ie.metallic),ie.roughness!==void 0&&ie.roughness!==null&&(Z.roughness=ie.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let ie=ee;ie<=ae;ie++){const re=x[ie],ne=V[re]>1,G=re===R-1,J=NNt(E.subarray(ie*6,ie*6+3)),ue=E[ie*6+3]/255,xe=E[ie*6+4]/255,oe=E[ie*6+5]/255,Be=n.getNextId();if(ne){const je=k[ie],he=p.slice(je,je+16),Ne=`${a}-geometry.${fe}.${re}`;let Pe=$[Ne];if(!Pe){Pe={batchThisMesh:!e.reuseGeometries};const He=f[re];let rt=!1;switch(He){case 0:Pe.primitiveName="solid",Pe.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Pe.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Pe.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Pe.geometryEdgeIndices=h.subarray(b[re],G?h.length:b[re+1]),rt=Pe.geometryPositions.length>0&&Pe.geometryIndices.length>0;break;case 1:Pe.primitiveName="surface",Pe.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Pe.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Pe.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Pe.geometryEdgeIndices=h.subarray(b[re],G?h.length:b[re+1]),rt=Pe.geometryPositions.length>0&&Pe.geometryIndices.length>0;break;case 2:Pe.primitiveName="points",Pe.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Pe.geometryColors=d.subarray(y[re],G?d.length:y[re+1]),rt=Pe.geometryPositions.length>0;break;case 3:Pe.primitiveName="lines",Pe.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Pe.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),rt=Pe.geometryPositions.length>0&&Pe.geometryIndices.length>0;break;default:continue}if(rt||(Pe=null),Pe&&(Pe.geometryPositions.length>1e3,Pe.batchThisMesh)){Pe.decompressedPositions=new Float32Array(Pe.geometryPositions.length),Pe.transformedAndRecompressedPositions=new Uint16Array(Pe.geometryPositions.length);const At=Pe.geometryPositions,ft=Pe.decompressedPositions;for(let ct=0,ut=At.length;ct<ut;ct+=3)ft[ct+0]=At[ct+0]*A[0]+A[12],ft[ct+1]=At[ct+1]*A[5]+A[13],ft[ct+2]=At[ct+2]*A[10]+A[14];Pe.geometryPositions=null,$[Ne]=Pe}}if(Pe)if(Pe.batchThisMesh){const He=Pe.decompressedPositions,rt=Pe.transformedAndRecompressedPositions;for(let At=0,ft=He.length;At<ft;At+=3)kc[0]=He[At+0],kc[1]=He[At+1],kc[2]=He[At+2],kc[3]=1,C.transformVec4(he,kc,Ite),Jt.compressPosition(Ite,Y,kc),rt[At+0]=kc[0],rt[At+1]=kc[1],rt[At+2]=kc[2];o.createMesh(mt.apply(Z,{id:Be,origin:W,primitive:Pe.primitiveName,positionsCompressed:rt,normalsCompressed:Pe.geometryNormals,colorsCompressed:Pe.geometryColors,indices:Pe.geometryIndices,edgeIndices:Pe.geometryEdgeIndices,positionsDecodeMatrix:Fe,color:J,metallic:xe,roughness:oe,opacity:ue})),Ee.push(Be)}else ve[Ne]||(o.createGeometry({id:Ne,primitive:Pe.primitiveName,positionsCompressed:Pe.geometryPositions,normalsCompressed:Pe.geometryNormals,colorsCompressed:Pe.geometryColors,indices:Pe.geometryIndices,edgeIndices:Pe.geometryEdgeIndices,positionsDecodeMatrix:A}),ve[Ne]=!0),o.createMesh(mt.apply(Z,{id:Be,geometryId:Ne,origin:W,matrix:he,color:J,metallic:xe,roughness:oe,opacity:ue})),Ee.push(Be)}else{const je=f[re];let he,Ne,Pe,He,rt,At,ft=!1;switch(je){case 0:he="solid",Ne=l.subarray(m[re],G?l.length:m[re+1]),Pe=c.subarray(g[re],G?c.length:g[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(b[re],G?h.length:b[re+1]),ft=Ne.length>0&&rt.length>0;break;case 1:he="surface",Ne=l.subarray(m[re],G?l.length:m[re+1]),Pe=c.subarray(g[re],G?c.length:g[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(b[re],G?h.length:b[re+1]),ft=Ne.length>0&&rt.length>0;break;case 2:he="points",Ne=l.subarray(m[re],G?l.length:m[re+1]),He=d.subarray(y[re],G?d.length:y[re+1]),ft=Ne.length>0;break;case 3:he="lines",Ne=l.subarray(m[re],G?l.length:m[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),ft=Ne.length>0&&rt.length>0;break;default:continue}ft&&(o.createMesh(mt.apply(Z,{id:Be,origin:W,primitive:he,positionsCompressed:Ne,normalsCompressed:Pe,colorsCompressed:He,indices:rt,edgeIndices:At,positionsDecodeMatrix:Fe,color:J,metallic:xe,roughness:oe,opacity:ue})),Ee.push(Be))}}Ee.length>0&&o.createEntity(mt.apply(Q,{id:Re,isObject:!0,meshIds:Ee}))}}}}const Ste={version:9,parse:function(t,e,i,o,r,n){const a=ONt(i),s=UNt(a);jNt(t,e,s,o,r,n)}};let X1=window.pako||Es;X1.inflate||(X1=X1.default);const Mc=C.vec4(),Tte=C.vec4(),VNt=9;function zNt(t){let e=0;return{metadata:t[e++],textureData:t[e++],eachTextureDataPortion:t[e++],eachTextureAttributes:t[e++],positions:t[e++],normals:t[e++],colors:t[e++],uvs:t[e++],indices:t[e++],edgeIndices:t[e++],eachTextureSetTextures:t[e++],matrices:t[e++],reusedGeometriesDecodeMatrix:t[e++],eachGeometryPrimitiveType:t[e++],eachGeometryPositionsPortion:t[e++],eachGeometryNormalsPortion:t[e++],eachGeometryColorsPortion:t[e++],eachGeometryUVsPortion:t[e++],eachGeometryIndicesPortion:t[e++],eachGeometryEdgeIndicesPortion:t[e++],eachMeshGeometriesPortion:t[e++],eachMeshMatricesPortion:t[e++],eachMeshTextureSet:t[e++],eachMeshMaterialAttributes:t[e++],eachEntityId:t[e++],eachEntityMeshesPortion:t[e++],eachTileAABB:t[e++],eachTileEntitiesPortion:t[e++]}}function HNt(t){function e(i,o){return i.length===0?[]:X1.inflate(i,o).buffer}return{metadata:JSON.parse(X1.inflate(t.metadata,{to:"string"})),textureData:new Uint8Array(e(t.textureData)),eachTextureDataPortion:new Uint32Array(e(t.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(t.eachTextureAttributes)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),uvs:new Float32Array(e(t.uvs)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),eachTextureSetTextures:new Int32Array(e(t.eachTextureSetTextures)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(t.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(t.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(t.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(X1.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const qNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function QNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryPositionsPortion,k=i.eachGeometryNormalsPortion,E=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,T=i.eachGeometryEdgeIndicesPortion,S=i.eachMeshGeometriesPortion,R=i.eachMeshMatricesPortion,F=i.eachMeshTextureSet,U=i.eachMeshMaterialAttributes,q=i.eachEntityId,V=i.eachEntityMeshesPortion,W=i.eachTileAABB,Y=i.eachTileEntitiesPortion,$=c.length,fe=g.length/5,Me=x.length,Se=S.length,qe=V.length,Qe=Y.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let me=0;me<$;me++){const we=me===$-1,Re=c[me],We=we?l.length:c[me+1],H=We-Re>0,ee=me*VNt,ae=d[ee+0]===1,Ee=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Re,We)).buffer,G=`${a}-texture-${me}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const J=Ee===E7?"image/jpeg":Ee===B7?"image/png":"image/gif",ue=new Blob([ne],{type:J}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let me=0;me<fe;me++){const we=me*5,Re=`${a}-textureSet-${me}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Ee=g[we+4];o.createTextureSet({id:Re,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Ee>=0?`${a}-texture-${Ee}`:null})}const Ce=new Uint32Array(Me);for(let me=0;me<Se;me++){const we=S[me];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const Le=C.vec3(),Fe=C.AABB3(),ve={};for(let me=0;me<Qe;me++){const we=Qe-1,Re=me===we,We=Y[me],H=Re?qe-1:Y[me+1]-1,ee=me*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,Le),Fe[0]=ae[0]-Le[0],Fe[1]=ae[1]-Le[1],Fe[2]=ae[2]-Le[2],Fe[3]=ae[3]-Le[0],Fe[4]=ae[4]-Le[1],Fe[5]=ae[5]-Le[2];const Ee=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],J=ne?S.length-1:V[Q+1]-1,ue=[],xe=t.metaScene.metaObjects[ie],oe={},Be={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Be.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Be.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Be.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Be.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=J;je++){const he=S[je],Ne=Ce[he]>1,Pe=he===Me-1,He=F[je],rt=He>=0?`${a}-textureSet-${He}`:null,At=qNt(U.subarray(je*6,je*6+3)),ft=U[je*6+3]/255,ct=U[je*6+4]/255,ut=U[je*6+5]/255,Te=n.getNextId();if(Ne){const st=R[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${me}.${he}`;let Ae=ve[Ye];if(!Ae){Ae={batchThisMesh:!e.reuseGeometries};const be=b[he];let $e=!1;switch(be){case 0:Ae.primitiveName="solid",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryNormals=h.subarray(k[he],Pe?h.length:k[he+1]),Ae.geometryUVs=A.subarray(B[he],Pe?A.length:B[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),Ae.geometryEdgeIndices=m.subarray(T[he],Pe?m.length:T[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 1:Ae.primitiveName="surface",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryNormals=h.subarray(k[he],Pe?h.length:k[he+1]),Ae.geometryUVs=A.subarray(B[he],Pe?A.length:B[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),Ae.geometryEdgeIndices=m.subarray(T[he],Pe?m.length:T[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 2:Ae.primitiveName="points",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryColors=p.subarray(E[he],Pe?p.length:E[he+1]),$e=Ae.geometryPositions.length>0;break;case 3:Ae.primitiveName="lines",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 4:Ae.primitiveName="lines",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryIndices=Dte(Ae.geometryPositions,f.subarray(P[he],Pe?f.length:P[he+1])),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;default:continue}if($e||(Ae=null),Ae&&(Ae.geometryPositions.length>1e3,Ae.batchThisMesh)){Ae.decompressedPositions=new Float32Array(Ae.geometryPositions.length),Ae.transformedAndRecompressedPositions=new Uint16Array(Ae.geometryPositions.length);const ht=Ae.geometryPositions,St=Ae.decompressedPositions;for(let xt=0,yi=ht.length;xt<yi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];Ae.geometryPositions=null,ve[Ye]=Ae}}if(Ae)if(Ae.batchThisMesh){const be=Ae.decompressedPositions,$e=Ae.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)Mc[0]=be[ht+0],Mc[1]=be[ht+1],Mc[2]=be[ht+2],Mc[3]=1,C.transformVec4(dt,Mc,Tte),Jt.compressPosition(Tte,Fe,Mc),$e[ht+0]=Mc[0],$e[ht+1]=Mc[1],$e[ht+2]=Mc[2];o.createMesh(mt.apply(Be,{id:Te,textureSetId:rt,origin:Le,primitive:Ae.primitiveName,positionsCompressed:$e,normalsCompressed:Ae.geometryNormals,uv:Ae.geometryUVs,colorsCompressed:Ae.geometryColors,indices:Ae.geometryIndices,edgeIndices:Ae.geometryEdgeIndices,positionsDecodeMatrix:Ee,color:At,metallic:ct,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:Ae.primitiveName,positionsCompressed:Ae.geometryPositions,normalsCompressed:Ae.geometryNormals,uv:Ae.geometryUVs,colorsCompressed:Ae.geometryColors,indices:Ae.geometryIndices,edgeIndices:Ae.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Be,{id:Te,geometryId:Ye,textureSetId:rt,matrix:dt,color:At,metallic:ct,roughness:ut,opacity:ft,origin:Le})),ue.push(Te)}else{const st=b[he];let dt,Ye,Ae,be,$e,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),Ae=h.subarray(k[he],Pe?h.length:k[he+1]),be=A.subarray(B[he],Pe?A.length:B[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),St=m.subarray(T[he],Pe?m.length:T[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),Ae=h.subarray(k[he],Pe?h.length:k[he+1]),be=A.subarray(B[he],Pe?A.length:B[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),St=m.subarray(T[he],Pe?m.length:T[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),$e=p.subarray(E[he],Pe?p.length:E[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),ht=Dte(Ye,f.subarray(P[he],Pe?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Be,{id:Te,textureSetId:rt,origin:Le,primitive:dt,positionsCompressed:Ye,normalsCompressed:Ae,uv:be&&be.length>0?be:null,colorsCompressed:$e,indices:ht,edgeIndices:St,positionsDecodeMatrix:Ee,color:At,metallic:ct,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function Dte(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const Rte={version:10,parse:function(t,e,i,o,r,n){const a=zNt(i),s=HNt(a);QNt(t,e,s,o,r,n)}},Ec=C.vec4(),Lte=C.vec4(),GNt=9;function KNt(t){const e=(function(){const r=new ArrayBuffer(2);return new Uint16Array(r)[0]=1,new Uint8Array(r)[0]!==1})(),i=(function(){let r=0;const n=new DataView(t);return function(a){const s=1+2*r++,l=n.getUint32(s*4,!0),c=n.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(t,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(t,l,c/d)}})(),o=(function(){const r=new TextDecoder;return()=>JSON.parse(r.decode(i(Uint8Array)))})();return{metadata:o(),textureData:i(Uint8Array),eachTextureDataPortion:i(Uint32Array),eachTextureAttributes:i(Uint16Array),positions:i(Uint16Array),normals:i(Int8Array),colors:i(Uint8Array),uvs:i(Float32Array),indices:i(Uint32Array),edgeIndices:i(Uint32Array),eachTextureSetTextures:i(Int32Array),matrices:i(Float32Array),reusedGeometriesDecodeMatrix:i(Float32Array),eachGeometryPrimitiveType:i(Uint8Array),eachGeometryPositionsPortion:i(Uint32Array),eachGeometryNormalsPortion:i(Uint32Array),eachGeometryColorsPortion:i(Uint32Array),eachGeometryUVsPortion:i(Uint32Array),eachGeometryIndicesPortion:i(Uint32Array),eachGeometryEdgeIndicesPortion:i(Uint32Array),eachMeshGeometriesPortion:i(Uint32Array),eachMeshMatricesPortion:i(Uint32Array),eachMeshTextureSet:i(Int32Array),eachMeshMaterialAttributes:i(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:i(Uint32Array),eachTileAABB:i(Float64Array),eachTileEntitiesPortion:i(Uint32Array)}}const JNt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function ZNt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryPositionsPortion,k=i.eachGeometryNormalsPortion,E=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,T=i.eachGeometryEdgeIndicesPortion,S=i.eachMeshGeometriesPortion,R=i.eachMeshMatricesPortion,F=i.eachMeshTextureSet,U=i.eachMeshMaterialAttributes,q=i.eachEntityId,V=i.eachEntityMeshesPortion,W=i.eachTileAABB,Y=i.eachTileEntitiesPortion,$=c.length,fe=g.length/5,Me=x.length,Se=S.length,qe=V.length,Qe=Y.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let me=0;me<$;me++){const we=me===$-1,Re=c[me],We=we?l.length:c[me+1],H=We-Re>0,ee=me*GNt,ae=d[ee+0]===1,Ee=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Re,We)).buffer,G=`${a}-texture-${me}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const J=Ee===E7?"image/jpeg":Ee===B7?"image/png":"image/gif",ue=new Blob([ne],{type:J}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let me=0;me<fe;me++){const we=me*5,Re=`${a}-textureSet-${me}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Ee=g[we+4];o.createTextureSet({id:Re,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Ee>=0?`${a}-texture-${Ee}`:null})}const Ce=new Uint32Array(Me);for(let me=0;me<Se;me++){const we=S[me];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const Le=C.vec3(),Fe=C.AABB3(),ve={};for(let me=0;me<Qe;me++){const we=Qe-1,Re=me===we,We=Y[me],H=Re?qe-1:Y[me+1]-1,ee=me*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,Le),Fe[0]=ae[0]-Le[0],Fe[1]=ae[1]-Le[1],Fe[2]=ae[2]-Le[2],Fe[3]=ae[3]-Le[0],Fe[4]=ae[4]-Le[1],Fe[5]=ae[5]-Le[2];const Ee=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],J=ne?S.length-1:V[Q+1]-1,ue=[],xe=t.metaScene.metaObjects[ie],oe={},Be={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Be.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Be.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Be.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Be.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=J;je++){const he=S[je],Ne=Ce[he]>1,Pe=he===Me-1,He=F[je],rt=He>=0?`${a}-textureSet-${He}`:null,At=JNt(U.subarray(je*6,je*6+3)),ft=U[je*6+3]/255,ct=U[je*6+4]/255,ut=U[je*6+5]/255,Te=n.getNextId();if(Ne){const st=R[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${me}.${he}`;let Ae=ve[Ye];if(!Ae){Ae={batchThisMesh:!e.reuseGeometries};const be=b[he];let $e=!1;switch(be){case 0:Ae.primitiveName="solid",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryNormals=h.subarray(k[he],Pe?h.length:k[he+1]),Ae.geometryUVs=A.subarray(B[he],Pe?A.length:B[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),Ae.geometryEdgeIndices=m.subarray(T[he],Pe?m.length:T[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 1:Ae.primitiveName="surface",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryNormals=h.subarray(k[he],Pe?h.length:k[he+1]),Ae.geometryUVs=A.subarray(B[he],Pe?A.length:B[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),Ae.geometryEdgeIndices=m.subarray(T[he],Pe?m.length:T[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 2:Ae.primitiveName="points",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryColors=p.subarray(E[he],Pe?p.length:E[he+1]),$e=Ae.geometryPositions.length>0;break;case 3:Ae.primitiveName="lines",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryIndices=f.subarray(P[he],Pe?f.length:P[he+1]),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;case 4:Ae.primitiveName="lines",Ae.geometryPositions=u.subarray(x[he],Pe?u.length:x[he+1]),Ae.geometryIndices=_te(Ae.geometryPositions,f.subarray(P[he],Pe?f.length:P[he+1])),$e=Ae.geometryPositions.length>0&&Ae.geometryIndices.length>0;break;default:continue}if($e||(Ae=null),Ae&&(Ae.geometryPositions.length>1e3,Ae.batchThisMesh)){Ae.decompressedPositions=new Float32Array(Ae.geometryPositions.length),Ae.transformedAndRecompressedPositions=new Uint16Array(Ae.geometryPositions.length);const ht=Ae.geometryPositions,St=Ae.decompressedPositions;for(let xt=0,yi=ht.length;xt<yi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];Ae.geometryPositions=null,ve[Ye]=Ae}}if(Ae)if(Ae.batchThisMesh){const be=Ae.decompressedPositions,$e=Ae.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)Ec[0]=be[ht+0],Ec[1]=be[ht+1],Ec[2]=be[ht+2],Ec[3]=1,C.transformVec4(dt,Ec,Lte),Jt.compressPosition(Lte,Fe,Ec),$e[ht+0]=Ec[0],$e[ht+1]=Ec[1],$e[ht+2]=Ec[2];o.createMesh(mt.apply(Be,{id:Te,textureSetId:rt,origin:Le,primitive:Ae.primitiveName,positionsCompressed:$e,normalsCompressed:Ae.geometryNormals,uv:Ae.geometryUVs,colorsCompressed:Ae.geometryColors,indices:Ae.geometryIndices,edgeIndices:Ae.geometryEdgeIndices,positionsDecodeMatrix:Ee,color:At,metallic:ct,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:Ae.primitiveName,positionsCompressed:Ae.geometryPositions,normalsCompressed:Ae.geometryNormals,uv:Ae.geometryUVs,colorsCompressed:Ae.geometryColors,indices:Ae.geometryIndices,edgeIndices:Ae.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Be,{id:Te,geometryId:Ye,textureSetId:rt,matrix:dt,color:At,metallic:ct,roughness:ut,opacity:ft,origin:Le})),ue.push(Te)}else{const st=b[he];let dt,Ye,Ae,be,$e,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),Ae=h.subarray(k[he],Pe?h.length:k[he+1]),be=A.subarray(B[he],Pe?A.length:B[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),St=m.subarray(T[he],Pe?m.length:T[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),Ae=h.subarray(k[he],Pe?h.length:k[he+1]),be=A.subarray(B[he],Pe?A.length:B[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),St=m.subarray(T[he],Pe?m.length:T[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),$e=p.subarray(E[he],Pe?p.length:E[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),ht=f.subarray(P[he],Pe?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Pe?u.length:x[he+1]),ht=_te(Ye,f.subarray(P[he],Pe?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Be,{id:Te,textureSetId:rt,origin:Le,primitive:dt,positionsCompressed:Ye,normalsCompressed:Ae,uv:be&&be.length>0?be:null,colorsCompressed:$e,indices:ht,edgeIndices:St,positionsDecodeMatrix:Ee,color:At,metallic:ct,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function _te(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const Fte={version:11,parseArrayBuffer:function(t,e,i,o,r,n){const a=KNt(i);ZNt(t,e,a,o,r,n)}};let Ph=window.pako||Es;Ph.inflate||(Ph=Ph.default);const Bc=C.vec4(),Ote=C.vec4(),WNt=9;function YNt(t){const e=(function(){const r=new ArrayBuffer(2);return new Uint16Array(r)[0]=1,new Uint8Array(r)[0]!==1})(),i=(function(){let r=0;const n=new DataView(t);return function(a){const s=1+2*r++,l=n.getUint32(s*4,!0),c=n.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(t,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(t,l,c/d)}})(),o=(function(){const r=new TextDecoder;return()=>JSON.parse(r.decode(i(Uint8Array)))})();return{metadata:o(),textureData:i(Uint8Array),eachTextureDataPortion:i(Uint32Array),eachTextureAttributes:i(Uint16Array),positions:i(Uint16Array),normals:i(Int8Array),colors:i(Uint8Array),uvs:i(Float32Array),indices:i(Uint32Array),edgeIndices:i(Uint32Array),eachTextureSetTextures:i(Int32Array),matrices:i(Float32Array),reusedGeometriesDecodeMatrix:i(Float32Array),eachGeometryPrimitiveType:i(Uint8Array),eachGeometryAxisLabel:o(),eachGeometryPositionsPortion:i(Uint32Array),eachGeometryNormalsPortion:i(Uint32Array),eachGeometryColorsPortion:i(Uint32Array),eachGeometryUVsPortion:i(Uint32Array),eachGeometryIndicesPortion:i(Uint32Array),eachGeometryEdgeIndicesPortion:i(Uint32Array),eachMeshGeometriesPortion:i(Uint32Array),eachMeshMatricesPortion:i(Uint32Array),eachMeshTextureSet:i(Int32Array),eachMeshMaterialAttributes:i(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:i(Uint32Array),eachTileAABB:i(Float64Array),eachTileEntitiesPortion:i(Uint32Array)}}function XNt(t){let e=0;return{metadata:t[e++],textureData:t[e++],eachTextureDataPortion:t[e++],eachTextureAttributes:t[e++],positions:t[e++],normals:t[e++],colors:t[e++],uvs:t[e++],indices:t[e++],edgeIndices:t[e++],eachTextureSetTextures:t[e++],matrices:t[e++],reusedGeometriesDecodeMatrix:t[e++],eachGeometryPrimitiveType:t[e++],eachGeometryAxisLabel:t[e++],eachGeometryPositionsPortion:t[e++],eachGeometryNormalsPortion:t[e++],eachGeometryColorsPortion:t[e++],eachGeometryUVsPortion:t[e++],eachGeometryIndicesPortion:t[e++],eachGeometryEdgeIndicesPortion:t[e++],eachMeshGeometriesPortion:t[e++],eachMeshMatricesPortion:t[e++],eachMeshTextureSet:t[e++],eachMeshMaterialAttributes:t[e++],eachEntityId:t[e++],eachEntityMeshesPortion:t[e++],eachTileAABB:t[e++],eachTileEntitiesPortion:t[e++]}}function $Nt(t){function e(i,o){return i.length===0?[]:Ph.inflate(i,o).buffer}return{metadata:JSON.parse(Ph.inflate(t.metadata,{to:"string"})),textureData:new Uint8Array(e(t.textureData)),eachTextureDataPortion:new Uint32Array(e(t.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(t.eachTextureAttributes)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),uvs:new Float32Array(e(t.uvs)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),eachTextureSetTextures:new Int32Array(e(t.eachTextureSetTextures)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryAxisLabel:JSON.parse(Ph.inflate(t.eachGeometryAxisLabel,{to:"string"})),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(t.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(t.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(t.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Ph.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const ejt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function Ute(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryAxisLabel,k=i.eachGeometryPositionsPortion,E=i.eachGeometryNormalsPortion,B=i.eachGeometryColorsPortion,P=i.eachGeometryUVsPortion,T=i.eachGeometryIndicesPortion,S=i.eachGeometryEdgeIndicesPortion,R=i.eachMeshGeometriesPortion,F=i.eachMeshMatricesPortion,U=i.eachMeshTextureSet,q=i.eachMeshMaterialAttributes,V=i.eachEntityId,W=i.eachEntityMeshesPortion,Y=i.eachTileAABB,$=i.eachTileEntitiesPortion,fe=c.length,Me=g.length/5,Se=k.length,qe=R.length,Qe=W.length,Ce=$.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let we=0;we<fe;we++){const Re=we===fe-1,We=c[we],H=Re?l.length:c[we+1],ee=H-We>0,ae=we*WNt,Ee=d[ae+0]===1,pe=d[ae+1];d[ae+2],d[ae+3];const Q=d[ae+4],Z=d[ae+5],ie=d[ae+6],re=d[ae+7],ne=d[ae+8];if(ee){const G=new Uint8Array(l.subarray(We,H)).buffer,J=`${a}-texture-${we}`;if(Ee)o.createTexture({id:J,buffers:[G],minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne});else{const ue=pe===E7?"image/jpeg":pe===B7?"image/png":"image/gif",xe=new Blob([G],{type:ue}),oe=(window.URL||window.webkitURL).createObjectURL(xe),Be=document.createElement("img");Be.src=oe,o.createTexture({id:J,image:Be,minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne})}}}for(let we=0;we<Me;we++){const Re=we*5,We=`${a}-textureSet-${we}`,H=g[Re+0],ee=g[Re+1],ae=g[Re+2],Ee=g[Re+3],pe=g[Re+4];o.createTextureSet({id:We,colorTextureId:H>=0?`${a}-texture-${H}`:null,normalsTextureId:ae>=0?`${a}-texture-${ae}`:null,metallicRoughnessTextureId:ee>=0?`${a}-texture-${ee}`:null,emissiveTextureId:Ee>=0?`${a}-texture-${Ee}`:null,occlusionTextureId:pe>=0?`${a}-texture-${pe}`:null})}const Le=new Uint32Array(Se);for(let we=0;we<qe;we++){const Re=R[we];Le[Re]!==void 0?Le[Re]++:Le[Re]=1}const Fe=C.vec3(),ve=C.AABB3(),me={};for(let we=0;we<Ce;we++){const Re=Ce-1,We=we===Re,H=$[we],ee=We?Qe-1:$[we+1]-1,ae=we*6,Ee=Y.subarray(ae,ae+6);C.getAABB3Center(Ee,Fe),ve[0]=Ee[0]-Fe[0],ve[1]=Ee[1]-Fe[1],ve[2]=Ee[2]-Fe[2],ve[3]=Ee[3]-Fe[0],ve[4]=Ee[4]-Fe[1],ve[5]=Ee[5]-Fe[2];const pe=Jt.createPositionsDecodeMatrix(ve),Q={};for(let Z=H;Z<=ee;Z++){const ie=V[Z],re=e.globalizeObjectIds?C.globalizeObjectId(o.id,ie):ie,ne=Qe-1,G=Z===ne,J=W[Z],ue=G?R.length-1:W[Z+1]-1,xe=[],oe=t.metaScene.metaObjects[re],Be={},je={};if(!(e.includeIdsMap&&ie&&!e.includeIdsMap[ie])){if(oe){if(e.excludeTypesMap&&oe.type&&e.excludeTypesMap[oe.type]||e.includeTypesMap&&oe.type&&!e.includeTypesMap[oe.type]||e.includeIdsMap&&oe.id&&!e.includeIdsMap[oe.id])continue;const he=e.objectDefaults?e.objectDefaults[oe.type]||e.objectDefaults.DEFAULT:null;he&&(he.visible===!1&&(Be.visible=!1),he.pickable===!1&&(Be.pickable=!1),he.colorize&&(je.color=he.colorize),he.opacity!==void 0&&he.opacity!==null&&(je.opacity=he.opacity),he.metallic!==void 0&&he.metallic!==null&&(je.metallic=he.metallic),he.roughness!==void 0&&he.roughness!==null&&(je.roughness=he.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let he=J;he<=ue;he++){const Ne=R[he],Pe=Le[Ne]>1,He=Ne===Se-1,rt=U[he],At=rt>=0?`${a}-textureSet-${rt}`:null,ft=ejt(q.subarray(he*6,he*6+3)),ct=q[he*6+3]/255,ut=q[he*6+4]/255,Te=q[he*6+5]/255,st=n.getNextId();if(Pe){const dt=F[he],Ye=y.slice(dt,dt+16),Ae=`${a}-geometry.${we}.${Ne}`;let be=me[Ae];if(!be){be={batchThisMesh:!e.reuseGeometries};const $e=b[Ne],ht=x[Ne];let St=!1,xt;switch($e){case 0:be.primitiveName="solid",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryNormals=h.subarray(E[Ne],He?h.length:E[Ne+1]),be.geometryUVs=A.subarray(P[Ne],He?A.length:P[Ne+1]),be.geometryIndices=f.subarray(T[Ne],He?f.length:T[Ne+1]),be.geometryEdgeIndices=m.subarray(S[Ne],He?m.length:S[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 1:be.primitiveName="surface",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryNormals=h.subarray(E[Ne],He?h.length:E[Ne+1]),be.geometryUVs=A.subarray(P[Ne],He?A.length:P[Ne+1]),be.geometryIndices=f.subarray(T[Ne],He?f.length:T[Ne+1]),be.geometryEdgeIndices=m.subarray(S[Ne],He?m.length:S[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 2:be.primitiveName="points",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryColors=p.subarray(B[Ne],He?p.length:B[Ne+1]),St=be.geometryPositions.length>0;break;case 3:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryIndices=f.subarray(T[Ne],He?f.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 4:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryIndices=Nte(be.geometryPositions,f.subarray(T[Ne],He?f.length:T[Ne+1])),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 7:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.decompressedPositions=Jt.decompressPositions(be.geometryPositions,v),xt=b1({origin:be.decompressedPositions,text:ht,size:2}),be.decompressedPositions=xt.positions,be.geometryIndices=xt.indices,be.geometryPositions=null,St=be.decompressedPositions.length>0&&be.geometryIndices.length>0;break;default:continue}if(St||(be=null),be&&(be.geometryPositions&&be.geometryPositions.length>1e3,be.batchThisMesh)){if($e===7)be.transformedAndRecompressedPositions=new Uint16Array(be.decompressedPositions.length);else{be.decompressedPositions=new Float32Array(be.geometryPositions.length),be.transformedAndRecompressedPositions=new Uint16Array(be.geometryPositions.length);const yi=be.geometryPositions,Gi=be.decompressedPositions;for(let Do=0,ao=yi.length;Do<ao;Do+=3)Gi[Do+0]=yi[Do+0]*v[0]+v[12],Gi[Do+1]=yi[Do+1]*v[5]+v[13],Gi[Do+2]=yi[Do+2]*v[10]+v[14];be.geometryPositions=null}me[Ae]=be}}if(be)if(be.batchThisMesh){const $e=be.decompressedPositions,ht=be.transformedAndRecompressedPositions;for(let St=0,xt=$e.length;St<xt;St+=3)Bc[0]=$e[St+0],Bc[1]=$e[St+1],Bc[2]=$e[St+2],Bc[3]=1,C.transformVec4(Ye,Bc,Ote),Jt.compressPosition(Ote,ve,Bc),ht[St+0]=Bc[0],ht[St+1]=Bc[1],ht[St+2]=Bc[2];o.createMesh(mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:be.primitiveName,positionsCompressed:ht,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices,positionsDecodeMatrix:pe,color:ft,metallic:ut,roughness:Te,opacity:ct})),xe.push(st)}else{if(!Q[Ae]){let $e={id:Ae,primitive:be.primitiveName,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices};be.geometryPositions?$e={...$e,positionsCompressed:be.geometryPositions,positionsDecodeMatrix:v}:$e={...$e,positions:be.decompressedPositions},o.createGeometry($e),Q[Ae]=!0}o.createMesh(mt.apply(je,{id:st,geometryId:Ae,textureSetId:At,matrix:Ye,color:ft,metallic:ut,roughness:Te,opacity:ct,origin:Fe})),xe.push(st)}}else{const dt=b[Ne],Ye=x[Ne];let Ae,be,$e,ht,St,xt,yi,Gi=!1,Do;switch(dt){case 0:Ae="solid",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),$e=h.subarray(E[Ne],He?h.length:E[Ne+1]),ht=A.subarray(P[Ne],He?A.length:P[Ne+1]),xt=f.subarray(T[Ne],He?f.length:T[Ne+1]),yi=m.subarray(S[Ne],He?m.length:S[Ne+1]),Gi=be.length>0&&xt.length>0;break;case 1:Ae="surface",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),$e=h.subarray(E[Ne],He?h.length:E[Ne+1]),ht=A.subarray(P[Ne],He?A.length:P[Ne+1]),xt=f.subarray(T[Ne],He?f.length:T[Ne+1]),yi=m.subarray(S[Ne],He?m.length:S[Ne+1]),Gi=be.length>0&&xt.length>0;break;case 2:Ae="points",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),St=p.subarray(B[Ne],He?p.length:B[Ne+1]),Gi=be.length>0;break;case 3:Ae="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),xt=f.subarray(T[Ne],He?f.length:T[Ne+1]),Gi=be.length>0&&xt.length>0;break;case 4:Ae="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),xt=Nte(be,f.subarray(T[Ne],He?f.length:T[Ne+1])),Gi=be.length>0&&xt.length>0;break;case 7:Ae="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),be=Jt.decompressPositions(be,pe),Do=b1({origin:be,text:Ye,size:2}),be=Do.positions,xt=Do.indices,Gi=be.length>0&&xt.length>0;break;default:continue}if(Gi){let ao=mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:Ae,normalsCompressed:$e,uv:ht&&ht.length>0?ht:null,colorsCompressed:St,indices:xt,edgeIndices:yi,color:ft,metallic:ut,roughness:Te,opacity:ct});dt!==7?ao={...ao,positionsCompressed:be,positionsDecodeMatrix:pe}:ao={...ao,positions:be},o.createMesh(ao),xe.push(st)}}}xe.length>0&&o.createEntity(mt.apply(Be,{id:re,isObject:!0,meshIds:xe}))}}}}function Nte(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const jte={version:12,parseArrayBuffer:function(t,e,i,o,r,n){const a=YNt(i);Ute(t,e,a,o,r,n)},parse:function(t,e,i,o,r,n){const a=XNt(i),s=$Nt(a);Ute(t,e,s,o,r,n)}},Ln={};Ln[vte.version]=vte,Ln[yte.version]=yte,Ln[bte.version]=bte,Ln[wte.version]=wte,Ln[Cte.version]=Cte,Ln[xte.version]=xte,Ln[Mte.version]=Mte,Ln[Pte.version]=Pte,Ln[Ste.version]=Ste,Ln[Rte.version]=Rte,Ln[Fte.version]=Fte,Ln[jte.version]=jte;class Qb extends qa{constructor(e,i={}){super("XKTLoader",e,i),this._maxGeometryBatchSize=i.maxGeometryBatchSize,this.textureTranscoder=i.textureTranscoder,this.dataSource=i.dataSource,this.objectDefaults=i.objectDefaults,this.includeTypes=i.includeTypes,this.excludeTypes=i.excludeTypes,this.excludeUnclassifiedObjects=i.excludeUnclassifiedObjects,this.reuseGeometries=i.reuseGeometries}get supportedVersions(){return Object.keys(Ln)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new Ate}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||hte}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get includeIds(){return this._includeIds}set includeIds(e){this._includeIds=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=e!==!1}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc&&!e.manifest)throw new Error("XKTLoaderPlugin: load() param expected: src, xkt, manifestSrc or manifestData");const i={},o=e.includeTypes||this._includeTypes,r=e.excludeTypes||this._excludeTypes,n=e.includeIds||this._includeIds,a=e.objectDefaults||this._objectDefaults;if(i.reuseGeometries=e.reuseGeometries!==null&&e.reuseGeometries!==void 0?e.reuseGeometries:this._reuseGeometries!==!1,o){i.includeTypesMap={};for(let A=0,f=o.length;A<f;A++)i.includeTypesMap[o[A]]=!0}if(r){i.excludeTypesMap={};for(let A=0,f=r.length;A<f;A++)i.excludeTypesMap[r[A]]=!0}if(n){i.includeIdsMap={};for(let A=0,f=n.length;A<f;A++)i.includeIdsMap[n[A]]=!0}a&&(i.objectDefaults=a),i.excludeUnclassifiedObjects=e.excludeUnclassifiedObjects!==void 0?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,i.globalizeObjectIds=e.globalizeObjectIds!==void 0&&e.globalizeObjectIds!==null?!!e.globalizeObjectIds:this._globalizeObjectIds;const s=new I3(this.viewer.scene,mt.apply(e,{isModel:!0,textureTranscoder:this._textureTranscoder,maxGeometryBatchSize:this._maxGeometryBatchSize,origin:e.origin,disableVertexWelding:e.disableVertexWelding||!1,disableIndexRebucketing:e.disableIndexRebucketing||!1,dtxEnabled:e.dtxEnabled,renderOrder:e.renderOrder})),l=s.id,c=new A$({metaScene:this.viewer.metaScene,id:l});this.viewer.scene.canvas.spinner.processes++;const d=()=>{s.destroyed||(s.finalize(),c.finalize(),this.viewer.scene.canvas.spinner.processes--,s.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(c.id)}),this.scheduleTask(()=>{s.destroyed||(s.scene.fire("modelLoaded",s.id),s.fire("loaded",!0,!1))}))},u=A=>{this.viewer.scene.canvas.spinner.processes--,this.error(A),s.fire("error",A)};let h=0;const p={getNextId:()=>`${l}.${h++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const A=e.metaModelSrc;this._dataSource.getMetaModel(A,f=>{s.destroyed||(c.loadData(f,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),e.src?this._loadModel(e.src,i,s,null,p,d,u):(this._parseModel(e.xkt,i,s,null,p),d()))},f=>{u(`load(): Failed to load model metadata for model '${l} from '${A}' - ${f}`)})}else e.metaModelData&&(c.loadData(e.metaModelData,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),e.src?this._loadModel(e.src,i,s,null,p,d,u):(this._parseModel(e.xkt,i,s,null,p),d()));else if(e.src)this._loadModel(e.src,i,s,c,p,d,u);else if(e.xkt)this._parseModel(e.xkt,i,s,c,p),d();else if(e.manifestSrc||e.manifest){const A=e.manifestSrc?tjt(e.manifestSrc):"",f=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getMetaModel(`${A}${y[x]}`,E=>{c.loadData(E,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),x++,this.scheduleTask(k,200)},b)};k()},m=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,E=>{this._parseModel(E,i,s,null,p),s.preFinalize(),x++,this.scheduleTask(k,200)},b)};k()},g=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,E=>{this._parseModel(E,i,s,c,p),s.preFinalize(),x++,this.scheduleTask(k,200)},b)};k()};if(e.manifest){const y=e.manifest,v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const b=y.metaModelFiles;b?f(b,()=>{m(v,d,u)},u):g(v,d,u)}else this._dataSource.getManifest(e.manifestSrc,y=>{if(s.destroyed)return;const v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const b=y.metaModelFiles;b?f(b,()=>{m(v,d,u)},u):g(v,d,u)},u)}return s}_loadModel(e,i,o,r,n,a,s){this._dataSource.getXKT(e,l=>{this._parseModel(l,i,o,r,n),o.preFinalize(),a()},s)}async _parseModel(e,i,o,r,n){if(o.destroyed)return;const a=new DataView(e),s=new Uint8Array(e),l=a.getUint32(0,!0),c=l&2147483647,d=c<11||c>=12&&l>>>31,u=Ln[c];if(!u){this.error("Unsupported .XKT file version: "+c+" - this XKTLoaderPlugin supports versions "+Object.keys(Ln));return}if(!d){u.parseArrayBuffer(this.viewer,i,e,o,r,n);return}const h=a.getUint32(4,!0),p=[];let A=(h+2)*4;for(let f=0;f<h;f++){const m=a.getUint32((f+2)*4,!0);p.push(s.subarray(A,A+m)),A+=m}u.parse(this.viewer,i,p,o,r,n)}}function tjt(t){t.indexOf("?")>-1&&(t=t.split("?")[0]);const e=t.split("/");return e.pop(),e.join("/")+"/"}let ijt=1;class TF{constructor(e,i,o=null){this.tileset=e,this.computePriority=e.plugin.computePriority,this.distanceFactorToFreeData=e.plugin.distanceFactorToFreeData,this.src=i.content?.uri??null;const r=this.src?new URL(this.src).pathname:null;this.name=`${e.name}_${r?r.substring(r.lastIndexOf("/")+1):`tileWithNoContent_${ijt++}`}`,this.parent=o,this.refine=i.refine,this.data=null,this.fetching=null,this.depth=o?o.depth+1:1,this.model=null,this.loadProcess=null,this.loading=!1,this.currentDistanceFromCamera=null,this._visible=!o,this.priority=1,this.geometricError=i.geometricError;const[n,a,s,l,c,d,u,h,p,A,f,m]=i.boundingVolume.box;let g=[n,a,s],y=1;e.rootTransform&&(C.transformPoint3(e.rootTransform,g,g),y=e.rootTransform[0]),g=[g[0],g[2],-g[1]],this.center=Object.freeze(g);const v=[l,c,d],b=[-u,-h,-p],x=[A,f,m];this.xSize=C.lenVec3(v)*y,this.ySize=C.lenVec3(x)*y,this.zSize=C.lenVec3(b)*y,this.volume=this.xSize*2*this.ySize*2*this.zSize*2,this.children=i.children?.map(k=>new TF(e,k,this))??[],e.tiles.add(this)}get visible(){return this._visible}set visible(e){this._visible!==e&&(this._visible=e,e?this.tileset.visibleTiles.add(this):this.tileset.visibleTiles.delete(this))}get loaded(){return!!this.model}get viewDistance(){return this.tileset.sensitivity*this.geometricError}get isWithinCameraVisibleRange(){return this.currentDistanceFromCamera<=this.viewDistance}updateVisibility(e){this.currentDistanceFromCamera=C.distVec3(this.center,e),this.parent&&(this.visible=this.isWithinCameraVisibleRange,this.currentDistanceFromCamera>this.viewDistance*this.distanceFactorToFreeData&&(this.data=null)),this.visible&&this.children.forEach(i=>i.updateVisibility(e)),this.priority=this.computePriority(this)}fetchData(){return this.data?this.data:this.src?(this.fetching||(this.fetching=new Promise((e,i)=>{fetch(this.src).then(o=>{o.ok?o.arrayBuffer().then(r=>{this.data=r,this.fetching=null,e(this.data)}):i(o)})})),this.fetching):null}showBoundingBox(){const{viewer:e}=this.tileset.plugin,{xSize:i,ySize:o,zSize:r,center:n}=this,a=1/this.depth;this.boxLines=new vi(e.scene,{geometry:new go(e.scene,wP({center:n,xSize:i,ySize:o,zSize:r})),material:new mo(e.scene,{emissive:[1-a,a,(1-a)/2]})})}async load(){if(this.loading)return this.loadProcess;if(this.loaded)return this.model;if(this.loading=!0,!this.data)try{await this.fetchData()}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to fetch data of tile "${this.name}".`,e),this.loading=!1,null}if(!this.visible)return this.loading=!1,null;this.tileset.plugin.debugMode&&this.showBoundingBox();try{const e=new Promise(i=>{const o=this.tileset.plugin.loader.load({id:this.name,xkt:this.data,metaModelData:{metaObjects:[{id:"metaModelRoot"}]}});o.once("loaded",()=>{this.loading=!1,this.loadProcess=null,this.model=o,this.tileset.destroyed||!this.visible?(this.unload(),i(null)):(this.tileset.loadedTiles.add(this),i(o))}),o.once("destroyed",()=>{this.loading=!1,this.loadProcess=null,i(null)})});return this.loadProcess=e,this.loadProcess}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to load tile "${this.name}".`,e),null}}unload(){this.boxLines&&(this.boxLines.destroy(),this.boxLines=null),this.model&&(this.model.destroy(),this.model=null),this.tileset.loadedTiles.delete(this),this.children.forEach(e=>{e.loaded&&e.unload()})}}function ojt(t,e,i){const o=Array.from(t),r=o.splice(0,e),n=async a=>{if(await i(a),o.length>0){const s=o.shift();n(s)}};r.forEach(n)}function rjt(t){let e=!1;return{cancel(){e=!0},async run(i){for(let o of t){if(e)break;await new Promise(r=>setTimeout(()=>(i(o)||Promise.resolve()).then(r)))}}}}let njt=0;class ajt{constructor(e,i){this.plugin=e,this.name=i.name||`tileset-${njt++}`,this.tiles=new Set,this.visibleTiles=new Set,this.loadedTiles=new Set,this.queue=null,this.renderNeeded=!0,this.destroyed=!1,this._sensitivity=e.sensitivity,i.root.transform&&(this.rootTransform=i.root.transform),this.root=new TF(this,i.root),this.root.load().then(o=>e.viewer.cameraFlight.flyTo(o))}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.updateVisibility()}updateVisibility(){this.tiles.forEach(e=>{e!==this.root&&(e.visible=!1)}),this.root.updateVisibility(this.plugin.viewer.camera.eye),this.renderNeeded=!0}render(){if(!this.renderNeeded)return;this.queue&&this.queue.cancel(),this.loadedTiles.forEach(i=>{i.visible||i.unload()});const e=Array.from(this.visibleTiles).filter(i=>!i.loaded).sort((i,o)=>i.priority-o.priority);ojt(e,40,i=>i.fetchData()),this.queue=rjt(e),this.queue.run(i=>i.load()),this.renderNeeded=!1}destroy(){this.queue&&this.queue.cancel(),this.loadedTiles.forEach(e=>e.unload()),this.destroyed=!0,this.plugin.tilesets.delete(this)}}function sjt(t){return t.depth}class Vte extends qa{constructor(e,i={}){super("TilesetLoader",e);const{computePriority:o=sjt,sensitivity:r=50,distanceFactorToFreeData:n=3,debugMode:a=!1}=i;this._sensitivity=r,this.distanceFactorToFreeData=n,this.computePriority=o,this.debugMode=a,this.tilesets=new Set,e.camera.on("matrix",this.updateTilesetsVisibilityCallback=()=>this.updateTilesetsVisibility()),e.scene.on("tick",this.renderTilesetsCallback=()=>this.renderTilesets()),this.loader=new Qb(e)}load(e){const i=new ajt(this,e);return this.tilesets.add(i),i}updateTilesetsVisibility(){this.tilesets.forEach(e=>e.updateVisibility())}renderTilesets(){this.tilesets.forEach(e=>e.render())}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.tilesets.forEach(i=>i.sensitivity=this._sensitivity)}destroy(){this.viewer.camera.off(this.updateTilesetsVisibilityCallback),this.viewer.scene.off(this.renderTilesetsCallback),this.tilesets.forEach(e=>e.destroy()),super.destroy()}}const ljt="2.6.90";typeof window<"u"&&(window.__XEOKIT__?console.warn("WARNING: Multiple instances of xeokit-sdk being imported."):window.__XEOKIT__=ljt);const Pc=Object.freeze(Object.defineProperty({__proto__:null,AlphaFormat:CW,AmbientLight:MI,AngleMeasurementEditMouseControl:FTt,AngleMeasurementEditTouchControl:OTt,AngleMeasurementsControl:$I,AngleMeasurementsMouseControl:M$,AngleMeasurementsPlugin:fb,AngleMeasurementsTouchControl:_Tt,AnnotationsPlugin:tS,AxisGizmoPlugin:zTt,BCFViewpointsPlugin:bb,Bitmap:oY,ByteType:hW,CameraMemento:BIt,CameraPath:$xt,CameraPathAnimation:Fr,ClampToEdgeWrapping:dn,Component:si,CompressedMediaType:xkt,Configs:_7,ContextMenu:gxt,CubicBezierCurve:SIt,Curve:o3,DefaultLoadingManager:cX,DepthFormat:EW,DepthStencilFormat:BW,DirLight:xs,DistanceMeasurementEditControl:oS,DistanceMeasurementEditMouseControl:WTt,DistanceMeasurementEditTouchControl:YTt,DistanceMeasurementsControl:iS,DistanceMeasurementsMouseControl:S$,DistanceMeasurementsPlugin:T$,DistanceMeasurementsTouchControl:ZTt,EdgeMaterial:YP,EmphasisMaterial:Ac,FastNavPlugin:_$,FloatType:mW,Fresnel:gMt,Frustum:va,FrustumPlane:uh,GIFMediaType:Ckt,GLTFDefaultDataSource:F$,GLTFLoaderPlugin:qS,HalfFloatType:vW,ImagePlane:lMt,IntType:AW,JPEGMediaType:E7,KTX2TextureTranscoder:Fs,LOD:IX,LambertMaterial:cMt,LightMap:MIt,LineSet:xX,LinearEncoding:Zn,LinearFilter:un,LinearMipMapLinearFilter:C1,LinearMipMapNearestFilter:s3,LinearMipmapLinearFilter:gh,LinearMipmapNearestFilter:wkt,Loader:dX,LoadingManager:lX,LocaleService:GZ,LuminanceAlphaFormat:MW,LuminanceFormat:kW,Map:Ha,Marker:T3,MarqueePicker:Dl,MarqueePickerMouseControl:Xxt,Mesh:vi,MeshSurfaceArea:lY,MeshVolume:nY,MetallicMaterial:hMt,MirroredRepeatWrapping:uc,ModelMemento:PIt,NavCubePlugin:QS,NearestFilter:Ah,NearestMipMapLinearFilter:w1,NearestMipMapNearestFilter:a3,NearestMipmapLinearFilter:uW,NearestMipmapNearestFilter:dW,Node:n3,ObjectsKdTree3:bxt,ObjectsMemento:IIt,PNGMediaType:B7,Path:TIt,PerformanceModel:RIt,PhongMaterial:mo,PickResult:X7,Plugin:qa,PointLight:CIt,PointerCircle:fP,PointerLens:mxt,QuadraticBezierCurve:DIt,Queue:FZ,RGBAFormat:l3,RGBAIntegerFormat:DW,RGBA_ASTC_10x10_Format:UP,RGBA_ASTC_10x5_Format:_P,RGBA_ASTC_10x6_Format:FP,RGBA_ASTC_10x8_Format:OP,RGBA_ASTC_12x10_Format:NP,RGBA_ASTC_12x12_Format:jP,RGBA_ASTC_4x4_Format:k7,RGBA_ASTC_5x4_Format:PP,RGBA_ASTC_5x5_Format:IP,RGBA_ASTC_6x5_Format:SP,RGBA_ASTC_6x6_Format:TP,RGBA_ASTC_8x5_Format:DP,RGBA_ASTC_8x6_Format:RP,RGBA_ASTC_8x8_Format:LP,RGBA_BPTC_Format:M7,RGBA_ETC2_EAC_Format:x7,RGBA_PVRTC_2BPPV1_Format:EP,RGBA_PVRTC_4BPPV1_Format:w7,RGBA_S3TC_DXT1_Format:v7,RGBA_S3TC_DXT3_Format:y7,RGBA_S3TC_DXT5_Format:d3,RGBFormat:xW,RGB_ETC1_Format:BP,RGB_ETC2_Format:C7,RGB_PVRTC_2BPPV1_Format:MP,RGB_PVRTC_4BPPV1_Format:b7,RGB_S3TC_DXT1_Format:c3,RGFormat:SW,RGIntegerFormat:TW,ReadableGeometry:go,RedFormat:PW,RedIntegerFormat:IW,ReflectionMap:kIt,RepeatWrapping:Co,SceneModel:I3,SceneModelMesh:dY,SceneModelTransform:gX,SectionPlane:II,SectionPlanesPlugin:tNt,ShortType:pW,SpecularMaterial:AMt,SplineCurve:h7,SpriteMarker:EIt,Texture:x1,TextureTranscoder:FIt,TilesetLoaderPlugin:Vte,UnsignedByteType:kP,UnsignedInt248Type:wW,UnsignedIntType:gW,UnsignedShort4444Type:yW,UnsignedShort5551Type:bW,UnsignedShortType:fW,VBOGeometry:$Z,VFC:zX,Viewer:k$,WorkerPool:hX,XKTDefaultDataSource:Ate,XKTLoaderPlugin:Qb,buildBoxGeometry:bP,buildBoxLinesGeometry:wP,buildBoxLinesGeometryFromAABB:gkt,buildCylinderGeometry:v1,buildGridGeometry:eW,buildLineGeometry:iW,buildPlaneGeometry:CP,buildPolylineGeometry:tW,buildPolylineGeometryFromCurve:vkt,buildSphereGeometry:y1,buildTorusGeometry:xP,buildVectorTextGeometry:b1,createCombinedTexture:TTt,createRTCViewMat:Ni,createSkyboxMesh:DTt,createSphereMapMesh:RTt,frustumIntersectsAABB3:u7,getKTX2TextureTranscoder:pX,getPlaneRTCPos:Wo,isTriangleMeshSolid:rY,load3DSGeometry:fkt,loadOBJGeometry:Akt,math:C,meshSurfaceArea:f3,meshVolume:M1,os:LI,rtcToWorldPos:bkt,sRGBEncoding:ho,setFrustum:QZ,stats:Ii,utils:mt,worldToRTCPos:fh,worldToRTCPositions:m7},Symbol.toStringTag,{value:"Module"}));function $1(t){let e=t.substring(1);const i=[];let o=null;for(;e.length>0;)o=e.substring(0,2),e=e.substring(2),i.push(parseInt(o,16)/255);return i}function zte(t){let e="";return e+=Math.round(t[0]*255).toString(16).padStart(2,"0"),e+=Math.round(t[1]*255).toString(16).padStart(2,"0"),e+=Math.round(t[2]*255).toString(16).padStart(2,"0"),`#${e}`}const cjt={class:"annotations-3d"},djt={__name:"Annotations3D",setup(t){const e=lt("$viewer"),{localContext:i}=e,{xeokit:o}=i.viewer,r=o.scene.canvas.canvas,n=o7(),a=xr(new WeakSet),s=De(()=>n.value.filter(u=>a.has(u))),l=new Map;pt(n,()=>{n.value.forEach(u=>{if(!l.has(u.id)){const{x:h,y:p,z:A}=u,f=new T3(o.scene,{worldPos:[h,A,p]});l.set(u.id,f);const[m,g]=f.canvasPos;f.style=le(`left: ${m}px; top: ${g}px;`),f.on("canvasPos",([b,x])=>{f.style.value=`left: ${b}px; top: ${x}px;`}),f.on("visible",b=>b?a.add(u):a.delete(u)),f.on("destroyed",()=>{e.state.hub.off(v),e.state.hub.off(y)});const y=e.state.hub.on("annotation-updated",({annotation:b})=>{if(b.id===u.id){const{x,y:k,z:E}=b;f.worldPos=[x,E,k],f._update(),o.scene._renderer._occlusionTester._occlusionTestListDirty=!0}}),v=e.state.hub.on("annotation-removed",({annotation:b})=>{b.id===u.id&&(l.delete(u.id),f.destroy())})}})},{flush:"sync"});const c=(u,h)=>{const{clientX:p,clientY:A}=h,{x:f,y:m}=r.getBoundingClientRect(),g=o.scene.pick({pickSurface:!0,canvasPos:[p-f,A-m]});if(g){const[y,v,b]=g.worldPos;Object.assign(u,{x:y,y:b,z:v})}},d=u=>l.get(u.id).style.value;return(u,h)=>(M(),_("div",cjt,[(M(!0),_(Xe,null,Mt(s.value,p=>(M(),K(r7,{key:p.instanceId,annotation:p,canvas:it(r),style:de(d(p)),onAnnotationDrag:A=>c(p,A)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),128))]))}},Hte=j(djt,[["__scopeId","data-v-10ceb001"]]),ujt={setup(){const t=lt("$viewer"),e=t.localContext.pluginComponentInstances.get("viewer3d"),{math:i}=e.xeokitSdk,o=()=>{const n=e.xeokit,a=[0,0,-1],s=n.scene.aabb,l=i.getAABB3Diag(s),c=i.vec3();i.getAABB3Center(s,c);const d=45,u=Math.abs(l/Math.tan(d*i.DEGTORAD));n.cameraControl.pivotPos=c,n.cameraFlight.jumpTo({look:c,eye:[c[0]-u*a[0],c[1]-u*a[1],c[2]-u*a[2]],up:[0,1,0],orthoScale:l*1.1,fitFOV:d})},r=()=>{const n=t.localContext.loadedModels.flatMap(a=>a.objects.filter(s=>s.visible===!1).map(s=>s.id));t.state.showObjects(n)};return{onClick:()=>{o(),r(),e.reintegrateObjects()}}}};function hjt(t,e,i,o,r,n){const a=I("BIMDataIconHome"),s=I("BIMDataButton");return M(),K(s,{color:"default",ghost:"",rounded:"",icon:"",onClick:o.onClick},{default:N(()=>[D(a,{size:"xs"})]),_:1},8,["onClick"])}const pjt=j(ujt,[["render",hjt]]),fjt={computed:{active(){return this.$viewer.localContext.pluginComponentInstances.has("navigationVersionsModel")?this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").isOpen.value:!1}},methods:{onClick(){this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").toggle()}}};function Ajt(t,e,i,o,r,n){const a=I("BIMDataIcon"),s=I("BIMDataButton"),l=I("BIMDataTooltip");return M(),K(l,{text:t.$t("navigationVersionsModel.tooltip")},{default:N(()=>[D(s,{class:ce(["bimdata-navigation-versions-model",{active:n.active}]),color:"primary",ghost:"",rounded:"",icon:"",onClick:n.onClick},{default:N(()=>[D(a,{name:"versioning",fill:"",color:"primary",size:"xxs"})]),_:1},8,["class","onClick"])]),_:1},8,["text"])}const gjt=j(fjt,[["render",Ajt],["__scopeId","data-v-ced27a96"]]),mjt={key:0,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vjt={key:1,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yjt={__name:"KeyboardNavigate",setup(t){const e=lt("$viewer").i18n.locale==="fr";return(i,o)=>e?(M(),_("svg",mjt,[...o[0]||(o[0]=[tn('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M82.5998 38.834V40H76.6759V38.834H82.5998ZM82.465 32.377L77.2209 40H76.2365V39.0684L81.4982 31.4688H82.465V32.377ZM81.9201 31.4688V32.6406H76.2716V31.4688H81.9201Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M37.3036 81.9744L39.5478 83.7556L38.5927 84.5935L36.3896 82.8298L37.3036 81.9744ZM39.5653 78.6111V79.0798C39.5653 79.7244 39.4814 80.3025 39.3134 80.8142C39.1454 81.3259 38.9052 81.7615 38.5927 82.1208C38.2802 82.4802 37.9071 82.7556 37.4735 82.947C37.04 83.1345 36.5595 83.2283 36.0321 83.2283C35.5087 83.2283 35.0302 83.1345 34.5966 82.947C34.1669 82.7556 33.7939 82.4802 33.4775 82.1208C33.161 81.7615 32.915 81.3259 32.7392 80.8142C32.5673 80.3025 32.4814 79.7244 32.4814 79.0798V78.6111C32.4814 77.9666 32.5673 77.3904 32.7392 76.8826C32.911 76.3708 33.1532 75.9353 33.4657 75.5759C33.7821 75.2126 34.1552 74.9373 34.5849 74.7498C35.0185 74.5583 35.497 74.4626 36.0204 74.4626C36.5478 74.4626 37.0282 74.5583 37.4618 74.7498C37.8993 74.9373 38.2743 75.2126 38.5868 75.5759C38.8993 75.9353 39.1396 76.3708 39.3075 76.8826C39.4794 77.3904 39.5653 77.9666 39.5653 78.6111ZM38.0888 79.0798V78.5994C38.0888 78.1228 38.0419 77.7029 37.9482 77.3396C37.8583 76.9724 37.7235 76.6658 37.5439 76.4197C37.3681 76.1697 37.1513 75.9822 36.8935 75.8572C36.6396 75.7283 36.3485 75.6638 36.0204 75.6638C35.7001 75.6638 35.413 75.7283 35.1591 75.8572C34.9052 75.9822 34.6884 76.1697 34.5087 76.4197C34.329 76.6658 34.1923 76.9724 34.0985 77.3396C34.0048 77.7029 33.9579 78.1228 33.9579 78.5994V79.0798C33.9579 79.5564 34.0048 79.9783 34.0985 80.3455C34.1923 80.7126 34.329 81.0232 34.5087 81.2771C34.6923 81.5271 34.911 81.7166 35.165 81.8455C35.4228 81.9705 35.7118 82.033 36.0321 82.033C36.3603 82.033 36.6513 81.9705 36.9052 81.8455C37.1591 81.7166 37.3739 81.5271 37.5497 81.2771C37.7255 81.0232 37.8583 80.7126 37.9482 80.3455C38.0419 79.9783 38.0888 79.5564 38.0888 79.0798Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])])):(M(),_("svg",vjt,[...o[1]||(o[1]=[tn('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M77.1095 38.084L78.8088 31.4688H79.6994L79.5998 33.1738L77.7834 40H76.8576L77.1095 38.084ZM75.838 31.4688L77.215 38.0312L77.338 40H76.3537L74.3791 31.4688H75.838ZM81.6271 38.0137L82.9865 31.4688H84.4513L82.4767 40H81.4923L81.6271 38.0137ZM80.0451 31.4688L81.7267 38.1016L81.9728 40H81.047L79.2599 33.1738L79.1662 31.4688H80.0451Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M36.2665 75.7166L33.7177 83.1111H32.1767L35.3876 74.5798H36.372L36.2665 75.7166ZM38.3993 83.1111L35.8446 75.7166L35.7333 74.5798H36.7235L39.9462 83.1111H38.3993ZM38.2763 79.947V81.113H33.6357V79.947H38.2763Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])]))}},bjt={key:0,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wjt={key:1,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Cjt={__name:"KeyboardStorey",setup(t){const e=lt("$viewer"),i=De(()=>e.i18n.locale==="fr");return(o,r)=>i.value?(M(),_("svg",bjt,[...r[0]||(r[0]=[tn('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M15.7763 88.3063L17.4755 81.691H18.3661L18.2665 83.3961L16.4501 90.2223H15.5243L15.7763 88.3063ZM14.5048 81.691L15.8817 88.2535L16.0048 90.2223H15.0204L13.0458 81.691H14.5048ZM20.2939 88.236L21.6532 81.691H23.1181L21.1435 90.2223H20.1591L20.2939 88.236ZM18.7118 81.691L20.3935 88.3239L20.6396 90.2223H19.7138L17.9267 83.3961L17.8329 81.691H18.7118Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])])):(M(),_("svg",wjt,[...r[1]||(r[1]=[tn('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M21.2665 89.0563V90.2223H15.3427V89.0563H21.2665ZM21.1317 82.5992L15.8876 90.2223H14.9032V89.2906L20.165 81.691H21.1317V82.5992ZM20.5868 81.691V82.8629H14.9384V81.691H20.5868Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])]))}},xjt={},kjt={width:"174",height:"130",viewBox:"0 0 174 130",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mjt(t,e){return M(),_("svg",kjt,[...e[0]||(e[0]=[tn('<path d="M33.1118 0.382324H131.606L141.853 99.4882H23.4L33.1118 0.382324Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22.9412 99.8706H142.235L131.988 0.305882V0H32.8059L23.0176 99.4882L22.9412 99.8706ZM141.394 99.1059H23.7823L33.4941 0.764706H131.3L141.394 99.1059Z" fill="#9E9E9E"></path><path d="M62.1705 9.86475L60.7941 46.953H103.771V9.86475H62.1705Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M60.4117 47.3354H104.153H104.229V9.48242H61.8647L60.4117 47.3354ZM103.388 46.5707H61.1764L62.5529 10.2471H103.388V46.5707Z" fill="#9E9E9E"></path><path d="M60.7942 46.9529L64.5412 61.7882H100.1L103.771 46.9529H60.7942Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M64.2353 62.1706H100.406L104.306 46.5706H60.3353L64.2353 62.1706ZM99.7942 61.4059H64.8471L61.3294 47.3353H103.312L99.7942 61.4059Z" fill="#9E9E9E"></path><path d="M85.2648 34.7939L85.0354 53.8351L90.0825 49.0175L97.806 49.5528L85.2648 34.7939Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M83.8118 57.5823L83.7354 31.5823L100.406 51.4646L90.3883 49.9352L83.8118 57.5823ZM85.8765 37.3176L85.953 51.9235L89.6236 47.6411L95.2824 48.4823L85.8765 37.3176Z" fill="black"></path><path d="M26.3059 128.241H25.9236C17.5883 128.241 10.7059 121.359 10.7059 113.024V100.253C10.7059 91.9178 17.5883 85.0354 25.9236 85.0354H26.3059C34.6412 85.0354 41.5236 91.9178 41.5236 100.253V113.024C41.5236 121.359 34.6412 128.241 26.3059 128.241Z" fill="white"></path><path d="M137.188 128.241H136.806C128.471 128.241 121.588 121.359 121.588 113.024V100.253C121.588 91.9178 128.471 85.0354 136.806 85.0354H137.188C145.524 85.0354 152.406 91.9178 152.406 100.253V113.024C152.406 121.359 145.524 128.241 137.188 128.241Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M25.4647 129.159H26.9942C35.6353 129.159 42.6706 122.2 42.5942 113.559V99.6413C42.5942 91.0766 35.6353 84.0413 26.9942 84.0413H25.4647C16.9 84.0413 9.86475 91.0001 9.86475 99.6413V113.559C9.86475 122.124 16.8236 129.159 25.4647 129.159ZM12.1589 99.5648C12.1589 92.2236 18.1236 86.2589 25.4647 86.2589H26.9942C34.3353 86.2589 40.3 92.2236 40.3 99.5648V113.482C40.3 120.824 34.3353 126.788 26.9942 126.788H25.4647C18.1236 126.788 12.1589 120.824 12.1589 113.482V99.5648Z" fill="#30374B"></path><path d="M26.3823 104.459C25.5411 104.459 24.8529 103.771 24.8529 102.929V98.4176C24.8529 97.5764 25.5411 96.8882 26.3823 96.8882C27.2235 96.8882 27.9117 97.5764 27.9117 98.4176V102.929C27.9117 103.771 27.2235 104.459 26.3823 104.459Z" fill="#30374B"></path><path d="M15.3706 84.1177C14.8353 84.1177 14.3765 83.6589 14.3765 83.1236V75.4765C14.3765 74.9412 14.8353 74.4824 15.3706 74.4824C15.9059 74.4824 16.3647 74.9412 16.3647 75.4765V83.1236C16.3647 83.6589 15.9059 84.1177 15.3706 84.1177Z" fill="#F8C62C"></path><path d="M9.63529 90.3884C9.63529 90.9237 9.17647 91.3825 8.64118 91.3825H0.994118C0.458824 91.3825 0 90.9237 0 90.3884C0 89.8531 0.458824 89.3943 0.994118 89.3943H8.64118C9.17647 89.3943 9.63529 89.8531 9.63529 90.3884Z" fill="#F8C62C"></path><path d="M11.9294 86.4117C11.5471 86.7941 10.8589 86.7941 10.4765 86.4117L3.74709 79.6823C3.36474 79.3 3.36474 78.6117 3.74709 78.2294C4.12944 77.847 4.81768 77.847 5.20003 78.2294L11.9294 84.9588C12.3118 85.3412 12.3118 86.0294 11.9294 86.4117Z" fill="#F8C62C"></path><path d="M87.7117 105.682H82.9706V100.941H80.8294V105.682H76.1647V107.747H80.8294V112.488H82.9706V107.747H87.7117V105.682Z" fill="#F8C62C"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.194 129.159H137.724C146.365 129.159 153.4 122.2 153.324 113.559V99.6413C153.324 91.0766 146.365 84.0413 137.724 84.0413H136.194C127.629 84.0413 120.594 91.0001 120.594 99.6413V113.559C120.594 122.124 127.553 129.159 136.194 129.159ZM122.888 99.5648C122.888 92.2236 128.853 86.2589 136.194 86.2589H137.724C145.065 86.2589 151.029 92.2236 151.029 99.5648V113.482C151.029 120.824 145.065 126.788 137.724 126.788H136.194C128.853 126.788 122.888 120.824 122.888 113.482V99.5648Z" fill="#30374B"></path><path d="M137.112 104.459C136.271 104.459 135.582 103.771 135.582 102.929V98.4176C135.582 97.5764 136.271 96.8882 137.112 96.8882C137.953 96.8882 138.641 97.5764 138.641 98.4176V102.929C138.641 103.771 137.953 104.459 137.112 104.459Z" fill="#30374B"></path><path d="M102.776 106.753L108.129 101.4C108.588 100.941 108.588 100.253 108.129 99.7941C107.671 99.3352 106.982 99.3352 106.524 99.7941L100.406 105.912C100.176 106.141 100.1 106.447 100.1 106.753C100.1 107.059 100.176 107.365 100.406 107.594L106.524 113.712C106.982 114.171 107.671 114.171 108.129 113.712C108.588 113.253 108.588 112.565 108.129 112.106L102.776 106.753Z" fill="#F8C62C"></path><path d="M171.218 106.753L165.865 101.4C165.406 100.941 165.406 100.253 165.865 99.7941C166.324 99.3352 167.012 99.3352 167.471 99.7941L173.588 105.912C173.818 106.141 173.894 106.447 173.894 106.753C173.894 107.059 173.818 107.365 173.588 107.594L167.471 113.712C167.012 114.171 166.324 114.171 165.865 113.712C165.406 113.253 165.406 112.565 165.865 112.106L171.218 106.753Z" fill="#F8C62C"></path>',20)])])}const Ejt=j(xjt,[["render",Mjt]]),Bjt={},Pjt={width:"42",height:"55",viewBox:"0 0 42 55",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ijt(t,e){return M(),_("svg",Pjt,[...e[0]||(e[0]=[tn('<path d="M1.7192 47.4914L0.501465 10.6013H40.8298L40.3284 47.4914H1.7192Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.36104 47.8495H40.6866L41.188 10.2432H0.143311L1.36104 47.8495ZM39.9703 47.1332H2.07735L0.859623 10.9595H40.4717L39.9703 47.1332Z" fill="#9E9E9E"></path><path d="M4.29792 0.429688L0.501465 10.6013H40.8298L37.5348 0.429688H4.29792Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 10.9596H41.3312L37.7496 0H4.01135L0 10.9596ZM40.3284 10.2433H1.00284L4.51277 0.716312H37.2482L40.3284 10.2433Z" fill="#9E9E9E"></path><path d="M18.9312 23.0255C19.4326 23.0255 19.8624 22.5957 19.8624 22.0943V14.9312C19.8624 14.4298 19.4326 14 18.9312 14C18.4298 14 18 14.4298 18 14.9312V22.0943C18 22.5957 18.4298 23.0255 18.9312 23.0255Z" fill="#F8C62C"></path><path d="M24.3035 28.9708C24.3035 29.4722 24.7333 29.902 25.2347 29.902H32.3978C32.8992 29.902 33.329 29.4722 33.329 28.9708C33.329 28.4693 32.8992 28.0395 32.3978 28.0395H25.2347C24.7333 27.9679 24.3035 28.3977 24.3035 28.9708Z" fill="#F8C62C"></path><path d="M22.1546 25.2461C22.5128 25.6043 23.1575 25.6043 23.5156 25.2461L29.8192 18.9426C30.1773 18.5844 30.1773 17.9398 29.8192 17.5816C29.461 17.2234 28.8163 17.2234 28.4582 17.5816L22.1546 23.8852C21.7248 24.2433 21.7248 24.8164 22.1546 25.2461Z" fill="#F8C62C"></path><path d="M21.5855 31.4087L21.3477 51.0688L26.5798 46.0745L34.5865 46.6294L21.5855 31.4087Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M20.0793 54.9534L20 28L37.2819 48.6114L26.8969 47.0259L20.0793 54.9534ZM22.2197 33.9456L22.299 49.087L26.1041 44.6477L31.9705 45.5197L22.2197 33.9456Z" fill="black"></path>',9)])])}const Sjt=j(Bjt,[["render",Ijt]]),Tjt={},Djt={width:"124",height:"152",viewBox:"0 0 124 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Rjt(t,e){return M(),_("svg",Djt,[...e[0]||(e[0]=[tn('<path d="M10.5436 0.396484H112.649L123.272 103.216H0.475708L10.5436 0.396484Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 103.612H123.668L113.046 0.317098V0H10.2264L0.0792746 103.216L0 103.612ZM122.876 102.819H0.951324L10.9399 0.792766H112.332L122.876 102.819Z" fill="#9E9E9E"></path><path d="M40.7472 10.2266L39.241 48.6747H83.7933V10.2266H40.7472Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M38.8446 49.071H84.1897H84.269V9.83008H40.3508L38.8446 49.071ZM83.4762 48.2783H39.7166L41.0643 10.6228H83.4762V48.2783Z" fill="#9E9E9E"></path><path d="M39.2408 48.6748L43.1253 64.0541H79.988L83.7932 48.6748H39.2408Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M42.8083 64.4503H80.3052L84.3482 48.2783H38.7653L42.8083 64.4503ZM79.671 63.6576H43.4425L39.7958 49.0711H83.3176L79.671 63.6576Z" fill="#9E9E9E"></path><path d="M64.6088 36.1494L64.371 55.8095L69.6031 50.8152L77.6098 51.3701L64.6088 36.1494Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.1026 59.6938L63.0233 32.7405L80.3052 53.3519L69.9202 51.7664L63.1026 59.6938ZM65.243 38.6861L65.3223 53.8275L69.1275 49.3881L74.9938 50.2602L65.243 38.6861Z" fill="black"></path><path d="M61.7549 130.724H61.3585C52.7176 130.724 45.5829 123.589 45.5829 114.948V101.709C45.5829 93.0686 52.7176 85.9338 61.3585 85.9338H61.7549C70.3958 85.9338 77.5306 93.0686 77.5306 101.709V114.948C77.5306 123.589 70.4751 130.724 61.7549 130.724Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.7902 114.79C44.7902 124.144 52.4005 131.754 61.7549 131.754C71.1093 131.754 78.7197 124.065 78.7197 114.79V101.947C78.7197 92.5928 71.1093 84.9824 61.7549 84.9824C52.4005 84.9824 44.7902 92.5928 44.7902 101.947V114.79ZM47.1684 101.868C47.1684 93.8612 53.6689 87.2814 61.7549 87.2814C69.7617 87.2814 76.3415 93.7819 76.3415 101.868V114.71C76.3415 122.717 69.8409 129.297 61.7549 129.297C53.7482 129.297 47.1684 122.796 47.1684 114.71V101.868Z" fill="#30374B"></path><path d="M61.8341 106.069C60.9621 106.069 60.2487 105.356 60.2487 104.484V100.996C60.2487 100.124 60.9621 99.4104 61.8341 99.4104C62.7062 99.4104 63.4196 100.124 63.4196 100.996V104.484C63.4196 105.356 62.7062 106.069 61.8341 106.069Z" fill="#30374B"></path><path d="M61.8341 97.7457C60.9621 97.7457 60.2487 97.0322 60.2487 96.1602C60.2487 95.2882 60.9621 94.5747 61.8341 94.5747C62.7062 94.5747 63.4196 95.2882 63.4196 96.1602C63.4196 97.0322 62.7062 97.7457 61.8341 97.7457Z" fill="#30374B"></path><path d="M61.8341 110.826C60.9621 110.826 60.2487 110.113 60.2487 109.241C60.2487 108.369 60.9621 107.655 61.8341 107.655C62.7062 107.655 63.4196 108.369 63.4196 109.241C63.4196 110.113 62.7062 110.826 61.8341 110.826Z" fill="#30374B"></path><path d="M61.8342 142.298L67.3834 136.749C67.859 136.273 68.5725 136.273 69.0481 136.749C69.5238 137.224 69.5238 137.938 69.0481 138.414L62.7062 144.756C62.4684 144.993 62.1513 145.073 61.8342 145.073C61.5171 145.073 61.2 144.993 60.9621 144.756L54.6202 138.414C54.1445 137.938 54.1445 137.224 54.6202 136.749C55.0958 136.273 55.8093 136.273 56.2849 136.749L61.8342 142.298Z" fill="#F8C62C"></path><path d="M61.8342 149.195L67.3834 143.646C67.859 143.17 68.5725 143.17 69.0481 143.646C69.5238 144.121 69.5238 144.835 69.0481 145.311L62.7062 151.653C62.4684 151.89 62.1513 151.97 61.8342 151.97C61.5171 151.97 61.2 151.89 60.9621 151.653L54.6202 145.311C54.1445 144.835 54.1445 144.121 54.6202 143.646C55.0958 143.17 55.8093 143.17 56.2849 143.646L61.8342 149.195Z" fill="#F8C62C"></path>',15)])])}const Ljt=j(Tjt,[["render",Rjt]]),_jt={name:"FirstPersonViewHelper",components:{KeyboardNavigate:yjt,KeyboardStorey:Cjt,MouseMove:Ejt,MouseStorey:Sjt,MouseZoom:Ljt},emits:["close"],methods:{close(){this.$emit("close")},clear(){localStorage.setItem("firstPersonViewHelper","false"),this.close()}}},Fjt={class:"bimdata-first-person-view-helper"},Ojt={class:"bimdata-first-person-view-helper__header"},Ujt={class:"bimdata-first-person-view-helper__content"},Njt={class:"bimdata-first-person-view-helper__content__main"},jjt={class:"bimdata-first-person-view-helper__content__main__left"},Vjt={class:"bimdata-first-person-view-helper__content__main__left__element"},zjt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},Hjt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},qjt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},Qjt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Gjt={class:"bimdata-first-person-view-helper__content__main__left__element"},Kjt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},Jjt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},Zjt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},Wjt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Yjt={class:"bimdata-first-person-view-helper__content__main__left__element"},Xjt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},$jt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},eVt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},tVt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},iVt={class:"bimdata-first-person-view-helper__content__main__right"},oVt={class:"bimdata-first-person-view-helper__content__main__right__title"},rVt={class:"bimdata-first-person-view-helper__content__main__right__content"},nVt={class:"bimdata-first-person-view-helper__content__main__right__content__picture"},aVt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},sVt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},lVt={class:"bimdata-first-person-view-helper__content__main__right__content__text"},cVt={class:"bimdata-first-person-view-helper__content__footer"},dVt={class:"bimdata-first-person-view-helper__footer-buttons"};function uVt(t,e,i,o,r,n){const a=I("KeyboardNavigate"),s=I("MouseMove"),l=I("MouseZoom"),c=I("MouseStorey"),d=I("KeyboardStorey"),u=I("BIMDataButton");return M(),_("div",Fjt,[w("h1",Ojt,z(t.$t("viewer3d.firstPersonViewHelper.title")),1),w("div",Ujt,[w("div",Njt,[w("div",jjt,[w("div",Vjt,[w("div",zjt,[D(a)]),w("div",Hjt,[w("h4",qjt,z(t.$t("viewer3d.firstPersonViewHelper.keyboardUsage")),1),w("ul",Qjt,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.forward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.backward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.left")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.right")),1)])])]),w("div",Gjt,[w("div",Kjt,[D(s)]),w("div",Jjt,[w("h4",Zjt,z(t.$t("viewer3d.firstPersonViewHelper.mouseOrientation")),1),w("ul",Wjt,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.pressLeft")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseMove")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseVertical")),1)])])]),w("div",Yjt,[w("div",Xjt,[D(l)]),w("div",$jt,[w("h4",eVt,z(t.$t("viewer3d.firstPersonViewHelper.mouseZoom")),1),w("ul",tVt,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseWheelForward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseWheelBackward")),1)])])])]),w("div",iVt,[w("h4",oVt,z(t.$t("viewer3d.firstPersonViewHelper.changeStorey")),1),w("div",rVt,[w("div",nVt,[w("div",aVt,[D(c)]),w("div",sVt,[D(d)])]),w("div",lVt,[w("ul",null,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.storeyClick")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.moveCameraToObject")),1)]),w("ul",null,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.keyboardStoreyChange")),1)])])])])]),w("div",cVt,z(t.$t("viewer3d.firstPersonViewHelper.contentFooter")),1)]),w("div",dVt,[D(u,{color:"primary",fill:"",radius:"",width:"200px",onClick:n.close},{default:N(()=>[Je(z(t.$t("viewer3d.firstPersonViewHelper.understand")),1)]),_:1},8,["onClick"]),D(u,{color:"primary",outline:"",radius:"",width:"200px",onClick:n.clear},{default:N(()=>[Je(z(t.$t("viewer3d.firstPersonViewHelper.noRecall")),1)]),_:1},8,["onClick"])])])}const qte=j(_jt,[["render",uVt],["__scopeId","data-v-77cce9d5"]]),hVt={components:{ShortcutsModal:i7,FirstPersonViewHelper:qte},data(){const t=this.$t;return{tabs:[{id:0,get label(){return t("viewer3d.modals.3d")}},{id:1,get label(){return t("viewer3d.modals.firstPerson")}}],activeTab:0,elements:[{image:"shortcutRotate",title:this.$t("shortcuts-helper.title_rotate"),text:this.$t("shortcuts-helper.text_rotate")},{image:"shortcutZoom",title:this.$t("shortcuts-helper.title_zoom"),text:this.$t("shortcuts-helper.text_zoom")},{image:"shortcutOpen",title:this.$t("shortcuts-helper.title_open"),text:this.$t("shortcuts-helper.text_open")}],shortcuts:[{letter:"F",text:this.$t("context_menu.fit_view")},{letter:"C",text:this.$t("context_menu.select_all")},{letter:"V",text:this.$t("context_menu.deselect_all")},{letter:"H",text:this.$t("context_menu.hide")},{letter:"Y",text:this.$t("context_menu.select_similar")},{letter:"I",text:this.$t("context_menu.isolate")},{letter:"U",text:this.$t("context_menu.reintegrate")},{letter:"R",text:this.$t("context_menu.show_all")},{letter:"1",text:this.$t("shortcuts-helper.shortcut_1")},{letter:"2",text:this.$t("shortcuts-helper.shortcut_2")},{letter:"3",text:this.$t("shortcuts-helper.shortcut_3")},{letter:"4",text:this.$t("shortcuts-helper.shortcut_4")},{letter:"5",text:this.$t("shortcuts-helper.shortcut_5")},{letter:"6",text:this.$t("shortcuts-helper.shortcut_6")},{maj:!0,text:this.$t("shortcuts-helper.shortcut_pan"),illustration:"click"},{alt:!0,text:this.$t("shortcuts-helper.shortcut_open"),illustration:"click"},{shift:!0,text:this.$t("shortcuts-helper.shortcut_multiselect"),illustration:"click"}]}}},pVt={class:"bimdata-shortcuts-helper__header"};function fVt(t,e,i,o,r,n){const a=I("BIMDataTabs"),s=I("ShortcutsModal"),l=I("FirstPersonViewHelper");return M(),_("div",null,[w("div",pVt,[D(a,{tabs:r.tabs,width:"490px",height:"44px",tabSize:"245",onTabSelected:e[0]||(e[0]=c=>r.activeTab=r.tabs.indexOf(c)),selected:r.activeTab},null,8,["tabs","selected"])]),r.activeTab===0?(M(),K(s,{key:0,elements:r.elements,shortcuts:r.shortcuts,onClose:e[1]||(e[1]=c=>t.$emit("close"))},{title:N(()=>[Je(z(t.$t("shortcuts-helper.title_modal")),1)]),_:1},8,["elements","shortcuts"])):(M(),K(l,{key:1,onClose:e[2]||(e[2]=c=>t.$emit("close"))}))])}const AVt=j(hVt,[["render",fVt],["__scopeId","data-v-a26872a0"]]),gVt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M1.20102%2023.5V24.5H2.20102H10.261C11.4116%2029.9278%2016.2295%2034%2022%2034C27.7705%2034%2032.5884%2029.9278%2033.739%2024.5H41.799H42.799V23.5V20.5V19.5H41.799H33.739C32.5884%2014.0722%2027.7705%2010%2022%2010C16.2295%2010%2011.4116%2014.0722%2010.261%2019.5H2.20102H1.20102V20.5V23.5ZM14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",mVt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M6.23222%2034.2322L5.52512%2034.9393L6.23222%2035.6464L8.35354%2037.7678L9.06065%2038.4749L9.76776%2037.7678L15.4677%2032.0678C17.3477%2033.2898%2019.592%2034%2022%2034C24.408%2034%2026.6523%2033.2898%2028.5323%2032.0678L34.2322%2037.7678L34.9393%2038.4749L35.6464%2037.7678L37.7678%2035.6465L38.4749%2034.9393L37.7678%2034.2322L32.0678%2028.5323C33.2898%2026.6523%2034%2024.408%2034%2022C34%2019.592%2033.2898%2017.3477%2032.0678%2015.4677L37.7678%209.76776L38.4749%209.06065L37.7678%208.35354L35.6464%206.23222L34.9393%205.52512L34.2322%206.23222L28.5322%2011.9322C26.6523%2010.7102%2024.408%2010%2022%2010C19.592%2010%2017.3477%2010.7102%2015.4677%2011.9322L9.76776%206.23224L9.06065%205.52513L8.35354%206.23224L6.23222%208.35356L5.52512%209.06066L6.23222%209.76777L11.9322%2015.4678C10.7102%2017.3477%2010%2019.592%2010%2022C10%2024.408%2010.7102%2026.6523%2011.9322%2028.5323L6.23222%2034.2322ZM14.619%2022C14.619%2017.9236%2017.9236%2014.6191%2022%2014.6191C26.0764%2014.6191%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",vVt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",yVt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C23.8642%2014.619%2025.5667%2015.3094%2026.8665%2016.4504L14.7593%2023.4405C14.6673%2022.9751%2014.619%2022.4935%2014.619%2022ZM29.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C20.0879%2029.381%2018.3459%2028.6547%2017.0341%2027.4608L29.2136%2020.4289C29.3232%2020.9347%2029.381%2021.4602%2029.381%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",bVt="data:image/svg+xml,%3csvg%20width='33'%20height='33'%20viewBox='0%200%2033%2033'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.70001%2016.8667V17.3667H2.20001H7.33335H7.83335V16.8667V16.1333V15.6333H7.33335L2.20001%2015.6333H1.70001V16.1333L1.70001%2016.8667ZM30.8%2017.3667H31.3V16.8667V16.1333V15.6333H30.8L25.6667%2015.6333H25.1667V16.1333V16.8667V17.3667H25.6667H30.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3cpath%20d='M16.1333%201.70001L15.6333%201.70001L15.6333%202.20001L15.6333%207.33335L15.6333%207.83335L16.1333%207.83335L16.8667%207.83335L17.3667%207.83335L17.3667%207.33335L17.3667%202.20001L17.3667%201.70001L16.8667%201.70001L16.1333%201.70001ZM15.6333%2030.8L15.6333%2031.3L16.1333%2031.3L16.8667%2031.3L17.3667%2031.3L17.3667%2030.8L17.3667%2025.6667L17.3667%2025.1667L16.8667%2025.1667L16.1333%2025.1667L15.6333%2025.1667L15.6333%2025.6667L15.6333%2030.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3c/svg%3e",wVt={0:{positions:[36.5625,31.640625,36.5625,19.51171875,36.42067337036133,16.11605453491211,35.99519348144531,13.020120620727539,35.28605651855469,10.223917961120605,34.293270111083984,7.727446556091309,33.01683044433594,5.530706882476807,30.959993362426758,3.3593661785125732,28.725576400756836,1.6479235887527466,26.31357765197754,.39637935161590576,23.723995208740234,-.39526674151420593,20.956830978393555,-.7270146012306213,20.3203125,-.73828125,17.307449340820312,-.5108020901679993,14.569392204284668,.17163534462451935,12.106142044067383,1.3090311288833618,9.917699813842773,2.9013850688934326,8.174575805664062,5.153988838195801,6.733142375946045,7.555612087249756,5.593398094177246,10.106253623962402,4.755343437194824,12.805914878845215,4.218978404998779,15.654594421386719,3.9843032360076904,18.652292251586914,3.97265625,19.51171875,3.97265625,31.640625,4.115384578704834,35.0230827331543,4.543569564819336,38.11090850830078,5.257210731506348,40.904109954833984,6.256308555603027,43.40268325805664,7.540863037109375,45.606624603271484,9.608292579650879,47.79111099243164,11.846480369567871,49.51402282714844,14.255425453186035,50.775352478027344,16.835128784179688,51.57510757446289,19.585588455200195,51.91328811645508,20.25,51.92578125,23.26165771484375,51.697608947753906,25.997068405151367,51.013092041015625,28.456228256225586,49.872230529785156,30.639141082763672,48.2750244140625,32.375572204589844,46.0158576965332,33.81153869628906,43.60895538330078,34.947044372558594,41.0543212890625,35.78208923339844,38.35194778442383,36.31666946411133,35.5018424987793,36.55078887939453,32.50400161743164,36.5625,31.640625,29.63671875,18.10546875,29.63671875,33.1171875,29.450082778930664,36.561954498291016,28.89017677307129,39.497215270996094,27.956998825073242,41.92298126220703,25.967069625854492,44.22639083862305,23.724157333374023,45.72625732421875,21.228260040283203,46.422576904296875,20.25,46.4765625,17.354780197143555,46.07659912109375,14.97888469696045,44.876708984375,13.33356761932373,42.470394134521484,12.110569953918457,39.9057731628418,11.309891700744629,37.1828498840332,10.931534767150879,34.30161666870117,10.8984375,33.1171875,10.8984375,18.10546875,11.085087776184082,14.669450759887695,11.645040512084961,11.733874320983887,12.578293800354004,9.298736572265625,14.569818496704102,6.974865436553955,16.804428100585938,5.454482555389404,19.282119750976562,4.737586975097656,20.3203125,4.67578125,23.212167739868164,5.077450752258301,25.581016540527344,6.282459735870361,27.21183204650879,8.69408893585205,28.425546646118164,11.263723373413086,29.2221622467041,13.991360664367676,29.6016788482666,16.877002716064453],indices:[0,2,1,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,63,62,61,24,62,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,0,45,0,4,2,4,8,6,8,12,10,12,16,14,16,20,18,20,24,22,24,64,63,60,24,61,24,28,26,28,32,30,32,36,34,36,40,38,40,44,42,44,4,0,4,12,8,12,20,16,20,64,24,59,24,60,24,32,28,32,40,36,40,4,44,20,65,64,58,24,59,20,66,65,57,24,58,12,66,20,57,32,24,12,67,66,56,32,57,12,68,67,55,32,56,12,69,68,54,32,55,12,70,69,53,32,54,12,71,70,53,40,32,4,71,12,52,40,53,4,72,71,51,40,52,4,73,72,50,40,51,4,74,73,49,40,50,4,75,74,48,40,49,4,76,75,47,40,48,40,76,4,76,40,47],width:32.58984375},1:{positions:[23.94140625,51.1875,23.94140625,0,17.015625,0,17.015625,44.4375,6.5390625,44.296875,6.5390625,49.2890625],indices:[0,2,1,3,5,4,0,3,2,3,0,5],width:17.40234375},2:{positions:[37.3359375,5.4140625,37.3359375,0,4.1484375,0,4.1484375,4.74609375,20.91796875,23.37890625,23.33412742614746,26.180971145629883,25.239078521728516,28.61744499206543,26.632823944091797,30.68832778930664,27.938528060913086,33.606327056884766,28.560094833374023,36.34145736694336,28.6171875,37.40625,28.23740577697754,40.36100769042969,27.09806251525879,42.90309143066406,24.87748908996582,45.0150146484375,22.4631290435791,46.19827651977539,20.4609375,46.4765625,17.237478256225586,46.17487716674805,14.632962226867676,45.26981735229492,12.647390365600586,43.76138687133789,11.200069427490234,41.599464416503906,10.360716819763184,38.91020965576172,10.125,36.10546875,3.48046875,36.10546875,3.41015625,36.31640625,3.580944538116455,39.24900436401367,4.255249977111816,41.95781326293945,5.433072566986084,44.442840576171875,7.114412784576416,46.704078674316406,9.256887435913086,48.52997589111328,11.61109447479248,49.96455383300781,14.177034378051758,51.007816314697266,16.954708099365234,51.659759521484375,19.944114685058594,51.920387268066406,20.4609375,51.92578125,23.575925827026367,51.698787689208984,26.37569808959961,51.01780319213867,28.86025619506836,49.88283157348633,31.029598236083984,48.29386901855469,32.93091583251953,46.07616424560547,34.31552505493164,43.65195846557617,35.18342971801758,41.0212516784668,35.53462600708008,38.18403625488281,35.54296875,37.65234375,35.271297454833984,34.8802490234375,34.45627975463867,32.10430145263672,33.097923278808594,29.324501037597656,31.655981063842773,27.067161560058594,29.948768615722656,24.73398208618164,27.976285934448242,22.324962615966797,26.12109375,20.25,12.65625,5.58984375,12.7265625,5.4140625],indices:[51,1,0,1,3,2,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,51,3,1,19,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,3,51,18,22,19,22,30,26,30,38,34,38,46,42,46,3,50,18,30,22,46,4,3,17,30,18,46,5,4,16,30,17,46,6,5,15,30,16,46,7,6,14,30,15,46,8,7,13,30,14,38,8,46,13,38,30,38,9,8,12,38,13,38,10,9,11,38,12,38,11,10],width:33.92578125},3:{positions:[13.640625,23.37890625,13.640625,28.79296875,19.6875,28.79296875,22.903934478759766,29.15167236328125,25.282482147216797,30.227783203125,26.954715728759766,32.621280670166016,27.896883010864258,35.25688171386719,28.125,37.51171875,27.781084060668945,40.67007064819336,26.749338150024414,43.162776947021484,24.544097900390625,45.051876068115234,22.03769302368164,46.1552734375,19.51171875,46.4765625,16.51466941833496,46.0916633605957,14.03652286529541,44.93696212768555,12.056009292602539,42.62509536743164,10.906388282775879,40.13740539550781,10.58203125,37.79296875,3.9375,37.79296875,3.8671875,38.00390625,4.073190689086914,40.847023010253906,4.870357036590576,43.464176177978516,6.258687496185303,45.85536193847656,8.649903297424316,47.949581146240234,11.105090141296387,49.6024169921875,13.624245643615723,50.81385803222656,16.207372665405273,51.58391189575195,18.854469299316406,51.912574768066406,19.51171875,51.92578125,22.69034194946289,51.71705627441406,25.550539016723633,51.090885162353516,28.09231185913086,50.04726028442383,30.315656661987305,48.58618927001953,32.206153869628906,46.54783248901367,33.6175651550293,44.22849655151367,34.54988479614258,41.62818145751953,35.00312423706055,38.74688720703125,35.05078125,37.37109375,34.68306350708008,34.60222244262695,33.579917907714844,31.84009552001953,31.788928985595703,29.416330337524414,29.652488708496094,27.526569366455078,27.38671875,26.26171875,30.2706241607666,24.998523712158203,32.5009765625,23.31671142578125,34.190120697021484,20.399517059326172,35.28596115112305,17.665790557861328,35.78849792480469,15.115530967712402,35.82421875,14.2734375,35.583168029785156,11.223187446594238,34.860015869140625,8.486950874328613,33.65475845336914,6.064727306365967,31.9674015045166,3.9565165042877197,29.64410972595215,2.185784339904785,27.159265518188477,.8323085308074951,24.512863159179688,-.10391119122505188,21.704906463623047,-.6228747963905334,19.51171875,-.73828125,16.397254943847656,-.535150945186615,13.541664123535156,.07424008101224899,10.9449462890625,1.089891791343689,8.607102394104004,2.5118041038513184,6.504549980163574,4.569301605224609,4.957869052886963,6.847413539886475,3.9670591354370117,9.34614086151123,3.5321204662323,12.065483093261719,3.515625,13.2890625,3.62109375,13.5,10.23046875,13.5,10.628458976745605,10.52513313293457,11.822431564331055,8.080921173095703,14.14232063293457,6.207763671875,16.670166015625,5.072887420654297,19.405969619750977,4.6762919425964355,19.51171875,4.67578125,22.593053817749023,5.02486515045166,25.119962692260742,6.072116374969482,27.08766746520996,8.277663230895996,28.33972930908203,10.727699279785156,28.876150131225586,13.422224998474121,28.8984375,14.1328125,28.579307556152344,17.37627601623535,27.621917724609375,19.90043067932129,25.462261199951172,21.754257202148438,22.976253509521484,22.91082000732422,20.163896560668945,23.3701229095459,19.6875,23.37890625],indices:[86,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,50,52,51,52,54,53,54,56,55,56,58,57,58,60,59,60,62,61,62,64,63,64,66,65,66,68,67,85,1,86,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,54,52,54,58,56,58,62,60,62,66,64,66,69,68,84,1,85,14,18,15,18,26,22,26,34,30,34,42,38,42,50,46,50,58,54,58,66,62,66,70,69,83,1,84,14,26,18,58,70,66,83,2,1,13,26,14,58,71,70,82,2,83,12,26,13,58,72,71,82,3,2,11,26,12,58,73,72,82,4,3,10,26,11,58,74,73,81,4,82,10,34,26,58,75,74,9,34,10,50,75,58,8,34,9,50,76,75,7,34,8,50,77,76,6,34,7,50,78,77,5,34,6,50,79,78,5,42,34,50,80,79,4,42,5,50,81,80,81,42,4,42,81,50],width:32.30859375},4:{positions:[31.81640625,51.1875,31.81640625,17.2265625,38.8828125,17.2265625,38.8828125,11.8125,31.81640625,11.8125,31.81640625,0,24.92578125,0,24.92578125,11.8125,1.93359375,11.8125,1.93359375,15.71484375,24.50390625,51.1875,31.81640625,51.1875,24.046875,39.515625,9.31640625,17.2265625,24.92578125,17.2265625,24.92578125,41.23828125,24.71484375,41.2734375],indices:[1,3,2,4,6,5,7,9,8,9,14,13,16,13,12,13,10,9,10,1,0,1,4,3,4,7,6,7,14,9,16,10,13,10,4,1,4,14,7,15,10,16,4,15,14,15,4,10],width:36.94921875},5:{positions:[11.91796875,22.5,6.15234375,23.09765625,9.10546875,51.1875,34.734375,51.1875,34.734375,45.03515625,14.9765625,45.03515625,13.2890625,30.65625,14.99853515625,31.75048828125,16.892578125,32.642578125,19.03271484375,33.25341796875,21.48046875,33.50390625,21.48046875,33.50390625,24.524171829223633,33.29277038574219,27.260135650634766,32.595733642578125,29.6883602142334,31.412792205810547,31.808847427368164,29.743946075439453,33.53106689453125,27.481525421142578,34.8779411315918,25.034576416015625,35.84947204589844,22.40309715270996,36.44565963745117,19.58709144592285,36.66650390625,16.586557388305664,36.66796875,16.3125,36.47660446166992,13.1383056640625,35.90251541137695,10.244234085083008,34.94569778442383,7.630287170410156,33.60615158081055,5.296463966369629,31.54420280456543,3.2312631607055664,29.28870391845703,1.597025990486145,26.839656829833984,.3937528729438782,24.197057723999023,-.3785564601421356,21.360912322998047,-.7199019193649292,20.49609375,-.73828125,17.404800415039062,-.5199803113937378,14.58151912689209,.13492262363433838,12.026251792907715,1.226427435874939,9.738997459411621,2.7545342445373535,7.902623653411865,4.662389278411865,6.586172580718994,6.943535327911377,5.78964376449585,9.59797191619873,5.513038158416748,12.625699043273926,5.51953125,13.25390625,5.58984375,13.46484375,11.84765625,13.46484375,12.231374740600586,10.424592018127441,13.382529258728027,7.983725547790527,15.769926071166992,6.059262275695801,18.29474449157715,4.960567474365234,20.49609375,4.67578125,23.407373428344727,5.077446937561035,25.80744171142578,6.282444000244141,27.603513717651367,8.744783401489258,28.85628890991211,11.317317962646484,29.565767288208008,14.000046730041504,29.7421875,16.2421875,29.464466094970703,19.35067367553711,28.631298065185547,22.06241226196289,26.50613021850586,24.628503799438477,24.30402374267578,26.380647659301758,22.024982452392578,27.31884002685547,20.49609375,27.4921875,17.11406707763672,27.2115478515625,14.758378028869629,26.369632720947266,13.049945831298828,24.7330322265625],indices:[2,4,3,6,8,7,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,2,5,4,6,9,8,12,16,14,16,20,18,20,24,22,24,28,26,28,32,30,32,36,34,36,40,38,40,43,42,1,5,2,12,20,16,20,28,24,28,36,32,36,43,40,1,6,5,36,44,43,1,9,6,36,45,44,28,45,36,28,46,45,28,47,46,28,48,47,28,49,48,20,49,28,20,50,49,20,51,50,20,52,51,20,53,52,20,54,53,20,55,54,12,55,20,12,56,55,12,57,56,12,58,57,12,59,58,12,60,59,12,61,60,1,11,9,11,61,12,62,1,0,1,61,11,61,1,62],width:31.154930591583252},6:{positions:[23.73046875,51.92578125,23.73046875,51.92578125,26.35400390625,51.7763671875,28.951171875,51.328125,31.31103515625,50.6513671875,33.22265625,49.81640625,33.22265625,49.81640625,31.74609375,44.5078125,29.98388671875,45.30322265625,28.142578125,45.931640625,26.09912109375,46.34033203125,23.73046875,46.4765625,23.73046875,46.4765625,20.900758743286133,46.15056610107422,18.386611938476562,45.17258071899414,16.18802833557129,43.5426025390625,14.465424537658691,41.076210021972656,13.138894081115723,38.50679397583008,12.208439826965332,35.8343505859375,11.67405891418457,33.05888366699219,11.53125,30.62109375,11.53125,29.8125,13.904020309448242,31.542055130004883,16.591995239257812,32.85417938232422,19.408527374267578,33.66147994995117,22.372249603271484,33.98829650878906,22.921875,33.99609375,25.913307189941406,33.7476806640625,28.614002227783203,33.002437591552734,31.023962020874023,31.7603702545166,33.143184661865234,30.021472930908203,34.91127014160156,27.67707633972168,36.273963928222656,25.183759689331055,37.23126983642578,22.541519165039062,37.783180236816406,19.750356674194336,37.93359375,17.2265625,37.749637603759766,14.08007526397705,37.19777297973633,11.182336807250977,36.27799606323242,8.533347129821777,34.99031066894531,6.1331071853637695,32.81218719482422,3.8232548236846924,30.5310001373291,1.9849358797073364,28.146751403808594,.6181499361991882,25.65943717956543,-.2771027684211731,23.069063186645508,-.7008222937583923,22.0078125,-.73828125,19.07733154296875,-.5163767337799072,16.358732223510742,.14933684468269348,13.852017402648926,1.2588595151901245,11.557185173034668,2.8121912479400635,9.638298988342285,5.0737128257751465,8.030496597290039,7.450648784637451,6.733777046203613,9.942998886108398,5.748140335083008,12.550763130187988,5.073586463928223,15.273941993713379,4.710115432739258,18.112533569335938,4.640625,20.07421875,4.640625,29.84765625,4.791966915130615,33.015262603759766,5.245992183685303,35.97719955444336,6.0027008056640625,38.73346710205078,7.062093257904053,41.28406524658203,8.424168586730957,43.62899398803711,10.08892822265625,45.768253326416016,12.196839332580566,47.81597900390625,14.478988647460938,49.4511604309082,16.93537712097168,50.673797607421875,19.56600570678711,51.483890533447266,22.370872497558594,51.881439208984375,21.375,28.828125,21.375,28.828125,18.29266357421875,28.514667510986328,15.669046401977539,27.57429313659668,13.216089248657227,25.754901885986328,11.53125,23.5546875,11.53125,23.5546875,11.53125,19.40625,11.72034740447998,16.05575180053711,12.287637710571289,13.114592552185059,13.233122825622559,10.582772254943848,15.422850608825684,7.959404945373535,17.641748428344727,6.1007585525512695,19.889812469482422,5.006833076477051,22.0078125,4.67578125,24.755970001220703,5.117502212524414,27.043012619018555,6.4426655769348145,28.768321990966797,9.139809608459473,30.00419807434082,11.825053215026855,30.75064468383789,14.498397827148438,31.007658004760742,17.15984344482422,31.0078125,17.2265625,30.737268447875977,20.334959030151367,29.925634384155273,23.062726974487305,28.57291030883789,25.409866333007812,26.557069778442383,27.331403732299805,24.112672805786133,28.470571517944336],indices:[2,4,3,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,65,67,66,21,25,23,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,61,59,61,65,63,65,68,67,21,29,25,29,37,33,37,45,41,45,53,49,57,65,61,57,68,65,73,57,74,68,2,1,2,6,4,6,8,7,53,75,57,72,57,73,68,6,2,6,9,8,53,76,75,71,57,72,68,9,6,53,77,76,70,57,71,68,10,9,53,78,77,68,12,10,53,79,78,68,13,12,45,79,53,68,14,13,45,80,79,68,15,14,45,81,80,57,15,68,45,82,81,57,16,15,45,83,82,57,17,16,45,84,83,57,18,17,37,84,45,57,19,18,37,85,84,57,20,19,37,86,85,57,21,20,37,87,86,70,21,57,37,88,87,70,29,21,37,89,88,95,29,70,37,90,89,94,29,95,29,90,37,93,29,94,29,91,90,92,29,93,29,92,91],width:33.29296875},7:{positions:[37.3359375,51.1875,37.3359375,45.73828125,35.06884002685547,42.96620559692383,32.99747848510742,40.27573776245117,31.121856689453125,37.666873931884766,29.441970825195312,35.13961410522461,27.957822799682617,32.6939582824707,26.669410705566406,30.329906463623047,25.576738357543945,28.047460556030273,24.585519790649414,25.34857940673828,23.679515838623047,22.592660903930664,22.85872459411621,19.779708862304688,22.123149871826172,16.909719467163086,21.47278594970703,13.982696533203125,20.907638549804688,10.998638153076172,20.427703857421875,7.957544803619385,20.109375,5.51953125,19.546875,0,12.62109375,0,13.18359375,5.51953125,13.624162673950195,8.682632446289062,14.162458419799805,11.7554292678833,14.798481941223145,14.737921714782715,15.532232284545898,17.630107879638672,16.363710403442383,20.431991577148438,17.29291534423828,23.14356803894043,18.319847106933594,25.764841079711914,19.59184455871582,28.50404167175293,20.94556999206543,31.184146881103516,22.381019592285156,33.80515670776367,23.898197174072266,36.367069244384766,25.497098922729492,38.86988830566406,27.17772674560547,41.31361389160156,28.940080642700195,43.6982421875,30.55078125,45.73828125,2.70703125,45.73828125,2.70703125,51.1875],indices:[36,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,1,36,14,18,15,18,26,22,26,34,30,34,2,1,13,18,14,18,34,26,34,3,2,12,18,13,34,4,3,11,18,12,34,5,4,10,18,11,34,6,5,9,18,10,34,7,6,8,18,9,34,8,7,8,34,18],width:34.62890625},8:{positions:[35.5078125,37.828125,35.5078125,37.828125,35.171749114990234,34.87995147705078,34.16355895996094,32.23108673095703,32.111854553222656,29.74087905883789,29.926387786865234,27.833354949951172,27.60715675354004,26.50851058959961,27.17578125,26.33203125,29.95149040222168,25.094419479370117,32.32651901245117,23.460092544555664,34.43555450439453,20.72713279724121,35.900413513183594,18.128986358642578,36.721099853515625,15.665656089782715,36.9140625,13.8515625,36.669769287109375,10.764041900634766,35.936893463134766,8.031349182128906,34.71543502807617,5.653482913970947,33.00539016723633,3.630444288253784,30.672534942626953,1.9876797199249268,28.159135818481445,.7305349111557007,25.465194702148438,-.14099019765853882,22.590709686279297,-.6268956065177917,20.28515625,-.73828125,17.073928833007812,-.5518752932548523,14.154998779296875,.007342617027461529,11.52836799621582,.9393724799156189,9.194035530090332,2.2442142963409424,7.087226867675781,4.249664306640625,5.474374294281006,6.483748912811279,4.355478763580322,8.946466445922852,3.730539560317993,11.637818336486816,3.5859375,13.8515625,3.9077277183532715,16.76708984375,4.873098373413086,19.430402755737305,6.983664512634277,21.999971389770508,9.1663179397583,24.03520965576172,11.421058654785156,25.536113739013672,13.21875,26.33203125,10.521642684936523,27.690086364746094,8.310940742492676,29.498327255249023,6.554880142211914,32.2148551940918,5.462681293487549,34.86786651611328,5.034343719482422,37.45735549926758,5.02734375,37.828125,5.274991512298584,40.936737060546875,6.0179338455200195,43.679622650146484,7.256171703338623,46.056785583496094,8.989704132080078,48.0682258605957,11.195730209350586,49.67716598510742,13.679861068725586,50.85453796386719,16.442096710205078,51.60033416748047,19.482437133789062,51.914554595947266,20.21484375,51.92578125,23.33972930908203,51.71018600463867,26.17371940612793,51.06340789794922,28.716812133789062,49.98543930053711,30.96900749206543,48.476287841796875,32.855812072753906,46.481101989746094,34.23870849609375,44.16929626464844,35.11769485473633,41.54087829589844,35.49277114868164,38.5958366394043,30.0234375,13.9921875,30.0234375,13.9921875,29.64218521118164,16.91078758239746,28.498428344726562,19.414352416992188,26.08045768737793,21.54735565185547,23.622779846191406,22.934738159179688,21.125396728515625,23.576496124267578,20.21484375,23.625,17.24955177307129,23.25731658935547,14.728343963623047,22.15427017211914,12.576437950134277,19.76153564453125,11.184748649597168,17.31914710998535,10.553275108337402,14.827102661132812,10.51171875,13.9921875,10.887092590332031,10.988458633422852,12.013215065002441,8.51321792602539,14.405669212341309,6.533318519592285,16.906885147094727,5.263905048370361,19.516860961914062,4.704977512359619,20.28515625,4.67578125,23.29867172241211,5.026233196258545,25.858081817626953,6.077588081359863,28.013742446899414,8.338984489440918,29.392438888549805,10.737264633178711,29.994173049926758,13.27242660522461,28.58203125,37.6875,28.58203125,37.6875,28.174694061279297,40.610374450683594,26.952680587768555,43.08668899536133,24.61227035522461,45.108375549316406,22.137697219848633,46.228328704833984,20.21484375,46.4765625,17.313322067260742,46.03565979003906,14.926724433898926,44.71294403076172,13.154691696166992,42.36640930175781,12.172061920166016,39.77567672729492,11.953125,37.6875,12.353304862976074,34.70274353027344,13.553845405578613,32.25563430786133,15.877814292907715,30.335918426513672,18.399682998657227,29.288454055786133,20.28515625,29.07421875,23.187891006469727,29.511512756347656,25.59459114074707,30.82339859008789,27.39614486694336,33.1435661315918,28.379940032958984,35.7212028503418],indices:[96,43,97,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,1,60,1,3,2,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,75,74,73,31,74,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,98,97,95,43,96,43,47,45,47,51,49,51,55,53,55,59,57,59,3,1,3,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,76,75,72,31,73,31,35,33,37,41,39,41,98,43,94,43,95,43,51,47,51,59,55,59,7,3,7,15,11,15,23,19,23,31,27,31,77,76,71,31,72,31,37,35,37,98,41,94,51,43,23,77,31,70,31,71,37,99,98,93,51,94,23,78,77,70,37,31,37,100,99,92,51,93,23,79,78,69,37,70,37,101,100,91,51,92,23,80,79,68,37,69,37,102,101,90,51,91,23,81,80,67,37,68,37,103,102,89,51,90,15,81,23,66,37,67,89,59,51,15,82,81,66,103,37,88,59,89,15,83,82,65,103,66,87,59,88,15,84,83,64,103,65,106,59,87,15,85,84,64,104,103,105,59,106,15,62,85,63,104,64,104,59,105,15,63,62,104,7,59,7,63,15,63,7,104],width:33.328125},9:{positions:[17.96484375,4.67578125,17.96484375,4.67578125,20.832611083984375,5.023819923400879,23.333181381225586,6.067935943603516,25.466554641723633,7.80812931060791,26.91764259338379,9.993691444396973,28.0020751953125,12.483912467956543,28.7198543548584,15.278792381286621,29.070980072021484,18.378332138061523,29.109375,19.8984375,29.109375,22.21875,27.17138671875,20.02587890625,24.802734375,18.439453125,22.097061157226562,17.482282638549805,19.10603904724121,17.156333923339844,19.0546875,17.15625,15.962648391723633,17.374753952026367,13.161947250366211,18.030263900756836,10.65258502960205,19.12278175354004,8.43455982208252,20.652305603027344,6.556478023529053,22.870075225830078,5.067807197570801,25.25521469116211,3.968548536300659,27.80772590637207,3.2587015628814697,30.527606964111328,2.9382660388946533,33.414859771728516,2.91796875,34.3828125,3.1171858310699463,37.45964050292969,3.7148373126983643,40.29710006713867,4.710922718048096,42.89520263671875,6.105442523956299,45.253936767578125,8.45276927947998,47.5704231262207,10.840720176696777,49.39479446411133,13.269293785095215,50.72705078125,15.738492012023926,51.56719207763672,18.248313903808594,51.915218353271484,18.7734375,51.92578125,21.87710189819336,51.72084045410156,24.703197479248047,51.10601806640625,27.25172233581543,50.0813102722168,29.52267837524414,48.646724700927734,31.40683364868164,46.456634521484375,32.97002410888672,44.11880111694336,34.212249755859375,41.63322067260742,35.133514404296875,38.99989700317383,35.73381423950195,36.21882629394531,36.01314926147461,33.29001235961914,36.03515625,32.16796875,36.03515625,19.96875,35.885276794433594,16.642547607421875,35.435638427734375,13.59611988067627,34.686241149902344,10.8294677734375,33.6370849609375,8.34259033203125,32.28816604614258,6.135488033294678,30.066654205322266,3.964623212814331,27.738887786865234,2.2044835090637207,25.30486488342285,.8550683259963989,22.764589309692383,-.08362190425395966,20.118059158325195,-.6115872859954834,17.96484375,-.73828125,15.23583984375,-.61083984375,12.462890625,-.228515625,9.81298828125,.41748046875,7.453125,1.3359375,7.453125,1.3359375,8.5078125,6.64453125,10.62158203125,5.71728515625,12.814453125,5.115234375,15.21826171875,4.78564453125,17.96484375,4.67578125,19.0546875,22.5703125,19.0546875,22.5703125,22.15691566467285,22.88543701171875,24.769695281982422,23.830808639526367,27.256725311279297,25.793380737304688,28.883312225341797,27.970977783203125,29.109375,28.44140625,29.109375,32.87109375,28.917926788330078,36.28435516357422,28.34358024597168,39.213134765625,27.386337280273438,41.657432556152344,25.37175941467285,43.94849395751953,23.127288818359375,45.50687026977539,20.652921676635742,46.33256530761719,18.984375,46.4765625,16.33090591430664,46.012935638427734,13.984920501708984,44.62206268310547,12.139910697937012,42.07911682128906,10.835031509399414,39.48687744140625,10.070281982421875,36.84534454345703,9.84375,34.3828125,10.09748363494873,31.21339988708496,10.858684539794922,28.454280853271484,12.127352714538574,26.105453491210938,14.162574768066406,24.085222244262695,16.57485580444336,22.90838050842285],indices:[60,63,61,63,65,64,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,89,25,88,25,89,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,63,60,63,66,65,10,14,12,14,18,16,18,22,20,22,89,24,87,25,88,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,63,59,63,67,66,10,18,14,18,89,22,86,25,87,25,33,29,33,41,37,41,49,45,49,57,53,57,67,63,18,90,89,85,25,86,57,1,67,18,91,90,85,33,25,57,2,1,18,92,91,84,33,85,57,3,2,18,93,92,83,33,84,49,3,57,18,94,93,82,33,83,49,4,3,18,70,94,81,33,82,49,5,4,10,70,18,80,33,81,49,6,5,10,71,70,80,41,33,49,7,6,10,72,71,79,41,80,41,7,49,10,73,72,78,41,79,41,8,7,10,74,73,77,41,78,41,9,8,10,75,74,76,41,77,41,10,9,75,41,76,41,75,10],width:33.1171875},".":{positions:[12.5859375,7.1015625,12.5859375,0,5.66015625,0,5.66015625,7.1015625],indices:[3,1,0,1,3,2],width:6.92578125},m:{positions:[5.02734375,38.0390625,11.21484375,38.0390625,11.70703125,33.046875,13.634581565856934,35.28191375732422,15.986680030822754,37.00302505493164,18.700471878051758,38.111698150634766,21.567134857177734,38.6696662902832,23.09765625,38.7421875,26.139192581176758,38.42292022705078,28.791221618652344,37.465118408203125,31.15591812133789,35.599586486816406,32.90284729003906,33.37240219116211,33.71484375,31.7109375,35.408084869384766,34.171592712402344,37.503177642822266,36.16951370239258,40.22900390625,37.6488037109375,42.961280822753906,38.50468063354492,45.3515625,38.7421875,48.32835006713867,38.446842193603516,50.9460334777832,37.5608024597168,53.204620361328125,36.084068298339844,54.8843879699707,33.86517333984375,56.19401931762695,31.434070587158203,57.133506774902344,28.79076385498047,57.70286178588867,25.93524932861328,57.90207290649414,22.867528915405273,57.90234375,22.74609375,57.90234375,0,50.9765625,0,50.9765625,22.81640625,50.74445724487305,26.319555282592773,50.04814529418945,29.033550262451172,47.956382751464844,31.33014678955078,45.659942626953125,32.691036224365234,43.27734375,33.1171875,40.4267463684082,32.6451530456543,38.09538650512695,31.229045867919922,36.33670425415039,28.815231323242188,35.26606750488281,26.190664291381836,34.9453125,24.43359375,34.9453125,24.15234375,34.9453125,0,27.984375,0,27.984375,22.81640625,27.73810386657715,26.2243709564209,26.99928855895996,28.921852111816406,24.89556121826172,31.278352737426758,22.623031616210938,32.67652893066406,20.28515625,33.1171875,17.40234375,32.7919921875,15.08203125,31.81640625,13.2802734375,30.251953125,11.953125,28.16015625,11.953125,28.16015625,11.953125,0,5.02734375,0],indices:[55,1,0,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,40,42,41,54,1,55,2,6,4,6,10,8,12,16,14,16,20,18,20,24,22,24,28,26,39,42,40,54,2,1,2,10,6,12,20,16,20,28,24,38,42,39,20,29,28,38,43,42,20,30,29,37,43,38,20,31,30,36,43,37,20,32,31,36,44,43,20,33,32,35,44,36,20,34,33,35,45,44,12,34,20,12,35,34,12,45,35,10,45,12,10,46,45,10,47,46,10,48,47,2,48,10,2,49,48,2,50,49,2,51,50,2,53,51,53,2,54],width:52.875},c:{positions:[20.49609375,4.67578125,20.49609375,4.67578125,23.36757469177246,5.087423801422119,25.919267654418945,6.322350978851318,28.055252075195312,8.557517051696777,29.08038330078125,10.95840835571289,29.1796875,12.0234375,35.40234375,12.0234375,35.47265625,11.8125,35.209197998046875,9.178794860839844,34.224666595458984,6.713964939117432,32.519065856933594,4.418010711669922,29.943574905395508,2.4374680519104004,27.361528396606445,.9345490336418152,24.772926330566406,-.0907462015748024,22.177766799926758,-.6384177803993225,20.49609375,-.73828125,17.386640548706055,-.5293084979057312,14.578433990478516,.09760986268520355,12.071474075317383,1.142473816871643,9.86575984954834,2.605283260345459,7.9612932205200195,4.4860382080078125,6.3618083000183105,6.765913009643555,5.107275009155273,9.241913795471191,4.197693824768066,11.914040565490723,3.633063793182373,14.782294273376465,3.4133858680725098,17.8466739654541,3.41015625,18.28125,3.41015625,19.7578125,3.5838754177093506,22.87480926513672,4.105032920837402,25.780019760131836,4.973628997802734,28.473445892333984,6.189663410186768,30.95508575439453,7.753136157989502,33.22494125366211,9.646564483642578,35.16857147216797,11.828062057495117,36.69178771972656,14.297628402709961,37.79460144042969,17.05526351928711,38.47700500488281,20.100967407226562,38.73899841308594,20.49609375,38.7421875,23.570213317871094,38.5140495300293,26.36119842529297,37.82963943481445,28.869049072265625,36.6889533996582,31.093765258789062,35.09199523925781,33.085479736328125,32.87481689453125,34.484825134277344,30.467679977416992,35.29180145263672,27.87058448791504,35.5078125,25.13671875,35.4375,24.92578125,29.1796875,24.92578125,28.72093391418457,27.737882614135742,27.34467315673828,30.163320541381836,24.98297119140625,32.04195022583008,22.43872833251953,33.074039459228516,20.49609375,33.29296875,17.510202407836914,32.94111633300781,15.082853317260742,31.88556480407715,13.214049339294434,30.12630844116211,11.89155101776123,27.541250228881836,10.979540824890137,24.808610916137695,10.478017807006836,21.928388595581055,10.37109375,19.7578125,10.37109375,18.28125,10.565627098083496,15.065240859985352,11.149227142333984,12.176401138305664,12.121894836425781,9.614731788635254,13.855029106140137,7.324370861053467,15.960027694702148,5.741883754730225,18.4368896484375,4.867271423339844],indices:[5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,4,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,35,33,35,39,37,39,43,41,43,47,45,47,50,49,3,7,4,7,15,11,15,23,19,23,31,27,31,39,35,39,47,43,47,51,50,3,15,7,39,51,47,2,15,3,39,52,51,39,53,52,39,54,53,39,55,54,31,55,39,31,56,55,31,57,56,31,58,57,23,58,31,23,59,58,23,60,59,23,61,60,23,62,61,23,63,62,23,64,63,23,65,64,23,66,65,15,66,23,15,67,66,15,68,67,15,1,68,1,15,2],width:32.09765625},k:{positions:[28.828125,0,16.48828125,17.54296875,11.98828125,17.54296875,11.98828125,0,5.0625,0,5.0625,54.84375,11.98828125,54.84375,11.98828125,23.0625,16.41796875,23.0625,26.82421875,38.0390625,35.12109375,38.0390625,22.11328125,20.7421875,36.984375,0],indices:[12,1,0,2,4,3,4,6,5,8,10,9,11,1,12,4,7,6,8,11,10,11,2,1,2,7,4,7,11,8,11,7,2],width:31.921875},t:{positions:[0,0,30,0],indices:[0,2,1],width:30}," ":{width:16,positions:[],indices:[]}};function CVt({text:t,size:e=1,zOffset:i=0}){const o=[],r=[];let n=0,a=0;const s=10;e/=100;for(const l of t){const c=wVt[l];if(!c)throw new Error("Unknown character: "+l);const d=a;for(let h=0;h<c.positions.length;h+=2)o.push(c.positions[h]*e+d,c.positions[h+1]*e,i);const u=n===0?0:n+1;for(const h of c.indices)r.push(h+u),n=Math.max(n,h+u);a+=(c.width+s)*e}return{positions:o,indices:r,primitive:"triangles"}}function Qte(t,{content:e,size:i,matrix:o,offset:r=0}){const{material:n,origin:a,plugin:s}=t,{textSizeRatio:l,textBottomMarginRatio:c,xeokitSdk:d,viewer:u}=s,{Mesh:h,VBOGeometry:p,math:A}=d,{scene:f}=u,{primitive:m,positions:g,indices:y}=CVt({text:e,size:i*l,zOffset:r});let v=g[0],b=g[0];for(let P=0;P<g.length;P+=3){const T=g[P];T<v&&(v=T),T>b&&(b=T)}const x=-(b-v)/2,k=A.mat4(),E=A.translationMat4v([x,i*c,0]);A.mulMat4(o,A.rotationMat4v(Math.PI,[0,1,0],A.mat4()),k),A.mulMat4(o,E),A.mulMat4(k,E);const B=new p(f,{primitive:m,positions:g,indices:y});return[new h(f,{geometry:B,material:n,pickable:!1,origin:a,matrix:o}),new h(f,{geometry:B,material:n,pickable:!1,origin:a,matrix:k})]}class xVt{constructor(e,i,o){this.plugin=e;const{viewer:r}=e;this.line=null,this.texts=null,this.length=0;const{math:n,worldToRTCPos:a,Node:s,PhongMaterial:l}=e.xeokitSdk,c=n.vec3(),d=n.vec3();a(i,d,c),this.material=new l(r.scene,{emissive:$1(e.defaultColor)}),this.node=new s(r.scene,{pickable:!1,origin:d,children:[]}),this.origin=d,this.p1=c,this.normal=o}move(e,i){const{arrowSizeRatio:o,offsetRatio:r,xeokitSdk:n,viewer:a}=this.plugin,{math:s,Mesh:l,VBOGeometry:c}=n,{scene:d}=a,u=this.p1;this.p2=s.subVec3(e,this.origin),this.node.removeChildren(),this.line?.destroy();const h=s.subVec3(e,u,s.vec3());if(h.every(Ce=>Ce===0))return;const p=s.normalizeVec3(h,s.vec3()),A=s.mulVec3Scalar(p,-1,s.vec3()),f=s.lenVec3(h);this.length=f;const m=r*f;let g=0;const y=s.mulVec3Scalar(h,.5,s.vec3()),v=s.addVec3(u,y,s.vec3());let b=s.normalizeVec3(s.cross3Vec3(i,s.normalizeVec3(h,s.vec3()),s.vec3()));const x=s.dotVec3(i,this.normal)>.999,k=s.vec3([0,1,0]),E=s.dotVec3(p,k);if(x){const Ce=Math.abs(E)<.01;g=m;let Le=null;if(Ce){const{look:Fe,up:ve,eye:me}=d.camera,we=s.normalizeVec3(s.subVec3(Fe,me,s.vec3())),Re=s.cross3Vec3(we,ve);Le=s.dotVec3(p,Re)}else{const Fe=s.cross3Vec3(k,i,s.vec3());Le=s.dotVec3(p,Fe)}Le<0&&(b=s.negateVec3(b),g=-g)}else if(Math.abs(E)>.99){const{look:Ce,eye:Le}=d.camera,Fe=s.normalizeVec3(s.subVec3(Ce,Le,s.vec3()));b=s.normalizeVec3(s.cross3Vec3(p,Fe,s.vec3())),i=s.normalizeVec3(s.cross3Vec3(b,p,s.vec3()))}else i=s.normalizeVec3(s.cross3Vec3(k,p,s.vec3())),b=s.normalizeVec3(s.cross3Vec3(p,i,s.vec3())),s.dotVec3(b,k)<0&&(b=s.negateVec3(b));const B=s.negateVec3(b,s.vec3()),P=s.mulVec3Scalar(b,f*o,s.vec3()),T=s.mulVec3Scalar(B,f*o,s.vec3()),S=s.addVec3(u,P,s.vec3()),R=s.addVec3(u,T,s.vec3()),F=s.addVec3(e,P,s.vec3()),U=s.addVec3(e,T,s.vec3()),q=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(b,p,s.vec3())),f*o*Math.SQRT2),V=s.addVec3(u,q,s.vec3()),W=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(B,p,s.vec3())),f*o*Math.SQRT2),Y=s.addVec3(u,W,s.vec3()),$=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(b,A,s.vec3())),f*o*Math.SQRT2),fe=s.addVec3(e,$,s.vec3()),Me=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(B,A,s.vec3())),f*o*Math.SQRT2),Se=s.addVec3(e,Me,s.vec3()),qe=s.translationMat4v(s.mulVec3Scalar(i,m,s.vec3()));this.line=new l(a.scene,{geometry:new c(a.scene,{primitive:"lines",positions:[...u,...e,...S,...R,...F,...U,...V,...Y,...fe,...Se],indices:[0,1,0,2,0,3,0,6,0,7,1,4,1,5,1,8,1,9]}),material:this.material,matrix:qe,pickable:!1,origin:this.origin}),this.node.addChild(this.line),this.texts?.forEach(Ce=>Ce.destroy());const Qe=s.mat4([...p,0,...b,0,...i,0,...v,1]);this.texts=this._makeTexts(f.toFixed(2)+" m",f,Qe,g),this.texts.forEach(Ce=>this.node.addChild(Ce))}_makeTexts(e,i,o,r=0){return Qte(this,{content:e,size:i,matrix:o,offset:r})}destroy(){this.node.destroy(),this.line?.destroy(),this.texts?.forEach(e=>e.destroy()),this.plugin.measurements=this.plugin.measurements.filter(e=>e!==this)}get visible(){return this.node.visible}set visible(e){this.node.visible=e}get color(){return zte(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=$1(e)}}class Gte{constructor(e,i,o={}){this.viewer=e,this.xeokitSdk=i,this.arrowSizeRatio=o.arrowSizeRatio??.04,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.02,this.offsetRatio=o.offsetRatio??.003,this.snapPickRadius=o.snapPickRadius??15,this.defaultColor=o.defaultColor??"#ffffff";const r=document.createElement("img"),n=e.scene.canvas.canvas;n.parentNode.insertBefore(r,n),r.style.width="28px",r.style.height="28px",r.style.position="absolute",r.style.pointerEvents="none",r.style.transform="translate(-50%, -50%)",r.style.display="none",this.imgElement=r,this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new kVt(this)}on(e,i){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=i,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class kVt{constructor(e){this.plugin=e,this.currentMeasurement=null,this.lastPosition=null,this.mouseDown=!1,this.dragging=!1,this.activated=!1}_updateCursor(e){const{imgElement:i,viewer:o}=this.plugin,{scene:r}=o;r.canvas.canvas.style.cursor=`url("${bVt}") 16 16, auto`;const n=r.pick({canvasPos:e,snapRadius:this.plugin.snapPickRadius,snapToEdge:!0,snapToVertex:!0});if(n?.snappedWorldPos||n?.worldPos){if(n.snappedCanvasPos)i.style.left=`${n.snappedCanvasPos[0]}px`,i.style.top=`${n.snappedCanvasPos[1]}px`,i.src=n.snapType==="vertex"?mVt:gVt;else{const a=n.canvasPos;i.style.left=`${a[0]}px`,i.style.top=`${a[1]}px`,i.src=vVt}this.lastPosition=n.snappedWorldPos??n.worldPos,this.lastPosition.worldNormal=n.snappedWorldNormal??n.worldNormal}else i.style.left=`${e[0]}px`,i.style.top=`${e[1]}px`,i.src=yVt,this.lastPosition=null}_onMouseMove(e){this.mouseDown&&(this.dragging=!0),e.preventDefault(),this._updateCursor([e.offsetX,e.offsetY]),this.lastPosition&&this.currentMeasurement?.move(this.lastPosition,this.lastPosition.worldNormal)}_onMouseDown(){this.mouseDown=!0}_onMouseUp(){this.mouseDown=!1;const e=this.dragging;this.dragging=!1,!e&&this.lastPosition&&(this.currentMeasurement?(this.plugin.measurements.push(this.currentMeasurement),Object.values(this.plugin.measurementEndCallbacks).forEach(i=>i?.(this.currentMeasurement)),this.currentMeasurement=null):this.currentMeasurement=new xVt(this.plugin,this.lastPosition,this.lastPosition.worldNormal))}activate(){if(this.activated)return;const{canvas:e}=this.plugin.viewer.scene.canvas;this.plugin.imgElement.style.display="block";const i=this._onMouseMove.bind(this),o=this._onMouseDown.bind(this),r=this._onMouseUp.bind(this);e.addEventListener("mousemove",i),e.addEventListener("mousedown",o),document.addEventListener("mouseup",r),this._unsubscribe=()=>{e.removeEventListener("mousemove",i),e.removeEventListener("mousedown",o),document.removeEventListener("mouseup",r)},this.activated=!0}deactivate(){this.activated&&(this._unsubscribe?.(),this.currentMeasurement?.destroy(),this.currentMeasurement=null,this.lastPosition=null,this.plugin.imgElement.style.display="none",this.activated=!1)}}class MVt{constructor(e,i){this.plugin=e;const{xeokitSdk:o,viewer:r}=e,{Mesh:n,ReadableGeometry:a,buildSphereGeometry:s,PhongMaterial:l,Node:c,math:d,worldToRTCPos:u}=o,h=d.vec3(),p=d.vec3();this._length=0;const{entity:A,worldPos:f}=i;u(f,p,h);const m=new l(r.scene,{emissive:$1(e.defaultColor),diffuse:[0,0,0]}),g=(k=!0)=>new n(r.scene,{geometry:new a(r.scene,s({radius:.03})),material:m,pickable:!1,visible:k,origin:p}),y=g(),v=g(!1),b=new n(r.scene,{geometry:new a(r.scene,{primitive:"lines",positions:[0,0,0,0,0,0],indices:[0,1]}),material:m,pickable:!1,visible:!1,origin:p}),x=new c(r.scene,{pickable:!1,visible:!0,position:h,origin:p,children:[y,b,v]});this.origin=p,this.modelId=A.model.id,this.node=x,this.toSphere=v,this.fromSphere=y,this.line=b,this.material=m}show(e){const{node:i,fromSphere:o,toSphere:r,line:n,texts:a,plugin:s}=this,{math:l}=s.xeokitSdk;i.position=l.subVec3(e.worldPos,i.origin,l.vec3()),i.visible=!0;const{viewer:c}=s,d=c.scene.pick({pickSurface:!0,origin:e.worldPos,direction:e.worldNormal});if(a&&(a.forEach(u=>u.destroy()),this.texts=null),d){r.visible=!0,n.visible=!0,r.position=l.subVec3(d.worldPos,r.origin,l.vec3()),r.position=l.subVec3(r.position,i.position,l.vec3()),n.position=l.vec3().set(i.position),n.geometry.positions=[0,0,0,...r.position];const u=l.lenVec3(r.position);this._length=u;const h=o.position,p=r.position,A=l.subVec3(p,h,l.vec3()),f=l.normalizeVec3(A,l.vec3()),m=l.mulVec3Scalar(A,.5,l.vec3()),g=l.addVec3(h,m,l.vec3()),y=[0,1,0],v=l.dotVec3(f,y),b=Math.abs(v)>.9;let x;if(b){const k=l.normalizeVec3(l.subVec3(c.scene.camera.eye,c.scene.camera.look,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(k,f,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(E,f,l.vec3()),l.vec3());x=l.mat4([...f,0,...E,0,...B,0,...g,1])}else{const k=l.normalizeVec3(l.cross3Vec3(y,f,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(f,k,l.vec3()),l.vec3());x=l.mat4([...f,0,...E,0,...k,0,...g,1])}this.texts=this._makeTexts(u.toFixed(2)+" m",u,x),this.texts.forEach(k=>i.addChild(k))}else r.visible=!1,n.visible=!1,this._length=0}hide(){this.node.visible=!1}destroy(){this.node.destroy(),this.line.destroy(),this.fromSphere.destroy(),this.toSphere.destroy(),this.texts?.forEach(e=>e.destroy())}set length(e){this._length=e}get length(){return this.visible?this._length:0}get visible(){return this.node.visible===!0}set visible(e){this.node.visible=!!e}get color(){return zte(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=$1(e)}_makeTexts(e,i,o){return Qte(this,{content:e,size:i,matrix:o})}}class Kte{constructor(e,i,o={}){this.viewer=e,this.xeokitSdk=i,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.01,this.defaultColor=o.defaultColor??"#ffffff",this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new EVt(this)}on(e,i){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=i,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class EVt{constructor(e){this.plugin=e,this.currentMeasure=null,this.pickedSpaceMeasureSubscription=null,this.hitHelperMouseMoveSubscription=null}activate(){const{plugin:e}=this,{viewer:i}=e;this.pickedSpaceMeasureSubscription=i.scene.input.on("mouseclicked",()=>{if(!this.currentMeasure?.length)return;const o=this.currentMeasure;this.currentMeasure=null,Object.values(this.plugin.measurementEndCallbacks).forEach(r=>r(o))}),this.hitHelperMouseMoveSubscription=i.scene.input.on("mousemove",o=>{const r=i.scene.pick({canvasPos:o,pickSurface:!0});r?.entity?.model&&(r?((!this.currentMeasure||this.currentMeasure.modelId!==r.entity.model.id)&&(this.currentMeasure?.destroy(),this.currentMeasure=new MVt(this.plugin,r)),this.currentMeasure.show(r)):this.currentMeasure?.hide())})}deactivate(){const{viewer:e}=this.plugin;this.currentMeasure?.destroy(),this.currentMeasure=null,e.scene.input.off(this.pickedSpaceMeasureSubscription),e.scene.input.off(this.hitHelperMouseMoveSubscription)}}const BVt=`onmessage = async event => {
1385
1385
  const sources = event.data;
1386
1386
  for (const source of sources) {
1387
1387
  const response = await fetch(source);
@@ -6431,5 +6431,5 @@ void main() {
6431
6431
  --bimdata-local-context-width: ${o.width}px;
6432
6432
  --bimdata-local-context-center-width: ${o.centerWidth}px;
6433
6433
  --bimdata-local-context-resolution: ${o.resolution};
6434
- `),onMouseenter:e[0]||(e[0]=(...h)=>o.onMouseEnter&&o.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>o.onMouseLeave&&o.onMouseLeave(...h))},[D(a,{ref:"modalManagerTemplateRef"},null,512),w("div",rCi,[o.windowPlugins.leftSidePanel?(M(),K(s,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):te("",!0),w("div",nCi,[(M(!0),_(Xe,null,Mt(o.windowPlugins.free,h=>(M(),K(l,{key:h.name,class:ce({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),D(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),D(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(M(),K(s,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):te("",!0)]),o.loading?(M(),_("div",aCi,[o.spinner&&o.spinner.component?(M(),K(Eo(o.spinner.component),Ta(xn({key:0},o.spinner.props)),null,16)):(M(),K(d,{key:1,size:"20px",border:"3px"}))])):te("",!0),o.layoutSettingsDisplayed?(M(),_("div",sCi,[D(u)])):te("",!0)],36)}const cCi=j(oCi,[["render",lCi],["__scopeId","data-v-485f288e"]]);class dCi{constructor(e=!0){const i=Y9i(pz,null,{resizable:e});i.registerContent("default",cCi),this.settings=xr({edit:!1,swap:!1,full:!1}),this.areas=i}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?X9i(e):null}copy(e,i=!0){return $9i(this.areas.layout,e,i)}open({ratio:e,direction:i,insertAfter:o,windowName:r=null,windowState:n=null,localContextId:a=null}={}){const s=r?{options:{windowName:r,windowState:n}}:null;return a===null?this.areas.splitLayout(e,i,o,s):this.areas.split(a,e,i,o,s)}swap(e,i){return this.areas.swap(e,i)}close(e){return this.areas.delete(e)}compare(e,i){if(!e&&!i)return!0;if(!e||!i)return!1;if(typeof e=="string"&&typeof i=="string")return e===i;if(typeof e=="string"||typeof i=="string")return!1;if(e.windowName&&i.windowName){if(e.windowName!==i.windowName)return!1;const o=new Set(e.windowState?.modelIds),r=new Set(i.windowState?.modelIds);return o.size===r.size&&[...o].every(n=>r.has(n))}return e.windowName||i.windowName||e.direction!==i.direction||e.children.length!==i.children.length?!1:e.children.every((o,r)=>this.compare(o,i.children[r]))}}const uCi="2.16.2-beta.2",hCi={version:uCi};let pCi=1;class fCi{constructor({plugins:e,api:i,ui:o,locale:r="fr"}){this.instanceId=pCi++,this.pluginManager=new Nyi(e),this.windowManager=new Vyi,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new o9i(i),this.globalContext=new f8e(this),this.state=g9i(this),this.shortcutManager=sme(this.state),this.uiSettings=o||{},this.i18n=new h8e(r),this._contextMenu=null,this.layout=new dCi(this.uiSettings.resizable!==!1),this._darkTheme=le(o?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return hCi.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||nme}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function ACi(t,e={}){e.backgroundColor&&(t.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&t.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&t.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&t.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&t.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&t.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&t.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&t.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&t.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&t.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&t.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&t.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&t.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&t.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&t.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&t.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&t.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&t.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&t.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&t.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&t.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&t.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&t.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&t.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&t.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&t.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&t.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&t.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&t.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&t.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),t.style.setProperty("--areas-background-color","transparent")}const gCi=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),um=Object.freeze({READ:"read",WRITE:"write"});function Pge(t){const e={};return t.forEach(i=>{const[o,r]=i.split(":");e[o]?e[o].push(r):e[o]=[r]}),e}const mCi={token_scopes:[],usable_scopes:[],user_role:25};function Ige(t=mCi){const e=Pge(t.token_scopes),i=Pge(t.usable_scopes);return{...AK(t),tokenScopes:e,usableScopes:i,userRole:gCi[t.user_role],user:t.user?AK(t.user):null,hasBcfReadPermission:i.bcf?.includes(um.READ)??!1,hasBcfWritePermission:i.bcf?.includes(um.WRITE)??!1,hasModelReadPermission:i.model?.includes(um.READ)??!1,hasModelWritePermission:i.model?.includes(um.WRITE)??!1,hasDocReadPermission:i.document?.includes(um.READ)??!1,hasDocWritePermission:i.document?.includes(um.WRITE)??!1}}const vCi={back:"Zur\xFCck",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t",noPriority:"Keine",assignedTo:"Zugewiesen an",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte w\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis",documentsLabel:"Dokumente",documentsCount:"Dokumente \u2013 {count} ausgew\xE4hlte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen \u2013 {count} ausgew\xE4hlte Gruppen",groupsText:"W\xE4hlen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren d\xFCrfen.",validate:"Best\xE4tigen"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"F\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Ver\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}},yCi={BcfComponents:vCi},bCi={back:"Back",BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority",noPriority:"None",assignedTo:"Assigned to",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result",documentsLabel:"Add a file",documentsCount:"Files - {count} selected files",groupsLabel:"Permissions",groupsCount:"Permissions - {count} selected groups",groupsText:"You are now setting the access rights: choose the user group(s) that will be exclusively authorized to see and interact with this topic.",validate:"Validate"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot",edited:"edited"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}},wCi={BcfComponents:bCi},CCi={back:"Volver",BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creaci\xF3n"},BcfSettings:{title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad",noPriority:"Sin",assignedTo:"Asignado a",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotaci\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotograf\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Est\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}},xCi={BcfComponents:CCi},kCi={back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents s\xE9lectionn\xE9s",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes s\xE9lectionn\xE9s",groupsText:"S\xE9lectionner les groupes utilisateur qui peuvent voir ce topic et int\xE9ragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot",edited:"edit\xE9"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorit\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}},MCi={BcfComponents:kCi},ECi={back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorit\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0",noPriority:"Nessuno",assignedTo:"Assegnato a",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorit\xE0",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE0",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorit\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorit\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}},BCi={BcfComponents:ECi},PCi={de:yCi,en:wCi,es:xCi,fr:MCi,it:BCi},ICi=({apiClient:t,fetchUsers:e,i18nPlugin:i}={})=>({install(o){t?Di.setup({apiClient:t,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),i?Object.entries(PCi).forEach(([r,n])=>{i.global.mergeLocaleMessage(r,n)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(nxe).forEach(([r,n])=>{o.component(r,n)})}}),SCi={title:"Building Maker",back:"Zur\xFCck",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"L\xF6schen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",input:"Name des Geb\xE4udes",error:"Ung\xFCltiger Name",createButton:"Erstellen",updateButton:"Best\xE4tigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Best\xE4tigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ung\xFCltiger Name",cancelButton:"Abbrechen",submitButton:"Best\xE4tigen"}},TCi={creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"},DCi={BuildingMaker:SCi,FileManager:TCi},RCi={t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},LCi={title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},_Ci={creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},FCi={title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},OCi={title:"Photosphere Building"},UCi={BIMDataComponents:RCi,BuildingMaker:LCi,FileManager:_Ci,MetaBuildingStructure:FCi,PhotosphereBuilding:OCi},NCi={title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",input:"Nombre del edificio",error:"Nombre no v\xE1lido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no v\xE1lido",cancelButton:"Anular",submitButton:"Validar"}},jCi={creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"},VCi={BuildingMaker:NCi,FileManager:jCi},zCi={t:{back:"Retour",cancel:"Annuler",create:"Cr\xE9er",delete:"Supprimer",download:"T\xE9l\xE9charger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"\xC9tage",validate:"Valider"}},HCi={title:"Building Maker",list:{text:"Cr\xE9ez et \xE9ditez les \xE9tages puis t\xE9l\xE9chagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du b\xE2timent",error:"Nom invalide"},view:{addStorey:"Ajouter un \xC9tage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel \xE9tage",input:"Nom",error:"Nom invalide"}},qCi={creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"S\xE9lectionner une page"},QCi={title:"Structure M\xE9ta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"\xC9quipements"},StoreySelector:{placeholder:"S\xE9lectionner un \xE9tage"}},GCi={title:"Photosph\xE8re Building"},KCi={BIMDataComponents:zCi,BuildingMaker:HCi,FileManager:qCi,MetaBuildingStructure:QCi,PhotosphereBuilding:GCi},JCi={title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},ZCi={creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"},WCi={BuildingMaker:JCi,FileManager:ZCi},YCi={de:DCi,en:UCi,es:VCi,fr:KCi,it:WCi},XCi=({i18nPlugin:t}={})=>({install(e){t?Object.entries(YCi).forEach(([i,o])=>{t.global.mergeLocaleMessage(i,o)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(Zni).forEach(([i,o])=>{e.component(i,o)})}}),$Ci={beforeMount(t,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);t.clickAwayHandler=i=>{(i.path||i.composedPath&&i.composedPath()).find(o=>o===t)||e.value()},window.addEventListener("mousedown",t.clickAwayHandler,!0)},unmounted(t){window.removeEventListener("mousedown",t.clickAwayHandler,!0),delete t.clickAwayHandler}},exi=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:Xs,BIMDataClickInputAway:$Ci},Symbol.toStringTag,{value:"Module"})),txi=t=>({install(e){Object.entries(Yet).forEach(([i,o])=>{e.component(i,o)}),Object.entries(exi).forEach(([i,o])=>e.directive(i.split("BIMData")[1],o))}}),ixi={name:"LiWrapper",render(){return Ao("li",this.$slots.default())}};function oxi(t,e){var i=new Set([]);return t.forEach(o=>{e.has(o)||i.add(o)}),i}const Sl=Yr("id"),rxi=({contextMenu:t,objects:e=[],state:i=t.$viewer.state,pictos:o})=>[{name:"selectAll",get group(){return t.groupPositions.select},position:1,get label(){return t.$t("context_menu.select_all")},get picto(){return o.get(this.name)},execute:()=>i.selectObjects(e.filter(Ns(Pi("visible"),bu("selected"))).map(Sl)),predicate:()=>e.some(Ns(Pi("visible"),bu("selected")))},{name:"deselectAll",get group(){return t.groupPositions.select},position:2,get label(){return t.$t("context_menu.deselect_all")},get picto(){return o.get(this.name)},execute:()=>i.deselectObjects(e.filter(Pi("selected")).map(Sl)),predicate:()=>e.some(Pi("selected"))},{name:"selectSimilar",get group(){return t.groupPositions.select},position:3,get label(){return t.$t("context_menu.select_similar")},get picto(){return o.get(this.name)},execute(){const r=e.filter(n=>n.visible&&n.type===this.selectedObject.type&&n.id!==this.selectedObject.id).map(Sl);i.selectObjects(r)},selectedObject:null,predicate(){const r=e.filter(Ns(Pi("visible"),Pi("selected")));return r.length===1&&r[0].type!==void 0?(this.selectedObject=r[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return t.$t("context_menu.reverse_selection")},get group(){return t.groupPositions.select},position:4,execute:()=>{const r=new Set(e.filter(Pi("selected")).map(Sl)),n=new Set(e.filter(Pi("visible")).map(Sl));i.selectObjects(Array.from(oxi(n,r)),{exclusive:!0})},predicate:()=>e.some(Ns(bu("selected"),Pi("visible")))&&e.some(Ns(Pi("selected"),Pi("visible")))},{name:"showAll",get group(){return t.groupPositions.visibility},position:1,get label(){return t.$t("context_menu.show_all")},get picto(){return o.get(this.name)},execute:()=>i.showObjects(e.filter(bu("visible")).map(Sl)),predicate:()=>e.some(bu("visible"))},{name:"hide",get group(){return t.groupPositions.visibility},position:2,get label(){return t.$t("context_menu.hide")},get picto(){return o.get(this.name)},objectsToHide:null,execute(){const r=this.objectsToHide.filter(Pi("selected"));r.length>0&&i.deselectObjects(r.map(Sl)),i.hideObjects(this.objectsToHide.map(Sl))},predicate(){return this.objectsToHide=e.filter(Ns(Pi("selected"),Pi("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return t.groupPositions.visibility},position:3,get label(){return t.$t("context_menu.hide_all")},execute:()=>{const r=e.filter(Pi("visible"));r.some(Pi("selected"))&&i.deselectObjects(r.filter(Pi("selected")).map(Sl)),i.hideObjects(r.map(Sl))},predicate:()=>e.some(Pi("visible"))}].filter(r=>r.predicate()),nxi={components:{LiWrapper:ixi},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(t){t?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(t){t.key==="Escape"&&this.away()},setPosition(t){const e=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=t.clientX-e.left,this.top=t.clientY-e.top,this.left+this.width>e.width&&(this.left=this.left-this.width),t.clientY>e.top+e.height/2?(this.bottom=e.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(t={}){let e=null;if((!t.execute||typeof t.execute!="function")&!t.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),t.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return t.id=this.nextCommandId++,t},open(t){this.currentCommands=[],this.setPosition(t),this.originEvent=t,t.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async t=>{if(typeof t.predicate=="function"){const e=t.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(t);else if(typeof e?.then=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const i=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,i===!0&&this.currentCommands.push(t))}}else this.currentCommands.push(t)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:t=[],state:e=this.$viewer.state,context:i=null}){const o=new Map;return i&&this.$viewer.shortcutManager.getShortcuts(i).forEach(r=>o.set(r.name,r.key)),rxi({contextMenu:this,objects:t,state:e,pictos:o})},executeCommand(t){if(t.execute&&(t.execute(this.originEvent),this.displayed=!1),t.component&&!t.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const t=new Map;this.currentCommands.forEach(i=>{(i.group===null||i.group===void 0)&&(i.group=0),t.has(i.group)?t.get(i.group).push(i):t.set(i.group,[i])}),t.forEach(i=>i.sort((o,r)=>(o.position=o.position||0,r.position=r.position||0,o.position-r.position)));const e=[...t.keys()].sort((i,o)=>i-o).map(i=>t.get(i)).flat();this.currentCommands=e},isGroupIntersection(t){if(t===0)return!1;const e=this.currentCommands[t-1],i=this.currentCommands[t];return e.group<i.group},registerContextCommand(t){const e=this.typeCheckCommand(t);return this.contextCommands.push(e),t.id},registerCommand(t){const e=this.typeCheckCommand(t);return this.registeredCommands.push(e),t.id},unregisterCommand(t){return this.registeredCommands.find(e=>e.id===t)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==t),!0):!1},preventDefault(){this.defaultPrevented=!0}}},axi={key:0,class:"separator"},sxi={class:"menu-text"},lxi={key:1,class:"menu-picto"},cxi={key:0,class:"context-menu__spinner"};function dxi(t,e,i,o,r,n){const a=I("BIMDataIconChevron"),s=I("LiWrapper"),l=I("BIMDataSpinner"),c=ai("click-away");return r.displayed&&(r.currentCommands.length||r.asyncPredicateRunning)?yt((M(),_("ul",{key:0,class:"bimdata-list context-menu",style:de(n.position)},[(M(!0),_(Xe,null,Mt(r.currentCommands,(d,u)=>(M(),K(s,{key:d.label,class:"context-menu__element",onClick:h=>n.executeCommand(d)},{default:N(()=>[n.isGroupIntersection(u)?(M(),_("div",axi)):te("",!0),w("div",sxi,z(d.label),1),!d.component&&d.picto?(M(),_("span",lxi,z(d.picto),1)):d.component?(M(),K(a,{key:2,size:"xxs",class:"fill-primary"})):te("",!0)]),_:2},1032,["onClick"]))),128)),r.asyncPredicateRunning?(M(),_("li",cxi,[D(l)])):te("",!0)],4)),[[c,n.away]]):te("",!0)}const uxi=j(nxi,[["render",dxi],["__scopeId","data-v-5b87d4a3"]]),hxi={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const t=lt("$viewer"),e=xr(new Map),i=r=>{if(!r.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(r.name))throw new Error(`[Viewer Header] Content with name ${r.name} already exists`);e.set(r.name,r)},o=r=>e.has(r)?(e.delete(r),!0):!1;return{logo:t.uiSettings.bimdataLogo!==!1,version:t.uiSettings.version!==!1?t.version:null,headerContent:e,headerRightContentComponents:De(()=>Array.from(e.values()).filter(r=>r.position==="right").sort((r,n)=>r.order-n.order).map(r=>r.component)),headerLeftContentComponents:De(()=>Array.from(e.values()).filter(r=>r.position==="left").sort((r,n)=>r.order-n.order).map(r=>r.component)),addContent:i,removeContent:o}}},pxi={class:"viewer-header"},fxi={class:"viewer-header__content"},Axi={class:"viewer-header__content__left"},gxi={class:"viewer-header__content__right"},mxi={key:0,class:"m-l-6 flex items-center"},vxi={key:1,class:"viewer-header__version"};function yxi(t,e,i,o,r,n){const a=I("BIMDataIllustration");return yt((M(),_("div",pxi,[w("div",fxi,[w("div",Axi,[(M(!0),_(Xe,null,Mt(o.headerLeftContentComponents,s=>(M(),K(Eo(s),{key:s.name}))),128))]),w("div",gxi,[(M(!0),_(Xe,null,Mt(o.headerRightContentComponents,s=>(M(),K(Eo(s),{key:s.name}))),128))])]),o.logo||o.version?(M(),_("div",mxi,[o.logo?(M(),K(a,{key:0,name:"logo",width:"30px",height:"30px"})):te("",!0),o.version?(M(),_("div",vxi,z(o.version),1)):te("",!0)])):te("",!0)],512)),[[Ht,i.visible]])}const bxi=j(hxi,[["render",yxi],["__scopeId","data-v-5c9ea6b6"]]),wxi={emits:["resize"],setup(t,{emit:e}){return{onResizerMousedown:i=>{i.preventDefault();let o=i.clientX;const r=a=>{a.preventDefault();const s=a.clientX-o;o=a.clientX,e("resize",s)},n=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",n)}}}},Cxi={class:"bimdata-separator"};function xxi(t,e,i,o,r,n){return M(),_("div",Cxi,[e[1]||(e[1]=w("div",{class:"bimdata-separator__line"},null,-1)),w("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...a)=>o.onResizerMousedown&&o.onResizerMousedown(...a))},null,32)])}const kxi=j(wxi,[["render",xxi],["__scopeId","data-v-79a3b3af"]]),Mxi={components:{Separator:kxi},props:{position:{type:String,required:!0,validator(t){return["left","right"].includes(t)}},sidePanel:{type:Object,required:!0,validator(t){if(t.width&&(typeof t.width!="number"||t.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof t.width}`),!1;const e=typeof t?.component=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(t){const e=le(null),i=le(t.sidePanel.width??400),o=(r,n=1)=>{const a=i.value+r*n;i.value=Math.max(0,a)};return pt(()=>t.sidePanel,()=>{Object.defineProperty(t.sidePanel,"width",{get(){return i.value},set(r){if(typeof r!="number"||r<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof r}`);return}i.value=r}}),Object.defineProperty(t.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:i,onResize:o}}},Exi={class:"bimdata-global-side-panel__component"};function Bxi(t,e,i,o,r,n){const a=I("Separator");return M(),_("div",{class:"bimdata-global-side-panel",style:de(`width: ${o.width}px`)},[i.sidePanel.resizable&&i.position==="right"?(M(),K(a,{key:0,onResize:e[0]||(e[0]=s=>o.onResize(s,-1))})):te("",!0),w("div",Exi,[(M(),K(Eo(i.sidePanel.component),{ref:"componentInstance"},null,512))]),i.sidePanel.resizable&&i.position==="left"?(M(),K(a,{key:1,onResize:e[1]||(e[1]=s=>o.onResize(s))})):te("",!0)],4)}const Pxi=j(Mxi,[["render",Bxi],["__scopeId","data-v-82d0d4cb"]]),Ixi={name:"BimdataViewer",components:{ContextMenu:uxi,ViewerHeader:bxi,ModalManager:Mge,GlobalSidePanel:Pxi},setup(){const t=lt("$viewer"),{globalContext:e,shortcutManager:i}=t;wi(()=>{i&&i.destroy(),e.hub.clear()}),li(()=>{t.pluginManager.runPluginsScripts(t)});const o=De(()=>t.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)),r=De(()=>t.uiSettings.version!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)?t.version:null),n=De(()=>e.leftSidePanel),a=De(()=>e.rightSidePanel),s=De(()=>{const p=t.uiSettings.header!==!1,A=e.localContexts.length===1&&e.localContexts[0].window?.header===!1,f=!!(n.value||a.value);return p&&(!A||f)}),l=t.uiSettings.contextMenu!==!1,c=le(null);function d(p){l&&c.value.open(p)}function u(){t.shortcutManager.active=!0}function h(){t.shortcutManager.active=!1}return{Layout:t.layout.areas.component,onContextMenu:d,onMouseenter:u,onMouseleave:h,isHeaderVisible:s,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:o,viewerVersionOnSingleWindow:r,version:t.version,loading:De(()=>e.loading),spinner:De(()=>e.spinner),leftSidePanel:n,rightSidePanel:a}}},Sxi={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},Txi={key:2,class:"viewer__logo"},Dxi={key:1,class:"version m-t-6"};function Rxi(t,e,i,o,r,n){const a=I("ModalManager"),s=I("ContextMenu"),l=I("ViewerHeader"),c=I("GlobalSidePanel"),d=I("BIMDataSpinner"),u=I("BIMDataIllustration");return M(),_("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>o.onContextMenu&&o.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>o.onMouseenter&&o.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>o.onMouseleave&&o.onMouseleave(...h))},[D(a,{ref:"modalManagerTemplateRef"},null,512),o.contextMenuEnabled?(M(),K(s,{key:0,ref:"contextMenuTemplateRef"},null,512)):te("",!0),D(l,{ref:"headerTemplateRef",visible:o.isHeaderVisible},null,8,["visible"]),w("div",{class:"bimdata-viewer__content",style:de(o.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[o.leftSidePanel?(M(),K(c,{key:0,"side-panel":o.leftSidePanel,position:"left"},null,8,["side-panel"])):te("",!0),(M(),K(Eo(o.Layout),{style:"height: 100%; flex-grow: 1;"})),o.rightSidePanel?(M(),K(c,{key:1,"side-panel":o.rightSidePanel,position:"right"},null,8,["side-panel"])):te("",!0)],4),o.loading?(M(),_("div",Sxi,[o.spinner&&o.spinner.component?(M(),K(Eo(o.spinner.component),Ta(xn({key:0},o.spinner.props)),null,16)):(M(),K(d,{key:1,size:"40px",border:"5px"}))])):te("",!0),!o.isHeaderVisible&&(o.bimdataLogoOnSingleWindow||o.viewerVersionOnSingleWindow)?(M(),_("div",Txi,[o.bimdataLogoOnSingleWindow?(M(),K(u,{key:0,name:"logo"})):te("",!0),o.viewerVersionOnSingleWindow?(M(),_("div",Dxi,z(o.version),1)):te("",!0)])):te("",!0)],544)}const Lxi=j(Ixi,[["render",Rxi],["__scopeId","data-v-0c1c941a"]]),_xi=["src"],Fxi={class:"bimdata-models__header"},Oxi={key:0,class:"bimdata-models__header__loader"},Uxi={class:"bimdata-models__header__picto"},Nxi={class:"bimdata-models__header__name"},jxi={key:0,class:"bimdata-models__header__name--empty"},Vxi={key:1,class:"bimdata-models__header__name--empty"},zxi={key:3},Hxi=["onMousemove","onClick"],qxi={__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(t){const e=t,i=lt("$viewer"),o=le(),r=le(0),n=le(0),a=le(),s=fi([]),l=le(!1),c=De(()=>i.localContext.loadedModels),d=De(()=>i.localContext.loadedModelIds),u=De(()=>i.localContext.loadingModelIds),h=De(()=>i.localContext.multiModel),p=De(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(k=>c.value.find(E=>E.document?.head_id!=null&&E.document.head_id===k.document.id)??k)),A=k=>d.value.includes(k),f=k=>u.value.includes(k),m=De(()=>{const{x:k,y:E}=a.value?.getBoundingClientRect()??{x:0,y:0};return`top:${n.value-E}px; left:${r.value-k}px;`}),g=k=>{!h.value&&A(k.id)||u.value.length>0||(i.localContext.loadedModelIds.includes(k.id)?i.localContext.unloadModels([k.id]):i.localContext.loadModels([k.id]))},y=k=>{switch(k){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},v=(k,E)=>{k?.viewer_360_file&&(r.value=E.clientX,n.value=E.clientY),o.value=k?.viewer_360_file},b=async k=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,k)).filter(E=>i.state.models.some(B=>B.archived)||!E.archived).sort(ol("updated_at",!1))}catch(E){console.error("[Models] Cannot get project models. Error: ",E)}finally{l.value=!1}return[]},x=k=>k.children?.some(E=>A(E.id))??!1;return b(i.localContext.modelTypes).then(k=>{s.value=k}),(k,E)=>{const B=I("BIMDataSpinner"),P=I("BIMDataIconModel3D"),T=I("BIMDataTextbox"),S=I("BIMDataCheckbox"),R=I("BIMDataRadio"),F=I("BIMDataIcon"),U=I("BIMDataDropdownList");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-models",{"bimdata-models--window-positioning":t.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-models__preview",style:de(m.value)},[w("img",{src:o.value},null,8,_xi)],4)):te("",!0),D(U,{style:de(`--bimdata-models-width: ${t.width};`),width:t.width,list:p.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:p.value.length===0,onElementClick:g},{header:N(({isOpen:q})=>[w("div",Fxi,[l.value||u.value.length>0?(M(),_("div",Oxi,[D(B)])):(M(),_(Xe,{key:1},[w("div",Uxi,[D(P)]),w("div",{class:ce(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":d.value.length===0}])},[w("span",null,z(d.value.length),1)],2),w("div",Nxi,[p.value.length===0?(M(),_("span",jxi,z(k.$t("model.no_model")),1)):d.value.length===0?(M(),_("span",Vxi,z(k.$t("model.no_loaded_model")),1)):d.value.length===1?(M(),K(T,{key:2,text:c.value[0].name,tooltip:!q},null,8,["text","tooltip"])):d.value.length>1?(M(),_("span",zxi,z(k.$t("model.selected_models")),1)):te("",!0)])],64))])]),element:N(({element:q,close:V})=>[w("div",{class:"bimdata-models__model",onMousemove:W=>t.preview&&v(q,W),onMouseout:E[0]||(E[0]=W=>t.preview&&v()),onClick:()=>{!h.value&&!A(q.id)&&V()}},[h.value?(M(),K(S,{key:0,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])):(M(),K(R,{key:1,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])),D(F,{margin:"0 calc(var(--spacing-unit) / 2)",name:y(q.status),size:"xs",class:ce({"fill-success":q.status==="C","fill-high":q.status==="E"})},null,8,["name","class"]),D(T,{class:ce({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":q.status!=="C"||u.value.length>0}),text:q.name,width:`calc(100% -
6434
+ `),onMouseenter:e[0]||(e[0]=(...h)=>o.onMouseEnter&&o.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>o.onMouseLeave&&o.onMouseLeave(...h))},[D(a,{ref:"modalManagerTemplateRef"},null,512),w("div",rCi,[o.windowPlugins.leftSidePanel?(M(),K(s,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):te("",!0),w("div",nCi,[(M(!0),_(Xe,null,Mt(o.windowPlugins.free,h=>(M(),K(l,{key:h.name,class:ce({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),D(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),D(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(M(),K(s,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):te("",!0)]),o.loading?(M(),_("div",aCi,[o.spinner&&o.spinner.component?(M(),K(Eo(o.spinner.component),Ta(xn({key:0},o.spinner.props)),null,16)):(M(),K(d,{key:1,size:"20px",border:"3px"}))])):te("",!0),o.layoutSettingsDisplayed?(M(),_("div",sCi,[D(u)])):te("",!0)],36)}const cCi=j(oCi,[["render",lCi],["__scopeId","data-v-485f288e"]]);class dCi{constructor(e=!0){const i=Y9i(pz,null,{resizable:e});i.registerContent("default",cCi),this.settings=xr({edit:!1,swap:!1,full:!1}),this.areas=i}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?X9i(e):null}copy(e,i=!0){return $9i(this.areas.layout,e,i)}open({ratio:e,direction:i,insertAfter:o,windowName:r=null,windowState:n=null,localContextId:a=null}={}){const s=r?{options:{windowName:r,windowState:n}}:null;return a===null?this.areas.splitLayout(e,i,o,s):this.areas.split(a,e,i,o,s)}swap(e,i){return this.areas.swap(e,i)}close(e){return this.areas.delete(e)}compare(e,i){if(!e&&!i)return!0;if(!e||!i)return!1;if(typeof e=="string"&&typeof i=="string")return e===i;if(typeof e=="string"||typeof i=="string")return!1;if(e.windowName&&i.windowName){if(e.windowName!==i.windowName)return!1;const o=new Set(e.windowState?.modelIds),r=new Set(i.windowState?.modelIds);return o.size===r.size&&[...o].every(n=>r.has(n))}return e.windowName||i.windowName||e.direction!==i.direction||e.children.length!==i.children.length?!1:e.children.every((o,r)=>this.compare(o,i.children[r]))}}const uCi="2.16.2-beta.3",hCi={version:uCi};let pCi=1;class fCi{constructor({plugins:e,api:i,ui:o,locale:r="fr"}){this.instanceId=pCi++,this.pluginManager=new Nyi(e),this.windowManager=new Vyi,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new o9i(i),this.globalContext=new f8e(this),this.state=g9i(this),this.shortcutManager=sme(this.state),this.uiSettings=o||{},this.i18n=new h8e(r),this._contextMenu=null,this.layout=new dCi(this.uiSettings.resizable!==!1),this._darkTheme=le(o?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return hCi.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||nme}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function ACi(t,e={}){e.backgroundColor&&(t.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&t.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&t.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&t.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&t.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&t.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&t.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&t.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&t.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&t.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&t.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&t.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&t.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&t.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&t.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&t.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&t.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&t.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&t.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&t.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&t.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&t.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&t.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&t.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&t.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&t.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&t.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&t.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&t.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&t.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),t.style.setProperty("--areas-background-color","transparent")}const gCi=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),um=Object.freeze({READ:"read",WRITE:"write"});function Pge(t){const e={};return t.forEach(i=>{const[o,r]=i.split(":");e[o]?e[o].push(r):e[o]=[r]}),e}const mCi={token_scopes:[],usable_scopes:[],user_role:25};function Ige(t=mCi){const e=Pge(t.token_scopes),i=Pge(t.usable_scopes);return{...AK(t),tokenScopes:e,usableScopes:i,userRole:gCi[t.user_role],user:t.user?AK(t.user):null,hasBcfReadPermission:i.bcf?.includes(um.READ)??!1,hasBcfWritePermission:i.bcf?.includes(um.WRITE)??!1,hasModelReadPermission:i.model?.includes(um.READ)??!1,hasModelWritePermission:i.model?.includes(um.WRITE)??!1,hasDocReadPermission:i.document?.includes(um.READ)??!1,hasDocWritePermission:i.document?.includes(um.WRITE)??!1}}const vCi={back:"Zur\xFCck",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t",noPriority:"Keine",assignedTo:"Zugewiesen an",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte w\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis",documentsLabel:"Dokumente",documentsCount:"Dokumente \u2013 {count} ausgew\xE4hlte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen \u2013 {count} ausgew\xE4hlte Gruppen",groupsText:"W\xE4hlen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren d\xFCrfen.",validate:"Best\xE4tigen"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"F\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Ver\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}},yCi={BcfComponents:vCi},bCi={back:"Back",BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority",noPriority:"None",assignedTo:"Assigned to",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result",documentsLabel:"Add a file",documentsCount:"Files - {count} selected files",groupsLabel:"Permissions",groupsCount:"Permissions - {count} selected groups",groupsText:"You are now setting the access rights: choose the user group(s) that will be exclusively authorized to see and interact with this topic.",validate:"Validate"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot",edited:"edited"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}},wCi={BcfComponents:bCi},CCi={back:"Volver",BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creaci\xF3n"},BcfSettings:{title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad",noPriority:"Sin",assignedTo:"Asignado a",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotaci\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotograf\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Est\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}},xCi={BcfComponents:CCi},kCi={back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents s\xE9lectionn\xE9s",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes s\xE9lectionn\xE9s",groupsText:"S\xE9lectionner les groupes utilisateur qui peuvent voir ce topic et int\xE9ragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot",edited:"edit\xE9"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorit\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}},MCi={BcfComponents:kCi},ECi={back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorit\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0",noPriority:"Nessuno",assignedTo:"Assegnato a",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorit\xE0",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE0",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorit\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorit\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}},BCi={BcfComponents:ECi},PCi={de:yCi,en:wCi,es:xCi,fr:MCi,it:BCi},ICi=({apiClient:t,fetchUsers:e,i18nPlugin:i}={})=>({install(o){t?Di.setup({apiClient:t,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),i?Object.entries(PCi).forEach(([r,n])=>{i.global.mergeLocaleMessage(r,n)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(nxe).forEach(([r,n])=>{o.component(r,n)})}}),SCi={title:"Building Maker",back:"Zur\xFCck",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"L\xF6schen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",input:"Name des Geb\xE4udes",error:"Ung\xFCltiger Name",createButton:"Erstellen",updateButton:"Best\xE4tigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Best\xE4tigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ung\xFCltiger Name",cancelButton:"Abbrechen",submitButton:"Best\xE4tigen"}},TCi={creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"},DCi={BuildingMaker:SCi,FileManager:TCi},RCi={t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},LCi={title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},_Ci={creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},FCi={title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},OCi={title:"Photosphere Building"},UCi={BIMDataComponents:RCi,BuildingMaker:LCi,FileManager:_Ci,MetaBuildingStructure:FCi,PhotosphereBuilding:OCi},NCi={title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",input:"Nombre del edificio",error:"Nombre no v\xE1lido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no v\xE1lido",cancelButton:"Anular",submitButton:"Validar"}},jCi={creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"},VCi={BuildingMaker:NCi,FileManager:jCi},zCi={t:{back:"Retour",cancel:"Annuler",create:"Cr\xE9er",delete:"Supprimer",download:"T\xE9l\xE9charger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"\xC9tage",validate:"Valider"}},HCi={title:"Building Maker",list:{text:"Cr\xE9ez et \xE9ditez les \xE9tages puis t\xE9l\xE9chagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du b\xE2timent",error:"Nom invalide"},view:{addStorey:"Ajouter un \xC9tage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel \xE9tage",input:"Nom",error:"Nom invalide"}},qCi={creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"S\xE9lectionner une page"},QCi={title:"Structure M\xE9ta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"\xC9quipements"},StoreySelector:{placeholder:"S\xE9lectionner un \xE9tage"}},GCi={title:"Photosph\xE8re Building"},KCi={BIMDataComponents:zCi,BuildingMaker:HCi,FileManager:qCi,MetaBuildingStructure:QCi,PhotosphereBuilding:GCi},JCi={title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},ZCi={creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"},WCi={BuildingMaker:JCi,FileManager:ZCi},YCi={de:DCi,en:UCi,es:VCi,fr:KCi,it:WCi},XCi=({i18nPlugin:t}={})=>({install(e){t?Object.entries(YCi).forEach(([i,o])=>{t.global.mergeLocaleMessage(i,o)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(Zni).forEach(([i,o])=>{e.component(i,o)})}}),$Ci={beforeMount(t,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);t.clickAwayHandler=i=>{(i.path||i.composedPath&&i.composedPath()).find(o=>o===t)||e.value()},window.addEventListener("mousedown",t.clickAwayHandler,!0)},unmounted(t){window.removeEventListener("mousedown",t.clickAwayHandler,!0),delete t.clickAwayHandler}},exi=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:Xs,BIMDataClickInputAway:$Ci},Symbol.toStringTag,{value:"Module"})),txi=t=>({install(e){Object.entries(Yet).forEach(([i,o])=>{e.component(i,o)}),Object.entries(exi).forEach(([i,o])=>e.directive(i.split("BIMData")[1],o))}}),ixi={name:"LiWrapper",render(){return Ao("li",this.$slots.default())}};function oxi(t,e){var i=new Set([]);return t.forEach(o=>{e.has(o)||i.add(o)}),i}const Sl=Yr("id"),rxi=({contextMenu:t,objects:e=[],state:i=t.$viewer.state,pictos:o})=>[{name:"selectAll",get group(){return t.groupPositions.select},position:1,get label(){return t.$t("context_menu.select_all")},get picto(){return o.get(this.name)},execute:()=>i.selectObjects(e.filter(Ns(Pi("visible"),bu("selected"))).map(Sl)),predicate:()=>e.some(Ns(Pi("visible"),bu("selected")))},{name:"deselectAll",get group(){return t.groupPositions.select},position:2,get label(){return t.$t("context_menu.deselect_all")},get picto(){return o.get(this.name)},execute:()=>i.deselectObjects(e.filter(Pi("selected")).map(Sl)),predicate:()=>e.some(Pi("selected"))},{name:"selectSimilar",get group(){return t.groupPositions.select},position:3,get label(){return t.$t("context_menu.select_similar")},get picto(){return o.get(this.name)},execute(){const r=e.filter(n=>n.visible&&n.type===this.selectedObject.type&&n.id!==this.selectedObject.id).map(Sl);i.selectObjects(r)},selectedObject:null,predicate(){const r=e.filter(Ns(Pi("visible"),Pi("selected")));return r.length===1&&r[0].type!==void 0?(this.selectedObject=r[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return t.$t("context_menu.reverse_selection")},get group(){return t.groupPositions.select},position:4,execute:()=>{const r=new Set(e.filter(Pi("selected")).map(Sl)),n=new Set(e.filter(Pi("visible")).map(Sl));i.selectObjects(Array.from(oxi(n,r)),{exclusive:!0})},predicate:()=>e.some(Ns(bu("selected"),Pi("visible")))&&e.some(Ns(Pi("selected"),Pi("visible")))},{name:"showAll",get group(){return t.groupPositions.visibility},position:1,get label(){return t.$t("context_menu.show_all")},get picto(){return o.get(this.name)},execute:()=>i.showObjects(e.filter(bu("visible")).map(Sl)),predicate:()=>e.some(bu("visible"))},{name:"hide",get group(){return t.groupPositions.visibility},position:2,get label(){return t.$t("context_menu.hide")},get picto(){return o.get(this.name)},objectsToHide:null,execute(){const r=this.objectsToHide.filter(Pi("selected"));r.length>0&&i.deselectObjects(r.map(Sl)),i.hideObjects(this.objectsToHide.map(Sl))},predicate(){return this.objectsToHide=e.filter(Ns(Pi("selected"),Pi("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return t.groupPositions.visibility},position:3,get label(){return t.$t("context_menu.hide_all")},execute:()=>{const r=e.filter(Pi("visible"));r.some(Pi("selected"))&&i.deselectObjects(r.filter(Pi("selected")).map(Sl)),i.hideObjects(r.map(Sl))},predicate:()=>e.some(Pi("visible"))}].filter(r=>r.predicate()),nxi={components:{LiWrapper:ixi},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(t){t?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(t){t.key==="Escape"&&this.away()},setPosition(t){const e=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=t.clientX-e.left,this.top=t.clientY-e.top,this.left+this.width>e.width&&(this.left=this.left-this.width),t.clientY>e.top+e.height/2?(this.bottom=e.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(t={}){let e=null;if((!t.execute||typeof t.execute!="function")&!t.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),t.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return t.id=this.nextCommandId++,t},open(t){this.currentCommands=[],this.setPosition(t),this.originEvent=t,t.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async t=>{if(typeof t.predicate=="function"){const e=t.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(t);else if(typeof e?.then=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const i=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,i===!0&&this.currentCommands.push(t))}}else this.currentCommands.push(t)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:t=[],state:e=this.$viewer.state,context:i=null}){const o=new Map;return i&&this.$viewer.shortcutManager.getShortcuts(i).forEach(r=>o.set(r.name,r.key)),rxi({contextMenu:this,objects:t,state:e,pictos:o})},executeCommand(t){if(t.execute&&(t.execute(this.originEvent),this.displayed=!1),t.component&&!t.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const t=new Map;this.currentCommands.forEach(i=>{(i.group===null||i.group===void 0)&&(i.group=0),t.has(i.group)?t.get(i.group).push(i):t.set(i.group,[i])}),t.forEach(i=>i.sort((o,r)=>(o.position=o.position||0,r.position=r.position||0,o.position-r.position)));const e=[...t.keys()].sort((i,o)=>i-o).map(i=>t.get(i)).flat();this.currentCommands=e},isGroupIntersection(t){if(t===0)return!1;const e=this.currentCommands[t-1],i=this.currentCommands[t];return e.group<i.group},registerContextCommand(t){const e=this.typeCheckCommand(t);return this.contextCommands.push(e),t.id},registerCommand(t){const e=this.typeCheckCommand(t);return this.registeredCommands.push(e),t.id},unregisterCommand(t){return this.registeredCommands.find(e=>e.id===t)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==t),!0):!1},preventDefault(){this.defaultPrevented=!0}}},axi={key:0,class:"separator"},sxi={class:"menu-text"},lxi={key:1,class:"menu-picto"},cxi={key:0,class:"context-menu__spinner"};function dxi(t,e,i,o,r,n){const a=I("BIMDataIconChevron"),s=I("LiWrapper"),l=I("BIMDataSpinner"),c=ai("click-away");return r.displayed&&(r.currentCommands.length||r.asyncPredicateRunning)?yt((M(),_("ul",{key:0,class:"bimdata-list context-menu",style:de(n.position)},[(M(!0),_(Xe,null,Mt(r.currentCommands,(d,u)=>(M(),K(s,{key:d.label,class:"context-menu__element",onClick:h=>n.executeCommand(d)},{default:N(()=>[n.isGroupIntersection(u)?(M(),_("div",axi)):te("",!0),w("div",sxi,z(d.label),1),!d.component&&d.picto?(M(),_("span",lxi,z(d.picto),1)):d.component?(M(),K(a,{key:2,size:"xxs",class:"fill-primary"})):te("",!0)]),_:2},1032,["onClick"]))),128)),r.asyncPredicateRunning?(M(),_("li",cxi,[D(l)])):te("",!0)],4)),[[c,n.away]]):te("",!0)}const uxi=j(nxi,[["render",dxi],["__scopeId","data-v-5b87d4a3"]]),hxi={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const t=lt("$viewer"),e=xr(new Map),i=r=>{if(!r.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(r.name))throw new Error(`[Viewer Header] Content with name ${r.name} already exists`);e.set(r.name,r)},o=r=>e.has(r)?(e.delete(r),!0):!1;return{logo:t.uiSettings.bimdataLogo!==!1,version:t.uiSettings.version!==!1?t.version:null,headerContent:e,headerRightContentComponents:De(()=>Array.from(e.values()).filter(r=>r.position==="right").sort((r,n)=>r.order-n.order).map(r=>r.component)),headerLeftContentComponents:De(()=>Array.from(e.values()).filter(r=>r.position==="left").sort((r,n)=>r.order-n.order).map(r=>r.component)),addContent:i,removeContent:o}}},pxi={class:"viewer-header"},fxi={class:"viewer-header__content"},Axi={class:"viewer-header__content__left"},gxi={class:"viewer-header__content__right"},mxi={key:0,class:"m-l-6 flex items-center"},vxi={key:1,class:"viewer-header__version"};function yxi(t,e,i,o,r,n){const a=I("BIMDataIllustration");return yt((M(),_("div",pxi,[w("div",fxi,[w("div",Axi,[(M(!0),_(Xe,null,Mt(o.headerLeftContentComponents,s=>(M(),K(Eo(s),{key:s.name}))),128))]),w("div",gxi,[(M(!0),_(Xe,null,Mt(o.headerRightContentComponents,s=>(M(),K(Eo(s),{key:s.name}))),128))])]),o.logo||o.version?(M(),_("div",mxi,[o.logo?(M(),K(a,{key:0,name:"logo",width:"30px",height:"30px"})):te("",!0),o.version?(M(),_("div",vxi,z(o.version),1)):te("",!0)])):te("",!0)],512)),[[Ht,i.visible]])}const bxi=j(hxi,[["render",yxi],["__scopeId","data-v-5c9ea6b6"]]),wxi={emits:["resize"],setup(t,{emit:e}){return{onResizerMousedown:i=>{i.preventDefault();let o=i.clientX;const r=a=>{a.preventDefault();const s=a.clientX-o;o=a.clientX,e("resize",s)},n=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",n)}}}},Cxi={class:"bimdata-separator"};function xxi(t,e,i,o,r,n){return M(),_("div",Cxi,[e[1]||(e[1]=w("div",{class:"bimdata-separator__line"},null,-1)),w("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...a)=>o.onResizerMousedown&&o.onResizerMousedown(...a))},null,32)])}const kxi=j(wxi,[["render",xxi],["__scopeId","data-v-79a3b3af"]]),Mxi={components:{Separator:kxi},props:{position:{type:String,required:!0,validator(t){return["left","right"].includes(t)}},sidePanel:{type:Object,required:!0,validator(t){if(t.width&&(typeof t.width!="number"||t.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof t.width}`),!1;const e=typeof t?.component=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(t){const e=le(null),i=le(t.sidePanel.width??400),o=(r,n=1)=>{const a=i.value+r*n;i.value=Math.max(0,a)};return pt(()=>t.sidePanel,()=>{Object.defineProperty(t.sidePanel,"width",{get(){return i.value},set(r){if(typeof r!="number"||r<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof r}`);return}i.value=r}}),Object.defineProperty(t.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:i,onResize:o}}},Exi={class:"bimdata-global-side-panel__component"};function Bxi(t,e,i,o,r,n){const a=I("Separator");return M(),_("div",{class:"bimdata-global-side-panel",style:de(`width: ${o.width}px`)},[i.sidePanel.resizable&&i.position==="right"?(M(),K(a,{key:0,onResize:e[0]||(e[0]=s=>o.onResize(s,-1))})):te("",!0),w("div",Exi,[(M(),K(Eo(i.sidePanel.component),{ref:"componentInstance"},null,512))]),i.sidePanel.resizable&&i.position==="left"?(M(),K(a,{key:1,onResize:e[1]||(e[1]=s=>o.onResize(s))})):te("",!0)],4)}const Pxi=j(Mxi,[["render",Bxi],["__scopeId","data-v-82d0d4cb"]]),Ixi={name:"BimdataViewer",components:{ContextMenu:uxi,ViewerHeader:bxi,ModalManager:Mge,GlobalSidePanel:Pxi},setup(){const t=lt("$viewer"),{globalContext:e,shortcutManager:i}=t;wi(()=>{i&&i.destroy(),e.hub.clear()}),li(()=>{t.pluginManager.runPluginsScripts(t)});const o=De(()=>t.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)),r=De(()=>t.uiSettings.version!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)?t.version:null),n=De(()=>e.leftSidePanel),a=De(()=>e.rightSidePanel),s=De(()=>{const p=t.uiSettings.header!==!1,A=e.localContexts.length===1&&e.localContexts[0].window?.header===!1,f=!!(n.value||a.value);return p&&(!A||f)}),l=t.uiSettings.contextMenu!==!1,c=le(null);function d(p){l&&c.value.open(p)}function u(){t.shortcutManager.active=!0}function h(){t.shortcutManager.active=!1}return{Layout:t.layout.areas.component,onContextMenu:d,onMouseenter:u,onMouseleave:h,isHeaderVisible:s,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:o,viewerVersionOnSingleWindow:r,version:t.version,loading:De(()=>e.loading),spinner:De(()=>e.spinner),leftSidePanel:n,rightSidePanel:a}}},Sxi={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},Txi={key:2,class:"viewer__logo"},Dxi={key:1,class:"version m-t-6"};function Rxi(t,e,i,o,r,n){const a=I("ModalManager"),s=I("ContextMenu"),l=I("ViewerHeader"),c=I("GlobalSidePanel"),d=I("BIMDataSpinner"),u=I("BIMDataIllustration");return M(),_("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>o.onContextMenu&&o.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>o.onMouseenter&&o.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>o.onMouseleave&&o.onMouseleave(...h))},[D(a,{ref:"modalManagerTemplateRef"},null,512),o.contextMenuEnabled?(M(),K(s,{key:0,ref:"contextMenuTemplateRef"},null,512)):te("",!0),D(l,{ref:"headerTemplateRef",visible:o.isHeaderVisible},null,8,["visible"]),w("div",{class:"bimdata-viewer__content",style:de(o.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[o.leftSidePanel?(M(),K(c,{key:0,"side-panel":o.leftSidePanel,position:"left"},null,8,["side-panel"])):te("",!0),(M(),K(Eo(o.Layout),{style:"height: 100%; flex-grow: 1;"})),o.rightSidePanel?(M(),K(c,{key:1,"side-panel":o.rightSidePanel,position:"right"},null,8,["side-panel"])):te("",!0)],4),o.loading?(M(),_("div",Sxi,[o.spinner&&o.spinner.component?(M(),K(Eo(o.spinner.component),Ta(xn({key:0},o.spinner.props)),null,16)):(M(),K(d,{key:1,size:"40px",border:"5px"}))])):te("",!0),!o.isHeaderVisible&&(o.bimdataLogoOnSingleWindow||o.viewerVersionOnSingleWindow)?(M(),_("div",Txi,[o.bimdataLogoOnSingleWindow?(M(),K(u,{key:0,name:"logo"})):te("",!0),o.viewerVersionOnSingleWindow?(M(),_("div",Dxi,z(o.version),1)):te("",!0)])):te("",!0)],544)}const Lxi=j(Ixi,[["render",Rxi],["__scopeId","data-v-0c1c941a"]]),_xi=["src"],Fxi={class:"bimdata-models__header"},Oxi={key:0,class:"bimdata-models__header__loader"},Uxi={class:"bimdata-models__header__picto"},Nxi={class:"bimdata-models__header__name"},jxi={key:0,class:"bimdata-models__header__name--empty"},Vxi={key:1,class:"bimdata-models__header__name--empty"},zxi={key:3},Hxi=["onMousemove","onClick"],qxi={__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(t){const e=t,i=lt("$viewer"),o=le(),r=le(0),n=le(0),a=le(),s=fi([]),l=le(!1),c=De(()=>i.localContext.loadedModels),d=De(()=>i.localContext.loadedModelIds),u=De(()=>i.localContext.loadingModelIds),h=De(()=>i.localContext.multiModel),p=De(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(k=>c.value.find(E=>E.document?.head_id!=null&&E.document.head_id===k.document.id)??k)),A=k=>d.value.includes(k),f=k=>u.value.includes(k),m=De(()=>{const{x:k,y:E}=a.value?.getBoundingClientRect()??{x:0,y:0};return`top:${n.value-E}px; left:${r.value-k}px;`}),g=k=>{!h.value&&A(k.id)||u.value.length>0||(i.localContext.loadedModelIds.includes(k.id)?i.localContext.unloadModels([k.id]):i.localContext.loadModels([k.id]))},y=k=>{switch(k){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},v=(k,E)=>{k?.viewer_360_file&&(r.value=E.clientX,n.value=E.clientY),o.value=k?.viewer_360_file},b=async k=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,k)).filter(E=>i.state.models.some(B=>B.archived)||!E.archived).sort(ol("updated_at",!1))}catch(E){console.error("[Models] Cannot get project models. Error: ",E)}finally{l.value=!1}return[]},x=k=>k.children?.some(E=>A(E.id))??!1;return b(i.localContext.modelTypes).then(k=>{s.value=k}),(k,E)=>{const B=I("BIMDataSpinner"),P=I("BIMDataIconModel3D"),T=I("BIMDataTextbox"),S=I("BIMDataCheckbox"),R=I("BIMDataRadio"),F=I("BIMDataIcon"),U=I("BIMDataDropdownList");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-models",{"bimdata-models--window-positioning":t.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-models__preview",style:de(m.value)},[w("img",{src:o.value},null,8,_xi)],4)):te("",!0),D(U,{style:de(`--bimdata-models-width: ${t.width};`),width:t.width,list:p.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:p.value.length===0,onElementClick:g},{header:N(({isOpen:q})=>[w("div",Fxi,[l.value||u.value.length>0?(M(),_("div",Oxi,[D(B)])):(M(),_(Xe,{key:1},[w("div",Uxi,[D(P)]),w("div",{class:ce(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":d.value.length===0}])},[w("span",null,z(d.value.length),1)],2),w("div",Nxi,[p.value.length===0?(M(),_("span",jxi,z(k.$t("model.no_model")),1)):d.value.length===0?(M(),_("span",Vxi,z(k.$t("model.no_loaded_model")),1)):d.value.length===1?(M(),K(T,{key:2,text:c.value[0].name,tooltip:!q},null,8,["text","tooltip"])):d.value.length>1?(M(),_("span",zxi,z(k.$t("model.selected_models")),1)):te("",!0)])],64))])]),element:N(({element:q,close:V})=>[w("div",{class:"bimdata-models__model",onMousemove:W=>t.preview&&v(q,W),onMouseout:E[0]||(E[0]=W=>t.preview&&v()),onClick:()=>{!h.value&&!A(q.id)&&V()}},[h.value?(M(),K(S,{key:0,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])):(M(),K(R,{key:1,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])),D(F,{margin:"0 calc(var(--spacing-unit) / 2)",name:y(q.status),size:"xs",class:ce({"fill-success":q.status==="C","fill-high":q.status==="E"})},null,8,["name","class"]),D(T,{class:ce({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":q.status!=="C"||u.value.length>0}),text:q.name,width:`calc(100% -
6435
6435
  ${h.value?13:23}px - 2 * 6px - 16px)`},null,8,["class","text","width"]),q.document&&!q.document.is_head_version?(M(),K(F,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):te("",!0)],40,Hxi),f(q.id)?(M(),K(B,{key:0,class:"bimdata-models__model__spinner"})):te("",!0)]),_:1},8,["style","width","list","loading","disabled"])],2)}}},Sge=j(qxi,[["__scopeId","data-v-34c2cf79"]]),Qxi="data:image/svg+xml,%3csvg%20width='16'%20height='21'%20viewBox='0%200%2016%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.47193%202.76644C7.65699%202.84439%207.77716%203.02565%207.777%203.22661L7.77339%207.94624C7.77318%208.22238%207.54916%208.44655%207.27301%208.44693L2.4192%208.45366C2.21569%208.45394%202.03258%208.33085%201.95617%208.1424C1.87975%207.95394%201.92528%207.73773%202.07129%207.59566L6.92872%202.86931C7.0729%202.72902%207.28688%202.6885%207.47193%202.76644ZM3.65141%207.45195L6.77378%207.44762L6.7761%204.41157L3.65141%207.45195ZM5.81657%200.893911L6.02338%200.893274L13.3879%200.870595C14.679%200.866619%2015.7208%201.91642%2015.722%203.20083L15.2221%203.20237L15.722%203.20052L15.722%203.20083L15.745%2017.8999L15.745%2017.9002C15.7462%2019.1846%2014.7063%2020.2408%2013.4153%2020.2448L2.35929%2020.2788C1.07114%2020.2828%200.0171799%2019.2362%200.0159721%2017.9486L0.00563138%206.92409L0.00543684%206.71668L0.152103%206.56972L5.67032%201.04045L5.81657%200.893911ZM6.23113%201.89264L1.00582%207.12841L1.01597%2017.9455C1.01666%2018.6791%201.62068%2019.2811%202.35835%2019.2788L13.4143%2019.2448C14.1484%2019.2425%2014.7456%2018.6402%2014.745%2017.9035C14.745%2017.9034%2014.745%2017.9033%2014.745%2017.9033L14.722%203.20423L14.722%203.20391C14.7213%202.46716%2014.123%201.86833%2013.3888%201.87059L6.23113%201.89264Z'%20fill='%232F374A'/%3e%3c/svg%3e",Gxi=["src"],Kxi={key:0,class:"bimdata-multi-model-loader__header-container"},Jxi={key:0,class:"bimdata-multi-model-loader__header__loader"},Zxi={class:"bimdata-multi-model-loader__header__picto"},Wxi=["src"],Yxi={class:"bimdata-multi-model-loader__header__name"},Xxi={key:0,class:"bimdata-multi-model-loader__header__name--empty"},$xi={key:1,class:"bimdata-multi-model-loader__header__name--empty"},eki={key:3},tki={key:1,class:"bimdata-multi-model-loader__main"},iki=["onMousemove","onClick"],oki={__name:"BIMDataMultiModelLoader",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(t){const e=t,i=lt("$viewer"),o=le(),r=le(0),n=le(0),a=le(),s=fi([]),l=le(!1),c=le(!0),d=R=>{R.key==="Escape"?c.value=!0:R.key==="Enter"&&B()};pt(c,R=>{R?(window.removeEventListener("keydown",d),v.clear(),y.clear(),o.value=null):window.addEventListener("keydown",d)});const u=De(()=>i.localContext.loadedModels),h=De(()=>i.localContext.loadedModelIds),p=De(()=>i.localContext.loadingModelIds),A=De(()=>i.localContext.multiModel),f=De(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(R=>u.value.find(F=>F.document?.head_id!=null&&F.document.head_id===R.document.id)??R)),m=R=>h.value.includes(R),g=R=>p.value.includes(R),y=xr(new Set),v=xr(new Set),b=R=>R.children?.some(F=>m(F.id))??!1,x=R=>(m(R.id)||b(R)||y.has(R))&&!v.has(R),k=De(()=>{const{x:R,y:F}=a.value.getBoundingClientRect();return`top:${n.value-F}px; left:${r.value-R}px;`}),E=R=>{R.status==="C"&&(!A.value&&m(R.id)||(m(R.id)?v.has(R)?v.delete(R):v.add(R):y.has(R)?y.delete(R):y.add(R)))},B=()=>{y.size>0&&i.localContext.loadModels(Array.from(y).map(R=>R.id)),v.size>0&&i.localContext.unloadModels(Array.from(v).map(R=>R.id)),c.value=!0},P=R=>{switch(R){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},T=R=>R.document&&!R.document.is_head_version,S=(R,F)=>{!e.preview||c.value||(R?.viewer_360_file&&(r.value=F.clientX,n.value=F.clientY),o.value=R?.viewer_360_file)};return(async R=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,R)).filter(F=>i.state.models.some(U=>U.archived)||!F.archived).sort(ol("updated_at",!1))}catch(F){console.error("[Models] Cannot get project models. Error: ",F)}finally{l.value=!1}return[]})(i.localContext.modelTypes).then(R=>{s.value=R}),(R,F)=>{const U=I("BIMDataSpinner"),q=I("BIMDataTextbox"),V=I("BIMDataIconChevron"),W=I("BIMDataButton"),Y=I("BIMDataIconFileIfcPolychrome"),$=I("BIMDataCheckbox"),fe=I("BIMDataRadio"),Me=I("BIMDataIcon"),Se=I("BIMDataPaginatedList"),qe=ai("click-away");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-multi-model-loader",{"bimdata-multi-model-loader--window-positioning":t.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-multi-model-loader__preview",style:de(k.value)},[w("img",{src:o.value},null,8,Gxi)],4)):te("",!0),D(Ai,{name:"fade",mode:"out-in"},{default:N(()=>[c.value?(M(),_("div",Kxi,[gt(R.$slots,"left",{},void 0,!0),w("div",{class:"bimdata-multi-model-loader__header",onClick:F[0]||(F[0]=Qe=>c.value=!1)},[l.value||p.value.length>0?(M(),_("div",Jxi,[D(U)])):(M(),_(Xe,{key:1},[w("div",Zxi,[w("img",{src:it(Qxi),alt:"file icon"},null,8,Wxi)]),w("div",{class:ce(["bimdata-multi-model-loader__header__number bimdata-info-length",{"bimdata-multi-model-loader__header__number--empty":h.value.length===0}])},[w("span",null,z(h.value.length),1)],2),w("div",Yxi,[f.value.length===0?(M(),_("span",Xxi,z(R.$t("model.no_model")),1)):h.value.length===0?(M(),_("span",$xi,z(R.$t("model.no_loaded_model")),1)):h.value.length===1?(M(),K(q,{key:2,text:u.value[0].name,tooltip:c.value,width:"233px"},null,8,["text","tooltip"])):h.value.length>1?(M(),_("span",eki,z(R.$t("model.selected_models")),1)):te("",!0)]),D(W,{color:"default",icon:"",radius:"",fill:"",width:"21px",height:"21px"},{default:N(()=>[D(V,{size:"xxxs"})]),_:1})],64))]),gt(R.$slots,"right",{},void 0,!0)])):yt((M(),_("div",tki,[D(Se,{list:f.value,"per-page":10},{element:N(({element:Qe})=>[w("div",{class:ce(["bimdata-multi-model-loader__main__model",{"bimdata-multi-model-loader__main__model--disabled":Qe.status!=="C"}]),onMousemove:Ce=>S(Qe,Ce),onMouseout:F[1]||(F[1]=Ce=>S()),onClick:Ce=>E(Qe)},[D(Y,{fill:"",color:"default",size:"xs"}),A.value?(M(),K($,{key:0,"model-value":x(Qe),disabled:Qe.status!=="C"},null,8,["model-value","disabled"])):(M(),K(fe,{key:1,"model-value":x(Qe),disabled:Qe.status!=="C"},null,8,["model-value","disabled"])),D(q,{class:ce({"bimdata-multi-model-loader__main__model__name":!0,"bimdata-multi-model-loader__main__model__name--disabled":Qe.status!=="C"}),text:Qe.name,width:T(Qe)?"333px":"363px"},null,8,["class","text","width"]),T(Qe)?(M(),K(Me,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):te("",!0),g(Qe.id)?(M(),K(U,{key:3,class:"bimdata-multi-model-loader__main__model__spinner"})):(M(),K(Me,{key:4,name:P(Qe.status),size:"xs",class:ce({"fill-success":Qe.status==="C","fill-high":Qe.status==="E"})},null,8,["name","class"]))],42,iki)]),_:1},8,["list"]),D(W,{class:"bimdata-multi-model-loader__main__validate",width:"93px",color:"primary",fill:"",radius:"",disabled:it(y).size===0&&it(v).size===0,onClick:B},{default:N(()=>[Je(z(R.$t("global.validate")),1)]),_:1},8,["disabled"])])),[[qe,()=>c.value=!0]])]),_:3})],2)}}},rki=j(oki,[["__scopeId","data-v-44e6af66"]]),nki={data(){return{shown:!1}},mounted(){setTimeout(()=>{this.shown=!0},500)}};function aki(t,e,i,o,r,n){const a=I("BIMDataIllustration");return M(),_("div",{class:"bimdata__no-model",style:de({"--no-model--opacity":r.shown?1:0})},[D(a,{name:"emptyViewer",x:"90",y:"90"}),w("span",null,z(t.$t("model.select_model")),1)],4)}const Tge=j(nki,[["render",aki],["__scopeId","data-v-5ffd9bc0"]]);window.BIMDataViewerVue=pz;class ski{constructor(e={}){const{api:i={},ui:o}=e;this.uiCfg=o,i.apiUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `apiUrl` not set, use 'https://api.bimdata.io' by default."),i.apiUrl="https://api.bimdata.io"),i.archiveUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `archiveUrl` not set, use 'https://archive.bimdata.io' by default."),i.archiveUrl="https://archive.bimdata.io"),i.pdfBackendUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `pdfBackendUrl` not set, use 'https://pdf-backend.bimdata.io' by default."),i.pdfBackendUrl="https://pdf-backend.bimdata.io"),i.ifcIds&&(console.warn("[BIMData Viewer] DEPRECATED - Viewer config - please use the `modelIds` property instead of `ifcIds`."),i.modelIds===void 0&&(i.modelIds=i.ifcIds)),i.modelIds||(i.modelIds=[]),i.offline?.dataFile&&(i.offline.data=i.offline.dataFile),this.$viewer=new fCi(e),i.offline?.enabled?this.$viewer.api.enableOfflineMode(i.offline.data,i.offline.options).then(()=>this.state.loadModels(i.modelIds)):(this.$viewer.globalContext.loadingProcessStart(),this.state.loadModels(i.modelIds).finally(()=>this.$viewer.globalContext.loadingProcessEnd())),this.vueApp=null}get state(){return this.$viewer.state}get api(){return this.$viewer.api}async mount(e,i="3d"){const{$viewer:o}=this;await o.api.ready;try{const d=await o.api.apiClient.collaborationApi.checkProjectAccess(o.api.cloudId,o.api.projectId);o.api.permissions=Ige(d)}catch{o.api.permissions=Ige()}const r=this.api.accessToken,{i18n:n}=o;n.registerTranslations(o.pluginManager.pluginTranslations),o.layout.apply(i);const a={i18n:n.i18nVuePlugin,data(){return{accessToken:r}},render(){return Ao(Lxi,{style:"height: 100%"})}},s=Qm(a).use(n.i18nVuePlugin).use(txi()).use(XCi({i18nPlugin:n.i18nVuePlugin})).use(ICi({apiClient:o.api.apiClient,i18nPlugin:n.i18nVuePlugin}));s.provide("$viewer",o),s.provide("BIMDATA_DESIGN_SYSTEM_DARK_THEME",De(()=>o.darkTheme)),s.component("BIMDataModelLoader",Sge),s.component("BIMDataMultiModelLoader",rki),s.component("BIMDataNoModelWindowPlaceHolder",Tge),s.component("BIMDataStoreySelector",hP),s.component("ModelsLoader",Sge),s.component("NoModelWindowPlaceHolder",Tge);const l=e instanceof HTMLElement?e:document.querySelector(e);l&&(l.style.height="100%");const c=s.mount(e);return c.$viewer=o,ACi(c.$el,this.uiCfg?.style),typeof window<"u"&&(window.bimdataViewer=c),this.vueApp=s,c}destroy(){this.vueApp?.unmount()}setLocale(e){if(!Sz.includes(e))throw new Error(`Viewer available locales are ${Sz.join(", ")}.`);this.$viewer.i18n.locale=e}registerPlugin(e){this.$viewer.registerPlugin(e)}registerWindow(e){return this.$viewer.windowManager.registerWindow(e)}unregisterWindow(e){return this.$viewer.windowManager.unregisterWindow(e)}setAccessToken(e){this.api.accessToken=e}async loadModels(e){this.$viewer.globalContext.loadingProcessStart();const i=await this.state.loadModels(e);return this.$viewer.globalContext.loadingProcessEnd(),i}loadIfcs(e){return console.warn("[BIMData Viewer] DEPRECATED - Viewer - please use the loadModels method instead of loadIfcs."),this.loadModels(e)}}const Dge=(t={})=>new ski(t);window.makeBIMDataViewer=Dge;export{Dge as default};