(function webpackUniversalModuleDefinition(root, factory) { if (typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if (typeof define === 'function' && define.amd) define([], factory); else if (typeof exports === 'object') exports['loaders'] = factory(); else root['loaders'] = factory();})(globalThis, function () { "use strict";var __exports__=(()=>{var r0=Object.create;var co=Object.defineProperty;var n0=Object.getOwnPropertyDescriptor;var o0=Object.getOwnPropertyNames;var s0=Object.getPrototypeOf,i0=Object.prototype.hasOwnProperty;var it=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lt=(t,e)=>{for(var r in e)co(t,r,{get:e[r],enumerable:!0})},ao=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of o0(e))!i0.call(t,o)&&o!==r&&co(t,o,{get:()=>e[o],enumerable:!(n=n0(e,o))||n.enumerable});return t},fo=(t,e,r)=>(ao(t,e,"default"),r&&ao(r,e,"default")),dr=(t,e,r)=>(r=t!=null?r0(s0(t)):{},ao(e||!t||!t.__esModule?co(r,"default",{value:t,enumerable:!0}):r,t)),a0=t=>ao(co({},"__esModule",{value:!0}),t);var fn=it((Z_,Rc)=>{Rc.exports=globalThis.loaders});var ue=it(At=>{"use strict";var Zx=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function Yx(t,e){return Object.prototype.hasOwnProperty.call(t,e)}At.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)Yx(r,n)&&(t[n]=r[n])}}return t};At.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var Wx={arraySet:function(t,e,r,n,o){if(e.subarray&&t.subarray){t.set(e.subarray(r,r+n),o);return}for(var s=0;s{"use strict";var $x=ue(),tE=4,su=0,iu=1,eE=2;function Yr(t){for(var e=t.length;--e>=0;)t[e]=0}var rE=0,uu=1,nE=2,oE=3,sE=258,Za=29,Kn=256,zn=Kn+1+Za,Zr=30,Ya=19,du=2*zn+1,er=15,za=16,iE=7,Wa=256,Au=16,mu=17,pu=18,Ka=[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],ms=[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],aE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],gu=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],cE=512,de=new Array((zn+2)*2);Yr(de);var Jn=new Array(Zr*2);Yr(Jn);var Qn=new Array(cE);Yr(Qn);var Vn=new Array(sE-oE+1);Yr(Vn);var qa=new Array(Za);Yr(qa);var ps=new Array(Zr);Yr(ps);function Qa(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}var Bu,xu,Eu;function Va(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function _u(t){return t<256?Qn[t]:Qn[256+(t>>>7)]}function jn(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function Ct(t,e,r){t.bi_valid>za-r?(t.bi_buf|=e<>za-t.bi_valid,t.bi_valid+=r-za):(t.bi_buf|=e<>>=1,r<<=1;while(--e>0);return r>>>1}function fE(t){t.bi_valid===16?(jn(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)}function lE(t,e){var r=e.dyn_tree,n=e.max_code,o=e.stat_desc.static_tree,s=e.stat_desc.has_stree,i=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,f=e.stat_desc.max_length,c,l,h,u,d,A,m=0;for(u=0;u<=er;u++)t.bl_count[u]=0;for(r[t.heap[t.heap_max]*2+1]=0,c=t.heap_max+1;cf&&(u=f,m++),r[l*2+1]=u,!(l>n)&&(t.bl_count[u]++,d=0,l>=a&&(d=i[l-a]),A=r[l*2],t.opt_len+=A*(u+d),s&&(t.static_len+=A*(o[l*2+1]+d)));if(m!==0){do{for(u=f-1;t.bl_count[u]===0;)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[f]--,m-=2}while(m>0);for(u=f;u!==0;u--)for(l=t.bl_count[u];l!==0;)h=t.heap[--c],!(h>n)&&(r[h*2+1]!==u&&(t.opt_len+=(u-r[h*2+1])*r[h*2],r[h*2+1]=u),l--)}}function Cu(t,e,r){var n=new Array(er+1),o=0,s,i;for(s=1;s<=er;s++)n[s]=o=o+r[s-1]<<1;for(i=0;i<=e;i++){var a=t[i*2+1];a!==0&&(t[i*2]=yu(n[a]++,a))}}function hE(){var t,e,r,n,o,s=new Array(er+1);for(r=0,n=0;n>=7;n8?jn(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function uE(t,e,r,n){bu(t),n&&(jn(t,r),jn(t,~r)),$x.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function au(t,e,r,n){var o=e*2,s=r*2;return t[o]>1;i>=1;i--)ja(t,r,i);c=s;do i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],ja(t,r,1),a=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=a,r[c*2]=r[i*2]+r[a*2],t.depth[c]=(t.depth[i]>=t.depth[a]?t.depth[i]:t.depth[a])+1,r[i*2+1]=r[a*2+1]=c,t.heap[1]=c++,ja(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],lE(t,e),Cu(r,f,t.bl_count)}function fu(t,e,r){var n,o=-1,s,i=e[0*2+1],a=0,f=7,c=4;for(i===0&&(f=138,c=3),e[(r+1)*2+1]=65535,n=0;n<=r;n++)s=i,i=e[(n+1)*2+1],!(++a=3&&t.bl_tree[gu[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function AE(t,e,r,n){var o;for(Ct(t,e-257,5),Ct(t,r-1,5),Ct(t,n-4,4),o=0;o>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return su;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return iu;for(r=32;r0?(t.strm.data_type===eE&&(t.strm.data_type=mE(t)),Xa(t,t.l_desc),Xa(t,t.d_desc),i=dE(t),o=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=o&&(o=s)):o=s=r+5,r+4<=o&&e!==-1?Mu(t,e,r,n):t.strategy===tE||s===o?(Ct(t,(uu<<1)+(n?1:0),3),cu(t,de,Jn)):(Ct(t,(nE<<1)+(n?1:0),3),AE(t,t.l_desc.max_code+1,t.d_desc.max_code+1,i+1),cu(t,t.dyn_ltree,t.dyn_dtree)),Tu(t),n&&bu(t)}function xE(t,e,r){return t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255,t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255,t.pending_buf[t.l_buf+t.last_lit]=r&255,t.last_lit++,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(Vn[r]+Kn+1)*2]++,t.dyn_dtree[_u(e)*2]++),t.last_lit===t.lit_bufsize-1}Wr._tr_init=pE;Wr._tr_stored_block=Mu;Wr._tr_flush_block=BE;Wr._tr_tally=xE;Wr._tr_align=gE});var $a=it((aR,Iu)=>{"use strict";function EE(t,e,r,n){for(var o=t&65535|0,s=t>>>16&65535|0,i=0;r!==0;){i=r>2e3?2e3:r,r-=i;do o=o+e[n++]|0,s=s+o|0;while(--i);o%=65521,s%=65521}return o|s<<16|0}Iu.exports=EE});var tc=it((cR,Su)=>{"use strict";function _E(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e}var yE=_E();function CE(t,e,r,n){var o=yE,s=n+r;t^=-1;for(var i=n;i>>8^o[(t^e[i])&255];return t^-1}Su.exports=CE});var gs=it((fR,Fu)=>{"use strict";Fu.exports={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"}});var Pu=it(re=>{"use strict";var mt=ue(),Gt=wu(),Lu=$a(),Se=tc(),TE=gs(),sr=0,bE=1,ME=3,Le=4,Ru=5,ee=0,Du=1,vt=-2,wE=-3,ec=-5,IE=-1,SE=1,Bs=2,FE=3,RE=4,DE=0,OE=2,ys=8,LE=9,GE=15,vE=8,NE=29,UE=256,nc=UE+1+NE,PE=30,HE=19,kE=2*nc+1,JE=15,J=3,De=258,zt=De+J+1,zE=32,Cs=42,oc=69,xs=73,Es=91,_s=103,rr=113,Zn=666,st=1,Yn=2,nr=3,tn=4,QE=3;function Oe(t,e){return t.msg=TE[e],e}function Ou(t){return(t<<1)-(t>4?9:0)}function Re(t){for(var e=t.length;--e>=0;)t[e]=0}function Fe(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(mt.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))}function ft(t,e){Gt._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Fe(t.strm)}function j(t,e){t.pending_buf[t.pending++]=e}function Xn(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function VE(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),o===0?0:(t.avail_in-=o,mt.arraySet(e,t.input,t.next_in,o,r),t.state.wrap===1?t.adler=Lu(t.adler,e,o,r):t.state.wrap===2&&(t.adler=Se(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function Gu(t,e){var r=t.max_chain_length,n=t.strstart,o,s,i=t.prev_length,a=t.nice_match,f=t.strstart>t.w_size-zt?t.strstart-(t.w_size-zt):0,c=t.window,l=t.w_mask,h=t.prev,u=t.strstart+De,d=c[n+i-1],A=c[n+i];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do if(o=e,!(c[o+i]!==A||c[o+i-1]!==d||c[o]!==c[n]||c[++o]!==c[n+1])){n+=2,o++;do;while(c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&c[++n]===c[++o]&&ni){if(t.match_start=e,i=s,s>=a)break;d=c[n+i-1],A=c[n+i]}}while((e=h[e&l])>f&&--r!==0);return i<=t.lookahead?i:t.lookahead}function or(t){var e=t.w_size,r,n,o,s,i;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-zt)){mt.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do o=t.head[--r],t.head[r]=o>=e?o-e:0;while(--n);n=e,r=n;do o=t.prev[--r],t.prev[r]=o>=e?o-e:0;while(--n);s+=e}if(t.strm.avail_in===0)break;if(n=VE(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=n,t.lookahead+t.insert>=J)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(or(t),t.lookahead===0&&e===sr)return st;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((t.strstart===0||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,ft(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-zt&&(ft(t,!1),t.strm.avail_out===0))return st}return t.insert=0,e===Le?(ft(t,!0),t.strm.avail_out===0?nr:tn):(t.strstart>t.block_start&&(ft(t,!1),t.strm.avail_out===0),st)}function rc(t,e){for(var r,n;;){if(t.lookahead=J&&(t.ins_h=(t.ins_h<=J)if(n=Gt._tr_tally(t,t.strstart-t.match_start,t.match_length-J),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=J){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=J&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=J-1)),t.prev_length>=J&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-J,n=Gt._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-J),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=o&&(t.ins_h=(t.ins_h<=J&&t.strstart>0&&(o=t.strstart-1,n=i[o],n===i[++o]&&n===i[++o]&&n===i[++o])){s=t.strstart+De;do;while(n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&ot.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=J?(r=Gt._tr_tally(t,1,t.match_length-J),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=Gt._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(ft(t,!1),t.strm.avail_out===0))return st}return t.insert=0,e===Le?(ft(t,!0),t.strm.avail_out===0?nr:tn):t.last_lit&&(ft(t,!1),t.strm.avail_out===0)?st:Yn}function XE(t,e){for(var r;;){if(t.lookahead===0&&(or(t),t.lookahead===0)){if(e===sr)return st;break}if(t.match_length=0,r=Gt._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(ft(t,!1),t.strm.avail_out===0))return st}return t.insert=0,e===Le?(ft(t,!0),t.strm.avail_out===0?nr:tn):t.last_lit&&(ft(t,!1),t.strm.avail_out===0)?st:Yn}function te(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}var $r;$r=[new te(0,0,0,0,jE),new te(4,4,8,4,rc),new te(4,5,16,8,rc),new te(4,6,32,32,rc),new te(4,4,16,16,qr),new te(8,16,32,32,qr),new te(8,16,128,128,qr),new te(8,32,128,256,qr),new te(32,128,258,1024,qr),new te(32,258,258,4096,qr)];function ZE(t){t.window_size=2*t.w_size,Re(t.head),t.max_lazy_match=$r[t.level].max_lazy,t.good_match=$r[t.level].good_length,t.nice_match=$r[t.level].nice_length,t.max_chain_length=$r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=J-1,t.match_available=0,t.ins_h=0}function YE(){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=ys,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 mt.Buf16(kE*2),this.dyn_dtree=new mt.Buf16((2*PE+1)*2),this.bl_tree=new mt.Buf16((2*HE+1)*2),Re(this.dyn_ltree),Re(this.dyn_dtree),Re(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new mt.Buf16(JE+1),this.heap=new mt.Buf16(2*nc+1),Re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new mt.Buf16(2*nc+1),Re(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function vu(t){var e;return!t||!t.state?Oe(t,vt):(t.total_in=t.total_out=0,t.data_type=OE,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?Cs:rr,t.adler=e.wrap===2?0:1,e.last_flush=sr,Gt._tr_init(e),ee)}function Nu(t){var e=vu(t);return e===ee&&ZE(t.state),e}function WE(t,e){return!t||!t.state||t.state.wrap!==2?vt:(t.state.gzhead=e,ee)}function Uu(t,e,r,n,o,s){if(!t)return vt;var i=1;if(e===IE&&(e=6),n<0?(i=0,n=-n):n>15&&(i=2,n-=16),o<1||o>LE||r!==ys||n<8||n>15||e<0||e>9||s<0||s>RE)return Oe(t,vt);n===8&&(n=9);var a=new YE;return t.state=a,a.strm=t,a.wrap=i,a.gzhead=null,a.w_bits=n,a.w_size=1<Ru||e<0)return t?Oe(t,vt):vt;if(n=t.state,!t.output||!t.input&&t.avail_in!==0||n.status===Zn&&e!==Le)return Oe(t,t.avail_out===0?ec:vt);if(n.strm=t,r=n.last_flush,n.last_flush=e,n.status===Cs)if(n.wrap===2)t.adler=0,j(n,31),j(n,139),j(n,8),n.gzhead?(j(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),j(n,n.gzhead.time&255),j(n,n.gzhead.time>>8&255),j(n,n.gzhead.time>>16&255),j(n,n.gzhead.time>>24&255),j(n,n.level===9?2:n.strategy>=Bs||n.level<2?4:0),j(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(j(n,n.gzhead.extra.length&255),j(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=Se(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=oc):(j(n,0),j(n,0),j(n,0),j(n,0),j(n,0),j(n,n.level===9?2:n.strategy>=Bs||n.level<2?4:0),j(n,QE),n.status=rr);else{var i=ys+(n.w_bits-8<<4)<<8,a=-1;n.strategy>=Bs||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=zE),i+=31-i%31,n.status=rr,Xn(n,i),n.strstart!==0&&(Xn(n,t.adler>>>16),Xn(n,t.adler&65535)),t.adler=1}if(n.status===oc)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=Se(t.adler,n.pending_buf,n.pending-o,o)),Fe(t),o=n.pending,n.pending===n.pending_buf_size));)j(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=Se(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=xs)}else n.status=xs;if(n.status===xs)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=Se(t.adler,n.pending_buf,n.pending-o,o)),Fe(t),o=n.pending,n.pending===n.pending_buf_size)){s=1;break}n.gzindexo&&(t.adler=Se(t.adler,n.pending_buf,n.pending-o,o)),s===0&&(n.gzindex=0,n.status=Es)}else n.status=Es;if(n.status===Es)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=Se(t.adler,n.pending_buf,n.pending-o,o)),Fe(t),o=n.pending,n.pending===n.pending_buf_size)){s=1;break}n.gzindexo&&(t.adler=Se(t.adler,n.pending_buf,n.pending-o,o)),s===0&&(n.status=_s)}else n.status=_s;if(n.status===_s&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Fe(t),n.pending+2<=n.pending_buf_size&&(j(n,t.adler&255),j(n,t.adler>>8&255),t.adler=0,n.status=rr)):n.status=rr),n.pending!==0){if(Fe(t),t.avail_out===0)return n.last_flush=-1,ee}else if(t.avail_in===0&&Ou(e)<=Ou(r)&&e!==Le)return Oe(t,ec);if(n.status===Zn&&t.avail_in!==0)return Oe(t,ec);if(t.avail_in!==0||n.lookahead!==0||e!==sr&&n.status!==Zn){var f=n.strategy===Bs?XE(n,e):n.strategy===FE?KE(n,e):$r[n.level].func(n,e);if((f===nr||f===tn)&&(n.status=Zn),f===st||f===nr)return t.avail_out===0&&(n.last_flush=-1),ee;if(f===Yn&&(e===bE?Gt._tr_align(n):e!==Ru&&(Gt._tr_stored_block(n,0,0,!1),e===ME&&(Re(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Fe(t),t.avail_out===0))return n.last_flush=-1,ee}return e!==Le?ee:n.wrap<=0?Du:(n.wrap===2?(j(n,t.adler&255),j(n,t.adler>>8&255),j(n,t.adler>>16&255),j(n,t.adler>>24&255),j(n,t.total_in&255),j(n,t.total_in>>8&255),j(n,t.total_in>>16&255),j(n,t.total_in>>24&255)):(Xn(n,t.adler>>>16),Xn(n,t.adler&65535)),Fe(t),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?ee:Du)}function t_(t){var e;return!t||!t.state?vt:(e=t.state.status,e!==Cs&&e!==oc&&e!==xs&&e!==Es&&e!==_s&&e!==rr&&e!==Zn?Oe(t,vt):(t.state=null,e===rr?Oe(t,wE):ee))}function e_(t,e){var r=e.length,n,o,s,i,a,f,c,l;if(!t||!t.state||(n=t.state,i=n.wrap,i===2||i===1&&n.status!==Cs||n.lookahead))return vt;for(i===1&&(t.adler=Lu(t.adler,e,r,0)),n.wrap=0,r>=n.w_size&&(i===0&&(Re(n.head),n.strstart=0,n.block_start=0,n.insert=0),l=new mt.Buf8(n.w_size),mt.arraySet(l,e,r-n.w_size,n.w_size,0),e=l,r=n.w_size),a=t.avail_in,f=t.next_in,c=t.input,t.avail_in=r,t.next_in=0,t.input=e,or(n);n.lookahead>=J;){o=n.strstart,s=n.lookahead-(J-1);do n.ins_h=(n.ins_h<{"use strict";var Ts=ue(),Hu=!0,ku=!0;try{String.fromCharCode.apply(null,[0])}catch{Hu=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ku=!1}var Wn=new Ts.Buf8(256);for(Ae=0;Ae<256;Ae++)Wn[Ae]=Ae>=252?6:Ae>=248?5:Ae>=240?4:Ae>=224?3:Ae>=192?2:1;var Ae;Wn[254]=Wn[254]=1;en.string2buf=function(t){var e,r,n,o,s,i=t.length,a=0;for(o=0;o>>6,e[s++]=128|r&63):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|r&63):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|r&63);return e};function Ju(t,e){if(e<65534&&(t.subarray&&ku||!t.subarray&&Hu))return String.fromCharCode.apply(null,Ts.shrinkBuf(t,e));for(var r="",n=0;n4){a[n++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r1){a[n++]=65533;continue}o<65536?a[n++]=o:(o-=65536,a[n++]=55296|o>>10&1023,a[n++]=56320|o&1023)}return Ju(a,n)};en.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+Wn[t[r]]>e?r:e}});var ic=it((uR,zu)=>{"use strict";function r_(){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}zu.exports=r_});var Ku=it(to=>{"use strict";var qn=Pu(),$n=ue(),cc=sc(),fc=gs(),n_=ic(),ju=Object.prototype.toString,o_=0,ac=4,rn=0,Qu=1,Vu=2,s_=-1,i_=0,a_=8;function ir(t){if(!(this instanceof ir))return new ir(t);this.options=$n.assign({level:s_,method:a_,chunkSize:16384,windowBits:15,memLevel:8,strategy:i_,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n_,this.strm.avail_out=0;var r=qn.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==rn)throw new Error(fc[r]);if(e.header&&qn.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(typeof e.dictionary=="string"?n=cc.string2buf(e.dictionary):ju.call(e.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(e.dictionary):n=e.dictionary,r=qn.deflateSetDictionary(this.strm,n),r!==rn)throw new Error(fc[r]);this._dict_set=!0}}ir.prototype.push=function(t,e){var r=this.strm,n=this.options.chunkSize,o,s;if(this.ended)return!1;s=e===~~e?e:e===!0?ac:o_,typeof t=="string"?r.input=cc.string2buf(t):ju.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new $n.Buf8(n),r.next_out=0,r.avail_out=n),o=qn.deflate(r,s),o!==Qu&&o!==rn)return this.onEnd(o),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(s===ac||s===Vu))&&(this.options.to==="string"?this.onData(cc.buf2binstring($n.shrinkBuf(r.output,r.next_out))):this.onData($n.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&o!==Qu);return s===ac?(o=qn.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===rn):(s===Vu&&(this.onEnd(rn),r.avail_out=0),!0)};ir.prototype.onData=function(t){this.chunks.push(t)};ir.prototype.onEnd=function(t){t===rn&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=$n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function lc(t,e){var r=new ir(e);if(r.push(t,!0),r.err)throw r.msg||fc[r.err];return r.result}function c_(t,e){return e=e||{},e.raw=!0,lc(t,e)}function f_(t,e){return e=e||{},e.gzip=!0,lc(t,e)}to.Deflate=ir;to.deflate=lc;to.deflateRaw=c_;to.gzip=f_});var Zu=it((AR,Xu)=>{"use strict";var bs=30,l_=12;Xu.exports=function(e,r){var n,o,s,i,a,f,c,l,h,u,d,A,m,p,E,y,T,b,C,w,I,O,B,g,x;n=e.state,o=e.next_in,g=e.input,s=o+(e.avail_in-5),i=e.next_out,x=e.output,a=i-(r-e.avail_out),f=i+(e.avail_out-257),c=n.dmax,l=n.wsize,h=n.whave,u=n.wnext,d=n.window,A=n.hold,m=n.bits,p=n.lencode,E=n.distcode,y=(1<>>24,A>>>=C,m-=C,C=b>>>16&255,C===0)x[i++]=b&65535;else if(C&16){w=b&65535,C&=15,C&&(m>>=C,m-=C),m<15&&(A+=g[o++]<>>24,A>>>=C,m-=C,C=b>>>16&255,C&16){if(I=b&65535,C&=15,mc){e.msg="invalid distance too far back",n.mode=bs;break t}if(A>>>=C,m-=C,C=i-a,I>C){if(C=I-C,C>h&&n.sane){e.msg="invalid distance too far back",n.mode=bs;break t}if(O=0,B=d,u===0){if(O+=l-C,C2;)x[i++]=B[O++],x[i++]=B[O++],x[i++]=B[O++],w-=3;w&&(x[i++]=B[O++],w>1&&(x[i++]=B[O++]))}else{O=i-I;do x[i++]=x[O++],x[i++]=x[O++],x[i++]=x[O++],w-=3;while(w>2);w&&(x[i++]=x[O++],w>1&&(x[i++]=x[O++]))}}else if(C&64){e.msg="invalid distance code",n.mode=bs;break t}else{b=E[(b&65535)+(A&(1<>3,o-=w,m-=w<<3,A&=(1<{"use strict";var Yu=ue(),nn=15,Wu=852,qu=592,$u=0,hc=1,td=2,h_=[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],u_=[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],d_=[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],A_=[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];ed.exports=function(e,r,n,o,s,i,a,f){var c=f.bits,l=0,h=0,u=0,d=0,A=0,m=0,p=0,E=0,y=0,T=0,b,C,w,I,O,B=null,g=0,x,_=new Yu.Buf16(nn+1),U=new Yu.Buf16(nn+1),N=null,P=0,G,tt,pt;for(l=0;l<=nn;l++)_[l]=0;for(h=0;h=1&&_[d]===0;d--);if(A>d&&(A=d),d===0)return s[i++]=1<<24|64<<16|0,s[i++]=1<<24|64<<16|0,f.bits=1,0;for(u=1;u0&&(e===$u||d!==1))return-1;for(U[1]=0,l=1;lWu||e===td&&y>qu)return 1;for(;;){G=l-p,a[h]x?(tt=N[P+a[h]],pt=B[g+a[h]]):(tt=32+64,pt=0),b=1<>p)+C]=G<<24|tt<<16|pt|0;while(C!==0);for(b=1<>=1;if(b!==0?(T&=b-1,T+=b):T=0,h++,--_[l]===0){if(l===d)break;l=r[n+a[h]]}if(l>A&&(T&I)!==w){for(p===0&&(p=A),O+=u,m=l-p,E=1<Wu||e===td&&y>qu)return 1;w=T&I,s[w]=A<<24|m<<16|O-i|0}}return T!==0&&(s[O+T]=l-p<<24|64<<16|0),f.bits=A,0}});var Nd=it(Qt=>{"use strict";var wt=ue(),gc=$a(),ne=tc(),m_=Zu(),eo=rd(),p_=0,Id=1,Sd=2,nd=4,g_=5,Ms=6,ar=0,B_=1,x_=2,Nt=-2,Fd=-3,Bc=-4,E_=-5,od=8,Rd=1,sd=2,id=3,ad=4,cd=5,fd=6,ld=7,hd=8,ud=9,dd=10,Ss=11,me=12,uc=13,Ad=14,dc=15,md=16,pd=17,gd=18,Bd=19,ws=20,Is=21,xd=22,Ed=23,_d=24,yd=25,Cd=26,Ac=27,Td=28,bd=29,$=30,xc=31,__=32,y_=852,C_=592,T_=15,b_=T_;function Md(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function M_(){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 wt.Buf16(320),this.work=new wt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Dd(t){var e;return!t||!t.state?Nt:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=Rd,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new wt.Buf32(y_),e.distcode=e.distdyn=new wt.Buf32(C_),e.sane=1,e.back=-1,ar)}function Od(t){var e;return!t||!t.state?Nt:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,Dd(t))}function Ld(t,e){var r,n;return!t||!t.state||(n=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?Nt:(n.window!==null&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,Od(t))}function Gd(t,e){var r,n;return t?(n=new M_,t.state=n,n.window=null,r=Ld(t,e),r!==ar&&(t.state=null),r):Nt}function w_(t){return Gd(t,b_)}var wd=!0,mc,pc;function I_(t){if(wd){var e;for(mc=new wt.Buf32(512),pc=new wt.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(eo(Id,t.lens,0,288,mc,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;eo(Sd,t.lens,0,32,pc,0,t.work,{bits:5}),wd=!1}t.lencode=mc,t.lenbits=9,t.distcode=pc,t.distbits=5}function vd(t,e,r,n){var o,s=t.state;return s.window===null&&(s.wsize=1<=s.wsize?(wt.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(o=s.wsize-s.wnext,o>n&&(o=n),wt.arraySet(s.window,e,r-n,o,s.wnext),n-=o,n?(wt.arraySet(s.window,e,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=ne(r.check,B,2,0),c=0,l=0,r.mode=sd;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=$;break}if((c&15)!==od){t.msg="unknown compression method",r.mode=$;break}if(c>>>=4,l-=4,I=(c&15)+8,r.wbits===0)r.wbits=I;else if(I>r.wbits){t.msg="invalid window size",r.mode=$;break}r.dmax=1<>8&1),r.flags&512&&(B[0]=c&255,B[1]=c>>>8&255,r.check=ne(r.check,B,2,0)),c=0,l=0,r.mode=id;case id:for(;l<32;){if(a===0)break t;a--,c+=n[s++]<>>8&255,B[2]=c>>>16&255,B[3]=c>>>24&255,r.check=ne(r.check,B,4,0)),c=0,l=0,r.mode=ad;case ad:for(;l<16;){if(a===0)break t;a--,c+=n[s++]<>8),r.flags&512&&(B[0]=c&255,B[1]=c>>>8&255,r.check=ne(r.check,B,2,0)),c=0,l=0,r.mode=cd;case cd:if(r.flags&1024){for(;l<16;){if(a===0)break t;a--,c+=n[s++]<>>8&255,r.check=ne(r.check,B,2,0)),c=0,l=0}else r.head&&(r.head.extra=null);r.mode=fd;case fd:if(r.flags&1024&&(d=r.length,d>a&&(d=a),d&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),wt.arraySet(r.head.extra,n,s,d,I)),r.flags&512&&(r.check=ne(r.check,n,d,s)),a-=d,s+=d,r.length-=d),r.length))break t;r.length=0,r.mode=ld;case ld:if(r.flags&2048){if(a===0)break t;d=0;do I=n[s+d++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I));while(I&&d>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=me;break;case dd:for(;l<32;){if(a===0)break t;a--,c+=n[s++]<>>=l&7,l-=l&7,r.mode=Ac;break}for(;l<3;){if(a===0)break t;a--,c+=n[s++]<>>=1,l-=1,c&3){case 0:r.mode=Ad;break;case 1:if(I_(r),r.mode=ws,e===Ms){c>>>=2,l-=2;break t}break;case 2:r.mode=pd;break;case 3:t.msg="invalid block type",r.mode=$}c>>>=2,l-=2;break;case Ad:for(c>>>=l&7,l-=l&7;l<32;){if(a===0)break t;a--,c+=n[s++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=$;break}if(r.length=c&65535,c=0,l=0,r.mode=dc,e===Ms)break t;case dc:r.mode=md;case md:if(d=r.length,d){if(d>a&&(d=a),d>f&&(d=f),d===0)break t;wt.arraySet(o,n,s,d,i),a-=d,s+=d,f-=d,i+=d,r.length-=d;break}r.mode=me;break;case pd:for(;l<14;){if(a===0)break t;a--,c+=n[s++]<>>=5,l-=5,r.ndist=(c&31)+1,c>>>=5,l-=5,r.ncode=(c&15)+4,c>>>=4,l-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=$;break}r.have=0,r.mode=gd;case gd:for(;r.have>>=3,l-=3}for(;r.have<19;)r.lens[_[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,g={bits:r.lenbits},O=eo(p_,r.lens,0,19,r.lencode,0,r.work,g),r.lenbits=g.bits,O){t.msg="invalid code lengths set",r.mode=$;break}r.have=0,r.mode=Bd;case Bd:for(;r.have>>24,y=p>>>16&255,T=p&65535,!(E<=l);){if(a===0)break t;a--,c+=n[s++]<>>=E,l-=E,r.lens[r.have++]=T;else{if(T===16){for(x=E+2;l>>=E,l-=E,r.have===0){t.msg="invalid bit length repeat",r.mode=$;break}I=r.lens[r.have-1],d=3+(c&3),c>>>=2,l-=2}else if(T===17){for(x=E+3;l>>=E,l-=E,I=0,d=3+(c&7),c>>>=3,l-=3}else{for(x=E+7;l>>=E,l-=E,I=0,d=11+(c&127),c>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=$;break}for(;d--;)r.lens[r.have++]=I}}if(r.mode===$)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=$;break}if(r.lenbits=9,g={bits:r.lenbits},O=eo(Id,r.lens,0,r.nlen,r.lencode,0,r.work,g),r.lenbits=g.bits,O){t.msg="invalid literal/lengths set",r.mode=$;break}if(r.distbits=6,r.distcode=r.distdyn,g={bits:r.distbits},O=eo(Sd,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,g),r.distbits=g.bits,O){t.msg="invalid distances set",r.mode=$;break}if(r.mode=ws,e===Ms)break t;case ws:r.mode=Is;case Is:if(a>=6&&f>=258){t.next_out=i,t.avail_out=f,t.next_in=s,t.avail_in=a,r.hold=c,r.bits=l,m_(t,u),i=t.next_out,o=t.output,f=t.avail_out,s=t.next_in,n=t.input,a=t.avail_in,c=r.hold,l=r.bits,r.mode===me&&(r.back=-1);break}for(r.back=0;p=r.lencode[c&(1<>>24,y=p>>>16&255,T=p&65535,!(E<=l);){if(a===0)break t;a--,c+=n[s++]<>b)],E=p>>>24,y=p>>>16&255,T=p&65535,!(b+E<=l);){if(a===0)break t;a--,c+=n[s++]<>>=b,l-=b,r.back+=b}if(c>>>=E,l-=E,r.back+=E,r.length=T,y===0){r.mode=Cd;break}if(y&32){r.back=-1,r.mode=me;break}if(y&64){t.msg="invalid literal/length code",r.mode=$;break}r.extra=y&15,r.mode=xd;case xd:if(r.extra){for(x=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Ed;case Ed:for(;p=r.distcode[c&(1<>>24,y=p>>>16&255,T=p&65535,!(E<=l);){if(a===0)break t;a--,c+=n[s++]<>b)],E=p>>>24,y=p>>>16&255,T=p&65535,!(b+E<=l);){if(a===0)break t;a--,c+=n[s++]<>>=b,l-=b,r.back+=b}if(c>>>=E,l-=E,r.back+=E,y&64){t.msg="invalid distance code",r.mode=$;break}r.offset=T,r.extra=y&15,r.mode=_d;case _d:if(r.extra){for(x=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=$;break}r.mode=yd;case yd:if(f===0)break t;if(d=u-f,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=$;break}d>r.wnext?(d-=r.wnext,A=r.wsize-d):A=r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=o,A=i-r.offset,d=r.length;d>f&&(d=f),f-=d,r.length-=d;do o[i++]=m[A++];while(--d);r.length===0&&(r.mode=Is);break;case Cd:if(f===0)break t;o[i++]=r.length,f--,r.mode=Is;break;case Ac:if(r.wrap){for(;l<32;){if(a===0)break t;a--,c|=n[s++]<{"use strict";Ud.exports={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_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}});var Hd=it((BR,Pd)=>{"use strict";function O_(){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}Pd.exports=O_});var Jd=it(no=>{"use strict";var on=Nd(),ro=ue(),Fs=sc(),nt=Ec(),_c=gs(),L_=ic(),G_=Hd(),kd=Object.prototype.toString;function cr(t){if(!(this instanceof cr))return new cr(t);this.options=ro.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new L_,this.strm.avail_out=0;var r=on.inflateInit2(this.strm,e.windowBits);if(r!==nt.Z_OK)throw new Error(_c[r]);if(this.header=new G_,on.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Fs.string2buf(e.dictionary):kd.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=on.inflateSetDictionary(this.strm,e.dictionary),r!==nt.Z_OK)))throw new Error(_c[r])}cr.prototype.push=function(t,e){var r=this.strm,n=this.options.chunkSize,o=this.options.dictionary,s,i,a,f,c,l=!1;if(this.ended)return!1;i=e===~~e?e:e===!0?nt.Z_FINISH:nt.Z_NO_FLUSH,typeof t=="string"?r.input=Fs.binstring2buf(t):kd.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new ro.Buf8(n),r.next_out=0,r.avail_out=n),s=on.inflate(r,nt.Z_NO_FLUSH),s===nt.Z_NEED_DICT&&o&&(s=on.inflateSetDictionary(this.strm,o)),s===nt.Z_BUF_ERROR&&l===!0&&(s=nt.Z_OK,l=!1),s!==nt.Z_STREAM_END&&s!==nt.Z_OK)return this.onEnd(s),this.ended=!0,!1;r.next_out&&(r.avail_out===0||s===nt.Z_STREAM_END||r.avail_in===0&&(i===nt.Z_FINISH||i===nt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(a=Fs.utf8border(r.output,r.next_out),f=r.next_out-a,c=Fs.buf2string(r.output,a),r.next_out=f,r.avail_out=n-f,f&&ro.arraySet(r.output,r.output,a,f,0),this.onData(c)):this.onData(ro.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(l=!0)}while((r.avail_in>0||r.avail_out===0)&&s!==nt.Z_STREAM_END);return s===nt.Z_STREAM_END&&(i=nt.Z_FINISH),i===nt.Z_FINISH?(s=on.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===nt.Z_OK):(i===nt.Z_SYNC_FLUSH&&(this.onEnd(nt.Z_OK),r.avail_out=0),!0)};cr.prototype.onData=function(t){this.chunks.push(t)};cr.prototype.onEnd=function(t){t===nt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ro.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function yc(t,e){var r=new cr(e);if(r.push(t,!0),r.err)throw r.msg||_c[r.err];return r.result}function v_(t,e){return e=e||{},e.raw=!0,yc(t,e)}no.Inflate=cr;no.inflate=yc;no.inflateRaw=v_;no.ungzip=yc});var Vd=it((ER,Qd)=>{"use strict";var N_=ue().assign,U_=Ku(),P_=Jd(),H_=Ec(),zd={};N_(zd,U_,P_,H_);Qd.exports=zd});var jd=it(()=>{});var oo={};lt(oo,{CesiumIonLoader:()=>Ua,TILE3D_TYPE:()=>xt,Tile3DBatchTable:()=>le,Tile3DFeatureTable:()=>Ht,Tile3DSubtreeLoader:()=>Jr,Tile3DWriter:()=>t0,Tiles3DArchive:()=>sn,Tiles3DArchiveFileLoader:()=>Xd,Tiles3DLoader:()=>qe,_getIonTilesetMetadata:()=>hs});fo(oo,dr(fn(),1));async function Ut(t,e,r,n){return n._parse(t,e,r,n)}function z(t,e){if(!t)throw new Error(e||"loader assertion failed.")}var jt={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},c0=jt.self||jt.window||jt.global||{},f0=jt.window||jt.self||jt.global||{},l0=jt.global||jt.self||jt.window||{},h0=jt.document||{};var Bt=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var Dc=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),u0=Dc&&parseFloat(Dc[1])||0;var lo=globalThis,d0=globalThis.document||{},ho=globalThis.process||{},A0=globalThis.console,$_=globalThis.navigator||{};function Oc(t){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&Boolean(process.versions?.electron))return!0;let e=typeof navigator<"u"&&navigator.userAgent,r=t||e;return Boolean(r&&r.indexOf("Electron")>=0)}function Ne(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||Oc()}var Os="4.0.7";function p0(t){try{let e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}var uo=class{constructor(e,r,n="sessionStorage"){this.storage=p0(n),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){let r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){let r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}};function Lc(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function Gc(t,e=8){let r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var Ao;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(Ao||(Ao={}));var g0=10;function vc(t){return typeof t!="string"?t:(t=t.toUpperCase(),Ao[t]||Ao.WHITE)}function Nc(t,e,r){return!Ne&&typeof t=="string"&&(e&&(t=`\x1B[${vc(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${vc(r)+g0}m${t}\x1B[49m`)),t}function Uc(t,e=["constructor"]){let r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r),o=t;for(let s of n){let i=o[s];typeof i=="function"&&(e.find(a=>s===a)||(o[s]=i.bind(t)))}}function ln(t,e){if(!t)throw new Error(e||"Assertion failed")}function Ue(){let t;if(Ne()&&lo.performance)t=lo?.performance?.now?.();else if("hrtime"in ho){let e=ho?.hrtime?.();t=e[0]*1e3+e[1]/1e6}else t=Date.now();return t}var Ar={debug:Ne()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},B0={enabled:!0,level:0};function mr(){}var Pc={},Hc={once:!0},hn=class{constructor({id:e}={id:""}){this.VERSION=Os,this._startTs=Ue(),this._deltaTs=Ue(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new uo(`__probe-${this.id}__`,B0),this.timeStamp(`${this.id} started`),Uc(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Ue()-this._startTs).toPrecision(10))}getDelta(){return Number((Ue()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,Ar.warn,arguments,Hc)}error(e){return this._getLogFunction(0,e,Ar.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,Ar.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,Ar.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,Ar.debug||Ar.info,arguments,Hc)}table(e,r,n){return r?this._getLogFunction(e,r,console.table||mr,n&&[n],{tag:E0(r)}):mr}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||mr)}group(e,r,n={collapsed:!1}){let o=kc({logLevel:e,message:r,opts:n}),{collapsed:s}=n;return o.method=(s?console.groupCollapsed:console.group)||console.info,this._getLogFunction(o)}groupCollapsed(e,r,n={}){return this.group(e,r,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||mr)}withGroup(e,r,n){this.group(e,r)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=Jc(e)}_getLogFunction(e,r,n,o,s){if(this._shouldLog(e)){s=kc({logLevel:e,message:r,args:o,opts:s}),n=n||s.method,ln(n),s.total=this.getTotal(),s.delta=this.getDelta(),this._deltaTs=Ue();let i=s.tag||s.message;if(s.once&&i)if(!Pc[i])Pc[i]=Ue();else return mr;return r=x0(this.id,s.message,s),n.bind(console,r,...s.args)}return mr}};hn.VERSION=Os;function Jc(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return ln(Number.isFinite(e)&&e>=0),e}function kc(t){let{logLevel:e,message:r}=t;t.logLevel=Jc(e);let n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break;default:}typeof t.message=="function"&&(t.message=t.message());let o=typeof t.message;return ln(o==="string"||o==="object"),Object.assign(t,{args:n},t.opts)}function x0(t,e,r){if(typeof e=="string"){let n=r.time?Gc(Lc(r.total)):"";e=r.time?`${t}: ${n} ${e}`:`${t}: ${e}`,e=Nc(e,r.color,r.background)}return e}function E0(t){for(let e in t)for(let r in t[e])return r||"untitled";return"empty"}globalThis.probe={};var Ls=new hn({id:"@probe.gl/log"});function un(t){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,t)}function Gs(t){return globalThis.loaders?.modules?.[t]||null}function _0(){return globalThis._loadersgl_?.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.1"),globalThis._loadersgl_.version}var zc=_0();function Qc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}var Kt={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},S2=Kt.self||Kt.window||Kt.global||{},F2=Kt.window||Kt.self||Kt.global||{},R2=Kt.global||Kt.self||Kt.window||{},D2=Kt.document||{};var pr=typeof process!="object"||String(process)!=="[object process]"||process.browser,mo=typeof importScripts=="function",O2=typeof window<"u"&&typeof window.orientation<"u",Vc=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),L2=Vc&&parseFloat(Vc[1])||0;var vs={};async function Xt(t,e=null,r={},n=null){return e&&(t=jc(t,e,r,n)),vs[t]=vs[t]||y0(t),await vs[t]}function jc(t,e,r={},n=null){if(!r.useLocalLibraries&&t.startsWith("http"))return t;n=n||t;let o=r.modules||{};return o[n]?o[n]:pr?r.CDN?(Qc(r.CDN.startsWith("http")),`${r.CDN}/${e}@${zc}/dist/libs/${n}`):mo?`../src/libs/${n}`:`modules/${e}/src/libs/${n}`:`modules/${e}/dist/libs/${n}`}async function y0(t){if(t.endsWith("wasm"))return await T0(t);if(!pr)try{let{requireFromFile:r}=globalThis.loaders||{};return await r?.(t)}catch(r){return console.error(r),null}if(mo)return importScripts(t);let e=await b0(t);return C0(e,t)}function C0(t,e){if(!pr){let{requireFromString:n}=globalThis.loaders||{};return n?.(t,e)}if(mo)return eval.call(globalThis,t),null;let r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch{r.text=t}return document.body.appendChild(r),null}async function T0(t){let{readFileAsArrayBuffer:e}=globalThis.loaders||{};return pr||!e||t.startsWith("http")?await(await fetch(t)).arrayBuffer():await e(t)}async function b0(t){let{readFileAsText:e}=globalThis.loaders||{};return pr||!e||t.startsWith("http")?await(await fetch(t)).text():await e(t)}function Xc(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?Kc(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?Kc(t,0,e):""}function Kc(t,e,r){if(t.byteLength<=e+r)return"";let n=new DataView(t),o="";for(let s=0;ss instanceof ArrayBuffer?new Uint8Array(s):s),r=e.reduce((s,i)=>s+i.byteLength,0),n=new Uint8Array(r),o=0;for(let s of e)n.set(s,o),o+=s.byteLength;return n.buffer}function Pe(t,e,r){let n=r!==void 0?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}function Tt(t,e){return z(t>=0),z(e>0),t+(e-1)&~(e-1)}function Us(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{let o=t.byteOffset,s=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,o,s)}return e.set(n,r),r+Tt(n.byteLength,4)}function Ps(t,e){let r=t.length,o=Math.ceil(r/e)*e-r,s="";for(let i=0;inew Promise((r,n)=>t(e,(o,s)=>o?n(o):r(s)))}var _r={};lt(_r,{dirname:()=>w0,filename:()=>M0,join:()=>I0,resolve:()=>S0});function qc(){if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let t=window.location?.pathname;return t?.slice(0,t.lastIndexOf("/")+1)||""}function M0(t){let e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function w0(t){let e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}function I0(...t){let e="/";return t=t.map((r,n)=>(n&&(r=r.replace(new RegExp(`^${e}`),"")),n!==t.length-1&&(r=r.replace(new RegExp(`${e}$`),"")),r)),t.join(e)}function S0(...t){let e=[];for(let s=0;s=-1&&!n;s--){let i;s>=0?i=e[s]:(o===void 0&&(o=qc()),i=o),i.length!==0&&(r=`${i}/${r}`,n=i.charCodeAt(0)===mn)}return r=F0(r,!n),n?`/${r}`:r.length>0?r:"."}var mn=47,Hs=46;function F0(t,e){let r="",n=-1,o=0,s,i=!1;for(let a=0;a<=t.length;++a){if(a2){let f=r.length-1,c=f;for(;c>=0&&r.charCodeAt(c)!==mn;--c);if(c!==f){r=c===-1?"":r.slice(0,c),n=a,o=0,i=!1;continue}}else if(r.length===2||r.length===1){r="",n=a,o=0,i=!1;continue}}e&&(r.length>0?r+="/..":r="..",i=!0)}else{let f=t.slice(n+1,a);r.length>0?r+=`/${f}`:r=f,i=!1}n=a,o=0}else s===Hs&&o!==-1?++o:o=-1}return r}var pn=new Error("Not implemented"),go=class{handle;size=0;bigsize=0n;url="";constructor(e,r,n){if(globalThis.loaders?.NodeFile)return new globalThis.loaders.NodeFile(e,r,n);throw Bt?new Error("Can't instantiate NodeFile in browser."):new Error("Can't instantiate NodeFile. Make sure to import @loaders.gl/polyfills first.")}async read(e,r){throw pn}async write(e,r,n){throw pn}async stat(){throw pn}async truncate(e){throw pn}async append(e){throw pn}async close(){}};var ks=t=>t?.getUint8&&t?.slice&&t?.length;var gn=class{file;constructor(e,r=!1){this.file=new go(e,r?"a+":"r")}async truncate(e){await this.file.truncate(e)}async append(e){await this.file.append(e)}async destroy(){await this.file.close()}async getUint8(e){let r=await this.file.read(e,1),n=new Uint8Array(r).at(0);if(n===void 0)throw new Error("something went wrong");return n}async getUint16(e){let r=await this.file.read(e,2),n=new Uint16Array(r).at(0);if(n===void 0)throw new Error("something went wrong");return n}async getUint32(e){let r=await this.file.read(e,4),n=new Uint32Array(r).at(0);if(n===void 0)throw new Error("something went wrong");return n}async getBigUint64(e){let r=await this.file.read(e,8),n=new BigInt64Array(r).at(0);if(n===void 0)throw new Error("something went wrong");return n}async slice(e,r){let n=r-e;if(n>Number.MAX_SAFE_INTEGER)throw new Error("too big slice");let o=Number(n);return await this.file.read(e,o)}get length(){return this.file.bigsize}};var yr=t=>{if(t>Number.MAX_SAFE_INTEGER)throw new Error("Offset is out of bounds");return Number(t)},He=class{file;constructor(e){this.file=e}async destroy(){}async getUint8(e){return this.file.getUint8(yr(e))}async getUint16(e){return this.file.getUint16(yr(e),!0)}async getUint32(e){return this.file.getUint32(yr(e),!0)}async getBigUint64(e){return this.file.getBigUint64(yr(e),!0)}async slice(e,r){return this.file.buffer.slice(yr(e),yr(r))}get length(){return BigInt(this.file.byteLength)}};var R0=1/Math.PI*180,D0=1/180*Math.PI,O0={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...O0}};var Z=globalThis.mathgl.config;function Js(t,{precision:e=Z.precision}={}){return t=L0(t),`${parseFloat(t.toPrecision(e))}`}function It(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function zs(t){return $c(t)}function Qs(t){return tf(t)}function $c(t,e){return js(t,r=>r*D0,e)}function tf(t,e){return js(t,r=>r*R0,e)}function Vs(t,e,r){return js(t,n=>Math.max(e,Math.min(r,n)))}function bt(t,e,r){let n=Z.EPSILON;r&&(Z.EPSILON=r);try{if(t===e)return!0;if(It(t)&&It(e)){if(t.length!==e.length)return!1;for(let o=0;o0?", ":"")+Js(this[n],e);return`${e.printTypes?this.constructor.name:""}[${r}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let r=0;r=0&&e=0&&e=0?Math.round(t):t%.5===0?Math.floor(t):Math.round(t)}var Qy=Math.PI/180;function N0(){let t=new q(2);return q!=Float32Array&&(t[0]=0,t[1]=0),t}function ef(t,e,r){let n=e[0],o=e[1];return t[0]=r[0]*n+r[2]*o,t[1]=r[1]*n+r[3]*o,t}function rf(t,e,r){let n=e[0],o=e[1];return t[0]=r[0]*n+r[2]*o+r[4],t[1]=r[1]*n+r[3]*o+r[5],t}function Bo(t,e,r){let n=e[0],o=e[1];return t[0]=r[0]*n+r[3]*o+r[6],t[1]=r[1]*n+r[4]*o+r[7],t}function xo(t,e,r){let n=e[0],o=e[1];return t[0]=r[0]*n+r[4]*o+r[12],t[1]=r[1]*n+r[5]*o+r[13],t}var Vy=function(){let t=N0();return function(e,r,n,o,s,i){let a,f;for(r||(r=2),n||(n=0),o?f=Math.min(o*r+n,e.length):f=e.length,a=n;ak0,angle:()=>Ws,bezier:()=>tA,ceil:()=>J0,clone:()=>U0,copy:()=>P0,create:()=>Co,cross:()=>Je,dist:()=>fA,distance:()=>lf,div:()=>cA,divide:()=>ff,dot:()=>xn,equals:()=>sA,exactEquals:()=>oA,floor:()=>z0,forEach:()=>uA,fromValues:()=>To,hermite:()=>$0,inverse:()=>Y0,len:()=>qs,length:()=>sf,lerp:()=>W0,max:()=>V0,min:()=>Q0,mul:()=>aA,multiply:()=>cf,negate:()=>Z0,normalize:()=>Ks,random:()=>eA,rotateX:()=>Xs,rotateY:()=>Zs,rotateZ:()=>Ys,round:()=>j0,scale:()=>K0,scaleAndAdd:()=>X0,set:()=>H0,slerp:()=>q0,sqrDist:()=>lA,sqrLen:()=>hA,squaredDistance:()=>hf,squaredLength:()=>uf,str:()=>nA,sub:()=>iA,subtract:()=>af,transformMat3:()=>En,transformMat4:()=>ze,transformQuat:()=>_n,zero:()=>rA});function Co(){let t=new q(3);return q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function U0(t){let e=new q(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function sf(t){let e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}function To(t,e,r){let n=new q(3);return n[0]=t,n[1]=e,n[2]=r,n}function P0(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function H0(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function k0(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function af(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function cf(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function ff(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function J0(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function z0(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function Q0(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function V0(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function j0(t,e){return t[0]=Cr(e[0]),t[1]=Cr(e[1]),t[2]=Cr(e[2]),t}function K0(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function X0(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function lf(t,e){let r=e[0]-t[0],n=e[1]-t[1],o=e[2]-t[2];return Math.sqrt(r*r+n*n+o*o)}function hf(t,e){let r=e[0]-t[0],n=e[1]-t[1],o=e[2]-t[2];return r*r+n*n+o*o}function uf(t){let e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function Z0(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function Y0(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function Ks(t,e){let r=e[0],n=e[1],o=e[2],s=r*r+n*n+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t}function xn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Je(t,e,r){let n=e[0],o=e[1],s=e[2],i=r[0],a=r[1],f=r[2];return t[0]=o*f-s*a,t[1]=s*i-n*f,t[2]=n*a-o*i,t}function W0(t,e,r,n){let o=e[0],s=e[1],i=e[2];return t[0]=o+n*(r[0]-o),t[1]=s+n*(r[1]-s),t[2]=i+n*(r[2]-i),t}function q0(t,e,r,n){let o=Math.acos(Math.min(Math.max(xn(e,r),-1),1)),s=Math.sin(o),i=Math.sin((1-n)*o)/s,a=Math.sin(n*o)/s;return t[0]=i*e[0]+a*r[0],t[1]=i*e[1]+a*r[1],t[2]=i*e[2]+a*r[2],t}function $0(t,e,r,n,o,s){let i=s*s,a=i*(2*s-3)+1,f=i*(s-2)+s,c=i*(s-1),l=i*(3-2*s);return t[0]=e[0]*a+r[0]*f+n[0]*c+o[0]*l,t[1]=e[1]*a+r[1]*f+n[1]*c+o[1]*l,t[2]=e[2]*a+r[2]*f+n[2]*c+o[2]*l,t}function tA(t,e,r,n,o,s){let i=1-s,a=i*i,f=s*s,c=a*i,l=3*s*a,h=3*f*i,u=f*s;return t[0]=e[0]*c+r[0]*l+n[0]*h+o[0]*u,t[1]=e[1]*c+r[1]*l+n[1]*h+o[1]*u,t[2]=e[2]*c+r[2]*l+n[2]*h+o[2]*u,t}function eA(t,e){e=e===void 0?1:e;let r=Bn()*2*Math.PI,n=Bn()*2-1,o=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=n*e,t}function ze(t,e,r){let n=e[0],o=e[1],s=e[2],i=r[3]*n+r[7]*o+r[11]*s+r[15];return i=i||1,t[0]=(r[0]*n+r[4]*o+r[8]*s+r[12])/i,t[1]=(r[1]*n+r[5]*o+r[9]*s+r[13])/i,t[2]=(r[2]*n+r[6]*o+r[10]*s+r[14])/i,t}function En(t,e,r){let n=e[0],o=e[1],s=e[2];return t[0]=n*r[0]+o*r[3]+s*r[6],t[1]=n*r[1]+o*r[4]+s*r[7],t[2]=n*r[2]+o*r[5]+s*r[8],t}function _n(t,e,r){let n=r[0],o=r[1],s=r[2],i=r[3],a=e[0],f=e[1],c=e[2],l=o*c-s*f,h=s*a-n*c,u=n*f-o*a,d=o*u-s*h,A=s*l-n*u,m=n*h-o*l,p=i*2;return l*=p,h*=p,u*=p,d*=2,A*=2,m*=2,t[0]=a+l+d,t[1]=f+h+A,t[2]=c+u+m,t}function Xs(t,e,r,n){let o=[],s=[];return o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],s[0]=o[0],s[1]=o[1]*Math.cos(n)-o[2]*Math.sin(n),s[2]=o[1]*Math.sin(n)+o[2]*Math.cos(n),t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t}function Zs(t,e,r,n){let o=[],s=[];return o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],s[0]=o[2]*Math.sin(n)+o[0]*Math.cos(n),s[1]=o[1],s[2]=o[2]*Math.cos(n)-o[0]*Math.sin(n),t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t}function Ys(t,e,r,n){let o=[],s=[];return o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],s[0]=o[0]*Math.cos(n)-o[1]*Math.sin(n),s[1]=o[0]*Math.sin(n)+o[1]*Math.cos(n),s[2]=o[2],t[0]=s[0]+r[0],t[1]=s[1]+r[1],t[2]=s[2]+r[2],t}function Ws(t,e){let r=t[0],n=t[1],o=t[2],s=e[0],i=e[1],a=e[2],f=Math.sqrt((r*r+n*n+o*o)*(s*s+i*i+a*a)),c=f&&xn(t,e)/f;return Math.acos(Math.min(Math.max(c,-1),1))}function rA(t){return t[0]=0,t[1]=0,t[2]=0,t}function nA(t){return`vec3(${t[0]}, ${t[1]}, ${t[2]})`}function oA(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function sA(t,e){let r=t[0],n=t[1],o=t[2],s=e[0],i=e[1],a=e[2];return Math.abs(r-s)<=1e-6*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-i)<=1e-6*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(o-a)<=1e-6*Math.max(1,Math.abs(o),Math.abs(a))}var iA=af,aA=cf,cA=ff,fA=lf,lA=hf,qs=sf,hA=uf,uA=function(){let t=Co();return function(e,r,n,o,s,i){let a,f;for(r||(r=3),n||(n=0),o?f=Math.min(o*r+n,e.length):f=e.length,a=n;a0?this.copy([e,...r]):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}identity(){return this.copy(AA)}fromObject(e){return this.check()}fromQuaternion(e){return xf(this,e),this.check()}set(e,r,n,o,s,i,a,f,c){return this[0]=e,this[1]=r,this[2]=n,this[3]=o,this[4]=s,this[5]=i,this[6]=a,this[7]=f,this[8]=c,this.check()}setRowMajor(e,r,n,o,s,i,a,f,c){return this[0]=e,this[1]=o,this[2]=a,this[3]=r,this[4]=s,this[5]=f,this[6]=n,this[7]=i,this[8]=c,this.check()}determinant(){return pf(this)}transpose(){return Af(this,this),this.check()}invert(){return mf(this,this),this.check()}multiplyLeft(e){return ti(this,e,this),this.check()}multiplyRight(e){return ti(this,this,e),this.check()}rotate(e){return Bf(this,this,e),this.check()}scale(e){return Array.isArray(e)?ei(this,this,e):ei(this,this,[e,e]),this.check()}translate(e){return gf(this,this,e),this.check()}transform(e,r){let n;switch(e.length){case 2:n=Bo(r||[-0,-0],e,this);break;case 3:n=En(r||[-0,-0,-0],e,this);break;case 4:n=yo(r||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return xe(n,e.length),n}transformVector(e,r){return this.transform(e,r)}transformVector2(e,r){return this.transform(e,r)}transformVector3(e,r){return this.transform(e,r)}},wo,Io=null;function mA(){return wo||(wo=new X([0,0,0,0,0,0,0,0,0]),Object.freeze(wo)),wo}function pA(){return Io||(Io=new X,Object.freeze(Io)),Io}var Cn={};lt(Cn,{add:()=>kA,adjoint:()=>yA,clone:()=>BA,copy:()=>xA,create:()=>gA,decompose:()=>DA,determinant:()=>si,equals:()=>VA,exactEquals:()=>QA,frob:()=>HA,fromQuat:()=>ui,fromQuat2:()=>SA,fromRotation:()=>bA,fromRotationTranslation:()=>_f,fromRotationTranslationScale:()=>OA,fromRotationTranslationScaleOrigin:()=>LA,fromScaling:()=>TA,fromTranslation:()=>CA,fromValues:()=>EA,fromXRotation:()=>MA,fromYRotation:()=>wA,fromZRotation:()=>IA,frustum:()=>di,getRotation:()=>RA,getScaling:()=>yf,getTranslation:()=>FA,identity:()=>Ef,invert:()=>oi,lookAt:()=>pi,mul:()=>jA,multiply:()=>yn,multiplyScalar:()=>JA,multiplyScalarAndAdd:()=>zA,ortho:()=>mi,orthoNO:()=>Tf,orthoZO:()=>NA,perspective:()=>Ai,perspectiveFromFieldOfView:()=>vA,perspectiveNO:()=>Cf,perspectiveZO:()=>GA,rotate:()=>ci,rotateX:()=>fi,rotateY:()=>li,rotateZ:()=>hi,scale:()=>ai,set:()=>_A,str:()=>PA,sub:()=>KA,subtract:()=>bf,targetTo:()=>UA,translate:()=>ii,transpose:()=>ni});function gA(){let t=new q(16);return q!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function BA(t){let e=new q(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function xA(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function EA(t,e,r,n,o,s,i,a,f,c,l,h,u,d,A,m){let p=new q(16);return p[0]=t,p[1]=e,p[2]=r,p[3]=n,p[4]=o,p[5]=s,p[6]=i,p[7]=a,p[8]=f,p[9]=c,p[10]=l,p[11]=h,p[12]=u,p[13]=d,p[14]=A,p[15]=m,p}function _A(t,e,r,n,o,s,i,a,f,c,l,h,u,d,A,m,p){return t[0]=e,t[1]=r,t[2]=n,t[3]=o,t[4]=s,t[5]=i,t[6]=a,t[7]=f,t[8]=c,t[9]=l,t[10]=h,t[11]=u,t[12]=d,t[13]=A,t[14]=m,t[15]=p,t}function Ef(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ni(t,e){if(t===e){let r=e[1],n=e[2],o=e[3],s=e[6],i=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=s,t[11]=e[14],t[12]=o,t[13]=i,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function oi(t,e){let r=e[0],n=e[1],o=e[2],s=e[3],i=e[4],a=e[5],f=e[6],c=e[7],l=e[8],h=e[9],u=e[10],d=e[11],A=e[12],m=e[13],p=e[14],E=e[15],y=r*a-n*i,T=r*f-o*i,b=r*c-s*i,C=n*f-o*a,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t[10],u=t[11],d=t[12],A=t[13],m=t[14],p=t[15],E=e*i-r*s,y=e*a-n*s,T=r*a-n*i,b=c*A-l*d,C=c*m-h*d,w=l*m-h*A,I=e*w-r*C+n*b,O=s*w-i*C+a*b,B=c*T-l*y+h*E,g=d*T-A*y+m*E;return f*I-o*O+p*B-u*g}function yn(t,e,r){let n=e[0],o=e[1],s=e[2],i=e[3],a=e[4],f=e[5],c=e[6],l=e[7],h=e[8],u=e[9],d=e[10],A=e[11],m=e[12],p=e[13],E=e[14],y=e[15],T=r[0],b=r[1],C=r[2],w=r[3];return t[0]=T*n+b*a+C*h+w*m,t[1]=T*o+b*f+C*u+w*p,t[2]=T*s+b*c+C*d+w*E,t[3]=T*i+b*l+C*A+w*y,T=r[4],b=r[5],C=r[6],w=r[7],t[4]=T*n+b*a+C*h+w*m,t[5]=T*o+b*f+C*u+w*p,t[6]=T*s+b*c+C*d+w*E,t[7]=T*i+b*l+C*A+w*y,T=r[8],b=r[9],C=r[10],w=r[11],t[8]=T*n+b*a+C*h+w*m,t[9]=T*o+b*f+C*u+w*p,t[10]=T*s+b*c+C*d+w*E,t[11]=T*i+b*l+C*A+w*y,T=r[12],b=r[13],C=r[14],w=r[15],t[12]=T*n+b*a+C*h+w*m,t[13]=T*o+b*f+C*u+w*p,t[14]=T*s+b*c+C*d+w*E,t[15]=T*i+b*l+C*A+w*y,t}function ii(t,e,r){let n=r[0],o=r[1],s=r[2],i,a,f,c,l,h,u,d,A,m,p,E;return e===t?(t[12]=e[0]*n+e[4]*o+e[8]*s+e[12],t[13]=e[1]*n+e[5]*o+e[9]*s+e[13],t[14]=e[2]*n+e[6]*o+e[10]*s+e[14],t[15]=e[3]*n+e[7]*o+e[11]*s+e[15]):(i=e[0],a=e[1],f=e[2],c=e[3],l=e[4],h=e[5],u=e[6],d=e[7],A=e[8],m=e[9],p=e[10],E=e[11],t[0]=i,t[1]=a,t[2]=f,t[3]=c,t[4]=l,t[5]=h,t[6]=u,t[7]=d,t[8]=A,t[9]=m,t[10]=p,t[11]=E,t[12]=i*n+l*o+A*s+e[12],t[13]=a*n+h*o+m*s+e[13],t[14]=f*n+u*o+p*s+e[14],t[15]=c*n+d*o+E*s+e[15]),t}function ai(t,e,r){let n=r[0],o=r[1],s=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ci(t,e,r,n){let o=n[0],s=n[1],i=n[2],a=Math.sqrt(o*o+s*s+i*i),f,c,l,h,u,d,A,m,p,E,y,T,b,C,w,I,O,B,g,x,_,U,N,P;return a<1e-6?null:(a=1/a,o*=a,s*=a,i*=a,c=Math.sin(r),f=Math.cos(r),l=1-f,h=e[0],u=e[1],d=e[2],A=e[3],m=e[4],p=e[5],E=e[6],y=e[7],T=e[8],b=e[9],C=e[10],w=e[11],I=o*o*l+f,O=s*o*l+i*c,B=i*o*l-s*c,g=o*s*l-i*c,x=s*s*l+f,_=i*s*l+o*c,U=o*i*l+s*c,N=s*i*l-o*c,P=i*i*l+f,t[0]=h*I+m*O+T*B,t[1]=u*I+p*O+b*B,t[2]=d*I+E*O+C*B,t[3]=A*I+y*O+w*B,t[4]=h*g+m*x+T*_,t[5]=u*g+p*x+b*_,t[6]=d*g+E*x+C*_,t[7]=A*g+y*x+w*_,t[8]=h*U+m*N+T*P,t[9]=u*U+p*N+b*P,t[10]=d*U+E*N+C*P,t[11]=A*U+y*N+w*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function fi(t,e,r){let n=Math.sin(r),o=Math.cos(r),s=e[4],i=e[5],a=e[6],f=e[7],c=e[8],l=e[9],h=e[10],u=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=s*o+c*n,t[5]=i*o+l*n,t[6]=a*o+h*n,t[7]=f*o+u*n,t[8]=c*o-s*n,t[9]=l*o-i*n,t[10]=h*o-a*n,t[11]=u*o-f*n,t}function li(t,e,r){let n=Math.sin(r),o=Math.cos(r),s=e[0],i=e[1],a=e[2],f=e[3],c=e[8],l=e[9],h=e[10],u=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*o-c*n,t[1]=i*o-l*n,t[2]=a*o-h*n,t[3]=f*o-u*n,t[8]=s*n+c*o,t[9]=i*n+l*o,t[10]=a*n+h*o,t[11]=f*n+u*o,t}function hi(t,e,r){let n=Math.sin(r),o=Math.cos(r),s=e[0],i=e[1],a=e[2],f=e[3],c=e[4],l=e[5],h=e[6],u=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*o+c*n,t[1]=i*o+l*n,t[2]=a*o+h*n,t[3]=f*o+u*n,t[4]=c*o-s*n,t[5]=l*o-i*n,t[6]=h*o-a*n,t[7]=u*o-f*n,t}function CA(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function TA(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function bA(t,e,r){let n=r[0],o=r[1],s=r[2],i=Math.sqrt(n*n+o*o+s*s),a,f,c;return i<1e-6?null:(i=1/i,n*=i,o*=i,s*=i,f=Math.sin(e),a=Math.cos(e),c=1-a,t[0]=n*n*c+a,t[1]=o*n*c+s*f,t[2]=s*n*c-o*f,t[3]=0,t[4]=n*o*c-s*f,t[5]=o*o*c+a,t[6]=s*o*c+n*f,t[7]=0,t[8]=n*s*c+o*f,t[9]=o*s*c-n*f,t[10]=s*s*c+a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function MA(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function wA(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function IA(t,e){let r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _f(t,e,r){let n=e[0],o=e[1],s=e[2],i=e[3],a=n+n,f=o+o,c=s+s,l=n*a,h=n*f,u=n*c,d=o*f,A=o*c,m=s*c,p=i*a,E=i*f,y=i*c;return t[0]=1-(d+m),t[1]=h+y,t[2]=u-E,t[3]=0,t[4]=h-y,t[5]=1-(l+m),t[6]=A+p,t[7]=0,t[8]=u+E,t[9]=A-p,t[10]=1-(l+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function SA(t,e){let r=new q(3),n=-e[0],o=-e[1],s=-e[2],i=e[3],a=e[4],f=e[5],c=e[6],l=e[7],h=n*n+o*o+s*s+i*i;return h>0?(r[0]=(a*i+l*n+f*s-c*o)*2/h,r[1]=(f*i+l*o+c*n-a*s)*2/h,r[2]=(c*i+l*s+a*o-f*n)*2/h):(r[0]=(a*i+l*n+f*s-c*o)*2,r[1]=(f*i+l*o+c*n-a*s)*2,r[2]=(c*i+l*s+a*o-f*n)*2),_f(t,e,r),t}function FA(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function yf(t,e){let r=e[0],n=e[1],o=e[2],s=e[4],i=e[5],a=e[6],f=e[8],c=e[9],l=e[10];return t[0]=Math.sqrt(r*r+n*n+o*o),t[1]=Math.sqrt(s*s+i*i+a*a),t[2]=Math.sqrt(f*f+c*c+l*l),t}function RA(t,e){let r=new q(3);yf(r,e);let n=1/r[0],o=1/r[1],s=1/r[2],i=e[0]*n,a=e[1]*o,f=e[2]*s,c=e[4]*n,l=e[5]*o,h=e[6]*s,u=e[8]*n,d=e[9]*o,A=e[10]*s,m=i+l+A,p=0;return m>0?(p=Math.sqrt(m+1)*2,t[3]=.25*p,t[0]=(h-d)/p,t[1]=(u-f)/p,t[2]=(a-c)/p):i>l&&i>A?(p=Math.sqrt(1+i-l-A)*2,t[3]=(h-d)/p,t[0]=.25*p,t[1]=(a+c)/p,t[2]=(u+f)/p):l>A?(p=Math.sqrt(1+l-i-A)*2,t[3]=(u-f)/p,t[0]=(a+c)/p,t[1]=.25*p,t[2]=(h+d)/p):(p=Math.sqrt(1+A-i-l)*2,t[3]=(a-c)/p,t[0]=(u+f)/p,t[1]=(h+d)/p,t[2]=.25*p),t}function DA(t,e,r,n){e[0]=n[12],e[1]=n[13],e[2]=n[14];let o=n[0],s=n[1],i=n[2],a=n[4],f=n[5],c=n[6],l=n[8],h=n[9],u=n[10];r[0]=Math.sqrt(o*o+s*s+i*i),r[1]=Math.sqrt(a*a+f*f+c*c),r[2]=Math.sqrt(l*l+h*h+u*u);let d=1/r[0],A=1/r[1],m=1/r[2],p=o*d,E=s*A,y=i*m,T=a*d,b=f*A,C=c*m,w=l*d,I=h*A,O=u*m,B=p+b+O,g=0;return B>0?(g=Math.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function ui(t,e){let r=e[0],n=e[1],o=e[2],s=e[3],i=r+r,a=n+n,f=o+o,c=r*i,l=n*i,h=n*a,u=o*i,d=o*a,A=o*f,m=s*i,p=s*a,E=s*f;return t[0]=1-h-A,t[1]=l+E,t[2]=u-p,t[3]=0,t[4]=l-E,t[5]=1-c-A,t[6]=d+m,t[7]=0,t[8]=u+p,t[9]=d-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function di(t,e,r,n,o,s,i){let a=1/(r-e),f=1/(o-n),c=1/(s-i);return t[0]=s*2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s*2*f,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(o+n)*f,t[10]=(i+s)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s*2*c,t[15]=0,t}function Cf(t,e,r,n,o){let s=1/Math.tan(e/2);if(t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,o!=null&&o!==1/0){let i=1/(n-o);t[10]=(o+n)*i,t[14]=2*o*n*i}else t[10]=-1,t[14]=-2*n;return t}var Ai=Cf;function GA(t,e,r,n,o){let s=1/Math.tan(e/2);if(t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,o!=null&&o!==1/0){let i=1/(n-o);t[10]=o*i,t[14]=o*n*i}else t[10]=-1,t[14]=-n;return t}function vA(t,e,r,n){let o=Math.tan(e.upDegrees*Math.PI/180),s=Math.tan(e.downDegrees*Math.PI/180),i=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),f=2/(i+a),c=2/(o+s);return t[0]=f,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-((i-a)*f*.5),t[9]=(o-s)*c*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}function Tf(t,e,r,n,o,s,i){let a=1/(e-r),f=1/(n-o),c=1/(s-i);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*f,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*a,t[13]=(o+n)*f,t[14]=(i+s)*c,t[15]=1,t}var mi=Tf;function NA(t,e,r,n,o,s,i){let a=1/(e-r),f=1/(n-o),c=1/(s-i);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*f,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+r)*a,t[13]=(o+n)*f,t[14]=s*c,t[15]=1,t}function pi(t,e,r,n){let o,s,i,a,f,c,l,h,u,d,A=e[0],m=e[1],p=e[2],E=n[0],y=n[1],T=n[2],b=r[0],C=r[1],w=r[2];return Math.abs(A-b)<1e-6&&Math.abs(m-C)<1e-6&&Math.abs(p-w)<1e-6?Ef(t):(h=A-b,u=m-C,d=p-w,o=1/Math.sqrt(h*h+u*u+d*d),h*=o,u*=o,d*=o,s=y*d-T*u,i=T*h-E*d,a=E*u-y*h,o=Math.sqrt(s*s+i*i+a*a),o?(o=1/o,s*=o,i*=o,a*=o):(s=0,i=0,a=0),f=u*a-d*i,c=d*s-h*a,l=h*i-u*s,o=Math.sqrt(f*f+c*c+l*l),o?(o=1/o,f*=o,c*=o,l*=o):(f=0,c=0,l=0),t[0]=s,t[1]=f,t[2]=h,t[3]=0,t[4]=i,t[5]=c,t[6]=u,t[7]=0,t[8]=a,t[9]=l,t[10]=d,t[11]=0,t[12]=-(s*A+i*m+a*p),t[13]=-(f*A+c*m+l*p),t[14]=-(h*A+u*m+d*p),t[15]=1,t)}function UA(t,e,r,n){let o=e[0],s=e[1],i=e[2],a=n[0],f=n[1],c=n[2],l=o-r[0],h=s-r[1],u=i-r[2],d=l*l+h*h+u*u;d>0&&(d=1/Math.sqrt(d),l*=d,h*=d,u*=d);let A=f*u-c*h,m=c*l-a*u,p=a*h-f*l;return d=A*A+m*m+p*p,d>0&&(d=1/Math.sqrt(d),A*=d,m*=d,p*=d),t[0]=A,t[1]=m,t[2]=p,t[3]=0,t[4]=h*p-u*m,t[5]=u*A-l*p,t[6]=l*m-h*A,t[7]=0,t[8]=l,t[9]=h,t[10]=u,t[11]=0,t[12]=o,t[13]=s,t[14]=i,t[15]=1,t}function PA(t){return`mat4(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}, ${t[4]}, ${t[5]}, ${t[6]}, ${t[7]}, ${t[8]}, ${t[9]}, ${t[10]}, ${t[11]}, ${t[12]}, ${t[13]}, ${t[14]}, ${t[15]})`}function HA(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8]+t[9]*t[9]+t[10]*t[10]+t[11]*t[11]+t[12]*t[12]+t[13]*t[13]+t[14]*t[14]+t[15]*t[15])}function kA(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t}function bf(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}function JA(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t}function zA(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t}function QA(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function VA(t,e){let r=t[0],n=t[1],o=t[2],s=t[3],i=t[4],a=t[5],f=t[6],c=t[7],l=t[8],h=t[9],u=t[10],d=t[11],A=t[12],m=t[13],p=t[14],E=t[15],y=e[0],T=e[1],b=e[2],C=e[3],w=e[4],I=e[5],O=e[6],B=e[7],g=e[8],x=e[9],_=e[10],U=e[11],N=e[12],P=e[13],G=e[14],tt=e[15];return Math.abs(r-y)<=1e-6*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(n-T)<=1e-6*Math.max(1,Math.abs(n),Math.abs(T))&&Math.abs(o-b)<=1e-6*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(s-C)<=1e-6*Math.max(1,Math.abs(s),Math.abs(C))&&Math.abs(i-w)<=1e-6*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(a-I)<=1e-6*Math.max(1,Math.abs(a),Math.abs(I))&&Math.abs(f-O)<=1e-6*Math.max(1,Math.abs(f),Math.abs(O))&&Math.abs(c-B)<=1e-6*Math.max(1,Math.abs(c),Math.abs(B))&&Math.abs(l-g)<=1e-6*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(h-x)<=1e-6*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(u-_)<=1e-6*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(d-U)<=1e-6*Math.max(1,Math.abs(d),Math.abs(U))&&Math.abs(A-N)<=1e-6*Math.max(1,Math.abs(A),Math.abs(N))&&Math.abs(m-P)<=1e-6*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(p-G)<=1e-6*Math.max(1,Math.abs(p),Math.abs(G))&&Math.abs(E-tt)<=1e-6*Math.max(1,Math.abs(E),Math.abs(tt))}var jA=yn,KA=bf;function XA(){let t=new q(4);return q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Mf(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}function wf(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}function If(t){let e=t[0],r=t[1],n=t[2],o=t[3];return Math.sqrt(e*e+r*r+n*n+o*o)}function Sf(t){let e=t[0],r=t[1],n=t[2],o=t[3];return e*e+r*r+n*n+o*o}function Ff(t,e){let r=e[0],n=e[1],o=e[2],s=e[3],i=r*r+n*n+o*o+s*s;return i>0&&(i=1/Math.sqrt(i)),t[0]=r*i,t[1]=n*i,t[2]=o*i,t[3]=s*i,t}function Rf(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Df(t,e,r,n){let o=e[0],s=e[1],i=e[2],a=e[3];return t[0]=o+n*(r[0]-o),t[1]=s+n*(r[1]-s),t[2]=i+n*(r[2]-i),t[3]=a+n*(r[3]-a),t}function Of(t,e,r){let n=e[0],o=e[1],s=e[2],i=e[3];return t[0]=r[0]*n+r[4]*o+r[8]*s+r[12]*i,t[1]=r[1]*n+r[5]*o+r[9]*s+r[13]*i,t[2]=r[2]*n+r[6]*o+r[10]*s+r[14]*i,t[3]=r[3]*n+r[7]*o+r[11]*s+r[15]*i,t}function Lf(t,e,r){let n=e[0],o=e[1],s=e[2],i=r[0],a=r[1],f=r[2],c=r[3],l=c*n+a*s-f*o,h=c*o+f*n-i*s,u=c*s+i*o-a*n,d=-i*n-a*o-f*s;return t[0]=l*c+d*-i+h*-f-u*-a,t[1]=h*c+d*-a+u*-i-l*-f,t[2]=u*c+d*-f+l*-a-h*-i,t[3]=e[3],t}var CC=function(){let t=XA();return function(e,r,n,o,s,i){let a,f;for(r||(r=4),n||(n=0),o?f=Math.min(o*r+n,e.length):f=e.length,a=n;aMath.PI*2)throw Error("expected radians")}function em(t,e,r,n,o,s){let i=2*s/(r-e),a=2*s/(o-n),f=(r+e)/(r-e),c=(o+n)/(o-n),l=-1,h=-1,u=-2*s;return t[0]=i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=f,t[9]=c,t[10]=l,t[11]=h,t[12]=0,t[13]=0,t[14]=u,t[15]=0,t}function vf(){let t=new q(4);return q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Nf(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Ei(t,e,r){r=r*.5;let n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function _i(t,e,r){let n=e[0],o=e[1],s=e[2],i=e[3],a=r[0],f=r[1],c=r[2],l=r[3];return t[0]=n*l+i*a+o*c-s*f,t[1]=o*l+i*f+s*a-n*c,t[2]=s*l+i*c+n*f-o*a,t[3]=i*l-n*a-o*f-s*c,t}function Uf(t,e,r){r*=.5;let n=e[0],o=e[1],s=e[2],i=e[3],a=Math.sin(r),f=Math.cos(r);return t[0]=n*f+i*a,t[1]=o*f+s*a,t[2]=s*f-o*a,t[3]=i*f-n*a,t}function Pf(t,e,r){r*=.5;let n=e[0],o=e[1],s=e[2],i=e[3],a=Math.sin(r),f=Math.cos(r);return t[0]=n*f-s*a,t[1]=o*f+i*a,t[2]=s*f+n*a,t[3]=i*f-o*a,t}function Hf(t,e,r){r*=.5;let n=e[0],o=e[1],s=e[2],i=e[3],a=Math.sin(r),f=Math.cos(r);return t[0]=n*f+o*a,t[1]=o*f-n*a,t[2]=s*f+i*a,t[3]=i*f-s*a,t}function kf(t,e){let r=e[0],n=e[1],o=e[2];return t[0]=r,t[1]=n,t[2]=o,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-o*o)),t}function Tn(t,e,r,n){let o=e[0],s=e[1],i=e[2],a=e[3],f=r[0],c=r[1],l=r[2],h=r[3],u,d,A,m,p;return u=o*f+s*c+i*l+a*h,u<0&&(u=-u,f=-f,c=-c,l=-l,h=-h),1-u>1e-6?(d=Math.acos(u),p=Math.sin(d),A=Math.sin((1-n)*d)/p,m=Math.sin(n*d)/p):(A=1-n,m=n),t[0]=A*o+m*f,t[1]=A*s+m*c,t[2]=A*i+m*l,t[3]=A*a+m*h,t}function Jf(t,e){let r=e[0],n=e[1],o=e[2],s=e[3],i=r*r+n*n+o*o+s*s,a=i?1/i:0;return t[0]=-r*a,t[1]=-n*a,t[2]=-o*a,t[3]=s*a,t}function zf(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function yi(t,e){let r=e[0]+e[4]+e[8],n;if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{let o=0;e[4]>e[0]&&(o=1),e[8]>e[o*3+o]&&(o=2);let s=(o+1)%3,i=(o+2)%3;n=Math.sqrt(e[o*3+o]-e[s*3+s]-e[i*3+i]+1),t[o]=.5*n,n=.5/n,t[3]=(e[s*3+i]-e[i*3+s])*n,t[s]=(e[s*3+o]+e[o*3+s])*n,t[i]=(e[i*3+o]+e[o*3+i])*n}return t}var Qf=Mf;var Vf=wf,jf=Rf,Kf=Df,Xf=If;var Zf=Sf;var Yf=Ff;var Wf=function(){let t=Co(),e=To(1,0,0),r=To(0,1,0);return function(n,o,s){let i=xn(o,s);return i<-.999999?(Je(t,e,o),qs(t)<1e-6&&Je(t,r,o),Ks(t,t),Ei(n,t,Math.PI),n):i>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(Je(t,o,s),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=1+i,Yf(n,n))}}(),NC=function(){let t=vf(),e=vf();return function(r,n,o,s,i,a){return Tn(t,n,i,a),Tn(e,o,s,a),Tn(r,t,e,2*a*(1-a)),r}}(),UC=function(){let t=df();return function(e,r,n,o){return t[0]=n[0],t[3]=n[1],t[6]=n[2],t[1]=o[0],t[4]=o[1],t[7]=o[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],Yf(e,yi(e,t))}}();var rm=[0,0,0,1],_e=class extends Be{constructor(e=0,r=0,n=0,o=1){super(-0,-0,-0,-0),Array.isArray(e)&&arguments.length===1?this.copy(e):this.set(e,r,n,o)}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}set(e,r,n,o){return this[0]=e,this[1]=r,this[2]=n,this[3]=o,this.check()}fromObject(e){return this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this.check()}fromMatrix3(e){return yi(this,e),this.check()}fromAxisRotation(e,r){return Ei(this,e,r),this.check()}identity(){return Nf(this),this.check()}setAxisAngle(e,r){return this.fromAxisRotation(e,r)}get ELEMENTS(){return 4}get x(){return this[0]}set x(e){this[0]=k(e)}get y(){return this[1]}set y(e){this[1]=k(e)}get z(){return this[2]}set z(e){this[2]=k(e)}get w(){return this[3]}set w(e){this[3]=k(e)}len(){return Xf(this)}lengthSquared(){return Zf(this)}dot(e){return jf(this,e)}rotationTo(e,r){return Wf(this,e,r),this.check()}add(e){return Qf(this,this,e),this.check()}calculateW(){return kf(this,this),this.check()}conjugate(){return zf(this,this),this.check()}invert(){return Jf(this,this),this.check()}lerp(e,r,n){return n===void 0?this.lerp(this,e,r):(Kf(this,e,r,n),this.check())}multiplyRight(e){return _i(this,this,e),this.check()}multiplyLeft(e){return _i(this,e,this),this.check()}normalize(){let e=this.len(),r=e>0?1/e:0;return this[0]=this[0]*r,this[1]=this[1]*r,this[2]=this[2]*r,this[3]=this[3]*r,e===0&&(this[3]=1),this.check()}rotateX(e){return Uf(this,this,e),this.check()}rotateY(e){return Pf(this,this,e),this.check()}rotateZ(e){return Hf(this,this,e),this.check()}scale(e){return Vf(this,this,e),this.check()}slerp(e,r,n){let o,s,i;switch(arguments.length){case 1:({start:o=rm,target:s,ratio:i}=e);break;case 2:o=this,s=e,i=r;break;default:o=e,s=r,i=n}return Tn(this,o,s,i),this.check()}transformVector4(e,r=new br){return Lf(r,e,this),xe(r,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(e,r){return this.setAxisAngle(e,r)}premultiply(e){return this.multiplyLeft(e)}multiply(e){return this.multiplyRight(e)}};var Ft={};lt(Ft,{EPSILON1:()=>nm,EPSILON10:()=>um,EPSILON11:()=>dm,EPSILON12:()=>Am,EPSILON13:()=>mm,EPSILON14:()=>pm,EPSILON15:()=>gm,EPSILON16:()=>Bm,EPSILON17:()=>xm,EPSILON18:()=>Em,EPSILON19:()=>_m,EPSILON2:()=>om,EPSILON20:()=>ym,EPSILON3:()=>sm,EPSILON4:()=>im,EPSILON5:()=>am,EPSILON6:()=>cm,EPSILON7:()=>fm,EPSILON8:()=>lm,EPSILON9:()=>hm,PI_OVER_FOUR:()=>Tm,PI_OVER_SIX:()=>bm,PI_OVER_TWO:()=>Cm,TWO_PI:()=>Mm});var nm=.1,om=.01,sm=.001,im=1e-4,am=1e-5,cm=1e-6,fm=1e-7,lm=1e-8,hm=1e-9,um=1e-10,dm=1e-11,Am=1e-12,mm=1e-13,pm=1e-14,gm=1e-15,Bm=1e-16,xm=1e-17,Em=1e-18,_m=1e-19,ym=1e-20,Cm=Math.PI/2,Tm=Math.PI/4,bm=Math.PI/6,Mm=Math.PI*2;var se=6356752314245179e-9,wm={radii:[6378137,6378137,se],radiiSquared:[6378137*6378137,6378137*6378137,se*se],oneOverRadii:[1/6378137,1/6378137,1/se],oneOverRadiiSquared:[1/(6378137*6378137),1/(6378137*6378137),1/(se*se)],maximumRadius:Math.max(6378137,6378137,se),centerToleranceSquared:.1};function Ro(t){return t}var AT=new M;function Im(t,e=[],r=Ro){return"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):"x"in t?(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z):(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]),e}function qf(t,e=[]){return Im(t,e,Z._cartographicRadians?Ro:zs)}function Sm(t,e,r=Ro){return"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):"x"in e?(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]):(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]),e}function $f(t,e){return Sm(t,e,Z._cartographicRadians?Ro:Qs)}var tl=1e-14,Fm=new M,el={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Ci={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},bn={east:new M,north:new M,up:new M,west:new M,south:new M,down:new M},Rm=new M,Dm=new M,Om=new M;function Ti(t,e,r,n,o,s){let i=el[e]&&el[e][r];at(i&&(!n||n===i));let a,f,c,l=Fm.copy(o);if(bt(l.x,0,tl)&&bt(l.y,0,tl)){let u=Math.sign(l.z);a=Rm.fromArray(Ci[e]),e!=="east"&&e!=="west"&&a.scale(u),f=Dm.fromArray(Ci[r]),r!=="east"&&r!=="west"&&f.scale(u),c=Om.fromArray(Ci[n]),n!=="east"&&n!=="west"&&c.scale(u)}else{let{up:u,east:d,north:A}=bn;d.set(-l.y,l.x,0).normalize(),t.geodeticSurfaceNormal(l,u),A.copy(u).cross(d);let{down:m,west:p,south:E}=bn;m.copy(u).scale(-1),p.copy(d).scale(-1),E.copy(A).scale(-1),a=bn[e],f=bn[r],c=bn[n]}return s[0]=a.x,s[1]=a.y,s[2]=a.z,s[3]=0,s[4]=f.x,s[5]=f.y,s[6]=f.z,s[7]=0,s[8]=c.x,s[9]=c.y,s[10]=c.z,s[11]=0,s[12]=l.x,s[13]=l.y,s[14]=l.z,s[15]=1,s}var wr=new M,Lm=new M,Gm=new M;function rl(t,e,r=[]){let{oneOverRadii:n,oneOverRadiiSquared:o,centerToleranceSquared:s}=e;wr.from(t);let i=wr.x,a=wr.y,f=wr.z,c=n.x,l=n.y,h=n.z,u=i*i*c*c,d=a*a*l*l,A=f*f*h*h,m=u+d+A,p=Math.sqrt(1/m);if(!Number.isFinite(p))return;let E=Lm;if(E.copy(t).scale(p),mFt.EPSILON12);return wr.scale([O,B,g]).to(r)}var Do=new M,nl=new M,Um=new M,Pt=new M,Pm=new M,Oo=new M,ie=class{constructor(e=0,r=0,n=0){this.centerToleranceSquared=Ft.EPSILON1,at(e>=0),at(r>=0),at(n>=0),this.radii=new M(e,r,n),this.radiiSquared=new M(e*e,r*r,n*n),this.radiiToTheFourth=new M(e*e*e*e,r*r*r*r,n*n*n*n),this.oneOverRadii=new M(e===0?0:1/e,r===0?0:1/r,n===0?0:1/n),this.oneOverRadiiSquared=new M(e===0?0:1/(e*e),r===0?0:1/(r*r),n===0?0:1/(n*n)),this.minimumRadius=Math.min(e,r,n),this.maximumRadius=Math.max(e,r,n),this.radiiSquared.z!==0&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(e){return this===e||Boolean(e&&this.radii.equals(e.radii))}toString(){return this.radii.toString()}cartographicToCartesian(e,r=[0,0,0]){let n=nl,o=Um,[,,s]=e;this.geodeticSurfaceNormalCartographic(e,n),o.copy(this.radiiSquared).scale(n);let i=Math.sqrt(n.dot(o));return o.scale(1/i),n.scale(s),o.add(n),o.to(r)}cartesianToCartographic(e,r=[0,0,0]){Oo.from(e);let n=this.scaleToGeodeticSurface(Oo,Pt);if(!n)return;let o=this.geodeticSurfaceNormal(n,nl),s=Pm;s.copy(Oo).subtract(n);let i=Math.atan2(o.y,o.x),a=Math.asin(o.z),f=Math.sign(Qe.dot(s,Oo))*Qe.length(s);return $f([i,a,f],r)}eastNorthUpToFixedFrame(e,r=new St){return Ti(this,"east","north","up",e,r)}localFrameToFixedFrame(e,r,n,o,s=new St){return Ti(this,e,r,n,o,s)}geocentricSurfaceNormal(e,r=[0,0,0]){return Do.from(e).normalize().to(r)}geodeticSurfaceNormalCartographic(e,r=[0,0,0]){let n=qf(e),o=n[0],s=n[1],i=Math.cos(s);return Do.set(i*Math.cos(o),i*Math.sin(o),Math.sin(s)).normalize(),Do.to(r)}geodeticSurfaceNormal(e,r=[0,0,0]){return Do.from(e).scale(this.oneOverRadiiSquared).normalize().to(r)}scaleToGeodeticSurface(e,r){return rl(e,this,r)}scaleToGeocentricSurface(e,r=[0,0,0]){Pt.from(e);let n=Pt.x,o=Pt.y,s=Pt.z,i=this.oneOverRadiiSquared,a=1/Math.sqrt(n*n*i.x+o*o*i.y+s*s*i.z);return Pt.multiplyScalar(a).to(r)}transformPositionToScaledSpace(e,r=[0,0,0]){return Pt.from(e).scale(this.oneOverRadii).to(r)}transformPositionFromScaledSpace(e,r=[0,0,0]){return Pt.from(e).scale(this.radii).to(r)}getSurfaceNormalIntersectionWithZAxis(e,r=0,n=[0,0,0]){at(bt(this.radii.x,this.radii.y,Ft.EPSILON15)),at(this.radii.z>0),Pt.from(e);let o=Pt.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(o)>=this.radii.z-r))return Pt.set(0,0,o).to(n)}};ie.WGS84=new ie(6378137,6378137,se);var ct={OUTSIDE:-1,INTERSECTING:0,INSIDE:1};var OT=new M,LT=new M;var Mn=new M,ol=new M,ye=class{constructor(e=[0,0,0],r=0){this.radius=-0,this.center=new M,this.fromCenterRadius(e,r)}fromCenterRadius(e,r){return this.center.from(e),this.radius=r,this}fromCornerPoints(e,r){return r=Mn.from(r),this.center=new M().from(e).add(r).scale(.5),this.radius=this.center.distance(r),this}equals(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.radius===e.radius}clone(){return new ye(this.center,this.radius)}union(e){let r=this.center,n=this.radius,o=e.center,s=e.radius,i=Mn.copy(o).subtract(r),a=i.magnitude();if(n>=a+s)return this.clone();if(s>=a+n)return e.clone();let f=(n+a+s)*.5;return ol.copy(i).scale((-n+f)/a).add(r),this.center.copy(ol),this.radius=f,this}expand(e){let n=Mn.from(e).subtract(this.center).magnitude();return n>this.radius&&(this.radius=n),this}transform(e){this.center.transform(e);let r=Cn.getScaling(Mn,e);return this.radius=Math.max(r[0],Math.max(r[1],r[2]))*this.radius,this}distanceSquaredTo(e){let r=this.distanceTo(e);return r*r}distanceTo(e){let n=Mn.from(e).subtract(this.center);return Math.max(0,n.len()-this.radius)}intersectPlane(e){let r=this.center,n=this.radius,s=e.normal.dot(r)+e.distance;return s<-n?ct.OUTSIDE:s=f?ct.INSIDE:ct.INTERSECTING}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){let r=km.from(e).subtract(this.center),n=this.halfAxes,o=n.getColumn(0,Lo),s=n.getColumn(1,Go),i=n.getColumn(2,vo),a=o.magnitude(),f=s.magnitude(),c=i.magnitude();o.normalize(),s.normalize(),i.normalize();let l=0,h;return h=Math.abs(r.dot(o))-a,h>0&&(l+=h*h),h=Math.abs(r.dot(s))-f,h>0&&(l+=h*h),h=Math.abs(r.dot(i))-c,h>0&&(l+=h*h),l}computePlaneDistances(e,r,n=[-0,-0]){let o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,i=this.center,a=this.halfAxes,f=a.getColumn(0,Lo),c=a.getColumn(1,Go),l=a.getColumn(2,vo),h=Jm.copy(f).add(c).add(l).add(i),u=zm.copy(h).subtract(e),d=r.dot(u);return o=Math.min(d,o),s=Math.max(d,s),h.copy(i).add(f).add(c).subtract(l),u.copy(h).subtract(e),d=r.dot(u),o=Math.min(d,o),s=Math.max(d,s),h.copy(i).add(f).subtract(c).add(l),u.copy(h).subtract(e),d=r.dot(u),o=Math.min(d,o),s=Math.max(d,s),h.copy(i).add(f).subtract(c).subtract(l),u.copy(h).subtract(e),d=r.dot(u),o=Math.min(d,o),s=Math.max(d,s),i.copy(h).subtract(f).add(c).add(l),u.copy(h).subtract(e),d=r.dot(u),o=Math.min(d,o),s=Math.max(d,s),i.copy(h).subtract(f).add(c).subtract(l),u.copy(h).subtract(e),d=r.dot(u),o=Math.min(d,o),s=Math.max(d,s),i.copy(h).subtract(f).subtract(c).add(l),u.copy(h).subtract(e),d=r.dot(u),o=Math.min(d,o),s=Math.max(d,s),i.copy(h).subtract(f).subtract(c).subtract(l),u.copy(h).subtract(e),d=r.dot(u),o=Math.min(d,o),s=Math.max(d,s),n[0]=o,n[1]=s,n}transform(e){this.center.transformAsPoint(e);let r=this.halfAxes.getColumn(0,Lo);r.transformAsPoint(e);let n=this.halfAxes.getColumn(1,Go);n.transformAsPoint(e);let o=this.halfAxes.getColumn(2,vo);return o.transformAsPoint(e),this.halfAxes=new X([...r,...n,...o]),this}getTransform(){throw new Error("not implemented")}};var sl=new M,il=new M,ce=class{constructor(e=[0,0,1],r=0){this.normal=new M,this.distance=-0,this.fromNormalDistance(e,r)}fromNormalDistance(e,r){return at(Number.isFinite(r)),this.normal.from(e).normalize(),this.distance=r,this}fromPointNormal(e,r){e=sl.from(e),this.normal.from(r).normalize();let n=-this.normal.dot(e);return this.distance=n,this}fromCoefficients(e,r,n,o){return this.normal.set(e,r,n),at(bt(this.normal.len(),1)),this.distance=o,this}clone(){return new ce(this.normal,this.distance)}equals(e){return bt(this.distance,e.distance)&&bt(this.normal,e.normal)}getPointDistance(e){return this.normal.dot(e)+this.distance}transform(e){let r=il.copy(this.normal).transformAsVector(e).normalize(),n=this.normal.scale(-this.distance).transform(e);return this.fromPointNormal(n,r)}projectPointOntoPlane(e,r=[0,0,0]){let n=sl.from(e),o=this.getPointDistance(n),s=il.copy(this.normal).scale(o);return n.subtract(s).to(r)}};var al=[new M([1,0,0]),new M([0,1,0]),new M([0,0,1])],cl=new M,Qm=new M,Rt=class{constructor(e=[]){this.planes=e}fromBoundingSphere(e){this.planes.length=2*al.length;let r=e.center,n=e.radius,o=0;for(let s of al){let i=this.planes[o],a=this.planes[o+1];i||(i=this.planes[o]=new ce),a||(a=this.planes[o+1]=new ce);let f=cl.copy(s).scale(-n).add(r);i.fromPointNormal(f,s);let c=cl.copy(s).scale(n).add(r),l=Qm.copy(s).negate();a.fromPointNormal(c,l),o+=2}return this}computeVisibility(e){let r=ct.INSIDE;for(let n of this.planes)switch(e.intersectPlane(n)){case ct.OUTSIDE:return ct.OUTSIDE;case ct.INTERSECTING:r=ct.INTERSECTING;break;default:}return r}computeVisibilityWithPlaneMask(e,r){if(at(Number.isFinite(r),"parentPlaneMask is required."),r===Rt.MASK_OUTSIDE||r===Rt.MASK_INSIDE)return r;let n=Rt.MASK_INSIDE,o=this.planes;for(let s=0;sf;)Ym(a,No),fl.copy(No).transpose(),a.multiplyRight(No),a.multiplyLeft(fl),i.multiplyRight(No),++o>2&&(++s,o=0);return e.unitary=i.toTarget(e.unitary),e.diagonal=a.toTarget(e.diagonal),e}function Xm(t){let e=0;for(let r=0;r<9;++r){let n=t[r];e+=n*n}return Math.sqrt(e)}var bi=[1,0,0],Mi=[2,2,1];function Zm(t){let e=0;for(let r=0;r<3;++r){let n=t[Zt.getElementIndex(Mi[r],bi[r])];e+=2*n*n}return Math.sqrt(e)}function Ym(t,e){let r=Ft.EPSILON15,n=0,o=1;for(let c=0;c<3;++c){let l=Math.abs(t[Zt.getElementIndex(Mi[c],bi[c])]);l>n&&(o=c,n=l)}let s=bi[o],i=Mi[o],a=1,f=0;if(Math.abs(t[Zt.getElementIndex(i,s)])>r){let c=t[Zt.getElementIndex(i,i)],l=t[Zt.getElementIndex(s,s)],h=t[Zt.getElementIndex(i,s)],u=(c-l)/2/h,d;u<0?d=-1/(-u+Math.sqrt(1+u*u)):d=1/(u+Math.sqrt(1+u*u)),a=1/Math.sqrt(1+d*d),f=d*a}return X.IDENTITY.to(e),e[Zt.getElementIndex(s,s)]=e[Zt.getElementIndex(i,i)]=a,e[Zt.getElementIndex(i,s)]=f,e[Zt.getElementIndex(s,i)]=-f,e}var Ce=new M,qm=new M,$m=new M,tp=new M,ep=new M,rp=new X,np={diagonal:new X,unitary:new X};function Ii(t,e=new Ve){if(!t||t.length===0)return e.halfAxes=new X([0,0,0,0,0,0,0,0,0]),e.center=new M,e;let r=t.length,n=new M(0,0,0);for(let B of t)n.add(B);let o=1/r;n.multiplyByScalar(o);let s=0,i=0,a=0,f=0,c=0,l=0;for(let B of t){let g=Ce.copy(B).subtract(n);s+=g.x*g.x,i+=g.x*g.y,a+=g.x*g.z,f+=g.y*g.y,c+=g.y*g.z,l+=g.z*g.z}s*=o,i*=o,a*=o,f*=o,c*=o,l*=o;let h=rp;h[0]=s,h[1]=i,h[2]=a,h[3]=i,h[4]=f,h[5]=c,h[6]=a,h[7]=c,h[8]=l;let{unitary:u}=wi(h,np),d=e.halfAxes.copy(u),A=d.getColumn(0,$m),m=d.getColumn(1,tp),p=d.getColumn(2,ep),E=-Number.MAX_VALUE,y=-Number.MAX_VALUE,T=-Number.MAX_VALUE,b=Number.MAX_VALUE,C=Number.MAX_VALUE,w=Number.MAX_VALUE;for(let B of t)Ce.copy(B),E=Math.max(Ce.dot(A),E),y=Math.max(Ce.dot(m),y),T=Math.max(Ce.dot(p),T),b=Math.min(Ce.dot(A),b),C=Math.min(Ce.dot(m),C),w=Math.min(Ce.dot(p),w);A=A.multiplyByScalar(.5*(b+E)),m=m.multiplyByScalar(.5*(C+y)),p=p.multiplyByScalar(.5*(w+T)),e.center.copy(A).add(m).add(p);let I=qm.set(E-b,y-C,T-w).multiplyByScalar(.5),O=new X([I[0],0,0,0,I[1],0,0,0,I[2]]);return e.halfAxes.multiplyRight(O),e}var Ir;(function(t){t[t.ADD=1]="ADD",t[t.REPLACE=2]="REPLACE"})(Ir||(Ir={}));var Te;(function(t){t.EMPTY="empty",t.SCENEGRAPH="scenegraph",t.POINTCLOUD="pointcloud",t.MESH="mesh"})(Te||(Te={}));var wn;(function(t){t.I3S="I3S",t.TILES3D="TILES3D"})(wn||(wn={}));var fe;(function(t){t.GEOMETRIC_ERROR="geometricError",t.MAX_SCREEN_THRESHOLD="maxScreenThreshold"})(fe||(fe={}));var Sr="4.3.1";var xt={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect",GLTF:"glTF"},Xb=Object.keys(xt),be={BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]};function Si(t,e,r){z(t instanceof ArrayBuffer);let n=new TextDecoder("utf8"),o=new Uint8Array(t,e,r);return n.decode(o)}function ll(t,e=0){let r=new DataView(t);return`${String.fromCharCode(r.getUint8(e+0))}${String.fromCharCode(r.getUint8(e+1))}${String.fromCharCode(r.getUint8(e+2))}${String.fromCharCode(r.getUint8(e+3))}`}var hl="4.3.1";var ul={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:hl,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 dl(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 Fi(t){let e=1/0,r=1/0,n=1/0,o=-1/0,s=-1/0,i=-1/0,a=t.POSITION?t.POSITION.value:[],f=a&&a.length;for(let c=0;co?l:o,s=h>s?h:s,i=u>i?u:i}return[[e,r,n],[o,s,i]]}function Ri(t,e,r){let n=dl(e.value),o=r||Al(e);return{name:t,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:n}]},nullable:!1,metadata:o}}function Al(t){let 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}function pl(t,e,r){let n=gl(e.metadata),o=[],s=op(e.attributes);for(let i in t){let a=t[i],f=ml(i,a,s[i]);o.push(f)}if(r){let i=ml("indices",r);o.push(i)}return{fields:o,metadata:n}}function op(t){let e={};for(let r in t){let n=t[r];e[n.name||"undefined"]=n}return e}function ml(t,e,r){let n=r?gl(r.metadata):void 0;return Ri(t,e,n)}function gl(t){Object.entries(t);let e={};for(let r in t)e[`${r}.string`]=JSON.stringify(t[r]);return e}var Bl={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},sp={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},ip=4,In=class{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,r={}){let n=new this.draco.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(r);let o=this.decoder.GetEncodedGeometryType(n),s=o===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let i;switch(o){case this.draco.TRIANGULAR_MESH:i=this.decoder.DecodeBufferToMesh(n,s);break;case this.draco.POINT_CLOUD:i=this.decoder.DecodeBufferToPointCloud(n,s);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!i.ok()||!s.ptr){let u=`DRACO decompression failed: ${i.error_msg()}`;throw new Error(u)}let a=this._getDracoLoaderData(s,o,r),f=this._getMeshData(s,a,r),c=Fi(f.attributes),l=pl(f.attributes,a,f.indices);return{loader:"draco",loaderData:a,header:{vertexCount:s.num_points(),boundingBox:c},...f,schema:l}}finally{this.draco.destroy(n),s&&this.draco.destroy(s)}}_getDracoLoaderData(e,r,n){let o=this._getTopLevelMetadata(e),s=this._getDracoAttributes(e,n);return{geometry_type:r,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:o,attributes:s}}_getDracoAttributes(e,r){let n={};for(let o=0;othis.decoder[i]).includes(o)){let i=new this.draco.AttributeQuantizationTransform;try{if(i.InitFromAttribute(e))return{quantization_bits:i.quantization_bits(),range:i.range(),min_values:new Float32Array([1,2,3]).map(a=>i.min_value(a))}}finally{this.draco.destroy(i)}}return null}_getOctahedronTransform(e,r){let{octahedronAttributes:n=[]}=r,o=e.attribute_type();if(n.map(i=>this.decoder[i]).includes(o)){let i=new this.draco.AttributeQuantizationTransform;try{if(i.InitFromAttribute(e))return{quantization_bits:i.quantization_bits()}}finally{this.draco.destroy(i)}}return null}};function ap(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 cp(t){let e=t.size(),r=new Int32Array(e);for(let n=0;n({draco:r})):Li||=up(t),await Li}async function up(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await Xt(Oi[Et.FALLBACK_DECODER],"draco",t,Et.FALLBACK_DECODER);break;case"wasm":default:[e,r]=await Promise.all([await Xt(Oi[Et.DECODER],"draco",t,Et.DECODER),await Xt(Oi[Et.DECODER_WASM],"draco",t,Et.DECODER_WASM)])}return e=e||globalThis.DracoDecoderModule,await dp(e,r)}function dp(t,e){let r={};return e&&(r.wasmBinary=e),new Promise(n=>{t({...r,onModuleLoaded:o=>n({draco:o})})})}var Uo={...ul,parse:Ap};async function Ap(t,e){let{draco:r}=await xl(e),n=new In(r);try{return n.parseSync(t,e?.draco)}finally{n.destroy()}}var mp={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},rt={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},H={...mp,...rt};var Gi={[rt.DOUBLE]:Float64Array,[rt.FLOAT]:Float32Array,[rt.UNSIGNED_SHORT]:Uint16Array,[rt.UNSIGNED_INT]:Uint32Array,[rt.UNSIGNED_BYTE]:Uint8Array,[rt.BYTE]:Int8Array,[rt.SHORT]:Int16Array,[rt.INT]:Int32Array},pp={DOUBLE:rt.DOUBLE,FLOAT:rt.FLOAT,UNSIGNED_SHORT:rt.UNSIGNED_SHORT,UNSIGNED_INT:rt.UNSIGNED_INT,UNSIGNED_BYTE:rt.UNSIGNED_BYTE,BYTE:rt.BYTE,SHORT:rt.SHORT,INT:rt.INT},vi="Failed to convert GL type",ht=class{static fromTypedArray(e){e=ArrayBuffer.isView(e)?e.constructor:e;for(let r in Gi)if(Gi[r]===e)return r;throw new Error(vi)}static fromName(e){let r=pp[e];if(!r)throw new Error(vi);return r}static getArrayType(e){switch(e){case rt.UNSIGNED_SHORT_5_6_5:case rt.UNSIGNED_SHORT_4_4_4_4:case rt.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:let r=Gi[e];if(!r)throw new Error(vi);return r}}static getByteSize(e){return ht.getArrayType(e).BYTES_PER_ELEMENT}static validate(e){return Boolean(ht.getArrayType(e))}static createTypedArray(e,r,n=0,o){o===void 0&&(o=(r.byteLength-n)/ht.getByteSize(e));let s=ht.getArrayType(e);return new s(r,n,o)}};function El(t,e){if(!t)throw new Error(`math.gl assertion failed. ${e}`)}function Ni(t,e=[0,0,0]){let r=t>>11&31,n=t>>5&63,o=t&31;return e[0]=r<<3,e[1]=n<<2,e[2]=o<<3,e}var IM=1/256;var SM=new ke,FM=new M,RM=new ke,DM=new ke,OM=new Uint8Array(1);function _l(t,e=255){return Vs(t,0,e)/e*2-1}function yl(t){return t<0?-1:1}function Cl(t,e,r,n){if(El(n),t<0||t>r||e<0||e>r)throw new Error(`x and y must be unsigned normalized integers between 0 and ${r}`);if(n.x=_l(t,r),n.y=_l(e,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){let o=n.x;n.x=(1-Math.abs(n.y))*yl(o),n.y=(1-Math.abs(o))*yl(n.y)}return n.normalize()}function Ui(t,e,r){return Cl(t,e,255,r)}var Ht=class{json;buffer;featuresLength=0;_cachedTypedArrays={};constructor(e,r){this.json=e,this.buffer=r}getExtension(e){return this.json.extensions&&this.json.extensions[e]}hasProperty(e){return Boolean(this.json[e])}getGlobalProperty(e,r=H.UNSIGNED_INT,n=1){let o=this.json[e];return o&&Number.isFinite(o.byteOffset)?this._getTypedArrayFromBinary(e,r,n,1,o.byteOffset):o}getPropertyArray(e,r,n){let o=this.json[e];return o&&Number.isFinite(o.byteOffset)?("componentType"in o&&(r=ht.fromName(o.componentType)),this._getTypedArrayFromBinary(e,r,n,this.featuresLength,o.byteOffset)):this._getTypedArrayFromArray(e,r,o)}getProperty(e,r,n,o,s){let i=this.json[e];if(!i)return i;let a=this.getPropertyArray(e,r,n);if(n===1)return a[o];for(let f=0;ft[e],VEC2:(t,e)=>[t[2*e+0],t[2*e+1]],VEC3:(t,e)=>[t[3*e+0],t[3*e+1],t[3*e+2]],VEC4:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT2:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT3:(t,e)=>[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]],MAT4:(t,e)=>[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]},xp={SCALAR:(t,e,r)=>{e[r]=t},VEC2:(t,e,r)=>{e[2*r+0]=t[0],e[2*r+1]=t[1]},VEC3:(t,e,r)=>{e[3*r+0]=t[0],e[3*r+1]=t[1],e[3*r+2]=t[2]},VEC4:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT2:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT3:(t,e,r)=>{e[9*r+0]=t[0],e[9*r+1]=t[1],e[9*r+2]=t[2],e[9*r+3]=t[3],e[9*r+4]=t[4],e[9*r+5]=t[5],e[9*r+6]=t[6],e[9*r+7]=t[7],e[9*r+8]=t[8],e[9*r+9]=t[9]},MAT4:(t,e,r)=>{e[16*r+0]=t[0],e[16*r+1]=t[1],e[16*r+2]=t[2],e[16*r+3]=t[3],e[16*r+4]=t[4],e[16*r+5]=t[5],e[16*r+6]=t[6],e[16*r+7]=t[7],e[16*r+8]=t[8],e[16*r+9]=t[9],e[16*r+10]=t[10],e[16*r+11]=t[11],e[16*r+12]=t[12],e[16*r+13]=t[13],e[16*r+14]=t[14],e[16*r+15]=t[15]}};function Tl(t,e,r,n){let{componentType:o}=t;z(t.componentType);let s=typeof o=="string"?ht.fromName(o):o,i=gp[t.type],a=Bp[t.type],f=xp[t.type];return r+=t.byteOffset,{values:ht.createTypedArray(s,e,r,i*n),type:s,size:i,unpacker:a,packer:f}}var Yt=t=>t!==void 0;function bl(t,e,r){if(!e)return null;let n=t.getExtension("3DTILES_batch_table_hierarchy"),o=e.HIERARCHY;return o&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=o,n=o),n?Ep(n,r):null}function Ep(t,e){let r,n,o,s=t.instancesLength,i=t.classes,a=t.classIds,f=t.parentCounts,c=t.parentIds,l=s;Yt(a.byteOffset)&&(a.componentType=defaultValue(a.componentType,GL.UNSIGNED_SHORT),a.type=AttributeType.SCALAR,o=getBinaryAccessor(a),a=o.createArrayBufferView(e.buffer,e.byteOffset+a.byteOffset,s));let h;if(Yt(f))for(Yt(f.byteOffset)&&(f.componentType=defaultValue(f.componentType,GL.UNSIGNED_SHORT),f.type=AttributeType.SCALAR,o=getBinaryAccessor(f),f=o.createArrayBufferView(e.buffer,e.byteOffset+f.byteOffset,s)),h=new Uint16Array(s),l=0,r=0;r0?_p(t,e,r):yp(t,e,r)}function _p(t,e,r){let n=t.classIds,o=t.parentCounts,s=t.parentIds,i=t.parentIndexes,a=n.length,f=scratchVisited;f.length=Math.max(f.length,a);let c=++marker,l=scratchStack;for(l.length=0,l.push(e);l.length>0;){if(e=l.pop(),f[e]===c)continue;f[e]=c;let h=r(t,e);if(Yt(h))return h;let u=o[e],d=i[e];for(let A=0;At,Tp={HIERARCHY:!0,extensions:!0,extras:!0},le=class{json;binary;featureCount;_extensions;_properties;_binaryProperties;_hierarchy;constructor(e,r,n,o={}){z(n>=0),this.json=e||{},this.binary=r,this.featureCount=n,this._extensions=this.json?.extensions||{},this._properties={};for(let s in this.json)Tp[s]||(this._properties[s]=this.json[s]);this._binaryProperties=this._initializeBinaryProperties(),o["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=bl(this,this.json,this.binary))}getExtension(e){return this.json&&this.json.extensions&&this.json.extensions[e]}memorySizeInBytes(){return 0}isClass(e,r){if(this._checkBatchId(e),z(typeof r=="string",r),this._hierarchy){let n=Fr(this._hierarchy,e,(o,s)=>{let i=o.classIds[s];return o.classes[i].name===r});return _t(n)}return!1}isExactClass(e,r){return z(typeof r=="string",r),this.getExactClassName(e)===r}getExactClassName(e){if(this._checkBatchId(e),this._hierarchy){let r=this._hierarchy.classIds[e];return this._hierarchy.classes[r].name}}hasProperty(e,r){return this._checkBatchId(e),z(typeof r=="string",r),_t(this._properties[r])||this._hasPropertyInHierarchy(e,r)}getPropertyNames(e,r){this._checkBatchId(e),r=_t(r)?r:[],r.length=0;let n=Object.keys(this._properties);return r.push(...n),this._hierarchy&&this._getPropertyNamesInHierarchy(e,r),r}getProperty(e,r){if(this._checkBatchId(e),z(typeof r=="string",r),this._binaryProperties){let o=this._binaryProperties[r];if(_t(o))return this._getBinaryProperty(o,e)}let n=this._properties[r];if(_t(n))return Po(n[e],!0);if(this._hierarchy){let o=this._getHierarchyProperty(e,r);if(_t(o))return o}}setProperty(e,r,n){let o=this.featureCount;if(this._checkBatchId(e),z(typeof r=="string",r),this._binaryProperties){let i=this._binaryProperties[r];if(i){this._setBinaryProperty(i,e,n);return}}if(this._hierarchy&&this._setHierarchyProperty(this,e,r,n))return;let s=this._properties[r];_t(s)||(this._properties[r]=new Array(o),s=this._properties[r]),s[e]=Po(n,!0)}_checkBatchId(e){if(!(e>=0&&e{let i=o.classIds[s],a=o.classes[i].instances;return _t(a[r])});return _t(n)}_getPropertyNamesInHierarchy(e,r){Fr(this._hierarchy,e,(n,o)=>{let s=n.classIds[o],i=n.classes[s].instances;for(let a in i)i.hasOwnProperty(a)&&r.indexOf(a)===-1&&r.push(a)})}_getHierarchyProperty(e,r){return Fr(this._hierarchy,e,(n,o)=>{let s=n.classIds[o],i=n.classes[s],a=n.classIndexes[o],f=i.instances[r];return _t(f)?_t(f.typedArray)?this._getBinaryProperty(f,a):Po(f[a],!0):null})}_setHierarchyProperty(e,r,n,o){let s=Fr(this._hierarchy,r,(i,a)=>{let f=i.classIds[a],c=i.classes[f],l=i.classIndexes[a],h=c.instances[n];return _t(h)?(z(a===r,`Inherited property "${n}" is read-only.`),_t(h.typedArray)?this._setBinaryProperty(h,l,o):h[l]=Po(o,!0),!0):!1});return _t(s)}};function Me(t,e,r=0){let n=new DataView(e);if(t.magic=n.getUint32(r,!0),r+=4,t.version=n.getUint32(r,!0),r+=4,t.byteLength=n.getUint32(r,!0),r+=4,t.version!==1)throw new Error(`3D Tile Version ${t.version} not supported`);return r}var Rr=4,wl="b3dm tile in legacy format.";function Dr(t,e,r){let n=new DataView(e),o;t.header=t.header||{};let s=n.getUint32(r,!0);r+=Rr;let i=n.getUint32(r,!0);r+=Rr;let a=n.getUint32(r,!0);r+=Rr;let f=n.getUint32(r,!0);return r+=Rr,a>=570425344?(r-=Rr*2,o=s,a=i,f=0,s=0,i=0,console.warn(wl)):f>=570425344&&(r-=Rr,o=a,a=s,f=i,s=0,i=0,console.warn(wl)),t.header.featureTableJsonByteLength=s,t.header.featureTableBinaryByteLength=i,t.header.batchTableJsonByteLength=a,t.header.batchTableBinaryByteLength=f,t.header.batchLength=o,r}function Or(t,e,r,n){return r=bp(t,e,r,n),r=Mp(t,e,r,n),r}function bp(t,e,r,n){let{featureTableJsonByteLength:o,featureTableBinaryByteLength:s,batchLength:i}=t.header||{};if(t.featureTableJson={BATCH_LENGTH:i||0},o&&o>0){let a=Si(e,r,o);t.featureTableJson=JSON.parse(a)}return r+=o||0,t.featureTableBinary=new Uint8Array(e,r,s),r+=s||0,r}function Mp(t,e,r,n){let{batchTableJsonByteLength:o,batchTableBinaryByteLength:s}=t.header||{};if(o&&o>0){let i=Si(e,r,o);t.batchTableJson=JSON.parse(i),r+=o,s&&s>0&&(t.batchTableBinary=new Uint8Array(e,r,s),t.batchTableBinary=new Uint8Array(t.batchTableBinary),r+=s)}return r}function Pi(t,e,r){if(!e&&(!t||!t.batchIds||!r))return null;let{batchIds:n,isRGB565:o,pointCount:s=0}=t;if(n&&r){let i=new Uint8ClampedArray(s*3);for(let a=0;ah*255);i[a*3]=l[0],i[a*3+1]=l[1],i[a*3+2]=l[2]}return{type:H.UNSIGNED_BYTE,value:i,size:3,normalized:!0}}if(e&&o){let i=new Uint8ClampedArray(s*3);for(let a=0;aT1,decode:()=>x1,encode:()=>E1,name:()=>B1});var Dl="4.3.1";var vp=globalThis.loaders?.parseImageNode,Hi=typeof Image<"u",ki=typeof ImageBitmap<"u",Np=Boolean(vp),Ji=Bt?!0:Np;function Ol(t){switch(t){case"auto":return ki||Hi||Ji;case"imagebitmap":return ki;case"image":return Hi;case"data":return Ji;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}function Ll(){if(ki)return"imagebitmap";if(Hi)return"image";if(Ji)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function Gl(t){let e=Up(t);if(!e)throw new Error("Not an image");return e}function Sn(t){switch(Gl(t)){case"data":return t;case"image":case"imagebitmap":let e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function Up(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}var Pp=/^data:image\/svg\+xml/,Hp=/\.svg((\?|#).*)?$/;function Ho(t){return t&&(Pp.test(t)||Hp.test(t))}function vl(t,e){if(Ho(e)){let n=new TextDecoder().decode(t);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(s){throw new Error(s.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return zi(t,e)}function zi(t,e){if(Ho(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function ko(t,e,r){let n=vl(t,r),o=self.URL||self.webkitURL,s=typeof n!="string"&&o.createObjectURL(n);try{return await kp(s||n,e)}finally{s&&o.revokeObjectURL(s)}}async function kp(t,e){let r=new Image;return r.src=t,e.image&&e.image.decode&&r.decode?(await r.decode(),r):await new Promise((n,o)=>{try{r.onload=()=>n(r),r.onerror=s=>{let i=s instanceof Error?s.message:"error";o(new Error(i))}}catch(s){o(s)}})}var Jp={},Nl=!0;async function Ul(t,e,r){let n;Ho(r)?n=await ko(t,e,r):n=zi(t,r);let o=e&&e.imagebitmap;return await zp(n,o)}async function zp(t,e=null){if((Qp(e)||!Nl)&&(e=null),e)try{return await createImageBitmap(t,e)}catch(r){console.warn(r),Nl=!1}return await createImageBitmap(t)}function Qp(t){for(let e in t||Jp)return!1;return!0}function Pl(t){return!Xp(t,"ftyp",4)||!(t[8]&96)?null:Vp(t)}function Vp(t){switch(jp(t,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function jp(t,e,r){return String.fromCharCode(...t.slice(e,r))}function Kp(t){return[...t].map(e=>e.charCodeAt(0))}function Xp(t,e,r=0){let n=Kp(e);for(let o=0;o=24&&e.getUint32(0,Wt)===2303741511?{mimeType:"image/png",width:e.getUint32(16,Wt),height:e.getUint32(20,Wt)}:null}function Wp(t){let e=Rn(t);return e.byteLength>=10&&e.getUint32(0,Wt)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,Fn),height:e.getUint16(8,Fn)}:null}function qp(t){let e=Rn(t);return e.byteLength>=14&&e.getUint16(0,Wt)===16973&&e.getUint32(2,Fn)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,Fn),height:e.getUint32(22,Fn)}:null}function $p(t){let e=Rn(t);if(!(e.byteLength>=3&&e.getUint16(0,Wt)===65496&&e.getUint8(2)===255))return null;let{tableMarkers:n,sofMarkers:o}=t1(),s=2;for(;s+9Boolean(je(new DataView(t)))],options:o1};var Vi={};function ji(t){if(Vi[t]===void 0){let e=Bt?i1(t):s1(t);Vi[t]=e}return Vi[t]}function s1(t){let e=["image/png","image/jpeg","image/gif"],r=globalThis.loaders?.imageFormatsNode||e,n=globalThis.loaders?.parseImageNode;return Boolean(n)&&r.includes(t)}function i1(t){switch(t){case"image/avif":case"image/webp":return a1(t);default:return!0}}function a1(t){try{return document.createElement("canvas").toDataURL(t).indexOf(`data:${t}`)===0}catch{return!1}}function ot(t,e){if(!t)throw new Error(e||"assert failed: gltf")}var Jo={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},zo={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4};var c1=1.33,Jl=["SCALAR","VEC2","VEC3","VEC4"],f1=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],l1=new Map(f1),h1={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},u1={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},d1={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Qo(t){return Jl[t-1]||Jl[0]}function we(t){let e=l1.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function Lr(t,e){let r=d1[t.componentType],n=h1[t.type],o=u1[t.componentType],s=t.count*n,i=t.count*n*o;ot(i>=0&&i<=e.byteLength);let a=zo[t.componentType],f=Jo[t.type];return{ArrayType:r,length:s,byteLength:i,componentByteSize:a,numberOfComponentsInElement:f}}function Dn(t){let{images:e,bufferViews:r}=t;e=e||[],r=r||[];let n=e.map(i=>i.bufferView);r=r.filter(i=>!n.includes(i));let o=r.reduce((i,a)=>i+a.byteLength,0),s=e.reduce((i,a)=>{let{width:f,height:c}=a.image;return i+f*c},0);return o+Math.ceil(4*s*c1)}function zl(t,e,r){let n=t.bufferViews[r];ot(n);let o=n.buffer,s=e[o];ot(s);let i=(n.byteOffset||0)+s.byteOffset;return new Uint8Array(s.arrayBuffer,i,n.byteLength)}function Ql(t,e,r){let n=typeof r=="number"?t.accessors?.[r]:r;if(!n)throw new Error(`No gltf accessor ${JSON.stringify(r)}`);let o=t.bufferViews?.[n.bufferView||0];if(!o)throw new Error(`No gltf buffer view for accessor ${o}`);let{arrayBuffer:s,byteOffset:i}=e[o.buffer],a=(i||0)+(n.byteOffset||0)+(o.byteOffset||0),{ArrayType:f,length:c,componentByteSize:l,numberOfComponentsInElement:h}=Lr(n,o),u=l*h,d=o.byteStride||u;if(typeof o.byteStride>"u"||o.byteStride===u)return new f(s,a,c);let A=new f(c);for(let m=0;mo===e),n=this.getRequiredExtensions().find(o=>o===e);return typeof r=="string"||typeof n=="string"}getExtension(e){let r=this.getUsedExtensions().find(o=>o===e),n=this.json.extensions||{};return r?n[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(n=>n===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,r){return(e.extensions||{})[r]}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,r){if(typeof r=="object")return r;let n=this.json[e]&&this.json[e][r];if(!n)throw new Error(`glTF file error: Could not find ${e}[${r}]`);return n}getTypedArrayForBufferView(e){e=this.getBufferView(e);let r=e.buffer,n=this.gltf.buffers[r];ot(n);let o=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,o,e.byteLength)}getTypedArrayForAccessor(e){let r=this.getAccessor(e);return Ql(this.gltf.json,this.gltf.buffers,r)}getTypedArrayForImageData(e){e=this.getAccessor(e);let r=this.getBufferView(e.bufferView),o=this.getBuffer(r.buffer).data,s=r.byteOffset||0;return new Uint8Array(o,s,r.byteLength)}addApplicationData(e,r){return this.json[e]=r,this}addExtraData(e,r){return this.json.extras=this.json.extras||{},this.json.extras[e]=r,this}addObjectExtension(e,r,n){return e.extensions=e.extensions||{},e.extensions[r]=n,this.registerUsedExtension(r),this}setObjectExtension(e,r,n){let o=e.extensions||{};o[r]=n}removeObjectExtension(e,r){let n=e?.extensions||{};if(n[r]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];let o=this.json.extensionsRemoved;o.includes(r)||o.push(r)}delete n[r]}addExtension(e,r={}){return ot(r),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=r,this.registerUsedExtension(e),r}addRequiredExtension(e,r={}){return ot(r),this.addExtension(e,r),this.registerRequiredExtension(e),r}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(r=>r===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(r=>r===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];let r=this.json.extensionsRemoved;r.includes(e)||r.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){let{nodeIndices:r}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:r}),this.json.scenes.length-1}addNode(e){let{meshIndex:r,matrix:n}=e;this.json.nodes=this.json.nodes||[];let o={mesh:r};return n&&(o.matrix=n),this.json.nodes.push(o),this.json.nodes.length-1}addMesh(e){let{attributes:r,indices:n,material:o,mode:s=4}=e,a={primitives:[{attributes:this._addAttributes(r),mode:s}]};if(n){let f=this._addIndices(n);a.primitives[0].indices=f}return Number.isFinite(o)&&(a.primitives[0].material=o),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){let n={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(n),this.json.meshes.length-1}addImage(e,r){let n=je(e),o=r||n?.mimeType,i={bufferView:this.addBufferView(e),mimeType:o};return this.json.images=this.json.images||[],this.json.images.push(i),this.json.images.length-1}addBufferView(e,r=0,n=this.byteLength){let o=e.byteLength;ot(Number.isFinite(o)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);let s={buffer:r,byteOffset:n,byteLength:o};return this.byteLength+=Tt(o,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(s),this.json.bufferViews.length-1}addAccessor(e,r){let n={bufferView:e,type:Qo(r.size),componentType:r.componentType,count:r.count,max:r.max,min:r.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(e,r={size:3}){let n=this.addBufferView(e),o={min:r.min,max:r.max};(!o.min||!o.max)&&(o=this._getAccessorMinMax(e,r.size));let s={size:r.size,componentType:we(e),count:Math.round(e.length/r.size),min:o.min,max:o.max};return this.addAccessor(n,Object.assign(s,r))}addTexture(e){let{imageIndex:r}=e,n={source:r};return this.json.textures=this.json.textures||[],this.json.textures.push(n),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(){let e=this.byteLength,r=new ArrayBuffer(e),n=new Uint8Array(r),o=0;for(let s of this.sourceBuffers||[])o=Us(s,n,o);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=r,this.sourceBuffers=[r],this.gltf.buffers=[{arrayBuffer:r,byteOffset:0,byteLength:r.byteLength}]}_removeStringFromArray(e,r){let n=!0;for(;n;){let o=e.indexOf(r);o>-1?e.splice(o,1):n=!1}}_addAttributes(e={}){let r={};for(let n in e){let o=e[n],s=this._getGltfAttributeName(n),i=this.addBinaryBuffer(o.value,o);r[s]=i}return r}_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,r){let n={min:null,max:null};if(e.lengthu===l);h===-1&&(h=n.push(l)-1),s.push(h)}let i=new Uint32Array(s),a=t.gltf.buffers.push({arrayBuffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength})-1,f=t.addBufferView(i,a,0),c=t.addAccessor(f,{size:1,componentType:we(i),count:i.length});o.attributes[e]=c}function p1(t,e,r,n,o=[0]){let s={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},i=r[n],a=r[n+1],f=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(f=4);let c=g1(i,a,t,f),l=0;for(let h of o){let u=typeof h=="number"?Object.values(s)[h]:s[h],d=c+u.offset,A=Sn(t);if(A.data.length<=d)throw new Error(`${A.data.length} <= ${d}`);let m=A.data[d];l|=m<n)break;let c=a/o,l=f/o;s.push(t.slice(c,c+l))}return s}function Ko(t,e,r){let n=[];for(let o=0;o{if(o.data){let{accessorKey:i,index:a}=M1(e.attributes),f=new Uint32Array(o.data);n[s]={featureCount:f.length,propertyTable:o.propertyTable,attribute:a},t.gltf.buffers.push({arrayBuffer:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength});let c=t.addBufferView(f),l=t.addAccessor(c,{size:1,componentType:we(f),count:f.length});e.attributes[i]=l}})}function M1(t){let e="_FEATURE_ID_",r=Object.keys(t).filter(s=>s.indexOf(e)===0),n=-1;for(let s of r){let i=Number(s.substring(e.length));i>n&&(n=i)}return n++,{accessorKey:`${e}${n}`,index:n}}var Yi={};lt(Yi,{createExtStructuralMetadata:()=>X1,decode:()=>I1,encode:()=>S1,name:()=>w1});var Pr="EXT_structural_metadata",w1=Pr;async function I1(t,e){let r=new Q(t);F1(r,e)}function S1(t,e){let r=new Q(t);return j1(r,e),r.createBinaryChunk(),r.gltf}function F1(t,e){if(!e.gltf?.loadBuffers)return;let r=t.getExtension(Pr);r&&(e.gltf?.loadImages&&R1(t,r),D1(t,r))}function R1(t,e){let r=e.propertyTextures,n=t.gltf.json;if(r&&n.meshes)for(let o of n.meshes)for(let s of o.primitives)L1(t,r,s,e)}function D1(t,e){let r=e.schema;if(!r)return;let n=r.classes,o=e.propertyTables;if(n&&o)for(let s in n){let i=O1(o,s);i&&v1(t,r,i)}}function O1(t,e){for(let r of t)if(r.class===e)return r;return null}function L1(t,e,r,n){if(!e)return;let s=r.extensions?.[Pr]?.propertyTextures;if(s)for(let i of s){let a=e[i];G1(t,a,r,n)}}function G1(t,e,r,n){if(!e.properties)return;n.dataAttributeNames||(n.dataAttributeNames=[]);let o=e.class;for(let s in e.properties){let i=`${o}_${s}`,a=e.properties?.[s];if(!a)continue;a.data||(a.data=[]);let f=a.data,c=Nr(t,a,r);c!==null&&(Vo(t,i,c,f,r),a.data=f,n.dataAttributeNames.push(i))}}function v1(t,e,r){let n=e.classes?.[r.class];if(!n)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${r.class}`);let o=r.count;for(let s in n.properties){let i=n.properties[s],a=r.properties?.[s];if(a){let f=N1(t,e,i,o,a);a.data=f}}}function N1(t,e,r,n,o){let s=[],i=o.values,a=t.getTypedArrayForBufferView(i),f=U1(t,r,o,n),c=P1(t,o,n);switch(r.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{s=H1(r,n,a,f);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${r.type}`);case"STRING":{s=Xo(n,a,f,c);break}case"ENUM":{s=k1(e,r,n,a,f);break}default:throw new Error(`Unknown classProperty type ${r.type}`)}return s}function U1(t,e,r,n){return e.array&&typeof e.count>"u"&&typeof r.arrayOffsets<"u"?Gr(t,r.arrayOffsets,r.arrayOffsetType||"UINT32",n):null}function P1(t,e,r){return typeof e.stringOffsets<"u"?Gr(t,e.stringOffsets,e.stringOffsetType||"UINT32",r):null}function H1(t,e,r,n){let o=t.array,s=t.count,i=On(t.type,t.componentType),a=r.byteLength/i,f;return t.componentType?f=vr(r,t.type,t.componentType,a):f=r,o?n?jo(f,e,n,r.length,i):s?Ko(f,e,s):[]:f}function k1(t,e,r,n,o){let s=e.enumType;if(!s)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");let i=t.enums?.[s];if(!i)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${s}`);let a=i.valueType||"UINT16",f=On(e.type,a),c=n.byteLength/f,l=vr(n,e.type,a,c);if(l||(l=n),e.array){if(o)return J1({valuesData:l,numberOfElements:r,arrayOffsets:o,valuesDataBytesLength:n.length,elementSize:f,enumEntry:i});let h=e.count;return h?z1(l,r,h,i):[]}return Zi(l,0,r,i)}function J1(t){let{valuesData:e,numberOfElements:r,arrayOffsets:n,valuesDataBytesLength:o,elementSize:s,enumEntry:i}=t,a=[];for(let f=0;fo)break;let h=c/s,u=l/s,d=Zi(e,h,u,i);a.push(d)}return a}function z1(t,e,r,n){let o=[];for(let s=0;srg,name:()=>eg});var Xl="EXT_feature_metadata",eg=Xl;async function rg(t,e){let r=new Q(t);ng(r,e)}function ng(t,e){if(!e.gltf?.loadBuffers)return;let r=t.getExtension(Xl);r&&(e.gltf?.loadImages&&og(t,r),sg(t,r))}function og(t,e){let r=e.schema;if(!r)return;let n=r.classes,{featureTextures:o}=e;if(n&&o)for(let s in n){let i=n[s],a=ag(o,s);a&&fg(t,a,i)}}function sg(t,e){let r=e.schema;if(!r)return;let n=r.classes,o=e.featureTables;if(n&&o)for(let s in n){let i=ig(o,s);i&&cg(t,r,i)}}function ig(t,e){for(let r in t){let n=t[r];if(n.class===e)return n}return null}function ag(t,e){for(let r in t){let n=t[r];if(n.class===e)return n}return null}function cg(t,e,r){if(!r.class)return;let n=e.classes?.[r.class];if(!n)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${r.class}`);let o=r.count;for(let s in n.properties){let i=n.properties[s],a=r.properties?.[s];if(a){let f=lg(t,e,i,o,a);a.data=f}}}function fg(t,e,r){let n=e.class;for(let o in r.properties){let s=e?.properties?.[o];if(s){let i=mg(t,s,n);s.data=i}}}function lg(t,e,r,n,o){let s=[],i=o.bufferView,a=t.getTypedArrayForBufferView(i),f=hg(t,r,o,n),c=ug(t,r,o,n);return r.type==="STRING"||r.componentType==="STRING"?s=Xo(n,a,f,c):dg(r)&&(s=Ag(r,n,a,f)),s}function hg(t,e,r,n){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof r.arrayOffsetBufferView<"u"?Gr(t,r.arrayOffsetBufferView,r.offsetType||"UINT32",n):null}function ug(t,e,r,n){return typeof r.stringOffsetBufferView<"u"?Gr(t,r.stringOffsetBufferView,r.offsetType||"UINT32",n):null}function dg(t){let e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(t.type)||typeof t.componentType<"u"&&e.includes(t.componentType)}function Ag(t,e,r,n){let o=t.type==="ARRAY",s=t.componentCount,i="SCALAR",a=t.componentType||t.type,f=On(i,a),c=r.byteLength/f,l=vr(r,i,a,c);return o?n?jo(l,e,n,r.length,f):s?Ko(l,e,s):[]:l}function mg(t,e,r){let n=t.gltf.json;if(!n.meshes)return[];let o=[];for(let s of n.meshes)for(let i of s.primitives)pg(t,r,e,o,i);return o}function pg(t,e,r,n,o){let s={channels:r.channels,...r.texture},i=Nr(t,s,o);i&&Vo(t,e,i,n,o)}var Zl="4.3.1";var Yl="4.3.1";var Zo={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"},Wl;async function $i(t){un(t.modules);let e=Gs("basis");return e||(Wl||=gg(t),await Wl)}async function gg(t){let e=null,r=null;return[e,r]=await Promise.all([await Xt(Zo.TRANSCODER,"textures",t),await Xt(Zo.TRANSCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await Bg(e,r)}function Bg(t,e){let r={};return e&&(r.wasmBinary=e),new Promise(n=>{t(r).then(o=>{let{BasisFile:s,initializeBasis:i}=o;i(),n({BasisFile:s})})})}var qi;async function ta(t){let e=t.modules||{};return e.basisEncoder?e.basisEncoder:(qi=qi||xg(t),await qi)}async function xg(t){let e=null,r=null;return[e,r]=await Promise.all([await Xt(Zo.ENCODER,"textures",t),await Xt(Zo.ENCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await Eg(e,r)}function Eg(t,e){let r={};return e&&(r.wasmBinary=e),new Promise(n=>{t(r).then(o=>{let{BasisFile:s,KTX2File:i,initializeBasis:a,BasisEncoder:f}=o;a(),n({BasisFile:s,KTX2File:i,BasisEncoder:f})})})}var Ke={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919};var _g=["","WEBKIT_","MOZ_"],ql={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"},Yo=null;function $l(t){if(!Yo){t=t||yg()||void 0,Yo=new Set;for(let e of _g)for(let r in ql)if(t&&t.getExtension(`${e}${r}`)){let n=ql[r];Yo.add(n)}}return Yo}function yg(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}var Mt=[171,75,84,88,32,50,48,187,13,10,26,10];function th(t){let e=new Uint8Array(t);return!(e.byteLengthsa+qo);let n=e.getUint32(r+0,Hr),o=e.getUint32(r+4,Hr);return r+=qo,z(o===Ig),na(t,e,r,n),r+=n,r+=oa(t,e,r,t.header.byteLength),r}function Og(t,e,r,n){return z(t.header.byteLength>sa+qo),Lg(t,e,r,n),r+t.header.byteLength}function Lg(t,e,r,n){for(;r+8<=t.header.byteLength;){let o=e.getUint32(r+0,Hr),s=e.getUint32(r+4,Hr);switch(r+=qo,s){case Mg:na(t,e,r,o);break;case wg:oa(t,e,r,o);break;case Sg:n.strict||na(t,e,r,o);break;case Fg:n.strict||oa(t,e,r,o);break;default:break}r+=Tt(o,4)}return r}function na(t,e,r,n){let o=new Uint8Array(e.buffer,r,n),i=new TextDecoder("utf8").decode(o);return t.json=JSON.parse(i),Tt(n,4)}function oa(t,e,r,n){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:n,arrayBuffer:e.buffer}),Tt(n,4)}function ia(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;let n=e.baseUri||e.uri;if(!n)throw new Error(`'baseUri' must be provided to resolve relative url ${t}`);return n.substr(0,n.lastIndexOf("/")+1)+t}var ca={};lt(ca,{decode:()=>jg,name:()=>Vg});var Gg="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUU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pySQ8c8dfb8e8fHND8dBAGDBIBDyG+t+J83EBABCiJAND8dFAGDBIBDyE+t+J83EBABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",Ng=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]),Ug=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]),Pg={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Hg={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function ch(t,e,r,n,o,s="NONE"){let i=await kg();Qg(i,i.exports[Hg[o]],t,e,r,n,i.exports[Pg[s||"NONE"]])}var aa;async function kg(){return aa||(aa=Jg()),aa}async function Jg(){let t=Gg;WebAssembly.validate(Ng)&&(t=vg,console.log("Warning: meshopt_decoder is using experimental SIMD support"));let e=await WebAssembly.instantiate(zg(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function zg(t){let e=new Uint8Array(t.length);for(let n=0;n96?o-71:o>64?o-65:o>47?o+4:o>46?63:62}let r=0;for(let n=0;nXg,preprocess:()=>Zg});var kr="EXT_texture_webp",Xg=kr;function Zg(t,e){let r=new Q(t);if(!ji("image/webp")){if(r.getRequiredExtensions().includes(kr))throw new Error(`gltf: Required extension ${kr} not supported by browser`);return}let{json:n}=r;for(let o of n.textures||[]){let s=r.getObjectExtension(o,kr);s&&(o.source=s.source),r.removeObjectExtension(o,kr)}r.removeExtension(kr)}var la={};lt(la,{name:()=>Yg,preprocess:()=>Wg});var ts="KHR_texture_basisu",Yg=ts;function Wg(t,e){let r=new Q(t),{json:n}=r;for(let o of n.textures||[]){let s=r.getObjectExtension(o,ts);s&&(o.source=s.source,r.removeObjectExtension(o,ts))}r.removeExtension(ts)}var ua={};lt(ua,{decode:()=>rB,encode:()=>nB,name:()=>tB,preprocess:()=>eB});function fh(t){let e={};for(let r in t){let n=t[r];if(r!=="indices"){let o=ha(n);e[r]=o}}return e}function ha(t){let{buffer:e,size:r,count:n}=qg(t);return{value:e,size:r,byteOffset:0,count:n,type:Qo(r),componentType:we(e)}}function qg(t){let e=t,r=1,n=0;return t&&t.value&&(e=t.value,r=t.size||1),e&&(ArrayBuffer.isView(e)||(e=$g(e,Float32Array)),n=e.length/r),{buffer:e,size:r,count:n}}function $g(t,e,r=!1){return t?Array.isArray(t)?new e(t):r&&!(t instanceof e)?new e(t):t:null}var Ie="KHR_draco_mesh_compression",tB=Ie;function eB(t,e,r){let n=new Q(t);for(let o of lh(n))n.getObjectExtension(o,Ie)}async function rB(t,e,r){if(!e?.gltf?.decompressMeshes)return;let n=new Q(t),o=[];for(let s of lh(n))n.getObjectExtension(s,Ie)&&o.push(oB(n,s,e,r));await Promise.all(o),n.removeExtension(Ie)}function nB(t,e={}){let r=new Q(t);for(let n of r.json.meshes||[])sB(n,e),r.addRequiredExtension(Ie)}async function oB(t,e,r,n){let o=t.getObjectExtension(e,Ie);if(!o)return;let s=t.getTypedArrayForBufferView(o.bufferView),i=Pe(s.buffer,s.byteOffset),a={...r};delete a["3d-tiles"];let f=await Ut(i,Uo,a,n),c=fh(f.attributes);for(let[l,h]of Object.entries(c))if(l in e.attributes){let u=e.attributes[l],d=t.getAccessor(u);d?.min&&d?.max&&(h.min=d.min,h.max=d.max)}e.attributes=c,f.indices&&(e.indices=ha(f.indices)),t.removeObjectExtension(e,Ie),iB(e)}function sB(t,e,r=4,n,o){if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");let s=n.DracoWriter.encodeSync({attributes:t}),i=o?.parseSync?.({attributes:t}),a=n._addFauxAttributes(i.attributes),f=n.addBufferView(s);return{primitives:[{attributes:a,mode:r,extensions:{[Ie]:{bufferView:f,attributes:a}}}]}}function iB(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*lh(t){for(let e of t.json.meshes||[])for(let r of e.primitives)yield r}var da={};lt(da,{decode:()=>lB,name:()=>aB});var rs="KHR_texture_transform",aB=rs,es=new M,cB=new X,fB=new X;async function lB(t,e){if(!new Q(t).hasExtension(rs)||!e.gltf?.loadBuffers)return;let o=t.json.materials||[];for(let s=0;si===n&&a===o)!==-1)){let i=gB(r);return n!==o&&(t.texCoord=o),e.push([n,o]),{originalTexCoord:n,texCoord:o,matrix:i}}return null}function AB(t,e,r){let{originalTexCoord:n,texCoord:o,matrix:s}=r,i=e.attributes[`TEXCOORD_${n}`];if(Number.isFinite(i)){let a=t.json.accessors?.[i];if(a&&a.bufferView){let f=t.json.bufferViews?.[a.bufferView];if(f){let{arrayBuffer:c,byteOffset:l}=t.buffers[f.buffer],h=(l||0)+(a.byteOffset||0)+(f.byteOffset||0),{ArrayType:u,length:d}=Lr(a,f),A=zo[a.componentType],m=Jo[a.type],p=f.byteStride||A*m,E=new Float32Array(d);for(let y=0;yxB,encode:()=>EB,name:()=>BB});var Xe="KHR_lights_punctual",BB=Xe;async function xB(t){let e=new Q(t),{json:r}=e,n=e.getExtension(Xe);n&&(e.json.lights=n.lights,e.removeExtension(Xe));for(let o of r.nodes||[]){let s=e.getObjectExtension(o,Xe);s&&(o.light=s.light),e.removeObjectExtension(o,Xe)}}async function EB(t){let e=new Q(t),{json:r}=e;if(r.lights){let n=e.addExtension(Xe);ot(!n.lights),n.lights=r.lights,delete r.lights}if(e.json.lights){for(let n of e.json.lights){let o=n.node;e.addObjectExtension(o,Xe,n)}delete e.json.lights}}var ma={};lt(ma,{decode:()=>yB,encode:()=>CB,name:()=>_B});var Ln="KHR_materials_unlit",_B=Ln;async function yB(t){let e=new Q(t),{json:r}=e;for(let n of r.materials||[])n.extensions&&n.extensions.KHR_materials_unlit&&(n.unlit=!0),e.removeObjectExtension(n,Ln);e.removeExtension(Ln)}function CB(t){let e=new Q(t),{json:r}=e;if(e.materials)for(let n of r.materials||[])n.unlit&&(delete n.unlit,e.addObjectExtension(n,Ln,{}),e.addExtension(Ln))}var pa={};lt(pa,{decode:()=>bB,encode:()=>MB,name:()=>TB});var Gn="KHR_techniques_webgl",TB=Gn;async function bB(t){let e=new Q(t),{json:r}=e,n=e.getExtension(Gn);if(n){let o=wB(n,e);for(let s of r.materials||[]){let i=e.getObjectExtension(s,Gn);i&&(s.technique=Object.assign({},i,o[i.technique]),s.technique.values=IB(s.technique,e)),e.removeObjectExtension(s,Gn)}e.removeExtension(Gn)}}async function MB(t,e){}function wB(t,e){let{programs:r=[],shaders:n=[],techniques:o=[]}=t,s=new TextDecoder;return n.forEach(i=>{if(Number.isFinite(i.bufferView))i.code=s.decode(e.getTypedArrayForBufferView(i.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),r.forEach(i=>{i.fragmentShader=n[i.fragmentShader],i.vertexShader=n[i.vertexShader]}),o.forEach(i=>{i.program=r[i.program]}),o}function IB(t,e){let r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(n=>{t.uniforms[n].value&&!(n in r)&&(r[n]=t.uniforms[n].value)}),Object.keys(r).forEach(n=>{typeof r[n]=="object"&&r[n].index!==void 0&&(r[n].texture=e.getTexture(r[n].index))}),r}var hh=[Yi,Ki,ca,fa,la,ua,Aa,ma,pa,da,Wi];function uh(t,e={},r){let n=hh.filter(o=>Ah(o.name,e));for(let o of n)o.preprocess?.(t,e,r)}async function dh(t,e={},r){let n=hh.filter(o=>Ah(o.name,e));for(let o of n)await o.decode?.(t,e,r)}function Ah(t,e){let r=e?.gltf?.excludeExtensions||{};return!(t in r&&!r[t])}var ga="KHR_binary_glTF";function mh(t){let e=new Q(t),{json:r}=e;for(let n of r.images||[]){let o=e.getObjectExtension(n,ga);o&&Object.assign(n,o),e.removeObjectExtension(n,ga)}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension(ga)}var ph={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},FB={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},Ba=class{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,r){this.json=e.json;let n=e.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${n.asset.version}`);return}if(!r.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(n),this._convertTopLevelObjectsToArrays(n),mh(e),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_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(let r in ph)this._convertTopLevelObjectToArray(e,r)}_convertTopLevelObjectToArray(e,r){let n=e[r];if(!(!n||Array.isArray(n))){e[r]=[];for(let o in n){let s=n[o];s.id=s.id||o;let i=e[r].length;e[r].push(s),this.idToIndexMap[r][o]=i}}}_convertObjectIdsToArrayIndices(e){for(let r in ph)this._convertIdsToIndices(e,r);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(let r of e.textures)this._convertTextureIds(r);for(let r of e.meshes)this._convertMeshIds(r);for(let r of e.nodes)this._convertNodeIds(r);for(let r of e.scenes)this._convertSceneIds(r)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(let r of e.primitives){let{attributes:n,indices:o,material:s}=r;for(let i in n)n[i]=this._convertIdToIndex(n[i],"accessor");o&&(r.indices=this._convertIdToIndex(o,"accessor")),s&&(r.material=this._convertIdToIndex(s,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(r=>this._convertIdToIndex(r,"node"))),e.meshes&&(e.meshes=e.meshes.map(r=>this._convertIdToIndex(r,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(r=>this._convertIdToIndex(r,"node")))}_convertIdsToIndices(e,r){e[r]||(console.warn(`gltf v1: json doesn't contain attribute ${r}`),e[r]=[]);for(let n of e[r])for(let o in n){let s=n[o],i=this._convertIdToIndex(s,o);n[o]=i}}_convertIdToIndex(e,r){let n=FB[r];if(n in this.idToIndexMap){let o=this.idToIndexMap[n][e];if(!Number.isFinite(o))throw new Error(`gltf v1: failed to resolve ${r} with id ${e}`);return o}return e}_updateObjects(e){for(let r of this.json.buffers)delete r.type}_updateMaterial(e){for(let r of e.materials){r.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};let n=r.values?.tex||r.values?.texture2d_0||r.values?.diffuseTex,o=e.textures.findIndex(s=>s.id===n);o!==-1&&(r.pbrMetallicRoughness.baseColorTexture={index:o})}}};function gh(t,e={}){return new Ba().normalize(t,e)}async function Bh(t,e,r=0,n,o){return RB(t,e,r,n),gh(t,{normalize:n?.gltf?.normalize}),uh(t,n,o),n?.gltf?.loadBuffers&&t.json.buffers&&await DB(t,n,o),n?.gltf?.loadImages&&await OB(t,n,o),await dh(t,n,o),t}function RB(t,e,r,n){if(n.uri&&(t.baseUri=n.uri),e instanceof ArrayBuffer&&!ih(e,r,n)&&(e=new TextDecoder().decode(e)),typeof e=="string")t.json=Ns(e);else if(e instanceof ArrayBuffer){let i={};r=ah(i,e,r,n.glb),ot(i.type==="glTF",`Invalid GLB magic string ${i.type}`),t._glb=i,t.json=i.json}else ot(!1,"GLTF: must be ArrayBuffer or string");let o=t.json.buffers||[];if(t.buffers=new Array(o.length).fill(null),t._glb&&t._glb.header.hasBinChunk){let{binChunks:i}=t._glb;t.buffers[0]={arrayBuffer:i[0].arrayBuffer,byteOffset:i[0].byteOffset,byteLength:i[0].byteLength}}let s=t.json.images||[];t.images=new Array(s.length).fill({})}async function DB(t,e,r){let n=t.json.buffers||[];for(let o=0;othis._resolveBufferView(o,s))),e.images&&(n.images=e.images.map((o,s)=>this._resolveImage(o,s))),e.samplers&&(n.samplers=e.samplers.map((o,s)=>this._resolveSampler(o,s))),e.textures&&(n.textures=e.textures.map((o,s)=>this._resolveTexture(o,s))),e.accessors&&(n.accessors=e.accessors.map((o,s)=>this._resolveAccessor(o,s))),e.materials&&(n.materials=e.materials.map((o,s)=>this._resolveMaterial(o,s))),e.meshes&&(n.meshes=e.meshes.map((o,s)=>this._resolveMesh(o,s))),e.nodes&&(n.nodes=e.nodes.map((o,s)=>this._resolveNode(o,s)),n.nodes=n.nodes.map((o,s)=>this._resolveNodeChildren(o))),e.skins&&(n.skins=e.skins.map((o,s)=>this._resolveSkin(o,s))),e.scenes&&(n.scenes=e.scenes.map((o,s)=>this._resolveScene(o,s))),typeof this.json.scene=="number"&&n.scenes&&(n.scene=n.scenes[this.json.scene]),n}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,r){if(typeof r=="object")return r;let n=e&&e[r];return n||console.warn(`glTF file error: Could not find ${e}[${r}]`),n}_resolveScene(e,r){return{...e,id:e.id||`scene-${r}`,nodes:(e.nodes||[]).map(n=>this.getNode(n))}}_resolveNode(e,r){let n={...e,id:e?.id||`node-${r}`};return e.mesh!==void 0&&(n.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(n.camera=this.getCamera(e.camera)),e.skin!==void 0&&(n.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(n.mesh=e.meshes.reduce((o,s)=>{let i=this.getMesh(s);return o.id=i.id,o.primitives=o.primitives.concat(i.primitives),o},{primitives:[]})),n}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(r=>this.getNode(r))),e}_resolveSkin(e,r){let n=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${r}`,inverseBindMatrices:n}}_resolveMesh(e,r){let n={...e,id:e.id||`mesh-${r}`,primitives:[]};return e.primitives&&(n.primitives=e.primitives.map(o=>{let s={...o,attributes:{},indices:void 0,material:void 0},i=o.attributes;for(let a in i)s.attributes[a]=this.getAccessor(i[a]);return o.indices!==void 0&&(s.indices=this.getAccessor(o.indices)),o.material!==void 0&&(s.material=this.getMaterial(o.material)),s})),n}_resolveMaterial(e,r){let n={...e,id:e.id||`material-${r}`};if(n.normalTexture&&(n.normalTexture={...n.normalTexture},n.normalTexture.texture=this.getTexture(n.normalTexture.index)),n.occlusionTexture&&(n.occlusionTexture={...n.occlusionTexture},n.occlusionTexture.texture=this.getTexture(n.occlusionTexture.index)),n.emissiveTexture&&(n.emissiveTexture={...n.emissiveTexture},n.emissiveTexture.texture=this.getTexture(n.emissiveTexture.index)),n.emissiveFactor||(n.emissiveFactor=n.emissiveTexture?[1,1,1]:[0,0,0]),n.pbrMetallicRoughness){n.pbrMetallicRoughness={...n.pbrMetallicRoughness};let o=n.pbrMetallicRoughness;o.baseColorTexture&&(o.baseColorTexture={...o.baseColorTexture},o.baseColorTexture.texture=this.getTexture(o.baseColorTexture.index)),o.metallicRoughnessTexture&&(o.metallicRoughnessTexture={...o.metallicRoughnessTexture},o.metallicRoughnessTexture.texture=this.getTexture(o.metallicRoughnessTexture.index))}return n}_resolveAccessor(e,r){let n=JB(e.componentType),o=zB(e.type),s=n*o,i={...e,id:e.id||`accessor-${r}`,bytesPerComponent:n,components:o,bytesPerElement:s,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(i.bufferView=this.getBufferView(e.bufferView)),i.bufferView){let a=i.bufferView.buffer,{ArrayType:f,byteLength:c}=Lr(i,i.bufferView),l=(i.bufferView.byteOffset||0)+(i.byteOffset||0)+a.byteOffset,h=a.arrayBuffer.slice(l,l+c);i.bufferView.byteStride&&(h=this._getValueFromInterleavedBuffer(a,l,i.bufferView.byteStride,i.bytesPerElement,i.count)),i.value=new f(h)}return i}_getValueFromInterleavedBuffer(e,r,n,o,s){let i=new Uint8Array(s*o);for(let a=0;a12;){let a={shape:"tile3d"};t.tiles.push(a),r=await s(e,r,n,o,a)}return r}async function yh(t,e,r,n){if(t.rotateYtoZ=!0,t.gltfUpAxis=r?.["3d-tiles"]?.assetGltfUpAxis?r["3d-tiles"].assetGltfUpAxis:"Y",r?.["3d-tiles"]?.loadGLTF){if(!n)return e.byteLength;let o=await Ut(e,Ze,r,n);t.gltf=vn(o),t.gpuMemoryUsageInBytes=Dn(t.gltf)}else t.gltfArrayBuffer=e;return e.byteLength}async function Ea(t,e=0,r,n,o={shape:"tile3d"}){switch(o.byteOffset=e,o.type=ll(t,e),o.type){case xt.COMPOSITE:return await _h(o,t,e,r,n,Ea);case xt.BATCHED_3D_MODEL:return await xh(o,t,e,r,n);case xt.GLTF:return await yh(o,t,r,n);case xt.INSTANCED_3D_MODEL:return await Eh(o,t,e,r,n);case xt.POINT_CLOUD:return await Rl(o,t,e,r,n);default:throw new Error(`3DTileLoader: unknown type ${o.type}`)}}async function _a(t,e,r){if(new Uint32Array(t.slice(0,4))[0]!==1952609651)throw new Error("Wrong subtree file magic number");if(new Uint32Array(t.slice(4,8))[0]!==1)throw new Error("Wrong subtree file verson, must be 1");let s=Ch(t.slice(8,16)),i=new Uint8Array(t,24,s),f=new TextDecoder("utf8").decode(i),c=JSON.parse(f),l=Ch(t.slice(16,24)),h=new ArrayBuffer(0);if(l&&(h=t.slice(24+s)),await is(c,c.tileAvailability,h,r),Array.isArray(c.contentAvailability))for(let u of c.contentAvailability)await is(c,u,h,r);else await is(c,c.contentAvailability,h,r);return await is(c,c.childSubtreeAvailability,h,r),c}async function is(t,e,r,n){let o=Number.isFinite(e.bitstream)?e.bitstream:e.bufferView;if(typeof o!="number")return;let s=t.bufferViews[o],i=t.buffers[s.buffer];if(!n?.baseUrl)throw new Error("Url is not provided");if(!n.fetch)throw new Error("fetch is not provided");if(i.uri){let f=`${n?.baseUrl||""}/${i.uri}`,l=await(await n.fetch(f)).arrayBuffer();e.explicitBitstream=new Uint8Array(l,s.byteOffset,s.byteLength);return}let a=t.buffers.slice(0,s.buffer).reduce((f,c)=>f+c.byteLength,0);e.explicitBitstream=new Uint8Array(r.slice(a,a+i.byteLength),s.byteOffset,s.byteLength)}function Ch(t){let e=new DataView(t),r=e.getUint32(0,!0),n=e.getUint32(4,!0);return r+2**32*n}var Jr={dataType:null,batchType:null,id:"3d-tiles-subtree",name:"3D Tiles Subtree",module:"3d-tiles",version:Sr,extensions:["subtree"],mimeTypes:["application/octet-stream"],tests:["subtree"],parse:_a,options:{}};var Vh=dr(fn(),1);var kh=dr(fn(),1);var Ot=null;try{Ot=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function W(t,e,r){this.low=t|0,this.high=e|0,this.unsigned=!!r}W.prototype.__isLong__;Object.defineProperty(W.prototype,"__isLong__",{value:!0});function ut(t){return(t&&t.__isLong__)===!0}function Th(t){var e=Math.clz32(t&-t);return t?31-e:e}W.isLong=ut;var bh={},Mh={};function Ye(t,e){var r,n,o;return e?(t>>>=0,(o=0<=t&&t<256)&&(n=Mh[t],n)?n:(r=V(t,0,!0),o&&(Mh[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(n=bh[t],n)?n:(r=V(t,t<0?-1:0,!1),o&&(bh[t]=r),r))}W.fromInt=Ye;function Lt(t,e){if(isNaN(t))return e?he:kt;if(e){if(t<0)return he;if(t>=Fh)return Oh}else{if(t<=-Ih)return yt;if(t+1>=Ih)return Dh}return t<0?Lt(-t,e).neg():V(t%Qr|0,t/Qr|0,e)}W.fromNumber=Lt;function V(t,e,r){return new W(t,e,r)}W.fromBits=V;var as=Math.pow;function Ca(t,e,r){if(t.length===0)throw Error("empty string");if(typeof e=="number"?(r=e,e=!1):e=!!e,t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e?he:kt;if(r=r||10,r<2||360)throw Error("interior hyphen");if(n===0)return Ca(t.substring(1),e,r).neg();for(var o=Lt(as(r,8)),s=kt,i=0;i>>0:this.low};L.toNumber=function(){return this.unsigned?(this.high>>>0)*Qr+(this.low>>>0):this.high*Qr+(this.low>>>0)};L.toString=function(e){if(e=e||10,e<2||36>>0,l=c.toString(e);if(i=f,i.isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}};L.getHighBits=function(){return this.high};L.getHighBitsUnsigned=function(){return this.high>>>0};L.getLowBits=function(){return this.low};L.getLowBitsUnsigned=function(){return this.low>>>0};L.getNumBitsAbs=function(){if(this.isNegative())return this.eq(yt)?64:this.neg().getNumBitsAbs();for(var e=this.high!=0?this.high:this.low,r=31;r>0&&!(e&1<=0};L.isOdd=function(){return(this.low&1)===1};L.isEven=function(){return(this.low&1)===0};L.equals=function(e){return ut(e)||(e=Jt(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low};L.eq=L.equals;L.notEquals=function(e){return!this.eq(e)};L.neq=L.notEquals;L.ne=L.notEquals;L.lessThan=function(e){return this.comp(e)<0};L.lt=L.lessThan;L.lessThanOrEqual=function(e){return this.comp(e)<=0};L.lte=L.lessThanOrEqual;L.le=L.lessThanOrEqual;L.greaterThan=function(e){return this.comp(e)>0};L.gt=L.greaterThan;L.greaterThanOrEqual=function(e){return this.comp(e)>=0};L.gte=L.greaterThanOrEqual;L.ge=L.greaterThanOrEqual;L.compare=function(e){if(ut(e)||(e=Jt(e)),this.eq(e))return 0;var r=this.isNegative(),n=e.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1};L.comp=L.compare;L.negate=function(){return!this.unsigned&&this.eq(yt)?yt:this.not().add(zr)};L.neg=L.negate;L.add=function(e){ut(e)||(e=Jt(e));var r=this.high>>>16,n=this.high&65535,o=this.low>>>16,s=this.low&65535,i=e.high>>>16,a=e.high&65535,f=e.low>>>16,c=e.low&65535,l=0,h=0,u=0,d=0;return d+=s+c,u+=d>>>16,d&=65535,u+=o+f,h+=u>>>16,u&=65535,h+=n+a,l+=h>>>16,h&=65535,l+=r+i,l&=65535,V(u<<16|d,l<<16|h,this.unsigned)};L.subtract=function(e){return ut(e)||(e=Jt(e)),this.add(e.neg())};L.sub=L.subtract;L.multiply=function(e){if(this.isZero())return this;if(ut(e)||(e=Jt(e)),Ot){var r=Ot.mul(this.low,this.high,e.low,e.high);return V(r,Ot.get_high(),this.unsigned)}if(e.isZero())return this.unsigned?he:kt;if(this.eq(yt))return e.isOdd()?yt:kt;if(e.eq(yt))return this.isOdd()?yt:kt;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(Sh)&&e.lt(Sh))return Lt(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=this.high&65535,s=this.low>>>16,i=this.low&65535,a=e.high>>>16,f=e.high&65535,c=e.low>>>16,l=e.low&65535,h=0,u=0,d=0,A=0;return A+=i*l,d+=A>>>16,A&=65535,d+=s*l,u+=d>>>16,d&=65535,d+=i*c,u+=d>>>16,d&=65535,u+=o*l,h+=u>>>16,u&=65535,u+=s*c,h+=u>>>16,u&=65535,u+=i*f,h+=u>>>16,u&=65535,h+=n*l+o*c+s*f+i*a,h&=65535,V(d<<16|A,h<<16|u,this.unsigned)};L.mul=L.multiply;L.divide=function(e){if(ut(e)||(e=Jt(e)),e.isZero())throw Error("division by zero");if(Ot){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?Ot.div_u:Ot.div_s)(this.low,this.high,e.low,e.high);return V(r,Ot.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?he:kt;var n,o,s;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return he;if(e.gt(this.shru(1)))return Rh;s=he}else{if(this.eq(yt)){if(e.eq(zr)||e.eq(ya))return yt;if(e.eq(yt))return zr;var i=this.shr(1);return n=i.div(e).shl(1),n.eq(kt)?e.isNegative()?zr:ya:(o=this.sub(e.mul(n)),s=n.add(o.div(e)),s)}else if(e.eq(yt))return this.unsigned?he:kt;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();s=kt}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),f=a<=48?1:as(2,a-48),c=Lt(n),l=c.mul(e);l.isNegative()||l.gt(o);)n-=f,c=Lt(n,this.unsigned),l=c.mul(e);c.isZero()&&(c=zr),s=s.add(c),o=o.sub(l)}return s};L.div=L.divide;L.modulo=function(e){if(ut(e)||(e=Jt(e)),Ot){var r=(this.unsigned?Ot.rem_u:Ot.rem_s)(this.low,this.high,e.low,e.high);return V(r,Ot.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))};L.mod=L.modulo;L.rem=L.modulo;L.not=function(){return V(~this.low,~this.high,this.unsigned)};L.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};L.clz=L.countLeadingZeros;L.countTrailingZeros=function(){return this.low?Th(this.low):Th(this.high)+32};L.ctz=L.countTrailingZeros;L.and=function(e){return ut(e)||(e=Jt(e)),V(this.low&e.low,this.high&e.high,this.unsigned)};L.or=function(e){return ut(e)||(e=Jt(e)),V(this.low|e.low,this.high|e.high,this.unsigned)};L.xor=function(e){return ut(e)||(e=Jt(e)),V(this.low^e.low,this.high^e.high,this.unsigned)};L.shiftLeft=function(e){return ut(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?V(this.low<>>32-e,this.unsigned):V(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):V(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};L.shr=L.shiftRight;L.shiftRightUnsigned=function(e){return ut(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?V(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):e===32?V(this.high,0,this.unsigned):V(this.high>>>e-32,0,this.unsigned)};L.shru=L.shiftRightUnsigned;L.shr_u=L.shiftRightUnsigned;L.rotateLeft=function(e){var r;return ut(e)&&(e=e.toInt()),(e&=63)===0?this:e===32?V(this.high,this.low,this.unsigned):e<32?(r=32-e,V(this.low<>>r,this.high<>>r,this.unsigned)):(e-=32,r=32-e,V(this.high<>>r,this.low<>>r,this.unsigned))};L.rotl=L.rotateLeft;L.rotateRight=function(e){var r;return ut(e)&&(e=e.toInt()),(e&=63)===0?this:e===32?V(this.high,this.low,this.unsigned):e<32?(r=32-e,V(this.high<>>e,this.low<>>e,this.unsigned)):(e-=32,r=32-e,V(this.low<>>e,this.high<>>e,this.unsigned))};L.rotr=L.rotateRight;L.toSigned=function(){return this.unsigned?V(this.low,this.high,!1):this};L.toUnsigned=function(){return this.unsigned?this:V(this.low,this.high,!0)};L.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()};L.toBytesLE=function(){var e=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};L.toBytesBE=function(){var e=this.high,r=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};W.fromBytes=function(e,r,n){return n?W.fromBytesLE(e,r):W.fromBytesBE(e,r)};W.fromBytesLE=function(e,r){return new W(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r)};W.fromBytesBE=function(e,r){return new W(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],r)};var Vr=W;var ZB=16;function Nn(t){t==="X"&&(t="");let e=t.padEnd(ZB,"0");return Vr.fromString(e,!0,16)}function Ta(t){if(t.isZero())return"X";let e=t.countTrailingZeros(),r=e%4;e=(e-r)/4;let n=e;e*=4;let s=t.shiftRightUnsigned(e).toString(16).replace(/0+$/,"");return Array(17-n-s.length).join("0")+s}function ba(t,e){let r=YB(t).shiftRightUnsigned(2);return t.add(Vr.fromNumber(2*e+1-4).multiply(r))}function YB(t){return t.and(t.not().add(1))}var WB=3,qB=30,$B=2*qB+1,Lh=180/Math.PI;function vh(t){if(t.length===0)throw new Error(`Invalid Hilbert quad key ${t}`);let e=t.split("/"),r=parseInt(e[0],10),n=e[1],o=n.length,s=0,i=[0,0];for(let a=o-1;a>=0;a--){s=o-a;let f=n[a],c=0,l=0;f==="1"?l=1:f==="2"?(c=1,l=1):f==="3"&&(c=1);let h=Math.pow(2,s-1);tx(h,i,c,l),i[0]+=h*c,i[1]+=h*l}if(r%2===1){let a=i[0];i[0]=i[1],i[1]=a}return{face:r,ij:i,level:s}}function Nh(t){if(t.isZero())return"";let e=t.toString(2);for(;e.length=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function wa(t){return[Gh(t[0]),Gh(t[1])]}function Ia(t,[e,r]){switch(t){case 0:return[1,e,r];case 1:return[-e,1,r];case 2:return[-e,-r,1];case 3:return[-1,-r,-e];case 4:return[r,-1,-e];case 5:return[r,e,-1];default:throw new Error("Invalid face")}}function Sa([t,e,r]){let n=Math.atan2(r,Math.sqrt(t*t+e*e));return[Math.atan2(e,t)*Lh,n*Lh]}function tx(t,e,r,n){if(n===0){r===1&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);let o=e[0];e[0]=e[1],e[1]=o}}function Uh(t){let e=Ma(t.ij,t.level,[.5,.5]),r=wa(e),n=Ia(t.face,r);return Sa(n)}var ex=100;function Fa(t){let{face:e,ij:r,level:n}=t,o=[[0,0],[0,1],[1,1],[1,0],[0,0]],s=Math.max(1,Math.ceil(ex*Math.pow(2,-n))),i=new Float64Array(4*s*2+2),a=0,f=0;for(let c=0;c<4;c++){let l=o[c].slice(0),h=o[c+1],u=(h[0]-l[0])/s,d=(h[1]-l[1])/s;for(let A=0;A89.999&&(y[0]=f);let T=y[0]-f;y[0]+=T>180?-360:T<-180?360:0,i[a++]=y[0],i[a++]=y[1],f=y[0]}}return i[a++]=i[0],i[a++]=i[1],i}function jr(t){let e=rx(t);return vh(e)}function rx(t){if(t.indexOf("/")>0)return t;let e=Nn(t);return Nh(e)}function Ra(t){let e=jr(t);return Uh(e)}function Hh(t){let e;if(t.face===2||t.face===5){let r=null,n=0;for(let o=0;o<4;o++){let s=`${t.face}/${o}`,i=jr(s),a=Fa(i);(typeof r>"u"||r===null)&&(r=new Float64Array(4*a.length)),r.set(a,n),n+=a.length}e=Ph(r)}else{let r=Fa(t);e=Ph(r)}return e}function Ph(t){if(t.length%2!==0)throw new Error("Invalid corners");let e=[],r=[];for(let n=0;nn-o),r.sort((n,o)=>n-o),{west:e[0],east:e[e.length-1],north:r[r.length-1],south:r[0]}}function Da(t,e){let r=e?.minimumHeight||0,n=e?.maximumHeight||0,o=jr(t),s=Hh(o),i=s.west,a=s.south,f=s.east,c=s.north,l=[];return l.push(new M(i,c,r)),l.push(new M(f,c,r)),l.push(new M(f,a,r)),l.push(new M(i,a,r)),l.push(new M(i,c,n)),l.push(new M(f,c,n)),l.push(new M(f,a,n)),l.push(new M(i,a,n)),l}function cs(t){let e=t.token,r={minimumHeight:t.minimumHeight,maximumHeight:t.maximumHeight},n=Da(e,r),o=Ra(e),s=o[0],i=o[1],a=ie.WGS84.cartographicToCartesian([s,i,r.maximumHeight]),f=new M(a[0],a[1],a[2]);n.push(f);let c=Ii(n);return[...c.center,...c.halfAxes]}var nx=4,ox=8,sx={QUADTREE:nx,OCTREE:ox};function ix(t,e,r){if(t?.box){let n=Nn(t.s2VolumeInfo.token),o=ba(n,e),s=Ta(o),i={...t.s2VolumeInfo};switch(i.token=s,r){case"OCTREE":let c=t.s2VolumeInfo,l=c.maximumHeight-c.minimumHeight,h=l/2,u=c.minimumHeight+l/2;c.minimumHeight=u-h,c.maximumHeight=u+h;break;default:break}return{box:cs(i),s2VolumeInfo:i}}}async function La(t){let{subtree:e,subtreeData:r={level:0,x:0,y:0,z:0},parentData:n={mortonIndex:0,localLevel:-1,localX:0,localY:0,localZ:0},childIndex:o=0,implicitOptions:s,loaderOptions:i,s2VolumeBox:a}=t,{subdivisionScheme:f,subtreeLevels:c,maximumLevel:l,contentUrlTemplate:h,subtreesUriTemplate:u,basePath:d}=s,A={children:[],lodMetricValue:0,contentUrl:""};if(!l)return Ls.once(`Missing 'maximumLevel' or 'availableLevels' property. The subtree ${h} won't be loaded...`),A;let m=n.localLevel+1,p=r.level+m;if(p>l)return A;let E=sx[f],y=Math.log2(E),T=o&1,b=o>>1&1,C=o>>2&1,w=We(n.localX,T,1),I=We(n.localY,b,1),O=We(n.localZ,C,1),B=We(r.x,w,m),g=We(r.y,I,m),x=We(r.z,O,m),_=We(n.mortonIndex,o,y),U=m===c&&Oa(e.childSubtreeAvailability,_),N,P,G,tt;if(U){let oe=`${d}/${u}`,an=fs(oe,p,B,g,x);N=await(0,kh.load)(an,Jr,i),tt=0,P={level:p,x:B,y:g,z:x},G={mortonIndex:0,localLevel:0,localX:0,localY:0,localZ:0}}else N=e,tt=(E**m-1)/(E-1)+_,P=r,G={mortonIndex:_,localLevel:m,localX:w,localY:I,localZ:O};if(!Oa(N.tileAvailability,tt))return A;Oa(N.contentAvailability,tt)&&(A.contentUrl=fs(h,p,B,g,x));for(let oe=0;oe1&&Ls.once('Not supported extension "3DTILES_multiple_contents" has been detected')):r=t,"constant"in r?Boolean(r.constant):r.explicitBitstream?lx(e,r.explicitBitstream):!1}function ax(t,e,r,n){let{basePath:o,refine:s,getRefine:i,lodMetricType:a,getTileType:f,rootLodMetricValue:c,rootBoundingVolume:l}=r,h=t.contentUrl&&t.contentUrl.replace(`${o}/`,""),u=c/2**e.level,d=n?.box?{box:n.box}:l,A=cx(d,e,r.subdivisionScheme);return{children:t.children,contentUrl:t.contentUrl,content:{uri:h},id:t.contentUrl,refine:i(s),type:f(t),lodMetricType:a,lodMetricValue:u,geometricError:u,transform:t.transform,boundingVolume:A}}function cx(t,e,r){if(t.region){let{level:n,x:o,y:s,z:i}=e,[a,f,c,l,h,u]=t.region,d=2**n,A=(c-a)/d,[m,p]=[a+A*o,a+A*(o+1)],E=(l-f)/d,[y,T]=[f+E*s,f+E*(s+1)],b,C;if(r==="OCTREE"){let w=(u-h)/d;[b,C]=[h+w*i,h+w*(i+1)]}else[b,C]=[h,u];return{region:[m,y,p,T,b,C]}}if(t.box)return t;throw new Error(`Unsupported bounding volume type ${JSON.stringify(t)}`)}function We(t,e,r){return(t<s[i])}function fx(t){let e={};for(let r in t)e[`{${r}}`]=t[r];return e}function lx(t,e){let r=Math.floor(t/8),n=t%8;return(e[r]>>n&1)===1}function va(t,e=""){if(!e)return Te.EMPTY;let n=e.split("?")[0].split(".").pop();switch(n){case"pnts":return Te.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return Te.SCENEGRAPH;default:return n||Te.EMPTY}}function Na(t){switch(t){case"REPLACE":case"replace":return Ir.REPLACE;case"ADD":case"add":return Ir.ADD;default:return t}}function Ga(t,e){if(/^[a-z][0-9a-z+.-]*:/i.test(e)){let n=new URL(t,`${e}/`);return decodeURI(n.toString())}else if(t.startsWith("/"))return t;return _r.resolve(e,t)}function Jh(t,e){if(!t)return null;let r;if(t.content){let o=t.content.uri||t.content?.url;typeof o<"u"&&(r=Ga(o,e))}return{...t,id:r,contentUrl:r,lodMetricType:fe.GEOMETRIC_ERROR,lodMetricValue:t.geometricError,transformMatrix:t.transform,type:va(t,r),refine:Na(t.refine)}}async function jh(t,e,r){let n=null,o=Qh(t.root);o&&t.root?n=await zh(t.root,t,e,o,r):n=Jh(t.root,e);let s=[];for(s.push(n);s.length>0;){let i=s.pop()||{},a=i.children||[],f=[];for(let c of a){let l=Qh(c),h;l?h=await zh(c,t,e,l,r):h=Jh(c,e),h&&(f.push(h),s.push(h))}i.children=f}return n}async function zh(t,e,r,n,o){let{subdivisionScheme:s,maximumLevel:i,availableLevels:a,subtreeLevels:f,subtrees:{uri:c}}=n,l=fs(c,0,0,0,0),h=Ga(l,r),u=await(0,Vh.load)(h,Jr,o),d=t.content?.uri,A=d?Ga(d,r):"",m=e?.root?.refine,p=t.geometricError,E=t.boundingVolume.extensions?.["3DTILES_bounding_volume_S2"];if(E){let C={box:cs(E),s2VolumeInfo:E};t.boundingVolume=C}let y=t.boundingVolume,T={contentUrlTemplate:A,subtreesUriTemplate:c,subdivisionScheme:s,subtreeLevels:f,maximumLevel:Number.isFinite(a)?a-1:i,refine:m,basePath:r,lodMetricType:fe.GEOMETRIC_ERROR,rootLodMetricValue:p,rootBoundingVolume:y,getTileType:va,getRefine:Na};return await hx(t,r,u,T,o)}async function hx(t,e,r,n,o){if(!t)return null;let{children:s,contentUrl:i}=await La({subtree:r,implicitOptions:n,loaderOptions:o}),a,f=null;return i&&(a=i,f={uri:i.replace(`${e}/`,"")}),{...t,id:a,contentUrl:a,lodMetricType:fe.GEOMETRIC_ERROR,lodMetricValue:t.geometricError,transformMatrix:t.transform,type:va(t,a),refine:Na(t.refine),content:f||t.content,children:s}}function Qh(t){return t?.extensions?.["3DTILES_implicit_tiling"]||t?.implicitTiling}var qe={dataType:null,batchType:null,id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:Sr,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:ux,options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};async function ux(t,e={},r){let n=e["3d-tiles"]||{},o;return n.isTileset==="auto"?o=r?.url&&r.url.indexOf(".json")!==-1:o=n.isTileset,o?dx(t,e,r):Ax(t,e,r)}async function dx(t,e,r){let n=JSON.parse(new TextDecoder().decode(t)),o=r?.url||"",s=mx(o),i=await jh(n,s,e||{});return{...n,shape:"tileset3d",loader:qe,url:o,queryString:r?.queryString||"",basePath:s,root:i||n.root,type:wn.TILES3D,lodMetricType:fe.GEOMETRIC_ERROR,lodMetricValue:n.root?.geometricError||0}}async function Ax(t,e,r){let n={content:{shape:"tile3d",featureIds:null}};return await Ea(t,0,e,r,n.content),n.content}function mx(t){return _r.dirname(t)}var ls=dr(fn(),1);var Kh="https://api.cesium.com/v1/assets";async function hs(t,e){if(!e){let s=await px(t);for(let i of s.items)i.type==="3DTILES"&&(e=i.id)}let r=await gx(t,e),{type:n,url:o}=r;return z(n==="3DTILES"&&o),r.headers={Authorization:`Bearer ${r.accessToken}`},r}async function px(t){z(t);let e=Kh,r={Authorization:`Bearer ${t}`},n=await(0,ls.fetchFile)(e,{headers:r});if(!n.ok)throw new Error(n.statusText);return await n.json()}async function gx(t,e){z(t,e);let r={Authorization:`Bearer ${t}`},n=`${Kh}/${e}`,o=await(0,ls.fetchFile)(`${n}`,{headers:r});if(!o.ok)throw new Error(o.statusText);let s=await o.json();if(o=await(0,ls.fetchFile)(`${n}/endpoint`,{headers:r}),!o.ok)throw new Error(o.statusText);let i=await o.json();return s={...s,...i},s}async function Bx(t,e={}){e=e["cesium-ion"]||{};let{accessToken:r}=e,n=e.assetId;if(!Number.isFinite(n)){let o=t.match(/\/([0-9]+)\/tileset.json/);n=o&&o[1]}return hs(r,n)}var Ua={...qe,id:"cesium-ion",name:"Cesium Ion",preload:Bx,parse:async(t,e,r)=>(e={...e},e["3d-tiles"]=e["cesium-ion"],e.loader=Ua,qe.parse(t,e,r)),options:{"cesium-ion":{...qe.options["3d-tiles"],accessToken:null}}};var Un=async(t,e)=>{let r=[await t.getUint8(t.length-1n),await t.getUint8(t.length-2n),await t.getUint8(t.length-3n),void 0],n=-1,o=t.length-4n;do{let s=o;o-=BigInt(1024),o=o>=0n?o:0n;let i=new Uint8Array(await t.slice(o,s));for(let a=i.length-1;a>-1;a--)if(r[3]=r[2],r[2]=r[1],r[1]=r[0],r[0]=i[a],r.every((f,c)=>f===e[c])){n=a;break}}while(n===-1&&o>0n);return o+BigInt(n)};var Xh=new Uint8Array([80,75,5,6]),Zh=new Uint8Array([80,75,6,7]),Yh=new Uint8Array([80,75,6,6]),xx=8n;var Ex=12n,_x=16n;var yx=8n,Cx=24n;var Tx=40n,bx=48n;var Wh=async t=>{let e=await Un(t,Xh),r=BigInt(await t.getUint16(e+xx)),n=BigInt(await t.getUint32(e+Ex)),o=BigInt(await t.getUint32(e+_x)),s=e-20n,i=0n,a=await t.slice(s,s+4n);if(ge(a,Zh)){i=await t.getBigUint64(s+yx);let f=await t.slice(i,i+4n);if(!ge(f,Yh.buffer))throw new Error("zip64 EoCD not found");r=await t.getBigUint64(i+Cx),n=await t.getBigUint64(i+Tx),o=await t.getBigUint64(i+bx)}else s=0n;return{cdRecordsNumber:r,cdStartOffset:o,cdByteSize:n,offsets:{zip64EoCDOffset:i,zip64EoCDLocatorOffset:s,zipEoCDOffset:e}}};var RF=[{offset:0,size:4,default:new DataView(Xh.buffer).getUint32(0,!0)},{offset:4,size:2,default:0},{offset:6,size:2,default:0},{offset:8,size:2,name:"recordsNumber"},{offset:10,size:2,name:"recordsNumber"},{offset:12,size:4,name:"cdSize"},{offset:16,size:4,name:"cdOffset"},{offset:20,size:2,default:0}];var DF=[{offset:0,size:4,default:new DataView(Zh.buffer).getUint32(0,!0)},{offset:4,size:4,default:0},{offset:8,size:8,name:"eoCDStart"},{offset:16,size:4,default:1}],OF=[{offset:0,size:4,default:new DataView(Yh.buffer).getUint32(0,!0)},{offset:4,size:8,default:44},{offset:12,size:2,default:45},{offset:14,size:2,default:45},{offset:16,size:4,default:0},{offset:20,size:4,default:0},{offset:24,size:8,name:"recordsNumber"},{offset:32,size:8,name:"recordsNumber"},{offset:40,size:8,name:"cdSize"},{offset:48,size:8,name:"cdOffset"}];var Mx=20,wx=24,Ix=28,Sx=30,Fx=32,Rx=42,us=46n,Hn=new Uint8Array([80,75,1,2]),Pn=async(t,e)=>{if(t>=e.length)return null;let r=new DataView(await e.slice(t,t+us)),n=r.buffer.slice(0,4);if(!ge(n,Hn.buffer))return null;let o=BigInt(r.getUint32(Mx,!0)),s=BigInt(r.getUint32(wx,!0)),i=r.getUint16(Sx,!0),a=BigInt(r.getUint16(Fx,!0)),f=r.getUint16(Ix,!0),c=await e.slice(t+us,t+us+BigInt(f+i)),l=c.slice(0,f),h=new TextDecoder().decode(l),u=t+us+BigInt(f),d=r.getUint32(Rx,!0),A=BigInt(d),m=new DataView(c.slice(f,c.byteLength)),p={uncompressedSize:s,compressedSize:o,localHeaderOffset:A,startDisk:a},E=Dx(p,m);return{...p,...E,extraFieldLength:i,fileNameLength:f,fileName:h,extraOffset:u}};async function*Kr(t){let{cdStartOffset:e,cdByteSize:r}=await Wh(t),n=new He(new DataView(await t.slice(e,e+r))),o=await Pn(0n,n);for(;o;)yield o,o=await Pn(o.extraOffset+BigInt(o.extraFieldLength),n)}var qh=(...t)=>t[0]+t[1]*16,Dx=(t,e)=>{let r=Ox(t),n={};if(r.length>0){let o=r.reduce((a,f)=>a+f.length,0),s=new Uint8Array(e.buffer).findIndex((a,f,c)=>qh(c[f],c[f+1])===1&&qh(c[f+2],c[f+3])===o),i=0;for(let a of r){let f=i;n[a.name]=e.getBigUint64(s+4+f,!0),i=f+a.length}}return n},Ox=t=>{let e=[];return t.uncompressedSize===BigInt(4294967295)&&e.push({name:"uncompressedSize",length:8}),t.compressedSize===BigInt(4294967295)&&e.push({name:"compressedSize",length:8}),t.localHeaderOffset===BigInt(4294967295)&&e.push({name:"localHeaderOffset",length:8}),t.startDisk===BigInt(4294967295)&&e.push({name:"startDisk",length:4}),e};var NF=[{offset:0,size:4,default:new DataView(Hn.buffer).getUint32(0,!0)},{offset:4,size:2,default:45},{offset:6,size:2,default:45},{offset:8,size:2,default:0},{offset:10,size:2,default:0},{offset:12,size:2,default:0},{offset:14,size:2,default:0},{offset:16,size:4,name:"crc32"},{offset:20,size:4,name:"length"},{offset:24,size:4,name:"length"},{offset:28,size:2,name:"fnlength"},{offset:30,size:2,default:0,name:"extraLength"},{offset:32,size:2,default:0},{offset:34,size:2,default:0},{offset:36,size:2,default:0},{offset:38,size:4,default:0},{offset:42,size:4,name:"offset"}];var Lx=8,Gx=18,vx=22,Nx=26,Ux=28,ds=30n,Pa=new Uint8Array([80,75,3,4]),$e=async(t,e)=>{let r=new DataView(await e.slice(t,t+ds)),n=r.buffer.slice(0,4);if(!ge(n,Pa))return null;let o=r.getUint16(Nx,!0),s=r.getUint16(Ux,!0),i=await e.slice(t+ds,t+ds+BigInt(o+s)),a=i.slice(0,o),f=new DataView(i.slice(o,i.byteLength)),c=new TextDecoder().decode(a).split("\\").join("/"),l=t+ds+BigInt(o+s),h=r.getUint16(Lx,!0),u=BigInt(r.getUint32(Gx,!0)),d=BigInt(r.getUint32(vx,!0)),A=4;return d===BigInt(4294967295)&&(d=f.getBigUint64(A,!0),A+=8),u===BigInt(4294967295)&&(u=f.getBigUint64(A,!0),A+=8),l===BigInt(4294967295)&&(l=f.getBigUint64(A,!0)),{fileNameLength:o,fileName:c,extraFieldLength:s,fileDataOffset:l,compressedSize:u,compressionMethod:h}};var HF=[{offset:0,size:4,default:new DataView(Pa.buffer).getUint32(0,!0)},{offset:4,size:2,default:45},{offset:6,size:2,default:0},{offset:8,size:2,default:0},{offset:10,size:2,default:0},{offset:12,size:2,default:0},{offset:14,size:4,name:"crc32"},{offset:18,size:4,name:"length"},{offset:22,size:4,name:"length"},{offset:26,size:2,name:"fnlength"},{offset:28,size:2,default:0,name:"extraLength"}];var As=class{constructor(e={}){this.hashBatches=this.hashBatches.bind(this)}async preload(){}async*hashBatches(e,r="base64"){let n=[];for await(let i of e)n.push(i),yield i;let o=await this.concatenate(n),s=await this.hash(o,r);this.options.crypto?.onEnd?.({hash:s})}async concatenate(e){return await An(e)}};function $h(t){t=`${t}`;for(let r=0;r255)return null;let e="";for(let r=0;r>2,n[1]=(t.charCodeAt(r)&3)<<4,t.length>r+1&&(n[1]|=t.charCodeAt(r+1)>>4,n[2]=(t.charCodeAt(r+1)&15)<<2),t.length>r+2&&(n[2]|=t.charCodeAt(r+2)>>6,n[3]=t.charCodeAt(r+2)&63);for(let o=0;o"u"?e+="=":e+=Px(n[o])}return e}function Px(t){if(t<26)return String.fromCharCode(t+"A".charCodeAt(0));if(t<52)return String.fromCharCode(t-26+"a".charCodeAt(0));if(t<62)return String.fromCharCode(t-52+"0".charCodeAt(0));if(t===62)return"+";if(t===63)return"/"}function tu(t,e){switch(e){case"hex":return t;case"base64":return Hx(t);default:throw new Error(e)}}function Hx(t){t.length%2!==0&&(t=`0${t}`);let r=(t.match(/\w{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("");return $h(r)||""}var ru=typeof atob=="function"?atob:typeof Buffer=="function"?Kx:ou,kx=ru("AGFzbQEAAAABDANgAX8AYAAAYAABfwIeAgdpbXBvcnRzA2xvZwAAB2ltcG9ydHMDbWVtAgABAzIxAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAgICAgIAAAAAAAaYARt/AUGBxpS6Bgt/AUGJ17b+fgt/AUH+uevFeQt/AUH2qMmBAQt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAA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dWFGdWxsRCgEZ2V0QSkEZ2V0QioEZ2V0QysEZ2V0RCwEZ2V0WC0Ec2V0QS4Ec2V0Qi8Ec2V0QzAEc2V0RDEEc2V0WALNATIAAQAAAQIAAAEIbnVtbG9vcHMCAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgCAAABAW4ZAgAAAQFuGgIAAAEBbhsCAAABAW4cAgAAAQFuHQIAAAEBbh4CAAABAW4fAgAAAQFuIAIAAAEBbiECAAABAW4iAgAAAQFuIwIAAAEBbiQCAAABAW4lAgAAAQFuJgIAAAEBbicCAAABAW4oACkAKgArACwALQEAAC4BAAAvAQAAMAEAADEBAAA="),Ha=WebAssembly&&ru!==ou?jx(kx).buffer:!1,qt=Xx(),ka=240*16*16,nu=Math.floor(ka*16*1.066666667),Jx=268435456-65536,eu="Parameter must be Buffer, ArrayBuffer or Uint8Array",zx="Parameter exceeds max size of 255.9 Mbytes";Ha||console.log("WebAssembly not available or WASM module could not be decoded; md5WASM will fall back to JavaScript");function Ja(t){var e,r,n,o,s,i,a,f,c,l;let h=Vx(),u=Qx(),d={},A=new Date().getTime();return d.then=function(y){return a=y,p(),d},d.catch=function(y){return f=y,d},t&&typeof t=="object"?typeof Buffer=="function"&&t.constructor===Buffer?i=t:t.constructor===Uint8Array||t.constructor===ArrayBuffer?i=t.constructor===ArrayBuffer?new Uint8Array(t):t:E(new TypeError(eu)):E(new TypeError(eu)),i&&(s=i.length,Ha&&s>nu?s>Jx?E(new Error(zx)):(e=new WebAssembly.Memory({initial:s>32e6?s>64e6?s>128e6?4096:2048:1024:512}),r=new Uint32Array(e.buffer),o={mem:e,log:console.log},n={imports:o},WebAssembly.instantiate(Ha,n).then(m)):p(h(i))),d;function m(y){p(u(i,y.instance.exports,r))}function p(y){var T=Boolean(y)?y:c;Boolean(y)&&(l=new Date().getTime()),typeof a=="function"?Boolean(T)&&(a(T,l-A),a=f=null):Boolean(y)&&(c=y)}function E(y){typeof f=="function"&&f(y)}}function Qx(){var t,e,r,n,o,s,i,a,f,c,l,h,u,d=function(A){var m,p,E,y,T,b,C,w,I,O,B,g,x,_,U,N,P,G,tt,pt,Y,oe,an=new Date().getTime(),ur=0,S=1732584193,F=-271733879,R=-1732584194,D=271733878,et=0,cn=A.length*8,so;for(so=e0(A,u),u[cn>>>5]|=128<>>9<<4)+14]=cn,so=(cn+64>>>9<<4)+15,Y=u;etet+nu?(n(S),s(F),a(R),c(D),e(ka),et=et+ka*16,S=r(),F=o(),R=i(),D=f(),ur++):(P=S,G=F,tt=R,pt=D,m=Y[et+0]>>>0,p=Y[et+1]>>>0,E=Y[et+2]>>>0,y=Y[et+3]>>>0,T=Y[et+4]>>>0,b=Y[et+5]>>>0,C=Y[et+6]>>>0,w=Y[et+7]>>>0,I=Y[et+8]>>>0,O=Y[et+9]>>>0,B=Y[et+10]>>>0,g=Y[et+11]>>>0,x=Y[et+12]>>>0,_=Y[et+13]>>>0,U=Y[et+14]>>>0,N=Y[et+15]>>>0,S=v(7,25,S+(F&R|~F&D)+m-680876936)+F,D=v(12,20,D+(S&F|~S&R)+p-389564586)+S,R=v(17,15,R+(D&S|~D&F)+E+606105819)+D,F=v(22,10,F+(R&D|~R&S)+y-1044525330)+R,S=v(7,25,S+(F&R|~F&D)+T-176418897)+F,D=v(12,20,D+(S&F|~S&R)+b+1200080426)+S,R=v(17,15,R+(D&S|~D&F)+C-1473231341)+D,F=v(22,10,F+(R&D|~R&S)+w-45705983)+R,S=v(7,25,S+(F&R|~F&D)+I+1770035416)+F,D=v(12,20,D+(S&F|~S&R)+O-1958414417)+S,R=v(17,15,R+(D&S|~D&F)+B-42063)+D,F=v(22,10,F+(R&D|~R&S)+g-1990404162)+R,S=v(7,25,S+(F&R|~F&D)+x+1804603682)+F,D=v(12,20,D+(S&F|~S&R)+_-40341101)+S,R=v(17,15,R+(D&S|~D&F)+U-1502002290)+D,F=v(22,10,F+(R&D|~R&S)+N+1236535329)+R,S=v(5,27,S+(F&D|R&~D)+p-165796510)+F,D=v(9,23,D+(S&R|F&~R)+C-1069501632)+S,R=v(14,18,R+(D&F|S&~F)+g+643717713)+D,F=v(20,12,F+(R&S|D&~S)+m-373897302)+R,S=v(5,27,S+(F&D|R&~D)+b-701558691)+F,D=v(9,23,D+(S&R|F&~R)+B+38016083)+S,R=v(14,18,R+(D&F|S&~F)+N-660478335)+D,F=v(20,12,F+(R&S|D&~S)+T-405537848)+R,S=v(5,27,S+(F&D|R&~D)+O+568446438)+F,D=v(9,23,D+(S&R|F&~R)+U-1019803690)+S,R=v(14,18,R+(D&F|S&~F)+y-187363961)+D,F=v(20,12,F+(R&S|D&~S)+I+1163531501)+R,S=v(5,27,S+(F&D|R&~D)+_-1444681467)+F,D=v(9,23,D+(S&R|F&~R)+E-51403784)+S,R=v(14,18,R+(D&F|S&~F)+w+1735328473)+D,F=v(20,12,F+(R&S|D&~S)+x-1926607734)+R,S=v(4,28,S+(F^R^D)+b-378558)+F,D=v(11,21,D+(S^F^R)+I-2022574463)+S,R=v(16,16,R+(D^S^F)+g+1839030562)+D,F=v(23,9,F+(R^D^S)+U-35309556)+R,S=v(4,28,S+(F^R^D)+p-1530992060)+F,D=v(11,21,D+(S^F^R)+T+1272893353)+S,R=v(16,16,R+(D^S^F)+w-155497632)+D,F=v(23,9,F+(R^D^S)+B-1094730640)+R,S=v(4,28,S+(F^R^D)+_+681279174)+F,D=v(11,21,D+(S^F^R)+m-358537222)+S,R=v(16,16,R+(D^S^F)+y-722521979)+D,F=v(23,9,F+(R^D^S)+C+76029189)+R,S=v(4,28,S+(F^R^D)+O-640364487)+F,D=v(11,21,D+(S^F^R)+x-421815835)+S,R=v(16,16,R+(D^S^F)+N+530742520)+D,F=v(23,9,F+(R^D^S)+E-995338651)+R,S=v(6,26,S+(R^(F|~D))+m-198630844)+F,D=v(10,22,D+(F^(S|~R))+w+1126891415)+S,R=v(15,17,R+(S^(D|~F))+U-1416354905)+D,F=v(21,11,F+(D^(R|~S))+b-57434055)+R,S=v(6,26,S+(R^(F|~D))+x+1700485571)+F,D=v(10,22,D+(F^(S|~R))+y-1894986606)+S,R=v(15,17,R+(S^(D|~F))+B-1051523)+D,F=v(21,11,F+(D^(R|~S))+p-2054922799)+R,S=v(6,26,S+(R^(F|~D))+I+1873313359)+F,D=v(10,22,D+(F^(S|~R))+N-30611744)+S,R=v(15,17,R+(S^(D|~F))+C-1560198380)+D,F=v(21,11,F+(D^(R|~S))+_+1309151649)+R,S=v(6,26,S+(R^(F|~D))+T-145523070)+F,D=v(10,22,D+(F^(S|~R))+g-1120210379)+S,R=v(15,17,R+(S^(D|~F))+E+718787259)+D,F=v(21,11,F+(D^(R|~S))+O-343485551)+R,et=et+16,S=S+P>>>0,F=F+G>>>0,R=R+tt>>>0,D=D+pt>>>0);return qt.endian([S,F,R,D]);function v(dt,io,Vt){return Vt<>>io}function e0(dt,io){for(var Vt=-1,Ds=Math.floor((dt.length-1)/4),gt=0,wc,Ic,Sc,Fc;Ds-8>Vt++;)gt=Vt<<2,io[Vt]=dt[gt+0]|dt[gt+1]<<8|dt[gt+2]<<16|dt[gt+3]<<24;for(Vt--;Ds>Vt++;)gt=Vt<<2,wc=typeof dt[gt+0]>"u"?0:dt[gt+0],Ic=typeof dt[gt+1]>"u"?0:dt[gt+1],Sc=typeof dt[gt+2]>"u"?0:dt[gt+2],Fc=typeof dt[gt+3]>"u"?0:dt[gt+3],io[Vt]=wc|Ic<<8|Sc<<16|Fc<<24;return Ds+1}};return function(A,m,p,E){var y;return e=m.loops,t=m.loop,r=m.getA,o=m.getB,i=m.getC,f=m.getD,l=m.getX,n=m.setA,s=m.setB,a=m.setC,c=m.setD,h=m.setX,u=p,y=qt.wordsToBytes(d(A)),E&&E.asBytes?y:qt.bytesconvertNumberToHex(y)}}function Vx(){var t=function(e,r){var n,o,s,i,a,f,c,l,h,u,d,A,m,p,E,y,T,b,C,w,I,O=new Date().getTime(),B=1732584193,g=-271733879,x=-1732584194,_=271733878,U=e.length*8;I=qt.bytesToWords(e);for(var N=0;N>>24)&16711935|(I[N]<<24|I[N]>>>8)&4278255360;I[U>>>5]|=128<>>9<<4)+14]=U;for(var P=0;P>>0,o=I[P+1]>>>0,s=I[P+2]>>>0,i=I[P+3]>>>0,a=I[P+4]>>>0,f=I[P+5]>>>0,c=I[P+6]>>>0,l=I[P+7]>>>0,h=I[P+8]>>>0,u=I[P+9]>>>0,d=I[P+10]>>>0,A=I[P+11]>>>0,m=I[P+12]>>>0,p=I[P+13]>>>0,E=I[P+14]>>>0,y=I[P+15]>>>0,B=G(7,25,B+(g&x|~g&_)+n-680876936)+g,_=G(12,20,_+(B&g|~B&x)+o-389564586)+B,x=G(17,15,x+(_&B|~_&g)+s+606105819)+_,g=G(22,10,g+(x&_|~x&B)+i-1044525330)+x,B=G(7,25,B+(g&x|~g&_)+a-176418897)+g,_=G(12,20,_+(B&g|~B&x)+f+1200080426)+B,x=G(17,15,x+(_&B|~_&g)+c-1473231341)+_,g=G(22,10,g+(x&_|~x&B)+l-45705983)+x,B=G(7,25,B+(g&x|~g&_)+h+1770035416)+g,_=G(12,20,_+(B&g|~B&x)+u-1958414417)+B,x=G(17,15,x+(_&B|~_&g)+d-42063)+_,g=G(22,10,g+(x&_|~x&B)+A-1990404162)+x,B=G(7,25,B+(g&x|~g&_)+m+1804603682)+g,_=G(12,20,_+(B&g|~B&x)+p-40341101)+B,x=G(17,15,x+(_&B|~_&g)+E-1502002290)+_,g=G(22,10,g+(x&_|~x&B)+y+1236535329)+x,B=G(5,27,B+(g&_|x&~_)+o-165796510)+g,_=G(9,23,_+(B&x|g&~x)+c-1069501632)+B,x=G(14,18,x+(_&g|B&~g)+A+643717713)+_,g=G(20,12,g+(x&B|_&~B)+n-373897302)+x,B=G(5,27,B+(g&_|x&~_)+f-701558691)+g,_=G(9,23,_+(B&x|g&~x)+d+38016083)+B,x=G(14,18,x+(_&g|B&~g)+y-660478335)+_,g=G(20,12,g+(x&B|_&~B)+a-405537848)+x,B=G(5,27,B+(g&_|x&~_)+u+568446438)+g,_=G(9,23,_+(B&x|g&~x)+E-1019803690)+B,x=G(14,18,x+(_&g|B&~g)+i-187363961)+_,g=G(20,12,g+(x&B|_&~B)+h+1163531501)+x,B=G(5,27,B+(g&_|x&~_)+p-1444681467)+g,_=G(9,23,_+(B&x|g&~x)+s-51403784)+B,x=G(14,18,x+(_&g|B&~g)+l+1735328473)+_,g=G(20,12,g+(x&B|_&~B)+m-1926607734)+x,B=G(4,28,B+(g^x^_)+f-378558)+g,_=G(11,21,_+(B^g^x)+h-2022574463)+B,x=G(16,16,x+(_^B^g)+A+1839030562)+_,g=G(23,9,g+(x^_^B)+E-35309556)+x,B=G(4,28,B+(g^x^_)+o-1530992060)+g,_=G(11,21,_+(B^g^x)+a+1272893353)+B,x=G(16,16,x+(_^B^g)+l-155497632)+_,g=G(23,9,g+(x^_^B)+d-1094730640)+x,B=G(4,28,B+(g^x^_)+p+681279174)+g,_=G(11,21,_+(B^g^x)+n-358537222)+B,x=G(16,16,x+(_^B^g)+i-722521979)+_,g=G(23,9,g+(x^_^B)+c+76029189)+x,B=G(4,28,B+(g^x^_)+u-640364487)+g,_=G(11,21,_+(B^g^x)+m-421815835)+B,x=G(16,16,x+(_^B^g)+y+530742520)+_,g=G(23,9,g+(x^_^B)+s-995338651)+x,B=G(6,26,B+(x^(g|~_))+n-198630844)+g,_=G(10,22,_+(g^(B|~x))+l+1126891415)+B,x=G(15,17,x+(B^(_|~g))+E-1416354905)+_,g=G(21,11,g+(_^(x|~B))+f-57434055)+x,B=G(6,26,B+(x^(g|~_))+m+1700485571)+g,_=G(10,22,_+(g^(B|~x))+i-1894986606)+B,x=G(15,17,x+(B^(_|~g))+d-1051523)+_,g=G(21,11,g+(_^(x|~B))+o-2054922799)+x,B=G(6,26,B+(x^(g|~_))+h+1873313359)+g,_=G(10,22,_+(g^(B|~x))+y-30611744)+B,x=G(15,17,x+(B^(_|~g))+c-1560198380)+_,g=G(21,11,g+(_^(x|~B))+p+1309151649)+x,B=G(6,26,B+(x^(g|~_))+a-145523070)+g,_=G(10,22,_+(g^(B|~x))+A-1120210379)+B,x=G(15,17,x+(B^(_|~g))+s+718787259)+_,g=G(21,11,g+(_^(x|~B))+u-343485551)+x,B=B+T>>>0,g=g+b>>>0,x=x+C>>>0,_=_+w>>>0;return qt.endian([B,g,x,_]);function G(tt,pt,Y){return Y<>>pt}};return function(e,r){var n=qt.wordsToBytes(t(e,r)),o=r&&r.asBytes?n:qt.bytesconvertNumberToHex(n);return o}}function jx(t){var e,r,n,o=-1;for(e=t.length-1,r=new ArrayBuffer(t.length),n=new Uint8Array(r);e>o++;)n[o]=t.charCodeAt(o);return n}function Kx(t){return Buffer.from(t,"base64").toString("binary")}function ou(t){return t}function Xx(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";return{rotl:function(e,r){return e<>>32-r},endian:function(e){if(e.constructor==Number)return qt.rotl(e,8)&16711935|qt.rotl(e,24)&4278255360;for(var r=0;r>>5]|=e[n]<<24-o%32;return r},wordsToBytes:function(e){for(var r=[],n=0;n>>5]>>>24-n%32&255);return r},bytesconvertNumberToHex:function(e){for(var r=[],n=0;n>>4).toString(16)),r.push((e[n]&15).toString(16));return r.join("")}}}var tr=class extends As{name="md5";options;constructor(e={}){super(),this.options=e}async hash(e,r){let o=await new Promise((s,i)=>Ja(e).then(s).catch(i));return tu(o,r)}};var Xr=class{constructor(e){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(e={}){un(e)}async compress(e){return await this.preload(),this.compressSync(e)}async decompress(e,r){return await this.preload(),this.decompressSync(e,r)}compressSync(e){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(e,r){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(e){let r=await this.concatenate(e);yield this.compress(r)}async*decompressBatches(e){let r=await this.concatenate(e);yield this.decompress(r)}concatenate(e){return An(e)}improveError(e){return e.message.includes(this.name)||(e.message=`${this.name} ${e.message}`),e}};var kn=class extends Xr{name="uncompressed";extensions=[];contentEncodings=[];isSupported=!0;options;constructor(e){super(e),this.options=e||{}}compressSync(e){return e}decompressSync(e){return e}async*compressBatches(e){return yield*e}async*decompressBatches(e){return yield*e}};var fr=dr(Vd(),1),pe=dr(jd(),1),lr=class extends Xr{name="deflate";extensions=[];contentEncodings=["deflate"];isSupported=!0;options;_chunks=[];constructor(e={}){super(e),this.options=e}async compress(e){if(!Bt&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await Er(pe.default.gzip)(e):await Er(pe.default.deflate)(e);return xr(r)}return this.compressSync(e)}async decompress(e){if(!Bt&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await Er(pe.default.gunzip)(e):await Er(pe.default.inflate)(e);return xr(r)}return this.decompressSync(e)}compressSync(e){if(!Bt&&this.options.deflate?.useZlib){let s=this.options.deflate?.gzip?pe.default.gzipSync(e):pe.default.deflateSync(e);return xr(s)}let r=this.options?.deflate||{},n=new Uint8Array(e);return(this.options?.raw?fr.default.deflateRaw:fr.default.deflate)(n,r).buffer}decompressSync(e){if(!Bt&&this.options.deflate?.useZlib){let s=this.options.deflate?.gzip?pe.default.gunzipSync(e):pe.default.inflateSync(e);return xr(s)}let r=this.options?.deflate||{},n=new Uint8Array(e);return(this.options?.raw?fr.default.inflateRaw:fr.default.inflate)(n,r).buffer}async*compressBatches(e){let r=this.options?.deflate||{},n=new fr.default.Deflate(r);yield*this.transformBatches(n,e)}async*decompressBatches(e){let r=this.options?.deflate||{},n=new fr.default.Inflate(r);yield*this.transformBatches(n,e)}async*transformBatches(e,r){e.onData=this._onData.bind(this),e.onEnd=this._onEnd.bind(this);for await(let i of r){let a=new Uint8Array(i);if(!e.push(a,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let n=new Uint8Array(0),o=e.push(n,!0);yield*this._getChunks()}_onData(e){this._chunks.push(e)}_onEnd(e){if(e!==0)throw new Error(this._getError(e)+this._chunks.length)}_getChunks(){let e=this._chunks;return this._chunks=[],e}_getError(e=0){let r={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"};return`${this.name}: ${r[e]}`}};var k_={0:async t=>t,8:async t=>await new lr({raw:!0}).decompress(t)},Rs=class{fileProvider=null;fileName;archive=null;constructor(e){if(typeof e=="string")if(this.fileName=e,!Bt)this.fileProvider=new gn(e);else throw new Error("Cannot open file for random access in a WEB browser");else e instanceof hr?(this.fileProvider=e.fileProvider,this.archive=e,this.fileName=e.fileName):ks(e)&&(this.fileProvider=e)}async destroy(){this.fileProvider&&await this.fileProvider.destroy()}async readdir(){if(!this.fileProvider)throw new Error("No data detected in the zip archive");let e=[],r=Kr(this.fileProvider);for await(let n of r)e.push(n.fileName);return e}async stat(e){let r=await this.getCDFileHeader(e);return{...r,size:Number(r.uncompressedSize)}}async fetch(e){this.fileName&&e.indexOf(this.fileName)===0&&(e=e.substring(this.fileName.length+1));let r;if(this.archive)r=await this.archive.getFile(e,"http");else{if(!this.fileProvider)throw new Error("No data detected in the zip archive");let o=await this.getCDFileHeader(e),s=await $e(o.localHeaderOffset,this.fileProvider);if(!s)throw new Error("Local file header has not been found in the zip archive`");let i=k_[s.compressionMethod.toString()];if(!i)throw Error("Only Deflation compression is supported");let a=await this.fileProvider.slice(s.fileDataOffset,s.fileDataOffset+s.compressedSize);r=await i(a)}let n=new Response(r);return Object.defineProperty(n,"url",{value:e?`${this.fileName||""}/${e}`:this.fileName||""}),n}async getCDFileHeader(e){if(!this.fileProvider)throw new Error("No data detected in the zip archive");let r=Kr(this.fileProvider),n=null;for await(let o of r)if(o.fileName===e){n=o;break}if(!n)throw new Error("File has not been found in the zip archive");return n}};var hr=class{fileProvider;fileName;constructor(e,r,n){this.fileProvider=e,this.fileName=n}async getFileWithoutHash(e){return await(await new Rs(this.fileProvider).fetch(e)).arrayBuffer()}};function Cc(t){let e=new DataView(t),r={};for(let n=0;nn.toString(16).padStart(2,"0")).join("")}async function Tc(t){let e=Kr(t);return z_(e)}async function z_(t){let e=new tr,r=new TextEncoder,n={};for await(let o of t){let s=o.fileName.split("\\").join("/").toLocaleLowerCase(),i=r.encode(s).buffer,a=await e.hash(i,"hex");n[a]=o.localHeaderOffset}return n}var Q_={0:t=>new kn().decompress(t),8:t=>new lr({raw:!0}).decompress(t)},sn=class extends hr{hashTable;constructor(e,r,n){super(e,r,n),this.hashTable=r}async getFile(e){let r=await this.getFileBytes(e.toLocaleLowerCase());if(r||(r=await this.getFileBytes(e)),!r)throw new Error(`No such file in the archive: ${e}`);return r}async getFileBytes(e){let r;if(this.hashTable){let n=new TextEncoder().encode(e).buffer,o=await new tr().hash(n,"hex"),s=this.hashTable[o];if(s===void 0)return null;let i=await $e(s,this.fileProvider);if(!i)return null;let a=await this.fileProvider.slice(i.fileDataOffset,i.fileDataOffset+i.compressedSize),f=Q_[i.compressionMethod];if(!f)throw Error("Only Deflation compression is supported");r=await f(a)}else r=await this.getFileWithoutHash(e);return r}};var Kd=async(t,e)=>{let r=await Un(t,Hn),n=await Pn(r,t),o;if(n?.fileName!=="@3dtilesIndex1@")o=await Tc(t),e?.("3tz doesnt contain hash file, hash info has been composed according to zip archive headers");else{let s=await $e(n.localHeaderOffset,t);if(!s)throw new Error("corrupted 3tz zip archive");let i=s.fileDataOffset,a=await t.slice(i,i+s.compressedSize);o=Cc(a)}return new sn(t,o)};var V_="4.3.1",Xd={dataType:null,batchType:null,name:"3tz",id:"3tz",module:"3d-tiles",version:V_,mimeTypes:["application/octet-stream","application/vnd.maxar.archive.3tz+zip"],parse:j_,extensions:["3tz"],options:{}};async function j_(t,e={}){return(await Kd(new He(new DataView(t)))).getFile(e["3d-tiles-archive"]?.path??"")}function Ge(t,e,r){if(!e)return r+12;let{magic:o,version:s=1,byteLength:i=12}=t;return z(Array.isArray(o)&&Number.isFinite(s)&&Number.isFinite(i)),e.setUint8(r+0,o[0]),e.setUint8(r+1,o[1]),e.setUint8(r+2,o[2]),e.setUint8(r+3,o[3]),e.setUint32(r+4,s,!0),e.setUint32(r+8,i,!0),r+=12,r}function ve(t,e,r){t&&t.setUint32(e+8,r,!0)}function Zd(t,e,r,n,o){t={magic:be.COMPOSITE,tiles:[],...t};let s=r;r+=Ge(t,e,r),e&&e.setUint32(r,t.tiles.length,!0),r+=4;for(let i=0;i$d(t,e),encodeSync:$d};function $d(t,e){return Mc(t,e)}return a0(oo);})(); /*! Bundled license information: long/index.js: (** * @license * Copyright 2009 The Closure Library Authors * Copyright 2020 Daniel Wirtz / The long.js Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * SPDX-License-Identifier: Apache-2.0 *) */ return __exports__; });