You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
20 KiB
26 lines
20 KiB
/**
|
|
* @license
|
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
* Version 1.140.0
|
|
*
|
|
* Copyright 2011-2022 Cesium Contributors
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
* Columbus View (Pat. Pend.)
|
|
*
|
|
* Portions licensed separately.
|
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
*/
|
|
|
|
import{a as o}from"./chunk-XXWWJ3QU.js";import{a as p}from"./chunk-N6SIW7ZL.js";import{a as O,b as r}from"./chunk-K35RPNUR.js";import{e as a}from"./chunk-RTRJ3LVQ.js";var Ee=new o,Ce=new o;function Te(n,e,t,i,u){if(!a(n))throw new O("cartesian is required.");if(!a(e))throw new O("oneOverRadii is required.");if(!a(t))throw new O("oneOverRadiiSquared is required.");if(!a(i))throw new O("centerToleranceSquared is required.");let c=n.x,d=n.y,y=n.z,R=e.x,A=e.y,S=e.z,w=c*c*R*R,_=d*d*A*A,j=y*y*S*S,M=w+_+j,E=Math.sqrt(1/M),P=o.multiplyByScalar(n,E,Ee);if(M<i)return isFinite(E)?o.clone(P,u):void 0;let Y=t.x,Q=t.y,H=t.z,k=Ce;k.x=P.x*Y*2,k.y=P.y*Q*2,k.z=P.z*H*2;let I=(1-E)*o.magnitude(n)/(.5*o.magnitude(k)),se=0,J,fe,C,T,v,K,ee,te,de,pe,le;do{I-=se,C=1/(1+I*Y),T=1/(1+I*Q),v=1/(1+I*H),K=C*C,ee=T*T,te=v*v,de=K*C,pe=ee*T,le=te*v,J=w*K+_*ee+j*te-1,fe=w*de*Y+_*pe*Q+j*le*H;let je=-2*fe;se=J/je}while(Math.abs(J)>p.EPSILON12);return a(u)?(u.x=c*C,u.y=d*T,u.z=y*v,u):new o(c*C,d*T,y*v)}var B=Te;function f(n,e,t){this.longitude=n??0,this.latitude=e??0,this.height=t??0}f.fromRadians=function(n,e,t,i){return r.typeOf.number("longitude",n),r.typeOf.number("latitude",e),t=t??0,a(i)?(i.longitude=n,i.latitude=e,i.height=t,i):new f(n,e,t)};f.fromDegrees=function(n,e,t,i){return r.typeOf.number("longitude",n),r.typeOf.number("latitude",e),n=p.toRadians(n),e=p.toRadians(e),f.fromRadians(n,e,t,i)};var ve=new o,Fe=new o,Me=new o;f._ellipsoidOneOverRadii=new o(1/6378137,1/6378137,1/6356752314245179e-9);f._ellipsoidOneOverRadiiSquared=new o(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));f._ellipsoidCenterToleranceSquared=p.EPSILON1;f.fromCartesian=function(n,e,t){let i=a(e)?e.oneOverRadii:f._ellipsoidOneOverRadii,u=a(e)?e.oneOverRadiiSquared:f._ellipsoidOneOverRadiiSquared,c=a(e)?e._centerToleranceSquared:f._ellipsoidCenterToleranceSquared,d=B(n,i,u,c,Fe);if(!a(d))return;let y=o.multiplyComponents(d,u,ve);y=o.normalize(y,y);let R=o.subtract(n,d,Me),A=Math.atan2(y.y,y.x),S=Math.asin(y.z),w=p.sign(o.dot(R,n))*o.magnitude(R);return a(t)?(t.longitude=A,t.latitude=S,t.height=w,t):new f(A,S,w)};f.toCartesian=function(n,e,t){return r.defined("cartographic",n),o.fromRadians(n.longitude,n.latitude,n.height,e,t)};f.clone=function(n,e){if(a(n))return a(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new f(n.longitude,n.latitude,n.height)};f.equals=function(n,e){return n===e||a(n)&&a(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};f.equalsEpsilon=function(n,e,t){return t=t??0,n===e||a(n)&&a(e)&&Math.abs(n.longitude-e.longitude)<=t&&Math.abs(n.latitude-e.latitude)<=t&&Math.abs(n.height-e.height)<=t};f.ZERO=Object.freeze(new f(0,0,0));f.prototype.clone=function(n){return f.clone(this,n)};f.prototype.equals=function(n){return f.equals(this,n)};f.prototype.equalsEpsilon=function(n,e){return f.equalsEpsilon(this,n,e)};f.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var N=f;var l=class n{constructor(e,t){this.x=e??0,this.y=t??0}static fromElements(e,t,i){return a(i)?(i.x=e,i.y=t,i):new n(e,t)}static clone(e,t){if(a(e))return a(t)?(t.x=e.x,t.y=e.y,t):new n(e.x,e.y)}static pack(e,t,i){return r.typeOf.object("value",e),r.defined("array",t),i=i??0,t[i++]=e.x,t[i]=e.y,t}static unpack(e,t,i){return r.defined("array",e),t=t??0,a(i)||(i=new n),i.x=e[t++],i.y=e[t],i}static packArray(e,t){r.defined("array",e);let i=e.length,u=i*2;if(!a(t))t=new Array(u);else{if(!Array.isArray(t)&&t.length!==u)throw new O("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==u&&(t.length=u)}for(let c=0;c<i;++c)n.pack(e[c],t,c*2);return t}static unpackArray(e,t){if(r.defined("array",e),r.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!==0)throw new O("array length must be a multiple of 2.");let i=e.length;a(t)?t.length=i/2:t=new Array(i/2);for(let u=0;u<i;u+=2){let c=u/2;t[c]=n.unpack(e,u,t[c])}return t}static maximumComponent(e){return r.typeOf.object("cartesian",e),Math.max(e.x,e.y)}static minimumComponent(e){return r.typeOf.object("cartesian",e),Math.min(e.x,e.y)}static minimumByComponent(e,t,i){return r.typeOf.object("first",e),r.typeOf.object("second",t),r.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i}static maximumByComponent(e,t,i){return r.typeOf.object("first",e),r.typeOf.object("second",t),r.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i}static clamp(e,t,i,u){r.typeOf.object("value",e),r.typeOf.object("min",t),r.typeOf.object("max",i),r.typeOf.object("result",u);let c=p.clamp(e.x,t.x,i.x),d=p.clamp(e.y,t.y,i.y);return u.x=c,u.y=d,u}static magnitudeSquared(e){return r.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y}static magnitude(e){return Math.sqrt(n.magnitudeSquared(e))}static distance(e,t){return r.typeOf.object("left",e),r.typeOf.object("right",t),n.subtract(e,t,W),n.magnitude(W)}static distanceSquared(e,t){return r.typeOf.object("left",e),r.typeOf.object("right",t),n.subtract(e,t,W),n.magnitudeSquared(W)}static normalize(e,t){r.typeOf.object("cartesian",e),r.typeOf.object("result",t);let i=n.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,isNaN(t.x)||isNaN(t.y))throw new O("normalized result is not a number");return t}static dot(e,t){return r.typeOf.object("left",e),r.typeOf.object("right",t),e.x*t.x+e.y*t.y}static cross(e,t){return r.typeOf.object("left",e),r.typeOf.object("right",t),e.x*t.y-e.y*t.x}static multiplyComponents(e,t,i){return r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i}static divideComponents(e,t,i){return r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i}static add(e,t,i){return r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i}static subtract(e,t,i){return r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i}static multiplyByScalar(e,t,i){return r.typeOf.object("cartesian",e),r.typeOf.number("scalar",t),r.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i}static divideByScalar(e,t,i){return r.typeOf.object("cartesian",e),r.typeOf.number("scalar",t),r.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i}static negate(e,t){return r.typeOf.object("cartesian",e),r.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t}static abs(e,t){return r.typeOf.object("cartesian",e),r.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t}static lerp(e,t,i,u){return r.typeOf.object("start",e),r.typeOf.object("end",t),r.typeOf.number("t",i),r.typeOf.object("result",u),n.multiplyByScalar(t,i,me),u=n.multiplyByScalar(e,1-i,u),n.add(me,u,u)}static angleBetween(e,t){return r.typeOf.object("left",e),r.typeOf.object("right",t),n.normalize(e,ye),n.normalize(t,he),p.acosClamped(n.dot(ye,he))}static mostOrthogonalAxis(e,t){r.typeOf.object("cartesian",e),r.typeOf.object("result",t);let i=n.normalize(e,Ne);return n.abs(i,i),i.x<=i.y?t=n.clone(n.UNIT_X,t):t=n.clone(n.UNIT_Y,t),t}static equals(e,t){return e===t||a(e)&&a(t)&&e.x===t.x&&e.y===t.y}static equalsArray(e,t,i){return e.x===t[i]&&e.y===t[i+1]}static equalsEpsilon(e,t,i,u){return e===t||a(e)&&a(t)&&p.equalsEpsilon(e.x,t.x,i,u)&&p.equalsEpsilon(e.y,t.y,i,u)}clone(e){return n.clone(this,e)}equals(e){return n.equals(this,e)}equalsEpsilon(e,t,i){return n.equalsEpsilon(this,e,t,i)}toString(){return`(${this.x}, ${this.y})`}};l.fromCartesian3=l.clone;l.fromCartesian4=l.clone;l.packedLength=2;l.fromArray=l.unpack;var W=new l,me=new l,ye=new l,he=new l,Ne=new l;l.ZERO=Object.freeze(new l(0,0));l.ONE=Object.freeze(new l(1,1));l.UNIT_X=Object.freeze(new l(1,0));l.UNIT_Y=Object.freeze(new l(0,1));var ne=l;function ge(n,e,t,i){e=e??0,t=t??0,i=i??0,r.typeOf.number.greaterThanOrEquals("x",e,0),r.typeOf.number.greaterThanOrEquals("y",t,0),r.typeOf.number.greaterThanOrEquals("z",i,0),n._radii=new o(e,t,i),n._radiiSquared=new o(e*e,t*t,i*i),n._radiiToTheFourth=new o(e*e*e*e,t*t*t*t,i*i*i*i),n._oneOverRadii=new o(e===0?0:1/e,t===0?0:1/t,i===0?0:1/i),n._oneOverRadiiSquared=new o(e===0?0:1/(e*e),t===0?0:1/(t*t),i===0?0:1/(i*i)),n._minimumRadius=Math.min(e,t,i),n._maximumRadius=Math.max(e,t,i),n._centerToleranceSquared=p.EPSILON1,n._radiiSquared.z!==0&&(n._squaredXOverSquaredZ=n._radiiSquared.x/n._radiiSquared.z)}function s(n,e,t){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,ge(this,n,e,t)}Object.defineProperties(s.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});s.clone=function(n,e){if(!a(n))return;let t=n._radii;return a(e)?(o.clone(t,e._radii),o.clone(n._radiiSquared,e._radiiSquared),o.clone(n._radiiToTheFourth,e._radiiToTheFourth),o.clone(n._oneOverRadii,e._oneOverRadii),o.clone(n._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=n._minimumRadius,e._maximumRadius=n._maximumRadius,e._centerToleranceSquared=n._centerToleranceSquared,e):new s(t.x,t.y,t.z)};s.fromCartesian3=function(n,e){return a(e)||(e=new s),a(n)&&ge(e,n.x,n.y,n.z),e};s.WGS84=Object.freeze(new s(6378137,6378137,6356752314245179e-9));s.UNIT_SPHERE=Object.freeze(new s(1,1,1));s.MOON=Object.freeze(new s(p.LUNAR_RADIUS,p.LUNAR_RADIUS,p.LUNAR_RADIUS));s.MARS=Object.freeze(new s(3396190,3396190,3376200));s._default=s.WGS84;Object.defineProperties(s,{default:{get:function(){return s._default},set:function(n){r.typeOf.object("value",n),s._default=n,o._ellipsoidRadiiSquared=n.radiiSquared,N._ellipsoidOneOverRadii=n.oneOverRadii,N._ellipsoidOneOverRadiiSquared=n.oneOverRadiiSquared,N._ellipsoidCenterToleranceSquared=n._centerToleranceSquared}}});s.prototype.clone=function(n){return s.clone(this,n)};s.packedLength=o.packedLength;s.pack=function(n,e,t){return r.typeOf.object("value",n),r.defined("array",e),t=t??0,o.pack(n._radii,e,t),e};s.unpack=function(n,e,t){r.defined("array",n),e=e??0;let i=o.unpack(n,e);return s.fromCartesian3(i,t)};s.prototype.geocentricSurfaceNormal=o.normalize;s.prototype.geodeticSurfaceNormalCartographic=function(n,e){r.typeOf.object("cartographic",n);let t=n.longitude,i=n.latitude,u=Math.cos(i),c=u*Math.cos(t),d=u*Math.sin(t),y=Math.sin(i);return a(e)||(e=new o),e.x=c,e.y=d,e.z=y,o.normalize(e,e)};s.prototype.geodeticSurfaceNormal=function(n,e){if(r.typeOf.object("cartesian",n),isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new O("cartesian has a NaN component");if(!o.equalsEpsilon(n,o.ZERO,p.EPSILON14))return a(e)||(e=new o),e=o.multiplyComponents(n,this._oneOverRadiiSquared,e),o.normalize(e,e)};var ze=new o,Pe=new o;s.prototype.cartographicToCartesian=function(n,e){let t=ze,i=Pe;this.geodeticSurfaceNormalCartographic(n,t),o.multiplyComponents(this._radiiSquared,t,i);let u=Math.sqrt(o.dot(t,i));return o.divideByScalar(i,u,i),o.multiplyByScalar(t,n.height,t),a(e)||(e=new o),o.add(i,t,e)};s.prototype.cartographicArrayToCartesianArray=function(n,e){r.defined("cartographics",n);let t=n.length;a(e)?e.length=t:e=new Array(t);for(let i=0;i<t;i++)e[i]=this.cartographicToCartesian(n[i],e[i]);return e};var ke=new o,Ie=new o,Be=new o;s.prototype.cartesianToCartographic=function(n,e){let t=this.scaleToGeodeticSurface(n,Ie);if(!a(t))return;let i=this.geodeticSurfaceNormal(t,ke),u=o.subtract(n,t,Be),c=Math.atan2(i.y,i.x),d=Math.asin(i.z),y=p.sign(o.dot(u,n))*o.magnitude(u);return a(e)?(e.longitude=c,e.latitude=d,e.height=y,e):new N(c,d,y)};s.prototype.cartesianArrayToCartographicArray=function(n,e){r.defined("cartesians",n);let t=n.length;a(e)?e.length=t:e=new Array(t);for(let i=0;i<t;++i)e[i]=this.cartesianToCartographic(n[i],e[i]);return e};s.prototype.scaleToGeodeticSurface=function(n,e){return B(n,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)};s.prototype.scaleToGeocentricSurface=function(n,e){r.typeOf.object("cartesian",n),a(e)||(e=new o);let t=n.x,i=n.y,u=n.z,c=this._oneOverRadiiSquared,d=1/Math.sqrt(t*t*c.x+i*i*c.y+u*u*c.z);return o.multiplyByScalar(n,d,e)};s.prototype.transformPositionToScaledSpace=function(n,e){return a(e)||(e=new o),o.multiplyComponents(n,this._oneOverRadii,e)};s.prototype.transformPositionFromScaledSpace=function(n,e){return a(e)||(e=new o),o.multiplyComponents(n,this._radii,e)};s.prototype.equals=function(n){return this===n||a(n)&&o.equals(this._radii,n._radii)};s.prototype.toString=function(){return this._radii.toString()};s.prototype.getSurfaceNormalIntersectionWithZAxis=function(n,e,t){if(r.typeOf.object("position",n),!p.equalsEpsilon(this._radii.x,this._radii.y,p.EPSILON15))throw new O("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");r.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),e=e??0;let i=this._squaredXOverSquaredZ;if(a(t)||(t=new o),t.x=0,t.y=0,t.z=n.z*(1-i),!(Math.abs(t.z)>=this._radii.z-e))return t};var We=new o;s.prototype.getLocalCurvature=function(n,e){r.typeOf.object("surfacePosition",n),a(e)||(e=new ne);let t=this.getSurfaceNormalIntersectionWithZAxis(n,0,We),i=o.distance(n,t),u=this.minimumRadius*i/this.maximumRadius**2,c=i*u**2;return ne.fromElements(1/i,1/c,e)};var Ue=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],Ve=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function Oe(n,e,t){r.typeOf.number("a",n),r.typeOf.number("b",e),r.typeOf.func("func",t);let i=.5*(e+n),u=.5*(e-n),c=0;for(let d=0;d<5;d++){let y=u*Ue[d];c+=Ve[d]*(t(i+y)+t(i-y))}return c*=u,c}s.prototype.surfaceArea=function(n){r.typeOf.object("rectangle",n);let e=n.west,t=n.east,i=n.south,u=n.north;for(;t<e;)t+=p.TWO_PI;let c=this._radiiSquared,d=c.x,y=c.y,R=c.z,A=d*y;return Oe(i,u,function(S){let w=Math.cos(S),_=Math.sin(S);return Math.cos(S)*Oe(e,t,function(j){let M=Math.cos(j),E=Math.sin(j);return Math.sqrt(A*_*_+R*(y*M*M+d*E*E)*w*w)})})};var wt=s;var q,m={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},g={};Object.defineProperties(g,{element:{get:function(){if(g.supportsFullscreen())return document[m.fullscreenElement]}},changeEventName:{get:function(){if(g.supportsFullscreen())return m.fullscreenchange}},errorEventName:{get:function(){if(g.supportsFullscreen())return m.fullscreenerror}},enabled:{get:function(){if(g.supportsFullscreen())return document[m.fullscreenEnabled]}},fullscreen:{get:function(){if(g.supportsFullscreen())return g.element!==null}}});g.supportsFullscreen=function(){if(a(q))return q;q=!1;let n=document.body;if(typeof n.requestFullscreen=="function")return m.requestFullscreen="requestFullscreen",m.exitFullscreen="exitFullscreen",m.fullscreenEnabled="fullscreenEnabled",m.fullscreenElement="fullscreenElement",m.fullscreenchange="fullscreenchange",m.fullscreenerror="fullscreenerror",q=!0,q;let e=["webkit","moz","o","ms","khtml"],t;for(let i=0,u=e.length;i<u;++i){let c=e[i];t=`${c}RequestFullscreen`,typeof n[t]=="function"?(m.requestFullscreen=t,q=!0):(t=`${c}RequestFullScreen`,typeof n[t]=="function"&&(m.requestFullscreen=t,q=!0)),t=`${c}ExitFullscreen`,typeof document[t]=="function"?m.exitFullscreen=t:(t=`${c}CancelFullScreen`,typeof document[t]=="function"&&(m.exitFullscreen=t)),t=`${c}FullscreenEnabled`,document[t]!==void 0?m.fullscreenEnabled=t:(t=`${c}FullScreenEnabled`,document[t]!==void 0&&(m.fullscreenEnabled=t)),t=`${c}FullscreenElement`,document[t]!==void 0?m.fullscreenElement=t:(t=`${c}FullScreenElement`,document[t]!==void 0&&(m.fullscreenElement=t)),t=`${c}fullscreenchange`,document[`on${t}`]!==void 0&&(c==="ms"&&(t="MSFullscreenChange"),m.fullscreenchange=t),t=`${c}fullscreenerror`,document[`on${t}`]!==void 0&&(c==="ms"&&(t="MSFullscreenError"),m.fullscreenerror=t)}return q};g.requestFullscreen=function(n,e){g.supportsFullscreen()&&n[m.requestFullscreen]({vrDisplay:e})};g.exitFullscreen=function(){g.supportsFullscreen()&&document[m.exitFullscreen]()};g._names=m;var be=g;var b;typeof navigator<"u"?b=navigator:b={};function z(n){let e=n.split(".");for(let t=0,i=e.length;t<i;++t)e[t]=parseInt(e[t],10);return e}var U,xe;function ue(){if(!a(U)&&(U=!1,!G())){let n=/ Chrome\/([\.0-9]+)/.exec(b.userAgent);n!==null&&(U=!0,xe=z(n[1]))}return U}function Le(){return ue()&&xe}var V,Se;function we(){if(!a(V)&&(V=!1,!ue()&&!G()&&/ Safari\/[\.0-9]+/.test(b.userAgent))){let n=/ Version\/([\.0-9]+)/.exec(b.userAgent);n!==null&&(V=!0,Se=z(n[1]))}return V}function $e(){return we()&&Se}var L,ae;function qe(){if(!a(L)){L=!1;let n=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(b.userAgent);n!==null&&(L=!0,ae=z(n[1]),ae.isNightly=!!n[2])}return L}function De(){return qe()&&ae}var $,Re;function G(){if(!a($)){$=!1;let n=/ Edg\/([\.0-9]+)/.exec(b.userAgent);n!==null&&($=!0,Re=z(n[1]))}return $}function Ze(){return G()&&Re}var D,ce;function X(){if(!a(D)){D=!1;let n=/Firefox\/([\.0-9]+)/.exec(b.userAgent);n!==null&&(D=!0,ce=z(n[1]))}return D}var ie;function Ge(){return a(ie)||(ie=/Windows/i.test(b.appVersion)),ie}var re;function Xe(){return a(re)||(re=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),re}function Ye(){return X()&&ce}var oe;function Qe(){return a(oe)||(oe=!X()&&typeof PointerEvent<"u"&&(!a(b.pointerEnabled)||b.pointerEnabled)),oe}var Ae,Z;function _e(){if(!a(Z)){let n=document.createElement("canvas");n.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let e=n.style.imageRendering;Z=a(e)&&e!=="",Z&&(Ae=e)}return Z}function He(){return _e()?Ae:void 0}function h(){if(!h.initialized)throw new O("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return h._result}h._promise=void 0;h._result=void 0;h.initialize=function(){return a(h._promise)||(h._promise=new Promise(n=>{let e=new Image;e.onload=function(){h._result=e.width>0&&e.height>0,n(h._result)},e.onerror=function(){h._result=!1,n(h._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),h._promise};Object.defineProperties(h,{initialized:{get:function(){return a(h._result)}}});var F=[];typeof ArrayBuffer<"u"&&(F.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&F.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&F.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&F.push(BigInt64Array),typeof BigUint64Array<"u"&&F.push(BigUint64Array));var x={isChrome:ue,chromeVersion:Le,isSafari:we,safariVersion:$e,isWebkit:qe,webkitVersion:De,isEdge:G,edgeVersion:Ze,isFirefox:X,firefoxVersion:Ye,isWindows:Ge,isIPadOrIOS:Xe,hardwareConcurrency:b.hardwareConcurrency??3,supportsPointerEvents:Qe,supportsImageRenderingPixelated:_e,supportsWebP:h,imageRenderingValue:He,typedArrayTypes:F};x.supportsBasis=function(n){return x.supportsWebAssembly()&&n.context.supportsBasis};x.supportsFullscreen=function(){return be.supportsFullscreen()};x.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};x.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};x.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};x.supportsBigInt=function(){return typeof BigInt<"u"};x.supportsWebWorkers=function(){return typeof Worker<"u"};x.supportsWebAssembly=function(){return typeof WebAssembly<"u"};x.supportsWebgl2=function(n){return r.defined("scene",n),n.context.webgl2};x.supportsEsmWebWorkers=function(){return!X()||parseInt(ce)>=114};var Tt=x;export{N as a,ne as b,wt as c,Tt as d};
|