Transforms-d5c6ad6e.js 115 KB

1
  1. define(["exports","./Matrix2-ccd5b911","./RuntimeError-346a3079","./when-4bbc8319","./ComponentDatatype-93750d1a","./combine-83860057"],function(e,I,v,P,c,d){"use strict";function t(e){this._ellipsoid=P.defaultValue(e,I.Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(t.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),t.prototype.project=function(e,t){var r=this._semimajorAxis,n=e.longitude*r,r=e.latitude*r,e=e.height;return P.defined(t)?(t.x=n,t.y=r,t.z=e,t):new I.Cartesian3(n,r,e)},t.prototype.unproject=function(e,t){var r=this._oneOverSemimajorAxis,n=e.x*r,r=e.y*r,e=e.z;return P.defined(t)?(t.longitude=n,t.latitude=r,t.height=e,t):new I.Cartographic(n,r,e)};var a=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function i(e,t){this.start=P.defaultValue(e,0),this.stop=P.defaultValue(t,0)}function T(e,t){this.center=I.Cartesian3.clone(P.defaultValue(e,I.Cartesian3.ZERO)),this.radius=P.defaultValue(t,0)}var q=new I.Cartesian3,z=new I.Cartesian3,M=new I.Cartesian3,D=new I.Cartesian3,U=new I.Cartesian3,k=new I.Cartesian3,F=new I.Cartesian3,N=new I.Cartesian3,j=new I.Cartesian3,B=new I.Cartesian3,V=new I.Cartesian3,L=new I.Cartesian3,r=4/3*c.CesiumMath.PI;T.fromPoints=function(e,t){if(P.defined(t)||(t=new T),!P.defined(e)||0===e.length)return t.center=I.Cartesian3.clone(I.Cartesian3.ZERO,t.center),t.radius=0,t;for(var r=I.Cartesian3.clone(e[0],F),n=I.Cartesian3.clone(r,q),a=I.Cartesian3.clone(r,z),i=I.Cartesian3.clone(r,M),o=I.Cartesian3.clone(r,D),s=I.Cartesian3.clone(r,U),u=I.Cartesian3.clone(r,k),l=e.length,c=1;c<l;c++){I.Cartesian3.clone(e[c],r);var d=r.x,f=r.y,p=r.z;d<n.x&&I.Cartesian3.clone(r,n),d>o.x&&I.Cartesian3.clone(r,o),f<a.y&&I.Cartesian3.clone(r,a),f>s.y&&I.Cartesian3.clone(r,s),p<i.z&&I.Cartesian3.clone(r,i),p>u.z&&I.Cartesian3.clone(r,u)}var h=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(o,n,N)),m=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(s,a,N)),g=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(u,i,N)),y=n,v=o,w=h;h<m&&(w=m,y=a,v=s),w<g&&(w=g,y=i,v=u);var C=j;C.x=.5*(y.x+v.x),C.y=.5*(y.y+v.y),C.z=.5*(y.z+v.z);var _=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(v,C,N)),b=Math.sqrt(_),y=B;y.x=n.x,y.y=a.y,y.z=i.z;v=V;v.x=o.x,v.y=s.y,v.z=u.z;var x=I.Cartesian3.midpoint(y,v,L),S=0;for(c=0;c<l;c++){I.Cartesian3.clone(e[c],r);var E=I.Cartesian3.magnitude(I.Cartesian3.subtract(r,x,N));S<E&&(S=E);var A=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(r,C,N));_<A&&(_=(b=.5*(b+(E=Math.sqrt(A))))*b,C.x=(b*C.x+(A=E-b)*r.x)/E,C.y=(b*C.y+A*r.y)/E,C.z=(b*C.z+A*r.z)/E)}return b<S?(I.Cartesian3.clone(C,t.center),t.radius=b):(I.Cartesian3.clone(x,t.center),t.radius=S),t};var o=new t,s=new I.Cartesian3,u=new I.Cartesian3,l=new I.Cartographic,f=new I.Cartographic;T.fromRectangle2D=function(e,t,r){return T.fromRectangleWithHeights2D(e,t,0,0,r)},T.fromRectangleWithHeights2D=function(e,t,r,n,a){if(P.defined(a)||(a=new T),!P.defined(e))return a.center=I.Cartesian3.clone(I.Cartesian3.ZERO,a.center),a.radius=0,a;t=P.defaultValue(t,o),I.Rectangle.southwest(e,l),l.height=r,I.Rectangle.northeast(e,f),f.height=n;var i=t.project(l,s),r=t.project(f,u),e=r.x-i.x,n=r.y-i.y,t=r.z-i.z;a.radius=.5*Math.sqrt(e*e+n*n+t*t);r=a.center;return r.x=i.x+.5*e,r.y=i.y+.5*n,r.z=i.z+.5*t,a};var p=[];T.fromRectangle3D=function(e,t,r,n){if(t=P.defaultValue(t,I.Ellipsoid.WGS84),r=P.defaultValue(r,0),P.defined(n)||(n=new T),!P.defined(e))return n.center=I.Cartesian3.clone(I.Cartesian3.ZERO,n.center),n.radius=0,n;r=I.Rectangle.subsample(e,t,r,p);return T.fromPoints(r,n)},T.fromVertices=function(e,t,r,n){if(P.defined(n)||(n=new T),!P.defined(e)||0===e.length)return n.center=I.Cartesian3.clone(I.Cartesian3.ZERO,n.center),n.radius=0,n;t=P.defaultValue(t,I.Cartesian3.ZERO),r=P.defaultValue(r,3);var a=F;a.x=e[0]+t.x,a.y=e[1]+t.y,a.z=e[2]+t.z;for(var i=I.Cartesian3.clone(a,q),o=I.Cartesian3.clone(a,z),s=I.Cartesian3.clone(a,M),u=I.Cartesian3.clone(a,D),l=I.Cartesian3.clone(a,U),c=I.Cartesian3.clone(a,k),d=e.length,f=0;f<d;f+=r){var p=e[f]+t.x,h=e[f+1]+t.y,m=e[f+2]+t.z;a.x=p,a.y=h,a.z=m,p<i.x&&I.Cartesian3.clone(a,i),p>u.x&&I.Cartesian3.clone(a,u),h<o.y&&I.Cartesian3.clone(a,o),h>l.y&&I.Cartesian3.clone(a,l),m<s.z&&I.Cartesian3.clone(a,s),m>c.z&&I.Cartesian3.clone(a,c)}var g=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(u,i,N)),y=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(l,o,N)),v=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(c,s,N)),w=i,C=u,_=g;g<y&&(_=y,w=o,C=l),_<v&&(_=v,w=s,C=c);var b=j;b.x=.5*(w.x+C.x),b.y=.5*(w.y+C.y),b.z=.5*(w.z+C.z);var x=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(C,b,N)),S=Math.sqrt(x),w=B;w.x=i.x,w.y=o.y,w.z=s.z;C=V;C.x=u.x,C.y=l.y,C.z=c.z;var E=I.Cartesian3.midpoint(w,C,L),A=0;for(f=0;f<d;f+=r){a.x=e[f]+t.x,a.y=e[f+1]+t.y,a.z=e[f+2]+t.z;var O=I.Cartesian3.magnitude(I.Cartesian3.subtract(a,E,N));A<O&&(A=O);var R=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(a,b,N));x<R&&(x=(S=.5*(S+(O=Math.sqrt(R))))*S,b.x=(S*b.x+(R=O-S)*a.x)/O,b.y=(S*b.y+R*a.y)/O,b.z=(S*b.z+R*a.z)/O)}return S<A?(I.Cartesian3.clone(b,n.center),n.radius=S):(I.Cartesian3.clone(E,n.center),n.radius=A),n},T.fromEncodedCartesianVertices=function(e,t,r){if(P.defined(r)||(r=new T),!P.defined(e)||!P.defined(t)||e.length!==t.length||0===e.length)return r.center=I.Cartesian3.clone(I.Cartesian3.ZERO,r.center),r.radius=0,r;var n=F;n.x=e[0]+t[0],n.y=e[1]+t[1],n.z=e[2]+t[2];for(var a=I.Cartesian3.clone(n,q),i=I.Cartesian3.clone(n,z),o=I.Cartesian3.clone(n,M),s=I.Cartesian3.clone(n,D),u=I.Cartesian3.clone(n,U),l=I.Cartesian3.clone(n,k),c=e.length,d=0;d<c;d+=3){var f=e[d]+t[d],p=e[d+1]+t[d+1],h=e[d+2]+t[d+2];n.x=f,n.y=p,n.z=h,f<a.x&&I.Cartesian3.clone(n,a),f>s.x&&I.Cartesian3.clone(n,s),p<i.y&&I.Cartesian3.clone(n,i),p>u.y&&I.Cartesian3.clone(n,u),h<o.z&&I.Cartesian3.clone(n,o),h>l.z&&I.Cartesian3.clone(n,l)}var m=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(s,a,N)),g=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(u,i,N)),y=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(l,o,N)),v=a,w=s,C=m;m<g&&(C=g,v=i,w=u),C<y&&(C=y,v=o,w=l);var _=j;_.x=.5*(v.x+w.x),_.y=.5*(v.y+w.y),_.z=.5*(v.z+w.z);var b=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(w,_,N)),x=Math.sqrt(b),v=B;v.x=a.x,v.y=i.y,v.z=o.z;w=V;w.x=s.x,w.y=u.y,w.z=l.z;var S=I.Cartesian3.midpoint(v,w,L),E=0;for(d=0;d<c;d+=3){n.x=e[d]+t[d],n.y=e[d+1]+t[d+1],n.z=e[d+2]+t[d+2];var A=I.Cartesian3.magnitude(I.Cartesian3.subtract(n,S,N));E<A&&(E=A);var O=I.Cartesian3.magnitudeSquared(I.Cartesian3.subtract(n,_,N));b<O&&(b=(x=.5*(x+(A=Math.sqrt(O))))*x,_.x=(x*_.x+(O=A-x)*n.x)/A,_.y=(x*_.y+O*n.y)/A,_.z=(x*_.z+O*n.z)/A)}return x<E?(I.Cartesian3.clone(_,r.center),r.radius=x):(I.Cartesian3.clone(S,r.center),r.radius=E),r},T.fromCornerPoints=function(e,t,r){P.defined(r)||(r=new T);e=I.Cartesian3.midpoint(e,t,r.center);return r.radius=I.Cartesian3.distance(e,t),r},T.fromEllipsoid=function(e,t){return P.defined(t)||(t=new T),I.Cartesian3.clone(I.Cartesian3.ZERO,t.center),t.radius=e.maximumRadius,t};var h=new I.Cartesian3;T.fromBoundingSpheres=function(e,t){if(P.defined(t)||(t=new T),!P.defined(e)||0===e.length)return t.center=I.Cartesian3.clone(I.Cartesian3.ZERO,t.center),t.radius=0,t;var r=e.length;if(1===r)return T.clone(e[0],t);if(2===r)return T.union(e[0],e[1],t);for(var n=[],a=0;a<r;a++)n.push(e[a].center);var i=(t=T.fromPoints(n,t)).center,o=t.radius;for(a=0;a<r;a++)var s=e[a],o=Math.max(o,I.Cartesian3.distance(i,s.center,h)+s.radius);return t.radius=o,t};var m=new I.Cartesian3,g=new I.Cartesian3,y=new I.Cartesian3;T.fromOrientedBoundingBox=function(e,t){P.defined(t)||(t=new T);var r=e.halfAxes,n=I.Matrix3.getColumn(r,0,m),a=I.Matrix3.getColumn(r,1,g),r=I.Matrix3.getColumn(r,2,y);return I.Cartesian3.add(n,a,n),I.Cartesian3.add(n,r,n),t.center=I.Cartesian3.clone(e.center,t.center),t.radius=I.Cartesian3.magnitude(n),t},T.clone=function(e,t){if(P.defined(e))return P.defined(t)?(t.center=I.Cartesian3.clone(e.center,t.center),t.radius=e.radius,t):new T(e.center,e.radius)},T.packedLength=4,T.pack=function(e,t,r){r=P.defaultValue(r,0);var n=e.center;return t[r++]=n.x,t[r++]=n.y,t[r++]=n.z,t[r]=e.radius,t},T.unpack=function(e,t,r){t=P.defaultValue(t,0);var n=(r=!P.defined(r)?new T:r).center;return n.x=e[t++],n.y=e[t++],n.z=e[t++],r.radius=e[t],r};var w=new I.Cartesian3,C=new I.Cartesian3;T.union=function(e,t,r){P.defined(r)||(r=new T);var n=e.center,a=e.radius,i=t.center,o=t.radius,s=I.Cartesian3.subtract(i,n,w),i=I.Cartesian3.magnitude(s);if(i+o<=a)return e.clone(r),r;if(i+a<=o)return t.clone(r),r;o=.5*(a+i+o),i=I.Cartesian3.multiplyByScalar(s,(o-a)/i,C);return I.Cartesian3.add(i,n,i),I.Cartesian3.clone(i,r.center),r.radius=o,r};var n=new I.Cartesian3;T.expand=function(e,t,r){r=T.clone(e,r);t=I.Cartesian3.magnitude(I.Cartesian3.subtract(t,r.center,n));return t>r.radius&&(r.radius=t),r},T.intersectPlane=function(e,t){var r=e.center,n=e.radius,e=t.normal,t=I.Cartesian3.dot(e,r)+t.distance;return t<-n?a.OUTSIDE:t<n?a.INTERSECTING:a.INSIDE},T.transform=function(e,t,r){return(r=!P.defined(r)?new T:r).center=I.Matrix4.multiplyByPoint(t,e.center,r.center),r.radius=I.Matrix4.getMaximumScale(t)*e.radius,r};var _=new I.Cartesian3;T.distanceSquaredTo=function(e,t){t=I.Cartesian3.subtract(e.center,t,_),e=I.Cartesian3.magnitude(t)-e.radius;return e<=0?0:e*e},T.transformWithoutScale=function(e,t,r){return(r=!P.defined(r)?new T:r).center=I.Matrix4.multiplyByPoint(t,e.center,r.center),r.radius=e.radius,r};var b=new I.Cartesian3;T.computePlaneDistances=function(e,t,r,n){P.defined(n)||(n=new i);t=I.Cartesian3.subtract(e.center,t,b),t=I.Cartesian3.dot(r,t);return n.start=t-e.radius,n.stop=t+e.radius,n};for(var x=new I.Cartesian3,S=new I.Cartesian3,E=new I.Cartesian3,A=new I.Cartesian3,O=new I.Cartesian3,R=new I.Cartographic,Q=new Array(8),W=0;W<8;++W)Q[W]=new I.Cartesian3;var H,Y=new t;T.projectTo2D=function(e,t,r){var n=(t=P.defaultValue(t,Y)).ellipsoid,a=e.center,i=e.radius,o=I.Cartesian3.equals(a,I.Cartesian3.ZERO)?I.Cartesian3.clone(I.Cartesian3.UNIT_X,x):n.geodeticSurfaceNormal(a,x),s=I.Cartesian3.cross(I.Cartesian3.UNIT_Z,o,S);I.Cartesian3.normalize(s,s);var u=I.Cartesian3.cross(o,s,E);I.Cartesian3.normalize(u,u),I.Cartesian3.multiplyByScalar(o,i,o),I.Cartesian3.multiplyByScalar(u,i,u),I.Cartesian3.multiplyByScalar(s,i,s);var l=I.Cartesian3.negate(u,O),e=I.Cartesian3.negate(s,A),c=Q,i=c[0];I.Cartesian3.add(o,u,i),I.Cartesian3.add(i,s,i),i=c[1],I.Cartesian3.add(o,u,i),I.Cartesian3.add(i,e,i),i=c[2],I.Cartesian3.add(o,l,i),I.Cartesian3.add(i,e,i),i=c[3],I.Cartesian3.add(o,l,i),I.Cartesian3.add(i,s,i),I.Cartesian3.negate(o,o),i=c[4],I.Cartesian3.add(o,u,i),I.Cartesian3.add(i,s,i),i=c[5],I.Cartesian3.add(o,u,i),I.Cartesian3.add(i,e,i),i=c[6],I.Cartesian3.add(o,l,i),I.Cartesian3.add(i,e,i),i=c[7],I.Cartesian3.add(o,l,i),I.Cartesian3.add(i,s,i);for(var d=c.length,f=0;f<d;++f){var p=c[f];I.Cartesian3.add(a,p,p);var h=n.cartesianToCartographic(p,R);t.project(h,p)}l=(a=(r=T.fromPoints(c,r)).center).x,s=a.y,i=a.z;return a.x=i,a.y=l,a.z=s,r},T.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)},T.equals=function(e,t){return e===t||P.defined(e)&&P.defined(t)&&I.Cartesian3.equals(e.center,t.center)&&e.radius===t.radius},T.prototype.intersectPlane=function(e){return T.intersectPlane(this,e)},T.prototype.distanceSquaredTo=function(e){return T.distanceSquaredTo(this,e)},T.prototype.computePlaneDistances=function(e,t,r){return T.computePlaneDistances(this,e,t,r)},T.prototype.isOccluded=function(e){return T.isOccluded(this,e)},T.prototype.equals=function(e){return T.equals(this,e)},T.prototype.clone=function(e){return T.clone(this,e)},T.prototype.volume=function(){var e=this.radius;return r*e*e*e};var Z,G,J,$,X,K,ee,te,re,ne,ae,ie,oe,se,ue,le,ce,de={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},fe={};function pe(e){for(var t=e.split("."),r=0,n=t.length;r<n;++r)t[r]=parseInt(t[r],10);return t}function he(){var e;return P.defined(G)||(G=!1,ve()||null!==(e=/ Chrome\/([\.0-9]+)/.exec(Z.userAgent))&&(G=!0,J=pe(e[1]))),G}function me(){var e;return P.defined($)||($=!1,he()||ve()||!/ Safari\/[\.0-9]+/.test(Z.userAgent)||null!==(e=/ Version\/([\.0-9]+)/.exec(Z.userAgent))&&($=!0,X=pe(e[1]))),$}function ge(){var e;return P.defined(K)||(K=!1,null!==(e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Z.userAgent))&&(K=!0,(ee=pe(e[1])).isNightly=!!e[2])),K}function ye(){var e;return P.defined(te)||(te=!1,"Microsoft Internet Explorer"===Z.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Z.userAgent))&&(te=!0,re=pe(e[1])):"Netscape"===Z.appName&&null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Z.userAgent))&&(te=!0,re=pe(e[1]))),te}function ve(){var e;return P.defined(ne)||(ne=!1,null!==(e=/ Edge\/([\.0-9]+)/.exec(Z.userAgent))&&(ne=!0,ae=pe(e[1]))),ne}function we(){var e;return P.defined(ie)||(ie=!1,null!==(e=/Firefox\/([\.0-9]+)/.exec(Z.userAgent))&&(ie=!0,oe=pe(e[1]))),ie}function Ce(){var e;return P.defined(ce)||((e=document.createElement("canvas")).setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;"),e=e.style.imageRendering,(ce=P.defined(e)&&""!==e)&&(le=e)),ce}function _e(){return _e._result}Object.defineProperties(fe,{element:{get:function(){if(fe.supportsFullscreen())return document[de.fullscreenElement]}},changeEventName:{get:function(){if(fe.supportsFullscreen())return de.fullscreenchange}},errorEventName:{get:function(){if(fe.supportsFullscreen())return de.fullscreenerror}},enabled:{get:function(){if(fe.supportsFullscreen())return document[de.fullscreenEnabled]}},fullscreen:{get:function(){if(fe.supportsFullscreen())return null!==fe.element}}}),fe.supportsFullscreen=function(){if(P.defined(H))return H;H=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return de.requestFullscreen="requestFullscreen",de.exitFullscreen="exitFullscreen",de.fullscreenEnabled="fullscreenEnabled",de.fullscreenElement="fullscreenElement",de.fullscreenchange="fullscreenchange",de.fullscreenerror="fullscreenerror",H=!0;for(var t=["webkit","moz","o","ms","khtml"],r=0,n=t.length;r<n;++r){var a,i=t[r];"function"!=typeof e[a=i+"RequestFullscreen"]&&"function"!=typeof e[a=i+"RequestFullScreen"]||(de.requestFullscreen=a,H=!0),a=i+"ExitFullscreen","function"==typeof document[a]?de.exitFullscreen=a:(a=i+"CancelFullScreen","function"==typeof document[a]&&(de.exitFullscreen=a)),a=i+"FullscreenEnabled",void 0!==document[a]?de.fullscreenEnabled=a:(a=i+"FullScreenEnabled",void 0!==document[a]&&(de.fullscreenEnabled=a)),a=i+"FullscreenElement",void 0!==document[a]?de.fullscreenElement=a:(a=i+"FullScreenElement",void 0!==document[a]&&(de.fullscreenElement=a)),a=i+"fullscreenchange",void 0!==document["on"+a]&&(de.fullscreenchange=a="ms"===i?"MSFullscreenChange":a),a=i+"fullscreenerror",void 0!==document["on"+a]&&(de.fullscreenerror=a="ms"===i?"MSFullscreenError":a)}return H},fe.requestFullscreen=function(e,t){fe.supportsFullscreen()&&e[de.requestFullscreen]({vrDisplay:t})},fe.exitFullscreen=function(){fe.supportsFullscreen()&&document[de.exitFullscreen]()},fe._names=de,Z="undefined"!=typeof navigator?navigator:{},_e._promise=void 0,_e._result=void 0,_e.initialize=function(){if(P.defined(_e._promise))return _e._promise;var e=P.when.defer();if(_e._promise=e.promise,ve())return _e._result=!1,e.resolve(_e._result),e.promise;var t=new Image;return t.onload=function(){_e._result=0<t.width&&0<t.height,e.resolve(_e._result)},t.onerror=function(){_e._result=!1,e.resolve(_e._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.promise},Object.defineProperties(_e,{initialized:{get:function(){return P.defined(_e._result)}}});var be=[];"undefined"!=typeof ArrayBuffer&&(be.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&be.push(Uint8ClampedArray),"undefined"!=typeof Uint8ClampedArray&&be.push(Uint8ClampedArray),"undefined"!=typeof BigInt64Array&&be.push(BigInt64Array),"undefined"!=typeof BigUint64Array&&be.push(BigUint64Array));var xe={isChrome:he,chromeVersion:function(){return he()&&J},isSafari:me,safariVersion:function(){return me()&&X},isWebkit:ge,webkitVersion:function(){return ge()&&ee},isInternetExplorer:ye,internetExplorerVersion:function(){return ye()&&re},isEdge:ve,edgeVersion:function(){return ve()&&ae},isFirefox:we,firefoxVersion:function(){return we()&&oe},isWindows:function(){return se=!P.defined(se)?/Windows/i.test(Z.appVersion):se},hardwareConcurrency:P.defaultValue(Z.hardwareConcurrency,3),supportsPointerEvents:function(){return ue=!P.defined(ue)?!we()&&"undefined"!=typeof PointerEvent&&(!P.defined(Z.pointerEnabled)||Z.pointerEnabled):ue},supportsImageRenderingPixelated:Ce,supportsWebP:_e,imageRenderingValue:function(){return Ce()?le:void 0},typedArrayTypes:be};function Se(e,t,r,n){this.x=P.defaultValue(e,0),this.y=P.defaultValue(t,0),this.z=P.defaultValue(r,0),this.w=P.defaultValue(n,0)}xe.supportsBasis=function(e){return xe.supportsWebAssembly()&&e.context.supportsBasis},xe.supportsFullscreen=function(){return fe.supportsFullscreen()},xe.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},xe.supportsBigInt64Array=function(){return"undefined"!=typeof BigInt64Array},xe.supportsBigUint64Array=function(){return"undefined"!=typeof BigUint64Array},xe.supportsBigInt=function(){return"undefined"!=typeof BigInt},xe.supportsWebWorkers=function(){return"undefined"!=typeof Worker},xe.supportsWebAssembly=function(){return"undefined"!=typeof WebAssembly&&!xe.isEdge()};var Ee=new I.Cartesian3;Se.fromAxisAngle=function(e,t,r){var n=t/2,a=Math.sin(n),t=(Ee=I.Cartesian3.normalize(e,Ee)).x*a,e=Ee.y*a,a=Ee.z*a,n=Math.cos(n);return P.defined(r)?(r.x=t,r.y=e,r.z=a,r.w=n,r):new Se(t,e,a,n)};var Ae=[1,2,0],Oe=new Array(3);Se.fromRotationMatrix=function(e,t){var r,n,a,i,o=e[I.Matrix3.COLUMN0ROW0],s=e[I.Matrix3.COLUMN1ROW1],u=e[I.Matrix3.COLUMN2ROW2],l=o+s+u,c=0<l?(a=.5*(i=Math.sqrt(l+1)),r=(e[I.Matrix3.COLUMN1ROW2]-e[I.Matrix3.COLUMN2ROW1])*(i=.5/i),n=(e[I.Matrix3.COLUMN2ROW0]-e[I.Matrix3.COLUMN0ROW2])*i,(e[I.Matrix3.COLUMN0ROW1]-e[I.Matrix3.COLUMN1ROW0])*i):(s=Ae[o=Ae[u=o<u&&s<u?2:o<s?1:0]],i=Math.sqrt(e[I.Matrix3.getElementIndex(u,u)]-e[I.Matrix3.getElementIndex(o,o)]-e[I.Matrix3.getElementIndex(s,s)]+1),(c=Oe)[u]=.5*i,i=.5/i,a=(e[I.Matrix3.getElementIndex(s,o)]-e[I.Matrix3.getElementIndex(o,s)])*i,c[o]=(e[I.Matrix3.getElementIndex(o,u)]+e[I.Matrix3.getElementIndex(u,o)])*i,c[s]=(e[I.Matrix3.getElementIndex(s,u)]+e[I.Matrix3.getElementIndex(u,s)])*i,r=-c[0],n=-c[1],-c[2]);return P.defined(t)?(t.x=r,t.y=n,t.z=c,t.w=a,t):new Se(r,n,c,a)};var Re,Ie,Pe,Te=new Se;new Se,new Se,new Se;Se.fromHeadingPitchRoll=function(e,t){return Pe=Se.fromAxisAngle(I.Cartesian3.UNIT_X,e.roll,Te),Ie=Se.fromAxisAngle(I.Cartesian3.UNIT_Y,-e.pitch,t),t=Se.multiply(Ie,Pe,Ie),Re=Se.fromAxisAngle(I.Cartesian3.UNIT_Z,-e.heading,Te),Se.multiply(Re,t,t)};var qe=new I.Cartesian3,ze=new I.Cartesian3,Me=new Se,De=new Se,Ue=new Se;Se.packedLength=4,Se.pack=function(e,t,r){return r=P.defaultValue(r,0),t[r++]=e.x,t[r++]=e.y,t[r++]=e.z,t[r]=e.w,t},Se.unpack=function(e,t,r){return t=P.defaultValue(t,0),(r=!P.defined(r)?new Se:r).x=e[t],r.y=e[t+1],r.z=e[t+2],r.w=e[t+3],r},Se.packedInterpolationLength=3,Se.convertPackedArrayForInterpolation=function(e,t,r,n){Se.unpack(e,4*r,Ue),Se.conjugate(Ue,Ue);for(var a=0,i=r-t+1;a<i;a++){var o=3*a;Se.unpack(e,4*(t+a),Me),Se.multiply(Me,Ue,Me),Me.w<0&&Se.negate(Me,Me),Se.computeAxis(Me,qe);var s=Se.computeAngle(Me);(n=!P.defined(n)?[]:n)[o]=qe.x*s,n[1+o]=qe.y*s,n[2+o]=qe.z*s}},Se.unpackInterpolationResult=function(e,t,r,n,a){P.defined(a)||(a=new Se),I.Cartesian3.fromArray(e,0,ze);e=I.Cartesian3.magnitude(ze);return Se.unpack(t,4*n,De),0===e?Se.clone(Se.IDENTITY,Me):Se.fromAxisAngle(ze,e,Me),Se.multiply(Me,De,a)},Se.clone=function(e,t){if(P.defined(e))return P.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Se(e.x,e.y,e.z,e.w)},Se.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},Se.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Se.magnitude=function(e){return Math.sqrt(Se.magnitudeSquared(e))},Se.normalize=function(e,t){var r=1/Se.magnitude(e),n=e.x*r,a=e.y*r,i=e.z*r,r=e.w*r;return t.x=n,t.y=a,t.z=i,t.w=r,t},Se.inverse=function(e,t){var r=Se.magnitudeSquared(e);return t=Se.conjugate(e,t),Se.multiplyByScalar(t,1/r,t)},Se.add=function(e,t,r){return r.x=e.x+t.x,r.y=e.y+t.y,r.z=e.z+t.z,r.w=e.w+t.w,r},Se.subtract=function(e,t,r){return r.x=e.x-t.x,r.y=e.y-t.y,r.z=e.z-t.z,r.w=e.w-t.w,r},Se.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Se.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Se.multiply=function(e,t,r){var n=e.x,a=e.y,i=e.z,o=e.w,s=t.x,u=t.y,l=t.z,c=t.w,d=o*u-n*l+a*c+i*s,e=o*l+n*u-a*s+i*c,t=o*c-n*s-a*u-i*l;return r.x=o*s+n*c+a*l-i*u,r.y=d,r.z=e,r.w=t,r},Se.multiplyByScalar=function(e,t,r){return r.x=e.x*t,r.y=e.y*t,r.z=e.z*t,r.w=e.w*t,r},Se.divideByScalar=function(e,t,r){return r.x=e.x/t,r.y=e.y/t,r.z=e.z/t,r.w=e.w/t,r},Se.computeAxis=function(e,t){var r=e.w;if(Math.abs(r-1)<c.CesiumMath.EPSILON6)return t.x=t.y=t.z=0,t;r=1/Math.sqrt(1-r*r);return t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t},Se.computeAngle=function(e){return Math.abs(e.w-1)<c.CesiumMath.EPSILON6?0:2*Math.acos(e.w)};var ke=new Se;Se.lerp=function(e,t,r,n){return ke=Se.multiplyByScalar(t,r,ke),n=Se.multiplyByScalar(e,1-r,n),Se.add(ke,n,n)};var Fe=new Se,Ne=new Se,je=new Se;Se.slerp=function(e,t,r,n){var a=Se.dot(e,t),i=t;if(a<0&&(a=-a,i=Fe=Se.negate(t,Fe)),1-a<c.CesiumMath.EPSILON6)return Se.lerp(e,i,r,n);a=Math.acos(a);return Ne=Se.multiplyByScalar(e,Math.sin((1-r)*a),Ne),je=Se.multiplyByScalar(i,Math.sin(r*a),je),n=Se.add(Ne,je,n),Se.multiplyByScalar(n,1/Math.sin(a),n)},Se.log=function(e,t){var r=c.CesiumMath.acosClamped(e.w),n=0;return 0!==r&&(n=r/Math.sin(r)),I.Cartesian3.multiplyByScalar(e,n,t)},Se.exp=function(e,t){var r=I.Cartesian3.magnitude(e),n=0;return 0!==r&&(n=Math.sin(r)/r),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=Math.cos(r),t};var Be=new I.Cartesian3,Ve=new I.Cartesian3,Le=new Se,Qe=new Se;Se.computeInnerQuadrangle=function(e,t,r,n){var a=Se.conjugate(t,Le);Se.multiply(a,r,Qe);r=Se.log(Qe,Be);Se.multiply(a,e,Qe);e=Se.log(Qe,Ve);return I.Cartesian3.add(r,e,r),I.Cartesian3.multiplyByScalar(r,.25,r),I.Cartesian3.negate(r,r),Se.exp(r,Le),Se.multiply(t,Le,n)},Se.squad=function(e,t,r,n,a,i){t=Se.slerp(e,t,a,Le),n=Se.slerp(r,n,a,Qe);return Se.slerp(t,n,2*a*(1-a),i)};for(var We=new Se,be=1.9011074535173003,He=xe.supportsTypedArrays()?new Float32Array(8):[],Ye=xe.supportsTypedArrays()?new Float32Array(8):[],Ze=xe.supportsTypedArrays()?new Float32Array(8):[],Ge=xe.supportsTypedArrays()?new Float32Array(8):[],Je=0;Je<7;++Je){var $e=Je+1,Xe=2*$e+1;He[Je]=1/($e*Xe),Ye[Je]=$e/Xe}function Ke(e,t,r){for(var n,a,i=0,o=e.length-1;i<=o;)if((a=r(e[n=~~((i+o)/2)],t))<0)i=1+n;else{if(!(0<a))return n;o=n-1}return~(o+1)}function et(e,t,r,n,a){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=r,this.yPoleOffset=n,this.ut1MinusUtc=a}function tt(e,t,r,n,a,i,o,s){this.year=e,this.month=t,this.day=r,this.hour=n,this.minute=a,this.second=i,this.millisecond=o,this.isLeapSecond=s}function rt(e){return e%4==0&&e%100!=0||e%400==0}function nt(e,t){this.julianDate=e,this.offset=t}He[7]=be/136,Ye[7]=8*be/17,Se.fastSlerp=function(e,t,r,n){var a,i=Se.dot(e,t);0<=i?a=1:(a=-1,i=-i);for(var o=i-1,i=1-r,s=r*r,u=i*i,l=7;0<=l;--l)Ze[l]=(He[l]*s-Ye[l])*o,Ge[l]=(He[l]*u-Ye[l])*o;r=a*r*(1+Ze[0]*(1+Ze[1]*(1+Ze[2]*(1+Ze[3]*(1+Ze[4]*(1+Ze[5]*(1+Ze[6]*(1+Ze[7])))))))),i*=1+Ge[0]*(1+Ge[1]*(1+Ge[2]*(1+Ge[3]*(1+Ge[4]*(1+Ge[5]*(1+Ge[6]*(1+Ge[7]))))))),i=Se.multiplyByScalar(e,i,We);return Se.multiplyByScalar(t,r,n),Se.add(i,n,n)},Se.fastSquad=function(e,t,r,n,a,i){t=Se.fastSlerp(e,t,a,Le),n=Se.fastSlerp(r,n,a,Qe);return Se.fastSlerp(t,n,2*a*(1-a),i)},Se.equals=function(e,t){return e===t||P.defined(e)&&P.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Se.equalsEpsilon=function(e,t,r){return r=P.defaultValue(r,0),e===t||P.defined(e)&&P.defined(t)&&Math.abs(e.x-t.x)<=r&&Math.abs(e.y-t.y)<=r&&Math.abs(e.z-t.z)<=r&&Math.abs(e.w-t.w)<=r},Se.ZERO=Object.freeze(new Se(0,0,0,0)),Se.IDENTITY=Object.freeze(new Se(0,0,0,1)),Se.prototype.clone=function(e){return Se.clone(this,e)},Se.prototype.equals=function(e){return Se.equals(this,e)},Se.prototype.equalsEpsilon=function(e,t){return Se.equalsEpsilon(this,e,t)},Se.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var at=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5}),it=Object.freeze({UTC:0,TAI:1}),ot=new tt,st=[31,28,31,30,31,30,31,31,30,31,30,31];function ut(e,t){return bt.compare(e.julianDate,t.julianDate)}var lt=new nt;function ct(e){lt.julianDate=e;var t=bt.leapSeconds,r=Ke(t,lt,ut),n=t[r=(r=r<0?~r:r)>=t.length?t.length-1:r].offset;0<r&&n<bt.secondsDifference(t[r].julianDate,e)&&(n=t[--r].offset),bt.addSeconds(e,n,e)}function dt(e,t){lt.julianDate=e;var r=bt.leapSeconds,n=Ke(r,lt,ut);if(0===(n=n<0?~n:n))return bt.addSeconds(e,-r[0].offset,t);if(n>=r.length)return bt.addSeconds(e,-r[n-1].offset,t);var a=bt.secondsDifference(r[n].julianDate,e);return 0===a?bt.addSeconds(e,-r[n].offset,t):a<=1?void 0:bt.addSeconds(e,-r[--n].offset,t)}function ft(e,t,r){var n=t/at.SECONDS_PER_DAY|0;return e+=n,(t-=at.SECONDS_PER_DAY*n)<0&&(e--,t+=at.SECONDS_PER_DAY),r.dayNumber=e,r.secondsOfDay=t,r}function pt(e,t,r,n,a,i,o){var s=(t-14)/12|0,e=e+4800+s,r=(1461*e/4|0)+(367*(t-2-12*s)/12|0)-(3*((e+100)/100|0)/4|0)+r-32075;(n-=12)<0&&(n+=24);o=i+(n*at.SECONDS_PER_HOUR+a*at.SECONDS_PER_MINUTE+o*at.SECONDS_PER_MILLISECOND);return 43200<=o&&--r,[r,o]}var ht=/^(\d{4})$/,mt=/^(\d{4})-(\d{2})$/,gt=/^(\d{4})-?(\d{3})$/,yt=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,vt=/^(\d{4})-?(\d{2})-?(\d{2})$/,be=/([Z+\-])?(\d{2})?:?(\d{2})?$/,wt=/^(\d{2})(\.\d+)?/.source+be.source,Ct=/^(\d{2}):?(\d{2})(\.\d+)?/.source+be.source,_t=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+be.source;function bt(e,t,r){this.dayNumber=void 0,this.secondsOfDay=void 0,e=P.defaultValue(e,0),t=P.defaultValue(t,0),r=P.defaultValue(r,it.UTC);var n=0|e;ft(n,t+=(e-n)*at.SECONDS_PER_DAY,this),r===it.UTC&&ct(this)}bt.fromGregorianDate=function(e,t){e=pt(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return P.defined(t)?(ft(e[0],e[1],t),ct(t),t):new bt(e[0],e[1],it.UTC)},bt.fromDate=function(e,t){e=pt(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return P.defined(t)?(ft(e[0],e[1],t),ct(t),t):new bt(e[0],e[1],it.UTC)},bt.fromIso8601=function(e,t){var r,n,a,i,o,s=(e=e.replace(",",".")).split("T"),u=1,l=1,c=0,d=0,f=0,p=0,h=s[0],e=s[1];if(null!==(s=h.match(vt))?(a=+s[1],u=+s[2],l=+s[3]):null!==(s=h.match(mt))?(a=+s[1],u=+s[2]):null!==(s=h.match(ht))?a=+s[1]:(null!==(s=h.match(gt))?(a=+s[1],i=+s[2],n=rt(a)):null!==(s=h.match(yt))&&(a=+s[1],i=7*+s[2]+(+s[3]||0)-new Date(Date.UTC(a,0,4)).getUTCDay()-3),(r=new Date(Date.UTC(a,0,1))).setUTCDate(i),u=r.getUTCMonth()+1,l=r.getUTCDate()),n=rt(a),P.defined(e)){null!==(s=e.match(_t))?(c=+s[1],d=+s[2],f=+s[3],p=1e3*+(s[4]||0),o=5):null!==(s=e.match(Ct))?(c=+s[1],d=+s[2],f=60*+(s[3]||0),o=4):null!==(s=e.match(wt))&&(c=+s[1],d=60*+(s[2]||0),o=3);var m=s[o],g=+s[o+1],y=+(s[o+2]||0);switch(m){case"+":c-=g,d-=y;break;case"-":c+=g,d+=y;break;case"Z":break;default:d+=new Date(Date.UTC(a,u-1,l,c,d)).getTimezoneOffset()}}m=60===f;for(m&&f--;60<=d;)d-=60,c++;for(;24<=c;)c-=24,l++;for(r=n&&2===u?29:st[u-1];r<l;)l-=r,12<++u&&(u-=12,a++),r=n&&2===u?29:st[u-1];for(;d<0;)d+=60,c--;for(;c<0;)c+=24,l--;for(;l<1;)--u<1&&(u+=12,a--),l+=r=n&&2===u?29:st[u-1];p=pt(a,u,l,c,d,f,p);return P.defined(t)?(ft(p[0],p[1],t),ct(t)):t=new bt(p[0],p[1],it.UTC),m&&bt.addSeconds(t,1,t),t},bt.now=function(e){return bt.fromDate(new Date,e)};var xt=new bt(0,0,it.TAI);bt.toGregorianDate=function(e,t){var r=!1,n=dt(e,xt);P.defined(n)||(bt.addSeconds(e,-1,xt),n=dt(xt,xt),r=!0);var a=n.dayNumber,i=n.secondsOfDay;43200<=i&&(a+=1);var o=a+68569|0,s=4*o/146097|0,u=4e3*(1+(o=o-((146097*s+3)/4|0)|0))/1461001|0,e=80*(o=o-(1461*u/4|0)+31|0)/2447|0,n=o-(2447*e/80|0)|0,a=2+e-12*(o=e/11|0)|0,e=100*(s-49)+u+o|0,s=i/at.SECONDS_PER_HOUR|0,u=i-s*at.SECONDS_PER_HOUR,o=u/at.SECONDS_PER_MINUTE|0,i=0|(u-=o*at.SECONDS_PER_MINUTE),u=(u-i)/at.SECONDS_PER_MILLISECOND;return 23<(s+=12)&&(s-=24),r&&(i+=1),P.defined(t)?(t.year=e,t.month=a,t.day=n,t.hour=s,t.minute=o,t.second=i,t.millisecond=u,t.isLeapSecond=r,t):new tt(e,a,n,s,o,i,u,r)},bt.toDate=function(e){var t=bt.toGregorianDate(e,ot),e=t.second;return t.isLeapSecond&&--e,new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,e,t.millisecond))},bt.toIso8601=function(e,t){var r,n=bt.toGregorianDate(e,ot),a=n.year,i=n.month,o=n.day,s=n.hour,u=n.minute,e=n.second,n=n.millisecond;return 1e4===a&&1===i&&1===o&&0===s&&0===u&&0===e&&0===n&&(a=9999,i=12,o=31,s=24),P.defined(t)||0===n?P.defined(t)&&0!==t?(r=(.01*n).toFixed(t).replace(".","").slice(0,t),a.toString().padStart(4,"0")+"-"+i.toString().padStart(2,"0")+"-"+o.toString().padStart(2,"0")+"T"+s.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0")+":"+e.toString().padStart(2,"0")+"."+r+"Z"):a.toString().padStart(4,"0")+"-"+i.toString().padStart(2,"0")+"-"+o.toString().padStart(2,"0")+"T"+s.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0")+":"+e.toString().padStart(2,"0")+"Z":(r=(.01*n).toString().replace(".",""),a.toString().padStart(4,"0")+"-"+i.toString().padStart(2,"0")+"-"+o.toString().padStart(2,"0")+"T"+s.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0")+":"+e.toString().padStart(2,"0")+"."+r+"Z")},bt.clone=function(e,t){if(P.defined(e))return P.defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new bt(e.dayNumber,e.secondsOfDay,it.TAI)},bt.compare=function(e,t){var r=e.dayNumber-t.dayNumber;return 0!=r?r:e.secondsOfDay-t.secondsOfDay},bt.equals=function(e,t){return e===t||P.defined(e)&&P.defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},bt.equalsEpsilon=function(e,t,r){return r=P.defaultValue(r,0),e===t||P.defined(e)&&P.defined(t)&&Math.abs(bt.secondsDifference(e,t))<=r},bt.totalDays=function(e){return e.dayNumber+e.secondsOfDay/at.SECONDS_PER_DAY},bt.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*at.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},bt.daysDifference=function(e,t){return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/at.SECONDS_PER_DAY},bt.computeTaiMinusUtc=function(e){lt.julianDate=e;var t=bt.leapSeconds,e=Ke(t,lt,ut);return e<0&&(e=~e,--e<0&&(e=0)),t[e].offset},bt.addSeconds=function(e,t,r){return ft(e.dayNumber,e.secondsOfDay+t,r)},bt.addMinutes=function(e,t,r){t=e.secondsOfDay+t*at.SECONDS_PER_MINUTE;return ft(e.dayNumber,t,r)},bt.addHours=function(e,t,r){t=e.secondsOfDay+t*at.SECONDS_PER_HOUR;return ft(e.dayNumber,t,r)},bt.addDays=function(e,t,r){return ft(e.dayNumber+t,e.secondsOfDay,r)},bt.lessThan=function(e,t){return bt.compare(e,t)<0},bt.lessThanOrEquals=function(e,t){return bt.compare(e,t)<=0},bt.greaterThan=function(e,t){return 0<bt.compare(e,t)},bt.greaterThanOrEquals=function(e,t){return 0<=bt.compare(e,t)},bt.prototype.clone=function(e){return bt.clone(this,e)},bt.prototype.equals=function(e){return bt.equals(this,e)},bt.prototype.equalsEpsilon=function(e,t){return bt.equalsEpsilon(this,e,t)},bt.prototype.toString=function(){return bt.toIso8601(this)},bt.leapSeconds=[new nt(new bt(2441317,43210,it.TAI),10),new nt(new bt(2441499,43211,it.TAI),11),new nt(new bt(2441683,43212,it.TAI),12),new nt(new bt(2442048,43213,it.TAI),13),new nt(new bt(2442413,43214,it.TAI),14),new nt(new bt(2442778,43215,it.TAI),15),new nt(new bt(2443144,43216,it.TAI),16),new nt(new bt(2443509,43217,it.TAI),17),new nt(new bt(2443874,43218,it.TAI),18),new nt(new bt(2444239,43219,it.TAI),19),new nt(new bt(2444786,43220,it.TAI),20),new nt(new bt(2445151,43221,it.TAI),21),new nt(new bt(2445516,43222,it.TAI),22),new nt(new bt(2446247,43223,it.TAI),23),new nt(new bt(2447161,43224,it.TAI),24),new nt(new bt(2447892,43225,it.TAI),25),new nt(new bt(2448257,43226,it.TAI),26),new nt(new bt(2448804,43227,it.TAI),27),new nt(new bt(2449169,43228,it.TAI),28),new nt(new bt(2449534,43229,it.TAI),29),new nt(new bt(2450083,43230,it.TAI),30),new nt(new bt(2450630,43231,it.TAI),31),new nt(new bt(2451179,43232,it.TAI),32),new nt(new bt(2453736,43233,it.TAI),33),new nt(new bt(2454832,43234,it.TAI),34),new nt(new bt(2456109,43235,it.TAI),35),new nt(new bt(2457204,43236,it.TAI),36),new nt(new bt(2457754,43237,it.TAI),37)];var St=P.createCommonjsModule(function(O,R){!function(e){var t=R&&!R.nodeType&&R,r=O&&!O.nodeType&&O,n="object"==typeof P.commonjsGlobal&&P.commonjsGlobal;n.global!==n&&n.window!==n&&n.self!==n||(e=n);var a,i,g=2147483647,y=36,v=26,o=38,s=700,u=/^xn--/,l=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=y-1,w=Math.floor,C=String.fromCharCode;function _(e){throw new RangeError(d[e])}function p(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function h(e,t){var r=e.split("@"),n="";return 1<r.length&&(n=r[0]+"@",e=r[1]),n+p((e=e.replace(c,".")).split("."),t).join(".")}function b(e){for(var t,r,n=[],a=0,i=e.length;a<i;)55296<=(t=e.charCodeAt(a++))&&t<=56319&&a<i?56320==(64512&(r=e.charCodeAt(a++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),a--):n.push(t);return n}function m(e){return p(e,function(e){var t="";return 65535<e&&(t+=C((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=C(e)}).join("")}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function S(e,t,r){var n=0;for(e=r?w(e/s):e>>1,e+=w(e/t);f*v>>1<e;n+=y)e=w(e/f);return w(n+(f+1)*e/(e+o))}function E(e){var t,r,n,a,i,o,s,u=[],l=e.length,c=0,d=128,f=72,p=e.lastIndexOf("-");for(p<0&&(p=0),r=0;r<p;++r)128<=e.charCodeAt(r)&&_("not-basic"),u.push(e.charCodeAt(r));for(n=0<p?p+1:0;n<l;){for(a=c,i=1,o=y;l<=n&&_("invalid-input"),s=e.charCodeAt(n++),(y<=(s=s-48<10?s-22:s-65<26?s-65:s-97<26?s-97:y)||s>w((g-c)/i))&&_("overflow"),c+=s*i,!(s<(s=o<=f?1:f+v<=o?v:o-f));o+=y)i>w(g/(s=y-s))&&_("overflow"),i*=s;f=S(c-a,t=u.length+1,0==a),w(c/t)>g-d&&_("overflow"),d+=w(c/t),c%=t,u.splice(c++,0,d)}return m(u)}function A(e){for(var t,r,n,a,i,o,s,u,l,c,d=[],f=(e=b(e)).length,p=128,h=72,m=t=0;m<f;++m)(s=e[m])<128&&d.push(C(s));for(r=n=d.length,n&&d.push("-");r<f;){for(a=g,m=0;m<f;++m)p<=(s=e[m])&&s<a&&(a=s);for(a-p>w((g-t)/(u=r+1))&&_("overflow"),t+=(a-p)*u,p=a,m=0;m<f;++m)if((s=e[m])<p&&++t>g&&_("overflow"),s==p){for(i=t,o=y;!(i<(l=o<=h?1:h+v<=o?v:o-h));o+=y)d.push(C(x(l+(c=i-l)%(l=y-l),0))),i=w(c/l);d.push(C(x(i,0))),h=S(t,u,r==n),t=0,++r}++t,++p}return d.join("")}if(a={version:"1.3.2",ucs2:{decode:b,encode:m},decode:E,encode:A,toASCII:function(e){return h(e,function(e){return l.test(e)?"xn--"+A(e):e})},toUnicode:function(e){return h(e,function(e){return u.test(e)?E(e.slice(4).toLowerCase()):e})}},t&&r)if(O.exports==t)r.exports=a;else for(i in a)a.hasOwnProperty(i)&&(t[i]=a[i]);else e.punycode=a}(P.commonjsGlobal)}),Et=P.createCommonjsModule(function(e){var t,r;t=P.commonjsGlobal,r=function(e){var t=e&&e.IPv6;return{best:function(e){var t,r=e.toLowerCase().split(":"),n=r.length,a=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[n-1]&&""===r[n-2]&&r.pop(),-1!==r[(n=r.length)-1].indexOf(".")&&(a=7),t=0;t<n&&""!==r[t];t++);if(t<a)for(r.splice(t,1,"0000");r.length<a;)r.splice(t,0,"0000");for(var i=0;i<a;i++){for(var o=r[i].split(""),s=0;s<3&&("0"===o[0]&&1<o.length);s++)o.splice(0,1);r[i]=o.join("")}for(var u=-1,l=0,c=0,d=-1,f=!1,i=0;i<a;i++)f?"0"===r[i]?c+=1:(f=!1,l<c&&(u=d,l=c)):"0"===r[i]&&(f=!0,d=i,c=1);l<c&&(u=d,l=c),1<l&&r.splice(u,l,"");var n=r.length,p="";for(""===r[0]&&(p=":"),i=0;i<n&&(p+=r[i],i!==n-1);i++)p+=":";return""===r[n-1]&&(p+=":"),p},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}},e.exports?e.exports=r():t.IPv6=r(t)}),At=P.createCommonjsModule(function(e){var t,r;t=P.commonjsGlobal,r=function(e){var t=e&&e.SecondLevelDomains,a={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var r=e.lastIndexOf(".",t-1);if(r<=0||t-1<=r)return!1;var n=a.list[e.slice(t+1)];return!!n&&0<=n.indexOf(" "+e.slice(r+1,t)+" ")},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(0<=e.lastIndexOf(".",t-1))return!1;var r=a.list[e.slice(t+1)];return!!r&&0<=r.indexOf(" "+e.slice(0,t)+" ")},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var r=e.lastIndexOf(".",t-1);if(r<=0||t-1<=r)return null;var n=a.list[e.slice(t+1)];return!n||n.indexOf(" "+e.slice(r+1,t)+" ")<0?null:e.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return a},e.exports?e.exports=r():t.SecondLevelDomains=r(t)}),Ot=P.createCommonjsModule(function(e){var t,r;t=P.commonjsGlobal,r=function(s,t,l,r){var n=r&&r.URI;function h(e,t){var r=1<=arguments.length;if(!(this instanceof h))return r?2<=arguments.length?new h(e,t):new h(e):new h;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}h.version="1.19.7";var e=h.prototype,u=Object.prototype.hasOwnProperty;function o(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function d(e){return"Array"===c(e)}function f(e,t){var r,n,a={};if("RegExp"===c(t))a=null;else if(d(t))for(r=0,n=t.length;r<n;r++)a[t[r]]=!0;else a[t]=!0;for(r=0,n=e.length;r<n;r++)(a&&void 0!==a[e[r]]||!a&&t.test(e[r]))&&(e.splice(r,1),n--,r--);return e}function p(e,t){if(d(t)){for(n=0,a=t.length;n<a;n++)if(!p(e,t[n]))return!1;return!0}for(var r=c(t),n=0,a=e.length;n<a;n++)if("RegExp"===r){if("string"==typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function m(e,t){if(!d(e)||!d(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function g(e){return e.replace(/^\/+|\/+$/g,"")}function a(e){return escape(e)}function i(e){return encodeURIComponent(e).replace(/[!'()*]/g,a).replace(/\*/g,"%2A")}h._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:h.preventInvalidHostname,duplicateQueryParameters:h.duplicateQueryParameters,escapeQuerySpace:h.escapeQuerySpace}},h.preventInvalidHostname=!1,h.duplicateQueryParameters=!1,h.escapeQuerySpace=!0,h.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,h.idn_expression=/[^a-z0-9\._-]/i,h.punycode_expression=/(xn--)/i,h.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,h.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,h.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,h.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},h.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},h.hostProtocols=["http","https"],h.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,h.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},h.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return h.domAttributes[t]}},h.encode=i,h.decode=decodeURIComponent,h.iso8859=function(){h.encode=escape,h.decode=unescape},h.unicode=function(){h.encode=i,h.decode=decodeURIComponent},h.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},h.encodeQuery=function(e,t){e=h.encode(e+"");return(t=void 0===t?h.escapeQuerySpace:t)?e.replace(/%20/g,"+"):e},h.decodeQuery=function(t,e){t+="",void 0===e&&(e=h.escapeQuerySpace);try{return h.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};function y(r,n){return function(t){try{return h[n](t+"").replace(h.characters[r][n].expression,function(e){return h.characters[r][n].map[e]})}catch(e){return t}}}var v,w={encode:"encode",decode:"decode"};for(v in w)h[v+"PathSegment"]=y("pathname",w[v]),h[v+"UrnPathSegment"]=y("urnpath",w[v]);function C(i,o,s){return function(e){for(var t=s?function(e){return h[o](h[s](e))}:h[o],r=(e+"").split(i),n=0,a=r.length;n<a;n++)r[n]=t(r[n]);return r.join(i)}}function _(r){return function(e,t){return void 0===e?this._parts[r]||"":(this._parts[r]=e||null,this.build(!t),this)}}function b(r,n){return function(e,t){return void 0===e?this._parts[r]||"":(null!==e&&(e+="").charAt(0)===n&&(e=e.substring(1)),this._parts[r]=e,this.build(!t),this)}}h.decodePath=C("/","decodePathSegment"),h.decodeUrnPath=C(":","decodeUrnPathSegment"),h.recodePath=C("/","encodePathSegment","decode"),h.recodeUrnPath=C(":","encodeUrnPathSegment","decode"),h.encodeReserved=y("reserved","encode"),h.parse=function(e,t){var r;return t=t||{preventInvalidHostname:h.preventInvalidHostname},-1<(r=e.indexOf("#"))&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),-1<(r=e.indexOf("?"))&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=e.replace(/^(https?|ftp|wss?)?:[/\\]*/,"$1://")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=h.parseAuthority(e,t)):-1<(r=e.indexOf(":"))&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(h.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=h.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},h.parseHost=function(e,t){var r,n,a=(e=(e=e||"").replace(/\\/g,"/")).indexOf("/");return-1===a&&(a=e.length),"["===e.charAt(0)?(r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,a)||null,"/"===t.port&&(t.port=null)):(n=e.indexOf(":"),r=e.indexOf("/"),-1!==(n=e.indexOf(":",n+1))&&(-1===r||n<r)?(t.hostname=e.substring(0,a)||null,t.port=null):(r=e.substring(0,a).split(":"),t.hostname=r[0]||null,t.port=r[1]||null)),t.hostname&&"/"!==e.substring(a).charAt(0)&&(a++,e="/"+e),t.preventInvalidHostname&&h.ensureValidHostname(t.hostname,t.protocol),t.port&&h.ensureValidPort(t.port),e.substring(a)||"/"},h.parseAuthority=function(e,t){return e=h.parseUserinfo(e,t),h.parseHost(e,t)},h.parseUserinfo=function(e,t){var r=e,n=(e=-1!==e.indexOf("\\")?e.replace(/\\/g,"/"):e).indexOf("/"),a=e.lastIndexOf("@",-1<n?n:e.length-1);return-1<a&&(-1===n||a<n)?(n=e.substring(0,a).split(":"),t.username=n[0]?h.decode(n[0]):null,n.shift(),t.password=n[0]?h.decode(n.join(":")):null,e=r.substring(a+1)):(t.username=null,t.password=null),e},h.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,a={},i=e.split("&"),o=i.length,s=0;s<o;s++)n=i[s].split("="),r=h.decodeQuery(n.shift(),t),n=n.length?h.decodeQuery(n.join("="),t):null,"__proto__"!==r&&(u.call(a,r)?("string"!=typeof a[r]&&null!==a[r]||(a[r]=[a[r]]),a[r].push(n)):a[r]=n);return a},h.build=function(e){var t="",r=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",r=!0),t+=h.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},h.buildHost=function(e){var t="";return e.hostname?(h.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},h.buildAuthority=function(e){return h.buildUserinfo(e)+h.buildHost(e)},h.buildUserinfo=function(e){var t="";return e.username&&(t+=h.encode(e.username)),e.password&&(t+=":"+h.encode(e.password)),t&&(t+="@"),t},h.buildQuery=function(e,t,r){var n,a,i,o,s="";for(a in e)if("__proto__"!==a&&u.call(e,a))if(d(e[a]))for(n={},i=0,o=e[a].length;i<o;i++)void 0!==e[a][i]&&void 0===n[e[a][i]+""]&&(s+="&"+h.buildQueryParameter(a,e[a][i],r),!0!==t&&(n[e[a][i]+""]=!0));else void 0!==e[a]&&(s+="&"+h.buildQueryParameter(a,e[a],r));return s.substring(1)},h.buildQueryParameter=function(e,t,r){return h.encodeQuery(e,r)+(null!==t?"="+h.encodeQuery(t,r):"")},h.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)u.call(t,n)&&h.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");void 0!==e[t]?("string"==typeof e[t]&&(e[t]=[e[t]]),d(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)):e[t]=r}},h.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)u.call(t,n)&&h.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},h.removeQuery=function(e,t,r){var n,a,i;if(d(t))for(n=0,a=t.length;n<a;n++)e[t[n]]=void 0;else if("RegExp"===c(t))for(i in e)t.test(i)&&(e[i]=void 0);else if("object"==typeof t)for(i in t)u.call(t,i)&&h.removeQuery(e,i,t[i]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===c(r)?!d(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=f(e[t],r):e[t]!==String(r)||d(r)&&1!==r.length?d(e[t])&&(e[t]=f(e[t],r)):e[t]=void 0:e[t]=void 0}},h.hasQuery=function(e,t,r,n){switch(c(t)){case"String":break;case"RegExp":for(var a in e)if(u.call(e,a)&&t.test(a)&&(void 0===r||h.hasQuery(e,a,r)))return!0;return!1;case"Object":for(var i in t)if(u.call(t,i)&&!h.hasQuery(e,i,t[i]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(r)){case"Undefined":return t in e;case"Boolean":return r===Boolean(d(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return d(e[t])?(n?p:m)(e[t],r):!1;case"RegExp":return d(e[t])?!!n&&p(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return d(e[t])?!!n&&p(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},h.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var a=new h(arguments[n]);e.push(a);for(var i=a.segment(),o=0;o<i.length;o++)"string"==typeof i[o]&&t.push(i[o]),i[o]&&r++}if(!t.length||!r)return new h("");var s=new h("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||s.path("/"+s.path()),s.normalize()},h.commonPath=function(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return n<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(n)&&"/"===t.charAt(n)||(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},h.withinString=function(e,t,r){var n=(r=r||{}).start||h.findUri.start,a=r.end||h.findUri.end,i=r.trim||h.findUri.trim,o=r.parens||h.findUri.parens,s=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var u=n.exec(e);if(!u)break;var l=u.index;if(r.ignoreHtml){var c=e.slice(Math.max(l-3,0),l);if(c&&s.test(c))continue}for(var c=l+e.slice(l).search(a),d=e.slice(l,c),f=-1;;){var p=o.exec(d);if(!p)break;p=p.index+p[0].length,f=Math.max(f,p)}(d=-1<f?d.slice(0,f)+d.slice(f).replace(i,""):d.replace(i,"")).length<=u[0].length||r.ignore&&r.ignore.test(d)||(void 0!==(u=t(d,l,c=l+d.length,e))?(u=String(u),e=e.slice(0,l)+u+e.slice(c),n.lastIndex=l+u.length):n.lastIndex=c)}return n.lastIndex=0,e},h.ensureValidHostname=function(e,t){var r=!!e,n=!1;if((n=!!t?p(h.hostProtocols,t):n)&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+t);if(e&&e.match(h.invalid_hostname_characters)){if(!s)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(s.toASCII(e).match(h.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},h.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&0<t&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},h.noConflict=function(e){if(e){e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=n),this},e.build=function(e){return!0===e?this._deferred_build=!0:void 0!==e&&!this._deferred_build||(this._string=h.build(this._parts),this._deferred_build=!1),this},e.clone=function(){return new h(this)},e.valueOf=e.toString=function(){return this.build(!1)._string},e.protocol=_("protocol"),e.username=_("username"),e.password=_("password"),e.hostname=_("hostname"),e.port=_("port"),e.query=b("query","?"),e.fragment=b("fragment","#"),e.search=function(e,t){t=this.query(e,t);return"string"==typeof t&&t.length?"?"+t:t},e.hash=function(e,t){t=this.fragment(e,t);return"string"==typeof t&&t.length?"#"+t:t},e.pathname=function(e,t){if(void 0!==e&&!0!==e)return this._parts.urn?this._parts.path=e?h.recodeUrnPath(e):"":this._parts.path=e?h.recodePath(e):"/",this.build(!t),this;t=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?h.decodeUrnPath:h.decodePath)(t):t},e.path=e.pathname,e.href=function(e,t){if(void 0===e)return this.toString();this._string="",this._parts=h._parts();var r=e instanceof h,n="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[h.getDomAttribute(e)]||"",n=!1),"string"==typeof(e=!r&&n&&void 0!==e.pathname?e.toString():e)||e instanceof String)this._parts=h.parse(String(e),this._parts);else{if(!r&&!n)throw new TypeError("invalid input");var a=r?e._parts:e;for(var i in a)"query"!==i&&u.call(this._parts,i)&&(this._parts[i]=a[i]);a.query&&this.query(a.query,!1)}return this.build(!t),this},e.is=function(e){var t=!1,r=!1,n=!1,a=!1,i=!1,o=!1,s=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,r=h.ip4_expression.test(this._parts.hostname),n=h.ip6_expression.test(this._parts.hostname),i=(a=!(t=r||n))&&l&&l.has(this._parts.hostname),o=a&&h.idn_expression.test(this._parts.hostname),s=a&&h.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return a;case"sld":return i;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return n;case"idn":return o;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return s}return null};var x=e.protocol,S=e.port,E=e.hostname;e.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(h.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)},e.scheme=e.protocol,e.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(e=0===e?null:e)&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),h.ensureValidPort(e)),S.call(this,e,t))},e.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==h.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&h.ensureValidHostname(e,this._parts.protocol)}return E.call(this,e,t)},e.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}e=h(e);return this.protocol(e.protocol()).authority(e.authority()).build(!t),this},e.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?h.buildHost(this._parts):"";if("/"!==h.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},e.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?h.buildAuthority(this._parts):"";if("/"!==h.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},e.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e)return"@"!==e[e.length-1]&&(e+="@"),h.parseUserinfo(e,this._parts),this.build(!t),this;t=h.buildUserinfo(this._parts);return t&&t.substring(0,t.length-1)},e.resource=function(e,t){return void 0===e?this.path()+this.search()+this.hash():(e=h.parse(e),this._parts.path=e.path,this._parts.query=e.query,this._parts.fragment=e.fragment,this.build(!t),this)},e.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}r=this._parts.hostname.length-this.domain().length,r=this._parts.hostname.substring(0,r),r=new RegExp("^"+o(r));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&h.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(r,e),this.build(!t),this},e.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;r=this._parts.hostname.length-this.tld(t).length-1,r=this._parts.hostname.lastIndexOf(".",r-1)+1;return this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return h.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP")?this._parts.hostname=e:(r=new RegExp(o(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(r,e)),this.build(!t),this},e.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),r=this._parts.hostname.substring(r+1);return!0!==t&&l&&l.list[r.toLowerCase()]?l.get(this._parts.hostname)||r:r}var n;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!l||!l.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');n=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");n=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e)}return this.build(!t),this},e.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?h.decodePath(r):r}r=this._parts.path.length-this.filename().length,r=this._parts.path.substring(0,r),r=new RegExp("^"+o(r));return this.is("relative")||"/"!==(e=e||"/").charAt(0)&&(e="/"+e),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=h.recodePath(e),this._parts.path=this._parts.path.replace(r,e),this.build(!t),this},e.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?h.decodePathSegment(n):n}r=!1;(e="/"===e.charAt(0)?e.substring(1):e).match(/\.?\//)&&(r=!0);n=new RegExp(o(this.filename())+"$");return e=h.recodePath(e),this._parts.path=this._parts.path.replace(n,e),r?this.normalizePath(t):this.build(!t),this},e.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this.filename(),n=r.lastIndexOf(".");return-1===n?"":(i=r.substring(n+1),i=/^[a-z0-9%]+$/i.test(i)?i:"",e?h.decodePathSegment(i):i)}"."===e.charAt(0)&&(e=e.substring(1));var a,i=this.suffix();if(i)a=e?new RegExp(o(i)+"$"):new RegExp(o("."+i)+"$");else{if(!e)return this;this._parts.path+="."+h.recodePath(e)}return a&&(e=h.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},e.segment=function(e,t,r){var n=this._parts.urn?":":"/",a=this.path(),i="/"===a.substring(0,1),o=a.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&o.shift(),e<0&&(e=Math.max(o.length+e,0)),void 0===t)return void 0===e?o:o[e];if(null===e||void 0===o[e])if(d(t))for(var o=[],s=0,u=t.length;s<u;s++)(t[s].length||o.length&&o[o.length-1].length)&&(o.length&&!o[o.length-1].length&&o.pop(),o.push(g(t[s])));else!t&&"string"!=typeof t||(t=g(t),""===o[o.length-1]?o[o.length-1]=t:o.push(t));else t?o[e]=g(t):o.splice(e,1);return i&&o.unshift(""),this.path(o.join(n),r)},e.segmentCoded=function(e,t,r){var n,a,i;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(d(n=this.segment(e,t,r)))for(a=0,i=n.length;a<i;a++)n[a]=h.decode(n[a]);else n=void 0!==n?h.decode(n):void 0;return n}if(d(t))for(a=0,i=t.length;a<i;a++)t[a]=h.encode(t[a]);else t="string"==typeof t||t instanceof String?h.encode(t):t;return this.segment(e,t,r)};var A=e.query;return e.query=function(e,t){if(!0===e)return h.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"!=typeof e)return void 0!==e&&"string"!=typeof e?(this._parts.query=h.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):A.call(this,e,t);var r=h.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=e.call(this,r);return this._parts.query=h.buildQuery(e||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this},e.setQuery=function(e,t,r){var n=h.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var a in e)u.call(e,a)&&(n[a]=e[a])}return this._parts.query=h.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!(r="string"!=typeof e?t:r)),this},e.addQuery=function(e,t,r){var n=h.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return h.addQuery(n,e,void 0===t?null:t),this._parts.query=h.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!(r="string"!=typeof e?t:r)),this},e.removeQuery=function(e,t,r){var n=h.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return h.removeQuery(n,e,t),this._parts.query=h.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!(r="string"!=typeof e?t:r)),this},e.hasQuery=function(e,t,r){var n=h.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return h.hasQuery(n,e,t,r)},e.setSearch=e.setQuery,e.addSearch=e.addQuery,e.removeSearch=e.removeQuery,e.hasSearch=e.hasQuery,e.normalize=function(){return(this._parts.urn?this.normalizeProtocol(!1):this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1)).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},e.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},e.normalizeHostname=function(e){return this._parts.hostname&&(this.is("IDN")&&s?this._parts.hostname=s.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!e)),this},e.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===h.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},e.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=h.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,a,i="";for("/"!==(r=h.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(i=(i=r.substring(1).match(/^(\.\.\/)+/)||"")&&i[0]);;){if(-1===(n=r.search(/\/\.\.(\/|$)/)))break;0!==n?(-1===(a=r.substring(0,n).lastIndexOf("/"))&&(a=n),r=r.substring(0,a)+r.substring(n+3)):r=r.substring(3)}return t&&this.is("relative")&&(r=i+r.substring(1)),this._parts.path=r,this.build(!e),this},e.normalizePathname=e.normalizePath,e.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(h.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},e.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},e.normalizeSearch=e.normalizeQuery,e.normalizeHash=e.normalizeFragment,e.iso8859=function(){var e=h.encode,t=h.decode;h.encode=escape,h.decode=decodeURIComponent;try{this.normalize()}finally{h.encode=e,h.decode=t}return this},e.unicode=function(){var e=h.encode,t=h.decode;h.encode=i,h.decode=unescape;try{this.normalize()}finally{h.encode=e,h.decode=t}return this},e.readable=function(){var e=this.clone();e.username("").password("").normalize();var t="";if(e._parts.protocol&&(t+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&s?(t+=s.toUnicode(e._parts.hostname),e._parts.port&&(t+=":"+e._parts.port)):t+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(t+="/"),t+=e.path(!0),e._parts.query){for(var r="",n=0,a=e._parts.query.split("&"),i=a.length;n<i;n++){var o=(a[n]||"").split("=");r+="&"+h.decodeQuery(o[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==o[1]&&(r+="="+h.decodeQuery(o[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}t+="?"+r.substring(1)}return t+=h.decodeQuery(e.hash(),!0)},e.absoluteTo=function(e){var t,r,n,a=this.clone(),i=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof h||(e=new h(e)),a._parts.protocol)return a;if(a._parts.protocol=e._parts.protocol,this._parts.hostname)return a;for(r=0;n=i[r];r++)a._parts[n]=e._parts[n];return a._parts.path?(".."===a._parts.path.substring(-2)&&(a._parts.path+="/"),"/"!==a.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),a._parts.path=(t?t+"/":"")+a._parts.path,a.normalizePath())):(a._parts.path=e._parts.path,a._parts.query||(a._parts.query=e._parts.query)),a.build(),a},e.relativeTo=function(e){var t,r,n=this.clone().normalize();if(n._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new h(e).normalize(),t=n._parts,a=e._parts,r=n.path(),e=e.path(),"/"!==r.charAt(0))throw new Error("URI is already relative");if("/"!==e.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===a.protocol&&(t.protocol=null),t.username!==a.username||t.password!==a.password)return n.build();if(null!==t.protocol||null!==t.username||null!==t.password)return n.build();if(t.hostname!==a.hostname||t.port!==a.port)return n.build();if(t.hostname=null,t.port=null,r===e)return t.path="",n.build();if(!(e=h.commonPath(r,e)))return n.build();var a=a.path.substring(e.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=a+t.path.substring(e.length)||"./",n.build()},e.equals=function(e){var t,r,n,a,i=this.clone(),o=new h(e),s={};if(i.normalize(),o.normalize(),i.toString()===o.toString())return!0;if(n=i.query(),e=o.query(),i.query(""),o.query(""),i.toString()!==o.toString())return!1;if(n.length!==e.length)return!1;for(a in t=h.parseQuery(n,this._parts.escapeQuerySpace),r=h.parseQuery(e,this._parts.escapeQuerySpace),t)if(u.call(t,a)){if(d(t[a])){if(!m(t[a],r[a]))return!1}else if(t[a]!==r[a])return!1;s[a]=!0}for(a in r)if(u.call(r,a)&&!s[a])return!1;return!0},e.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},e.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},e.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},h},e.exports?e.exports=r(St,Et,At):t.URI=r(t.punycode,t.IPv6,t.SecondLevelDomains,t)});function Rt(e,t){if(null===e||"object"!=typeof e)return e;t=P.defaultValue(t,!1);var r,n,a=new e.constructor;for(r in e)e.hasOwnProperty(r)&&(n=e[r],t&&(n=Rt(n,t)),a[r]=n);return a}function It(e,t){var r;return"undefined"!=typeof document&&(r=document),It._implementation(e,t,r)}It._implementation=function(e,t,r){if(!P.defined(t)){if(void 0===r)return e;t=P.defaultValue(r.baseURI,r.location.href)}e=new Ot(e);return(""!==e.scheme()?e:e.absoluteTo(t)).toString()};var Pt,Tt=/^blob:/i;function qt(e){return Tt.test(e)}var zt=/^data:/i;function Mt(e){return zt.test(e)}var Dt=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),Ut=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3});function kt(e){e=P.defaultValue(e,P.defaultValue.EMPTY_OBJECT);var t=P.defaultValue(e.throttleByServer,!1),r=P.defaultValue(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=P.defaultValue(e.priority,0),this.throttle=r,this.throttleByServer=t,this.type=P.defaultValue(e.type,Ut.OTHER),this.serverKey=void 0,this.state=Dt.UNISSUED,this.deferred=void 0,this.cancelled=!1}function Ft(e,t,r){this.statusCode=e,this.response=t,this.responseHeaders=r,"string"==typeof this.responseHeaders&&(this.responseHeaders=function(e){var t={};if(!e)return t;for(var r=e.split("\r\n"),n=0;n<r.length;++n){var a,i=r[n],o=i.indexOf(": ");0<o&&(a=i.substring(0,o),o=i.substring(o+2),t[a]=o)}return t}(this.responseHeaders))}function Nt(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function jt(e,t){return t-e}function Bt(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function Vt(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}kt.prototype.cancel=function(){this.cancelled=!0},kt.prototype.clone=function(e){return P.defined(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new kt(this)},Ft.prototype.toString=function(){var e="Request has failed.";return P.defined(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(Nt.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),Nt.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);var r=this;return function(){r.removeEventListener(e,t)}},Nt.prototype.removeEventListener=function(e,t){for(var r=this._listeners,n=this._scopes,a=-1,i=0;i<r.length;i++)if(r[i]===e&&n[i]===t){a=i;break}return-1!==a&&(this._insideRaiseEvent?(this._toRemove.push(a),r[a]=void 0,n[a]=void 0):(r.splice(a,1),n.splice(a,1)),!0)},Nt.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;for(var e=this._listeners,t=this._scopes,r=e.length,n=0;n<r;n++){var a=e[n];P.defined(a)&&e[n].apply(t[n],arguments)}var i=this._toRemove;if(0<(r=i.length)){for(i.sort(jt),n=0;n<r;n++){var o=i[n];e.splice(o,1),t.splice(o,1)}i.length=0}this._insideRaiseEvent=!1},Object.defineProperties(Bt.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){var t=this._length;if(e<t){for(var r=this._array,n=e;n<t;++n)r[n]=void 0;this._length=e,r.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}}),Bt.prototype.reserve=function(e){e=P.defaultValue(e,this._length),this._array.length=e},Bt.prototype.heapify=function(e){e=P.defaultValue(e,0);for(var t=this._length,r=this._comparator,n=this._array,a=-1,i=!0;i;){var o=2*(e+1),s=o-1,a=s<t&&r(n[s],n[e])<0?s:e;(a=o<t&&r(n[o],n[a])<0?o:a)!==e?(Vt(n,a,e),e=a):i=!1}},Bt.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);0<=t;--t)this.heapify(t)},Bt.prototype.insert=function(e){var t,r=this._array,n=this._comparator,a=this._maximumLength,i=this._length++;for(i<r.length?r[i]=e:r.push(e);0!==i;){var o=Math.floor((i-1)/2);if(!(n(r[i],r[o])<0))break;Vt(r,i,o),i=o}return P.defined(a)&&this._length>a&&(t=r[a],this._length=a),t},Bt.prototype.pop=function(e){if(e=P.defaultValue(e,0),0!==this._length){var t=this._array,r=t[e];return Vt(t,e,--this._length),this.heapify(e),t[this._length]=void 0,r}};var Lt={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},Qt=20,Wt=new Bt({comparator:function(e,t){return e.priority-t.priority}});Wt.maximumLength=Qt,Wt.reserve(Qt);var Ht=[],Yt={},Zt="undefined"!=typeof document?new Ot(document.location.href):new Ot,Gt=new Nt;function Jt(){}function $t(e){P.defined(e.priorityFunction)&&(e.priority=e.priorityFunction())}function Xt(e){return e.state===Dt.UNISSUED&&(e.state=Dt.ISSUED,e.deferred=P.when.defer()),e.deferred.promise}function Kt(e){var t,r,n=Xt(e);return e.state=Dt.ACTIVE,Ht.push(e),++Lt.numberOfActiveRequests,++Lt.numberOfActiveRequestsEver,++Yt[e.serverKey],e.requestFunction().then((r=e,function(e){var t;r.state!==Dt.CANCELLED&&(t=r.deferred,--Lt.numberOfActiveRequests,--Yt[r.serverKey],Gt.raiseEvent(),r.state=Dt.RECEIVED,r.deferred=void 0,t.resolve(e))})).otherwise((t=e,function(e){t.state!==Dt.CANCELLED&&(++Lt.numberOfFailedRequests,--Lt.numberOfActiveRequests,--Yt[t.serverKey],Gt.raiseEvent(e),t.state=Dt.FAILED,t.deferred.reject(e))})),n}function er(e){var t,r=e.state===Dt.ACTIVE;e.state=Dt.CANCELLED,++Lt.numberOfCancelledRequests,P.defined(e.deferred)&&(t=e.deferred,e.deferred=void 0,t.reject()),r&&(--Lt.numberOfActiveRequests,--Yt[e.serverKey],++Lt.numberOfCancelledActiveRequests),P.defined(e.cancelFunction)&&e.cancelFunction()}Jt.maximumRequests=50,Jt.maximumRequestsPerServer=6,Jt.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},Jt.throttleRequests=!0,Jt.debugShowStatistics=!1,Jt.requestCompletedEvent=Gt,Object.defineProperties(Jt,{statistics:{get:function(){return Lt}},priorityHeapLength:{get:function(){return Qt},set:function(e){if(e<Qt)for(;Wt.length>e;)er(Wt.pop());Qt=e,Wt.maximumLength=e,Wt.reserve(e)}}}),Jt.serverHasOpenSlots=function(e,t){t=P.defaultValue(t,1);var r=P.defaultValue(Jt.requestsByServer[e],Jt.maximumRequestsPerServer);return Yt[e]+t<=r},Jt.heapHasOpenSlots=function(e){return Wt.length+e<=Qt},Jt.update=function(){for(var e,t=0,r=Ht.length,n=0;n<r;++n)(e=Ht[n]).cancelled&&er(e),e.state===Dt.ACTIVE?0<t&&(Ht[n-t]=e):++t;Ht.length-=t;var a=Wt.internalArray,i=Wt.length;for(n=0;n<i;++n)$t(a[n]);Wt.resort();for(var o=Math.max(Jt.maximumRequests-Ht.length,0),s=0;s<o&&0<Wt.length;)!(e=Wt.pop()).cancelled&&(!e.throttleByServer||Jt.serverHasOpenSlots(e.serverKey))?(Kt(e),++s):er(e);Jt.debugShowStatistics&&(0===Lt.numberOfActiveRequests&&0<Lt.lastNumberOfActiveRequests&&(0<Lt.numberOfAttemptedRequests&&(console.log("Number of attempted requests: "+Lt.numberOfAttemptedRequests),Lt.numberOfAttemptedRequests=0),0<Lt.numberOfCancelledRequests&&(console.log("Number of cancelled requests: "+Lt.numberOfCancelledRequests),Lt.numberOfCancelledRequests=0),0<Lt.numberOfCancelledActiveRequests&&(console.log("Number of cancelled active requests: "+Lt.numberOfCancelledActiveRequests),Lt.numberOfCancelledActiveRequests=0),0<Lt.numberOfFailedRequests&&(console.log("Number of failed requests: "+Lt.numberOfFailedRequests),Lt.numberOfFailedRequests=0)),Lt.lastNumberOfActiveRequests=Lt.numberOfActiveRequests)},Jt.getServerKey=function(e){var t=new Ot(e);""===t.scheme()&&(t=new Ot(e).absoluteTo(Zt)).normalize();e=t.authority();/:/.test(e)||(e=e+":"+("https"===t.scheme()?"443":"80"));t=Yt[e];return P.defined(t)||(Yt[e]=0),e},Jt.request=function(e){if(Mt(e.url)||qt(e.url))return Gt.raiseEvent(),e.state=Dt.RECEIVED,e.requestFunction();if(++Lt.numberOfAttemptedRequests,P.defined(e.serverKey)||(e.serverKey=Jt.getServerKey(e.url)),!Jt.throttleRequests||!e.throttleByServer||Jt.serverHasOpenSlots(e.serverKey)){if(!Jt.throttleRequests||!e.throttle)return Kt(e);if(!(Ht.length>=Jt.maximumRequests)){$t(e);var t=Wt.insert(e);if(P.defined(t)){if(t===e)return;er(t)}return Xt(e)}}},Jt.clearForSpecs=function(){for(;0<Wt.length;)er(Wt.pop());for(var e=Ht.length,t=0;t<e;++t)er(Ht[t]);Ht.length=0,Yt={},Lt.numberOfAttemptedRequests=0,Lt.numberOfActiveRequests=0,Lt.numberOfCancelledRequests=0,Lt.numberOfCancelledActiveRequests=0,Lt.numberOfFailedRequests=0,Lt.numberOfActiveRequestsEver=0,Lt.lastNumberOfActiveRequests=0},Jt.numberOfActiveRequestsByServer=function(e){return Yt[e]},Jt.requestHeap=Wt;var tr={},rr={};tr.add=function(e,t){t=e.toLowerCase()+":"+t;P.defined(rr[t])||(rr[t]=!0)},tr.remove=function(e,t){t=e.toLowerCase()+":"+t;P.defined(rr[t])&&delete rr[t]},tr.contains=function(e){e=function(e){var t=new Ot(e);if(t.normalize(),0!==(e=t.authority()).length){if(t.authority(e),-1===(e=-1!==e.indexOf("@")?e.split("@")[1]:e).indexOf(":")){t=t.scheme();if("http"===(t=0===t.length?(t=window.location.protocol).substring(0,t.length-1):t))e+=":80";else{if("https"!==t)return;e+=":443"}}return e}}(e);return!(!P.defined(e)||!P.defined(rr[e]))},tr.clear=function(){rr={}};var nr,ar=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),(e.responseType="blob")===e.responseType}catch(e){return!1}}();function ir(e,t,r,n){var a,i=e.query();if(0===i.length)return 1;i=-1===i.indexOf("=")?((a={})[i]=void 0,a):function(e){var t={};if(""===e)return t;for(var r=e.replace(/\+/g,"%20").split(/[&;]/),n=0,a=r.length;n<a;++n){var i=r[n].split("="),o=decodeURIComponent(i[0]),s=i[1],s=P.defined(s)?decodeURIComponent(s):"",i=t[o];"string"==typeof i?t[o]=[i,s]:Array.isArray(i)?i.push(s):t[o]=s}return t}(i),t._queryParameters=r?lr(i,t._queryParameters,n):i,e.search("")}function or(e,t){var r=t._queryParameters,t=Object.keys(r);1!==t.length||P.defined(r[t[0]])?e.search(function(e){var t,r="";for(t in e)if(e.hasOwnProperty(t)){var n=e[t],a=encodeURIComponent(t)+"=";if(Array.isArray(n))for(var i=0,o=n.length;i<o;++i)r+=a+encodeURIComponent(n[i])+"&";else r+=a+encodeURIComponent(n)+"&"}return r=r.slice(0,-1)}(r)):e.search(t[0])}function sr(e,t){return P.defined(e)?P.defined(e.clone)?e.clone():Rt(e):t}function ur(e){if(e.state===Dt.ISSUED||e.state===Dt.ACTIVE)throw new v.RuntimeError("The Resource is already being fetched.");e.state=Dt.UNISSUED,e.deferred=void 0}function lr(e,t,r){if(!r)return d.combine(e,t);var n,a,i,o=Rt(e,!0);for(n in t)t.hasOwnProperty(n)&&(a=o[n],i=t[n],P.defined(a)?(Array.isArray(a)||(a=o[n]=[a]),o[n]=a.concat(i)):o[n]=Array.isArray(i)?i.slice():i);return o}function cr(e){"string"==typeof(e=P.defaultValue(e,P.defaultValue.EMPTY_OBJECT))&&(e={url:e}),this._url=void 0,this._templateValues=sr(e.templateValues,{}),this._queryParameters=sr(e.queryParameters,{}),this.headers=sr(e.headers,{}),this.request=P.defaultValue(e.request,new kt),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=P.defaultValue(e.retryAttempts,0),this._retryCount=0;e=new Ot(e.url);ir(e,this,!0,!0),e.fragment(""),this._url=e.toString()}function dr(e){var r=e.resource,n=e.flipY,a=e.skipColorSpaceConversion,i=e.preferImageBitmap,o=r.request;o.url=r.url,o.requestFunction=function(){var e=!1;r.isDataUri||r.isBlobUri||(e=r.isCrossOriginUrl);var t=P.when.defer();return cr._Implementations.createImage(o,e,t,n,a,i),t.promise};e=Jt.request(o);if(P.defined(e))return e.otherwise(function(t){return o.state!==Dt.FAILED?P.when.reject(t):r.retryOnError(t).then(function(e){return e?(o.state=Dt.UNISSUED,o.deferred=void 0,dr({resource:r,flipY:n,skipColorSpaceConversion:a,preferImageBitmap:i})):P.when.reject(t)})})}cr.createIfNeeded=function(e){return e instanceof cr?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new cr({url:e})},cr.supportsImageBitmapOptions=function(){if(P.defined(nr))return nr;if("function"!=typeof createImageBitmap)return nr=P.when.resolve(!1);return nr=cr.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then(function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(e){return!0}).otherwise(function(){return!1})},Object.defineProperties(cr,{isBlobSupported:{get:function(){return ar}}}),Object.defineProperties(cr.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){e=new Ot(e);ir(e,this,!1),e.fragment(""),this._url=e.toString()}},extension:{get:function(){return e=this._url,(t=new Ot(e)).normalize(),e=-1===(t=(e=-1!==(t=(e=t.path()).lastIndexOf("/"))?e.substr(t+1):e).lastIndexOf("."))?"":e.substr(t+1);var e,t}},isDataUri:{get:function(){return Mt(this._url)}},isBlobUri:{get:function(){return qt(this._url)}},isCrossOriginUrl:{get:function(){return function(e){(Pt=!P.defined(Pt)?document.createElement("a"):Pt).href=window.location.href;var t=Pt.host,r=Pt.protocol;return Pt.href=e,Pt.href=Pt.href,r!==Pt.protocol||t!==Pt.host}(this._url)}},hasHeaders:{get:function(){return 0<Object.keys(this.headers).length}}}),cr.prototype.toString=function(){return this.getUrlComponent(!0,!0)},cr.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var r=new Ot(this._url);e&&or(r,this);var r=r.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),n=this._templateValues,r=r.replace(/{(.*?)}/g,function(e,t){t=n[t];return P.defined(t)?encodeURIComponent(t):e});return r=t&&P.defined(this.proxy)?this.proxy.getURL(r):r},cr.prototype.setQueryParameters=function(e,t){this._queryParameters=t?lr(this._queryParameters,e,!1):lr(e,this._queryParameters,!1)},cr.prototype.appendQueryParameters=function(e){this._queryParameters=lr(e,this._queryParameters,!0)},cr.prototype.setTemplateValues=function(e,t){this._templateValues=t?d.combine(this._templateValues,e):d.combine(e,this._templateValues)},cr.prototype.getDerivedResource=function(e){var t,r=this.clone();return r._retryCount=0,P.defined(e.url)&&(ir(t=new Ot(e.url),r,!0,P.defaultValue(e.preserveQueryParameters,!1)),t.fragment(""),""!==t.scheme()?r._url=t.toString():r._url=t.absoluteTo(new Ot(It(this._url))).toString()),P.defined(e.queryParameters)&&(r._queryParameters=d.combine(e.queryParameters,r._queryParameters)),P.defined(e.templateValues)&&(r._templateValues=d.combine(e.templateValues,r.templateValues)),P.defined(e.headers)&&(r.headers=d.combine(e.headers,r.headers)),P.defined(e.proxy)&&(r.proxy=e.proxy),P.defined(e.request)&&(r.request=e.request),P.defined(e.retryCallback)&&(r.retryCallback=e.retryCallback),P.defined(e.retryAttempts)&&(r.retryAttempts=e.retryAttempts),r},cr.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return P.when(!1);var r=this;return P.when(t(this,e)).then(function(e){return++r._retryCount,e})},cr.prototype.clone=function(e){return(e=!P.defined(e)?new cr({url:this._url}):e)._url=this._url,e._queryParameters=Rt(this._queryParameters),e._templateValues=Rt(this._templateValues),e.headers=Rt(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},cr.prototype.getBaseUri=function(e){return t=this.getUrlComponent(e),r=e,n="",-1!==(e=t.lastIndexOf("/"))&&(n=t.substring(0,e+1)),r&&(0!==(t=new Ot(t)).query().length&&(n+="?"+t.query()),0!==t.fragment().length&&(n+="#"+t.fragment())),n;var t,r,n},cr.prototype.appendForwardSlash=function(){var e;this._url=(0!==(e=this._url).length&&"/"===e[e.length-1]||(e+="/"),e)},cr.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},cr.fetchArrayBuffer=function(e){return new cr(e).fetchArrayBuffer()},cr.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},cr.fetchBlob=function(e){return new cr(e).fetchBlob()},cr.prototype.fetchImage=function(e){e=P.defaultValue(e,P.defaultValue.EMPTY_OBJECT);var t=P.defaultValue(e.preferImageBitmap,!1),r=P.defaultValue(e.preferBlob,!1),n=P.defaultValue(e.flipY,!1),a=P.defaultValue(e.skipColorSpaceConversion,!1);if(ur(this.request),!ar||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!r)return dr({resource:this,flipY:n,skipColorSpaceConversion:a,preferImageBitmap:t});var i,o,s,u=this.fetchBlob();return P.defined(u)?cr.supportsImageBitmapOptions().then(function(e){return i=e&&t,u}).then(function(e){if(P.defined(e)){if(s=e,i)return cr.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1,skipColorSpaceConversion:a});e=window.URL.createObjectURL(e);return dr({resource:o=new cr({url:e}),flipY:n,skipColorSpaceConversion:a,preferImageBitmap:!1})}}).then(function(e){if(P.defined(e))return e.blob=s,i||window.URL.revokeObjectURL(o.url),e}).otherwise(function(e){return P.defined(o)&&window.URL.revokeObjectURL(o.url),e.blob=s,P.when.reject(e)}):void 0},cr.fetchImage=function(e){return new cr(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},cr.prototype.fetchText=function(){return this.fetch({responseType:"text"})},cr.fetchText=function(e){return new cr(e).fetchText()},cr.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(P.defined(e))return e.then(function(e){if(P.defined(e))return JSON.parse(e)})},cr.fetchJson=function(e){return new cr(e).fetchJson()},cr.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},cr.fetchXML=function(e){return new cr(e).fetchXML()},cr.prototype.fetchJsonp=function(e){var t;for(e=P.defaultValue(e,"callback"),ur(this.request);t="loadJsonp"+c.CesiumMath.nextRandomNumber().toString().substring(2,8),P.defined(window[t]););return function r(n,a,i){var e={};e[a]=i;n.setQueryParameters(e);var o=n.request;o.url=n.url;o.requestFunction=function(){var t=P.when.defer();return window[i]=function(e){t.resolve(e);try{delete window[i]}catch(e){window[i]=void 0}},cr._Implementations.loadAndExecuteScript(n.url,i,t),t.promise};e=Jt.request(o);if(!P.defined(e))return;return e.otherwise(function(t){return o.state!==Dt.FAILED?P.when.reject(t):n.retryOnError(t).then(function(e){return e?(o.state=Dt.UNISSUED,o.deferred=void 0,r(n,a,i)):P.when.reject(t)})})}(this,e,t)},cr.fetchJsonp=function(e){return new cr(e).fetchJsonp(e.callbackParameterName)},cr.prototype._makeRequest=function(s){var u=this;ur(u.request);var l=u.request;l.url=u.url,l.requestFunction=function(){var e=s.responseType,t=d.combine(s.headers,u.headers),r=s.overrideMimeType,n=s.method,a=s.data,i=P.when.defer(),o=cr._Implementations.loadWithXhr(u.url,e,n,a,t,i,r);return P.defined(o)&&P.defined(o.abort)&&(l.cancelFunction=function(){o.abort()}),i.promise};var e=Jt.request(l);if(P.defined(e))return e.then(function(e){return l.cancelFunction=void 0,e}).otherwise(function(t){return l.cancelFunction=void 0,l.state!==Dt.FAILED?P.when.reject(t):u.retryOnError(t).then(function(e){return e?(l.state=Dt.UNISSUED,l.deferred=void 0,u.fetch(s)):P.when.reject(t)})})};var fr=/^data:(.*?)(;base64)?,(.*)$/;function pr(e,t){t=decodeURIComponent(t);return e?atob(t):t}function hr(e,t){for(var r=pr(e,t),t=new ArrayBuffer(r.length),n=new Uint8Array(t),a=0;a<r.length;a++)n[a]=r.charCodeAt(a);return t}function mr(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}cr.prototype.fetch=function(e){return(e=sr(e,{})).method="GET",this._makeRequest(e)},cr.fetch=function(e){return new cr(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},cr.prototype.delete=function(e){return(e=sr(e,{})).method="DELETE",this._makeRequest(e)},cr.delete=function(e){return new cr(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},cr.prototype.head=function(e){return(e=sr(e,{})).method="HEAD",this._makeRequest(e)},cr.head=function(e){return new cr(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},cr.prototype.options=function(e){return(e=sr(e,{})).method="OPTIONS",this._makeRequest(e)},cr.options=function(e){return new cr(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},cr.prototype.post=function(e,t){return v.Check.defined("data",e),(t=sr(t,{})).method="POST",t.data=e,this._makeRequest(t)},cr.post=function(e){return new cr(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},cr.prototype.put=function(e,t){return v.Check.defined("data",e),(t=sr(t,{})).method="PUT",t.data=e,this._makeRequest(t)},cr.put=function(e){return new cr(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},cr.prototype.patch=function(e,t){return v.Check.defined("data",e),(t=sr(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},cr.patch=function(e){return new cr(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},(cr._Implementations={}).createImage=function(i,o,s,u,l,c){var d=i.url;cr.supportsImageBitmapOptions().then(function(e){if(!e||!c)return n=d,e=o,t=s,(r=new Image).onload=function(){t.resolve(r)},r.onerror=function(e){t.reject(e)},e&&(tr.contains(n)?r.crossOrigin="use-credentials":r.crossOrigin=""),void(r.src=n);var t,r,n=P.when.defer(),a=cr._Implementations.loadWithXhr(d,"blob","GET",void 0,void 0,n,void 0,void 0,void 0);return P.defined(a)&&P.defined(a.abort)&&(i.cancelFunction=function(){a.abort()}),n.promise.then(function(e){return P.defined(e)?cr.createImageBitmapFromBlob(e,{flipY:u,premultiplyAlpha:!1,skipColorSpaceConversion:l}):void s.reject(new v.RuntimeError("Successfully retrieved "+d+" but it contained no content."))}).then(s.resolve)}).otherwise(s.reject)},cr.createImageBitmapFromBlob=function(e,t){return v.Check.defined("options",t),v.Check.typeOf.bool("options.flipY",t.flipY),v.Check.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),v.Check.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};var gr="undefined"==typeof XMLHttpRequest;function yr(e){var t,r;e=P.defaultValue(e,P.defaultValue.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=P.defaultValue(e.addNewLeapSeconds,!0),P.defined(e.data)?wr(this,e.data):P.defined(e.url)?(t=cr.createIfNeeded(e.url),(r=this)._downloadPromise=t.fetchJson().then(function(e){wr(r,e)}).otherwise(function(){r._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."})):wr(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function vr(e,t){return bt.compare(e.julianDate,t)}function wr(e,t){if(P.defined(t.columnNames))if(P.defined(t.samples)){var r=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),a=t.columnNames.indexOf("yPoleWanderRadians"),i=t.columnNames.indexOf("ut1MinusUtcSeconds"),o=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("taiMinusUtcSeconds");if(r<0||n<0||a<0||i<0||o<0||s<0||u<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var l,c=e._samples=t.samples,d=e._dates=[];e._dateColumn=r,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=a,e._ut1MinusUtcSecondsColumn=i,e._xCelestialPoleOffsetRadiansColumn=o,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=u,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var f=e._addNewLeapSeconds,p=0,h=c.length;p<h;p+=e._columnCount){var m,g=c[p+r],y=c[p+u],v=new bt(g+at.MODIFIED_JULIAN_DATE_DIFFERENCE,y,it.TAI);d.push(v),f&&(y===l||!P.defined(l)||(g=Ke(m=bt.leapSeconds,v,vr))<0&&(v=new nt(v,y),m.splice(~g,0,v)),l=y)}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function Cr(e,t,r,n,a){n*=r;a.xPoleWander=t[n+e._xPoleWanderRadiansColumn],a.yPoleWander=t[n+e._yPoleWanderRadiansColumn],a.xPoleOffset=t[n+e._xCelestialPoleOffsetRadiansColumn],a.yPoleOffset=t[n+e._yCelestialPoleOffsetRadiansColumn],a.ut1MinusUtc=t[n+e._ut1MinusUtcSecondsColumn]}function _r(e,t,r){return t+e*(r-t)}function br(e,t,r,n,a,i,o){var s=e._columnCount;if(i>t.length-1)return o.xPoleWander=0,o.yPoleWander=0,o.xPoleOffset=0,o.yPoleOffset=0,o.ut1MinusUtc=0,o;var u=t[a],l=t[i];if(u.equals(l)||n.equals(u))return Cr(e,r,a,s,o),o;if(n.equals(l))return Cr(e,r,i,s,o),o;var c=bt.secondsDifference(n,u)/bt.secondsDifference(l,u),d=a*s,t=i*s,u=r[d+e._ut1MinusUtcSecondsColumn],a=r[t+e._ut1MinusUtcSecondsColumn],i=a-u;return!(.5<i||i<-.5)||(s=r[d+e._taiMinusUtcSecondsColumn])!==(i=r[t+e._taiMinusUtcSecondsColumn])&&(l.equals(n)?u=a:a-=i-s),o.xPoleWander=_r(c,r[d+e._xPoleWanderRadiansColumn],r[t+e._xPoleWanderRadiansColumn]),o.yPoleWander=_r(c,r[d+e._yPoleWanderRadiansColumn],r[t+e._yPoleWanderRadiansColumn]),o.xPoleOffset=_r(c,r[d+e._xCelestialPoleOffsetRadiansColumn],r[t+e._xCelestialPoleOffsetRadiansColumn]),o.yPoleOffset=_r(c,r[d+e._yCelestialPoleOffsetRadiansColumn],r[t+e._yCelestialPoleOffsetRadiansColumn]),o.ut1MinusUtc=_r(c,u,a),o}function xr(e,t,r){this.heading=P.defaultValue(e,0),this.pitch=P.defaultValue(t,0),this.roll=P.defaultValue(r,0)}cr._Implementations.loadWithXhr=function(e,a,i,t,r,o,n){var s=fr.exec(e);if(null===s){if(gr)return u=e,l=a,c=i,d=r,f=o,p=require("url").parse(u),u="https:"===p.protocol?require("https"):require("http"),h=require("zlib"),d={protocol:p.protocol,hostname:p.hostname,port:p.port,path:p.path,query:p.query,method:c,headers:d},void u.request(d).on("response",function(t){var r;t.statusCode<200||300<=t.statusCode?f.reject(new Ft(t.statusCode,t,t.headers)):(r=[],t.on("data",function(e){r.push(e)}),t.on("end",function(){var e=Buffer.concat(r);"gzip"===t.headers["content-encoding"]?h.gunzip(e,function(e,t){e?f.reject(new v.RuntimeError("Error decompressing response.")):f.resolve(mr(t,l))}):f.resolve(mr(e,l))}))}).on("error",function(e){f.reject(new Ft)}).end();var u,l,c,d,f,p,h,m=new XMLHttpRequest;if(tr.contains(e)&&(m.withCredentials=!0),m.open(i,e,!0),P.defined(n)&&P.defined(m.overrideMimeType)&&m.overrideMimeType(n),P.defined(r))for(var g in r)r.hasOwnProperty(g)&&m.setRequestHeader(g,r[g]);P.defined(a)&&(m.responseType=a);var y=!1;return"string"==typeof e&&(y=0===e.indexOf("file://")||"undefined"!=typeof window&&"file://"===window.location.origin),m.onload=function(){if(!(m.status<200||300<=m.status)||y&&0===m.status){var e=m.response,t=m.responseType;if("HEAD"===i||"OPTIONS"===i){var r=m.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};return r.forEach(function(e){var t=e.split(": "),e=t.shift();n[e]=t.join(": ")}),void o.resolve(n)}if(204===m.status)o.resolve();else if(!P.defined(e)||P.defined(a)&&t!==a)if("json"===a&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===t||"document"===t)&&P.defined(m.responseXML)&&m.responseXML.hasChildNodes()?o.resolve(m.responseXML):""!==t&&"text"!==t||!P.defined(m.responseText)?o.reject(new v.RuntimeError("Invalid XMLHttpRequest response type.")):o.resolve(m.responseText);else o.resolve(e)}else o.reject(new Ft(m.status,m.response,m.getAllResponseHeaders()))},m.onerror=function(e){o.reject(new Ft)},m.send(t),m}o.resolve(function(e,t){t=P.defaultValue(t,"");var r=e[1],n=!!e[2],a=e[3];switch(t){case"":case"text":return pr(n,a);case"arraybuffer":return hr(n,a);case"blob":var i=hr(n,a);return new Blob([i],{type:r});case"document":return(new DOMParser).parseFromString(pr(n,a),r);case"json":return JSON.parse(pr(n,a))}}(s,a))},cr._Implementations.loadAndExecuteScript=function(e,t,r){return function(e){var t=P.when.defer(),r=document.createElement("script");r.async=!0,r.src=e;var n=document.getElementsByTagName("head")[0];return r.onload=function(){r.onload=void 0,n.removeChild(r),t.resolve()},r.onerror=function(e){t.reject(e)},n.appendChild(r),t.promise}(e).otherwise(r.reject)},(cr._DefaultImplementations={}).createImage=cr._Implementations.createImage,cr._DefaultImplementations.loadWithXhr=cr._Implementations.loadWithXhr,cr._DefaultImplementations.loadAndExecuteScript=cr._Implementations.loadAndExecuteScript,cr.DEFAULT=Object.freeze(new cr({url:"undefined"==typeof document?"":document.location.href.split("?")[0]})),yr.NONE=Object.freeze({getPromiseToLoad:function(){return P.when.resolve()},compute:function(e,t){return P.defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new et(0,0,0,0,0),t}}),yr.prototype.getPromiseToLoad=function(){return P.when(this._downloadPromise)},yr.prototype.compute=function(e,t){if(P.defined(this._samples)){if(P.defined(t)||(t=new et(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var r=this._dates,n=this._lastIndex,a=0,i=0;if(P.defined(n)){var o=r[n],s=r[n+1],u=bt.lessThanOrEquals(o,e),l=!P.defined(s),o=l||bt.greaterThanOrEquals(s,e);if(u&&o)return a=n,!l&&s.equals(e)&&++a,br(this,r,this._samples,e,a,i=a+1,t),t}s=Ke(r,e,bt.compare,this._dateColumn);return 0<=s?(s<r.length-1&&r[s+1].equals(e)&&++s,i=a=s):(a=(i=~s)-1)<0&&(a=0),this._lastIndex=a,br(this,r,this._samples,e,a,i,t),t}if(P.defined(this._dataError))throw new v.RuntimeError(this._dataError)},xr.fromQuaternion=function(e,t){P.defined(t)||(t=new xr);var r=2*(e.w*e.y-e.z*e.x),n=1-2*(e.x*e.x+e.y*e.y),a=2*(e.w*e.x+e.y*e.z),i=1-2*(e.y*e.y+e.z*e.z),e=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(e,i),t.roll=Math.atan2(a,n),t.pitch=-c.CesiumMath.asinClamped(r),t},xr.fromDegrees=function(e,t,r,n){return(n=!P.defined(n)?new xr:n).heading=e*c.CesiumMath.RADIANS_PER_DEGREE,n.pitch=t*c.CesiumMath.RADIANS_PER_DEGREE,n.roll=r*c.CesiumMath.RADIANS_PER_DEGREE,n},xr.clone=function(e,t){if(P.defined(e))return P.defined(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new xr(e.heading,e.pitch,e.roll)},xr.equals=function(e,t){return e===t||P.defined(e)&&P.defined(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},xr.equalsEpsilon=function(e,t,r,n){return e===t||P.defined(e)&&P.defined(t)&&c.CesiumMath.equalsEpsilon(e.heading,t.heading,r,n)&&c.CesiumMath.equalsEpsilon(e.pitch,t.pitch,r,n)&&c.CesiumMath.equalsEpsilon(e.roll,t.roll,r,n)},xr.prototype.clone=function(e){return xr.clone(this,e)},xr.prototype.equals=function(e){return xr.equals(this,e)},xr.prototype.equalsEpsilon=function(e,t,r){return xr.equalsEpsilon(this,e,t,r)},xr.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var Sr,Er,Ar,Or=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function Rr(e){return"undefined"==typeof document?e:((Sr=!P.defined(Sr)?document.createElement("a"):Sr).href=e,Sr.href=Sr.href,Sr.href)}function Ir(){if(P.defined(Er))return Er;var e="undefined"!=typeof CESIUM_BASE_URL?CESIUM_BASE_URL:"object"==typeof define&&P.defined(define.amd)&&!define.amd.toUrlUndefined&&P.defined(require.toUrl)?It("..",qr("Core/buildModuleUrl.js")):function(){for(var e=document.getElementsByTagName("script"),t=0,r=e.length;t<r;++t){var n=e[t].getAttribute("src"),n=Or.exec(n);if(null!==n)return n[1]}}();return(Er=new cr({url:Rr(e)})).appendForwardSlash(),Er}function Pr(e){return Rr(require.toUrl("../"+e))}function Tr(e){return Ir().getDerivedResource({url:e}).url}function qr(e){return(Ar=!P.defined(Ar)?"object"==typeof define&&P.defined(define.amd)&&!define.amd.toUrlUndefined&&P.defined(require.toUrl)?Pr:Tr:Ar)(e)}function zr(e,t,r){this.x=e,this.y=t,this.s=r}function Mr(e){e=P.defaultValue(e,P.defaultValue.EMPTY_OBJECT),this._xysFileUrlTemplate=cr.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=P.defaultValue(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=P.defaultValue(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new bt(this._sampleZeroJulianEphemerisDate,0,it.TAI),this._stepSizeDays=P.defaultValue(e.stepSizeDays,1),this._samplesPerXysFile=P.defaultValue(e.samplesPerXysFile,1e3),this._totalSamples=P.defaultValue(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,r=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),a=Math.pow(this._stepSizeDays,t),i=0;i<=t;++i){r[i]=a,n[i]=i*this._stepSizeDays;for(var o=0;o<=t;++o)o!==i&&(r[i]*=i-o);r[i]=1/r[i]}this._work=new Array(t+1),this._coef=new Array(t+1)}qr._cesiumScriptRegex=Or,qr._buildModuleUrlFromBaseUrl=Tr,qr._clearBaseResource=function(){Er=void 0},qr.setBaseUrl=function(e){Er=cr.DEFAULT.getDerivedResource({url:e})},qr.getCesiumBaseUrl=Ir;var Dr=new bt(0,0,it.TAI);function Ur(e,t,r){var n=Dr;return n.dayNumber=t,n.secondsOfDay=r,bt.daysDifference(n,e._sampleZeroDateTT)}function kr(o,s){if(o._chunkDownloadsInProgress[s])return o._chunkDownloadsInProgress[s];var u=P.when.defer();o._chunkDownloadsInProgress[s]=u;var e=o._xysFileUrlTemplate,e=P.defined(e)?e.getDerivedResource({templateValues:{0:s}}):new cr({url:qr("Assets/IAU2006_XYS/IAU2006_XYS_"+s+".json")});return P.when(e.fetchJson(),function(e){o._chunkDownloadsInProgress[s]=!1;for(var t=o._samples,r=e.samples,n=s*o._samplesPerXysFile*3,a=0,i=r.length;a<i;++a)t[n+a]=r[a];u.resolve()}),u.promise}Mr.prototype.preload=function(e,t,r,n){t=Ur(this,e,t),n=Ur(this,r,n),t=t/this._stepSizeDays-this._interpolationOrder/2|0,n=n/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;n>=this._totalSamples&&(n=this._totalSamples-1);for(var t=(t=t<0?0:t)/this._samplesPerXysFile|0,a=n/this._samplesPerXysFile|0,i=[],o=t;o<=a;++o)i.push(kr(this,o));return P.when.all(i)},Mr.prototype.computeXysRadians=function(e,t,r){var n=Ur(this,e,t);if(!(n<0)){e=n/this._stepSizeDays|0;if(!(e>=this._totalSamples)){var a=this._interpolationOrder,i=e-(a/2|0),t=(i=i<0?0:i)+a;t>=this._totalSamples&&(i=(t=this._totalSamples-1)-a)<0&&(i=0);var e=!1,o=this._samples;if(P.defined(o[3*i])||(kr(this,i/this._samplesPerXysFile|0),e=!0),P.defined(o[3*t])||(kr(this,t/this._samplesPerXysFile|0),e=!0),!e){P.defined(r)?(r.x=0,r.y=0,r.s=0):r=new zr(0,0,0);for(var s,u=n-i*this._stepSizeDays,l=this._work,c=this._denominators,d=this._coef,f=this._xTable,p=0;p<=a;++p)l[p]=u-f[p];for(p=0;p<=a;++p){for(d[p]=1,s=0;s<=a;++s)s!==p&&(d[p]*=l[s]);d[p]*=c[p];var h=3*(i+p);r.x+=d[p]*o[h++],r.y+=d[p]*o[h++],r.s+=d[p]*o[h]}return r}}}};var Fr={},Nr={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"}},jr={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Br={},Vr={east:new I.Cartesian3,north:new I.Cartesian3,up:new I.Cartesian3,west:new I.Cartesian3,south:new I.Cartesian3,down:new I.Cartesian3},Lr=new I.Cartesian3,Qr=new I.Cartesian3,Wr=new I.Cartesian3;Fr.localFrameToFixedFrameGenerator=function(a,i){if(!Nr.hasOwnProperty(a)||!Nr[a].hasOwnProperty(i))throw new v.DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");var e,o=Nr[a][i],t=a+i;return P.defined(Br[t])?e=Br[t]:(e=function(e,t,r){var n;return P.defined(r)||(r=new I.Matrix4),I.Cartesian3.equalsEpsilon(e,I.Cartesian3.ZERO,c.CesiumMath.EPSILON14)?(I.Cartesian3.unpack(jr[a],0,Lr),I.Cartesian3.unpack(jr[i],0,Qr),I.Cartesian3.unpack(jr[o],0,Wr)):c.CesiumMath.equalsEpsilon(e.x,0,c.CesiumMath.EPSILON14)&&c.CesiumMath.equalsEpsilon(e.y,0,c.CesiumMath.EPSILON14)?(n=c.CesiumMath.sign(e.z),I.Cartesian3.unpack(jr[a],0,Lr),"east"!==a&&"west"!==a&&I.Cartesian3.multiplyByScalar(Lr,n,Lr),I.Cartesian3.unpack(jr[i],0,Qr),"east"!==i&&"west"!==i&&I.Cartesian3.multiplyByScalar(Qr,n,Qr),I.Cartesian3.unpack(jr[o],0,Wr),"east"!==o&&"west"!==o&&I.Cartesian3.multiplyByScalar(Wr,n,Wr)):((t=P.defaultValue(t,I.Ellipsoid.WGS84)).geodeticSurfaceNormal(e,Vr.up),n=Vr.up,(t=Vr.east).x=-e.y,t.y=e.x,t.z=0,I.Cartesian3.normalize(t,Vr.east),I.Cartesian3.cross(n,t,Vr.north),I.Cartesian3.multiplyByScalar(Vr.up,-1,Vr.down),I.Cartesian3.multiplyByScalar(Vr.east,-1,Vr.west),I.Cartesian3.multiplyByScalar(Vr.north,-1,Vr.south),Lr=Vr[a],Qr=Vr[i],Wr=Vr[o]),r[0]=Lr.x,r[1]=Lr.y,r[2]=Lr.z,r[3]=0,r[4]=Qr.x,r[5]=Qr.y,r[6]=Qr.z,r[7]=0,r[8]=Wr.x,r[9]=Wr.y,r[10]=Wr.z,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,r},Br[t]=e),e},Fr.eastNorthUpToFixedFrame=Fr.localFrameToFixedFrameGenerator("east","north"),Fr.northEastDownToFixedFrame=Fr.localFrameToFixedFrameGenerator("north","east"),Fr.northUpEastToFixedFrame=Fr.localFrameToFixedFrameGenerator("north","up"),Fr.northWestUpToFixedFrame=Fr.localFrameToFixedFrameGenerator("north","west");var Hr=new Se,Yr=new I.Cartesian3(1,1,1),Zr=new I.Matrix4;Fr.headingPitchRollToFixedFrame=function(e,t,r,n,a){n=P.defaultValue(n,Fr.eastNorthUpToFixedFrame);t=Se.fromHeadingPitchRoll(t,Hr),t=I.Matrix4.fromTranslationQuaternionRotationScale(I.Cartesian3.ZERO,t,Yr,Zr);return a=n(e,r,a),I.Matrix4.multiply(a,t,a)};var Gr=new I.Matrix4,Jr=new I.Matrix3;Fr.headingPitchRollQuaternion=function(e,t,r,n,a){n=Fr.headingPitchRollToFixedFrame(e,t,r,n,Gr),n=I.Matrix4.getMatrix3(n,Jr);return Se.fromRotationMatrix(n,a)};var $r=new I.Cartesian3(1,1,1),Xr=new I.Cartesian3,Kr=new I.Matrix4,en=new I.Matrix4,tn=new I.Matrix3,rn=new Se;Fr.fixedFrameToHeadingPitchRoll=function(e,t,r,n){t=P.defaultValue(t,I.Ellipsoid.WGS84),r=P.defaultValue(r,Fr.eastNorthUpToFixedFrame),P.defined(n)||(n=new xr);var a=I.Matrix4.getTranslation(e,Xr);if(I.Cartesian3.equals(a,I.Cartesian3.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;t=I.Matrix4.inverseTransformation(r(a,t,Kr),Kr),e=I.Matrix4.setScale(e,$r,en),e=I.Matrix4.setTranslation(e,I.Cartesian3.ZERO,e),t=I.Matrix4.multiply(t,e,t),t=Se.fromRotationMatrix(I.Matrix4.getMatrix3(t,tn),rn),t=Se.normalize(t,t);return xr.fromQuaternion(t,n)};var nn=c.CesiumMath.TWO_PI/86400,an=new bt;Fr.computeTemeToPseudoFixedMatrix=function(e,t){var r=(an=bt.addSeconds(e,-bt.computeTaiMinusUtc(e),an)).dayNumber,n=an.secondsOfDay,e=r-2451545,e=43200<=n?(.5+e)/at.DAYS_PER_JULIAN_CENTURY:(e-.5)/at.DAYS_PER_JULIAN_CENTURY,r=(24110.54841+e*(8640184.812866+e*(.093104+-62e-7*e)))*nn%c.CesiumMath.TWO_PI+(72921158553e-15+11772758384668e-32*(r-2451545.5))*((n+.5*at.SECONDS_PER_DAY)%at.SECONDS_PER_DAY),n=Math.cos(r),r=Math.sin(r);return P.defined(t)?(t[0]=n,t[1]=-r,t[2]=0,t[3]=r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new I.Matrix3(n,r,0,-r,n,0,0,0,1)},Fr.iau2006XysData=new Mr,Fr.earthOrientationParameters=yr.NONE;var on=32.184;Fr.preloadIcrfFixed=function(e){var t=e.start.dayNumber,r=e.start.secondsOfDay+on,n=e.stop.dayNumber,e=e.stop.secondsOfDay+on,n=Fr.iau2006XysData.preload(t,r,n,e),e=Fr.earthOrientationParameters.getPromiseToLoad();return P.when.all([n,e])},Fr.computeIcrfToFixedMatrix=function(e,t){P.defined(t)||(t=new I.Matrix3);e=Fr.computeFixedToIcrfMatrix(e,t);if(P.defined(e))return I.Matrix3.transpose(e,t)};var sn=new zr(0,0,0),un=new et(0,0,0,0,0),ln=new I.Matrix3,cn=new I.Matrix3;Fr.computeFixedToIcrfMatrix=function(e,t){P.defined(t)||(t=new I.Matrix3);var r=Fr.earthOrientationParameters.compute(e,un);if(P.defined(r)){var n=e.dayNumber,a=e.secondsOfDay+on,i=Fr.iau2006XysData.computeXysRadians(n,a,sn);if(P.defined(i)){var o=i.x+r.xPoleOffset,s=i.y+r.yPoleOffset,u=1/(1+Math.sqrt(1-o*o-s*s)),l=ln;l[0]=1-u*o*o,l[3]=-u*o*s,l[6]=o,l[1]=-u*o*s,l[4]=1-u*s*s,l[7]=s,l[2]=-o,l[5]=-s,l[8]=1-u*(o*o+s*s);o=I.Matrix3.fromRotationZ(-i.s,cn),s=I.Matrix3.multiply(l,o,ln),i=e.dayNumber,l=(e.secondsOfDay-bt.computeTaiMinusUtc(e)+r.ut1MinusUtc)/at.SECONDS_PER_DAY,o=(o=.779057273264+l+.00273781191135448*(i-2451545+l))%1*c.CesiumMath.TWO_PI,e=I.Matrix3.fromRotationZ(o,cn),i=I.Matrix3.multiply(s,e,ln),l=Math.cos(r.xPoleWander),o=Math.cos(r.yPoleWander),s=Math.sin(r.xPoleWander),e=Math.sin(r.yPoleWander),r=n-2451545+a/at.SECONDS_PER_DAY,n=-47e-6*(r/=36525)*c.CesiumMath.RADIANS_PER_DEGREE/3600,a=Math.cos(n),r=Math.sin(n),n=cn;return n[0]=l*a,n[1]=l*r,n[2]=s,n[3]=-o*r+e*s*a,n[4]=o*a+e*s*r,n[5]=-e*l,n[6]=-e*r-o*s*a,n[7]=e*a-o*s*r,n[8]=o*l,I.Matrix3.multiply(i,n,t)}}};var dn=new I.Cartesian4;Fr.pointToWindowCoordinates=function(e,t,r,n){return(n=Fr.pointToGLWindowCoordinates(e,t,r,n)).y=2*t[5]-n.y,n},Fr.pointToGLWindowCoordinates=function(e,t,r,n){P.defined(n)||(n=new I.Cartesian2);var a=dn;return I.Matrix4.multiplyByVector(e,I.Cartesian4.fromElements(r.x,r.y,r.z,1,a),a),I.Cartesian4.multiplyByScalar(a,1/a.w,a),I.Matrix4.multiplyByVector(t,a,a),I.Cartesian2.fromCartesian4(a,n)};var fn=new I.Cartesian3,pn=new I.Cartesian3,hn=new I.Cartesian3;Fr.rotationMatrixFromPositionVelocity=function(e,t,r,n){r=P.defaultValue(r,I.Ellipsoid.WGS84).geodeticSurfaceNormal(e,fn),e=I.Cartesian3.cross(t,r,pn);I.Cartesian3.equalsEpsilon(e,I.Cartesian3.ZERO,c.CesiumMath.EPSILON6)&&(e=I.Cartesian3.clone(I.Cartesian3.UNIT_X,e));r=I.Cartesian3.cross(e,t,hn);return I.Cartesian3.normalize(r,r),I.Cartesian3.cross(t,r,e),I.Cartesian3.negate(e,e),I.Cartesian3.normalize(e,e),(n=!P.defined(n)?new I.Matrix3:n)[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=e.x,n[4]=e.y,n[5]=e.z,n[6]=r.x,n[7]=r.y,n[8]=r.z,n};var mn=new I.Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),gn=new I.Cartographic,yn=new I.Cartesian3,vn=new I.Cartesian3,wn=new I.Matrix3,Cn=new I.Matrix4,_n=new I.Matrix4;Fr.basisTo2D=function(e,t,r){var n=I.Matrix4.getTranslation(t,vn),a=e.ellipsoid,i=a.cartesianToCartographic(n,gn),i=e.project(i,yn);I.Cartesian3.fromElements(i.z,i.x,i.y,i);a=Fr.eastNorthUpToFixedFrame(n,a,Cn),a=I.Matrix4.inverseTransformation(a,_n),t=I.Matrix4.getMatrix3(t,wn),t=I.Matrix4.multiplyByMatrix3(a,t,r);return I.Matrix4.multiply(mn,t,r),I.Matrix4.setTranslation(r,i,r),r},Fr.wgs84To2DModelMatrix=function(e,t,r){var n=e.ellipsoid,a=Fr.eastNorthUpToFixedFrame(t,n,Cn),a=I.Matrix4.inverseTransformation(a,_n),t=n.cartesianToCartographic(t,gn),t=e.project(t,yn);I.Cartesian3.fromElements(t.z,t.x,t.y,t);t=I.Matrix4.fromTranslation(t,Cn);return I.Matrix4.multiply(mn,a,r),I.Matrix4.multiply(t,r,r),r},e.BoundingSphere=T,e.FeatureDetection=xe,e.GeographicProjection=t,e.Intersect=a,e.Interval=i,e.Quaternion=Se,e.Resource=cr,e.Transforms=Fr,e.buildModuleUrl=qr});