acmi-parser 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +388 -0
- package/dist/acmi-parser.cjs +3 -2
- package/dist/acmi-parser.js +6093 -4191
- package/dist/types/acmi/acmiData.d.ts +41 -0
- package/dist/types/acmi/entity.d.ts +26 -0
- package/dist/types/acmi/frame.d.ts +17 -0
- package/dist/types/acmi/globalProperties.d.ts +30 -0
- package/dist/types/acmi/header.d.ts +7 -0
- package/dist/types/acmi/timeSpan.d.ts +12 -0
- package/dist/types/acmi/transform.d.ts +22 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/math3d/core/classes/base/math-array.d.ts +66 -0
- package/dist/types/math3d/core/classes/base/matrix.d.ts +13 -0
- package/dist/types/math3d/core/classes/base/vector.d.ts +43 -0
- package/dist/types/math3d/core/classes/euler.d.ts +78 -0
- package/dist/types/math3d/core/classes/matrix3.d.ts +62 -0
- package/dist/types/math3d/core/classes/matrix4.d.ts +232 -0
- package/dist/types/math3d/core/classes/pose.d.ts +39 -0
- package/dist/types/math3d/core/classes/quaternion.d.ts +64 -0
- package/dist/types/math3d/core/classes/spherical-coordinates.d.ts +59 -0
- package/dist/types/math3d/core/classes/vector2.d.ts +54 -0
- package/dist/types/math3d/core/classes/vector3.d.ts +59 -0
- package/dist/types/math3d/core/classes/vector4.d.ts +40 -0
- package/dist/types/math3d/core/gl-matrix/common.d.ts +37 -0
- package/dist/types/math3d/core/gl-matrix/mat3.d.ts +286 -0
- package/dist/types/math3d/core/gl-matrix/mat4.d.ts +549 -0
- package/dist/types/math3d/core/gl-matrix/quat.d.ts +358 -0
- package/dist/types/math3d/core/gl-matrix/vec2.d.ts +362 -0
- package/dist/types/math3d/core/gl-matrix/vec3.d.ts +405 -0
- package/dist/types/math3d/core/gl-matrix/vec4.d.ts +329 -0
- package/dist/types/math3d/core/index.d.ts +29 -0
- package/dist/types/math3d/core/lib/assert.d.ts +1 -0
- package/dist/types/math3d/core/lib/common.d.ts +99 -0
- package/dist/types/math3d/core/lib/gl-matrix-extras.d.ts +6 -0
- package/dist/types/math3d/core/lib/math-utils.d.ts +24 -0
- package/dist/types/math3d/core/lib/validators.d.ts +5 -0
- package/dist/types/math3d/geoid/geoid.d.ts +73 -0
- package/dist/types/math3d/geoid/index.d.ts +2 -0
- package/dist/types/math3d/geoid/parse-pgm.d.ts +11 -0
- package/dist/types/math3d/geospatial/constants.d.ts +11 -0
- package/dist/types/math3d/geospatial/ellipsoid/ellipsoid.d.ts +69 -0
- package/dist/types/math3d/geospatial/ellipsoid/helpers/ellipsoid-transform.d.ts +4 -0
- package/dist/types/math3d/geospatial/ellipsoid/helpers/scale-to-geodetic-surface.d.ts +2 -0
- package/dist/types/math3d/geospatial/index.d.ts +2 -0
- package/dist/types/math3d/geospatial/type-utils.d.ts +23 -0
- package/dist/types/math3d/index.d.ts +4 -0
- package/dist/types/math3d/types/array-types.d.ts +14 -0
- package/dist/types/math3d/types/bigint.d.ts +20 -0
- package/dist/types/math3d/types/index.d.ts +2 -0
- package/dist/types/math3d/types/is-array.d.ts +13 -0
- package/dist/types/parser.d.ts +90 -0
- package/dist/types/trajectory/stateVector.d.ts +30 -0
- package/dist/types/trajectory/trajectory.d.ts +40 -0
- package/dist/types/trajectory/trajectorySample.d.ts +11 -0
- package/package.json +20 -15
- package/dist/types/acmi-parser.d.ts +0 -422
package/dist/acmi-parser.cjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
"use strict";var pn=Object.defineProperty;var wn=(e,t,n)=>t in e?pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var O=(e,t,n)=>(wn(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var he=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Be={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(he,function(){var n=1e3,s=6e4,i=36e5,r="millisecond",c="second",o="minute",a="hour",h="day",f="week",l="month",d="quarter",u="year",m="date",p="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(y){var b=["th","st","nd","rd"],S=y%100;return"["+y+(b[(S-20)%10]||b[S]||b[0])+"]"}},M=function(y,b,S){var A=String(y);return!A||A.length>=b?y:""+Array(b+1-A.length).join(S)+y},E={s:M,z:function(y){var b=-y.utcOffset(),S=Math.abs(b),A=Math.floor(S/60),L=S%60;return(b<=0?"+":"-")+M(A,2,"0")+":"+M(L,2,"0")},m:function y(b,S){if(b.date()<S.date())return-y(S,b);var A=12*(S.year()-b.year())+(S.month()-b.month()),L=b.clone().add(A,l),P=S-L<0,q=b.clone().add(A+(P?-1:1),l);return+(-(A+(S-L)/(P?L-q:q-L))||0)},a:function(y){return y<0?Math.ceil(y)||0:Math.floor(y)},p:function(y){return{M:l,y:u,w:f,d:h,D:m,h:a,m:o,s:c,ms:r,Q:d}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},v="en",x={};x[v]=$;var k="$isDayjsObject",g=function(y){return y instanceof W||!(!y||!y[k])},T=function y(b,S,A){var L;if(!b)return v;if(typeof b=="string"){var P=b.toLowerCase();x[P]&&(L=P),S&&(x[P]=S,L=P);var q=b.split("-");if(!L&&q.length>1)return y(q[0])}else{var B=b.name;x[B]=b,L=B}return!A&&L&&(v=L),L||!A&&v},z=function(y,b){if(g(y))return y.clone();var S=typeof b=="object"?b:{};return S.date=y,S.args=arguments,new W(S)},R=E;R.l=T,R.i=g,R.w=function(y,b){return z(y,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var W=function(){function y(S){this.$L=T(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[k]=!0}var b=y.prototype;return b.parse=function(S){this.$d=function(A){var L=A.date,P=A.utc;if(L===null)return new Date(NaN);if(R.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var q=L.match(w);if(q){var B=q[2]-1||0,X=(q[7]||"0").substring(0,3);return P?new Date(Date.UTC(q[1],B,q[3]||1,q[4]||0,q[5]||0,q[6]||0,X)):new Date(q[1],B,q[3]||1,q[4]||0,q[5]||0,q[6]||0,X)}}return new Date(L)}(S),this.init()},b.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},b.$utils=function(){return R},b.isValid=function(){return this.$d.toString()!==p},b.isSame=function(S,A){var L=z(S);return this.startOf(A)<=L&&L<=this.endOf(A)},b.isAfter=function(S,A){return z(S)<this.startOf(A)},b.isBefore=function(S,A){return this.endOf(A)<z(S)},b.$g=function(S,A,L){return R.u(S)?this[A]:this.set(L,S)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(S,A){var L=this,P=!!R.u(A)||A,q=R.p(S),B=function(at,Q){var it=R.w(L.$u?Date.UTC(L.$y,Q,at):new Date(L.$y,Q,at),L);return P?it:it.endOf(h)},X=function(at,Q){return R.w(L.toDate()[at].apply(L.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Q)),L)},C=this.$W,H=this.$M,K=this.$D,lt="set"+(this.$u?"UTC":"");switch(q){case u:return P?B(1,0):B(31,11);case l:return P?B(1,H):B(0,H+1);case f:var ot=this.$locale().weekStart||0,yt=(C<ot?C+7:C)-ot;return B(P?K-yt:K+(6-yt),H);case h:case m:return X(lt+"Hours",0);case a:return X(lt+"Minutes",1);case o:return X(lt+"Seconds",2);case c:return X(lt+"Milliseconds",3);default:return this.clone()}},b.endOf=function(S){return this.startOf(S,!1)},b.$set=function(S,A){var L,P=R.p(S),q="set"+(this.$u?"UTC":""),B=(L={},L[h]=q+"Date",L[m]=q+"Date",L[l]=q+"Month",L[u]=q+"FullYear",L[a]=q+"Hours",L[o]=q+"Minutes",L[c]=q+"Seconds",L[r]=q+"Milliseconds",L)[P],X=P===h?this.$D+(A-this.$W):A;if(P===l||P===u){var C=this.clone().set(m,1);C.$d[B](X),C.init(),this.$d=C.set(m,Math.min(this.$D,C.daysInMonth())).$d}else B&&this.$d[B](X);return this.init(),this},b.set=function(S,A){return this.clone().$set(S,A)},b.get=function(S){return this[R.p(S)]()},b.add=function(S,A){var L,P=this;S=Number(S);var q=R.p(A),B=function(H){var K=z(P);return R.w(K.date(K.date()+Math.round(H*S)),P)};if(q===l)return this.set(l,this.$M+S);if(q===u)return this.set(u,this.$y+S);if(q===h)return B(1);if(q===f)return B(7);var X=(L={},L[o]=s,L[a]=i,L[c]=n,L)[q]||1,C=this.$d.getTime()+S*X;return R.w(C,this)},b.subtract=function(S,A){return this.add(-1*S,A)},b.format=function(S){var A=this,L=this.$locale();if(!this.isValid())return L.invalidDate||p;var P=S||"YYYY-MM-DDTHH:mm:ssZ",q=R.z(this),B=this.$H,X=this.$m,C=this.$M,H=L.weekdays,K=L.months,lt=L.meridiem,ot=function(Q,it,Mt,zt){return Q&&(Q[it]||Q(A,P))||Mt[it].slice(0,zt)},yt=function(Q){return R.s(B%12||12,Q,"0")},at=lt||function(Q,it,Mt){var zt=Q<12?"AM":"PM";return Mt?zt.toLowerCase():zt};return P.replace(_,function(Q,it){return it||function(Mt){switch(Mt){case"YY":return String(A.$y).slice(-2);case"YYYY":return R.s(A.$y,4,"0");case"M":return C+1;case"MM":return R.s(C+1,2,"0");case"MMM":return ot(L.monthsShort,C,K,3);case"MMMM":return ot(K,C);case"D":return A.$D;case"DD":return R.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return ot(L.weekdaysMin,A.$W,H,2);case"ddd":return ot(L.weekdaysShort,A.$W,H,3);case"dddd":return H[A.$W];case"H":return String(B);case"HH":return R.s(B,2,"0");case"h":return yt(1);case"hh":return yt(2);case"a":return at(B,X,!0);case"A":return at(B,X,!1);case"m":return String(X);case"mm":return R.s(X,2,"0");case"s":return String(A.$s);case"ss":return R.s(A.$s,2,"0");case"SSS":return R.s(A.$ms,3,"0");case"Z":return q}return null}(Q)||q.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(S,A,L){var P,q=this,B=R.p(A),X=z(S),C=(X.utcOffset()-this.utcOffset())*s,H=this-X,K=function(){return R.m(q,X)};switch(B){case u:P=K()/12;break;case l:P=K();break;case d:P=K()/3;break;case f:P=(H-C)/6048e5;break;case h:P=(H-C)/864e5;break;case a:P=H/i;break;case o:P=H/s;break;case c:P=H/n;break;default:P=H}return L?P:R.a(P)},b.daysInMonth=function(){return this.endOf(l).$D},b.$locale=function(){return x[this.$L]},b.locale=function(S,A){if(!S)return this.$L;var L=this.clone(),P=T(S,A,!0);return P&&(L.$L=P),L},b.clone=function(){return R.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},y}(),Z=W.prototype;return z.prototype=Z,[["$ms",r],["$s",c],["$m",o],["$H",a],["$W",h],["$M",l],["$y",u],["$D",m]].forEach(function(y){Z[y[1]]=function(b){return this.$g(b,y[0],y[1])}}),z.extend=function(y,b){return y.$i||(y(b,W,z),y.$i=!0),z},z.locale=T,z.isDayjs=g,z.unix=function(y){return z(1e3*y)},z.en=x[v],z.Ls=x,z.p={},z})})(Be);var gn=Be.exports;const I=fe(gn);var De={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(he,function(){var n,s,i=1e3,r=6e4,c=36e5,o=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=31536e6,f=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:h,months:f,days:o,hours:c,minutes:r,seconds:i,milliseconds:1,weeks:6048e5},u=function(x){return x instanceof E},m=function(x,k,g){return new E(x,g,k.$l)},p=function(x){return s.p(x)+"s"},w=function(x){return x<0},_=function(x){return w(x)?Math.ceil(x):Math.floor(x)},$=function(x){return Math.abs(x)},M=function(x,k){return x?w(x)?{negative:!0,format:""+$(x)+k}:{negative:!1,format:""+x+k}:{negative:!1,format:""}},E=function(){function x(g,T,z){var R=this;if(this.$d={},this.$l=z,g===void 0&&(this.$ms=0,this.parseFromMilliseconds()),T)return m(g*d[p(T)],this);if(typeof g=="number")return this.$ms=g,this.parseFromMilliseconds(),this;if(typeof g=="object")return Object.keys(g).forEach(function(y){R.$d[p(y)]=g[y]}),this.calMilliseconds(),this;if(typeof g=="string"){var W=g.match(l);if(W){var Z=W.slice(2).map(function(y){return y!=null?Number(y):0});return this.$d.years=Z[0],this.$d.months=Z[1],this.$d.weeks=Z[2],this.$d.days=Z[3],this.$d.hours=Z[4],this.$d.minutes=Z[5],this.$d.seconds=Z[6],this.calMilliseconds(),this}}return this}var k=x.prototype;return k.calMilliseconds=function(){var g=this;this.$ms=Object.keys(this.$d).reduce(function(T,z){return T+(g.$d[z]||0)*d[z]},0)},k.parseFromMilliseconds=function(){var g=this.$ms;this.$d.years=_(g/h),g%=h,this.$d.months=_(g/f),g%=f,this.$d.days=_(g/o),g%=o,this.$d.hours=_(g/c),g%=c,this.$d.minutes=_(g/r),g%=r,this.$d.seconds=_(g/i),g%=i,this.$d.milliseconds=g},k.toISOString=function(){var g=M(this.$d.years,"Y"),T=M(this.$d.months,"M"),z=+this.$d.days||0;this.$d.weeks&&(z+=7*this.$d.weeks);var R=M(z,"D"),W=M(this.$d.hours,"H"),Z=M(this.$d.minutes,"M"),y=this.$d.seconds||0;this.$d.milliseconds&&(y+=this.$d.milliseconds/1e3,y=Math.round(1e3*y)/1e3);var b=M(y,"S"),S=g.negative||T.negative||R.negative||W.negative||Z.negative||b.negative,A=W.format||Z.format||b.format?"T":"",L=(S?"-":"")+"P"+g.format+T.format+R.format+A+W.format+Z.format+b.format;return L==="P"||L==="-P"?"P0D":L},k.toJSON=function(){return this.toISOString()},k.format=function(g){var T=g||"YYYY-MM-DDTHH:mm:ss",z={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return T.replace(a,function(R,W){return W||String(z[R])})},k.as=function(g){return this.$ms/d[p(g)]},k.get=function(g){var T=this.$ms,z=p(g);return z==="milliseconds"?T%=1e3:T=z==="weeks"?_(T/d[z]):this.$d[z],T||0},k.add=function(g,T,z){var R;return R=T?g*d[p(T)]:u(g)?g.$ms:m(g,this).$ms,m(this.$ms+R*(z?-1:1),this)},k.subtract=function(g,T){return this.add(g,T,!0)},k.locale=function(g){var T=this.clone();return T.$l=g,T},k.clone=function(){return m(this.$ms,this)},k.humanize=function(g){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!g)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},x}(),v=function(x,k,g){return x.add(k.years()*g,"y").add(k.months()*g,"M").add(k.days()*g,"d").add(k.hours()*g,"h").add(k.minutes()*g,"m").add(k.seconds()*g,"s").add(k.milliseconds()*g,"ms")};return function(x,k,g){n=g,s=g().$utils(),g.duration=function(R,W){var Z=g.locale();return m(R,{$l:Z},W)},g.isDuration=u;var T=k.prototype.add,z=k.prototype.subtract;k.prototype.add=function(R,W){return u(R)?v(this,R,1):T.bind(this)(R,W)},k.prototype.subtract=function(R,W){return u(R)?v(this,R,-1):z.bind(this)(R,W)}}})})(De);var yn=De.exports;const le=fe(yn);var Xe={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(he,function(){return function(n,s){s.prototype.isSameOrBefore=function(i,r){return this.isSame(i,r)||this.isBefore(i,r)}}})})(Xe);var Mn=Xe.exports;const xn=fe(Mn);class Ce{constructor(){O(this,"referenceTime",I(null));O(this,"dataSource");O(this,"dataRecorder");O(this,"recordingTime");O(this,"author");O(this,"title");O(this,"category");O(this,"briefing");O(this,"debriefing");O(this,"comments");O(this,"referenceLongitude");O(this,"referenceLatitude");O(this,"additionalProps")}}class Ve{constructor(){O(this,"fileType","");O(this,"fileVersion","")}}I.extend(le);class de{constructor(){O(this,"start",I(null));O(this,"end",I(null))}isValid(){return this.start.isValid()&&this.end.isValid()}duration(){return this.isValid()?I.duration(this.end.diff(this.start)).asSeconds():-1}}const _n=1/Math.PI*180,On=1/180*Math.PI,Sn={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...Sn}};const V=globalThis.mathgl.config;function bn(e,{precision:t=V.precision}={}){return e=kn(e),`${parseFloat(e.toPrecision(t))}`}function wt(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function St(e){return En(e)}function vn(e){return $n(e)}function En(e,t){return ue(e,n=>n*On,t)}function $n(e,t){return ue(e,n=>n*_n,t)}function dt(e,t,n){return ue(e,s=>Math.max(t,Math.min(n,s)))}function Lt(e,t,n){const s=V.EPSILON;n&&(V.EPSILON=n);try{if(e===t)return!0;if(wt(e)&&wt(t)){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(!Lt(e[i],t[i]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):typeof e=="number"&&typeof t=="number"?Math.abs(e-t)<=V.EPSILON*Math.max(1,Math.abs(e),Math.abs(t)):!1}finally{V.EPSILON=s}}function kn(e){return Math.round(e/V.EPSILON)*V.EPSILON}function Rn(e){return e.clone?e.clone():new Array(e.length)}function ue(e,t,n){if(wt(e)){const s=e;n=n||Rn(s);for(let i=0;i<n.length&&i<s.length;++i){const r=typeof e=="number"?e:e[i];n[i]=t(r,i,n)}return n}return t(e)}class Qt extends Array{clone(){return new this.constructor().copy(this)}fromArray(t,n=0){for(let s=0;s<this.ELEMENTS;++s)this[s]=t[s+n];return this.check()}toArray(t=[],n=0){for(let s=0;s<this.ELEMENTS;++s)t[n+s]=this[s];return t}toObject(t){return t}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}to(t){return t===this?this:wt(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(V)}formatString(t){let n="";for(let s=0;s<this.ELEMENTS;++s)n+=(s>0?", ":"")+bn(this[s],t);return`${t.printTypes?this.constructor.name:""}[${n}]`}equals(t){if(!t||this.length!==t.length)return!1;for(let n=0;n<this.ELEMENTS;++n)if(!Lt(this[n],t[n]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let n=0;n<this.ELEMENTS;++n)if(this[n]!==t[n])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,n,s){if(s===void 0)return this.lerp(this,t,n);for(let i=0;i<this.ELEMENTS;++i){const r=t[i],c=typeof n=="number"?n:n[i];this[i]=r+s*(c-r)}return this.check()}min(t){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(t[n],this[n]);return this.check()}max(t){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.max(t[n],this[n]);return this.check()}clamp(t,n){for(let s=0;s<this.ELEMENTS;++s)this[s]=Math.min(Math.max(this[s],t[s]),n[s]);return this.check()}add(...t){for(const n of t)for(let s=0;s<this.ELEMENTS;++s)this[s]+=n[s];return this.check()}subtract(...t){for(const n of t)for(let s=0;s<this.ELEMENTS;++s)this[s]-=n[s];return this.check()}scale(t){if(typeof t=="number")for(let n=0;n<this.ELEMENTS;++n)this[n]*=t;else for(let n=0;n<this.ELEMENTS&&n<t.length;++n)this[n]*=t[n];return this.check()}multiplyByScalar(t){for(let n=0;n<this.ELEMENTS;++n)this[n]*=t;return this.check()}check(){if(V.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let t=this.length===this.ELEMENTS;for(let n=0;n<this.ELEMENTS;++n)t=t&&Number.isFinite(this[n]);return t}sub(t){return this.subtract(t)}setScalar(t){for(let n=0;n<this.ELEMENTS;++n)this[n]=t;return this.check()}addScalar(t){for(let n=0;n<this.ELEMENTS;++n)this[n]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let n=0;n<this.ELEMENTS;++n)this[n]*=t;return this.check()}divideScalar(t){return this.multiplyByScalar(1/t)}clampScalar(t,n){for(let s=0;s<this.ELEMENTS;++s)this[s]=Math.min(Math.max(this[s],t),n);return this.check()}get elements(){return this}}function Ln(e,t){if(e.length!==t)return!1;for(let n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function Y(e){if(!Number.isFinite(e))throw new Error(`Invalid number ${JSON.stringify(e)}`);return e}function bt(e,t,n=""){if(V.debug&&!Ln(e,t))throw new Error(`math.gl: ${n} some fields set to invalid numbers'`);return e}function rt(e,t){if(!e)throw new Error(`math.gl assertion ${t}`)}class Ue extends Qt{get x(){return this[0]}set x(t){this[0]=Y(t)}get y(){return this[1]}set y(t){this[1]=Y(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let n=0;n<this.ELEMENTS;++n)t+=this[n]*this[n];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let n=0;for(let s=0;s<this.ELEMENTS;++s){const i=this[s]-t[s];n+=i*i}return Y(n)}dot(t){let n=0;for(let s=0;s<this.ELEMENTS;++s)n+=this[s]*t[s];return Y(n)}normalize(){const t=this.magnitude();if(t!==0)for(let n=0;n<this.ELEMENTS;++n)this[n]/=t;return this.check()}multiply(...t){for(const n of t)for(let s=0;s<this.ELEMENTS;++s)this[s]*=n[s];return this.check()}divide(...t){for(const n of t)for(let s=0;s<this.ELEMENTS;++s)this[s]/=n[s];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return rt(t>=0&&t<this.ELEMENTS,"index is out of range"),Y(this[t])}setComponent(t,n){return rt(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=n,this.check()}addVectors(t,n){return this.copy(t).add(n)}subVectors(t,n){return this.copy(t).subtract(n)}multiplyVectors(t,n){return this.copy(t).multiply(n)}addScaledVector(t,n){return this.add(new this.constructor(t).multiplyScalar(n))}}const vt=1e-6;let et=typeof Float32Array<"u"?Float32Array:Array;const An=0;function zn(){const e=new et(2);return et!=Float32Array&&(e[0]=0,e[1]=0),e}function Tn(e,t,n){const s=t[0],i=t[1];return e[0]=n[0]*s+n[3]*i+n[6],e[1]=n[1]*s+n[4]*i+n[7],e}function Fn(e,t,n){const s=t[0],i=t[1];return e[0]=n[0]*s+n[4]*i+n[12],e[1]=n[1]*s+n[5]*i+n[13],e}(function(){const e=zn();return function(t,n,s,i,r,c){let o,a;for(n||(n=2),s||(s=0),i?a=Math.min(i*n+s,t.length):a=t.length,o=s;o<a;o+=n)e[0]=t[o],e[1]=t[o+1],r(e,e,c),t[o]=e[0],t[o+1]=e[1];return t}})();function Nn(e,t,n){const s=t[0],i=t[1],r=n[3]*s+n[7]*i||1;return e[0]=(n[0]*s+n[4]*i)/r,e[1]=(n[1]*s+n[5]*i)/r,e}function He(e,t,n){const s=t[0],i=t[1],r=t[2],c=n[3]*s+n[7]*i+n[11]*r||1;return e[0]=(n[0]*s+n[4]*i+n[8]*r)/c,e[1]=(n[1]*s+n[5]*i+n[9]*r)/c,e[2]=(n[2]*s+n[6]*i+n[10]*r)/c,e}function Pn(e,t,n){const s=t[0],i=t[1];return e[0]=n[0]*s+n[2]*i,e[1]=n[1]*s+n[3]*i,e[2]=t[2],e}function qn(e,t,n){const s=t[0],i=t[1];return e[0]=n[0]*s+n[2]*i,e[1]=n[1]*s+n[3]*i,e[2]=t[2],e[3]=t[3],e}function Ge(e,t,n){const s=t[0],i=t[1],r=t[2];return e[0]=n[0]*s+n[3]*i+n[6]*r,e[1]=n[1]*s+n[4]*i+n[7]*r,e[2]=n[2]*s+n[5]*i+n[8]*r,e[3]=t[3],e}function Qe(){const e=new et(3);return et!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function je(e){const t=e[0],n=e[1],s=e[2];return Math.sqrt(t*t+n*n+s*s)}function ge(e,t,n){const s=new et(3);return s[0]=e,s[1]=t,s[2]=n,s}function Yn(e,t){const n=t[0],s=t[1],i=t[2];let r=n*n+s*s+i*i;return r>0&&(r=1/Math.sqrt(r)),e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function me(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Et(e,t,n){const s=t[0],i=t[1],r=t[2],c=n[0],o=n[1],a=n[2];return e[0]=i*a-r*o,e[1]=r*c-s*a,e[2]=s*o-i*c,e}function pe(e,t,n){const s=t[0],i=t[1],r=t[2];let c=n[3]*s+n[7]*i+n[11]*r+n[15];return c=c||1,e[0]=(n[0]*s+n[4]*i+n[8]*r+n[12])/c,e[1]=(n[1]*s+n[5]*i+n[9]*r+n[13])/c,e[2]=(n[2]*s+n[6]*i+n[10]*r+n[14])/c,e}function Ie(e,t,n){const s=t[0],i=t[1],r=t[2];return e[0]=s*n[0]+i*n[3]+r*n[6],e[1]=s*n[1]+i*n[4]+r*n[7],e[2]=s*n[2]+i*n[5]+r*n[8],e}function Ke(e,t,n){const s=n[0],i=n[1],r=n[2],c=n[3],o=t[0],a=t[1],h=t[2];let f=i*h-r*a,l=r*o-s*h,d=s*a-i*o,u=i*d-r*l,m=r*f-s*d,p=s*l-i*f;const w=c*2;return f*=w,l*=w,d*=w,u*=2,m*=2,p*=2,e[0]=o+f+u,e[1]=a+l+m,e[2]=h+d+p,e}function Wn(e,t,n,s){const i=[],r=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],r[0]=i[0],r[1]=i[1]*Math.cos(s)-i[2]*Math.sin(s),r[2]=i[1]*Math.sin(s)+i[2]*Math.cos(s),e[0]=r[0]+n[0],e[1]=r[1]+n[1],e[2]=r[2]+n[2],e}function Zn(e,t,n,s){const i=[],r=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],r[0]=i[2]*Math.sin(s)+i[0]*Math.cos(s),r[1]=i[1],r[2]=i[2]*Math.cos(s)-i[0]*Math.sin(s),e[0]=r[0]+n[0],e[1]=r[1]+n[1],e[2]=r[2]+n[2],e}function Bn(e,t,n,s){const i=[],r=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],r[0]=i[0]*Math.cos(s)-i[1]*Math.sin(s),r[1]=i[0]*Math.sin(s)+i[1]*Math.cos(s),r[2]=i[2],e[0]=r[0]+n[0],e[1]=r[1]+n[1],e[2]=r[2]+n[2],e}function Dn(e,t){const n=e[0],s=e[1],i=e[2],r=t[0],c=t[1],o=t[2],a=Math.sqrt((n*n+s*s+i*i)*(r*r+c*c+o*o)),h=a&&me(e,t)/a;return Math.acos(Math.min(Math.max(h,-1),1))}const Xn=je;(function(){const e=Qe();return function(t,n,s,i,r,c){let o,a;for(n||(n=3),s||(s=0),i?a=Math.min(i*n+s,t.length):a=t.length,o=s;o<a;o+=n)e[0]=t[o],e[1]=t[o+1],e[2]=t[o+2],r(e,e,c),t[o]=e[0],t[o+1]=e[1],t[o+2]=e[2];return t}})();const It=[0,0,0];let Tt,Ft,Nt,Pt;class N extends Ue{static get ZERO(){return Tt||(Tt=new N(0,0,0),Object.freeze(Tt)),Tt}static get X_AXIS(){return Ft||(Ft=new N(1,0,0),Object.freeze(Ft)),Ft}static get Y_AXIS(){return Nt||(Nt=new N(0,1,0),Object.freeze(Nt)),Nt}static get Z_AXIS(){return Pt||(Pt=new N(0,0,1),Object.freeze(Pt)),Pt}constructor(t=0,n=0,s=0){super(-0,-0,-0),arguments.length===1&&wt(t)?this.copy(t):(V.debug&&(Y(t),Y(n),Y(s)),this[0]=t,this[1]=n,this[2]=s)}set(t,n,s){return this[0]=t,this[1]=n,this[2]=s,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return V.debug&&(Y(t.x),Y(t.y),Y(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=Y(t)}angle(t){return Dn(this,t)}static cross(t,n,s){return s=s||[-0,-0,-0],Et(s,t,n),s}cross(t){return Et(this,this,t),this.check()}rotateX({radians:t,origin:n=It}){return Wn(this,this,n,t),this.check()}rotateY({radians:t,origin:n=It}){return Zn(this,this,n,t),this.check()}rotateZ({radians:t,origin:n=It}){return Bn(this,this,n,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return pe(this,this,t),this.check()}transformAsVector(t){return He(this,this,t),this.check()}transformByMatrix3(t){return Ie(this,this,t),this.check()}transformByMatrix2(t){return Pn(this,this,t),this.check()}transformByQuaternion(t){return Ke(this,this,t),this.check()}}let qt;class we extends Ue{static get ZERO(){return qt||(qt=new we(0,0,0,0),Object.freeze(qt)),qt}constructor(t=0,n=0,s=0,i=0){super(-0,-0,-0,-0),wt(t)&&arguments.length===1?this.copy(t):(V.debug&&(Y(t),Y(n),Y(s),Y(i)),this[0]=t,this[1]=n,this[2]=s,this[3]=i)}set(t,n,s,i){return this[0]=t,this[1]=n,this[2]=s,this[3]=i,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return V.debug&&(Y(t.x),Y(t.y),Y(t.z),Y(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=Y(t)}get w(){return this[3]}set w(t){this[3]=Y(t)}transform(t){return pe(this,this,t),this.check()}transformByMatrix3(t){return Ge(this,this,t),this.check()}transformByMatrix2(t){return qn(this,this,t),this.check()}transformByQuaternion(t){return Ke(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}class Je extends Qt{toString(){let t="[";if(V.printRowMajor){t+="row-major:";for(let n=0;n<this.RANK;++n)for(let s=0;s<this.RANK;++s)t+=` ${this[s*this.RANK+n]}`}else{t+="column-major:";for(let n=0;n<this.ELEMENTS;++n)t+=` ${this[n]}`}return t+="]",t}getElementIndex(t,n){return n*this.RANK+t}getElement(t,n){return this[n*this.RANK+t]}setElement(t,n,s){return this[n*this.RANK+t]=Y(s),this}getColumn(t,n=new Array(this.RANK).fill(-0)){const s=t*this.RANK;for(let i=0;i<this.RANK;++i)n[i]=this[s+i];return n}setColumn(t,n){const s=t*this.RANK;for(let i=0;i<this.RANK;++i)this[s+i]=n[i];return this}}function Cn(){const e=new et(9);return et!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function Vn(e,t){if(e===t){const n=t[1],s=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=s,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function Un(e,t){const n=t[0],s=t[1],i=t[2],r=t[3],c=t[4],o=t[5],a=t[6],h=t[7],f=t[8],l=f*c-o*h,d=-f*r+o*a,u=h*r-c*a;let m=n*l+s*d+i*u;return m?(m=1/m,e[0]=l*m,e[1]=(-f*s+i*h)*m,e[2]=(o*s-i*c)*m,e[3]=d*m,e[4]=(f*n-i*a)*m,e[5]=(-o*n+i*r)*m,e[6]=u*m,e[7]=(-h*n+s*a)*m,e[8]=(c*n-s*r)*m,e):null}function Hn(e){const t=e[0],n=e[1],s=e[2],i=e[3],r=e[4],c=e[5],o=e[6],a=e[7],h=e[8];return t*(h*r-c*a)+n*(-h*i+c*o)+s*(a*i-r*o)}function ye(e,t,n){const s=t[0],i=t[1],r=t[2],c=t[3],o=t[4],a=t[5],h=t[6],f=t[7],l=t[8],d=n[0],u=n[1],m=n[2],p=n[3],w=n[4],_=n[5],$=n[6],M=n[7],E=n[8];return e[0]=d*s+u*c+m*h,e[1]=d*i+u*o+m*f,e[2]=d*r+u*a+m*l,e[3]=p*s+w*c+_*h,e[4]=p*i+w*o+_*f,e[5]=p*r+w*a+_*l,e[6]=$*s+M*c+E*h,e[7]=$*i+M*o+E*f,e[8]=$*r+M*a+E*l,e}function Gn(e,t,n){const s=t[0],i=t[1],r=t[2],c=t[3],o=t[4],a=t[5],h=t[6],f=t[7],l=t[8],d=n[0],u=n[1];return e[0]=s,e[1]=i,e[2]=r,e[3]=c,e[4]=o,e[5]=a,e[6]=d*s+u*c+h,e[7]=d*i+u*o+f,e[8]=d*r+u*a+l,e}function Qn(e,t,n){const s=t[0],i=t[1],r=t[2],c=t[3],o=t[4],a=t[5],h=t[6],f=t[7],l=t[8],d=Math.sin(n),u=Math.cos(n);return e[0]=u*s+d*c,e[1]=u*i+d*o,e[2]=u*r+d*a,e[3]=u*c-d*s,e[4]=u*o-d*i,e[5]=u*a-d*r,e[6]=h,e[7]=f,e[8]=l,e}function Me(e,t,n){const s=n[0],i=n[1];return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function jn(e,t){const n=t[0],s=t[1],i=t[2],r=t[3],c=n+n,o=s+s,a=i+i,h=n*c,f=s*c,l=s*o,d=i*c,u=i*o,m=i*a,p=r*c,w=r*o,_=r*a;return e[0]=1-l-m,e[3]=f-_,e[6]=d+w,e[1]=f+_,e[4]=1-h-m,e[7]=u-p,e[2]=d-w,e[5]=u+p,e[8]=1-h-l,e}var tn=(e=>(e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL1ROW0=3]="COL1ROW0",e[e.COL1ROW1=4]="COL1ROW1",e[e.COL1ROW2=5]="COL1ROW2",e[e.COL2ROW0=6]="COL2ROW0",e[e.COL2ROW1=7]="COL2ROW1",e[e.COL2ROW2=8]="COL2ROW2",e))(tn||{});const In=Object.freeze([1,0,0,0,1,0,0,0,1]);class st extends Je{static get IDENTITY(){return Jn()}static get ZERO(){return Kn()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return tn}constructor(t,...n){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(t)?this.copy(t):n.length>0?this.copy([t,...n]):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}identity(){return this.copy(In)}fromObject(t){return this.check()}fromQuaternion(t){return jn(this,t),this.check()}set(t,n,s,i,r,c,o,a,h){return this[0]=t,this[1]=n,this[2]=s,this[3]=i,this[4]=r,this[5]=c,this[6]=o,this[7]=a,this[8]=h,this.check()}setRowMajor(t,n,s,i,r,c,o,a,h){return this[0]=t,this[1]=i,this[2]=o,this[3]=n,this[4]=r,this[5]=a,this[6]=s,this[7]=c,this[8]=h,this.check()}determinant(){return Hn(this)}transpose(){return Vn(this,this),this.check()}invert(){return Un(this,this),this.check()}multiplyLeft(t){return ye(this,t,this),this.check()}multiplyRight(t){return ye(this,this,t),this.check()}rotate(t){return Qn(this,this,t),this.check()}scale(t){return Array.isArray(t)?Me(this,this,t):Me(this,this,[t,t]),this.check()}translate(t){return Gn(this,this,t),this.check()}transform(t,n){let s;switch(t.length){case 2:s=Tn(n||[-0,-0],t,this);break;case 3:s=Ie(n||[-0,-0,-0],t,this);break;case 4:s=Ge(n||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return bt(s,t.length),s}transformVector(t,n){return this.transform(t,n)}transformVector2(t,n){return this.transform(t,n)}transformVector3(t,n){return this.transform(t,n)}}let Yt,Wt=null;function Kn(){return Yt||(Yt=new st([0,0,0,0,0,0,0,0,0]),Object.freeze(Yt)),Yt}function Jn(){return Wt||(Wt=new st,Object.freeze(Wt)),Wt}function ts(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function es(e,t){if(e===t){const n=t[1],s=t[2],i=t[3],r=t[6],c=t[7],o=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=s,e[9]=r,e[11]=t[14],e[12]=i,e[13]=c,e[14]=o}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function ns(e,t){const n=t[0],s=t[1],i=t[2],r=t[3],c=t[4],o=t[5],a=t[6],h=t[7],f=t[8],l=t[9],d=t[10],u=t[11],m=t[12],p=t[13],w=t[14],_=t[15],$=n*o-s*c,M=n*a-i*c,E=n*h-r*c,v=s*a-i*o,x=s*h-r*o,k=i*h-r*a,g=f*p-l*m,T=f*w-d*m,z=f*_-u*m,R=l*w-d*p,W=l*_-u*p,Z=d*_-u*w;let y=$*Z-M*W+E*R+v*z-x*T+k*g;return y?(y=1/y,e[0]=(o*Z-a*W+h*R)*y,e[1]=(i*W-s*Z-r*R)*y,e[2]=(p*k-w*x+_*v)*y,e[3]=(d*x-l*k-u*v)*y,e[4]=(a*z-c*Z-h*T)*y,e[5]=(n*Z-i*z+r*T)*y,e[6]=(w*E-m*k-_*M)*y,e[7]=(f*k-d*E+u*M)*y,e[8]=(c*W-o*z+h*g)*y,e[9]=(s*z-n*W-r*g)*y,e[10]=(m*x-p*E+_*$)*y,e[11]=(l*E-f*x-u*$)*y,e[12]=(o*T-c*R-a*g)*y,e[13]=(n*R-s*T+i*g)*y,e[14]=(p*M-m*v-w*$)*y,e[15]=(f*v-l*M+d*$)*y,e):null}function ss(e){const t=e[0],n=e[1],s=e[2],i=e[3],r=e[4],c=e[5],o=e[6],a=e[7],h=e[8],f=e[9],l=e[10],d=e[11],u=e[12],m=e[13],p=e[14],w=e[15],_=t*c-n*r,$=t*o-s*r,M=n*o-s*c,E=h*m-f*u,v=h*p-l*u,x=f*p-l*m,k=t*x-n*v+s*E,g=r*x-c*v+o*E,T=h*M-f*$+l*_,z=u*M-m*$+p*_;return a*k-i*g+w*T-d*z}function xe(e,t,n){const s=t[0],i=t[1],r=t[2],c=t[3],o=t[4],a=t[5],h=t[6],f=t[7],l=t[8],d=t[9],u=t[10],m=t[11],p=t[12],w=t[13],_=t[14],$=t[15];let M=n[0],E=n[1],v=n[2],x=n[3];return e[0]=M*s+E*o+v*l+x*p,e[1]=M*i+E*a+v*d+x*w,e[2]=M*r+E*h+v*u+x*_,e[3]=M*c+E*f+v*m+x*$,M=n[4],E=n[5],v=n[6],x=n[7],e[4]=M*s+E*o+v*l+x*p,e[5]=M*i+E*a+v*d+x*w,e[6]=M*r+E*h+v*u+x*_,e[7]=M*c+E*f+v*m+x*$,M=n[8],E=n[9],v=n[10],x=n[11],e[8]=M*s+E*o+v*l+x*p,e[9]=M*i+E*a+v*d+x*w,e[10]=M*r+E*h+v*u+x*_,e[11]=M*c+E*f+v*m+x*$,M=n[12],E=n[13],v=n[14],x=n[15],e[12]=M*s+E*o+v*l+x*p,e[13]=M*i+E*a+v*d+x*w,e[14]=M*r+E*h+v*u+x*_,e[15]=M*c+E*f+v*m+x*$,e}function is(e,t,n){const s=n[0],i=n[1],r=n[2];let c,o,a,h,f,l,d,u,m,p,w,_;return t===e?(e[12]=t[0]*s+t[4]*i+t[8]*r+t[12],e[13]=t[1]*s+t[5]*i+t[9]*r+t[13],e[14]=t[2]*s+t[6]*i+t[10]*r+t[14],e[15]=t[3]*s+t[7]*i+t[11]*r+t[15]):(c=t[0],o=t[1],a=t[2],h=t[3],f=t[4],l=t[5],d=t[6],u=t[7],m=t[8],p=t[9],w=t[10],_=t[11],e[0]=c,e[1]=o,e[2]=a,e[3]=h,e[4]=f,e[5]=l,e[6]=d,e[7]=u,e[8]=m,e[9]=p,e[10]=w,e[11]=_,e[12]=c*s+f*i+m*r+t[12],e[13]=o*s+l*i+p*r+t[13],e[14]=a*s+d*i+w*r+t[14],e[15]=h*s+u*i+_*r+t[15]),e}function rs(e,t,n){const s=n[0],i=n[1],r=n[2];return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function cs(e,t,n,s){let i=s[0],r=s[1],c=s[2],o=Math.sqrt(i*i+r*r+c*c),a,h,f,l,d,u,m,p,w,_,$,M,E,v,x,k,g,T,z,R,W,Z,y,b;return o<vt?null:(o=1/o,i*=o,r*=o,c*=o,h=Math.sin(n),a=Math.cos(n),f=1-a,l=t[0],d=t[1],u=t[2],m=t[3],p=t[4],w=t[5],_=t[6],$=t[7],M=t[8],E=t[9],v=t[10],x=t[11],k=i*i*f+a,g=r*i*f+c*h,T=c*i*f-r*h,z=i*r*f-c*h,R=r*r*f+a,W=c*r*f+i*h,Z=i*c*f+r*h,y=r*c*f-i*h,b=c*c*f+a,e[0]=l*k+p*g+M*T,e[1]=d*k+w*g+E*T,e[2]=u*k+_*g+v*T,e[3]=m*k+$*g+x*T,e[4]=l*z+p*R+M*W,e[5]=d*z+w*R+E*W,e[6]=u*z+_*R+v*W,e[7]=m*z+$*R+x*W,e[8]=l*Z+p*y+M*b,e[9]=d*Z+w*y+E*b,e[10]=u*Z+_*y+v*b,e[11]=m*Z+$*y+x*b,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function os(e,t,n){const s=Math.sin(n),i=Math.cos(n),r=t[4],c=t[5],o=t[6],a=t[7],h=t[8],f=t[9],l=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=r*i+h*s,e[5]=c*i+f*s,e[6]=o*i+l*s,e[7]=a*i+d*s,e[8]=h*i-r*s,e[9]=f*i-c*s,e[10]=l*i-o*s,e[11]=d*i-a*s,e}function as(e,t,n){const s=Math.sin(n),i=Math.cos(n),r=t[0],c=t[1],o=t[2],a=t[3],h=t[8],f=t[9],l=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=r*i-h*s,e[1]=c*i-f*s,e[2]=o*i-l*s,e[3]=a*i-d*s,e[8]=r*s+h*i,e[9]=c*s+f*i,e[10]=o*s+l*i,e[11]=a*s+d*i,e}function hs(e,t,n){const s=Math.sin(n),i=Math.cos(n),r=t[0],c=t[1],o=t[2],a=t[3],h=t[4],f=t[5],l=t[6],d=t[7];return t!==e&&(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[0]=r*i+h*s,e[1]=c*i+f*s,e[2]=o*i+l*s,e[3]=a*i+d*s,e[4]=h*i-r*s,e[5]=f*i-c*s,e[6]=l*i-o*s,e[7]=d*i-a*s,e}function fs(e,t,n){const s=t[0],i=t[1],r=t[2],c=t[3],o=s+s,a=i+i,h=r+r,f=s*o,l=s*a,d=s*h,u=i*a,m=i*h,p=r*h,w=c*o,_=c*a,$=c*h;return e[0]=1-(u+p),e[1]=l+$,e[2]=d-_,e[3]=0,e[4]=l-$,e[5]=1-(f+p),e[6]=m+w,e[7]=0,e[8]=d+_,e[9]=m-w,e[10]=1-(f+u),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function ls(e,t){const n=t[0],s=t[1],i=t[2],r=t[3],c=n+n,o=s+s,a=i+i,h=n*c,f=s*c,l=s*o,d=i*c,u=i*o,m=i*a,p=r*c,w=r*o,_=r*a;return e[0]=1-l-m,e[1]=f+_,e[2]=d-w,e[3]=0,e[4]=f-_,e[5]=1-h-m,e[6]=u+p,e[7]=0,e[8]=d+w,e[9]=u-p,e[10]=1-h-l,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ds(e,t,n,s,i,r,c){const o=1/(n-t),a=1/(i-s),h=1/(r-c);return e[0]=r*2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r*2*a,e[6]=0,e[7]=0,e[8]=(n+t)*o,e[9]=(i+s)*a,e[10]=(c+r)*h,e[11]=-1,e[12]=0,e[13]=0,e[14]=c*r*2*h,e[15]=0,e}function us(e,t,n,s,i){const r=1/Math.tan(t/2);if(e[0]=r/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0){const c=1/(s-i);e[10]=(i+s)*c,e[14]=2*i*s*c}else e[10]=-1,e[14]=-2*s;return e}const ms=us;function ps(e,t,n,s,i,r,c){const o=1/(t-n),a=1/(s-i),h=1/(r-c);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*h,e[11]=0,e[12]=(t+n)*o,e[13]=(i+s)*a,e[14]=(c+r)*h,e[15]=1,e}const ws=ps;function gs(e,t,n,s){let i,r,c,o,a,h,f,l,d,u;const m=t[0],p=t[1],w=t[2],_=s[0],$=s[1],M=s[2],E=n[0],v=n[1],x=n[2];return Math.abs(m-E)<vt&&Math.abs(p-v)<vt&&Math.abs(w-x)<vt?ts(e):(l=m-E,d=p-v,u=w-x,i=1/Math.sqrt(l*l+d*d+u*u),l*=i,d*=i,u*=i,r=$*u-M*d,c=M*l-_*u,o=_*d-$*l,i=Math.sqrt(r*r+c*c+o*o),i?(i=1/i,r*=i,c*=i,o*=i):(r=0,c=0,o=0),a=d*o-u*c,h=u*r-l*o,f=l*c-d*r,i=Math.sqrt(a*a+h*h+f*f),i?(i=1/i,a*=i,h*=i,f*=i):(a=0,h=0,f=0),e[0]=r,e[1]=a,e[2]=l,e[3]=0,e[4]=c,e[5]=h,e[6]=d,e[7]=0,e[8]=o,e[9]=f,e[10]=u,e[11]=0,e[12]=-(r*m+c*p+o*w),e[13]=-(a*m+h*p+f*w),e[14]=-(l*m+d*p+u*w),e[15]=1,e)}function ys(){const e=new et(4);return et!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Ms(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function xs(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function _s(e){const t=e[0],n=e[1],s=e[2],i=e[3];return Math.sqrt(t*t+n*n+s*s+i*i)}function Os(e){const t=e[0],n=e[1],s=e[2],i=e[3];return t*t+n*n+s*s+i*i}function Ss(e,t){const n=t[0],s=t[1],i=t[2],r=t[3];let c=n*n+s*s+i*i+r*r;return c>0&&(c=1/Math.sqrt(c)),e[0]=n*c,e[1]=s*c,e[2]=i*c,e[3]=r*c,e}function bs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function vs(e,t,n,s){const i=t[0],r=t[1],c=t[2],o=t[3];return e[0]=i+s*(n[0]-i),e[1]=r+s*(n[1]-r),e[2]=c+s*(n[2]-c),e[3]=o+s*(n[3]-o),e}function Es(e,t,n){const s=t[0],i=t[1],r=t[2],c=t[3];return e[0]=n[0]*s+n[4]*i+n[8]*r+n[12]*c,e[1]=n[1]*s+n[5]*i+n[9]*r+n[13]*c,e[2]=n[2]*s+n[6]*i+n[10]*r+n[14]*c,e[3]=n[3]*s+n[7]*i+n[11]*r+n[15]*c,e}function $s(e,t,n){const s=t[0],i=t[1],r=t[2],c=n[0],o=n[1],a=n[2],h=n[3],f=h*s+o*r-a*i,l=h*i+a*s-c*r,d=h*r+c*i-o*s,u=-c*s-o*i-a*r;return e[0]=f*h+u*-c+l*-a-d*-o,e[1]=l*h+u*-o+d*-c-f*-a,e[2]=d*h+u*-a+f*-o-l*-c,e[3]=t[3],e}(function(){const e=ys();return function(t,n,s,i,r,c){let o,a;for(n||(n=4),s||(s=0),i?a=Math.min(i*n+s,t.length):a=t.length,o=s;o<a;o+=n)e[0]=t[o],e[1]=t[o+1],e[2]=t[o+2],e[3]=t[o+3],r(e,e,c),t[o]=e[0],t[o+1]=e[1],t[o+2]=e[2],t[o+3]=e[3];return t}})();var en=(e=>(e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL0ROW3=3]="COL0ROW3",e[e.COL1ROW0=4]="COL1ROW0",e[e.COL1ROW1=5]="COL1ROW1",e[e.COL1ROW2=6]="COL1ROW2",e[e.COL1ROW3=7]="COL1ROW3",e[e.COL2ROW0=8]="COL2ROW0",e[e.COL2ROW1=9]="COL2ROW1",e[e.COL2ROW2=10]="COL2ROW2",e[e.COL2ROW3=11]="COL2ROW3",e[e.COL3ROW0=12]="COL3ROW0",e[e.COL3ROW1=13]="COL3ROW1",e[e.COL3ROW2=14]="COL3ROW2",e[e.COL3ROW3=15]="COL3ROW3",e))(en||{});const ks=45*Math.PI/180,Rs=1,Kt=.1,Jt=500,Ls=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class ct extends Je{static get IDENTITY(){return zs()}static get ZERO(){return As()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return en}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,n,s,i,r,c,o,a,h,f,l,d,u,m,p,w){return this[0]=t,this[1]=n,this[2]=s,this[3]=i,this[4]=r,this[5]=c,this[6]=o,this[7]=a,this[8]=h,this[9]=f,this[10]=l,this[11]=d,this[12]=u,this[13]=m,this[14]=p,this[15]=w,this.check()}setRowMajor(t,n,s,i,r,c,o,a,h,f,l,d,u,m,p,w){return this[0]=t,this[1]=r,this[2]=h,this[3]=u,this[4]=n,this[5]=c,this[6]=f,this[7]=m,this[8]=s,this[9]=o,this[10]=l,this[11]=p,this[12]=i,this[13]=a,this[14]=d,this[15]=w,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(Ls)}fromObject(t){return this.check()}fromQuaternion(t){return ls(this,t),this.check()}fromTranslationQuaternion(t,n){return fs(this,n,t),this.check()}frustum(t){const{left:n,right:s,bottom:i,top:r,near:c=Kt,far:o=Jt}=t;return o===1/0?Ts(this,n,s,i,r,c):ds(this,n,s,i,r,c,o),this.check()}lookAt(t){const{eye:n,center:s=[0,0,0],up:i=[0,1,0]}=t;return gs(this,n,s,i),this.check()}ortho(t){const{left:n,right:s,bottom:i,top:r,near:c=Kt,far:o=Jt}=t;return ws(this,n,s,i,r,c,o),this.check()}orthographic(t){const{fovy:n=ks,aspect:s=Rs,focalDistance:i=1,near:r=Kt,far:c=Jt}=t;_e(n);const o=n/2,a=i*Math.tan(o),h=a*s;return this.ortho({left:-h,right:h,bottom:-a,top:a,near:r,far:c})}perspective(t){const{fovy:n=45*Math.PI/180,aspect:s=1,near:i=.1,far:r=500}=t;return _e(n),ms(this,n,s,i,r),this.check()}determinant(){return ss(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],n){n=n||[-0,-0,-0];const s=this.getScale(n),i=1/s[0],r=1/s[1],c=1/s[2];return t[0]=this[0]*i,t[1]=this[1]*r,t[2]=this[2]*c,t[3]=0,t[4]=this[4]*i,t[5]=this[5]*r,t[6]=this[6]*c,t[7]=0,t[8]=this[8]*i,t[9]=this[9]*r,t[10]=this[10]*c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],n){n=n||[-0,-0,-0];const s=this.getScale(n),i=1/s[0],r=1/s[1],c=1/s[2];return t[0]=this[0]*i,t[1]=this[1]*r,t[2]=this[2]*c,t[3]=this[4]*i,t[4]=this[5]*r,t[5]=this[6]*c,t[6]=this[8]*i,t[7]=this[9]*r,t[8]=this[10]*c,t}transpose(){return es(this,this),this.check()}invert(){return ns(this,this),this.check()}multiplyLeft(t){return xe(this,t,this),this.check()}multiplyRight(t){return xe(this,this,t),this.check()}rotateX(t){return os(this,this,t),this.check()}rotateY(t){return as(this,this,t),this.check()}rotateZ(t){return hs(this,this,t),this.check()}rotateXYZ(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}rotateAxis(t,n){return cs(this,this,t,n),this.check()}scale(t){return rs(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}translate(t){return is(this,this,t),this.check()}transform(t,n){return t.length===4?(n=Es(n||[-0,-0,-0,-0],t,this),bt(n,4),n):this.transformAsPoint(t,n)}transformAsPoint(t,n){const{length:s}=t;let i;switch(s){case 2:i=Fn(n||[-0,-0],t,this);break;case 3:i=pe(n||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return bt(i,t.length),i}transformAsVector(t,n){let s;switch(t.length){case 2:s=Nn(n||[-0,-0],t,this);break;case 3:s=He(n||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return bt(s,t.length),s}transformPoint(t,n){return this.transformAsPoint(t,n)}transformVector(t,n){return this.transformAsPoint(t,n)}transformDirection(t,n){return this.transformAsVector(t,n)}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,n,s){return this.identity().translate([t,n,s])}}let Zt,Bt;function As(){return Zt||(Zt=new ct([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(Zt)),Zt}function zs(){return Bt||(Bt=new ct,Object.freeze(Bt)),Bt}function _e(e){if(e>Math.PI*2)throw Error("expected radians")}function Ts(e,t,n,s,i,r){const c=2*r/(n-t),o=2*r/(i-s),a=(n+t)/(n-t),h=(i+s)/(i-s),f=-1,l=-1,d=-2*r;return e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=a,e[9]=h,e[10]=f,e[11]=l,e[12]=0,e[13]=0,e[14]=d,e[15]=0,e}function Oe(){const e=new et(4);return et!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Fs(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function nn(e,t,n){n=n*.5;const s=Math.sin(n);return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=Math.cos(n),e}function Se(e,t,n){const s=t[0],i=t[1],r=t[2],c=t[3],o=n[0],a=n[1],h=n[2],f=n[3];return e[0]=s*f+c*o+i*h-r*a,e[1]=i*f+c*a+r*o-s*h,e[2]=r*f+c*h+s*a-i*o,e[3]=c*f-s*o-i*a-r*h,e}function Ns(e,t,n){n*=.5;const s=t[0],i=t[1],r=t[2],c=t[3],o=Math.sin(n),a=Math.cos(n);return e[0]=s*a+c*o,e[1]=i*a+r*o,e[2]=r*a-i*o,e[3]=c*a-s*o,e}function Ps(e,t,n){n*=.5;const s=t[0],i=t[1],r=t[2],c=t[3],o=Math.sin(n),a=Math.cos(n);return e[0]=s*a-r*o,e[1]=i*a+c*o,e[2]=r*a+s*o,e[3]=c*a-i*o,e}function qs(e,t,n){n*=.5;const s=t[0],i=t[1],r=t[2],c=t[3],o=Math.sin(n),a=Math.cos(n);return e[0]=s*a+i*o,e[1]=i*a-s*o,e[2]=r*a+c*o,e[3]=c*a-r*o,e}function Ys(e,t){const n=t[0],s=t[1],i=t[2];return e[0]=n,e[1]=s,e[2]=i,e[3]=Math.sqrt(Math.abs(1-n*n-s*s-i*i)),e}function Xt(e,t,n,s){const i=t[0],r=t[1],c=t[2],o=t[3];let a=n[0],h=n[1],f=n[2],l=n[3],d,u,m,p,w;return d=i*a+r*h+c*f+o*l,d<0&&(d=-d,a=-a,h=-h,f=-f,l=-l),1-d>vt?(u=Math.acos(d),w=Math.sin(u),m=Math.sin((1-s)*u)/w,p=Math.sin(s*u)/w):(m=1-s,p=s),e[0]=m*i+p*a,e[1]=m*r+p*h,e[2]=m*c+p*f,e[3]=m*o+p*l,e}function Ws(e,t){const n=t[0],s=t[1],i=t[2],r=t[3],c=n*n+s*s+i*i+r*r,o=c?1/c:0;return e[0]=-n*o,e[1]=-s*o,e[2]=-i*o,e[3]=r*o,e}function Zs(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function sn(e,t){const n=t[0]+t[4]+t[8];let s;if(n>0)s=Math.sqrt(n+1),e[3]=.5*s,s=.5/s,e[0]=(t[5]-t[7])*s,e[1]=(t[6]-t[2])*s,e[2]=(t[1]-t[3])*s;else{let i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);const r=(i+1)%3,c=(i+2)%3;s=Math.sqrt(t[i*3+i]-t[r*3+r]-t[c*3+c]+1),e[i]=.5*s,s=.5/s,e[3]=(t[r*3+c]-t[c*3+r])*s,e[r]=(t[r*3+i]+t[i*3+r])*s,e[c]=(t[c*3+i]+t[i*3+c])*s}return e}function Bs(e,t,n,s,i=An){t*=.5,s*=.5,n*=.5;const r=Math.sin(t),c=Math.cos(t),o=Math.sin(n),a=Math.cos(n),h=Math.sin(s),f=Math.cos(s);switch(i){case 0:e[0]=r*a*f-c*o*h,e[1]=c*o*f+r*a*h,e[2]=c*a*h-r*o*f,e[3]=c*a*f+r*o*h;break;case 1:e[0]=r*a*f+c*o*h,e[1]=c*o*f-r*a*h,e[2]=c*a*h-r*o*f,e[3]=c*a*f+r*o*h;break;case 2:e[0]=r*a*f-c*o*h,e[1]=c*o*f-r*a*h,e[2]=c*a*h+r*o*f,e[3]=c*a*f+r*o*h;break;case 3:e[0]=r*a*f-c*o*h,e[1]=c*o*f+r*a*h,e[2]=c*a*h+r*o*f,e[3]=c*a*f-r*o*h;break;case 4:e[0]=r*a*f+c*o*h,e[1]=c*o*f+r*a*h,e[2]=c*a*h-r*o*f,e[3]=c*a*f-r*o*h;break;case 5:e[0]=r*a*f+c*o*h,e[1]=c*o*f-r*a*h,e[2]=c*a*h+r*o*f,e[3]=c*a*f-r*o*h;break;default:throw new Error("Unknown angle order "+i)}return e}const Ds=Ms,Xs=xs,Cs=bs,Vs=vs,Us=_s,Hs=Os,rn=Ss,Gs=function(){const e=Qe(),t=ge(1,0,0),n=ge(0,1,0);return function(s,i,r){const c=me(i,r);return c<-.999999?(Et(e,t,i),Xn(e)<1e-6&&Et(e,n,i),Yn(e,e),nn(s,e,Math.PI),s):c>.999999?(s[0]=0,s[1]=0,s[2]=0,s[3]=1,s):(Et(e,i,r),s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=1+c,rn(s,s))}}();(function(){const e=Oe(),t=Oe();return function(n,s,i,r,c,o){return Xt(e,s,c,o),Xt(t,i,r,o),Xt(n,e,t,2*o*(1-o)),n}})();(function(){const e=Cn();return function(t,n,s,i){return e[0]=s[0],e[3]=s[1],e[6]=s[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-n[0],e[5]=-n[1],e[8]=-n[2],rn(t,sn(t,e))}})();const Qs=[0,0,0,1];class j extends Qt{constructor(t=0,n=0,s=0,i=1){super(-0,-0,-0,-0),Array.isArray(t)&&arguments.length===1?this.copy(t):this.set(t,n,s,i)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,n,s,i){return this[0]=t,this[1]=n,this[2]=s,this[3]=i,this.check()}fromObject(t){return this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this.check()}fromMatrix3(t){return sn(this,t),this.check()}fromAxisRotation(t,n){return nn(this,t,n),this.check()}fromEuler(t){return Bs(this,t.x,t.y,t.z,t.order),this.check()}identity(){return Fs(this),this.check()}setAxisAngle(t,n){return this.fromAxisRotation(t,n)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=Y(t)}get y(){return this[1]}set y(t){this[1]=Y(t)}get z(){return this[2]}set z(t){this[2]=Y(t)}get w(){return this[3]}set w(t){this[3]=Y(t)}len(){return Us(this)}lengthSquared(){return Hs(this)}dot(t){return Cs(this,t)}rotationTo(t,n){return Gs(this,t,n),this.check()}add(t){return Ds(this,this,t),this.check()}calculateW(){return Ys(this,this),this.check()}conjugate(){return Zs(this,this),this.check()}invert(){return Ws(this,this),this.check()}lerp(t,n,s){return s===void 0?this.lerp(this,t,n):(Vs(this,t,n,s),this.check())}multiplyRight(t){return Se(this,this,t),this.check()}multiplyLeft(t){return Se(this,t,this),this.check()}normalize(){const t=this.len(),n=t>0?1/t:0;return this[0]=this[0]*n,this[1]=this[1]*n,this[2]=this[2]*n,this[3]=this[3]*n,t===0&&(this[3]=1),this.check()}rotateX(t){return Ns(this,this,t),this.check()}rotateY(t){return Ps(this,this,t),this.check()}rotateZ(t){return qs(this,this,t),this.check()}scale(t){return Xs(this,this,t),this.check()}slerp(t,n,s){let i,r,c;switch(arguments.length){case 1:({start:i=Qs,target:r,ratio:c}=t);break;case 2:i=this,r=t,c=n;break;default:i=t,r=n,c=s}return Xt(this,i,r,c),this.check()}transformVector4(t,n=new we){return $s(n,t,this),bt(n,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,n){return this.setAxisAngle(t,n)}premultiply(t){return this.multiplyLeft(t)}multiply(t){return this.multiplyRight(t)}}const Ot="Unknown Euler angle order",ut=.99999;var ce=(e=>(e[e.ZYX=0]="ZYX",e[e.YXZ=1]="YXZ",e[e.XZY=2]="XZY",e[e.ZXY=3]="ZXY",e[e.YZX=4]="YZX",e[e.XYZ=5]="XYZ",e))(ce||{});class D extends Qt{static get ZYX(){return 0}static get YXZ(){return 1}static get XZY(){return 2}static get ZXY(){return 3}static get YZX(){return 4}static get XYZ(){return 5}static get RollPitchYaw(){return 0}static get DefaultOrder(){return 0}static get RotationOrders(){return ce}static rotationOrder(t){return ce[t]}get ELEMENTS(){return 4}constructor(t=0,n=0,s=0,i=D.DefaultOrder){super(-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])?this.fromVector3(...rest):this.set(t,n,s,i)}fromQuaternion(t){const[n,s,i,r]=t,c=s*s,o=-2*(c+i*i)+1,a=2*(n*s+r*i);let h=-2*(n*i-r*s);const f=2*(s*i+r*n),l=-2*(n*n+c)+1;h=h>1?1:h,h=h<-1?-1:h;const d=Math.atan2(f,l),u=Math.asin(h),m=Math.atan2(a,o);return this.set(d,u,m,D.RollPitchYaw)}fromObject(t){throw new Error("not implemented")}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=Number.isFinite(t[3])||this.order,this.check()}set(t=0,n=0,s=0,i){return this[0]=t,this[1]=n,this[2]=s,this[3]=Number.isFinite(i)?i:this[3],this.check()}validate(){return js(this[3])&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2])}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t}toArray4(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t[n+3]=this[3],t}toVector3(t=[-0,-0,-0]){return t[0]=this[0],t[1]=this[1],t[2]=this[2],t}toHeadingPitchRoll(t=[-0,-0,-0]){switch(this[3]){case 5:t[0]=-this[0],t[1]=-this[1],t[2]=this[2];break;case 1:t[0]=-this[1],t[1]=-this[0],t[2]=this[2];break;case 3:t[0]=-this[2],t[1]=-this[0],t[2]=this[1];break;case 0:t[0]=-this[2],t[1]=-this[1],t[2]=this[0];break;case 4:t[0]=-this[1],t[1]=-this[2],t[2]=this[0];break;case 2:t[0]=-this[0],t[1]=-this[2],t[2]=this[1];break;default:throw new Error(Ot)}return t}get x(){return this[0]}set x(t){this[0]=Y(t)}get y(){return this[1]}set y(t){this[1]=Y(t)}get z(){return this[2]}set z(t){this[2]=Y(t)}get alpha(){return this[0]}set alpha(t){this[0]=Y(t)}get beta(){return this[1]}set beta(t){this[1]=Y(t)}get gamma(){return this[2]}set gamma(t){this[2]=Y(t)}get phi(){return this[0]}set phi(t){this[0]=Y(t)}get theta(){return this[1]}set theta(t){this[1]=Y(t)}get psi(){return this[2]}set psi(t){this[2]=Y(t)}get roll(){return this[0]}set roll(t){this[0]=Y(t)}get pitch(){return this[1]}set pitch(t){this[1]=Y(t)}get yaw(){return this[2]}set yaw(t){this[2]=Y(t)}get order(){return this[3]}set order(t){this[3]=Is(t)}fromVector3(t,n){return this.set(t[0],t[1],t[2],Number.isFinite(n)?n:this[3])}fromArray(t,n=0){return this[0]=t[0+n],this[1]=t[1+n],this[2]=t[2+n],t[3]!==void 0&&(this[3]=t[3]),this.check()}fromRollPitchYaw(t,n,s){return this.set(t,n,s,0)}fromRotationMatrix(t,n=D.DefaultOrder){return this._fromRotationMatrix(t,n),this.check()}getRotationMatrix(t){return this._getRotationMatrix(t)}getQuaternion(){const t=new j;switch(this[3]){case 5:return t.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case 1:return t.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case 3:return t.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case 0:return t.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case 4:return t.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case 2:return t.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(Ot)}}_fromRotationMatrix(t,n=D.DefaultOrder){const s=t[0],i=t[4],r=t[8],c=t[1],o=t[5],a=t[9],h=t[2],f=t[6],l=t[10];switch(n=n||this[3],n){case D.XYZ:this[1]=Math.asin(dt(r,-1,1)),Math.abs(r)<ut?(this[0]=Math.atan2(-a,l),this[2]=Math.atan2(-i,s)):(this[0]=Math.atan2(f,o),this[2]=0);break;case D.YXZ:this[0]=Math.asin(-dt(a,-1,1)),Math.abs(a)<ut?(this[1]=Math.atan2(r,l),this[2]=Math.atan2(c,o)):(this[1]=Math.atan2(-h,s),this[2]=0);break;case D.ZXY:this[0]=Math.asin(dt(f,-1,1)),Math.abs(f)<ut?(this[1]=Math.atan2(-h,l),this[2]=Math.atan2(-i,o)):(this[1]=0,this[2]=Math.atan2(c,s));break;case D.ZYX:this[1]=Math.asin(-dt(h,-1,1)),Math.abs(h)<ut?(this[0]=Math.atan2(f,l),this[2]=Math.atan2(c,s)):(this[0]=0,this[2]=Math.atan2(-i,o));break;case D.YZX:this[2]=Math.asin(dt(c,-1,1)),Math.abs(c)<ut?(this[0]=Math.atan2(-a,o),this[1]=Math.atan2(-h,s)):(this[0]=0,this[1]=Math.atan2(r,l));break;case D.XZY:this[2]=Math.asin(-dt(i,-1,1)),Math.abs(i)<ut?(this[0]=Math.atan2(f,o),this[1]=Math.atan2(r,s)):(this[0]=Math.atan2(-a,l),this[1]=0);break;default:throw new Error(Ot)}return this[3]=n,this}_getRotationMatrix(t){const n=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],s=this.x,i=this.y,r=this.z,c=Math.cos(s),o=Math.cos(i),a=Math.cos(r),h=Math.sin(s),f=Math.sin(i),l=Math.sin(r);switch(this[3]){case D.XYZ:{const d=c*a,u=c*l,m=h*a,p=h*l;n[0]=o*a,n[4]=-o*l,n[8]=f,n[1]=u+m*f,n[5]=d-p*f,n[9]=-h*o,n[2]=p-d*f,n[6]=m+u*f,n[10]=c*o;break}case D.YXZ:{const d=o*a,u=o*l,m=f*a,p=f*l;n[0]=d+p*h,n[4]=m*h-u,n[8]=c*f,n[1]=c*l,n[5]=c*a,n[9]=-h,n[2]=u*h-m,n[6]=p+d*h,n[10]=c*o;break}case D.ZXY:{const d=o*a,u=o*l,m=f*a,p=f*l;n[0]=d-p*h,n[4]=-c*l,n[8]=m+u*h,n[1]=u+m*h,n[5]=c*a,n[9]=p-d*h,n[2]=-c*f,n[6]=h,n[10]=c*o;break}case D.ZYX:{const d=c*a,u=c*l,m=h*a,p=h*l;n[0]=o*a,n[4]=m*f-u,n[8]=d*f+p,n[1]=o*l,n[5]=p*f+d,n[9]=u*f-m,n[2]=-f,n[6]=h*o,n[10]=c*o;break}case D.YZX:{const d=c*o,u=c*f,m=h*o,p=h*f;n[0]=o*a,n[4]=p-d*l,n[8]=m*l+u,n[1]=l,n[5]=c*a,n[9]=-h*a,n[2]=-f*a,n[6]=u*l+m,n[10]=d-p*l;break}case D.XZY:{const d=c*o,u=c*f,m=h*o,p=h*f;n[0]=o*a,n[4]=-l,n[8]=f*a,n[1]=d*l+p,n[5]=c*a,n[9]=u*l-m,n[2]=m*l-u,n[6]=h*a,n[10]=p*l+d;break}default:throw new Error(Ot)}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}toQuaternion(){const t=Math.cos(this.yaw*.5),n=Math.sin(this.yaw*.5),s=Math.cos(this.roll*.5),i=Math.sin(this.roll*.5),r=Math.cos(this.pitch*.5),c=Math.sin(this.pitch*.5),o=t*s*r+n*i*c,a=t*i*r-n*s*c,h=t*s*c+n*i*r,f=n*s*r-t*i*c;return new j(a,h,f,o)}}function js(e){return e>=0&&e<6}function Is(e){if(e<0&&e>=6)throw new Error(Ot);return e}const Ks=.1,Js=1e-12,ti=1e-15,ei=6378137,ni=6378137,si=6356752314245179e-9;function jt(e){return e}new N;function ii(e,t=[],n=jt){return"longitude"in e?(t[0]=n(e.longitude),t[1]=n(e.latitude),t[2]=e.height):"x"in e?(t[0]=n(e.x),t[1]=n(e.y),t[2]=e.z):(t[0]=n(e[0]),t[1]=n(e[1]),t[2]=e[2]),t}function ri(e,t=[]){return ii(e,t,V._cartographicRadians?jt:St)}function ci(e,t,n=jt){return"longitude"in t?(t.longitude=n(e[0]),t.latitude=n(e[1]),t.height=e[2]):"x"in t?(t.x=n(e[0]),t.y=n(e[1]),t.z=e[2]):(t[0]=n(e[0]),t[1]=n(e[1]),t[2]=e[2]),t}function oi(e,t){return ci(e,t,V._cartographicRadians?jt:vn)}const be=1e-14,ai=new N,ve={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"}},te={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},xt={east:new N,north:new N,up:new N,west:new N,south:new N,down:new N},hi=new N,fi=new N,li=new N;function Ee(e,t,n,s,i,r){const c=ve[t]&&ve[t][n];rt(c&&(!s||s===c));let o,a,h;const f=ai.copy(i);if(Lt(f.x,0,be)&&Lt(f.y,0,be)){const d=Math.sign(f.z);o=hi.fromArray(te[t]),t!=="east"&&t!=="west"&&o.scale(d),a=fi.fromArray(te[n]),n!=="east"&&n!=="west"&&a.scale(d),h=li.fromArray(te[s]),s!=="east"&&s!=="west"&&h.scale(d)}else{const{up:d,east:u,north:m}=xt;u.set(-f.y,f.x,0).normalize(),e.geodeticSurfaceNormal(f,d),m.copy(d).cross(u);const{down:p,west:w,south:_}=xt;p.copy(d).scale(-1),w.copy(u).scale(-1),_.copy(m).scale(-1),o=xt[t],a=xt[n],h=xt[s]}return r[0]=o.x,r[1]=o.y,r[2]=o.z,r[3]=0,r[4]=a.x,r[5]=a.y,r[6]=a.z,r[7]=0,r[8]=h.x,r[9]=h.y,r[10]=h.z,r[11]=0,r[12]=f.x,r[13]=f.y,r[14]=f.z,r[15]=1,r}const mt=new N,di=new N,ui=new N;function mi(e,t,n=[]){const{oneOverRadii:s,oneOverRadiiSquared:i,centerToleranceSquared:r}=t;mt.from(e);const c=mt.x,o=mt.y,a=mt.z,h=s.x,f=s.y,l=s.z,d=c*c*h*h,u=o*o*f*f,m=a*a*l*l,p=d+u+m,w=Math.sqrt(1/p);if(!Number.isFinite(w))return;const _=di;if(_.copy(e).scale(w),p<r)return _.to(n);const $=i.x,M=i.y,E=i.z,v=ui;v.set(_.x*$*2,_.y*M*2,_.z*E*2);let x=(1-w)*mt.len()/(.5*v.len()),k=0,g,T,z,R;do{x-=k,g=1/(1+x*$),T=1/(1+x*M),z=1/(1+x*E);const W=g*g,Z=T*T,y=z*z,b=W*g,S=Z*T,A=y*z;R=d*W+u*Z+m*y-1;const P=-2*(d*b*$+u*S*M+m*A*E);k=R/P}while(Math.abs(R)>Js);return mt.scale([g,T,z]).to(n)}const Dt=new N,ee=new N,pi=new N,tt=new N,wi=new N,_t=new N,gi=new j,$e=new ct,yi=new st,Mi=new st,xi=new N,ke=new N,_i=new N,Oi=new j,Si=new ct,bi=new st,Gt=class Gt{constructor(t=0,n=0,s=0){O(this,"radii");O(this,"radiiSquared");O(this,"radiiToTheFourth");O(this,"oneOverRadii");O(this,"oneOverRadiiSquared");O(this,"minimumRadius");O(this,"maximumRadius");O(this,"centerToleranceSquared",Ks);O(this,"squaredXOverSquaredZ",0);rt(t>=0),rt(n>=0),rt(s>=0),this.radii=new N(t,n,s),this.radiiSquared=new N(t*t,n*n,s*s),this.radiiToTheFourth=new N(t*t*t*t,n*n*n*n,s*s*s*s),this.oneOverRadii=new N(t===0?0:1/t,n===0?0:1/n,s===0?0:1/s),this.oneOverRadiiSquared=new N(t===0?0:1/(t*t),n===0?0:1/(n*n),s===0?0:1/(s*s)),this.minimumRadius=Math.min(t,n,s),this.maximumRadius=Math.max(t,n,s),this.radiiSquared.z!==0&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||!!(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,n=[0,0,0]){const s=ee,i=pi,[,,r]=t;this.geodeticSurfaceNormalCartographic(t,s),i.copy(this.radiiSquared).scale(s);const c=Math.sqrt(s.dot(i));return i.scale(1/c),s.scale(r),i.add(s),i.to(n)}cartesianToCartographic(t,n=[0,0,0]){_t.from(t);const s=this.scaleToGeodeticSurface(_t,tt);if(!s)return;const i=this.geodeticSurfaceNormal(s,ee),r=wi;r.copy(_t).subtract(s);const c=Math.atan2(i.y,i.x),o=Math.asin(i.z),a=Math.sign(me(r,_t))*je(r);return oi([c,o,a],n)}eastNorthUpToFixedFrame(t,n=new ct){return Ee(this,"east","north","up",t,n)}localFrameToFixedFrame(t,n,s,i,r=new ct){return Ee(this,t,n,s,i,r)}geocentricSurfaceNormal(t,n=[0,0,0]){return Dt.from(t).normalize().to(n)}geodeticSurfaceNormalCartographic(t,n=[0,0,0]){const s=ri(t),i=s[0],r=s[1],c=Math.cos(r);return Dt.set(c*Math.cos(i),c*Math.sin(i),Math.sin(r)).normalize(),Dt.to(n)}geodeticSurfaceNormal(t,n=[0,0,0]){return Dt.from(t).scale(this.oneOverRadiiSquared).normalize().to(n)}scaleToGeodeticSurface(t,n){return mi(t,this,n)}scaleToGeocentricSurface(t,n=[0,0,0]){tt.from(t);const s=tt.x,i=tt.y,r=tt.z,c=this.oneOverRadiiSquared,o=1/Math.sqrt(s*s*c.x+i*i*c.y+r*r*c.z);return tt.multiplyScalar(o).to(n)}transformPositionToScaledSpace(t,n=[0,0,0]){return tt.from(t).scale(this.oneOverRadii).to(n)}transformPositionFromScaledSpace(t,n=[0,0,0]){return tt.from(t).scale(this.radii).to(n)}getSurfaceNormalIntersectionWithZAxis(t,n=0,s=[0,0,0]){rt(Lt(this.radii.x,this.radii.y,ti)),rt(this.radii.z>0),tt.from(t);const i=tt.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(i)>=this.radii.z-n))return tt.set(0,0,i).to(s)}getEulerFromPositionQuaternion(t,n,s=new D){return s.fromQuaternion(gi.fromMatrix3(this.localFrameToFixedFrame("north","west","up",t,$e).invert().getRotationMatrix3(yi).multiplyRight(Mi.fromQuaternion(n))).normalize()),s}getRotationMatrixFromPositionVelocity(t,n,s=new st){const i=_t.fromArray(t),r=this.geodeticSurfaceNormal(i,ee),c=xi.fromArray(n);let o=N.cross(n,r,ke);o.equals(N.ZERO)&&o.fromArray(N.X_AXIS);const a=N.cross(o,n,_i).normalize();return o=N.cross(n,a,ke).negate().normalize(),s[0]=c.x,s[1]=c.y,s[2]=c.z,s[3]=o.x,s[4]=o.y,s[5]=o.z,s[6]=a.x,s[7]=a.y,s[8]=a.z,s}getQuaternionFromEuler(t,n,s=new j){return s.fromMatrix3(this.localFrameToFixedFrame("north","west","up",t,$e).multiplyRight(Si.fromTranslationQuaternion(N.ZERO,Oi.fromEuler(n))).getRotationMatrix3(bi))}};O(Gt,"WGS84",new Gt(ei,ni,si));let Ut=Gt;const vi=240,Ei=[9,-18,-88,0,96,90,0,0,-60,-20,-9,18,8,0,-96,30,0,0,60,-20,9,-88,-18,90,96,0,-20,-60,0,0,186,-42,-42,-150,-96,-150,60,60,60,60,54,162,-78,30,-24,-90,-60,60,-60,60,-9,-32,18,30,24,0,20,-60,0,0,-9,8,18,30,-96,0,-20,60,0,0,54,-78,162,-90,-24,30,60,-60,60,-60,-54,78,78,90,144,90,-60,-60,-60,-60,9,-8,-18,-30,-24,0,20,60,0,0,-9,18,-32,0,24,30,0,0,-60,20,9,-18,-8,0,-24,-30,0,0,60,20],$i=372,ki=[0,0,-131,0,138,144,0,0,-102,-31,0,0,7,0,-138,42,0,0,102,-31,62,0,-31,0,0,-62,0,0,0,31,124,0,-62,0,0,-124,0,0,0,62,124,0,-62,0,0,-124,0,0,0,62,62,0,-31,0,0,-62,0,0,0,31,0,0,45,0,-183,-9,0,93,18,0,0,0,216,0,33,87,0,-93,12,-93,0,0,156,0,153,99,0,-93,-12,-93,0,0,-45,0,-3,9,0,93,-18,0,0,0,-55,0,48,42,0,0,-84,31,0,0,-7,0,-48,-42,0,0,84,31],Ri=372,Li=[18,-36,-122,0,120,135,0,0,-84,-31,-18,36,-2,0,-120,51,0,0,84,-31,36,-165,-27,93,147,-9,0,-93,18,0,210,45,-111,-93,-57,-192,0,93,12,93,162,141,-75,-93,-129,-180,0,93,-12,93,-36,-21,27,93,39,9,0,-93,-18,0,0,0,62,0,0,31,0,0,0,-31,0,0,124,0,0,62,0,0,0,-62,0,0,124,0,0,62,0,0,0,-62,0,0,62,0,0,31,0,0,0,-31,-18,36,-64,0,66,51,0,0,-102,31,18,-36,2,0,-66,-51,0,0,102,31],Ai=12,ne=4*5/2,zi=2;class Ti{constructor(t){O(this,"_v00",0);O(this,"_v01",0);O(this,"_v10",0);O(this,"_v11",0);O(this,"_t",[]);O(this,"_ix");O(this,"_iy");O(this,"options");this.options=t,this._ix=this.options._width,this._iy=this.options._height}getHeight(t,n){if(t=Math.abs(t)>90?NaN:t,isNaN(t)||isNaN(n))return NaN;const s=Fi(n,360);n=s!==-180?s:180;let i=n*this.options._rlonres,r=-t*this.options._rlatres,c=Math.floor(i),o=Math.min(Math.round((this.options._height-1)/2-1),Math.floor(r));i-=c,r-=o,o+=(this.options._height-1)/2,c+=c<0?this.options._width:c>=this.options._width?-this.options._width:0;let a=0,h=0,f=0,l=0,d=new Array(ne);if(c===this._ix&&o===this._iy)this.options.cubic?d=this._t:(a=this._v00,h=this._v01,f=this._v10,l=this._v11);else if(!this.options.cubic)a=this._rawval(c,o),h=this._rawval(c+1,o),f=this._rawval(c,o+1),l=this._rawval(c+1,o+1);else{const m=[this._rawval(c,o-1),this._rawval(c+1,o-1),this._rawval(c-1,o),this._rawval(c,o),this._rawval(c+1,o),this._rawval(c+2,o),this._rawval(c-1,o+1),this._rawval(c,o+1),this._rawval(c+1,o+1),this._rawval(c+2,o+1),this._rawval(c,o+2),this._rawval(c+1,o+2)];let p=ki;o!==0&&(p=o===this.options._height-2?Li:Ei);let w=$i;o!==0&&(w=o===this.options._height-2?Ri:vi);for(let _=0;_<ne;++_){d[_]=0;for(let $=0;$<Ai;++$)d[_]+=m[$]*p[ne*$+_];d[_]/=w}}if(!this.options.cubic){const m=(1-i)*a+i*h,p=(1-i)*f+i*l,w=(1-r)*m+r*p,_=this.options._offset+this.options._scale*w;return this._ix=c,this._iy=o,this._v00=a,this._v01=h,this._v10=f,this._v11=l,_}let u=d[0]+i*(d[1]+i*(d[3]+i*d[6]))+r*(d[2]+i*(d[4]+i*d[7])+r*(d[5]+i*d[8]+r*d[9]));return u=this.options._offset+this.options._scale*u,this._ix=c,this._iy=o,this._t=d,u}_rawval(t,n){t<0?t+=this.options._width:t>=this.options._width&&(t-=this.options._width),(n<0||n>=this.options._height)&&(n=n<0?-n:2*(this.options._height-1)-n,t+=(t<this.options._width/2?1:-1)*this.options._width/2);const s=this.options._datastart+zi*(n*this.options._swidth+t),i=this.options.data[s],r=this.options.data[s+1];return i<<8|r}}function Fi(e,t){t=Math.abs(t);let n=Re(e,t);return 2*Math.abs(n)===t?n-=Re(e,2*t)-n:2*Math.abs(n)>t&&(n+=n<0?t:-t),n}function Re(e,t){return e-Math.floor(e/t)*t}const Ni=10,Pi=65535;function qi(e,t){const n=Yi(e);let s=n.next();if(s.done||s.value.line!=="P5")throw new Error("Geoid model file: File not in PGM format");let i=Number.MAX_VALUE,r=0,c=-1,o=-1,a="NONE",h="UNKNOWN",f=0,l=0,d=null,u=null;do{s=n.next();const _=s.value.line;if(_.length)if(_[0]==="#"){const $=_.split(" "),M=$[0],E=$[1];if(M!=="#"||!E)continue;const v=$.length>2?$.slice(2):[];if(E==="Description")a=v.join(" ");else if(E==="DateTime")h=v.join(" ");else if(E==="Offset"){if(!$[2])throw new Error("Geoid model file: Error reading offset");i=parseInt($[2],10)}else if(E==="Scale"){if(!$[2])throw new Error("Geoid model file: Error reading scale");r=parseFloat($[2])}else E===(t.cubic?"MaxCubicError":"MaxBilinearError")?isFinite(parseFloat($[2]))&&(c=parseFloat($[2])):E===(t.cubic?"RMSCubicError":"RMSBilinearError")&&isFinite(parseFloat($[2]))&&(o=parseFloat($[2]))}else{let $=_.split(" ");if($=$.filter(M=>M!==""),f=parseInt($[0],10),l=parseInt($[1],10),!(f&&l))throw new Error("Geoid model file: Error reading raster size");break}}while(!s.done);s=n.next();const m=parseInt(s.value.line,10);if(s.done)throw new Error("Geoid model file: Error reading maxval");if(m!==Pi)throw new Error("Geoid model file: Incorrect value of maxval");if(d=s.value.offset,u=f,i===Number.MAX_VALUE)throw new Error("Geoid model file: Offset not set");if(r===0)throw new Error("Geoid model file: Scale not set");if(r<0)throw new Error("Geoid model file: Scale must be positive");if(l<2||f<2)throw new Error("Geoid model file: Raster size too small");if(f&1)throw new Error("Geoid model file: Raster width is odd");if(!(l&1))throw new Error("Geoid model file: Raster height is even");const p=f/360,w=(l-1)/180;return new Ti({cubic:t.cubic,_width:f,_height:l,_rlonres:p,_rlatres:w,_offset:i,_scale:r,_swidth:u,_datastart:d,_maxerror:c,_rmserror:o,_description:a,_datetime:h,data:e})}function*Yi(e){let t=0;do{const n=e.indexOf(Ni,t);if(n!==-1){const s=e.subarray(t,n);t=n+1,yield{offset:t,line:Le(s)}}else{const s=e.subarray(t,e.length);t=e.length,yield{offset:t,line:Le(s)}}}while(t<e.length);return{offset:t,line:""}}function Le(e){let t="";for(const n of e)t+=String.fromCharCode(n);return t}I.extend(le);const Wi=St(1),Zi=9.80665,Bi=2*Math.PI,Ae=new D,ze=new D,Te=new D,Di=.05,Xi=new N,Ci=new N,Vi=new st,Ui=new st,Hi=new j,Gi=new j,Qi=new j,Fe=new j,pt=Ut.WGS84;class cn{constructor(){O(this,"samples",[]);O(this,"_lastRoll",0)}hasOrientations(){var t;return((t=this.samples[0])==null?void 0:t.stateVector.quaternion)!==void 0}_simpleSmooth(t,n){return t=n*t+(1-n)*this._lastRoll,t<Wi&&(t=0),this._lastRoll=t,t}_computeRoll(t,n,s,i,r,c){const o=pt.getEulerFromPositionQuaternion(t,n,ze).toHeadingPitchRoll(ze),a=pt.getEulerFromPositionQuaternion(s,i,Te).toHeadingPitchRoll(Te),h=Bi;let f=o.yaw;f<0&&(f+=h);let l=a.yaw;l<0&&(l+=h);let d=l-f,u=Math.abs(d);u>Math.PI&&(u=h-u,d=h+d);const m=Math.sign(d)*u;return this._simpleSmooth(Math.atan(r*m/(Zi*c)),Di)}_computeOrientation(t,n,s,i){const r=t.stateVector.cartesian,c=n.stateVector.cartesian,o=t.time,a=n.time,h=I.duration(a.diff(o)).asSeconds(),f=Xi.subVectors(c,r).multiplyByScalar(1/h),l=f.magnitude();if(l>V.EPSILON){f.normalize();const d=pt.getRotationMatrixFromPositionVelocity(r,f,Vi),u=Hi.fromMatrix3(d);let m=0;if(i){const w=s.stateVector.cartesian,_=s.time,$=I.duration(_.diff(a)).asSeconds(),M=Ci.subVectors(w,c).multiplyByScalar(1/$);M.normalize();const E=pt.getRotationMatrixFromPositionVelocity(c,M,Ui),v=Gi.fromMatrix3(E);m=this._computeRoll(r,u,c,v,l,h)}return Qi.fromAxisRotation(f,m).multiplyRight(u).clone()}else return pt.getQuaternionFromEuler(r,Ae,Fe).clone()}emulateOrientations(t){const n=this.samples,s=n.length-2;if(s<1){n.forEach(i=>{const r=i.stateVector;r.quaternion=pt.getQuaternionFromEuler(r.cartesian,Ae,Fe).clone()});return}t=t??!1;for(let i=0;i<s;++i){const r=n[i],c=n[i+1],o=n[i+2];n[i].stateVector.quaternion=this._computeOrientation(r,c,o,t)}n[s].stateVector.quaternion=n[s-1].stateVector.quaternion,n[s+1].stateVector.quaternion=n[s-1].stateVector.quaternion}}const J=class J{constructor(){O(this,"cartesian",new N);O(this,"quaternion")}equals(t){var n;return t.cartesian.equals(this.cartesian)&&(this.quaternion!==void 0?(n=t.quaternion)==null?void 0:n.equals(this.quaternion):t.quaternion===void 0)}static fromTransform(t,n){n===void 0&&(n=new J);const s=n.cartesian;let i=J._scratchQuaternionX.identity(),r=J._scratchQuaternionY.identity(),c=J._scratchQuaternionZ.identity();const o=Ut.WGS84;o.cartographicToCartesian(t.position,s);const a=t.orientation;if(a!==void 0){i.rotateX(a.roll),r.rotateY(-a.pitch),c.rotateZ(-a.yaw);const h=c.multiplyRight(r).multiplyRight(i),f=this._scratchHprMatrix.fromQuaternion(h),u=o.localFrameToFixedFrame("north","west","up",s,this._scratchTranslationMatrix).multiplyRight(f).getRotationMatrix3(this._scratchRotation);n.quaternion===void 0&&(n.quaternion=new j),n.quaternion.fromMatrix3(u)}return n}};O(J,"_scratchQuaternionX",new j),O(J,"_scratchQuaternionY",new j),O(J,"_scratchQuaternionZ",new j),O(J,"_scratchHprMatrix",new ct),O(J,"_scratchTranslationMatrix",new ct),O(J,"_scratchRotation",new st);let Ht=J;I.extend(le);I.extend(xn);class oe{constructor(){O(this,"isValid",!0);O(this,"header",new Ve);O(this,"globalProperties",new Ce);O(this,"timeSpan",new de);O(this,"entities",new Map);O(this,"frames",[])}_searchFrameIndex(t){const n=this.frames;let s=-1,i=0,r=this.frames.length-1;for(;i<=r;){let c=i+(r-i>>>1);n[c].timeStamp-t<=0?(s=c,i=c+1):r=c-1}return s}getFrame(t){if(this.timeSpan.isValid()){const n=this.globalProperties.referenceTime,s=this.timeSpan.end,i=this.frames;if(n.isSameOrBefore(t)&&t.isSameOrBefore(s)){const r=I.duration(t.diff(n)).asSeconds();return i[this._searchFrameIndex(r)]}}}_addFrame(t,n,s,i){const r=n.scene;i=i??!1,r.forEach((c,o)=>{let a=s.get(o);a===void 0&&(a=new cn,s.set(o,a));const h=a.samples,f=Ht.fromTransform(c),l=h.length;if(!i&&l>0){const d=h[l-1];if(f.equals(d.stateVector))return}h.push({time:t,stateVector:f})})}createSampledTrajectories(t){const n=(t==null?void 0:t.sampleRate)??1,s=(t==null?void 0:t.emulateOrientation)??!1,i=new Map,r=this.timeSpan;if(r.isValid()){const c=r.duration(),o=r.start,a=r.end;let h=0;do{const f=o.add(h,"seconds"),l=this.getFrame(f);l!==void 0&&this._addFrame(f,l,i),h+=n}while(h<=c);if(h>c){const f=this.getFrame(a);f!==void 0&&this._addFrame(a,f,i,!0)}}return s&&i.forEach(c=>c.emulateOrientations(!0)),i}}class on{constructor(t){O(this,"id");O(this,"timeSpan",new de);O(this,"name");O(this,"types");O(this,"callsign");O(this,"pilot");O(this,"group");O(this,"country");O(this,"coalition");O(this,"color");this.id=t}}class Ct{constructor(t,n){O(this,"timeStamp");O(this,"scene");this.timeStamp=t,n?this.scene=new Map(n):this.scene=new Map}}const nt=class nt{constructor(t,n){O(this,"position");O(this,"orientation");var s,i;if(t[0]!==void 0||t[1]!==void 0||t[2]!==void 0){const r=n==null?void 0:n.position.clone(),c=t[0]!==void 0?t[0]+nt.refLong:(r==null?void 0:r.x)??nt.refLong,o=t[1]!==void 0?t[1]+nt.refLat:(r==null?void 0:r.y)??nt.refLat,a=((s=nt.geoid)==null?void 0:s.getHeight(o,c))??0,h=t[2]!==void 0?t[2]+a:(r==null?void 0:r.z)??a;this.position=new N(c,o,h)}else this.position=(n==null?void 0:n.position)??new N;if(t[3]!==void 0||t[4]!==void 0||t[5]!==void 0){const r=(i=n==null?void 0:n.orientation)==null?void 0:i.clone(),c=t[3]!==void 0?St(t[3]):r==null?void 0:r.roll,o=t[4]!==void 0?St(t[4]):r==null?void 0:r.pitch,a=t[5]!==void 0?St(t[5]):r==null?void 0:r.yaw;this.orientation=new D(c,o,a)}else this.orientation=n==null?void 0:n.orientation}};O(nt,"refLong",0),O(nt,"refLat",0),O(nt,"geoid");let ht=nt;function an(e){return e.arrayBuffer?e.arrayBuffer():new Promise((t,n)=>{const s=new FileReader;s.addEventListener("loadend",()=>{t(s.result)}),s.addEventListener("error",n),s.readAsArrayBuffer(e)})}async function ji(e){const t=await an(e);return new Uint8Array(t)}function hn(e){return typeof Blob<"u"&&e instanceof Blob}function At(e){return typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer}const Ii=typeof process<"u"&&process.versions&&typeof process.versions.node<"u"&&typeof process.versions.electron>"u";function Ki(e){return e.byteOffset===0&&e.byteLength===e.buffer.byteLength}class Ne{constructor(t){this.typedArray=t instanceof ArrayBuffer||At(t)?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}async getLength(){return this.typedArray.byteLength}async read(t,n){return new Uint8Array(this.typedArray.buffer,this.typedArray.byteOffset+t,n)}}class Pe{constructor(t){this.blob=t}async getLength(){return this.blob.size}async read(t,n){const s=this.blob.slice(t,t+n),i=await an(s);return new Uint8Array(i)}async sliceAsBlob(t,n,s=""){return this.blob.slice(t,t+n,s)}}function Ji(e,t){var n=Uint8Array;if(e[0]==3&&e[1]==0)return t||new n(0);var s=er,i=fn,r=tr,c=ln,o=t==null;o&&(t=new n(e.length>>>2<<3));for(var a=0,h=0,f=0,l=0,d=0,u=0,m=0,p=0,w=0,_,$;a==0;){if(a=s(e,w,1),h=s(e,w+1,2),w+=3,h==0){w&7&&(w+=8-(w&7));var M=(w>>>3)+4,E=e[M-4]|e[M-3]<<8;o&&(t=se(t,p+E)),t.set(new n(e.buffer,e.byteOffset+M,E),p),w=M+E<<3,p+=E;continue}if(o&&(t=se(t,p+(1<<17))),h==1&&(_=F.flmap,$=F.fdmap,u=511,m=31),h==2){f=i(e,w,5)+257,l=i(e,w+5,5)+1,d=i(e,w+10,4)+4,w+=14;for(var v=0;v<38;v+=2)F.itree[v]=0,F.itree[v+1]=0;for(var x=1,v=0;v<d;v++){var k=i(e,w+v*3,3);F.itree[(F.ordr[v]<<1)+1]=k,k>x&&(x=k)}w+=3*d,$t(F.itree,x),kt(F.itree,x,F.imap),_=F.lmap,$=F.dmap,w=r(F.imap,(1<<x)-1,f+l,e,w,F.ttree);var g=qe(F.ttree,0,f,F.ltree);u=(1<<g)-1;var T=qe(F.ttree,f,l,F.dtree);m=(1<<T)-1,$t(F.ltree,g),kt(F.ltree,g,_),$t(F.dtree,T),kt(F.dtree,T,$)}for(;;){var z=_[c(e,w)&u];w+=z&15;var R=z>>>4;if(!(R>>>8))t[p++]=R;else{if(R==256)break;var W=p+R-254;if(R>264){var Z=F.ldef[R-257];W=p+(Z>>>3)+i(e,w,Z&7),w+=Z&7}var y=$[c(e,w)&m];w+=y&15;var b=y>>>4,S=F.ddef[b],A=(S>>>4)+s(e,w,S&15);for(w+=S&15,o&&(t=se(t,p+(1<<17)));p<W;)t[p]=t[p++-A],t[p]=t[p++-A],t[p]=t[p++-A],t[p]=t[p++-A];p=W}}}return t.length==p?t:t.slice(0,p)}function se(e,t){var n=e.length;if(t<=n)return e;var s=new Uint8Array(Math.max(n<<1,t));return s.set(e,0),s}function tr(e,t,n,s,i,r){for(var c=fn,o=ln,a=0;a<n;){var h=e[o(s,i)&t];i+=h&15;var f=h>>>4;if(f<=15)r[a]=f,a++;else{var l=0,d=0;f==16?(d=3+c(s,i,2),i+=2,l=r[a-1]):f==17?(d=3+c(s,i,3),i+=3):f==18&&(d=11+c(s,i,7),i+=7);for(var u=a+d;a<u;)r[a]=l,a++}}return i}function qe(e,t,n,s){for(var i=0,r=0,c=s.length>>>1;r<n;){var o=e[r+t];s[r<<1]=0,s[(r<<1)+1]=o,o>i&&(i=o),r++}for(;r<c;)s[r<<1]=0,s[(r<<1)+1]=0,r++;return i}function $t(e,t){for(var n=e.length,s,i,r,c,o,a=F.bl_count,c=0;c<=t;c++)a[c]=0;for(c=1;c<n;c+=2)a[e[c]]++;var h=F.next_code;for(s=0,a[0]=0,i=1;i<=t;i++)s=s+a[i-1]<<1,h[i]=s;for(r=0;r<n;r+=2)o=e[r+1],o!=0&&(e[r]=h[o],h[o]++)}function kt(e,t,n){for(var s=e.length,i=F.rev15,r=0;r<s;r+=2)if(e[r+1]!=0)for(var c=r>>1,o=e[r+1],a=c<<4|o,h=t-o,f=e[r]<<h,l=f+(1<<h);f!=l;){var d=i[f]>>>15-t;n[d]=a,f++}}function Ye(e,t){for(var n=F.rev15,s=15-t,i=0;i<e.length;i+=2){var r=e[i]<<t-e[i+1];e[i]=n[r]>>>s}}function fn(e,t,n){return(e[t>>>3]|e[(t>>>3)+1]<<8)>>>(t&7)&(1<<n)-1}function er(e,t,n){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)&(1<<n)-1}function ln(e,t){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)}const F=function(){var e=Uint16Array,t=Uint32Array;return{next_code:new e(16),bl_count:new e(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[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,999,999,999],exb:[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,0,0,0],ldef:new e(32),df0:[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,65535,65535],dxb:[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,0,0],ddef:new t(32),flmap:new e(512),fltree:[],fdmap:new e(32),fdtree:[],lmap:new e(32768),ltree:[],ttree:[],dmap:new e(32768),dtree:[],imap:new e(512),itree:[],rev15:new e(32768),lhst:new t(286),dhst:new t(30),ihst:new t(19),lits:new t(15e3),strt:new e(65536),prev:new e(32768)}}();(function(){for(var e=32768,t=0;t<e;t++){var n=t;n=(n&2863311530)>>>1|(n&1431655765)<<1,n=(n&3435973836)>>>2|(n&858993459)<<2,n=(n&4042322160)>>>4|(n&252645135)<<4,n=(n&4278255360)>>>8|(n&16711935)<<8,F.rev15[t]=(n>>>16|n<<16)>>>17}function s(i,r,c){for(;r--!=0;)i.push(0,c)}for(var t=0;t<32;t++)F.ldef[t]=F.of0[t]<<3|F.exb[t],F.ddef[t]=F.df0[t]<<4|F.dxb[t];s(F.fltree,144,8),s(F.fltree,112,9),s(F.fltree,24,7),s(F.fltree,8,8),$t(F.fltree,9),kt(F.fltree,9,F.flmap),Ye(F.fltree,9),s(F.fdtree,32,5),$t(F.fdtree,5),kt(F.fdtree,5,F.fdmap),Ye(F.fdtree,5),s(F.itree,19,0),s(F.ltree,286,0),s(F.dtree,30,0),s(F.ttree,320,0)})();const We={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,s=0;s<8;s++)n&1?n=3988292384^n>>>1:n=n>>>1;e[t]=n}return e}(),update:function(e,t,n,s){for(var i=0;i<s;i++)e=We.table[(e^t[n+i])&255]^e>>>8;return e},crc:function(e,t,n){return We.update(4294967295,e,t,n)^4294967295}};function nr(e,t){return Ji(e,t)}const Ze={numWorkers:1,workerURL:"",useWorkers:!1};let sr=0;const Vt=[];function ie(e){return new Promise((t,n)=>{const s=new Worker(e);s.onmessage=i=>{i.data==="start"?(s.onerror=void 0,s.onmessage=void 0,t(s)):n(new Error(`unexpected message: ${i.data}`))},s.onerror=n})}function ir(e,t){return e.require?e.require(t):{}}(function(){if(Ii){const{Worker:e}=ir(module,"worker_threads");return{async createWorker(t){return new e(t)},addEventListener(t,n){t.on("message",s=>{n({target:t,data:s})})},async terminate(t){await t.terminate()}}}else return{async createWorker(e){try{return await ie(e)}catch{console.warn("could not load worker:",e)}let t;try{const n=await fetch(e,{mode:"cors"});if(!n.ok)throw new Error(`could not load: ${e}`);t=await n.text(),e=URL.createObjectURL(new Blob([t],{type:"application/javascript"}));const s=await ie(e);return Ze.workerURL=e,s}catch{console.warn("could not load worker via fetch:",e)}if(t!==void 0)try{e=`data:application/javascript;base64,${btoa(t)}`;const n=await ie(e);return Ze.workerURL=e,n}catch{console.warn("could not load worker via dataURI")}throw console.warn("workers will not be used"),new Error("can not start workers")},addEventListener(e,t){e.addEventListener("message",t)},async terminate(e){e.terminate()}}})();function rr(e,t,n,s){const i=new Uint8Array(t);nr(e,i),s(n?new Blob([i],{type:n}):i.buffer)}async function cr(){if(Vt.length!==0)for(;Vt.length;){const{src:e,uncompressedSize:t,type:n,resolve:s}=Vt.shift();let i=e;hn(e)&&(i=await ji(e)),rr(i,t,n,s)}}function dn(e,t,n){return new Promise((s,i)=>{Vt.push({src:e,uncompressedSize:t,type:n,resolve:s,reject:i,id:sr++}),cr()})}function or(e,t){const n=e&31,s=(e>>5&15)-1,i=(e>>9&127)+1980,r=0,c=(t&31)*2,o=t>>5&63,a=t>>11&31;return new Date(i,s,n,a,o,c,r)}class ar{constructor(t,n){this._reader=t,this._rawEntry=n,this.name=n.name,this.nameBytes=n.nameBytes,this.size=n.uncompressedSize,this.compressedSize=n.compressedSize,this.comment=n.comment,this.commentBytes=n.commentBytes,this.compressionMethod=n.compressionMethod,this.lastModDate=or(n.lastModFileDate,n.lastModFileTime),this.isDirectory=n.uncompressedSize===0&&n.name.endsWith("/"),this.encrypted=!!(n.generalPurposeBitFlag&1),this.externalFileAttributes=n.externalFileAttributes,this.versionMadeBy=n.versionMadeBy}async blob(t="application/octet-stream"){return await Mr(this._reader,this._rawEntry,t)}async arrayBuffer(){return await yr(this._reader,this._rawEntry)}async text(){const t=await this.arrayBuffer();return Rt(new Uint8Array(t))}async json(){const t=await this.text();return JSON.parse(t)}}const re=22,hr=65535,fr=101010256,lr=101075792;async function gt(e,t,n){return await e.read(t,n)}async function ae(e,t,n,s){return e.sliceAsBlob?await e.sliceAsBlob(t,n,s):await e.read(t,n)}const dr={unsigned(){return 0}};function U(e,t){return e[t]+e[t+1]*256}function G(e,t){return e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*16777216}function ft(e,t){return G(e,t)+G(e,t+4)*4294967296}const ur=new TextDecoder;function Rt(e,t){return At(e.buffer)&&(e=new Uint8Array(e)),ur.decode(e)}async function mr(e,t){const n=Math.min(re+hr,t),s=t-n,i=await gt(e,s,n);for(let r=n-re;r>=0;--r){if(G(i,r)!==fr)continue;const c=new Uint8Array(i.buffer,i.byteOffset+r,i.byteLength-r),o=U(c,4);if(o!==0)throw new Error(`multi-volume zip files are not supported. This is volume: ${o}`);const a=U(c,10),h=G(c,12),f=G(c,16),l=U(c,20),d=c.length-re;if(l!==d)throw new Error(`invalid comment length. expected: ${d}, actual: ${l}`);const u=new Uint8Array(c.buffer,c.byteOffset+22,l),m=Rt(u);return a===65535||f===4294967295?await wr(e,s+r,m,u):await un(e,f,h,a,m,u)}throw new Error("could not find end of central directory. maybe not zip file")}const pr=117853008;async function wr(e,t,n,s){const i=t-20,r=await gt(e,i,20);if(G(r,0)!==pr)throw new Error("invalid zip64 end of central directory locator signature");const c=ft(r,8),o=await gt(e,c,56);if(G(o,0)!==lr)throw new Error("invalid zip64 end of central directory record signature");const a=ft(o,32),h=ft(o,40),f=ft(o,48);return un(e,f,h,a,n,s)}const gr=33639248;async function un(e,t,n,s,i,r){let c=0;const o=await gt(e,t,n),a=[];for(let f=0;f<s;++f){const l=o.subarray(c,c+46),d=G(l,0);if(d!==gr)throw new Error(`invalid central directory file header signature: 0x${d.toString(16)}`);const u={versionMadeBy:U(l,4),versionNeededToExtract:U(l,6),generalPurposeBitFlag:U(l,8),compressionMethod:U(l,10),lastModFileTime:U(l,12),lastModFileDate:U(l,14),crc32:G(l,16),compressedSize:G(l,20),uncompressedSize:G(l,24),fileNameLength:U(l,28),extraFieldLength:U(l,30),fileCommentLength:U(l,32),internalFileAttributes:U(l,36),externalFileAttributes:G(l,38),relativeOffsetOfLocalHeader:G(l,42)};if(u.generalPurposeBitFlag&64)throw new Error("strong encryption is not supported");c+=46;const m=o.subarray(c,c+u.fileNameLength+u.extraFieldLength+u.fileCommentLength);u.nameBytes=m.slice(0,u.fileNameLength),u.name=Rt(u.nameBytes);const p=u.fileNameLength+u.extraFieldLength,w=m.slice(u.fileNameLength,p);u.extraFields=[];let _=0;for(;_<w.length-3;){const M=U(w,_+0),E=U(w,_+2),v=_+4,x=v+E;if(x>w.length)throw new Error("extra field length exceeds extra field buffer size");u.extraFields.push({id:M,data:w.slice(v,x)}),_=x}if(u.commentBytes=m.slice(p,p+u.fileCommentLength),u.comment=Rt(u.commentBytes),c+=m.length,u.uncompressedSize===4294967295||u.compressedSize===4294967295||u.relativeOffsetOfLocalHeader===4294967295){const M=u.extraFields.find(x=>x.id===1);if(!M)throw new Error("expected zip64 extended information extra field");const E=M.data;let v=0;if(u.uncompressedSize===4294967295){if(v+8>E.length)throw new Error("zip64 extended information extra field does not include uncompressed size");u.uncompressedSize=ft(E,v),v+=8}if(u.compressedSize===4294967295){if(v+8>E.length)throw new Error("zip64 extended information extra field does not include compressed size");u.compressedSize=ft(E,v),v+=8}if(u.relativeOffsetOfLocalHeader===4294967295){if(v+8>E.length)throw new Error("zip64 extended information extra field does not include relative header offset");u.relativeOffsetOfLocalHeader=ft(E,v),v+=8}}const $=u.extraFields.find(M=>M.id===28789&&M.data.length>=6&&M.data[0]===1&&G(M.data,1),dr.unsigned(u.nameBytes));if($&&(u.fileName=Rt($.data.slice(5))),u.compressionMethod===0){let M=u.uncompressedSize;if(u.generalPurposeBitFlag&1&&(M+=12),u.compressedSize!==M)throw new Error(`compressed size mismatch for stored file: ${u.compressedSize} != ${M}`)}a.push(u)}return{zip:{comment:i,commentBytes:r},entries:a.map(f=>new ar(e,f))}}async function mn(e,t){if(t.generalPurposeBitFlag&1)throw new Error("encrypted entries not supported");const n=await gt(e,t.relativeOffsetOfLocalHeader,30),s=await e.getLength(),i=G(n,0);if(i!==67324752)throw new Error(`invalid local file header signature: 0x${i.toString(16)}`);const r=U(n,26),c=U(n,28),o=t.relativeOffsetOfLocalHeader+n.length+r+c;let a;if(t.compressionMethod===0)a=!1;else if(t.compressionMethod===8)a=!0;else throw new Error(`unsupported compression method: ${t.compressionMethod}`);const h=o,f=h+t.compressedSize;if(t.compressedSize!==0&&f>s)throw new Error(`file data overflows file bounds: ${h} + ${t.compressedSize} > ${s}`);return{decompress:a,fileDataStart:h}}async function yr(e,t){const{decompress:n,fileDataStart:s}=await mn(e,t);if(!n){const c=await gt(e,s,t.compressedSize);return Ki(c)?c.buffer:c.slice().buffer}const i=await ae(e,s,t.compressedSize);return await dn(i,t.uncompressedSize)}async function Mr(e,t,n){const{decompress:s,fileDataStart:i}=await mn(e,t);if(!s){const o=await ae(e,i,t.compressedSize,n);return hn(o)?o:new Blob([At(o.buffer)?new Uint8Array(o):o],{type:n})}const r=await ae(e,i,t.compressedSize);return await dn(r,t.uncompressedSize,n)}async function xr(e){let t;if(typeof Blob<"u"&&e instanceof Blob)t=new Pe(e);else if(e instanceof ArrayBuffer||e&&e.buffer&&e.buffer instanceof ArrayBuffer)t=new Ne(e);else if(At(e)||At(e.buffer))t=new Ne(e);else if(typeof e=="string"){const s=await fetch(e);if(!s.ok)throw new Error(`failed http request ${e}, status: ${s.status}: ${s.statusText}`);const i=await s.blob();t=new Pe(i)}else if(typeof e.getLength=="function"&&typeof e.read=="function")t=e;else throw new Error("unsupported source type");const n=await t.getLength();if(n>Number.MAX_SAFE_INTEGER)throw new Error(`file too large. size: ${n}. Only file sizes up 4503599627370496 bytes are supported`);return await mr(t,n)}async function _r(e){const{zip:t,entries:n}=await xr(e);return{zip:t,entries:Object.fromEntries(n.map(s=>[s.name,s]))}}class Or{constructor(t){O(this,"_decoder",new TextDecoder);O(this,"_currentLine","");O(this,"_currentTimeStamp",0);O(this,"_currentFrame",new Ct(0));O(this,"_destroyedIds",[]);O(this,"_filteredIds",[]);O(this,"_data",new oe);O(this,"_filter",[]);O(this,"_acmiVersions",["2.1","2.2"]);O(this,"_acmiType","text/acmi/tacview");O(this,"_propertySeparator",new RegExp("(?<!\\\\),"));O(this,"_headerPattern",/^\ufeff?FileType=(?<type>.*)\r?\nFileVersion=(?<version>.*)\r?\n/);t!==void 0&&(ht.geoid=qi(t,{}))}_isValidVersion(){return this._acmiVersions.find(t=>t===this._data.header.fileVersion)!==void 0}_isValidType(){return this._data.header.fileType===this._acmiType}_parseHeader(t){const n=this._data,s=this._decoder.decode(t.slice(0,64)),i=this._headerPattern.exec(s);i!==null&&i.groups!==void 0&&(n.header.fileType=i.groups.type,n.header.fileVersion=i.groups.version,n.isValid=this._isValidType()&&this._isValidVersion())}_parseContent(t){const n=t.length;let s=0,i=0,r=!1,c=0,o="",a=0;for(;i<n;)t[i]===13?r=!0:t[i]===10&&(r?(r=!1,c=i-1):c=i,o=this._decoder.decode(t.slice(s,c)),s=i+1,a>1&&o.trim().length!==0&&!o.startsWith("//")&&(o.endsWith("\\")?this._currentLine+=o.slice(0,o.length-1)+`
|
|
2
|
-
`:(this._currentLine+=o,this._parseLine())),++a),++i;const h=this._data,f=h.frames;if(f.length>0){f.push(this._currentFrame);const l=h.globalProperties.referenceTime,d=f.findIndex(u=>u.scene.size>0);l.isValid()&&d!==-1?(h.timeSpan.start=l.add(f[d].timeStamp,"seconds"),h.timeSpan.end=l.add(f[f.length-1].timeStamp,"seconds")):h.isValid=!1}}_parseLine(){const t=this._data,n=t.frames,s=this._currentFrame,i=this._destroyedIds,r=this._filteredIds;let c=this._currentLine;if(!c.startsWith("0,Event"))if(c.startsWith("0,"))c=c.slice(2),c.split(this._propertySeparator).forEach(a=>{const h=a.indexOf("=");if(h>=0){const f=a.slice(0,h),l=a.slice(h+1),d=t.globalProperties;switch(f){case"DataSource":d.dataSource=l;break;case"DataRecorder":d.dataRecorder=l;break;case"ReferenceTime":d.referenceTime=I(l);break;case"RecordingTime":d.recordingTime=I(l);break;case"Author":d.author=l;break;case"Title":d.title=l;break;case"Category":d.category=l;break;case"Briefing":d.briefing=l;break;case"Debriefing":d.debriefing=l;break;case"Comments":d.comments=l;break;case"ReferenceLongitude":d.referenceLongitude=+l,ht.refLong=d.referenceLongitude;break;case"ReferenceLatitude":d.referenceLatitude=+l,ht.refLat=d.referenceLatitude;break;default:d.additionalProps===void 0&&(d.additionalProps=new Map),d.additionalProps.set(f,l);break}}else t.isValid=!1});else if(c.startsWith("#")){i.length>0&&(i.forEach(a=>s.scene.delete(a)),this._destroyedIds=[]);const o=+c.slice(1);o!==this._currentTimeStamp&&(n.push(s),this._currentTimeStamp=o,this._currentFrame=new Ct(this._currentTimeStamp,s.scene))}else if(c.startsWith("-")){const o=parseInt(c.slice(1),16),a=t.entities.get(o);a&&(a.timeSpan.end=t.globalProperties.referenceTime.add(this._currentTimeStamp,"second")),r.indexOf(o)>=0&&i.push(o)}else{const o=c.indexOf(",");if(o>=0){const a=parseInt(c.slice(0,o),16),h=c.slice(o+1);let f=t.entities.get(a),l=!1;f===void 0&&(l=!0,f=new on(a),f.timeSpan.start=t.globalProperties.referenceTime.add(this._currentTimeStamp,"second"));const d=h.split(this._propertySeparator);if(d.forEach(u=>{const m=u.indexOf("=");if(m>=0){const p=u.slice(0,m),w=u.slice(m+1);switch(p){case"Name":f.name=w;break;case"Type":f.types=w.split("+");break;case"CallSign":f.callsign=w;break;case"Pilot":f.pilot=w;break;case"Group":f.group=w;break;case"Country":f.country=w;break;case"Coalition":f.coalition=w;break;case"Color":f.color=w;break;case"destroyed":+w==1&&(f.timeSpan.end=t.globalProperties.referenceTime.add(this._currentTimeStamp,"second"));break}}else t.isValid=!1}),l){const u=this._filter;let m=!0;if(u!==void 0&&u.length>0){const p=f.types;m=p!==void 0?p.every(w=>!u.includes(w)):!u.includes("Untyped")}m&&(t.entities.set(a,f),r.push(a))}if(r.indexOf(a)>=0){const u=d.findIndex(m=>m.startsWith("T="));if(u>=0){const m=d[u],p=m.indexOf("=");if(p>=0){const $=m.slice(p+1).split("|").map(M=>(M==null?void 0:M.length)>0?+M:void 0);s.scene.set(a,new ht($,s.scene.get(a)))}}}}else t.isValid=!1}this._currentLine=""}async _unzip(t){let n=!1;if(t.length>1&&(n=new TextDecoder().decode(t.slice(0,2))==="PK"),n){const{entries:s}=await _r(t),i=Object.values(s);if(i.length===1)return new Uint8Array(await i[0].arrayBuffer());throw"Invalid compressed ACMI file"}else return t}_parseBuffer(t){return this._parseHeader(t),this._parseContent(t),this._data.entities.forEach(n=>{n.timeSpan.end.isValid()||(n.timeSpan.end=this._data.timeSpan.end.clone())}),this._data}async parse(t,n){return this._data=new oe,this._filter=(n==null?void 0:n.filter)??[],this._currentLine="",this._currentTimeStamp=0,this._currentFrame=new Ct(this._currentTimeStamp),this._destroyedIds=[],this._filteredIds=[],this._parseBuffer(await this._unzip(t))}}exports.AcmiData=oe;exports.Entity=on;exports.Frame=Ct;exports.GlobalProperties=Ce;exports.Header=Ve;exports.StateVector=Ht;exports.TimeSpan=de;exports.Trajectory=cn;exports.Transform=ht;exports.default=Or;
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),l=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),u=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),d=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isSameOrBefore=r()})(e,(function(){"use strict";return function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}}}))})),f=c(u(),1),p=c(d(),1),m=c(l(),1),h=class{referenceTime=(0,m.default)(null);dataSource;dataRecorder;recordingTime;author;title;category;briefing;debriefing;comments;referenceLongitude;referenceLatitude;additionalProps},g=class{fileType=``;fileVersion=``};m.default.extend(f.default);var _=class{start=(0,m.default)(null);end=(0,m.default)(null);isValid(){return this.start.isValid()&&this.end.isValid()}duration(){return this.isValid()?m.default.duration(this.end.diff(this.start)).asSeconds():-1}},v=1/Math.PI*180,y=1/180*Math.PI;globalThis.mathgl=globalThis.mathgl||{config:{EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1}};var b=globalThis.mathgl.config;function x(e,{precision:t=b.precision}={}){return e=k(e),`${parseFloat(e.toPrecision(t))}`}function S(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function C(e){return T(e)}function w(e){return E(e)}function T(e,t){return j(e,e=>e*y,t)}function E(e,t){return j(e,e=>e*v,t)}function D(e,t,n){return j(e,e=>Math.max(t,Math.min(n,e)))}function O(e,t,n){let r=b.EPSILON;n&&(b.EPSILON=n);try{if(e===t)return!0;if(S(e)&&S(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!O(e[n],t[n]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):typeof e==`number`&&typeof t==`number`&&Math.abs(e-t)<=b.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{b.EPSILON=r}}function k(e){return Math.round(e/b.EPSILON)*b.EPSILON}function A(e){return e.clone?e.clone():Array(e.length)}function j(e,t,n){if(S(e)){let r=e;n||=A(r);for(let i=0;i<n.length&&i<r.length;++i){let r=typeof e==`number`?e:e[i];n[i]=t(r,i,n)}return n}return t(e)}var M=class extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,t=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}toArray(e=[],t=0){for(let n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:S(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(b)}formatString(e){let t=``;for(let n=0;n<this.ELEMENTS;++n)t+=(n>0?`, `:``)+x(this[n],e);return`${e.printTypes?this.constructor.name:``}[${t}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(!O(this[t],e[t]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,t,n){if(n===void 0)return this.lerp(this,e,t);for(let r=0;r<this.ELEMENTS;++r){let i=e[r],a=typeof t==`number`?t:t[r];this[r]=i+n*(a-i)}return this.check()}min(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}max(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}clamp(e,t){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}add(...e){for(let t of e)for(let e=0;e<this.ELEMENTS;++e)this[e]+=t[e];return this.check()}subtract(...e){for(let t of e)for(let e=0;e<this.ELEMENTS;++e)this[e]-=t[e];return this.check()}scale(e){if(typeof e==`number`)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;else for(let t=0;t<this.ELEMENTS&&t<e.length;++t)this[t]*=e[t];return this.check()}multiplyByScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}check(){if(b.debug&&!this.validate())throw Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let e=this.length===this.ELEMENTS;for(let t=0;t<this.ELEMENTS;++t)e&&=Number.isFinite(this[t]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}addScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,t){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}get elements(){return this}};function N(e,t){if(e.length!==t)return!1;for(let t=0;t<e.length;++t)if(!Number.isFinite(e[t]))return!1;return!0}function P(e){if(!Number.isFinite(e))throw Error(`Invalid number ${JSON.stringify(e)}`);return e}function F(e,t,n=``){if(b.debug&&!N(e,t))throw Error(`math.gl: ${n} some fields set to invalid numbers'`);return e}function I(e,t){if(!e)throw Error(`math.gl assertion ${t}`)}var ee=class extends M{get x(){return this[0]}set x(e){this[0]=P(e)}get y(){return this[1]}set y(e){this[1]=P(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let t=0;for(let n=0;n<this.ELEMENTS;++n){let r=this[n]-e[n];t+=r*r}return P(t)}dot(e){let t=0;for(let n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return P(t)}normalize(){let e=this.magnitude();if(e!==0)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}multiply(...e){for(let t of e)for(let e=0;e<this.ELEMENTS;++e)this[e]*=t[e];return this.check()}divide(...e){for(let t of e)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t[e];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return I(e>=0&&e<this.ELEMENTS,`index is out of range`),P(this[e])}setComponent(e,t){return I(e>=0&&e<this.ELEMENTS,`index is out of range`),this[e]=t,this.check()}addVectors(e,t){return this.copy(e).add(t)}subVectors(e,t){return this.copy(e).subtract(t)}multiplyVectors(e,t){return this.copy(e).multiply(t)}addScaledVector(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},L=typeof Float32Array<`u`?Float32Array:Array;Math.PI/180;function te(){let e=new L(2);return L!=Float32Array&&(e[0]=0,e[1]=0),e}function ne(e,t,n){let r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e}function re(e,t,n){let r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}(function(){let e=te();return function(t,n,r,i,a,o){let s,c;for(n||=2,r||=0,c=i?Math.min(i*n+r,t.length):t.length,s=r;s<c;s+=n)e[0]=t[s],e[1]=t[s+1],a(e,e,o),t[s]=e[0],t[s+1]=e[1];return t}})();function ie(e,t,n){let r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}function ae(e,t,n){let r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function oe(e,t,n){let r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}function R(e,t,n){let r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e[3]=t[3],e}function z(e,t,n){let r=t[0],i=t[1],a=t[2];return e[0]=n[0]*r+n[3]*i+n[6]*a,e[1]=n[1]*r+n[4]*i+n[7]*a,e[2]=n[2]*r+n[5]*i+n[8]*a,e[3]=t[3],e}function se(){let e=new L(3);return L!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function ce(e){let t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function le(e,t,n){let r=new L(3);return r[0]=e,r[1]=t,r[2]=n,r}function ue(e,t){let n=t[0],r=t[1],i=t[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function de(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function fe(e,t,n){let r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],c=n[2];return e[0]=i*c-a*s,e[1]=a*o-r*c,e[2]=r*s-i*o,e}function B(e,t,n){let r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o||=1,e[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,e[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,e[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,e}function pe(e,t,n){let r=t[0],i=t[1],a=t[2];return e[0]=r*n[0]+i*n[3]+a*n[6],e[1]=r*n[1]+i*n[4]+a*n[7],e[2]=r*n[2]+i*n[5]+a*n[8],e}function me(e,t,n){let r=n[0],i=n[1],a=n[2],o=n[3],s=t[0],c=t[1],l=t[2],u=i*l-a*c,d=a*s-r*l,f=r*c-i*s,p=i*f-a*d,m=a*u-r*f,h=r*d-i*u,g=o*2;return u*=g,d*=g,f*=g,p*=2,m*=2,h*=2,e[0]=s+u+p,e[1]=c+d+m,e[2]=l+f+h,e}function he(e,t,n,r){let i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function ge(e,t,n,r){let i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function _e(e,t,n,r){let i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function ve(e,t){let n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],s=t[2],c=Math.sqrt((n*n+r*r+i*i)*(a*a+o*o+s*s)),l=c&&de(e,t)/c;return Math.acos(Math.min(Math.max(l,-1),1))}var ye=ce;(function(){let e=se();return function(t,n,r,i,a,o){let s,c;for(n||=3,r||=0,c=i?Math.min(i*n+r,t.length):t.length,s=r;s<c;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}})();var be=[0,0,0],xe,Se,Ce,we,V=class e extends ee{static get ZERO(){return xe||(xe=new e(0,0,0),Object.freeze(xe)),xe}static get X_AXIS(){return Se||(Se=new e(1,0,0),Object.freeze(Se)),Se}static get Y_AXIS(){return Ce||(Ce=new e(0,1,0),Object.freeze(Ce)),Ce}static get Z_AXIS(){return we||(we=new e(0,0,1),Object.freeze(we)),we}constructor(e=0,t=0,n=0){super(-0,-0,-0),arguments.length===1&&S(e)?this.copy(e):(b.debug&&(P(e),P(t),P(n)),this[0]=e,this[1]=t,this[2]=n)}set(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return b.debug&&(P(e.x),P(e.y),P(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=P(e)}angle(e){return ve(this,e)}static cross(e,t,n){return n||=[-0,-0,-0],fe(n,e,t),n}cross(e){return fe(this,this,e),this.check()}rotateX({radians:e,origin:t=be}){return he(this,this,t,e),this.check()}rotateY({radians:e,origin:t=be}){return ge(this,this,t,e),this.check()}rotateZ({radians:e,origin:t=be}){return _e(this,this,t,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return B(this,this,e),this.check()}transformAsVector(e){return ae(this,this,e),this.check()}transformByMatrix3(e){return pe(this,this,e),this.check()}transformByMatrix2(e){return oe(this,this,e),this.check()}transformByQuaternion(e){return me(this,this,e),this.check()}},Te,Ee=class e extends ee{static get ZERO(){return Te||(Te=new e(0,0,0,0),Object.freeze(Te)),Te}constructor(e=0,t=0,n=0,r=0){super(-0,-0,-0,-0),S(e)&&arguments.length===1?this.copy(e):(b.debug&&(P(e),P(t),P(n),P(r)),this[0]=e,this[1]=t,this[2]=n,this[3]=r)}set(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}fromObject(e){return b.debug&&(P(e.x),P(e.y),P(e.z),P(e.w)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e.w=this[3],e}get ELEMENTS(){return 4}get z(){return this[2]}set z(e){this[2]=P(e)}get w(){return this[3]}set w(e){this[3]=P(e)}transform(e){return B(this,this,e),this.check()}transformByMatrix3(e){return z(this,this,e),this.check()}transformByMatrix2(e){return R(this,this,e),this.check()}transformByQuaternion(e){return me(this,this,e),this.check()}applyMatrix4(e){return e.transform(this,this),this}},De=class extends M{toString(){let e=`[`;if(b.printRowMajor){e+=`row-major:`;for(let t=0;t<this.RANK;++t)for(let n=0;n<this.RANK;++n)e+=` ${this[n*this.RANK+t]}`}else{e+=`column-major:`;for(let t=0;t<this.ELEMENTS;++t)e+=` ${this[t]}`}return e+=`]`,e}getElementIndex(e,t){return t*this.RANK+e}getElement(e,t){return this[t*this.RANK+e]}setElement(e,t,n){return this[t*this.RANK+e]=P(n),this}getColumn(e,t=Array(this.RANK).fill(-0)){let n=e*this.RANK;for(let e=0;e<this.RANK;++e)t[e]=this[n+e];return t}setColumn(e,t){let n=e*this.RANK;for(let e=0;e<this.RANK;++e)this[n+e]=t[e];return this}};function Oe(){let e=new L(9);return L!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ke(e,t){if(e===t){let n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function Ae(e,t){let n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=u*o-s*l,f=-u*a+s*c,p=l*a-o*c,m=n*d+r*f+i*p;return m?(m=1/m,e[0]=d*m,e[1]=(-u*r+i*l)*m,e[2]=(s*r-i*o)*m,e[3]=f*m,e[4]=(u*n-i*c)*m,e[5]=(-s*n+i*a)*m,e[6]=p*m,e[7]=(-l*n+r*c)*m,e[8]=(o*n-r*a)*m,e):null}function je(e){let t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*(l*a-o*c)+n*(-l*i+o*s)+r*(c*i-a*s)}function Me(e,t,n){let r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=n[0],p=n[1],m=n[2],h=n[3],g=n[4],_=n[5],v=n[6],y=n[7],b=n[8];return e[0]=f*r+p*o+m*l,e[1]=f*i+p*s+m*u,e[2]=f*a+p*c+m*d,e[3]=h*r+g*o+_*l,e[4]=h*i+g*s+_*u,e[5]=h*a+g*c+_*d,e[6]=v*r+y*o+b*l,e[7]=v*i+y*s+b*u,e[8]=v*a+y*c+b*d,e}function Ne(e,t,n){let r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=n[0],p=n[1];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e[6]=f*r+p*o+l,e[7]=f*i+p*s+u,e[8]=f*a+p*c+d,e}function Pe(e,t,n){let r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=Math.sin(n),p=Math.cos(n);return e[0]=p*r+f*o,e[1]=p*i+f*s,e[2]=p*a+f*c,e[3]=p*o-f*r,e[4]=p*s-f*i,e[5]=p*c-f*a,e[6]=l,e[7]=u,e[8]=d,e}function Fe(e,t,n){let r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Ie(e,t){let n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,c=i+i,l=n*o,u=r*o,d=r*s,f=i*o,p=i*s,m=i*c,h=a*o,g=a*s,_=a*c;return e[0]=1-d-m,e[3]=u-_,e[6]=f+g,e[1]=u+_,e[4]=1-l-m,e[7]=p-h,e[2]=f-g,e[5]=p+h,e[8]=1-l-d,e}var Le=function(e){return e[e.COL0ROW0=0]=`COL0ROW0`,e[e.COL0ROW1=1]=`COL0ROW1`,e[e.COL0ROW2=2]=`COL0ROW2`,e[e.COL1ROW0=3]=`COL1ROW0`,e[e.COL1ROW1=4]=`COL1ROW1`,e[e.COL1ROW2=5]=`COL1ROW2`,e[e.COL2ROW0=6]=`COL2ROW0`,e[e.COL2ROW1=7]=`COL2ROW1`,e[e.COL2ROW2=8]=`COL2ROW2`,e}(Le||{}),Re=Object.freeze([1,0,0,0,1,0,0,0,1]),ze=class extends De{static get IDENTITY(){return Ue()}static get ZERO(){return He()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return Le}constructor(e,...t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(e)?this.copy(e):t.length>0?this.copy([e,...t]):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(Re)}fromObject(e){return this.check()}fromQuaternion(e){return Ie(this,e),this.check()}set(e,t,n,r,i,a,o,s,c){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=c,this.check()}setRowMajor(e,t,n,r,i,a,o,s,c){return this[0]=e,this[1]=r,this[2]=o,this[3]=t,this[4]=i,this[5]=s,this[6]=n,this[7]=a,this[8]=c,this.check()}determinant(){return je(this)}transpose(){return ke(this,this),this.check()}invert(){return Ae(this,this),this.check()}multiplyLeft(e){return Me(this,e,this),this.check()}multiplyRight(e){return Me(this,this,e),this.check()}rotate(e){return Pe(this,this,e),this.check()}scale(e){return Array.isArray(e)?Fe(this,this,e):Fe(this,this,[e,e]),this.check()}translate(e){return Ne(this,this,e),this.check()}transform(e,t){let n;switch(e.length){case 2:n=ne(t||[-0,-0],e,this);break;case 3:n=pe(t||[-0,-0,-0],e,this);break;case 4:n=z(t||[-0,-0,-0,-0],e,this);break;default:throw Error(`Illegal vector`)}return F(n,e.length),n}transformVector(e,t){return this.transform(e,t)}transformVector2(e,t){return this.transform(e,t)}transformVector3(e,t){return this.transform(e,t)}},Be,Ve=null;function He(){return Be||(Be=new ze([0,0,0,0,0,0,0,0,0]),Object.freeze(Be)),Be}function Ue(){return Ve||(Ve=new ze,Object.freeze(Ve)),Ve}function We(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Ge(e,t){if(e===t){let n=t[1],r=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function Ke(e,t){let n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14],_=t[15],v=n*s-r*o,y=n*c-i*o,b=n*l-a*o,x=r*c-i*s,S=r*l-a*s,C=i*l-a*c,w=u*h-d*m,T=u*g-f*m,E=u*_-p*m,D=d*g-f*h,O=d*_-p*h,k=f*_-p*g,A=v*k-y*O+b*D+x*E-S*T+C*w;return A?(A=1/A,e[0]=(s*k-c*O+l*D)*A,e[1]=(i*O-r*k-a*D)*A,e[2]=(h*C-g*S+_*x)*A,e[3]=(f*S-d*C-p*x)*A,e[4]=(c*E-o*k-l*T)*A,e[5]=(n*k-i*E+a*T)*A,e[6]=(g*b-m*C-_*y)*A,e[7]=(u*C-f*b+p*y)*A,e[8]=(o*O-s*E+l*w)*A,e[9]=(r*E-n*O-a*w)*A,e[10]=(m*S-h*b+_*v)*A,e[11]=(d*b-u*S-p*v)*A,e[12]=(s*T-o*D-c*w)*A,e[13]=(n*D-r*T+i*w)*A,e[14]=(h*y-m*x-g*v)*A,e[15]=(u*x-d*y+f*v)*A,e):null}function qe(e){let t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],h=e[14],g=e[15],_=t*o-n*a,v=t*s-r*a,y=n*s-r*o,b=l*m-u*p,x=l*h-d*p,S=u*h-d*m,C=t*S-n*x+r*b,w=a*S-o*x+s*b,T=l*y-u*v+d*_,E=p*y-m*v+h*_;return c*C-i*w+g*T-f*E}function Je(e,t,n){let r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15],y=n[0],b=n[1],x=n[2],S=n[3];return e[0]=y*r+b*s+x*d+S*h,e[1]=y*i+b*c+x*f+S*g,e[2]=y*a+b*l+x*p+S*_,e[3]=y*o+b*u+x*m+S*v,y=n[4],b=n[5],x=n[6],S=n[7],e[4]=y*r+b*s+x*d+S*h,e[5]=y*i+b*c+x*f+S*g,e[6]=y*a+b*l+x*p+S*_,e[7]=y*o+b*u+x*m+S*v,y=n[8],b=n[9],x=n[10],S=n[11],e[8]=y*r+b*s+x*d+S*h,e[9]=y*i+b*c+x*f+S*g,e[10]=y*a+b*l+x*p+S*_,e[11]=y*o+b*u+x*m+S*v,y=n[12],b=n[13],x=n[14],S=n[15],e[12]=y*r+b*s+x*d+S*h,e[13]=y*i+b*c+x*f+S*g,e[14]=y*a+b*l+x*p+S*_,e[15]=y*o+b*u+x*m+S*v,e}function Ye(e,t,n){let r=n[0],i=n[1],a=n[2],o,s,c,l,u,d,f,p,m,h,g,_;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*a+t[12],e[13]=t[1]*r+t[5]*i+t[9]*a+t[13],e[14]=t[2]*r+t[6]*i+t[10]*a+t[14],e[15]=t[3]*r+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],c=t[2],l=t[3],u=t[4],d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],e[0]=o,e[1]=s,e[2]=c,e[3]=l,e[4]=u,e[5]=d,e[6]=f,e[7]=p,e[8]=m,e[9]=h,e[10]=g,e[11]=_,e[12]=o*r+u*i+m*a+t[12],e[13]=s*r+d*i+h*a+t[13],e[14]=c*r+f*i+g*a+t[14],e[15]=l*r+p*i+_*a+t[15]),e}function Xe(e,t,n){let r=n[0],i=n[1],a=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Ze(e,t,n,r){let i=r[0],a=r[1],o=r[2],s=Math.sqrt(i*i+a*a+o*o),c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j;return s<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(n),c=Math.cos(n),u=1-c,d=t[0],f=t[1],p=t[2],m=t[3],h=t[4],g=t[5],_=t[6],v=t[7],y=t[8],b=t[9],x=t[10],S=t[11],C=i*i*u+c,w=a*i*u+o*l,T=o*i*u-a*l,E=i*a*u-o*l,D=a*a*u+c,O=o*a*u+i*l,k=i*o*u+a*l,A=a*o*u-i*l,j=o*o*u+c,e[0]=d*C+h*w+y*T,e[1]=f*C+g*w+b*T,e[2]=p*C+_*w+x*T,e[3]=m*C+v*w+S*T,e[4]=d*E+h*D+y*O,e[5]=f*E+g*D+b*O,e[6]=p*E+_*D+x*O,e[7]=m*E+v*D+S*O,e[8]=d*k+h*A+y*j,e[9]=f*k+g*A+b*j,e[10]=p*k+_*A+x*j,e[11]=m*k+v*A+S*j,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function Qe(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+l*r,e[5]=o*i+u*r,e[6]=s*i+d*r,e[7]=c*i+f*r,e[8]=l*i-a*r,e[9]=u*i-o*r,e[10]=d*i-s*r,e[11]=f*i-c*r,e}function $e(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],c=t[3],l=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-l*r,e[1]=o*i-u*r,e[2]=s*i-d*r,e[3]=c*i-f*r,e[8]=a*r+l*i,e[9]=o*r+u*i,e[10]=s*r+d*i,e[11]=c*r+f*i,e}function et(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],c=t[3],l=t[4],u=t[5],d=t[6],f=t[7];return t!==e&&(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[0]=a*i+l*r,e[1]=o*i+u*r,e[2]=s*i+d*r,e[3]=c*i+f*r,e[4]=l*i-a*r,e[5]=u*i-o*r,e[6]=d*i-s*r,e[7]=f*i-c*r,e}function tt(e,t,n){let r=t[0],i=t[1],a=t[2],o=t[3],s=r+r,c=i+i,l=a+a,u=r*s,d=r*c,f=r*l,p=i*c,m=i*l,h=a*l,g=o*s,_=o*c,v=o*l;return e[0]=1-(p+h),e[1]=d+v,e[2]=f-_,e[3]=0,e[4]=d-v,e[5]=1-(u+h),e[6]=m+g,e[7]=0,e[8]=f+_,e[9]=m-g,e[10]=1-(u+p),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function nt(e,t){let n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,c=i+i,l=n*o,u=r*o,d=r*s,f=i*o,p=i*s,m=i*c,h=a*o,g=a*s,_=a*c;return e[0]=1-d-m,e[1]=u+_,e[2]=f-g,e[3]=0,e[4]=u-_,e[5]=1-l-m,e[6]=p+h,e[7]=0,e[8]=f+g,e[9]=p-h,e[10]=1-l-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function rt(e,t,n,r,i,a,o){let s=1/(n-t),c=1/(i-r),l=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*c,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*c,e[10]=(o+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*l,e[15]=0,e}function it(e,t,n,r,i){let a=1/Math.tan(t/2);if(e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0){let t=1/(r-i);e[10]=(i+r)*t,e[14]=2*i*r*t}else e[10]=-1,e[14]=-2*r;return e}var at=it;function ot(e,t,n,r,i,a,o){let s=1/(t-n),c=1/(r-i),l=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*c,e[14]=(o+a)*l,e[15]=1,e}var st=ot;function ct(e,t,n,r){let i,a,o,s,c,l,u,d,f,p,m=t[0],h=t[1],g=t[2],_=r[0],v=r[1],y=r[2],b=n[0],x=n[1],S=n[2];return Math.abs(m-b)<1e-6&&Math.abs(h-x)<1e-6&&Math.abs(g-S)<1e-6?We(e):(d=m-b,f=h-x,p=g-S,i=1/Math.sqrt(d*d+f*f+p*p),d*=i,f*=i,p*=i,a=v*p-y*f,o=y*d-_*p,s=_*f-v*d,i=Math.sqrt(a*a+o*o+s*s),i?(i=1/i,a*=i,o*=i,s*=i):(a=0,o=0,s=0),c=f*s-p*o,l=p*a-d*s,u=d*o-f*a,i=Math.sqrt(c*c+l*l+u*u),i?(i=1/i,c*=i,l*=i,u*=i):(c=0,l=0,u=0),e[0]=a,e[1]=c,e[2]=d,e[3]=0,e[4]=o,e[5]=l,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=p,e[11]=0,e[12]=-(a*m+o*h+s*g),e[13]=-(c*m+l*h+u*g),e[14]=-(d*m+f*h+p*g),e[15]=1,e)}function lt(){let e=new L(4);return L!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function ut(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function dt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function ft(e){let t=e[0],n=e[1],r=e[2],i=e[3];return Math.sqrt(t*t+n*n+r*r+i*i)}function pt(e){let t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}function mt(e,t){let n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=r*o,e[2]=i*o,e[3]=a*o,e}function ht(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function gt(e,t,n,r){let i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e[3]=s+r*(n[3]-s),e}function _t(e,t,n){let r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,e}function vt(e,t,n){let r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],c=n[2],l=n[3],u=l*r+s*a-c*i,d=l*i+c*r-o*a,f=l*a+o*i-s*r,p=-o*r-s*i-c*a;return e[0]=u*l+p*-o+d*-c-f*-s,e[1]=d*l+p*-s+f*-o-u*-c,e[2]=f*l+p*-c+u*-s-d*-o,e[3]=t[3],e}(function(){let e=lt();return function(t,n,r,i,a,o){let s,c;for(n||=4,r||=0,c=i?Math.min(i*n+r,t.length):t.length,s=r;s<c;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}})();var yt=function(e){return e[e.COL0ROW0=0]=`COL0ROW0`,e[e.COL0ROW1=1]=`COL0ROW1`,e[e.COL0ROW2=2]=`COL0ROW2`,e[e.COL0ROW3=3]=`COL0ROW3`,e[e.COL1ROW0=4]=`COL1ROW0`,e[e.COL1ROW1=5]=`COL1ROW1`,e[e.COL1ROW2=6]=`COL1ROW2`,e[e.COL1ROW3=7]=`COL1ROW3`,e[e.COL2ROW0=8]=`COL2ROW0`,e[e.COL2ROW1=9]=`COL2ROW1`,e[e.COL2ROW2=10]=`COL2ROW2`,e[e.COL2ROW3=11]=`COL2ROW3`,e[e.COL3ROW0=12]=`COL3ROW0`,e[e.COL3ROW1=13]=`COL3ROW1`,e[e.COL3ROW2=14]=`COL3ROW2`,e[e.COL3ROW3=15]=`COL3ROW3`,e}(yt||{}),bt=45*Math.PI/180,xt=1,St=.1,Ct=500,wt=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),Tt=class extends De{static get IDENTITY(){return kt()}static get ZERO(){return Ot()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return yt}constructor(e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(e)?this.copy(e):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[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=c,this[9]=l,this[10]=u,this[11]=d,this[12]=f,this[13]=p,this[14]=m,this[15]=h,this.check()}setRowMajor(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){return this[0]=e,this[1]=i,this[2]=c,this[3]=f,this[4]=t,this[5]=a,this[6]=l,this[7]=p,this[8]=n,this[9]=o,this[10]=u,this[11]=m,this[12]=r,this[13]=s,this[14]=d,this[15]=h,this.check()}toRowMajor(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}identity(){return this.copy(wt)}fromObject(e){return this.check()}fromQuaternion(e){return nt(this,e),this.check()}fromTranslationQuaternion(e,t){return tt(this,t,e),this.check()}frustum(e){let{left:t,right:n,bottom:r,top:i,near:a=St,far:o=Ct}=e;return o===1/0?jt(this,t,n,r,i,a):rt(this,t,n,r,i,a,o),this.check()}lookAt(e){let{eye:t,center:n=[0,0,0],up:r=[0,1,0]}=e;return ct(this,t,n,r),this.check()}ortho(e){let{left:t,right:n,bottom:r,top:i,near:a=St,far:o=Ct}=e;return st(this,t,n,r,i,a,o),this.check()}orthographic(e){let{fovy:t=bt,aspect:n=xt,focalDistance:r=1,near:i=St,far:a=Ct}=e;At(t);let o=t/2,s=r*Math.tan(o),c=s*n;return this.ortho({left:-c,right:c,bottom:-s,top:s,near:i,far:a})}perspective(e){let{fovy:t=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}=e;return At(t),at(this,t,n,r,i),this.check()}determinant(){return qe(this)}getScale(e=[-0,-0,-0]){return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}getTranslation(e=[-0,-0,-0]){return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}getRotation(e=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t){t||=[-0,-0,-0];let n=this.getScale(t),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}getRotationMatrix3(e=[-0,-0,-0,-0,-0,-0,-0,-0,-0],t){t||=[-0,-0,-0];let n=this.getScale(t),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}transpose(){return Ge(this,this),this.check()}invert(){return Ke(this,this),this.check()}multiplyLeft(e){return Je(this,e,this),this.check()}multiplyRight(e){return Je(this,this,e),this.check()}rotateX(e){return Qe(this,this,e),this.check()}rotateY(e){return $e(this,this,e),this.check()}rotateZ(e){return et(this,this,e),this.check()}rotateXYZ(e){return this.rotateX(e[0]).rotateY(e[1]).rotateZ(e[2])}rotateAxis(e,t){return Ze(this,this,e,t),this.check()}scale(e){return Xe(this,this,Array.isArray(e)?e:[e,e,e]),this.check()}translate(e){return Ye(this,this,e),this.check()}transform(e,t){return e.length===4?(t=_t(t||[-0,-0,-0,-0],e,this),F(t,4),t):this.transformAsPoint(e,t)}transformAsPoint(e,t){let{length:n}=e,r;switch(n){case 2:r=re(t||[-0,-0],e,this);break;case 3:r=B(t||[-0,-0,-0],e,this);break;default:throw Error(`Illegal vector`)}return F(r,e.length),r}transformAsVector(e,t){let n;switch(e.length){case 2:n=ie(t||[-0,-0],e,this);break;case 3:n=ae(t||[-0,-0,-0],e,this);break;default:throw Error(`Illegal vector`)}return F(n,e.length),n}transformPoint(e,t){return this.transformAsPoint(e,t)}transformVector(e,t){return this.transformAsPoint(e,t)}transformDirection(e,t){return this.transformAsVector(e,t)}makeRotationX(e){return this.identity().rotateX(e)}makeTranslation(e,t,n){return this.identity().translate([e,t,n])}},Et,Dt;function Ot(){return Et||(Et=new Tt([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(Et)),Et}function kt(){return Dt||(Dt=new Tt,Object.freeze(Dt)),Dt}function At(e){if(e>Math.PI*2)throw Error(`expected radians`)}function jt(e,t,n,r,i,a){let o=2*a/(n-t),s=2*a/(i-r),c=(n+t)/(n-t),l=(i+r)/(i-r),u=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=c,e[9]=l,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=u,e[15]=0,e}function Mt(){let e=new L(4);return L!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Nt(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function Pt(e,t,n){n*=.5;let r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function Ft(e,t,n){let r=t[0],i=t[1],a=t[2],o=t[3],s=n[0],c=n[1],l=n[2],u=n[3];return e[0]=r*u+o*s+i*l-a*c,e[1]=i*u+o*c+a*s-r*l,e[2]=a*u+o*l+r*c-i*s,e[3]=o*u-r*s-i*c-a*l,e}function It(e,t,n){n*=.5;let r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c+o*s,e[1]=i*c+a*s,e[2]=a*c-i*s,e[3]=o*c-r*s,e}function Lt(e,t,n){n*=.5;let r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c-a*s,e[1]=i*c+o*s,e[2]=a*c+r*s,e[3]=o*c-i*s,e}function Rt(e,t,n){n*=.5;let r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c+i*s,e[1]=i*c-r*s,e[2]=a*c+o*s,e[3]=o*c-a*s,e}function zt(e,t){let n=t[0],r=t[1],i=t[2];return e[0]=n,e[1]=r,e[2]=i,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),e}function Bt(e,t,n,r){let i=t[0],a=t[1],o=t[2],s=t[3],c=n[0],l=n[1],u=n[2],d=n[3],f,p,m,h,g;return f=i*c+a*l+o*u+s*d,f<0&&(f=-f,c=-c,l=-l,u=-u,d=-d),1-f>1e-6?(p=Math.acos(f),g=Math.sin(p),m=Math.sin((1-r)*p)/g,h=Math.sin(r*p)/g):(m=1-r,h=r),e[0]=m*i+h*c,e[1]=m*a+h*l,e[2]=m*o+h*u,e[3]=m*s+h*d,e}function Vt(e,t){let n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return e[0]=-n*s,e[1]=-r*s,e[2]=-i*s,e[3]=a*s,e}function Ht(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Ut(e,t){let n=t[0]+t[4]+t[8],r;if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{let n=0;t[4]>t[0]&&(n=1),t[8]>t[n*3+n]&&(n=2);let i=(n+1)%3,a=(n+2)%3;r=Math.sqrt(t[n*3+n]-t[i*3+i]-t[a*3+a]+1),e[n]=.5*r,r=.5/r,e[3]=(t[i*3+a]-t[a*3+i])*r,e[i]=(t[i*3+n]+t[n*3+i])*r,e[a]=(t[a*3+n]+t[n*3+a])*r}return e}function Wt(e,t,n,r,i=0){t*=.5,r*=.5,n*=.5;let a=Math.sin(t),o=Math.cos(t),s=Math.sin(n),c=Math.cos(n),l=Math.sin(r),u=Math.cos(r);switch(i){case 0:e[0]=a*c*u-o*s*l,e[1]=o*s*u+a*c*l,e[2]=o*c*l-a*s*u,e[3]=o*c*u+a*s*l;break;case 1:e[0]=a*c*u+o*s*l,e[1]=o*s*u-a*c*l,e[2]=o*c*l-a*s*u,e[3]=o*c*u+a*s*l;break;case 2:e[0]=a*c*u-o*s*l,e[1]=o*s*u-a*c*l,e[2]=o*c*l+a*s*u,e[3]=o*c*u+a*s*l;break;case 3:e[0]=a*c*u-o*s*l,e[1]=o*s*u+a*c*l,e[2]=o*c*l+a*s*u,e[3]=o*c*u-a*s*l;break;case 4:e[0]=a*c*u+o*s*l,e[1]=o*s*u+a*c*l,e[2]=o*c*l-a*s*u,e[3]=o*c*u-a*s*l;break;case 5:e[0]=a*c*u+o*s*l,e[1]=o*s*u-a*c*l,e[2]=o*c*l+a*s*u,e[3]=o*c*u-a*s*l;break;default:throw Error(`Unknown angle order `+i)}return e}var Gt=ut,Kt=dt,qt=ht,Jt=gt,Yt=ft,Xt=pt,Zt=mt,Qt=(function(){let e=se(),t=le(1,0,0),n=le(0,1,0);return function(r,i,a){let o=de(i,a);return o<-.999999?(fe(e,t,i),ye(e)<1e-6&&fe(e,n,i),ue(e,e),Pt(r,e,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(fe(e,i,a),r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=1+o,Zt(r,r))}})();(function(){let e=Mt(),t=Mt();return function(n,r,i,a,o,s){return Bt(e,r,o,s),Bt(t,i,a,s),Bt(n,e,t,2*s*(1-s)),n}})(),(function(){let e=Oe();return function(t,n,r,i){return e[0]=r[0],e[3]=r[1],e[6]=r[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-n[0],e[5]=-n[1],e[8]=-n[2],Zt(t,Ut(t,e))}})();var $t=[0,0,0,1],H=class extends M{constructor(e=0,t=0,n=0,r=1){super(-0,-0,-0,-0),Array.isArray(e)&&arguments.length===1?this.copy(e):this.set(e,t,n,r)}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}set(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,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 Ut(this,e),this.check()}fromAxisRotation(e,t){return Pt(this,e,t),this.check()}fromEuler(e){return Wt(this,e.x,e.y,e.z,e.order),this.check()}identity(){return Nt(this),this.check()}setAxisAngle(e,t){return this.fromAxisRotation(e,t)}get ELEMENTS(){return 4}get x(){return this[0]}set x(e){this[0]=P(e)}get y(){return this[1]}set y(e){this[1]=P(e)}get z(){return this[2]}set z(e){this[2]=P(e)}get w(){return this[3]}set w(e){this[3]=P(e)}len(){return Yt(this)}lengthSquared(){return Xt(this)}dot(e){return qt(this,e)}rotationTo(e,t){return Qt(this,e,t),this.check()}add(e){return Gt(this,this,e),this.check()}calculateW(){return zt(this,this),this.check()}conjugate(){return Ht(this,this),this.check()}invert(){return Vt(this,this),this.check()}lerp(e,t,n){return n===void 0?this.lerp(this,e,t):(Jt(this,e,t,n),this.check())}multiplyRight(e){return Ft(this,this,e),this.check()}multiplyLeft(e){return Ft(this,e,this),this.check()}normalize(){let e=this.len(),t=e>0?1/e:0;return this[0]*=t,this[1]*=t,this[2]*=t,this[3]*=t,e===0&&(this[3]=1),this.check()}rotateX(e){return It(this,this,e),this.check()}rotateY(e){return Lt(this,this,e),this.check()}rotateZ(e){return Rt(this,this,e),this.check()}scale(e){return Kt(this,this,e),this.check()}slerp(e,t,n){let r,i,a;switch(arguments.length){case 1:({start:r=$t,target:i,ratio:a}=e);break;case 2:r=this,i=e,a=t;break;default:r=e,i=t,a=n}return Bt(this,r,i,a),this.check()}transformVector4(e,t=new Ee){return vt(t,e,this),F(t,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(e,t){return this.setAxisAngle(e,t)}premultiply(e){return this.multiplyLeft(e)}multiply(e){return this.multiplyRight(e)}},en=`Unknown Euler angle order`,tn=.99999,nn=function(e){return e[e.ZYX=0]=`ZYX`,e[e.YXZ=1]=`YXZ`,e[e.XZY=2]=`XZY`,e[e.ZXY=3]=`ZXY`,e[e.YZX=4]=`YZX`,e[e.XYZ=5]=`XYZ`,e}(nn||{}),rn=class e extends M{static get ZYX(){return 0}static get YXZ(){return 1}static get XZY(){return 2}static get ZXY(){return 3}static get YZX(){return 4}static get XYZ(){return 5}static get RollPitchYaw(){return 0}static get DefaultOrder(){return 0}static get RotationOrders(){return nn}static rotationOrder(e){return nn[e]}get ELEMENTS(){return 4}constructor(t=0,n=0,r=0,i=e.DefaultOrder){super(-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])?this.fromVector3(...rest):this.set(t,n,r,i)}fromQuaternion(t){let[n,r,i,a]=t,o=r*r,s=-2*(o+i*i)+1,c=2*(n*r+a*i),l=-2*(n*i-a*r),u=2*(r*i+a*n),d=-2*(n*n+o)+1;l=l>1?1:l,l=l<-1?-1:l;let f=Math.atan2(u,d),p=Math.asin(l),m=Math.atan2(c,s);return this.set(f,p,m,e.RollPitchYaw)}fromObject(e){throw Error(`not implemented`)}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=Number.isFinite(e[3])||this.order,this.check()}set(e=0,t=0,n=0,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=Number.isFinite(r)?r:this[3],this.check()}validate(){return an(this[3])&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2])}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e}toArray4(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e[t+3]=this[3],e}toVector3(e=[-0,-0,-0]){return e[0]=this[0],e[1]=this[1],e[2]=this[2],e}toHeadingPitchRoll(e=[-0,-0,-0]){switch(this[3]){case 5:e[0]=-this[0],e[1]=-this[1],e[2]=this[2];break;case 1:e[0]=-this[1],e[1]=-this[0],e[2]=this[2];break;case 3:e[0]=-this[2],e[1]=-this[0],e[2]=this[1];break;case 0:e[0]=-this[2],e[1]=-this[1],e[2]=this[0];break;case 4:e[0]=-this[1],e[1]=-this[2],e[2]=this[0];break;case 2:e[0]=-this[0],e[1]=-this[2],e[2]=this[1];break;default:throw Error(en)}return e}get x(){return this[0]}set x(e){this[0]=P(e)}get y(){return this[1]}set y(e){this[1]=P(e)}get z(){return this[2]}set z(e){this[2]=P(e)}get alpha(){return this[0]}set alpha(e){this[0]=P(e)}get beta(){return this[1]}set beta(e){this[1]=P(e)}get gamma(){return this[2]}set gamma(e){this[2]=P(e)}get phi(){return this[0]}set phi(e){this[0]=P(e)}get theta(){return this[1]}set theta(e){this[1]=P(e)}get psi(){return this[2]}set psi(e){this[2]=P(e)}get roll(){return this[0]}set roll(e){this[0]=P(e)}get pitch(){return this[1]}set pitch(e){this[1]=P(e)}get yaw(){return this[2]}set yaw(e){this[2]=P(e)}get order(){return this[3]}set order(e){this[3]=on(e)}fromVector3(e,t){return this.set(e[0],e[1],e[2],Number.isFinite(t)?t:this[3])}fromArray(e,t=0){return this[0]=e[0+t],this[1]=e[1+t],this[2]=e[2+t],e[3]!==void 0&&(this[3]=e[3]),this.check()}fromRollPitchYaw(e,t,n){return this.set(e,t,n,0)}fromRotationMatrix(t,n=e.DefaultOrder){return this._fromRotationMatrix(t,n),this.check()}getRotationMatrix(e){return this._getRotationMatrix(e)}getQuaternion(){let e=new H;switch(this[3]){case 5:return e.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case 1:return e.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case 3:return e.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case 0:return e.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case 4:return e.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case 2:return e.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw Error(en)}}_fromRotationMatrix(t,n=e.DefaultOrder){let r=t[0],i=t[4],a=t[8],o=t[1],s=t[5],c=t[9],l=t[2],u=t[6],d=t[10];switch(n||=this[3],n){case e.XYZ:this[1]=Math.asin(D(a,-1,1)),Math.abs(a)<tn?(this[0]=Math.atan2(-c,d),this[2]=Math.atan2(-i,r)):(this[0]=Math.atan2(u,s),this[2]=0);break;case e.YXZ:this[0]=Math.asin(-D(c,-1,1)),Math.abs(c)<tn?(this[1]=Math.atan2(a,d),this[2]=Math.atan2(o,s)):(this[1]=Math.atan2(-l,r),this[2]=0);break;case e.ZXY:this[0]=Math.asin(D(u,-1,1)),Math.abs(u)<tn?(this[1]=Math.atan2(-l,d),this[2]=Math.atan2(-i,s)):(this[1]=0,this[2]=Math.atan2(o,r));break;case e.ZYX:this[1]=Math.asin(-D(l,-1,1)),Math.abs(l)<tn?(this[0]=Math.atan2(u,d),this[2]=Math.atan2(o,r)):(this[0]=0,this[2]=Math.atan2(-i,s));break;case e.YZX:this[2]=Math.asin(D(o,-1,1)),Math.abs(o)<tn?(this[0]=Math.atan2(-c,s),this[1]=Math.atan2(-l,r)):(this[0]=0,this[1]=Math.atan2(a,d));break;case e.XZY:this[2]=Math.asin(-D(i,-1,1)),Math.abs(i)<tn?(this[0]=Math.atan2(u,s),this[1]=Math.atan2(a,r)):(this[0]=Math.atan2(-c,d),this[1]=0);break;default:throw Error(en)}return this[3]=n,this}_getRotationMatrix(t){let n=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],r=this.x,i=this.y,a=this.z,o=Math.cos(r),s=Math.cos(i),c=Math.cos(a),l=Math.sin(r),u=Math.sin(i),d=Math.sin(a);switch(this[3]){case e.XYZ:{let e=o*c,t=o*d,r=l*c,i=l*d;n[0]=s*c,n[4]=-s*d,n[8]=u,n[1]=t+r*u,n[5]=e-i*u,n[9]=-l*s,n[2]=i-e*u,n[6]=r+t*u,n[10]=o*s;break}case e.YXZ:{let e=s*c,t=s*d,r=u*c,i=u*d;n[0]=e+i*l,n[4]=r*l-t,n[8]=o*u,n[1]=o*d,n[5]=o*c,n[9]=-l,n[2]=t*l-r,n[6]=i+e*l,n[10]=o*s;break}case e.ZXY:{let e=s*c,t=s*d,r=u*c,i=u*d;n[0]=e-i*l,n[4]=-o*d,n[8]=r+t*l,n[1]=t+r*l,n[5]=o*c,n[9]=i-e*l,n[2]=-o*u,n[6]=l,n[10]=o*s;break}case e.ZYX:{let e=o*c,t=o*d,r=l*c,i=l*d;n[0]=s*c,n[4]=r*u-t,n[8]=e*u+i,n[1]=s*d,n[5]=i*u+e,n[9]=t*u-r,n[2]=-u,n[6]=l*s,n[10]=o*s;break}case e.YZX:{let e=o*s,t=o*u,r=l*s,i=l*u;n[0]=s*c,n[4]=i-e*d,n[8]=r*d+t,n[1]=d,n[5]=o*c,n[9]=-l*c,n[2]=-u*c,n[6]=t*d+r,n[10]=e-i*d;break}case e.XZY:{let e=o*s,t=o*u,r=l*s,i=l*u;n[0]=s*c,n[4]=-d,n[8]=u*c,n[1]=e*d+i,n[5]=o*c,n[9]=t*d-r,n[2]=r*d-t,n[6]=l*c,n[10]=i*d+e;break}default:throw Error(en)}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}toQuaternion(){let e=Math.cos(this.yaw*.5),t=Math.sin(this.yaw*.5),n=Math.cos(this.roll*.5),r=Math.sin(this.roll*.5),i=Math.cos(this.pitch*.5),a=Math.sin(this.pitch*.5),o=e*n*i+t*r*a;return new H(e*r*i-t*n*a,e*n*a+t*r*i,t*n*i-e*r*a,o)}};function an(e){return e>=0&&e<6}function on(e){if(e<0&&e>=6)throw Error(en);return e}var sn=.1,cn=1e-12,ln=1e-15;Math.PI/2,Math.PI/4,Math.PI/6,Math.PI*2;var un=6378137,dn=6378137,fn=6356752.314245179;un*un,dn*dn,fn*fn,1/un,1/dn,1/fn,1/(un*un),1/(dn*dn),1/(fn*fn);function pn(e){return e}new V;function mn(e,t=[],n=pn){return`longitude`in e?(t[0]=n(e.longitude),t[1]=n(e.latitude),t[2]=e.height):`x`in e?(t[0]=n(e.x),t[1]=n(e.y),t[2]=e.z):(t[0]=n(e[0]),t[1]=n(e[1]),t[2]=e[2]),t}function hn(e,t=[]){return mn(e,t,b._cartographicRadians?pn:C)}function gn(e,t,n=pn){return`longitude`in t?(t.longitude=n(e[0]),t.latitude=n(e[1]),t.height=e[2]):`x`in t?(t.x=n(e[0]),t.y=n(e[1]),t.z=e[2]):(t[0]=n(e[0]),t[1]=n(e[1]),t[2]=e[2]),t}function _n(e,t){return gn(e,t,b._cartographicRadians?pn:w)}var vn=1e-14,yn=new V,bn={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`}},xn={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Sn={east:new V,north:new V,up:new V,west:new V,south:new V,down:new V},Cn=new V,wn=new V,Tn=new V;function En(e,t,n,r,i,a){let o=bn[t]&&bn[t][n];I(o&&(!r||r===o));let s,c,l,u=yn.copy(i);if(O(u.x,0,vn)&&O(u.y,0,vn)){let e=Math.sign(u.z);s=Cn.fromArray(xn[t]),t!==`east`&&t!==`west`&&s.scale(e),c=wn.fromArray(xn[n]),n!==`east`&&n!==`west`&&c.scale(e),l=Tn.fromArray(xn[r]),r!==`east`&&r!==`west`&&l.scale(e)}else{let{up:i,east:a,north:o}=Sn;a.set(-u.y,u.x,0).normalize(),e.geodeticSurfaceNormal(u,i),o.copy(i).cross(a);let{down:d,west:f,south:p}=Sn;d.copy(i).scale(-1),f.copy(a).scale(-1),p.copy(o).scale(-1),s=Sn[t],c=Sn[n],l=Sn[r]}return a[0]=s.x,a[1]=s.y,a[2]=s.z,a[3]=0,a[4]=c.x,a[5]=c.y,a[6]=c.z,a[7]=0,a[8]=l.x,a[9]=l.y,a[10]=l.z,a[11]=0,a[12]=u.x,a[13]=u.y,a[14]=u.z,a[15]=1,a}var Dn=new V,On=new V,kn=new V;function An(e,t,n=[]){let{oneOverRadii:r,oneOverRadiiSquared:i,centerToleranceSquared:a}=t;Dn.from(e);let o=Dn.x,s=Dn.y,c=Dn.z,l=r.x,u=r.y,d=r.z,f=o*o*l*l,p=s*s*u*u,m=c*c*d*d,h=f+p+m,g=Math.sqrt(1/h);if(!Number.isFinite(g))return;let _=On;if(_.copy(e).scale(g),h<a)return _.to(n);let v=i.x,y=i.y,b=i.z,x=kn;x.set(_.x*v*2,_.y*y*2,_.z*b*2);let S=(1-g)*Dn.len()/(.5*x.len()),C=0,w,T,E,D;do{S-=C,w=1/(1+S*v),T=1/(1+S*y),E=1/(1+S*b);let e=w*w,t=T*T,n=E*E,r=e*w,i=t*T,a=n*E;D=f*e+p*t+m*n-1;let o=-2*(f*r*v+p*i*y+m*a*b);C=D/o}while(Math.abs(D)>cn);return Dn.scale([w,T,E]).to(n)}var jn=new V,Mn=new V,Nn=new V,U=new V,Pn=new V,Fn=new V,In=new H,Ln=new Tt,Rn=new ze,zn=new ze,Bn=new V,Vn=new V,Hn=new V,Un=new H,Wn=new Tt,Gn=new ze,Kn=class e{static WGS84=new e(un,dn,fn);radii;radiiSquared;radiiToTheFourth;oneOverRadii;oneOverRadiiSquared;minimumRadius;maximumRadius;centerToleranceSquared=sn;squaredXOverSquaredZ=0;constructor(e=0,t=0,n=0){I(e>=0),I(t>=0),I(n>=0),this.radii=new V(e,t,n),this.radiiSquared=new V(e*e,t*t,n*n),this.radiiToTheFourth=new V(e*e*e*e,t*t*t*t,n*n*n*n),this.oneOverRadii=new V(e===0?0:1/e,t===0?0:1/t,n===0?0:1/n),this.oneOverRadiiSquared=new V(e===0?0:1/(e*e),t===0?0:1/(t*t),n===0?0:1/(n*n)),this.minimumRadius=Math.min(e,t,n),this.maximumRadius=Math.max(e,t,n),this.radiiSquared.z!==0&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(e){return this===e||!!(e&&this.radii.equals(e.radii))}toString(){return this.radii.toString()}cartographicToCartesian(e,t=[0,0,0]){let n=Mn,r=Nn,[,,i]=e;this.geodeticSurfaceNormalCartographic(e,n),r.copy(this.radiiSquared).scale(n);let a=Math.sqrt(n.dot(r));return r.scale(1/a),n.scale(i),r.add(n),r.to(t)}cartesianToCartographic(e,t=[0,0,0]){Fn.from(e);let n=this.scaleToGeodeticSurface(Fn,U);if(!n)return;let r=this.geodeticSurfaceNormal(n,Mn),i=Pn;return i.copy(Fn).subtract(n),_n([Math.atan2(r.y,r.x),Math.asin(r.z),Math.sign(de(i,Fn))*ce(i)],t)}eastNorthUpToFixedFrame(e,t=new Tt){return En(this,`east`,`north`,`up`,e,t)}localFrameToFixedFrame(e,t,n,r,i=new Tt){return En(this,e,t,n,r,i)}geocentricSurfaceNormal(e,t=[0,0,0]){return jn.from(e).normalize().to(t)}geodeticSurfaceNormalCartographic(e,t=[0,0,0]){let n=hn(e),r=n[0],i=n[1],a=Math.cos(i);return jn.set(a*Math.cos(r),a*Math.sin(r),Math.sin(i)).normalize(),jn.to(t)}geodeticSurfaceNormal(e,t=[0,0,0]){return jn.from(e).scale(this.oneOverRadiiSquared).normalize().to(t)}scaleToGeodeticSurface(e,t){return An(e,this,t)}scaleToGeocentricSurface(e,t=[0,0,0]){U.from(e);let n=U.x,r=U.y,i=U.z,a=this.oneOverRadiiSquared,o=1/Math.sqrt(n*n*a.x+r*r*a.y+i*i*a.z);return U.multiplyScalar(o).to(t)}transformPositionToScaledSpace(e,t=[0,0,0]){return U.from(e).scale(this.oneOverRadii).to(t)}transformPositionFromScaledSpace(e,t=[0,0,0]){return U.from(e).scale(this.radii).to(t)}getSurfaceNormalIntersectionWithZAxis(e,t=0,n=[0,0,0]){I(O(this.radii.x,this.radii.y,ln)),I(this.radii.z>0),U.from(e);let r=U.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(r)>=this.radii.z-t))return U.set(0,0,r).to(n)}getEulerFromPositionQuaternion(e,t,n=new rn){return n.fromQuaternion(In.fromMatrix3(this.localFrameToFixedFrame(`north`,`west`,`up`,e,Ln).invert().getRotationMatrix3(Rn).multiplyRight(zn.fromQuaternion(t))).normalize()),n}getRotationMatrixFromPositionVelocity(e,t,n=new ze){let r=Fn.fromArray(e),i=this.geodeticSurfaceNormal(r,Mn),a=Bn.fromArray(t),o=V.cross(t,i,Vn);o.equals(V.ZERO)&&o.fromArray(V.X_AXIS);let s=V.cross(o,t,Hn).normalize();return o=V.cross(t,s,Vn).negate().normalize(),n[0]=a.x,n[1]=a.y,n[2]=a.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=s.x,n[7]=s.y,n[8]=s.z,n}getQuaternionFromEuler(e,t,n=new H){return n.fromMatrix3(this.localFrameToFixedFrame(`north`,`west`,`up`,e,Ln).multiplyRight(Wn.fromTranslationQuaternion(V.ZERO,Un.fromEuler(t))).getRotationMatrix3(Gn))}},qn=240,Jn=[9,-18,-88,0,96,90,0,0,-60,-20,-9,18,8,0,-96,30,0,0,60,-20,9,-88,-18,90,96,0,-20,-60,0,0,186,-42,-42,-150,-96,-150,60,60,60,60,54,162,-78,30,-24,-90,-60,60,-60,60,-9,-32,18,30,24,0,20,-60,0,0,-9,8,18,30,-96,0,-20,60,0,0,54,-78,162,-90,-24,30,60,-60,60,-60,-54,78,78,90,144,90,-60,-60,-60,-60,9,-8,-18,-30,-24,0,20,60,0,0,-9,18,-32,0,24,30,0,0,-60,20,9,-18,-8,0,-24,-30,0,0,60,20],Yn=372,Xn=[0,0,-131,0,138,144,0,0,-102,-31,0,0,7,0,-138,42,0,0,102,-31,62,0,-31,0,0,-62,0,0,0,31,124,0,-62,0,0,-124,0,0,0,62,124,0,-62,0,0,-124,0,0,0,62,62,0,-31,0,0,-62,0,0,0,31,0,0,45,0,-183,-9,0,93,18,0,0,0,216,0,33,87,0,-93,12,-93,0,0,156,0,153,99,0,-93,-12,-93,0,0,-45,0,-3,9,0,93,-18,0,0,0,-55,0,48,42,0,0,-84,31,0,0,-7,0,-48,-42,0,0,84,31],Zn=372,Qn=[18,-36,-122,0,120,135,0,0,-84,-31,-18,36,-2,0,-120,51,0,0,84,-31,36,-165,-27,93,147,-9,0,-93,18,0,210,45,-111,-93,-57,-192,0,93,12,93,162,141,-75,-93,-129,-180,0,93,-12,93,-36,-21,27,93,39,9,0,-93,-18,0,0,0,62,0,0,31,0,0,0,-31,0,0,124,0,0,62,0,0,0,-62,0,0,124,0,0,62,0,0,0,-62,0,0,62,0,0,31,0,0,0,-31,-18,36,-64,0,66,51,0,0,-102,31,18,-36,2,0,-66,-51,0,0,102,31],$n=12,er=10,tr=2,nr=class{_v00=0;_v01=0;_v10=0;_v11=0;_t=[];_ix;_iy;options;constructor(e){this.options=e,this._ix=this.options._width,this._iy=this.options._height}getHeight(e,t){if(e=Math.abs(e)>90?NaN:e,isNaN(e)||isNaN(t))return NaN;let n=rr(t,360);t=n===-180?180:n;let r=t*this.options._rlonres,i=-e*this.options._rlatres,a=Math.floor(r),o=Math.min(Math.round((this.options._height-1)/2-1),Math.floor(i));r-=a,i-=o,o+=(this.options._height-1)/2,a+=a<0?this.options._width:a>=this.options._width?-this.options._width:0;let s=0,c=0,l=0,u=0,d=Array(er);if(a!==this._ix||o!==this._iy){if(!this.options.cubic)s=this._rawval(a,o),c=this._rawval(a+1,o),l=this._rawval(a,o+1),u=this._rawval(a+1,o+1);else{let e=[this._rawval(a,o-1),this._rawval(a+1,o-1),this._rawval(a-1,o),this._rawval(a,o),this._rawval(a+1,o),this._rawval(a+2,o),this._rawval(a-1,o+1),this._rawval(a,o+1),this._rawval(a+1,o+1),this._rawval(a+2,o+1),this._rawval(a,o+2),this._rawval(a+1,o+2)],t=Xn;o!==0&&(t=o===this.options._height-2?Qn:Jn);let n=Yn;o!==0&&(n=o===this.options._height-2?Zn:qn);for(let r=0;r<er;++r){d[r]=0;for(let n=0;n<$n;++n)d[r]+=e[n]*t[er*n+r];d[r]/=n}}}else this.options.cubic?d=this._t:(s=this._v00,c=this._v01,l=this._v10,u=this._v11);if(!this.options.cubic){let e=(1-r)*s+r*c,t=(1-r)*l+r*u,n=(1-i)*e+i*t,d=this.options._offset+this.options._scale*n;return this._ix=a,this._iy=o,this._v00=s,this._v01=c,this._v10=l,this._v11=u,d}let f=d[0]+r*(d[1]+r*(d[3]+r*d[6]))+i*(d[2]+r*(d[4]+r*d[7])+i*(d[5]+r*d[8]+i*d[9]));return f=this.options._offset+this.options._scale*f,this._ix=a,this._iy=o,this._t=d,f}_rawval(e,t){e<0?e+=this.options._width:e>=this.options._width&&(e-=this.options._width),(t<0||t>=this.options._height)&&(t=t<0?-t:2*(this.options._height-1)-t,e+=(e<this.options._width/2?1:-1)*this.options._width/2);let n=this.options._datastart+tr*(t*this.options._swidth+e),r=this.options.data[n],i=this.options.data[n+1];return r<<8|i}};function rr(e,t){t=Math.abs(t);let n=ir(e,t);return 2*Math.abs(n)===t?n-=ir(e,2*t)-n:2*Math.abs(n)>t&&(n+=n<0?t:-t),n}function ir(e,t){return e-Math.floor(e/t)*t}var ar=10,or=65535;function sr(e,t){let n=cr(e),r=n.next();if(r.done||r.value.line!==`P5`)throw Error(`Geoid model file: File not in PGM format`);let i=Number.MAX_VALUE,a=0,o=-1,s=-1,c=`NONE`,l=`UNKNOWN`,u=0,d=0,f=null,p=null;do{r=n.next();let e=r.value.line;if(e.length){if(e[0]===`#`){let n=e.split(` `),r=n[0],u=n[1];if(r!==`#`||!u)continue;let d=n.length>2?n.slice(2):[];if(u===`Description`)c=d.join(` `);else if(u===`DateTime`)l=d.join(` `);else if(u===`Offset`){if(!n[2])throw Error(`Geoid model file: Error reading offset`);i=parseInt(n[2],10)}else if(u===`Scale`){if(!n[2])throw Error(`Geoid model file: Error reading scale`);a=parseFloat(n[2])}else u===(t.cubic?`MaxCubicError`:`MaxBilinearError`)?isFinite(parseFloat(n[2]))&&(o=parseFloat(n[2])):u===(t.cubic?`RMSCubicError`:`RMSBilinearError`)&&isFinite(parseFloat(n[2]))&&(s=parseFloat(n[2]))}else{let t=e.split(` `);if(t=t.filter(e=>e!==``),u=parseInt(t[0],10),d=parseInt(t[1],10),!(u&&d))throw Error(`Geoid model file: Error reading raster size`);break}}}while(!r.done);r=n.next();let m=parseInt(r.value.line,10);if(r.done)throw Error(`Geoid model file: Error reading maxval`);if(m!==or)throw Error(`Geoid model file: Incorrect value of maxval`);if(f=r.value.offset,p=u,i===Number.MAX_VALUE)throw Error(`Geoid model file: Offset not set`);if(a===0)throw Error(`Geoid model file: Scale not set`);if(a<0)throw Error(`Geoid model file: Scale must be positive`);if(d<2||u<2)throw Error(`Geoid model file: Raster size too small`);if(u&1)throw Error(`Geoid model file: Raster width is odd`);if(!(d&1))throw Error(`Geoid model file: Raster height is even`);let h=u/360,g=(d-1)/180;return new nr({cubic:t.cubic,_width:u,_height:d,_rlonres:h,_rlatres:g,_offset:i,_scale:a,_swidth:p,_datastart:f,_maxerror:o,_rmserror:s,_description:c,_datetime:l,data:e})}function*cr(e){let t=0;do{let n=e.indexOf(ar,t);if(n!==-1){let r=e.subarray(t,n);t=n+1,yield{offset:t,line:lr(r)}}else{let n=e.subarray(t,e.length);t=e.length,yield{offset:t,line:lr(n)}}}while(t<e.length);return{offset:t,line:``}}function lr(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return t}m.default.extend(f.default);var ur=C(1),dr=9.80665,fr=2*Math.PI,pr=new rn,mr=new rn,hr=new rn,gr=.05,_r=new V,vr=new V,yr=new ze,br=new ze,xr=new H,Sr=new H,Cr=new H,wr=new H,Tr=Kn.WGS84,Er=class{samples=[];hasOrientations(){return this.samples[0]?.stateVector.quaternion!==void 0}_lastRoll=0;_simpleSmooth(e,t){return e=t*e+(1-t)*this._lastRoll,e<ur&&(e=0),this._lastRoll=e,e}_computeRoll(e,t,n,r,i,a){let o=Tr.getEulerFromPositionQuaternion(e,t,mr).toHeadingPitchRoll(mr),s=Tr.getEulerFromPositionQuaternion(n,r,hr).toHeadingPitchRoll(hr),c=fr,l=o.yaw;l<0&&(l+=c);let u=s.yaw;u<0&&(u+=c);let d=u-l,f=Math.abs(d);f>Math.PI&&(f=c-f,d=c+d);let p=Math.sign(d)*f;return this._simpleSmooth(Math.atan(i*p/(dr*a)),gr)}_computeOrientation(e,t,n,r){let i=e.stateVector.cartesian,a=t.stateVector.cartesian,o=e.time,s=t.time,c=m.default.duration(s.diff(o)).asSeconds(),l=_r.subVectors(a,i).multiplyByScalar(1/c),u=l.magnitude();if(u>b.EPSILON){l.normalize();let e=Tr.getRotationMatrixFromPositionVelocity(i,l,yr),t=xr.fromMatrix3(e),o=0;if(r){let e=n.stateVector.cartesian,r=n.time,l=m.default.duration(r.diff(s)).asSeconds(),d=vr.subVectors(e,a).multiplyByScalar(1/l);d.normalize();let f=Tr.getRotationMatrixFromPositionVelocity(a,d,br),p=Sr.fromMatrix3(f);o=this._computeRoll(i,t,a,p,u,c)}return Cr.fromAxisRotation(l,o).multiplyRight(t).clone()}return Tr.getQuaternionFromEuler(i,pr,wr).clone()}emulateOrientations(e){let t=this.samples,n=t.length-2;if(n<1){t.forEach(e=>{let t=e.stateVector;t.quaternion=Tr.getQuaternionFromEuler(t.cartesian,pr,wr).clone()});return}e??=!1;for(let r=0;r<n;++r){let n=t[r],i=t[r+1],a=t[r+2];t[r].stateVector.quaternion=this._computeOrientation(n,i,a,e)}t[n].stateVector.quaternion=t[n-1].stateVector.quaternion,t[n+1].stateVector.quaternion=t[n-1].stateVector.quaternion}},Dr=class e{cartesian=new V;quaternion=void 0;equals(e){return e.cartesian.equals(this.cartesian)&&(this.quaternion===void 0?e.quaternion===void 0:e.quaternion?.equals(this.quaternion))}static _scratchQuaternionX=new H;static _scratchQuaternionY=new H;static _scratchQuaternionZ=new H;static _scratchHprMatrix=new Tt;static _scratchTranslationMatrix=new Tt;static _scratchRotation=new ze;static fromTransform(t,n){n===void 0&&(n=new e);let r=n.cartesian,i=e._scratchQuaternionX.identity(),a=e._scratchQuaternionY.identity(),o=e._scratchQuaternionZ.identity(),s=Kn.WGS84;s.cartographicToCartesian(t.position,r);let c=t.orientation;if(c!==void 0){i.rotateX(c.roll),a.rotateY(-c.pitch),o.rotateZ(-c.yaw);let e=o.multiplyRight(a).multiplyRight(i),t=this._scratchHprMatrix.fromQuaternion(e),l=s.localFrameToFixedFrame(`north`,`west`,`up`,r,this._scratchTranslationMatrix).multiplyRight(t).getRotationMatrix3(this._scratchRotation);n.quaternion===void 0&&(n.quaternion=new H),n.quaternion.fromMatrix3(l)}return n}};m.default.extend(f.default),m.default.extend(p.default);var Or=class{isValid=!0;header=new g;globalProperties=new h;timeSpan=new _;entities=new Map;frames=[];_searchFrameIndex(e){let t=this.frames,n=-1,r=0,i=this.frames.length-1;for(;r<=i;){let a=r+(i-r>>>1);t[a].timeStamp-e<=0?(n=a,r=a+1):i=a-1}return n}getFrame(e){if(this.timeSpan.isValid()){let t=this.globalProperties.referenceTime,n=this.timeSpan.end,r=this.frames;if(t.isSameOrBefore(e)&&e.isSameOrBefore(n)){let n=m.default.duration(e.diff(t)).asSeconds();return r[this._searchFrameIndex(n)]}}}_addFrame(e,t,n,r){let i=t.scene;r??=!1,i.forEach((t,i)=>{let a=n.get(i);a===void 0&&(a=new Er,n.set(i,a));let o=a.samples,s=Dr.fromTransform(t),c=o.length;if(!r&&c>0){let e=o[c-1];if(s.equals(e.stateVector))return}o.push({time:e,stateVector:s})})}createSampledTrajectories(e){let t=e?.sampleRate??1,n=e?.emulateOrientation??!1;if(!Number.isFinite(t)||t<=0)throw RangeError(`sampleRate must be a finite number greater than 0`);let r=new Map,i=this.timeSpan;if(i.isValid()){let e=i.duration(),n=i.start,a=i.end,o=0;do{let e=n.add(o,`seconds`),i=this.getFrame(e);i!==void 0&&this._addFrame(e,i,r),o+=t}while(o<=e);if(o>e){let e=this.getFrame(a);e!==void 0&&this._addFrame(a,e,r,!0)}}return n&&r.forEach(e=>e.emulateOrientations(!0)),r}},kr=class{id;timeSpan=new _;name;types;callsign;pilot;group;country;coalition;color;constructor(e){this.id=e}},Ar=class{timeStamp;scene;constructor(e,t){this.timeStamp=e,this.scene=t?new Map(t):new Map}},jr=class e{position;orientation;static refLong=0;static refLat=0;static geoid=void 0;constructor(t,n){if(t[0]!==void 0||t[1]!==void 0||t[2]!==void 0){let r=n?.position.clone(),i=t[0]===void 0?r?.x??e.refLong:t[0]+e.refLong,a=t[1]===void 0?r?.y??e.refLat:t[1]+e.refLat,o=e.geoid?.getHeight(a,i)??0,s=t[2]===void 0?r?.z??o:t[2]+o;this.position=new V(i,a,s)}else this.position=n?.position??new V;if(t[3]!==void 0||t[4]!==void 0||t[5]!==void 0){let e=n?.orientation?.clone(),r=t[3]===void 0?e?.roll:C(t[3]),i=t[4]===void 0?e?.pitch:C(t[4]),a=t[5]===void 0?e?.yaw:C(t[5]);this.orientation=new rn(r,i,a)}else this.orientation=n?.orientation}},Mr=4294967295,Nr=65535,Pr=134695760,Fr=33639248,Ir=39169,Lr=21589,Rr=28789,zr=25461,Br=6534,Vr=30837,Hr=30805,Ur=22613,Wr=2048,Gr=61440,Kr=16384,qr=40960,Jr=2048,Yr=1024,Xr=new Date(1980,0,1),Zr=`undefined`,Qr=`function`,$r=new Uint8Array,ei=`filenameEncoding`,ti=`commentEncoding`,ni=`extractPrependedData`,ri=`extractAppendedData`,ii=`password`,ai=`rawPassword`,oi=`passThrough`,si=`signal`,ci=`checkPasswordOnly`,li=`checkOverlappingEntryOnly`,ui=`checkOverlappingEntry`,di=`checkAmbiguity`,fi=`checkLocalDirectory`,pi=`checkCrc32`,mi=`checkAuthenticationCode`,hi=`useWebWorkers`,gi=`useCompressionStream`,_i=`transferStreams`,vi=`strictness`,yi=`filenameValidation`,bi=`normalizeFilename`,xi=`maxAppendedDataSize`,Si=`decryptCentralDirectory`,Ci=`filename`,wi=`comment`,Ti=`strict`,Ei=`balanced`,Di=`tolerant`,Oi=`Invalid option (must be a function)`,ki=`Invalid signal (must be an AbortSignal instance)`,Ai=`Invalid password (password must be a string, rawPassword must be a Uint8Array)`;function ji(e){if(e&&typeof e!=`function`)throw Error(Oi);return e}function Mi(e){if(e&&(typeof e.addEventListener!=`function`||typeof e.aborted!=`boolean`))throw Error(ki);return e||void 0}function Ni(e,t){if(e&&typeof e!=`string`||t&&!(t instanceof Uint8Array))throw Error(Ai)}function Pi(e){return typeof e==`string`&&e.trim()?Number(e):e}var Fi=65536,Ii=64,Li=1,Ri=`Invalid maxWorkers (must be an integer greater than 0)`,zi=2;try{typeof navigator<`u`&&navigator.hardwareConcurrency&&(zi=navigator.hardwareConcurrency)}catch{}var Bi={workerURI:`./core/web-worker-wasm.js`,wasmURI:`./core/streams/zlib-wasm/zlib-streams.wasm`,chunkSize:Fi,maxWorkers:zi,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream<`u`&&CompressionStream,DecompressionStream:typeof DecompressionStream<`u`&&DecompressionStream},Vi=`maxWorkers`,Hi=[`baseURI`,`wasmURI`,`workerURI`],Ui=[`useCompressionStream`,`useWebWorkers`,`transferStreams`],Wi=[`chunkSize`,Vi,`terminateWorkerTimeout`,`workerStarvationTimeout`,`workerStartupTimeout`],Gi=[`createWorker`,`CompressionStream`,`DecompressionStream`,`CompressionStreamFallback`,`DecompressionStreamFallback`],Ki=[...Hi,...Ui,...Wi,...Gi],qi={...Bi};function Ji(){return qi}function Yi(e){return Xi(e.chunkSize)}function Xi(e){return e=Pi(e),Number.isInteger(e)&&e>=Li?Math.max(e,Ii):Fi}function Zi(e){let t={};for(let n of Ki){let r=e[n];r!==void 0&&(t[n]=Qi(n,r))}return t}function Qi(e,t){if(Wi.includes(e)){if(t=Pi(t),e==Vi&&(!Number.isInteger(t)||t<Li))throw Error(Ri)}else Gi.includes(e)&&ji(t);return t}function $i(e){e||={};let{CompressionStreamZlib:t,DecompressionStreamZlib:n}=e;if(t===void 0&&n===void 0)return e;let r=Object.assign({},e);return r.CompressionStreamFallback===void 0&&(r.CompressionStreamFallback=t),r.DecompressionStreamFallback===void 0&&(r.DecompressionStreamFallback=n),r}function ea(e){let t=Zi($i(e));Object.assign(Bi,t),Object.assign(qi,t)}var ta=new Uint8Array(288);ta.fill(8,0,144),ta.fill(9,144,256),ta.fill(7,256,280),ta.fill(8,280,288),new Uint8Array(30).fill(5);var na=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,ra=e=>e({workerURI:e=>{let t=`text/javascript`,n=`!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";const{Array:t,Object:n,Number:e,Math:s,Error:r,Uint8Array:o,Uint16Array:c,Uint32Array:i,Int32Array:a,Map:f,DataView:u,Promise:l,TextEncoder:w,crypto:h,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:S,DecompressionStream:g}=self,v=void 0,b="undefined",k="function",z=new o,C=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let n=t;for(let t=0;t<8;t++)n=1&n?n>>>1^3988292384:n>>>1;C[0][t]=n}for(let t=0;t<256;t++)for(let n=1;n<8;n++){const e=C[n-1][t];C[n][t]=e>>>8^C[0][255&e]}const[I,A,x,M,P,B,D,F]=C;class R{constructor(t){this.o=t||-1}append(t){let n=0|this.o;const e=0|t.length;let s=0;if(e>=8&&t.buffer){const r=new u(t.buffer,t.byteOffset,e),o=e-8;for(;s<=o;s+=8){const t=n^r.getInt32(s,!0),e=r.getInt32(s+4,!0);n=F[255&t]^D[t>>>8&255]^B[t>>>16&255]^P[t>>>24&255]^M[255&e]^x[e>>>8&255]^A[e>>>16&255]^I[e>>>24&255]}}for(;s<e;s++)n=n>>>8^I[255&(n^t[s])];this.o=n}get(){return~this.o}}class U extends d{constructor(){let t;const n=new R;super({transform(t,e){n.append(t),e.enqueue(t)},flush(){const e=new o(4);new u(e.buffer).setUint32(0,n.get()),t.value=e}}),t=this}}function W(t,n){const e=new o(t.length+n.length);return e.set(t),e.set(n,t.length),e}function _(t){return new u(t.buffer,t.byteOffset,t.byteLength)}const T={concat(t,n){if(0===t.length||0===n.length)return t.concat(n);const e=t[t.length-1],s=T.l(e);return 32===s?t.concat(n):T.h(n,s,0|e,t.slice(0,t.length-1))},bitLength(t){const n=t.length;if(0===n)return 0;const e=t[n-1];return 32*(n-1)+T.l(e)},m(t,n){if(32*t.length<n)return t;const e=(t=t.slice(0,s.ceil(n/32))).length;return n&=31,e>0&&n&&(t[e-1]=T.S(n,t[e-1]&2147483648>>n-1,1)),t},S:(t,n,e)=>32===t?n:(e?0|n:n<<32-t)+1099511627776*t,l:t=>s.round(t/1099511627776)||32,h(t,n,e,s){for(void 0===s&&(s=[]);n>=32;n-=32)s.push(e),e=0;if(0===n)return s.concat(t);for(let r=0;r<t.length;r++)s.push(e|t[r]>>>n),e=t[r]<<32-n;const r=t.length?t[t.length-1]:0,o=T.l(r);return s.push(T.S(n+o&31,n+o>32?e:s.pop(),1)),s}},V={bytes:{v(t){const n=T.bitLength(t)/8,e=new o(n);let s;for(let r=0;r<n;r++)3&r||(s=t[r/4]),e[r]=s>>>24,s<<=8;return e},C(t){const n=[];let e,s=0;for(e=0;e<t.length;e++)s=s<<8|t[e],3&~e||(n.push(s),s=0);return 3&e&&n.push(T.S(8*(3&e),s)),n}}},K=class{constructor(t){const n=this;n.blockSize=512,n.I=[1732584193,4023233417,2562383102,271733878,3285377520],n.A=[1518500249,1859775393,2400959708,3395469782],t?(n.M=t.M.slice(0),n.P=t.P.slice(0),n.B=t.B):n.reset()}reset(){const t=this;return t.M=t.I.slice(0),t.P=[],t.B=0,t}update(t){const n=this;"string"==typeof t&&(t=V.D.C(t));const e=n.P=T.concat(n.P,t),s=n.B,o=n.B=s+T.bitLength(t);if(o>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const c=new i(e);let a=0;for(let t=n.blockSize+s-(n.blockSize+s&n.blockSize-1);t<=o;t+=n.blockSize)n.F(c.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),n}R(){const t=this;let n=t.P;const e=t.M;n=T.concat(n,[T.S(1,1)]);for(let t=n.length+2;15&t;t++)n.push(0);for(n.push(s.floor(t.B/4294967296)),n.push(0|t.B);n.length;)t.F(n.splice(0,16));return t.reset(),e}U(t,n,e,s){return t<=19?n&e|~n&s:t<=39?n^e^s:t<=59?n&e|n&s|e&s:t<=79?n^e^s:void 0}W(t,n){return n<<t|n>>>32-t}F(n){const e=this,r=e.M,o=t(80);for(let t=0;t<16;t++)o[t]=n[t];let c=r[0],i=r[1],a=r[2],f=r[3],u=r[4];for(let t=0;t<=79;t++){t>=16&&(o[t]=e.W(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const n=e.W(5,c)+e.U(t,i,a,f)+u+o[t]+e.A[s.floor(t/20)]|0;u=f,f=a,a=e.W(30,i),i=c,c=n}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+f|0,r[4]=r[4]+u|0}},E={importKey:t=>new E._(V.bytes.C(t)),T(t,n,e,s){if(e=e||1e4,s<0||e<0)throw new r("invalid params to pbkdf2");const o=1+(s>>5)<<2;let c,i,a,f,l;const w=new ArrayBuffer(o),h=new u(w);let p=0;const d=T;for(n=V.bytes.C(n),l=1;p<(o||1);l++){for(c=i=t.encrypt(d.concat(n,[l])),a=1;a<e;a++)for(i=t.encrypt(i),f=0;f<i.length;f++)c[f]^=i[f];for(a=0;p<(o||1)&&a<c.length;a++)h.setInt32(p,c[a]),p+=4}return w.slice(0,s/8)},_:class{constructor(t){const n=this,e=n.V=K,s=[[],[]];n.K=[new e,new e];const r=n.K[0].blockSize/32;t.length>r&&(t=(new e).update(t).R());for(let n=0;n<r;n++)s[0][n]=909522486^t[n],s[1][n]=1549556828^t[n];n.K[0].update(s[0]),n.K[1].update(s[1]),n.L=new e(n.K[0])}reset(){const t=this;t.L=new t.V(t.K[0]),t.O=!1}update(t){this.O=!0,this.L.update(t)}digest(){const t=this,n=t.L.R(),e=new t.V(t.K[1]).update(n).R();return t.reset(),e}encrypt(t){if(this.O)throw new r("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},L=typeof h!=b&&typeof h.getRandomValues==k,O="Invalid password",j="Invalid signature",H=j,N="zipjs-abort-check-password";function q(t){if(L)return h.getRandomValues(t);throw new r("Crypto API not supported")}const G=16,J={name:"PBKDF2"},Q=n.assign({hash:{name:"HMAC"}},J),X=n.assign({iterations:1e3,hash:{name:"SHA-1"}},J),Y=["deriveBits"],Z=[8,12,16],$=[16,24,32],tt=10,nt=[0,0,0,0],et=typeof h!=b,st=et&&h.subtle,rt=et&&typeof st!=b,ot=V.bytes,ct=class{constructor(t){const n=this;n.j=[[[],[],[],[],[]],[[],[],[],[],[]]],n.j[0][0][0]||n.H();const e=n.j[0][4],s=n.j[1],o=t.length;let c,i,a,f=1;if(4!==o&&6!==o&&8!==o)throw new r("invalid aes key size");for(n.A=[i=t.slice(0),a=[]],c=o;c<4*o+28;c++){let t=i[c-1];(c%o===0||8===o&&c%o===4)&&(t=e[t>>>24]<<24^e[t>>16&255]<<16^e[t>>8&255]<<8^e[255&t],c%o===0&&(t=t<<8^t>>>24^f<<24,f=f<<1^283*(f>>7))),i[c]=i[c-o]^t}for(let t=0;c;t++,c--){const n=i[3&t?c:c-4];a[t]=c<=4||t<4?n:s[0][e[n>>>24]]^s[1][e[n>>16&255]]^s[2][e[n>>8&255]]^s[3][e[255&n]]}}encrypt(t){return this.N(t,0)}decrypt(t){return this.N(t,1)}H(){const t=this.j[0],n=this.j[1],e=t[4],s=n[4],r=[],o=[];let c,i,a,f;for(let t=0;t<256;t++)o[(r[t]=t<<1^283*(t>>7))^t]=t;for(let u=c=0;!e[u];u^=i||1,c=o[c]||1){let o=c^c<<1^c<<2^c<<3^c<<4;o=o>>8^255&o^99,e[u]=o,s[o]=u,f=r[a=r[i=r[u]]];let l=16843009*f^65537*a^257*i^16843008*u,w=257*r[o]^16843008*o;for(let e=0;e<4;e++)t[e][u]=w=w<<24^w>>>8,n[e][o]=l=l<<24^l>>>8}for(let e=0;e<5;e++)t[e]=t[e].slice(0),n[e]=n[e].slice(0)}N(t,n){if(4!==t.length)throw new r("invalid aes block size");const e=this.A[n],s=e.length/4-2,o=[0,0,0,0],c=this.j[n],i=c[0],a=c[1],f=c[2],u=c[3],l=c[4];let w,h,p,d=t[0]^e[0],y=t[n?3:1]^e[1],m=t[2]^e[2],S=t[n?1:3]^e[3],g=4;for(let t=0;t<s;t++)w=i[d>>>24]^a[y>>16&255]^f[m>>8&255]^u[255&S]^e[g],h=i[y>>>24]^a[m>>16&255]^f[S>>8&255]^u[255&d]^e[g+1],p=i[m>>>24]^a[S>>16&255]^f[d>>8&255]^u[255&y]^e[g+2],S=i[S>>>24]^a[d>>16&255]^f[y>>8&255]^u[255&m]^e[g+3],g+=4,d=w,y=h,m=p;for(let t=0;t<4;t++)o[n?3&-t:t]=l[d>>>24]<<24^l[y>>16&255]<<16^l[m>>8&255]<<8^l[255&S]^e[g++],w=d,d=y,y=m,m=S,S=w;return o}},it=class{constructor(t,n){this.G=t,this.J=n,this.X=n}reset(){this.X=this.J}update(t){return this.Y(this.G,t,this.X)}Z(t){if(255&~(t>>24))t+=1<<24;else{let n=t>>16&255,e=t>>8&255,s=255&t;255===n?(n=0,255===e?(e=0,255===s?s=0:++s):++e):++n,t=0,t+=n<<16,t+=e<<8,t+=s}return t}$(t){0===(t[0]=this.Z(t[0]))&&(t[1]=this.Z(t[1]))}Y(t,n,e){let s;if(!(s=n.length))return[];const r=T.bitLength(n);for(let r=0;r<s;r+=4){this.$(e);const s=t.encrypt(e);n[r]^=s[0],n[r+1]^=s[1],n[r+2]^=s[2],n[r+3]^=s[3]}return T.m(n,r)}},at=E._;let ft=et&&rt&&typeof st.importKey==k,ut=et&&rt&&typeof st.deriveBits==k;class lt extends d{constructor({password:t,rawPassword:n,encryptionStrength:e,checkPasswordOnly:s,checkAuthenticationCode:c=!0}){super({start(){ht(this,t,n,e)},async transform(t,n){const e=this,{password:c,strength:i,nt:a,ready:f}=e;c?(await async function(t,n,e,s){const o=await dt(t,n,e,mt(s,0,Z[n])),c=mt(s,Z[n]);if(o[0]!=c[0]||o[1]!=c[1])throw new r(O)}(e,i,c,mt(t,0,Z[i]+2)),t=mt(t,Z[i]+2),s?n.error(new r(N)):a()):await f;const u=new o(t.length-tt-(t.length-tt)%G);n.enqueue(pt(e,t,u,0,tt,!0))},async flush(t){const{et:n,st:e,ot:s,ready:o}=this;if(e&&n){await o;const i=mt(s,0,s.length-tt),a=mt(s,s.length-tt);let f=z;if(i.length){const t=gt(ot,i);e.update(t);const s=n.update(t);f=St(ot,s)}const u=mt(St(ot,e.digest()),0,tt);let l=s.length<tt?1:0;for(let t=0;t<tt;t++)l|=u[t]^a[t];if(l&&c)throw new r(H);t.enqueue(f)}}})}}class wt extends d{constructor({password:t,rawPassword:n,encryptionStrength:e}){super({start(){ht(this,t,n,e)},async transform(t,n){const e=this,{password:s,strength:r,nt:c,ready:i}=e;let a=z;s?(a=await async function(t,n,e){const s=q(new o(Z[n]));return W(s,await dt(t,n,e,s))}(e,r,s),c()):await i;const f=new o(a.length+t.length-t.length%G);f.set(a,0),n.enqueue(pt(e,t,f,a.length,0))},async flush(t){const{et:n,st:e,ot:s,ready:r}=this;if(e&&n){await r;let o=z;if(s.length){const t=n.update(gt(ot,s));e.update(t),o=St(ot,t)}const c=St(ot,e.digest()).slice(0,tt);t.enqueue(W(o,c))}}})}}function ht(t,e,s,r){n.assign(t,{ready:new l(n=>t.nt=n),password:yt(e,s),strength:r-1,ot:z})}function pt(t,n,e,s,r,c){const{et:i,st:a,ot:f}=t;f.length&&(n=W(f,n));const u=n.length-r;let l;for(e=function(t,n){if(n&&n>t.length){const e=t;(t=new o(n)).set(e,0)}return t}(e,s+(u-u%G)),l=0;l<=u-G;l+=G){const t=gt(ot,mt(n,l,l+G));c&&a.update(t);const r=i.update(t);c||a.update(r),e.set(St(ot,r),l+s)}return t.ot=mt(n,l),e}async function dt(e,s,r,c){e.password=null;const i=await async function(t,n,e,s,r){if(!ft)return E.importKey(n);try{return await st.importKey("raw",n,e,!1,r)}catch{return ft=!1,E.importKey(n)}}(0,r,Q,0,Y),a=await async function(t,n,e){if(!ut)return E.T(n,t.salt,X.iterations,e);try{return await st.deriveBits(t,n,e)}catch{return ut=!1,E.T(n,t.salt,X.iterations,e)}}(n.assign({salt:c},X),i,8*(2*$[s]+2)),f=new o(a),u=gt(ot,mt(f,0,$[s])),l=gt(ot,mt(f,$[s],2*$[s])),w=mt(f,2*$[s]);return n.assign(e,{keys:{key:u,ct:l,passwordVerification:w},et:new it(new ct(u),t.from(nt)),st:new at(l)}),w}function yt(t,n){return n===v?function(t){if(typeof w==b){t=unescape(encodeURIComponent(t));const n=new o(t.length);for(let e=0;e<n.length;e++)n[e]=t.charCodeAt(e);return n}return(new w).encode(t)}(t):n}function mt(t,n,e){return t.subarray(n,e)}function St(t,n){return t.v(n)}function gt(t,n){return t.C(n)}class vt extends d{constructor({password:t,rawPassword:n,passwordVerification:e,checkPasswordOnly:s}){super({start(){kt(this,t,n,e)},transform(t,n){const e=this;if(e.password||e.rawPassword){const n=zt(e,t.subarray(0,12));if(e.password=e.rawPassword=null,0!=(n[11]^e.passwordVerification))throw new r(O);t=t.subarray(12)}s?n.error(new r(N)):n.enqueue(zt(e,t))}})}}class bt extends d{constructor({password:t,rawPassword:n,passwordVerification:e}){super({start(){kt(this,t,n,e)},transform(t,n){const e=this;let s,r;if(e.password||e.rawPassword){e.password=e.rawPassword=null;const n=q(new o(12));n[11]=e.passwordVerification,s=new o(t.length+n.length),s.set(Ct(e,n),0),r=12}else s=new o(t.length),r=0;s.set(Ct(e,t),r),n.enqueue(s)}})}}function kt(t,e,s,r){n.assign(t,{password:e,rawPassword:s,passwordVerification:r}),function(t,e,s){const r=[305419896,591751049,878082192];if(n.assign(t,{keys:r,it:new R(r[0]),ft:new R(r[2])}),s)for(let n=0;n<s.length;n++)It(t,s[n]);else for(let n=0;n<e.length;n++)It(t,e.charCodeAt(n))}(t,e,s)}function zt(t,n){const e=new o(n.length);for(let s=0;s<n.length;s++)e[s]=At(t)^n[s],It(t,e[s]);return e}function Ct(t,n){const e=new o(n.length);for(let s=0;s<n.length;s++)e[s]=At(t)^n[s],It(t,n[s]);return e}function It(t,n){let[,e]=t.keys;t.it.append([n]);const r=~t.it.get();e=Mt(s.imul(Mt(e+xt(r)),134775813)+1),t.ft.append([e>>>24]);const o=~t.ft.get();t.keys=[r,e,o]}function At(t){const n=2|t.keys[2];return xt(s.imul(n,1^n)>>>8)}function xt(t){return 255&t}function Mt(t){return 4294967295&t}function Pt(t){if(t instanceof y)return t;const n=t.getReader();return new y({async pull(t){const{value:e,done:s}=await n.read();s?t.close():t.enqueue(e)},cancel:t=>n.cancel(t)})}const Bt=new f;function Dt(t){return Bt.get(t)}const Ft="Invalid uncompressed size",Rt=j,Ut="deflate-raw",Wt="gzip",_t=[31,139,8];class Tt extends d{constructor(t,{chunkSize:n,CompressionStreamFallback:e,CompressionStream:s}){super({});const{compressed:r,encrypted:o,useCompressionStream:c,zipCrypto:i,computeCrc32:a,level:f,deflate64:l,format:w,compressionMethod:h,inputSize:p}=t,d=this;let y,m,S,g=super.readable;const v=w&&Dt(w),b=a&&r&&!l&&!v&&(!o||i)&&Boolean(c&&s);if(o&&!i||!a||b||(y=new U,g=Ht(g,y)),r)if(v)g=Nt(g,Ot(v.CompressionStream,w,{level:f,chunkSize:n,compressionMethod:h,uncompressedSize:p}));else if(b)S=new Vt,g=Nt(g,new s(Wt)),g=Ht(g,S);else try{g=jt(g,c,{level:f,chunkSize:n},s,e)}catch(t){let n;try{n=new s(Wt)}catch{throw t}g=Nt(g,n),g=Ht(g,new Vt)}o&&(i?g=Ht(g,new bt(t)):(m=new wt(t),g=Ht(g,m))),Lt(d,g,()=>{o&&!i||!a||(d.crc32=b?S.crc32:new u(y.value.buffer).getUint32(0))})}}class Vt extends d{constructor(){let t,n=10,e=new o(0);super({transform(t,r){if(n){const e=s.min(n,t.length);if(n-=e,!(t=t.subarray(e)).length)return}const o=e.length+t.length;if(o<=8)return void(e=W(e,t));const c=o-8,i=s.min(c,e.length);r.enqueue(W(e.subarray(0,i),t.subarray(0,c-i))),e=W(e.subarray(i),t.subarray(c-i))},flush(){const n=_(e);t.crc32=n.getUint32(0,!0),t.uncompressedSize=n.getUint32(4,!0)}}),t=this}}class Kt extends d{constructor(t,{chunkSize:n,DecompressionStreamFallback:e,DecompressionStream:s}){super({});const{zipCrypto:c,encrypted:i,checkCrc32:a,crc32:f,compressed:w,useCompressionStream:h,deflate64:p,format:m,compressionMethod:S,rawBitFlag:g,outputSize:b}=t;let k,z,C=super.readable;if(i&&(c?C=Ht(C,new vt(t)):(z=new lt(t),C=Ht(C,z))),w){const t=m&&Dt(m);if(t)C=Nt(C,Ot(t.DecompressionStream,m,{chunkSize:n,compressionMethod:S,rawBitFlag:g,uncompressedSize:b}));else try{C=jt(C,h,{chunkSize:n,deflate64:p},s,e)}catch(t){if(p||b===v)throw t;let n;try{n=new s(Wt)}catch{throw t}C=function(t,n,e){const s=new R;let c,i,a,f=0,u=!1;const w=new l((t,n)=>{i=t,a=n});w.catch(()=>{}),e||i();const h=new d({start(t){const n=new o(10);n.set(_t),t.enqueue(n)},transform(t,n){n.enqueue(t)},async flush(t){u=!0,y();try{await w}finally{m()}const n=new o(8),r=_(n);r.setUint32(0,s.get(),!0),r.setUint32(4,e,!0),t.enqueue(n)},cancel(t){a(t)}}),p=new d({transform(t,n){s.append(t),f+=t.length,f>=e?i():u&&y(),n.enqueue(t)},cancel(t){a(t)}});return t=Ht(t,h),Ht(t=Nt(t,n),p);function y(){m(),c=setTimeout(()=>a(new r(Ft)),5e3)}function m(){clearTimeout(c)}}(C,n,b)}C=function(t){const n=t.getReader();return new y({async pull(t){let e;try{e=await n.read()}catch(t){if(t&&t.message)throw t;const n=new r("Invalid compressed data");throw n.cause=t,n}const{value:s,done:o}=e;o?t.close():t.enqueue(s)},cancel:t=>n.cancel(t)})}(C)}a&&(k=new U,C=Ht(C,k)),Lt(this,C,()=>{if(a){const t=new u(k.value.buffer);if(f!=t.getUint32(0,!1))throw new r(Rt)}})}}const Et=new f;function Lt(t,e,s){e=Ht(e,new d({flush:s})),n.defineProperty(t,"readable",{get:()=>e})}function Ot(t,n,e){if(!t)throw new r("Compression method not supported");return new t(n,e)}function jt(t,n,e,s,r){const o=n&&s?s:r||s,c=e.deflate64?"deflate64-raw":Ut;let i;try{i=new o(c,e)}catch(t){if(!n||!r||o==r)throw t;i=new r(c,e)}return Nt(t,i)}function Ht(t,n){return Pt(t).pipeThrough(n)}function Nt(t,n){const e=n.writable.getWriter(),s=t.getReader();return async function(){try{for(;;){await e.ready;const t=await s.read();if(t.done){await e.close();break}await e.write(t.value)}}catch(t){await async function(t,n){try{await t.abort(n)}catch{}}(e,t),await async function(t,n){try{await t.cancel(n)}catch{}}(s,t)}}(),n.readable}const qt="data",Gt="close",Jt="deflate";class Qt extends d{constructor(t,e){super({});const s=this,{codecType:o}=t;let c;o.startsWith(Jt)?c=Tt:o.startsWith("inflate")&&(c=Kt),s.outputSize=0;let i=0;const a=new c(t,e),f=super.readable,u=new d({transform(t,n){t&&t.length&&(i+=t.length,n.enqueue(t))},flush(){n.assign(s,{inputSize:i})}}),l=new d({transform(n,e){if(n&&n.length&&(e.enqueue(n),s.outputSize+=n.length,t.outputSize!==v&&s.outputSize>t.outputSize))throw new r(Ft)},flush(){const{crc32:t}=a;n.assign(s,{crc32:t,inputSize:i})}});n.defineProperty(s,"readable",{get:()=>f.pipeThrough(u).pipeThrough(a).pipeThrough(l)})}}class Xt extends d{constructor(t){const n=[];let s=0;function r(){const e=new o(t);let r=0;for(;r<t;){const s=n[0],o=t-r;s.length<=o?(e.set(s,r),r+=s.length,n.shift()):(e.set(s.subarray(0,o),r),n[0]=s.subarray(o),r+=o)}return s-=t,e}(!e.isFinite(t)||t<1)&&(t=65536),super({transform(e,o){for(n.push(e),s+=e.length;s>t;)o.enqueue(r())},flush(t){s&&t.enqueue(function(t,n){const e=new o(n);let s=0;for(const n of t)e.set(n,s),s+=n.length;return e}(n,s))}})}}let Yt=2;try{typeof navigator!=b&&navigator.hardwareConcurrency&&(Yt=navigator.hardwareConcurrency)}catch{}const Zt=new f,$t=new f;let tn,nn=0;async function en(t){let n,o;try{const{options:c,config:i}=t;if(c.format)try{await async function(t,n){!Bt.has(t)&&n&&function(t,n){const{CompressionStream:e,DecompressionStream:s}=n;if(typeof e!=k&&typeof s!=k)throw new r("Invalid codec module");Bt.set(t,{CompressionStream:e,DecompressionStream:s})}(t,await(import(n)))}(c.format,c.codecURI)}catch(t){throw t.codecImportFailed=!0,t}if(i.CompressionStream=self.CompressionStream,i.DecompressionStream=self.DecompressionStream,c.compressed&&!c.format)if(c.useCompressionStream){if(!function(t,n){if(!t)return!1;let e=Et.get(t);e||(e=new f,Et.set(t,e));let s=e.get(n);if(s===v){try{new t(n),s=!0}catch{s=!1}e.set(n,s)}return s}(c.codecType.startsWith(Jt)?i.CompressionStream:i.DecompressionStream,Ut))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{c.useCompressionStream=!0}!i.CompressionStreamFallback&&i.CompressionStreamZlib&&(i.CompressionStreamFallback=i.CompressionStreamZlib),!i.DecompressionStreamFallback&&i.DecompressionStreamZlib&&(i.DecompressionStreamFallback=i.DecompressionStreamZlib);const a={highWaterMark:1},u=t.readable?Pt(t.readable):new y({async pull(t){const n=new l(t=>Zt.set(nn,t));sn({type:"pull",messageId:nn}),nn=(nn+1)%e.MAX_SAFE_INTEGER;const{value:s,done:r}=await n;t.enqueue(s),r&&t.close()}},a);o=t.writable?function(t){if(t instanceof m)return t;const n=t.getWriter();return new m({write:t=>n.write(t),close:()=>n.close(),abort:t=>n.abort(t)})}(t.writable):new m({async write(t){let n;const s=new l(t=>n=t);$t.set(nn,n),sn({type:qt,value:t,messageId:nn}),nn=(nn+1)%e.MAX_SAFE_INTEGER,await s}},a),n=new Qt(c,i),tn=new AbortController;const{signal:w}=tn;await u.pipeThrough(n).pipeThrough(new Xt(function(t){return r="string"==typeof(n=r=t.chunkSize)&&n.trim()?e(n):n,e.isInteger(r)&&r>=1?s.max(r,64):65536;var n,r}(i))).pipeTo(o,{signal:w,preventClose:!0,preventAbort:!0}),await o.getWriter().close();const{crc32:h,inputSize:p,outputSize:d}=n;sn({type:Gt,result:{crc32:h,inputSize:p,outputSize:d}})}catch(t){if(t.outputSize=n?n.outputSize:0,o&&!o.locked)try{await o.getWriter().close()}catch{}rn(t)}}function sn(t){const{value:n}=t;if(n)if(n.length)try{t.value=(e=n,e.byteOffset||e.byteLength!=e.buffer.byteLength?new o(e):e).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var e}function rn(t=new r("Unknown error")){const{message:n,stack:e,code:s,name:o,outputSize:c,cause:i,codecImportFailed:a}=t,f={message:n,stack:e,code:s,name:o,outputSize:c};i&&(f.cause={name:i.name,message:i.message}),a&&(f.codecImportFailed=!0),p({error:f})}addEventListener("message",({data:t})=>{const{type:n,messageId:e,value:s,done:r}=t;try{if("start"==n&&en(t),n==qt){const t=Zt.get(e);Zt.delete(e),t({value:s||new o,done:r})}if("ack"==n){const t=$t.get(e);$t.delete(e),t()}n==Gt&&tn.abort()}catch(t){rn(t)}}),p({type:"ready"});const on="deflate",cn="deflate-raw",an="deflate64-raw",fn="gzip";let un,ln,wn,hn,pn;function dn(t,n,e={}){if(!un){const t=new r("WASM module not loaded");throw t.cause=pn,t}const c="number"==typeof e.level?e.level:-1,i="number"==typeof e.outBuffer?e.outBuffer:65536,a="number"==typeof e.inBufferSize?e.inBufferSize:65536;return new d({start(){try{let e;if(this.ut=ln(i),this.in=ln(a),this.inBufferSize=a,!this.ut||!this.in)throw new r("allocation failed");if(this.lt=new o(i),t?(this.wt=un.deflate_process,this.ht=un.deflate_last_consumed,this.yt=un.deflate_end,this.St=un.deflate_new(),e=n===fn?un.deflate_init_gzip(this.St,c):n===cn?un.deflate_init_raw(this.St,c):un.deflate_init(this.St,c)):n===an?(this.wt=un.inflate9_process,this.ht=un.inflate9_last_consumed,this.yt=un.inflate9_end,this.St=un.inflate9_new(),e=un.inflate9_init_raw(this.St)):(this.wt=un.inflate_process,this.ht=un.inflate_last_consumed,this.yt=un.inflate_end,this.St=un.inflate_new(),e=n===cn?un.inflate_init_raw(this.St):n===fn?un.inflate_init_gzip(this.St):un.inflate_init(this.St)),0!==e)throw new r("init failed:"+e)}catch(t){throw f(this),t}},transform(n,e){try{const c=n,a=new o(hn.buffer),f=this.wt,u=this.ht,l=this.ut,w=this.lt;let h=0;for(;h<c.length;){const n=s.min(c.length-h,32768);if((!this.in||this.inBufferSize<n)&&(this.in&&wn&&(wn(this.in),this.in=0),this.in=ln(n),this.inBufferSize=n,!this.in))throw new r("allocation failed");a.set(c.subarray(h,h+n),this.in);const o=f(this.St,this.in,n,l,i,0),p=16777215&o;if(p&&(w.set(a.subarray(l,l+p),0),e.enqueue(w.slice(0,p))),!t){const t=o>>24&255,n=128&t?t-256:t;if(n<0)throw new r("process error:"+n)}const d=u(this.St);if(0===d)break;h+=d}}catch(t){f(this),e.error(t)}},flush(n){try{const e=new o(hn.buffer),s=this.wt,c=this.ut,a=this.lt;for(;;){const o=s(this.St,0,0,c,i,4),f=16777215&o,u=o>>24&255;if(!t){const t=128&u?u-256:u;if(t<0)throw new r("process error:"+t)}if(f&&(a.set(e.subarray(c,c+f),0),n.enqueue(a.slice(0,f))),1===u||0===f)break}}catch(t){n.error(t)}finally{const t=f(this);0!==t&&n.error(new r("end error:"+t))}},cancel(){f(this)}});function f(t){let n=0;return t.St&&t.yt&&(n=t.yt(t.St)),t.St=0,t.in&&wn&&wn(t.in),t.in=0,t.ut&&wn&&wn(t.ut),t.ut=0,n}}class yn{constructor(t=on,n){return dn(!0,t,n)}}class mn{constructor(t=on,n){return dn(!1,t,n)}}yn.gt=!0,mn.gt=!0,yn.vt=[on,cn,fn],mn.vt=[on,cn,fn,an];let Sn=!1;!function(t={}){const{init:n}=t,e=t.CompressionStreamFallback||t.CompressionStreamZlib,s=t.DecompressionStreamFallback||t.DecompressionStreamZlib;self.initModule=async t=>{n&&await n(t),e&&(t.CompressionStreamFallback=e),s&&(t.DecompressionStreamFallback=s)}}({CompressionStreamFallback:yn,DecompressionStreamFallback:mn,init:t=>async function(t,{baseURI:n}){if(!Sn)try{await async function(t,n){let e,s;try{try{s=new URL(t,n)}catch{}const r=await fetch(s);e=await r.arrayBuffer()}catch(n){if(!t.startsWith("data:application/wasm;base64,"))throw n;e=function(t){const n=t.split(",")[1],e=atob(n),s=e.length,r=new o(s);for(let t=0;t<s;++t)r[t]=e.charCodeAt(t);return r.buffer}(t)}!function(t){if(un=t,({malloc:ln,free:wn,memory:hn}=un),"function"!=typeof ln||"function"!=typeof wn||!hn)throw un=ln=wn=hn=null,new r("Invalid WASM module")}((await WebAssembly.instantiate(e)).instance.exports)}(t,n),Sn=!0}catch(t){throw function(t){pn=t}(t),t}}(t.wasmURI,t)})});
|
|
2
|
+
`;if(typeof n==`string`&&(n=new TextEncoder().encode(n)),e){let e=new Blob([n],{type:t});return URL.createObjectURL(e)}return`data:`+t+`;base64,`+function(e){let t=``,n=e.length,r=0;for(;r+2<n;r+=3){let n=e[r]<<16|e[r+1]<<8|e[r+2];t+=na[n>>18&63]+na[n>>12&63]+na[n>>6&63]+na[63&n]}let i=n-r;if(i===1){let n=e[r]<<16;t+=na[n>>18&63]+na[n>>12&63]+`==`}else if(i===2){let n=e[r]<<16|e[r+1]<<8;t+=na[n>>18&63]+na[n>>12&63]+na[n>>6&63]+`=`}return t}(n)}});function ia(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function aa(e){return e.byteOffset||e.byteLength!=e.buffer.byteLength?new Uint8Array(e):e}function W(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}var oa=[[],[],[],[],[],[],[],[]];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t=t&1?t>>>1^3988292384:t>>>1;oa[0][e]=t}for(let e=0;e<256;e++)for(let t=1;t<8;t++){let n=oa[t-1][e];oa[t][e]=n>>>8^oa[0][n&255]}var[sa,ca,la,ua,da,fa,pa,ma]=oa,ha=class{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0,n=e.length|0,r=0;if(n>=8&&e.buffer){let i=new DataView(e.buffer,e.byteOffset,n),a=n-8;for(;r<=a;r+=8){let e=t^i.getInt32(r,!0),n=i.getInt32(r+4,!0);t=ma[e&255]^pa[e>>>8&255]^fa[e>>>16&255]^da[e>>>24&255]^ua[n&255]^la[n>>>8&255]^ca[n>>>16&255]^sa[n>>>24&255]}}for(;r<n;r++)t=t>>>8^sa[(t^e[r])&255];this.crc=t}get(){return~this.crc}},ga=class extends TransformStream{constructor(){let e,t=new ha;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){let n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}};function _a(e){if(typeof TextEncoder>`u`){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return new TextEncoder().encode(e)}var G={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],r=G.getPartial(n);return r===32?e.concat(t):G._shiftRight(t,r,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+G.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t&=31,n>0&&t&&(e[n-1]=G.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let i=0;i<e.length;i++)r.push(n|e[i]>>>t),n=e[i]<<32-t;let i=e.length?e[e.length-1]:0,a=G.getPartial(i);return r.push(G.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},va={bytes:{fromBits(e){let t=G.bitLength(e)/8,n=new Uint8Array(t),r;for(let i=0;i<t;i++)i&3||(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){let t=[],n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],(n&3)==3&&(t.push(r),r=0);return n&3&&t.push(G.partial(8*(n&3),r)),t}}},ya={};ya.sha1=class{constructor(e){let t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){let e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){let t=this;typeof e==`string`&&(e=va.utf8String.toBits(e));let n=t._buffer=G.concat(t._buffer,e),r=t._length,i=t._length=r+G.bitLength(e);if(i>9007199254740991)throw Error(`Cannot hash more than 2^53 - 1 bits`);let a=new Uint32Array(n),o=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);e<=i;e+=t.blockSize)t._block(a.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t}finalize(){let e=this,t=e._buffer,n=e._h;t=G.concat(t,[G.partial(1,1)]);for(let e=t.length+2;e&15;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,r=Array(80);for(let t=0;t<16;t++)r[t]=e[t];let i=n[0],a=n[1],o=n[2],s=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(r[e]=t._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));let n=t._S(5,i)+t._f(e,a,o,s)+c+r[e]+t._key[Math.floor(e/20)]|0;c=s,s=o,o=t._S(30,a),a=i,i=n}n[0]=n[0]+i|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0}};var ba={};ba.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],r=t._tables[1],i=e.length,a,o,s,c=1;if(i!==4&&i!==6&&i!==8)throw Error(`invalid aes key size`);for(t._key=[o=e.slice(0),s=[]],a=i;a<4*i+28;a++){let e=o[a-1];(a%i===0||i===8&&a%i===4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[e&255],a%i===0&&(e=e<<8^e>>>24^c<<24,c=c<<1^(c>>7)*283)),o[a]=o[a-i]^e}for(let e=0;a;e++,a--){let t=o[e&3?a:a-4];a<=4||e<4?s[e]=t:s[e]=r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[t&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],a=[],o,s,c,l;for(let e=0;e<256;e++)a[(i[e]=e<<1^(e>>7)*283)^e]=e;for(let u=o=0;!n[u];u^=s||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^a&255^99,n[u]=a,r[a]=u,l=i[c=i[s=i[u]]];let d=l*16843009^c*65537^s*257^u*16843008,f=i[a]*257^a*16843008;for(let n=0;n<4;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=d=d<<24^d>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(e.length!==4)throw Error(`invalid aes block size`);let n=this._key[t],r=n.length/4-2,i=[0,0,0,0],a=this._tables[t],o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=e[0]^n[0],f=e[t?3:1]^n[1],p=e[2]^n[2],m=e[t?1:3]^n[3],h=4,g,_,v;for(let e=0;e<r;e++)g=o[d>>>24]^s[f>>16&255]^c[p>>8&255]^l[m&255]^n[h],_=o[f>>>24]^s[p>>16&255]^c[m>>8&255]^l[d&255]^n[h+1],v=o[p>>>24]^s[m>>16&255]^c[d>>8&255]^l[f&255]^n[h+2],m=o[m>>>24]^s[d>>16&255]^c[f>>8&255]^l[p&255]^n[h+3],h+=4,d=g,f=_,p=v;for(let e=0;e<4;e++)i[t?3&-e:e]=u[d>>>24]<<24^u[f>>16&255]<<16^u[p>>8&255]<<8^u[m&255]^n[h++],g=d,d=f,f=p,p=m,m=g;return i}};var xa={};xa.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)==255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];let i=G.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(n);let r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return G.clamp(t,i)}};var Sa={importKey(e){return new Sa.hmacSha1(va.bytes.toBits(e))},pbkdf2(e,t,n,r){if(n||=1e4,r<0||n<0)throw Error(`invalid params to pbkdf2`);let i=(r>>5)+1<<2,a,o,s,c,l,u=new ArrayBuffer(i),d=new DataView(u),f=0,p=G;for(t=va.bytes.toBits(t),l=1;f<(i||1);l++){for(a=o=e.encrypt(p.concat(t,[l])),s=1;s<n;s++)for(o=e.encrypt(o),c=0;c<o.length;c++)a[c]^=o[c];for(s=0;f<(i||1)&&s<a.length;s++)d.setInt32(f,a[s]),f+=4}return u.slice(0,r/8)}};Sa.hmacSha1=class{constructor(e){let t=this,n=t._hash=ya.sha1,r=[[],[]];t._baseHash=[new n,new n];let i=t._baseHash[0].blockSize/32;e.length>i&&(e=new n().update(e).finalize());for(let t=0;t<i;t++)r[0][t]=e[t]^909522486,r[1][t]=e[t]^1549556828;t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){let e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){let t=this;t._updated=!0,t._resultHash.update(e)}digest(){let e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw Error(`encrypt on already updated hmac called!`);return this.update(e),this.digest(e)}};var Ca=typeof crypto<`u`&&typeof crypto.getRandomValues==`function`,wa=`Invalid password`,Ta=`Invalid signature`,Ea=Ta,Da=`zipjs-abort-check-password`,Oa=`Crypto API not supported`;function ka(e){if(Ca)return crypto.getRandomValues(e);throw Error(Oa)}var Aa=16,ja=`raw`,Ma={name:`PBKDF2`},Na={name:`HMAC`},Pa=`SHA-1`,Fa=Object.assign({hash:Na},Ma),Ia=Object.assign({iterations:1e3,hash:{name:Pa}},Ma),La=[`deriveBits`],Ra=[8,12,16],za=[16,24,32],Ba=10,Va=[0,0,0,0],Ha=typeof crypto!=Zr,Ua=Ha&&crypto.subtle,Wa=Ha&&Ua!==void 0,Ga=va.bytes,Ka=ba.aes,qa=xa.ctrGladman,Ja=Sa.hmacSha1,Ya=Ha&&Wa&&typeof Ua.importKey==`function`,Xa=Ha&&Wa&&typeof Ua.deriveBits==`function`,Za=class extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:i=!0}){super({start(){$a(this,e,t,n)},async transform(e,t){let n=this,{password:i,strength:a,resolveReady:o,ready:s}=n;i?(await to(n,a,i,K(e,0,Ra[a]+2)),e=K(e,Ra[a]+2),r?t.error(Error(Da)):o()):await s;let c=new Uint8Array(e.length-Ba-(e.length-Ba)%Aa);t.enqueue(eo(n,e,c,0,Ba,!0))},async flush(e){let{ctr:t,hmac:n,pendingInput:r,ready:a}=this;if(n&&t){await a;let o=K(r,0,r.length-Ba),s=K(r,r.length-Ba),c=$r;if(o.length){let e=lo(Ga,o);n.update(e),c=co(Ga,t.update(e))}let l=K(co(Ga,n.digest()),0,Ba),u=+(r.length<Ba);for(let e=0;e<Ba;e++)u|=l[e]^s[e];if(u&&i)throw Error(Ea);e.enqueue(c)}}})}},Qa=class extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:n}){super({start(){$a(this,e,t,n)},async transform(e,t){let n=this,{password:r,strength:i,resolveReady:a,ready:o}=n,s=$r;r?(s=await no(n,i,r),a()):await o;let c=new Uint8Array(s.length+e.length-e.length%Aa);c.set(s,0),t.enqueue(eo(n,e,c,s.length,0))},async flush(e){let{ctr:t,hmac:n,pendingInput:r,ready:i}=this;if(n&&t){await i;let a=$r;if(r.length){let e=t.update(lo(Ga,r));n.update(e),a=co(Ga,e)}let o=co(Ga,n.digest()).slice(0,Ba);e.enqueue(ia(a,o))}}})}};function $a(e,t,n,r){Object.assign(e,{ready:new Promise(t=>e.resolveReady=t),password:oo(t,n),strength:r-1,pendingInput:$r})}function eo(e,t,n,r,i,a){let{ctr:o,hmac:s,pendingInput:c}=e;c.length&&(t=ia(c,t));let l=t.length-i;n=so(n,r+(l-l%Aa));let u;for(u=0;u<=l-Aa;u+=Aa){let e=lo(Ga,K(t,u,u+Aa));a&&s.update(e);let i=o.update(e);a||s.update(i),n.set(co(Ga,i),u+r)}return e.pendingInput=K(t,u),n}async function to(e,t,n,r){let i=await ro(e,t,n,K(r,0,Ra[t])),a=K(r,Ra[t]);if(i[0]!=a[0]||i[1]!=a[1])throw Error(wa)}async function no(e,t,n){let r=ka(new Uint8Array(Ra[t]));return ia(r,await ro(e,t,n,r))}async function ro(e,t,n,r){e.password=null;let i=await io(ja,n,Fa,!1,La),a=await ao(Object.assign({salt:r},Ia),i,8*(za[t]*2+2)),o=new Uint8Array(a),s=lo(Ga,K(o,0,za[t])),c=lo(Ga,K(o,za[t],za[t]*2)),l=K(o,za[t]*2);return Object.assign(e,{keys:{key:s,authentication:c,passwordVerification:l},ctr:new qa(new Ka(s),Array.from(Va)),hmac:new Ja(c)}),l}async function io(e,t,n,r,i){if(Ya)try{return await Ua.importKey(e,t,n,r,i)}catch{return Ya=!1,Sa.importKey(t)}return Sa.importKey(t)}async function ao(e,t,n){if(Xa)try{return await Ua.deriveBits(e,t,n)}catch{return Xa=!1,Sa.pbkdf2(t,e.salt,Ia.iterations,n)}return Sa.pbkdf2(t,e.salt,Ia.iterations,n)}function oo(e,t){return t===void 0?_a(e):t}function so(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function K(e,t,n){return e.subarray(t,n)}function co(e,t){return e.fromBits(t)}function lo(e,t){return e.toBits(t)}var uo=12,fo=class extends TransformStream{constructor({password:e,rawPassword:t,passwordVerification:n,checkPasswordOnly:r}){super({start(){mo(this,e,t,n)},transform(e,t){let n=this;if(n.password||n.rawPassword){let t=ho(n,e.subarray(0,uo));if(n.password=n.rawPassword=null,(t[11]^n.passwordVerification)!=0)throw Error(wa);e=e.subarray(uo)}r?t.error(Error(Da)):t.enqueue(ho(n,e))}})}},po=class extends TransformStream{constructor({password:e,rawPassword:t,passwordVerification:n}){super({start(){mo(this,e,t,n)},transform(e,t){let n=this,r,i;if(n.password||n.rawPassword){n.password=n.rawPassword=null;let t=ka(new Uint8Array(uo));t[11]=n.passwordVerification,r=new Uint8Array(e.length+t.length),r.set(go(n,t),0),i=uo}else r=new Uint8Array(e.length),i=0;r.set(go(n,e),i),t.enqueue(r)}})}};function mo(e,t,n,r){Object.assign(e,{password:t,rawPassword:n,passwordVerification:r}),_o(e,t,n)}function ho(e,t){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=yo(e)^t[r],vo(e,n[r]);return n}function go(e,t){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=yo(e)^t[r],vo(e,t[r]);return n}function _o(e,t,n){let r=[305419896,591751049,878082192];if(Object.assign(e,{keys:r,crcKey0:new ha(r[0]),crcKey2:new ha(r[2])}),n)for(let t=0;t<n.length;t++)vo(e,n[t]);else for(let n=0;n<t.length;n++)vo(e,t.charCodeAt(n))}function vo(e,t){let[,n]=e.keys;e.crcKey0.append([t]);let r=~e.crcKey0.get();n=xo(Math.imul(xo(n+bo(r)),134775813)+1),e.crcKey2.append([n>>>24]);let i=~e.crcKey2.get();e.keys=[r,n,i]}function yo(e){let t=e.keys[2]|2;return bo(Math.imul(t,t^1)>>>8)}function bo(e){return e&255}function xo(e){return e&4294967295}function So(e){if(e instanceof ReadableStream)return e;let t=e.getReader();return new ReadableStream({async pull(e){let{value:n,done:r}=await t.read();r?e.close():e.enqueue(n)},cancel(e){return t.cancel(e)}})}function Co(e,t){e=So(e);let n=t?{type:t}:{};if(wo())return new Response(e).blob().then(e=>t?new Blob([e],n):e);let r=[];return e.pipeTo(new WritableStream({write(e){r.push(e)}})).then(()=>new Blob(r,n))}function wo(){return typeof Blob.prototype.stream!=`function`||new Blob([]).stream()instanceof ReadableStream}function To(e){if(e instanceof WritableStream)return e;let t=e.getWriter();return new WritableStream({write(e){return t.write(e)},close(){return t.close()},abort(e){return t.abort(e)}})}var Eo=`Invalid codec module`,Do=new Map,Oo=new Map;function ko(e){return Do.get(e)}function Ao(e){return Oo.get(e)}function jo(e,t){let{CompressionStream:n,DecompressionStream:r}=t;if(typeof n!=`function`&&typeof r!=`function`)throw Error(Eo);Oo.set(e,{CompressionStream:n,DecompressionStream:r})}async function Mo(e,t){!Oo.has(e)&&t&&jo(e,await import(t))}var No=`Invalid uncompressed size`,Po=`Invalid compressed data`,Fo=Ta,Io=`Compression method not supported`,Lo=`deflate-raw`,Ro=`deflate64-raw`,zo=`gzip`,Bo=10,Vo=8,Ho=[31,139,8],Uo=5e3,Wo=class extends TransformStream{constructor(e,{chunkSize:t,CompressionStreamFallback:n,CompressionStream:r}){super({});let{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:s,computeCrc32:c,level:l,deflate64:u,format:d,compressionMethod:f,inputSize:p}=e,m=this,h,g,_,v=super.readable,y=d&&Ao(d),b=c&&i&&!u&&!y&&(!a||s)&&!!(o&&r);if((!a||s)&&c&&!b&&(h=new ga,v=es(v,h)),i){if(y)v=ts(v,Qo(y.CompressionStream,d,{level:l,chunkSize:t,compressionMethod:f,uncompressedSize:p}));else if(b)_=new Go,v=ts(v,new r(zo)),v=es(v,_);else try{v=$o(v,o,{level:l,chunkSize:t},r,n)}catch(e){let t;try{t=new r(zo)}catch{throw e}v=ts(v,t),v=es(v,new Go)}}a&&(s?v=es(v,new po(e)):(g=new Qa(e),v=es(v,g))),Zo(m,v,()=>{(!a||s)&&c&&(m.crc32=b?_.crc32:new DataView(h.value.buffer).getUint32(0))})}},Go=class extends TransformStream{constructor(){let e,t=Bo,n=new Uint8Array;super({transform(e,r){if(t){let n=Math.min(t,e.length);if(t-=n,e=e.subarray(n),!e.length)return}let i=n.length+e.length;if(i<=Vo){n=ia(n,e);return}let a=i-Vo,o=Math.min(a,n.length);r.enqueue(ia(n.subarray(0,o),e.subarray(0,a-o))),n=ia(n.subarray(o),e.subarray(a-o))},flush(){let t=W(n);e.crc32=t.getUint32(0,!0),e.uncompressedSize=t.getUint32(4,!0)}}),e=this}};function Ko(e,t,n){let r=new ha,i=0,a=!1,o,s,c,l=new Promise((e,t)=>{s=e,c=t});l.catch(()=>{}),n||s();let u=new TransformStream({start(e){let t=new Uint8Array(Bo);t.set(Ho),e.enqueue(t)},transform(e,t){t.enqueue(e)},async flush(e){a=!0,f();try{await l}finally{p()}let t=new Uint8Array(Vo),i=W(t);i.setUint32(0,r.get(),!0),i.setUint32(4,n,!0),e.enqueue(t)},cancel(e){c(e)}}),d=new TransformStream({transform(e,t){r.append(e),i+=e.length,i>=n?s():a&&f(),t.enqueue(e)},cancel(e){c(e)}});return e=es(e,u),e=ts(e,t),es(e,d);function f(){p(),o=setTimeout(()=>c(Error(No)),Uo)}function p(){clearTimeout(o)}}var qo=class extends TransformStream{constructor(e,{chunkSize:t,DecompressionStreamFallback:n,DecompressionStream:r}){super({});let{zipCrypto:i,encrypted:a,checkCrc32:o,crc32:s,compressed:c,useCompressionStream:l,deflate64:u,format:d,compressionMethod:f,rawBitFlag:p,outputSize:m}=e,h,g,_=super.readable;if(a&&(i?_=es(_,new fo(e)):(g=new Za(e),_=es(_,g))),c){let e=d&&Ao(d);if(e)_=ts(_,Qo(e.DecompressionStream,d,{chunkSize:t,compressionMethod:f,rawBitFlag:p,uncompressedSize:m}));else try{_=$o(_,l,{chunkSize:t,deflate64:u},r,n)}catch(e){if(u||m===void 0)throw e;let t;try{t=new r(zo)}catch{throw e}_=Ko(_,t,m)}_=is(_)}o&&(h=new ga,_=es(_,h)),Zo(this,_,()=>{if(o){let e=new DataView(h.value.buffer);if(s!=e.getUint32(0,!1))throw Error(Fo)}})}},Jo=new Map;function Yo(e,t){if(!e)return!1;let n=Jo.get(e);n||(n=new Map,Jo.set(e,n));let r=n.get(t);if(r===void 0){try{new e(t),r=!0}catch{r=!1}n.set(t,r)}return r}function Xo(e){return Yo(e,Lo)}function Zo(e,t,n){t=es(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function Qo(e,t,n){if(!e)throw Error(Io);return new e(t,n)}function $o(e,t,n,r,i){let a=t&&r?r:i||r,o=n.deflate64?Ro:Lo,s;try{s=new a(o,n)}catch(e){if(t&&i&&a!=i)s=new i(o,n);else throw e}return ts(e,s)}function es(e,t){return So(e).pipeThrough(t)}function ts(e,t){let n=t.writable.getWriter(),r=e.getReader();return i(),t.readable;async function i(){try{for(;;){await n.ready;let e=await r.read();if(e.done){await n.close();break}await n.write(e.value)}}catch(e){await ns(n,e),await rs(r,e)}}}async function ns(e,t){try{await e.abort(t)}catch{}}async function rs(e,t){try{await e.cancel(t)}catch{}}function is(e){let t=e.getReader();return new ReadableStream({async pull(e){let n;try{n=await t.read()}catch(e){if(e&&e.message)throw e;let t=Error(Po);throw t.cause=e,t}let{value:r,done:i}=n;i?e.close():e.enqueue(r)},cancel(e){return t.cancel(e)}})}var as=65536,os=`message`,ss=`start`,cs=`data`,ls=`deflate`,us=`inflate`,ds=class extends TransformStream{constructor(e,t){super({});let n=this,{codecType:r}=e,i;r.startsWith(`deflate`)?i=Wo:r.startsWith(`inflate`)&&(i=qo),n.outputSize=0;let a=0,o=new i(e,t),s=super.readable,c=new TransformStream({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){Object.assign(n,{inputSize:a})}}),l=new TransformStream({transform(t,r){if(t&&t.length&&(r.enqueue(t),n.outputSize+=t.length,e.outputSize!==void 0&&n.outputSize>e.outputSize))throw Error(No)},flush(){let{crc32:e}=o;Object.assign(n,{crc32:e,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return s.pipeThrough(c).pipeThrough(o).pipeThrough(l)}})}},fs=class extends TransformStream{constructor(e){let t=[],n=0;(!Number.isFinite(e)||e<1)&&(e=as),super({transform(i,a){for(t.push(i),n+=i.length;n>e;)a.enqueue(r())},flush(e){n&&e.enqueue(i(t,n))}});function r(){let r=new Uint8Array(e),i=0;for(;i<e;){let n=t[0],a=e-i;n.length<=a?(r.set(n,i),i+=n.length,t.shift()):(r.set(n.subarray(0,a),i),t[0]=n.subarray(a),i+=a)}return n-=e,r}function i(e,t){let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}}},ps=`Worker startup timeout`,ms,hs,gs,_s=()=>{};function vs({initModule:e}){_s=e}function ys(e){gs=e}function bs(e){e.createWorker?hs=!0:ms=!1}var xs=class{constructor(e,{readable:t,writable:n},{options:r,config:i,streamOptions:a,useWebWorkers:o,transferStreams:s,workerURI:c,createWorker:l},u){let{signal:d}=a;return hs&&(l=void 0),Object.assign(e,{busy:!0,generation:(e.generation||0)+1,readable:t.pipeThrough(new fs(Yi(i))).pipeThrough(new Ss(a),{signal:d}),writable:n,options:Object.assign({},r),workerURI:c,createWorker:l,transferStreams:s,terminate(){return new Promise(t=>{let{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})},onTaskFinished(){if(e.busy){let{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,u(e)}}}),ms===void 0&&(ms=typeof Worker!=Zr),(o&&gs&&(ms&&c||l)?gs:ws)(e,i)}},Ss=class extends TransformStream{constructor({onstart:e,onprogress:t,size:n,onend:r}){let i=0;super({async start(){e&&await Cs(e,n)},async transform(e,r){i+=e.length,t&&await Cs(t,i,n),r.enqueue(e)},async flush(){r&&await Cs(r,i)}})}};async function Cs(e,...t){try{await e(...t)}catch{}}function ws(e,t){return{run:()=>Ts(e,t)}}async function Ts({options:e,readable:t,writable:n,onTaskFinished:r},i){let a;try{if(e.compressed&&!e.format){let t=e.codecType.startsWith(ls),n=t?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=t?i.CompressionStream:i.DecompressionStream;if(!e.useCompressionStream)try{await _s(i)}catch{(!n||n.requiresModule)&&(e.useCompressionStream=!0)}else if(n&&n.requiresModule&&!Xo(r))try{await _s(i)}catch{}}a=new ds(e,i),await t.pipeThrough(a).pipeThrough(new fs(Yi(i))).pipeTo(n,{preventClose:!0,preventAbort:!0});let{crc32:r,inputSize:o,outputSize:s}=a;return{crc32:r,inputSize:o,outputSize:s}}catch(e){throw a&&(e.outputSize=a.outputSize),e}finally{r()}}var Es={type:`module`},Ds=`error`,Os=`messageerror`,ks,As,js,Ms=!0;try{Ms=typeof structuredClone==`function`&&structuredClone(new DOMException(``,`AbortError`)).code!==void 0}catch{}ys(Ns);function Ns(e,t){let{baseURI:n,chunkSize:r,workerStartupTimeout:i}=t,{wasmURI:a}=t;if(!e.interface){typeof a==`function`&&(a=a());let o;try{o=Rs(e.workerURI,n,e)}catch{return bs(e),ws(e,t)}Object.assign(e,{worker:o,workerAlive:!1,terminated:!1,startupError:null,interface:{run:async()=>{try{return await Ps(e,{chunkSize:r,wasmURI:a,baseURI:n,workerStartupTimeout:i})}catch(n){if(n&&n.workerStartupFailed)return bs(e),Is(e),Ts(e,t);if(n&&n.codecImportFailed){if(e.reader)return Is(e),Ts(e,t);e.onTaskFinished()}throw n}}}})}return e.interface}async function Ps(e,t){if(!e.worker){let{startupError:t}=e;e.startupError=null;let n=t||Error(`Worker startup timeout`);throw n.workerStartupFailed=!0,n}let n,r,i=new Promise((e,t)=>{n=e,r=t});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});let{readable:a,options:o}=e,{writable:s,closed:c,abortPipe:l}=Fs(e.writable),u;try{u=Hs({type:ss,options:o,config:t,readable:a,writable:s},e)}catch(t){l();try{await c}catch{}throw e.onTaskFinished(),t}u||Object.assign(e,{reader:a.getReader(),writer:s.getWriter()});let{workerStartupTimeout:d}=t;!e.workerAlive&&Number.isFinite(d)&&d>=0&&(e.startupTimeout=setTimeout(()=>zs(e),d));try{let e=await i;return await f(),await c,e}catch(e){await f(),l();try{await c}catch{}throw e}async function f(){if(!u&&!s.locked)try{await s.getWriter().close()}catch{}}}function Fs(e){let t=new AbortController,{writable:n,readable:r}=new TransformStream,i=r.pipeTo(e,{preventClose:!0,preventAbort:!0,signal:t.signal});return i.catch(()=>{}),{writable:n,closed:i,abortPipe:()=>t.abort()}}function Is(e){let{reader:t}=e;t&&t.releaseLock(),e.reader=null,e.writer=null}function Ls(e){let{worker:t}=e;if(t)try{t.terminate()}catch{}e.interface=null}function Rs(e,t,n,r,i=!0){let{createWorker:a}=n,o,s,c;if(a)o=a();else if(As===void 0||ks!==e){let a=typeof e==Qr;s=a?e(i):e;let l=s.startsWith(`data:`),u=s.startsWith(`blob:`);if(l||u){r===void 0&&(r=!1),r&&(c=Es);try{o=new Worker(s,c)}catch(i){if(u)try{URL.revokeObjectURL(s)}catch{}if(a&&u)return Rs(e,t,n,r,!1);if(r)throw i;return Rs(e,t,n,!0,!1)}}else{r===void 0&&(r=!0),r&&(c=Es);try{s=new URL(s,t)}catch{}try{o=new Worker(s,c)}catch(a){if(r)return Rs(e,t,n,!1,i);throw a}}ks=e,As=s,js=c}else o=new Worker(As,js);return o.addEventListener(os,e=>{n.workerAlive=!0,Bs(n),Us(e,n)}),o.addEventListener(Ds,e=>Vs(e,n)),o.addEventListener(Os,e=>Vs(e,n)),o}function zs(e){if(e.startupTimeout=null,e.workerAlive)return;let{rejectResult:t,writer:n}=e;if(Ls(e),e.worker=null,t){let e=Error(ps);e.workerStartupFailed=!0,t(e),n&&n.releaseLock()}}function Bs(e){let{startupTimeout:t}=e;t&&(clearTimeout(t),e.startupTimeout=null)}function Vs(e,t){e.preventDefault&&e.preventDefault(),Bs(t);let{workerAlive:n,rejectResult:r,writer:i,onTaskFinished:a}=t;Ls(t),n||(t.worker=null);let o=e.error||Error(e.message||Ds);n||(o=Object.assign(Error(o.message||Ds),{workerStartupFailed:!0}),t.startupError=o),r&&(r(o),i&&i.releaseLock(),n&&a())}function Hs(e,{worker:t,writer:n,transferStreams:r,workerAlive:i}){try{let{value:n,readable:a,writable:o}=e,s=[];if(n&&(e.value=aa(n),s.push(e.value.buffer)),r&&Ms&&i?(a&&s.push(a),o&&s.push(o)):e.readable=e.writable=null,s.length)try{return t.postMessage(e,s),!0}catch{Ms=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),e}}async function Us({data:e},t){let{type:n,value:r,messageId:i,result:a,error:o}=e,{reader:s,writer:c,resolveResult:l,rejectResult:u,onTaskFinished:d,generation:f}=t,p=()=>t.generation!=f;try{if(o){let{message:e,stack:t,code:n,name:r,outputSize:i,cause:a,codecImportFailed:s}=o,c=Error(e);Object.assign(c,{stack:t,code:n,name:r,outputSize:i}),a&&(c.cause=Object.assign(Error(a.message),{name:a.name})),s&&(c.codecImportFailed=!0),m(c)}else{if(n==`pull`){let{value:e,done:n}=await s.read();p()||Hs({type:cs,value:e,done:n,messageId:i},t)}n==`data`&&(await c.ready,await c.write(new Uint8Array(r)),p()||Hs({type:`ack`,messageId:i},t)),n==`close`&&m(null,a)}}catch(e){p()||(Ls(t),m(e))}function m(e,t){p()||(e?u(e):l(t),c&&c.releaseLock(),e&&e.codecImportFailed||d())}}var Ws=[],Gs=[],Ks,qs,Js=0;async function Ys(e,t){let{options:n,config:r}=t,{transferStreams:i,useWebWorkers:a,useCompressionStream:o,compressed:s,checkCrc32:c,computeCrc32:l,encrypted:u,format:d,codecURI:f}=n,{workerURI:p,createWorker:m,maxWorkers:h}=r;d&&(f&&(n.codecURI=Xs(f,r.baseURI)),await Mo(d,n.codecURI)),t.transferStreams=!d&&(i||i===void 0&&r.transferStreams);let g=!s&&!c&&!l&&!u,_=d===void 0||!!n.codecURI;return t.useWebWorkers=!g&&_&&(a||a===void 0&&r.useWebWorkers),t.workerURI=t.useWebWorkers&&p?p:void 0,t.createWorker=t.useWebWorkers&&m?m:void 0,n.useCompressionStream=o||o===void 0&&r.useCompressionStream,(await v()).run();async function v(){let n=Ws.find(e=>!e.busy);if(n)return nc(n),new xs(n,e,t,y);if(Ws.length<h){let n={indexWorker:Js};return Js++,Ws.push(n),new xs(n,e,t,y)}return new Promise(n=>{Gs.push({resolve:n,stream:e,workerOptions:t}),qs=r.workerStarvationTimeout,Zs()})}function y(e){if(Qs(),Gs.length){let[{resolve:t,stream:n,workerOptions:r}]=Gs.splice(0,1);t(new xs(e,n,r,y)),Zs()}else e.worker?(nc(e),tc(e,t)):Ws=Ws.filter(t=>t!=e)}}function Xs(e,t){try{return new URL(e,t).toString()}catch{return e}}function Zs(){!Ks&&Gs.length&&Number.isFinite(qs)&&qs>=0&&(Ks=setTimeout($s,qs))}function Qs(){Ks&&=(clearTimeout(Ks),null)}function $s(){if(Ks=null,Gs.length){let[{resolve:e,stream:t,workerOptions:n}]=Gs.splice(0,1);e(new xs({},t,Object.assign({},n,{useWebWorkers:!1,workerURI:void 0,createWorker:void 0}),ec)),Zs()}}function ec(){Qs(),Zs()}function tc(e,t){let{config:n}=t,{terminateWorkerTimeout:r}=n;Number.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{Ws=Ws.filter(t=>t!=e);try{await e.terminate()}catch{}},r))}function nc(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var rc=`\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xA0`.split(``),ic=rc.length==256;function ac(e){if(ic){let t=``;for(let n=0;n<e.length;n++)t+=rc[e[n]];return t}return new TextDecoder().decode(e)}function oc(e,t){return sc(e,t,!0)}function sc(e,t,n){return t&&t.trim().toLowerCase()==`cp437`?ac(e):new TextDecoder(t,{ignoreBOM:n}).decode(e)}var cc=`Writer iterator completed too soon`,lc=`Writer not initialized`,uc=262144,dc=`writable`,fc=Symbol(),pc=class{constructor(){this.size=0}init(){this.initialized=!0}},mc=class extends pc{get readable(){return this.createReadable()}createReadable({offset:e=0,size:t,chunkSize:n=Yi(Ji())}={}){let r=this,i=0;return n=Xi(n),new ReadableStream({async pull(a){let o=t===void 0?n:Math.min(n,t-i),s=await q(r,e+i,o);s.length&&a.enqueue(s),i+n>=t||!s.length&&o?a.close():i+=n}})}},hc=class extends pc{constructor(){super();let e=this,t=new WritableStream({write(t){if(!e.initialized)throw Error(lc);return e.writeUint8Array(aa(t))}});Object.defineProperty(e,dc,{get(){return t}})}writeUint8Array(){}},gc,_c;function vc(){_c=(async()=>{try{let e=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader(),t=0,n=await e.read();for(;!n.done;)t+=n.value.length,n=await e.read();gc=t==1}catch{gc=!1}})()}var yc=class extends mc{constructor(e){super(),Object.assign(this,{sourceBlob:e,size:e.size}),_c||vc()}createReadable(e){let{sourceBlob:t,size:n}=this,{offset:r=0,size:i=n-r}=e||{};return!r&&i>=n?So(t.stream()):gc?So(t.slice(r,r+i).stream()):super.createReadable(e)}async readUint8Array(e,t){let n=this,r=e+t,i=await(!e&&r>=n.size?n.sourceBlob:n.sourceBlob.slice(e,r)).arrayBuffer();return i.byteLength>t&&(i=i.slice(e,r)),new Uint8Array(i)}},bc=class extends mc{constructor(e){super(),e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Object.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},xc=class extends hc{constructor(e){super(),this.defaultBufferSize=e||uc}init(e=0){Object.assign(this,{offset:0,array:new Uint8Array(e>0?e:this.defaultBufferSize)}),super.init()}writeUint8Array(e){let t=this,n=t.offset+e.length;if(n>t.array.length){let e=t.array.length?t.array.length*2:t.defaultBufferSize;for(;e<n;)e*=2;let r=t.array;t.array=new Uint8Array(e),t.array.set(r)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.offset===this.array.length?this.array:this.array.slice(0,this.offset)}},Sc=class extends mc{constructor(e){super(),this.readers=e}async init(){let e=this;e.lastDiskNumber=0,e.diskOffsets=(e.readers=await Promise.all(e.readers.map(Oc))).map(t=>{let n=e.size;return e.size+=t.size,n}),super.init()}getDiskOffset(e){let{diskOffsets:t,size:n}=this,r=t[e];return r===void 0?n:r}async readUint8Array(e,t){let n=this,{readers:r}=this,i,a=0,o=e;for(;r[a]&&o>=r[a].size;)o-=r[a].size,a++;let s=r[a];if(s){let r=s.size;if(o+t<=r)i=await q(s,o,t);else{let a=r-o;i=ia(await q(s,o,a),await n.readUint8Array(e+a,t-a))}}else i=$r;return n.lastDiskNumber=Math.max(a,n.lastDiskNumber),i}},Cc=class extends pc{constructor(e,t=4294967295){super();let n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let r,i,a,o=new WritableStream({async write(t){if(t===fc){a&&await c();return}let{availableSize:o}=n;if(a)t.length>=o?(await s(t.subarray(0,o)),await c(),t.length>o&&await this.write(t.subarray(o))):await s(t);else{let{value:o,done:s}=await e.next();if(s&&!o)throw Error(cc);r=o,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await Dc(r),i=o.writable,a=i.getWriter(),await this.write(t)}},async close(){a&&(await a.ready,await l())},async abort(e){a&&await a.abort(e)}});Object.defineProperty(n,dc,{get(){return o}});async function s(e){let t=e.length;t&&(await a.ready,await a.write(e),r.size+=t,n.availableSize-=t)}async function c(){await l(),n.diskOffset+=r.size,n.diskNumber++,a=null,n.availableSize=n.maxSize}async function l(){await a.close()}}async closeDisk(){let e=this.writable.getWriter();try{await e.ready,await e.write(fc)}finally{e.releaseLock()}}},wc=class{constructor(e){return Array.isArray(e)&&(e=new Sc(e)),(e instanceof ReadableStream||typeof e.getReader==`function`)&&(e={readable:So(e)}),e}},Tc=class{constructor(e){return e.writable===void 0&&typeof e.next==`function`&&(e=new Cc(e)),(e instanceof WritableStream||typeof e.getWriter==`function`)&&(e={writable:To(e)}),e.size===void 0&&(e.size=0),e}};function Ec(e){return!!(e&&e.getData)}async function Dc(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}async function Oc(e){return e=new wc(e),await Dc(e),(e.size===void 0||!e.readUint8Array)&&(e=new yc(await Co(e.readable)),await Dc(e)),e}function q(e,t,n){return e.readUint8Array(t,n)}var kc=`filename`,Ac=`rawFilename`,jc=`comment`,Mc=`rawComment`,Nc=`uncompressedSize`,Pc=`compressedSize`,Fc=`offset`,Ic=`diskNumberStart`,Lc=`lastModDate`,Rc=`rawLastModDate`,zc=`lastAccessDate`,Bc=`rawLastAccessDate`,Vc=`creationDate`,Hc=`rawCreationDate`,Uc=[kc,Ac,Nc,Pc,Lc,Rc,jc,Mc,zc,Bc,Vc,Hc,Fc,Ic,`internalFileAttributes`,`externalFileAttributes`,`internalFileAttribute`,`externalFileAttribute`,`msdosAttributesRaw`,`msdosAttributes`,`msDosCompatible`,`zip64`,`encrypted`,`version`,`versionMadeBy`,`zipCrypto`,`directory`,`executable`,`symlink`,`compressionMethod`,`signature`,`crc32`,`extraField`,`extraFieldUnix`,`extraFieldInfoZip`,`extraFieldUnixType1`,`extraFieldPkwareUnix`,`uid`,`gid`,`unixMode`,`unixExternalUpper`,`setuid`,`setgid`,`sticky`,`bitFlag`,`rawBitFlag`,`filenameLength`,`extraFieldLength`,`filenameUTF8`,`commentUTF8`,`rawExtraField`,`extraFieldZip64`,`extraFieldUnicodePath`,`extraFieldUnicodeComment`,`extraFieldAES`,`extraFieldNTFS`,`extraFieldExtendedTimestamp`,`extraFieldUSDZ`],Wc=class{constructor(e){Uc.forEach(t=>this[t]=e[t])}},Gc=`File format is not recognized`,Kc=`End of central directory not found`,qc=`End of Zip64 central directory locator not found`,Jc=`Central directory header not found`,Yc=`Local file header not found`,Xc=`Zip64 extra field not found`,Zc=`File contains encrypted entry`,Qc=`Encryption method not supported`,$c=`Compression method not supported`,el=`Split zip file`,tl=`Overlapping entry found`,nl=`Entry data out of bounds`,rl=`Ambiguous archive`,il=`Encrypted central directory is not supported`,al=`Unsafe filename`,ol=`Invalid strictness (must be 'strict', 'balanced' or 'tolerant')`,sl=`Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')`,cl=`Invalid maxAppendedDataSize (must be a number greater than or equal to 0)`,ll=`64-bit value exceeds Number.MAX_SAFE_INTEGER`,ul=`unsorted central directory`,dl=`unknown version needed to extract`,fl=`compressed patched data`,pl=`malformed extra field`,ml=`unknown zip64 extensible data`,hl=`wrapped entries count`,gl=`appended data`,_l=`prepended data`,vl=`trailing central directory data`,yl=`duplicate filename`,bl=`mismatched zip64 end of central directory record`,xl=`mismatched local file header (general purpose bit flag)`,Sl=`mismatched local file header (compression method)`,Cl=`mismatched local file header (crc32 or sizes)`,wl=63,Tl=/^[a-zA-Z]:/,El=`utf-8`,Dl=`UTF8`,Ol=`cp437`,kl=9|Wr,Al=1,jl=[[Nc,Mr],[Pc,Mr],[Fc,Mr],[Ic,Nr]],Ml={[Nr]:{getValue:X,bytes:4},[Mr]:{getValue:Z,bytes:8}},Nl=BigInt(2**53-1),Pl=64,Fl=1032,Il=0,Ll=1,Rl=2,zl=class{constructor(e,t={}){Object.assign(this,{reader:new wc(e),options:t,readRanges:new Map})}async*getEntriesGenerator(e={}){let t=this,{reader:n}=t;if(await Dc(n),(n.size===void 0||!n.readUint8Array)&&(n=new yc(await Co(n.readable)),await Dc(n)),n.size<22)throw Error(Gc);let r=t.warnings=[],i=uu(e,t.options),a=i==Ti,o=i!=Di,s=gu(J(t,e,xi),i),c=mu(J(t,e,yi),i),l=J(t,e,bi),{endOfDirectoryInfo:u,endOfDirectoryReachingEndCount:d}=await _u(n,o,s);if(!u)throw await au(n)?Error(el):Error(Kc);o&&d>1&&Eu(`multiple end of central directory records`);let f=W(u),p=X(f,12),m=X(f,16),h=u.offset,g=Y(f,20),_=h+22+g,v=n.size-_;v>s&&Eu(gl),v>0&&Tu(r,gl);let y=Y(f,4),b=n.lastDiskNumber||0,x=Y(f,6),S=Y(f,10),C=0,w,T,E,D=56,O,k=m==4294967295||p==4294967295||S==65535||x==65535;if(m!=4294967295&&x!=65535&&(m+=iu(n,x)),k){let e=u.offset>=20?await q(n,u.offset-20,20):$r,t=W(e);if(e.length==20&&X(t,0)==117853008){m=iu(n,X(t,4))+Z(t,8);let e=await q(n,m,56),i=W(e),o=u.offset-20-56;if((e.length<56||X(i,0)!=101075792)&&m!=o&&o>=0){let t=m;m=o,m>t&&(C=m-t),e=await q(n,m,56),i=W(e)}if(e.length<56||X(i,0)!=101075792)throw Error(qc);if(T=!0,E=Z(i,4)>44,E){let e=Math.min(Z(i,4)-44,n.size-m-56);e>0&&(D+=e,O=Gl(await q(n,m+56,e)))}y==65535?y=X(i,16):y!=X(i,16)&&wu(a,r,bl),x==65535?x=X(i,20):x!=X(i,20)&&wu(a,r,bl),S==65535?S=Z(i,32):S!=Z(i,32)&&wu(a,r,bl),p==4294967295?p=Z(i,40):p!=Z(i,40)&&wu(a,r,bl),m=iu(n,x)+Z(i,48)+C}}let A=p,j=u.offset-(T?D+20:0);if(m>=n.size&&(C=n.size-m-p-22,m=n.size-p-22),b!=y)throw Error(el);if(m<0)throw Error(Gc);let M=0,N=await q(n,m,p),P=W(N);if(p){if(N.length<4)throw Error(Gc);let e=j-p;if(m!=e&&x==y){let t=!(X(P,M)==33639248||O&&O.compressedSize||Vl(P));if(!t&&e>=0&&e+4<=n.size&&(t=X(W(await q(n,e,4)),0)==Fr),t){let t=m;m=e,m>t&&(C+=m-t),N=await q(n,m,p),P=W(N)}}}let F=j-m;if(p!=F&&F>=0&&x==y&&(p=F,N=await q(n,m,p),P=W(N)),m<0||m>=n.size)throw Error(Gc);t.directoryOffset=m,t.directoryLength=A;let I=Du(t,e,Si),ee,L;if(I&&S&&N.length>=4&&X(P,0)!=33639248&&(E||Vl(P))){let e=Wl(O,A,N.length);L=N.subarray(e),N=await I(N.subarray(0,e),O),P=W(N),A=N.length,ee=!0}O&&!ee&&(N.length<4||X(P,0)==33639248)&&Tu(r,ml),w=m;let te=J(t,e,ei),ne=J(t,e,ti),re=new Set,ie,ae=-1,oe=!a&&!T;!S&&oe&&(S=Hl(P,N,M),S&&Tu(r,hl));for(let i=0;i<S;i++){let a=new Bl(n,t.options);if(M+46>N.length||X(P,M)!=33639248)throw i==0&&!ee&&(E||Vl(P))?Error(il):Error(Jc);Kl(a,P,M+6);let o=!!a.bitFlag.languageEncodingFlag,s=M+46,u=s+a.filenameLength,d=u+a.extraFieldLength,f=Y(P,M+4),p=!(f>>8),m=f>>8==3,h=N.subarray(s,u),g=Y(P,M+32),_=d+g,v=N.subarray(d,_),y=o,b=o,x=X(P,M+38),T=x&255,D={readOnly:!!(T&1),hidden:!!(T&2),system:!!(T&4),directory:!!(T&16),archive:!!(T&32)},O=X(P,M+42),k=Du(t,e,`decodeText`)||oc,A=y?El:te||Ol,j=b?El:ne||Ol,F=k(h,A,Ci);if(F===void 0&&(F=oc(h,A)),l){let e=l(F);e!==void 0&&(F=e)}if(hu(F,c)){let e=Error(al);throw e.filename=F,e}let I=k(v,j,wi);I===void 0&&(I=oc(v,j)),Object.assign(a,{index:i,decryptedDirectory:ee,versionMadeBy:f,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,commentLength:g,offset:O,diskNumberStart:Y(P,M+34),internalFileAttributes:Y(P,M+36),externalFileAttributes:x,msdosAttributesRaw:T,msdosAttributes:D,rawFilename:h,filenameUTF8:y,commentUTF8:b,rawExtraField:N.subarray(u,d),rawComment:v,filename:F,comment:I}),ql(a,a,P,M+6)&&Tu(r,pl,F),a.offset+=C;let L=iu(n,a.diskNumberStart)+a.offset;w=Math.min(L,w),L<ae&&Tu(r,ul,F),ae=L,(a.version&255)>wl&&Tu(r,dl,F),(a.rawBitFlag&32)==32&&Tu(r,fl,F),re.has(a.filename)&&(ie=!0),re.add(a.filename);let R=a.externalFileAttributes>>16&Nr;a.unixMode===void 0&&R&16877&&(a.unixMode=R);let z=!!(a.unixMode&Jr),se=!!(a.unixMode&Yr),ce=!!(a.unixMode&512),le=((a.unixMode===void 0?R:a.unixMode)&Gr)==qr,ue=!le&&(a.unixMode===void 0?m&&!!(R&73):!!(a.unixMode&73)),de=a.unixMode!==void 0&&(a.unixMode&61440)==16384,fe=(R&Gr)==Kr;Object.assign(a,{setuid:z,setgid:se,sticky:ce,symlink:le,unixExternalUpper:R,internalFileAttribute:a.internalFileAttributes,externalFileAttribute:a.externalFileAttributes,executable:ue,directory:de||fe||p&&D.directory||a.filename.endsWith(`/`),zipCrypto:a.encrypted&&!a.extraFieldAES});let B=new Wc(a);if(B.getData=(e,n)=>a.getData(e,B,t.readRanges,n),B.arrayBuffer=async e=>{let n=new TransformStream,r=Co(n.readable).then(e=>e.arrayBuffer());return r.catch(()=>{}),await a.getData(n,B,t.readRanges,e),r},M=_,i==S-1&&oe){let e=Hl(P,N,M);e&&(S+=e,Tu(r,hl))}let{onprogress:pe}=e;if(pe)try{await pe(i+1,S,new Wc(a))}catch{}yield B}let R=M,z=Ul(N.subarray(M))||(ee?Ul(L):void 0);if(!z&&!ee){let e=m+M,t=Math.min(j-e,6+Nr);t>=6&&(z=Ul(await q(n,e,t)))}z&&(t.digitalSignature=z,R=M+6+z.length),(M!=A&&R!=A||!ee&&M!=p&&R!=p)&&wu(a,r,vl),ie&&wu(a,r,yl);let se=J(t,e,ni),ce=J(t,e,ri),le=(a||se)&&S&&w==4&&await ou(n)?4:0;return a&&(C||S&&w>le)&&Eu(_l),(C||S&&w>4)&&Tu(r,_l),se&&(t.prependedData=w>le?await q(n,le,w-le):$r),t.comment=g?await q(n,h+22,g):$r,ce&&(t.appendedData=_<n.size?await q(n,_,n.size-_):$r),!0}async getEntries(e={}){let t=[];for await(let n of this.getEntriesGenerator(e))t.push(n);return t}async close(){let{reader:e}=this;!e.readUint8Array&&e.readable&&!e.readable.locked&&await e.readable.cancel()}},Bl=class{constructor(e,t){Object.assign(this,{reader:e,options:t})}async getData(e,t,n,r={}){let i=this,a=Ji(),{reader:o,index:s,offset:c,diskNumberStart:l,extraFieldAES:u,extraFieldZip64:d,compressionMethod:f,bitFlag:p,rawBitFlag:m,crc32:h,rawLastModDate:g,uncompressedSize:_,compressedSize:v}=i,{dataDescriptor:y}=p,b=t.localDirectory={},x=t.warnings=[],S=iu(o,l)+c,C=await q(o,S,30),w=W(C),T=J(i,r,ii),E=J(i,r,ai),D=J(i,r,oi);if(Ni(T,E),T=T&&T.length&&T,E=E&&E.length&&E,u&&u.originalCompressionMethod!=99)throw Error($c);if(C.length<30||X(w,0)!=67324752)throw Error(Yc);Kl(b,w,4);let{extraFieldLength:O,filenameLength:k}=b,A=b.dataOffset=S+30+k+O,j=J(i,r,fi),M=uu(r,i.options),N=fu(j,M),P=pu(j,M),F=$r;if(P&&(k||O)){let e=await q(o,S+30,k+O);F=e.subarray(0,k),b.rawExtraField=e.subarray(k)}else b.rawExtraField=O?await q(o,S+30+k,O):$r;P&&(b.rawFilename=F),ql(i,b,w,4,!0)&&Tu(x,pl),Cu(i,b,F,P,N?void 0:x);let{lastAccessDate:I,creationDate:ee,uid:L,gid:te}=b;I&&(t.lastAccessDate=I),ee&&(t.creationDate=ee),L!==void 0&&t.uid===void 0&&(t.uid=L),te!==void 0&&t.gid===void 0&&(t.gid=te);let ne=i.encrypted&&b.encrypted&&!D,re=ne&&!u;if(D||(t.zipCrypto=re),ne&&(b.rawBitFlag&64)==64)throw Error(Qc);let ie=D?void 0:ko(f);if(f!=0&&f!=8&&f!=9&&!ie&&!D)throw Error($c);if(ne){if(!re&&(u.strength<1||u.strength>3))throw Error(Qc);if(!T&&!E)throw Error(Zc)}if(A+v>o.size)throw Error(nl);let ae=v,oe=So(o.createReadable({offset:A,size:ae})),R=Mi(J(i,r,si)),z=J(i,r,ci),se=J(i,r,ui),ce=J(i,r,li);ce&&(se=!0);let{onstart:le,onprogress:ue,onend:de}=r,fe=f!=0&&!D,B=D?v:_,pe=f==9,me=J(i,r,gi);pe&&(me=!1);let he=J(i,r,pi),ge=(he===void 0?J(i,r,`checkSignature`):he)&&!D&&(!ne||re||u&&u.vendorVersion==Al),_e={options:{codecType:us,password:T,rawPassword:E,zipCrypto:re,encryptionStrength:u&&u.strength,checkCrc32:ge,checkAuthenticationCode:J(i,r,mi),passwordVerification:re&&(y?g>>>8&255:h>>>24&255),outputSize:B,crc32:h,compressed:fe,encrypted:ne,useWebWorkers:J(i,r,hi),useCompressionStream:me,transferStreams:J(i,r,_i),deflate64:pe,format:ie?ie.format:void 0,codecURI:ie?ie.codecURI:void 0,compressionMethod:f,rawBitFlag:m,checkPasswordOnly:z},config:a,streamOptions:{signal:R,size:ae,onstart:le,onprogress:ue,onend:de}};se&&await nu({reader:o,fileEntry:t,index:s,offset:S,crc32:h,compressedSize:v,uncompressedSize:_,dataOffset:A,dataDescriptor:y||b.bitFlag.dataDescriptor,extraFieldZip64:d||b.extraFieldZip64,readRanges:n});let ve,ye;try{if(!ce){z&&(e=new WritableStream),e=new Tc(e),await Dc(e,lu(B,v,fe)),{writable:ve}=e;let{outputSize:t}=await Ys({readable:oe,writable:ve},_e);if(e.size+=t,t!=B)throw Error(No)}}catch(t){if(t.outputSize!==void 0&&(e.size+=t.outputSize),!z||t.message!=`zipjs-abort-check-password`)throw ye=t,t}finally{if(!(!Ec(e)&&J(i,r,`preventClose`))&&ve&&!ve.locked){let e=ve.getWriter();if(ye)try{await e.abort(ye)}catch{}else await e.close()}}return z||ce?void 0:e.getData?e.getData():ve}};function Vl(e){let t=Math.min(e.byteLength,1024)-3;for(let n=0;n<t;n++)if(X(e,n)==134630224)return!0;return!1}function Hl(e,t,n){let r=0;for(;n+46<=t.length&&X(e,n)==33639248;)n+=46+Y(e,n+28)+Y(e,n+30)+Y(e,n+32),r++;return r%65536?0:r}function Ul(e){if(e.length>=6){let t=W(e);if(X(t,0)==84233040){let n=Y(t,4);if(6+n<=e.length)return e.subarray(6,6+n)}}}function Wl(e,t,n){let r=e&&e.compressedSize?e.compressedSize:t;return r>0&&r<=n?r:n}function Gl(e){let t={rawExtensibleData:e};if(e.length>=28){let n=W(e),r=Y(n,26);Object.assign(t,{compressionMethod:Y(n,0),compressedSize:Z(n,2),uncompressedSize:Z(n,10),encryptionAlgorithm:Y(n,18),bitLength:Y(n,20),flags:Y(n,22),hashAlgorithm:Y(n,24),hashData:e.subarray(28,28+r)})}return t}function Kl(e,t,n){let r=e.rawBitFlag=Y(t,n+2),i=(r&1)==1,a=X(t,n+6);Object.assign(e,{encrypted:i,version:Y(t,n),bitFlag:{level:(r&6)>>1,dataDescriptor:(r&8)==8,languageEncodingFlag:(r&Wr)==Wr},rawLastModDate:a,lastModDate:Ou(a),filenameLength:Y(t,n+22),extraFieldLength:Y(t,n+24)})}function ql(e,t,n,r,i){let{rawExtraField:a}=t,o=t.extraField=new Map,s=W(a),c=0,l=!1;try{for(;c<a.length;){let e=Y(s,c),t=Y(s,c+2);o.set(e,{type:e,data:a.slice(c+4,c+4+t)}),c+=4+t}}catch{l=!0}c>a.length&&(l=!0);let u=Y(n,r+4);Object.assign(t,{signature:X(n,r+10),crc32:X(n,r+10),compressedSize:X(n,r+14),uncompressedSize:X(n,r+18)});let d=o.get(1);d&&(Jl(d,t),t.extraFieldZip64=d);let f=o.get(Rr);f&&(Yl(f,kc,Ac,t,e),t.extraFieldUnicodePath=f);let p=o.get(zr);p&&(Yl(p,jc,Mc,t,e),t.extraFieldUnicodeComment=p);let m=o.get(Ir);m&&m.data.length>=7?(Xl(m,t,u),t.extraFieldAES=m):t.compressionMethod=u;let h=o.get(13);h&&(Ql(h,t),t.extraFieldPkwareUnix=h);let g=o.get(Ur);g&&(Ql(g,t),t.extraFieldUnixType1=g);let _=o.get(10);_&&(Zl(_,t),t.extraFieldNTFS=_);let v=o.get(Hr),y;if(v&&(y=$l(v,t,!1),t.extraFieldUnix=v),!y){let e=o.get(Vr);e&&($l(e,t,!0),t.extraFieldInfoZip=e)}let b=o.get(Lr);b&&(tu(b,t,i),t.extraFieldExtendedTimestamp=b);let x=o.get(Br);return x&&(t.extraFieldUSDZ=x),l}function Jl(e,t){t.zip64=!0;let n=W(e.data),r=jl.filter(([e,n])=>t[e]==n),i=r.reduce((e,[,t])=>e+Ml[t].bytes,0);if(e.data.length<i)throw Error(Xc);for(let i=0,a=0;i<r.length;i++){let[o,s]=r[i],c=Ml[s];t[o]=e[o]=c.getValue(n,a),a+=c.bytes}}function Yl(e,t,n,r,i){if(e.data.length<5){e.valid=!1;return}let a=W(e.data),o=new ha;o.append(i[n]);let s=W(new Uint8Array(4));s.setUint32(0,o.get(),!0);let c=X(a,1),l=Au(a,0);Object.assign(e,{version:l,[t]:oc(e.data.subarray(5)),valid:l==1&&!i.bitFlag.languageEncodingFlag&&c==X(s,0)}),e.valid&&(r[t]=e[t],r[t+Dl]=!0)}function Xl(e,t,n){let r=W(e.data),i=Au(r,4);Object.assign(e,{vendorVersion:Au(r,0),vendorId:Au(r,2),strength:i,originalCompressionMethod:n,compressionMethod:Y(r,5)}),t.compressionMethod=e.compressionMethod,e.vendorVersion!=Al&&(t.crc32=void 0)}function Zl(e,t){let n=W(e.data),r=4,i;try{for(;r<e.data.length&&!i;){let t=Y(n,r),a=Y(n,r+2);t==1&&(i=e.data.slice(r+4,r+4+a)),r+=4+a}}catch{}if(i&&i.length==24){let n=W(i),r=n.getBigUint64(0,!0),a=n.getBigUint64(8,!0),o=n.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:r,rawLastAccessDate:a,rawCreationDate:o});let s={lastModDate:ku(r),lastAccessDate:ku(a),creationDate:ku(o)};Object.assign(e,s),Object.assign(t,s,{rawLastAccessDate:a,rawCreationDate:o})}}function Ql(e,t){if(e.data.length<8)return;let n=W(e.data),r={lastAccessDate:new Date((X(n,0)|0)*1e3),lastModDate:new Date((X(n,4)|0)*1e3)};e.data.length>=12&&(r.uid=Y(n,8),r.gid=Y(n,10)),Object.assign(e,r),Object.assign(t,r)}function $l(e,t,n){try{let r=W(e.data),i,a;if(n){let t=0,n=Au(r,t++),o=Au(r,t++);i=eu(e.data.subarray(t,t+o)),t+=o;let s=Au(r,t++);a=eu(e.data.subarray(t,t+s)),Object.assign(e,{version:n,uid:i,gid:a})}else e.data.length>=4&&(i=Y(r,0),a=Y(r,2),Object.assign(e,{uid:i,gid:a}));return i!==void 0&&(t.uid=i),a!==void 0&&(t.gid=a),i!==void 0||a!==void 0}catch{}}function eu(e){let t=new Uint8Array(4);return t.set(e,0),new DataView(t.buffer,t.byteOffset,4).getUint32(0,!0)}function tu(e,t,n){if(!e.data.length)return;let r=W(e.data),i=Au(r,0),a=[],o=[];n?((i&1)==1&&(a.push(Lc),o.push(Rc)),(i&2)==2&&(a.push(zc),o.push(Bc)),(i&4)==4&&(a.push(Vc),o.push(Hc))):e.data.length>=5&&(a.push(Lc),o.push(Rc));let s=1;a.forEach((n,i)=>{if(e.data.length>=s+4){let a=X(r,s);t[n]=e[n]=new Date((a|0)*1e3);let c=o[i];e[c]=a}s+=4})}async function nu({reader:e,fileEntry:t,index:n,offset:r,crc32:i,compressedSize:a,uncompressedSize:o,dataOffset:s,dataDescriptor:c,extraFieldZip64:l,readRanges:u}){let d=0;if(c&&(d=l?20:12),d){let n=await q(e,s+a,d+4),r=W(n),c=n.length==d+4&&X(r,0)==134695760;if(c){let e=ru(r,4,l);(t.encrypted&&!t.zipCrypto||e.crc32==i)&&e.compressedSize==a&&e.uncompressedSize==o?d+=4:c=!1}if(n.length>=d){let e=ru(r,c?4:0,l);e.signature=c,t.localDirectory.dataDescriptor=e}}let f={start:r,end:s+a+d,fileEntry:t};for(let[e,t]of u)if(e!=n&&f.start<t.end&&t.start<f.end){let e=Error(tl);throw e.overlappingEntry=t.fileEntry,e}u.set(n,f)}function ru(e,t,n){let r=X(e,t),i,a;return n?(i=Z(e,t+4),a=Z(e,t+12)):(i=X(e,t+4),a=X(e,t+8)),{crc32:r,compressedSize:i,uncompressedSize:a}}function iu(e,t){return e.getDiskOffset?e.getDiskOffset(t):0}async function au(e){return await su(e)==Pr}async function ou(e){let t=await su(e);return t==134695760||t==808471376}async function su(e){return X(W(await q(e,0,4)))}function cu(e){return e===`strict`||e===`balanced`||e===`tolerant`}function lu(e,t,n){return Math.min(e,n?t*Fl:t)}function uu(e,t){return du(e,du(t,Ei))}function du(e,t){let n=e[vi];if(n!==void 0){if(!cu(n))throw Error(ol);return n}let r=e[di];return r===void 0?t:r?Ti:t==`tolerant`?Di:Ei}function fu(e,t){return e===void 0?t!=Di:!!e}function pu(e,t){return e===void 0?t==Ti:!!e}function mu(e,t){if(e===void 0)return t;if(!cu(e))throw Error(sl);return e}function hu(e,t){if(t==`tolerant`)return!1;let n=e.split(`/`);return n.length>1&&n[n.length-1]===``&&n.pop(),n.includes(`..`)||e.startsWith(`/`)||e.startsWith(`\\\\`)||Tl.test(e)?!0:t==`strict`&&(n.includes(`.`)||n.includes(``))}function gu(e,t){if(e!==void 0){let t=Pi(e);if(typeof t!=`number`||Number.isNaN(t)||t<0)throw Error(cl);return t}return t==`strict`?0:t==`tolerant`?1/0:Nr}async function _u(e,t,n){let{size:r}=e,i=Math.min(r,22+Nr),a={count:Pl},o,s,c=0;for await(let[n,l,u,d,f]of yu(e,i)){let i=Y(n,d+20);if(f+22+i==r){let i=await xu(e,n,l,d,f,r,a);if(i==Rl){if(o||=bu(u,d,f),c++,!t||c>1)break}else i==Ll&&!s&&(s=bu(u,d,f))}}return o||=s,o||=await vu(e,n,a),{endOfDirectoryInfo:o,endOfDirectoryReachingEndCount:c}}async function vu(e,t,n){let{size:r}=e,i=Math.min(r,t==1/0?r:22+Nr+t),a,o;for await(let[t,s,c,l,u]of yu(e,i)){let i=bu(c,l,u);a||=i;let d=await xu(e,t,s,l,u,r,n);if(d==Rl)return i;d==Ll&&!o&&(o=i)}return o||a}async function*yu(e,t){let n=e.size-t,r=await q(e,n,t),i=W(r);for(let e=r.length-22;e>=0;e--)X(i,e)==101010256&&(yield[i,n,r,e,n+e])}function bu(e,t,n){return{offset:n,buffer:e.slice(t,t+22).buffer}}async function xu(e,t,n,r,i,a,o){let s=Y(t,r+10),c=X(t,r+12),l=X(t,r+16);if(s==65535||c==4294967295||l==4294967295)return await Su(e,t,n,i-20,a,o)==117853008?Rl:Il;if(!s&&!c)return Ll;let u=Y(t,r+6);for(let r of[i-c,iu(e,u)+l])if(await Su(e,t,n,r,a,o)==33639248)return Rl;return Il}async function Su(e,t,n,r,i,a){if(!(r<0||r+4>i)){if(r>=n)return X(t,r-n);if(a.count>0)return a.count--,X(W(await q(e,r,4)),0)}}function Cu(e,t,n,r,i){let{rawFilename:a}=e,o=!i,s=e.decryptedDirectory&&(t.rawBitFlag&8192)==8192;r&&!s&&(n.length!=a.length||n.some((e,t)=>e!=a[t]))&&wu(o,i,`mismatched local file header (filename)`),(t.rawBitFlag&kl)!=(e.rawBitFlag&kl)&&wu(o,i,xl),t.compressionMethod!=e.compressionMethod&&wu(o,i,Sl),!t.bitFlag.dataDescriptor&&!s&&(t.crc32||t.compressedSize||t.uncompressedSize)&&(t.crc32!=e.crc32||t.compressedSize!=e.compressedSize||t.uncompressedSize!=e.uncompressedSize)&&wu(o,i,Cl)}function wu(e,t,n){e?Eu(n):Tu(t,n)}function Tu(e,t,n){if(!e.some(e=>e.reason==t)){let r={reason:t};n!==void 0&&(r.filename=n),e.push(r)}}function Eu(e){let t=Error(rl);throw t.reason=e,t}function J(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function Du(e,t,n){return ji(J(e,t,n))}function Ou(e){let t=(e&4294901760)>>16,n=e&Nr,r=new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0);return r<Xr?Xr:r}function ku(e){return new Date(Number(e/BigInt(1e4)-BigInt(0xa9730b66800)))}function Au(e,t){return e.getUint8(t)}function Y(e,t){return e.getUint16(t,!0)}function X(e,t){return e.getUint32(t,!0)}function Z(e,t){let n=e.getBigUint64(t,!0);if(n>Nl)throw Error(ll);return Number(n)}new Uint8Array([7,0,2,0,65,69,3,0,0]);try{ea({baseURI:{}.url})}catch{}var ju=[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],Mu=[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],Nu=[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],Pu=[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],Fu=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Iu=new Uint8Array(288);Iu.fill(8,0,144),Iu.fill(9,144,256),Iu.fill(7,256,280),Iu.fill(8,280,288);var Lu=new Uint8Array(30).fill(5);function Ru(e){let t=new Uint16Array(16);for(let n of e)t[n]++;t[0]=0;let n=new Uint16Array(17);for(let e=1;e<=15;e++)n[e+1]=n[e]+t[e];let r=new Uint16Array(e.length);for(let t=0;t<e.length;t++)e[t]&&(r[n[e[t]]++]=t);return{l:t,symbols:r}}var Q=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;function zu(e){let t;e({wasmURI:()=>(t||=`data:application/wasm;base64,`+function(e){let t=``,n=e.length,r=0;for(;r+2<n;r+=3){let n=e[r]<<16|e[r+1]<<8|e[r+2];t+=Q[n>>18&63]+Q[n>>12&63]+Q[n>>6&63]+Q[63&n]}let i=n-r;if(i===1){let n=e[r]<<16;t+=Q[n>>18&63]+Q[n>>12&63]+`==`}else if(i===2){let n=e[r]<<16|e[r+1]<<8;t+=Q[n>>18&63]+Q[n>>12&63]+Q[n>>6&63]+`=`}return t}(function(e){let t=0,n=0,r=0,i=new Uint8Array(1024),a=0,o=0;for(;!o;){o=c(1);let e=c(2);if(e==0)l();else if(e==1)u(Ru(Iu),Ru(Lu));else{if(e!=2)throw Error(`invalid deflate block type`);u(...d())}}return i.subarray(0,a);function s(){if(t>=e.length)throw Error(`unexpected end of deflate data`);return e[t++]}function c(e){for(;r<e;)n|=s()<<r,r+=8;let t=n&(1<<e)-1;return n>>>=e,r-=e,t}function l(){n=0,r=0;let e=s()|s()<<8;t+=2,p(a+e);for(let t=0;t<e;t++)i[a++]=s()}function u(e,t){let n=f(e);for(;n!=256;){if(n<256)p(a+1),i[a++]=n;else{let e=n-257,r=ju[e]+c(Mu[e]),o=f(t),s=Nu[o]+c(Pu[o]);p(a+r);let l=a-s;for(let e=0;e<r;e++)i[a++]=i[l+e]}n=f(e)}}function d(){let e=c(5)+257,t=c(5)+1,n=c(4)+4,r=new Uint8Array(19);for(let e=0;e<n;e++)r[Fu[e]]=c(3);let i=Ru(r),a=new Uint8Array(e+t),o=0;for(;o<a.length;){let e=f(i);if(e<16)a[o++]=e;else if(e==16){let e=a[o-1],t=c(2)+3;for(;t--;)a[o++]=e}else o+=e==17?c(3)+3:c(7)+11}return[Ru(a.subarray(0,e)),Ru(a.subarray(e))]}function f(e){let{l:t,symbols:n}=e,r=0,i=0,a=0;for(let e=1;e<=15;e++){r|=c(1);let o=t[e];if(r-i<o)return n[a+(r-i)];a+=o,i=i+o<<1,r<<=1}throw Error(`invalid huffman code`)}function p(e){if(i.length<e){let t=2*i.length;for(;t<e;)t*=2;let n=new Uint8Array(t);n.set(i.subarray(0,a)),i=n}}}(function(e){let t=(e=String(e).replace(/[^A-Za-z0-9+/=]/g,``)).length,n=[];for(let r=0;r<t;r+=4){let t=Q.indexOf(e[r])<<18|Q.indexOf(e[r+1])<<12|(63&Q.indexOf(e[r+2]))<<6|63&Q.indexOf(e[r+3]);n.push(t>>16&255),e[r+2]!==`=`&&n.push(t>>8&255),e[r+3]!==`=`&&n.push(255&t)}return new Uint8Array(n)}(`zb19kF3XcSd2vu7He/fdmTvAABzigUTfK0gaSxiBkqghRarWc2jODIcgBCXRH/6DVSQEDkXcBwJ8M08Q5ZX5hp+mbUnLcqlcjEsbY72qWOVIFVWFu6GztEXb9Fq70Wa5iVKljVUp1WYrqz82tXJKteVKKUT46z73fQwGIEhq7XAKfOd+ndOnT5/uPn26+6jT249qpZS+t/OgGQ718EGN/5nhUD1oh+GGFNWDSj2o9PDBeMj/6eGDyXBUdEN+RT+hh/YTd8baGe2SRC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tqa/psLf/vC3/7wNx/+DoS/Qm2o7/LOmVECA2DN1Zy6UZXqw8qr0+pJ9SdK6yeRpspqp2Od6o4u9IImfYte0Q9Ott+02bSFNg6qg+oGdYNaUAvqRnWjOqQOqa7qqsPqsLpJ3aRW1Ip6p/23Adc7u/6eDH9Phb+nw98z4e/Z8PfCz6H/eke/Otlu017TznPqOfVr6tfU8+p59evq19VvqN9Qv6l+U31JfUl9WX1ZfUV9RdFdSu2kSmmt1M1aqVml1KU1pVRL+nezknvc13Bvv1IqUf7SXHZSNj/H/8yuf3bXP7frXzT1z7+wL9vcXdXuT5vX4/AvCf/S8K8V/rXDvyz864R/Of/zr+7P3tNUnzQTZ26fSpNW3I4y17G5mdGzyv/1/uzRhNt2KuV/iserUGkox6zVp+EdUGOLYSn4flPGKEmZ3iwrjTJKRisnZaONVkVL+R/PZy06oQWr/x8=`))),t)})}var Bu=`deflate`,Vu=`deflate-raw`,Hu=`deflate64-raw`,Uu=`gzip`,$,Wu,Gu,Ku,qu;function Ju(e){if($=e,{malloc:Wu,free:Gu,memory:Ku}=$,typeof Wu!=`function`||typeof Gu!=`function`||!Ku)throw $=Wu=Gu=Ku=null,Error(`Invalid WASM module`)}function Yu(e){qu=e}function Xu(e,t,n={}){if(!$){let e=Error(`WASM module not loaded`);throw e.cause=qu,e}let r=typeof n.level==`number`?n.level:-1,i=typeof n.outBuffer==`number`?n.outBuffer:65536,a=typeof n.inBufferSize==`number`?n.inBufferSize:65536;return new TransformStream({start(){try{let n;if(this.out=Wu(i),this.in=Wu(a),this.inBufferSize=a,!this.out||!this.in)throw Error(`allocation failed`);if(this._scratch=new Uint8Array(i),e?(this._process=$.deflate_process,this._last_consumed=$.deflate_last_consumed,this._end=$.deflate_end,this.streamHandle=$.deflate_new(),n=t===Uu?$.deflate_init_gzip(this.streamHandle,r):t===Vu?$.deflate_init_raw(this.streamHandle,r):$.deflate_init(this.streamHandle,r)):t===Hu?(this._process=$.inflate9_process,this._last_consumed=$.inflate9_last_consumed,this._end=$.inflate9_end,this.streamHandle=$.inflate9_new(),n=$.inflate9_init_raw(this.streamHandle)):(this._process=$.inflate_process,this._last_consumed=$.inflate_last_consumed,this._end=$.inflate_end,this.streamHandle=$.inflate_new(),n=t===Vu?$.inflate_init_raw(this.streamHandle):t===Uu?$.inflate_init_gzip(this.streamHandle):$.inflate_init(this.streamHandle)),n!==0)throw Error(`init failed:`+n)}catch(e){throw o(this),e}},transform(t,n){try{let r=t,a=new Uint8Array(Ku.buffer),o=this._process,s=this._last_consumed,c=this.out,l=this._scratch,u=0;for(;u<r.length;){let t=Math.min(r.length-u,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&Gu&&(Gu(this.in),this.in=0),this.in=Wu(t),this.inBufferSize=t,!this.in))throw Error(`allocation failed`);a.set(r.subarray(u,u+t),this.in);let d=o(this.streamHandle,this.in,t,c,i,0),f=d&16777215;if(f&&(l.set(a.subarray(c,c+f),0),n.enqueue(l.slice(0,f))),!e){let e=d>>24&255,t=e&128?e-256:e;if(t<0)throw Error(`process error:`+t)}let p=s(this.streamHandle);if(p===0)break;u+=p}}catch(e){o(this),n.error(e)}},flush(t){try{let n=new Uint8Array(Ku.buffer),r=this._process,a=this.out,o=this._scratch;for(;;){let s=r(this.streamHandle,0,0,a,i,4),c=s&16777215,l=s>>24&255;if(!e){let e=l&128?l-256:l;if(e<0)throw Error(`process error:`+e)}if(c&&(o.set(n.subarray(a,a+c),0),t.enqueue(o.slice(0,c))),l===1||c===0)break}}catch(e){t.error(e)}finally{let e=o(this);e!==0&&t.error(Error(`end error:`+e))}},cancel(){o(this)}});function o(e){let t=0;return e.streamHandle&&e._end&&(t=e._end(e.streamHandle)),e.streamHandle=0,e.in&&Gu&&Gu(e.in),e.in=0,e.out&&Gu&&Gu(e.out),e.out=0,t}}var Zu=class{constructor(e=Bu,t){return Xu(!0,e,t)}},Qu=class{constructor(e=Bu,t){return Xu(!1,e,t)}};Zu.requiresModule=!0,Qu.requiresModule=!0,Zu.supportedFormats=[Bu,Vu,Uu],Qu.supportedFormats=[Bu,Vu,Uu,Hu];var $u=!1;async function ed(e,{baseURI:t}){if(!$u)try{await td(e,t),$u=!0}catch(e){throw Yu(e),e}}async function td(e,t){let n,r;try{try{r=new URL(e,t)}catch{}n=await(await fetch(r)).arrayBuffer()}catch(t){if(e.startsWith(`data:application/wasm;base64,`))n=nd(e);else throw t}Ju((await WebAssembly.instantiate(n)).instance.exports)}function nd(e){let t=e.split(`,`)[1],n=atob(t),r=n.length,i=new Uint8Array(r);for(let e=0;e<r;++e)i[e]=n.charCodeAt(e);return i.buffer}var rd;vs({initModule:e=>{if(!rd){let{wasmURI:t}=e;typeof t==`function`&&(t=t()),rd=ed(t,e).catch(e=>{throw rd=null,e})}return rd}}),ea({CompressionStreamFallback:Zu,DecompressionStreamFallback:Qu}),zu(ea),ra(ea);var id=class extends Error{code;cause;constructor(e,t,n){super(e),this.name=`AcmiParseError`,this.code=t,this.cause=n}},ad=class{_decoder=new TextDecoder;_currentLine=``;_currentTimeStamp=0;_currentFrame=new Ar(0);_destroyedIds=[];_filteredIds=[];_data=new Or;_excludedTypes=[];_acmiVersions=[`2.1`,`2.2`];_acmiType=`text/acmi/tacview`;_propertySeparator=/(?<!\\),/;_headerPattern=/^\ufeff?FileType=(?<type>.*)\r?\nFileVersion=(?<version>.*)\r?\n/;constructor(e){e!==void 0&&(jr.geoid=sr(this._toUint8Array(e),{}))}_toUint8Array(e){return e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}async _normalizeInput(e){if(typeof e==`string`)return new TextEncoder().encode(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return this._toUint8Array(e);if(typeof Blob<`u`&&e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new id(`Unsupported ACMI input. Expected text, binary data, or a Blob.`,`UNSUPPORTED_INPUT`)}_throwIfAborted(e){if(!e?.aborted)return;if(e.reason!==void 0)throw e.reason;let t=Error(`The operation was aborted`);throw t.name=`AbortError`,t}_isValidVersion(){return this._acmiVersions.find(e=>e===this._data.header.fileVersion)!==void 0}_isValidType(){return this._data.header.fileType===this._acmiType}_parseHeader(e){let t=this._data,n=this._decoder.decode(e.slice(0,64)),r=this._headerPattern.exec(n);r!==null&&r.groups!==void 0&&(t.header.fileType=r.groups.type,t.header.fileVersion=r.groups.version,t.isValid=this._isValidType()&&this._isValidVersion())}_consumeContentLine(e,t){t<=1||e.trim().length===0||e.startsWith(`//`)||(e.endsWith(`\\`)?this._currentLine+=e.slice(0,e.length-1)+`
|
|
3
|
+
`:(this._currentLine+=e,this._parseLine()))}_parseContent(e){let t=e.length,n=0,r=0,i=!1,a=0,o=``,s=0;for(;r<t;)e[r]===13?i=!0:e[r]===10&&(i?(i=!1,a=r-1):a=r,o=this._decoder.decode(e.slice(n,a)),n=r+1,this._consumeContentLine(o,s),++s),++r;n<t&&(o=this._decoder.decode(e.slice(n)),o.endsWith(`\r`)&&(o=o.slice(0,-1)),this._consumeContentLine(o,s));let c=this._data,l=c.frames;if(l.length>0||this._currentFrame.scene.size>0){l.push(this._currentFrame);let e=c.globalProperties.referenceTime,t=l.findIndex(e=>e.scene.size>0);e.isValid()&&t!==-1?(c.timeSpan.start=e.add(l[t].timeStamp,`seconds`),c.timeSpan.end=e.add(l[l.length-1].timeStamp,`seconds`)):c.isValid=!1}}_parseLine(){let e=this._data,t=e.frames,n=this._currentFrame,r=this._destroyedIds,i=this._filteredIds,a=this._currentLine;if(!a.startsWith(`0,Event`)){if(a.startsWith(`0,`))a=a.slice(2),a.split(this._propertySeparator).forEach(t=>{let n=t.indexOf(`=`);if(n>=0){let r=t.slice(0,n),i=t.slice(n+1),a=e.globalProperties;switch(r){case`DataSource`:a.dataSource=i;break;case`DataRecorder`:a.dataRecorder=i;break;case`ReferenceTime`:a.referenceTime=(0,m.default)(i);break;case`RecordingTime`:a.recordingTime=(0,m.default)(i);break;case`Author`:a.author=i;break;case`Title`:a.title=i;break;case`Category`:a.category=i;break;case`Briefing`:a.briefing=i;break;case`Debriefing`:a.debriefing=i;break;case`Comments`:a.comments=i;break;case`ReferenceLongitude`:a.referenceLongitude=+i,jr.refLong=a.referenceLongitude;break;case`ReferenceLatitude`:a.referenceLatitude=+i,jr.refLat=a.referenceLatitude;break;default:a.additionalProps===void 0&&(a.additionalProps=new Map),a.additionalProps.set(r,i)}}else e.isValid=!1});else if(a.startsWith(`#`)){r.length>0&&(r.forEach(e=>n.scene.delete(e)),this._destroyedIds=[]);let e=+a.slice(1);e!==this._currentTimeStamp&&(t.push(n),this._currentTimeStamp=e,this._currentFrame=new Ar(this._currentTimeStamp,n.scene))}else if(a.startsWith(`-`)){let t=parseInt(a.slice(1),16),n=e.entities.get(t);n&&(n.timeSpan.end=e.globalProperties.referenceTime.add(this._currentTimeStamp,`second`)),i.indexOf(t)>=0&&r.push(t)}else{let t=a.indexOf(`,`);if(t>=0){let r=parseInt(a.slice(0,t),16),o=a.slice(t+1),s=e.entities.get(r),c=!1;s===void 0&&(c=!0,s=new kr(r),s.timeSpan.start=e.globalProperties.referenceTime.add(this._currentTimeStamp,`second`));let l=o.split(this._propertySeparator);if(l.forEach(t=>{let n=t.indexOf(`=`);if(n>=0){let r=t.slice(0,n),i=t.slice(n+1);switch(r){case`Name`:s.name=i;break;case`Type`:s.types=i.split(`+`);break;case`CallSign`:s.callsign=i;break;case`Pilot`:s.pilot=i;break;case`Group`:s.group=i;break;case`Country`:s.country=i;break;case`Coalition`:s.coalition=i;break;case`Color`:s.color=i;break;case`destroyed`:+i==1&&(s.timeSpan.end=e.globalProperties.referenceTime.add(this._currentTimeStamp,`second`))}}else e.isValid=!1}),c){let t=this._excludedTypes,n=!0;if(t!==void 0&&t.length>0){let e=s.types;n=e===void 0?!t.includes(`Untyped`):e.every(e=>!t.includes(e))}n&&(e.entities.set(r,s),i.push(r))}if(i.indexOf(r)>=0){let e=l.findIndex(e=>e.startsWith(`T=`));if(e>=0){let t=l[e],i=t.indexOf(`=`);if(i>=0){let e=t.slice(i+1).split(`|`).map(e=>e?.length>0?+e:void 0);n.scene.set(r,new jr(e,n.scene.get(r)))}}}}else e.isValid=!1}}this._currentLine=``}async _unzip(e,t){this._throwIfAborted(t);let n=!1;if(e.length>1&&(n=new TextDecoder().decode(e.slice(0,2))===`PK`),n){let n=new zl(new bc(e));try{let e=await n.getEntries();if(this._throwIfAborted(t),e.length===1&&!e[0].directory)return await e[0].getData(new xc,{signal:t});throw new id(`A compressed ACMI archive must contain exactly one file.`,`INVALID_ARCHIVE`)}catch(e){throw this._throwIfAborted(t),e instanceof id?e:new id(`Unable to read the compressed ACMI archive.`,`INVALID_ARCHIVE`,e)}finally{await n.close()}}return e}_parseBuffer(e){return this._parseHeader(e),this._parseContent(e),this._data.entities.forEach(e=>{e.timeSpan.end.isValid()||(e.timeSpan.end=this._data.timeSpan.end.clone())}),this._data}async parse(e,t={}){let n=t.signal??t.controller?.signal;this._throwIfAborted(n),this._data=new Or,this._excludedTypes=t.excludedTypes??t.filter??[],this._currentLine=``,this._currentTimeStamp=0,this._currentFrame=new Ar(this._currentTimeStamp),this._destroyedIds=[],this._filteredIds=[];let r=await this._normalizeInput(e);return this._throwIfAborted(n),this._parseBuffer(await this._unzip(r,n))}};function od(e,t){return new ad().parse(e,t)}var sd=ad;exports.AcmiData=Or,exports.AcmiParseError=id,exports.AcmiParser=ad,exports.Entity=kr,exports.Frame=Ar,exports.GlobalProperties=h,exports.Header=g,exports.StateVector=Dr,exports.TimeSpan=_,exports.Trajectory=Er,exports.Transform=jr,exports.default=sd,exports.parseAcmi=od;
|