128 lines
42 KiB
JavaScript
128 lines
42 KiB
JavaScript
define(["exports","./when-b60132fc","./Cartesian2-47311507","./Cartographic-3309dd0d","./Cartesian4-3ca25aab","./Check-7b2a090c","./buildModuleUrl-3addfe33","./RuntimeError-4a5c8994","./Math-119be1a3","./BoundingSphere-561b54d0","./FeatureDetection-c3b71206"],(function(e,a,t,n,r,i,s,o,u,l,d){"use strict";function c(e,t,n,r){this.x=a.defaultValue(e,0),this.y=a.defaultValue(t,0),this.z=a.defaultValue(n,0),this.w=a.defaultValue(r,0)}var f=new n.Cartesian3;c.fromAxisAngle=function(e,t,r){var i=t/2,s=Math.sin(i),o=(f=n.Cartesian3.normalize(e,f)).x*s,u=f.y*s,l=f.z*s,d=Math.cos(i);return a.defined(r)?(r.x=o,r.y=u,r.z=l,r.w=d,r):new c(o,u,l,d)};var h=[1,2,0],m=new Array(3);c.fromRotationMatrix=function(e,t){var n,r,i,s,o,u=e[l.Matrix3.COLUMN0ROW0],d=e[l.Matrix3.COLUMN1ROW1],f=e[l.Matrix3.COLUMN2ROW2],p=u+d+f;if(p>0)o=.5*(n=Math.sqrt(p+1)),n=.5/n,r=(e[l.Matrix3.COLUMN1ROW2]-e[l.Matrix3.COLUMN2ROW1])*n,i=(e[l.Matrix3.COLUMN2ROW0]-e[l.Matrix3.COLUMN0ROW2])*n,s=(e[l.Matrix3.COLUMN0ROW1]-e[l.Matrix3.COLUMN1ROW0])*n;else{var y=0;d>u&&(y=1),f>u&&f>d&&(y=2);var w=h[y],C=h[w];n=Math.sqrt(e[l.Matrix3.getElementIndex(y,y)]-e[l.Matrix3.getElementIndex(w,w)]-e[l.Matrix3.getElementIndex(C,C)]+1);var x=m;x[y]=.5*n,n=.5/n,o=(e[l.Matrix3.getElementIndex(C,w)]-e[l.Matrix3.getElementIndex(w,C)])*n,x[w]=(e[l.Matrix3.getElementIndex(w,y)]+e[l.Matrix3.getElementIndex(y,w)])*n,x[C]=(e[l.Matrix3.getElementIndex(C,y)]+e[l.Matrix3.getElementIndex(y,C)])*n,r=-x[0],i=-x[1],s=-x[2]}return a.defined(t)?(t.x=r,t.y=i,t.z=s,t.w=o,t):new c(r,i,s,o)};var p=new c,y=new c,w=new c,C=new c;c.fromHeadingPitchRoll=function(e,a){return C=c.fromAxisAngle(n.Cartesian3.UNIT_X,e.roll,p),w=c.fromAxisAngle(n.Cartesian3.UNIT_Y,-e.pitch,a),a=c.multiply(w,C,w),y=c.fromAxisAngle(n.Cartesian3.UNIT_Z,-e.heading,p),c.multiply(y,a,a)};var x=new n.Cartesian3,_=new n.Cartesian3,M=new c,E=new c,O=new c;c.packedLength=4,c.pack=function(e,t,n){return n=a.defaultValue(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},c.unpack=function(e,t,n){return t=a.defaultValue(t,0),a.defined(n)||(n=new c),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},c.packedInterpolationLength=3,c.convertPackedArrayForInterpolation=function(e,a,t,n){c.unpack(e,4*t,O),c.conjugate(O,O);for(var r=0,i=t-a+1;r<i;r++){var s=3*r;c.unpack(e,4*(a+r),M),c.multiply(M,O,M),M.w<0&&c.negate(M,M),c.computeAxis(M,x);var o=c.computeAngle(M);n[s]=x.x*o,n[s+1]=x.y*o,n[s+2]=x.z*o}},c.unpackInterpolationResult=function(e,t,r,i,s){a.defined(s)||(s=new c),n.Cartesian3.fromArray(e,0,_);var o=n.Cartesian3.magnitude(_);return c.unpack(t,4*i,E),0===o?c.clone(c.IDENTITY,M):c.fromAxisAngle(_,o,M),c.multiply(M,E,s)},c.clone=function(e,t){if(a.defined(e))return a.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new c(e.x,e.y,e.z,e.w)},c.conjugate=function(e,a){return a.x=-e.x,a.y=-e.y,a.z=-e.z,a.w=e.w,a},c.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},c.magnitude=function(e){return Math.sqrt(c.magnitudeSquared(e))},c.normalize=function(e,a){var t=1/c.magnitude(e),n=e.x*t,r=e.y*t,i=e.z*t,s=e.w*t;return a.x=n,a.y=r,a.z=i,a.w=s,a},c.inverse=function(e,a){var t=c.magnitudeSquared(e);return a=c.conjugate(e,a),c.multiplyByScalar(a,1/t,a)},c.add=function(e,a,t){return t.x=e.x+a.x,t.y=e.y+a.y,t.z=e.z+a.z,t.w=e.w+a.w,t},c.subtract=function(e,a,t){return t.x=e.x-a.x,t.y=e.y-a.y,t.z=e.z-a.z,t.w=e.w-a.w,t},c.negate=function(e,a){return a.x=-e.x,a.y=-e.y,a.z=-e.z,a.w=-e.w,a},c.dot=function(e,a){return e.x*a.x+e.y*a.y+e.z*a.z+e.w*a.w},c.multiply=function(e,a,t){var n=e.x,r=e.y,i=e.z,s=e.w,o=a.x,u=a.y,l=a.z,d=a.w,c=s*o+n*d+r*l-i*u,f=s*u-n*l+r*d+i*o,h=s*l+n*u-r*o+i*d,m=s*d-n*o-r*u-i*l;return t.x=c,t.y=f,t.z=h,t.w=m,t},c.multiplyByVec=function(e,a,t){var r=new n.Cartesian3,i=new n.Cartesian3,s=new n.Cartesian3(e.x,e.y,e.z);r=n.Cartesian3.cross(s,a,r),i=n.Cartesian3.cross(s,r,i);var o=new n.Cartesian3;o=n.Cartesian3.multiplyByScalar(r,2*e.w,o);var u=new n.Cartesian3;return u=n.Cartesian3.multiplyByScalar(r,2,u),t=n.Cartesian3.add(a,o,t),t=n.Cartesian3.add(t,u,t)},c.multiplyByScalar=function(e,a,t){return t.x=e.x*a,t.y=e.y*a,t.z=e.z*a,t.w=e.w*a,t},c.divideByScalar=function(e,a,t){return t.x=e.x/a,t.y=e.y/a,t.z=e.z/a,t.w=e.w/a,t},c.computeAxis=function(e,a){var t=e.w;if(Math.abs(t-1)<u.CesiumMath.EPSILON6)return a.x=a.y=a.z=0,a;var n=1/Math.sqrt(1-t*t);return a.x=e.x*n,a.y=e.y*n,a.z=e.z*n,a},c.computeAngle=function(e){return Math.abs(e.w-1)<u.CesiumMath.EPSILON6?0:2*Math.acos(e.w)};var S=new c;c.lerp=function(e,a,t,n){return S=c.multiplyByScalar(a,t,S),n=c.multiplyByScalar(e,1-t,n),c.add(S,n,n)};var v=new c,D=new c,T=new c;c.slerp=function(e,a,t,n){var r=c.dot(e,a),i=a;if(r<0&&(r=-r,i=v=c.negate(a,v)),1-r<u.CesiumMath.EPSILON6)return c.lerp(e,i,t,n);var s=Math.acos(r);return D=c.multiplyByScalar(e,Math.sin((1-t)*s),D),T=c.multiplyByScalar(i,Math.sin(t*s),T),n=c.add(D,T,n),c.multiplyByScalar(n,1/Math.sin(s),n)},c.log=function(e,a){var t=u.CesiumMath.acosClamped(e.w),r=0;return 0!==t&&(r=t/Math.sin(t)),n.Cartesian3.multiplyByScalar(e,r,a)},c.exp=function(e,a){var t=n.Cartesian3.magnitude(e),r=0;return 0!==t&&(r=Math.sin(t)/t),a.x=e.x*r,a.y=e.y*r,a.z=e.z*r,a.w=Math.cos(t),a};var P=new n.Cartesian3,g=new n.Cartesian3,N=new c,R=new c;c.computeInnerQuadrangle=function(e,a,t,r){var i=c.conjugate(a,N);c.multiply(i,t,R);var s=c.log(R,P);c.multiply(i,e,R);var o=c.log(R,g);return n.Cartesian3.add(s,o,s),n.Cartesian3.multiplyByScalar(s,.25,s),n.Cartesian3.negate(s,s),c.exp(s,N),c.multiply(a,N,r)},c.squad=function(e,a,t,n,r,i){var s=c.slerp(e,a,r,N),o=c.slerp(t,n,r,R);return c.slerp(s,o,2*r*(1-r),i)};for(var I=new c,A=1.9011074535173003,U=d.FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],z=d.FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],F=d.FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],b=d.FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],W=0;W<7;++W){var q=W+1,L=2*q+1;U[W]=1/(q*L),z[W]=q/L}function V(e,a,t){for(var n,r,i=0,s=e.length-1;i<=s;)if((r=t(e[n=~~((i+s)/2)],a))<0)i=n+1;else{if(!(r>0))return n;s=n-1}return~(s+1)}function k(e,a,t,n,r){this.xPoleWander=e,this.yPoleWander=a,this.xPoleOffset=t,this.yPoleOffset=n,this.ut1MinusUtc=r}
|
|
/**
|
|
@license
|
|
sprintf.js from the php.js project - https://github.com/kvz/phpjs
|
|
Directly from https://github.com/kvz/phpjs/blob/master/functions/strings/sprintf.js
|
|
|
|
php.js is copyright 2012 Kevin van Zonneveld.
|
|
|
|
Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
|
|
(http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
|
|
(http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas
|
|
Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev
|
|
Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa,
|
|
Rafa? Kukawski (http://blog.kukawski.pl), lmeyrick
|
|
(https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann,
|
|
Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R.
|
|
L. Rodrigues (http://www.jsfromhell.com), Ash Searle
|
|
(http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek,
|
|
Erkekjetter, Michael Grier, Rafa? Kukawski (http://kukawski.pl), Johnny
|
|
Mast (http://www.phpvrouwen.nl), T.Wild, d3x,
|
|
http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
|
|
Rafa? Kukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo
|
|
(http://webdevhobo.blogspot.com/), marrtins, GeekFG
|
|
(http://geekfg.blogspot.com), Andrea Giammarchi
|
|
(http://webreflection.blogspot.com), Arpad Ray (mailto:arpad@php.net),
|
|
gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg
|
|
Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser
|
|
(http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
|
|
Marc Palau, Martin
|
|
(http://www.erlenwiese.de/), Breaking Par Consulting Inc
|
|
(http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
|
|
Chris, Mirek Slugen, saulius, Alfonso Jimenez
|
|
(http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix,
|
|
Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio
|
|
Ariede (http://caioariede.com), Robin, Kankrelune
|
|
(http://www.webfaktory.info/), Karol Kowalski, Imgen Tata
|
|
(http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer,
|
|
Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ,
|
|
David, Aman Gupta, Michael White, Public Domain
|
|
(http://www.json.org/json2.js), Steven Levithan
|
|
(http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada,
|
|
Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018),
|
|
Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon
|
|
(http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/),
|
|
Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank
|
|
Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov
|
|
(http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford
|
|
(http://javascript.crockford.com), madipta, Slawomir Kaniecki,
|
|
ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner
|
|
(http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix,
|
|
Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick
|
|
(https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan,
|
|
Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson H?gfeldt
|
|
(http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb,
|
|
josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren
|
|
Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon
|
|
(http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX
|
|
(http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH,
|
|
Stoyan Kyosev (http://www.svest.org/), nord_ua, omid
|
|
(http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc
|
|
(http://yass.meetcweb.com), Peter-Paul Koch
|
|
(http://www.quirksmode.org/js/beat.html), Olivier Louvignes
|
|
(http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami,
|
|
Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith,
|
|
vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair
|
|
Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger
|
|
(http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner
|
|
B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong
|
|
(http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna,
|
|
Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni,
|
|
Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke
|
|
(http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski,
|
|
Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke
|
|
Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet,
|
|
sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen,
|
|
Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya
|
|
(http://www.premasolutions.com/), Philippe Jausions
|
|
(http://pear.php.net/user/jausions), Aidan Lister
|
|
(http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp,
|
|
strcmp, Taras Bogach, jpfle, Alexander Ermolaev
|
|
(http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando,
|
|
dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha
|
|
(http://www.pedrotainha.com), James, Arnout Kazemier
|
|
(http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo,
|
|
FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan
|
|
Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook,
|
|
daniel airton wermann (http://wermann.com.br), Atli T¨®r, Maximusya, Ryan
|
|
W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage
|
|
(http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo,
|
|
Billy, stensi, Cord, Manish, T.J. Leahy, Riddler
|
|
(http://www.frontierwebdev.com/), Rafa? Kukawski, FremyCompany, Matt
|
|
Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo
|
|
Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi
|
|
(http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem,
|
|
Russell Walker (http://www.nbill.co.uk/), Jamie Beck
|
|
(http://www.terabit.ca/), setcookie, Michael, YUI Library:
|
|
http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at
|
|
http://hacks.bluesmoon.info/strftime/strftime.js, Ben
|
|
(http://benblume.co.uk/), DtTvB
|
|
(http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William,
|
|
meo, incidence, Cagri Ekin, Amirouche, Amir Habibi
|
|
(http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name),
|
|
Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani,
|
|
Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben
|
|
Bryan
|
|
|
|
Licensed under the MIT (MIT-LICENSE.txt) license.
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
copy of this software and associated documentation files (the
|
|
"Software"), to deal in the Software without restriction, including
|
|
without limitation the rights to use, copy, modify, merge, publish,
|
|
distribute, sublicense, and/or sell copies of the Software, and to
|
|
permit persons to whom the Software is furnished to do so, subject to
|
|
the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included
|
|
in all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
|
|
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
OTHER DEALINGS IN THE SOFTWARE.
|
|
*/function Y(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,a=arguments,t=0,n=a[t++],r=function(e,a,t,n){t||(t=" ");var r=e.length>=a?"":Array(1+a-e.length>>>0).join(t);return n?e+r:r+e},i=function(e,a,t,n,i,s){var o=n-e.length;return o>0&&(e=t||!i?r(e,n,s,t):e.slice(0,a.length)+r("",o,"0",!0)+e.slice(a.length)),e},s=function(e,a,t,n,s,o,u){var l=e>>>0;return e=(t=t&&l&&{2:"0b",8:"0",16:"0x"}[a]||"")+r(l.toString(a),o||0,"0",!1),i(e,t,n,s,u)},o=function(e,a,t,n,r,s){return null!=n&&(e=e.slice(0,n)),i(e,"",a,t,r,s)},u=function(e,n,u,l,d,c,f){var h,m,p,y,w;if("%%"==e)return"%";for(var C=!1,x="",_=!1,M=!1,E=" ",O=u.length,S=0;u&&S<O;S++)switch(u.charAt(S)){case" ":x=" ";break;case"+":x="+";break;case"-":C=!0;break;case"'":E=u.charAt(S+1);break;case"0":_=!0;break;case"#":M=!0}if((l=l?"*"==l?+a[t++]:"*"==l.charAt(0)?+a[l.slice(1,-1)]:+l:0)<0&&(l=-l,C=!0),!isFinite(l))throw new Error("sprintf: (minimum-)width must be finite");switch(c=c?"*"==c?+a[t++]:"*"==c.charAt(0)?+a[c.slice(1,-1)]:+c:"fFeE".indexOf(f)>-1?6:"d"==f?0:void 0,w=n?a[n.slice(0,-1)]:a[t++],f){case"s":return o(String(w),C,l,c,_,E);case"c":return o(String.fromCharCode(+w),C,l,c,_);case"b":return s(w,2,M,C,l,c,_);case"o":return s(w,8,M,C,l,c,_);case"x":return s(w,16,M,C,l,c,_);case"X":return s(w,16,M,C,l,c,_).toUpperCase();case"u":return s(w,10,M,C,l,c,_);case"i":case"d":return h=+w||0,w=(m=(h=Math.round(h-h%1))<0?"-":x)+r(String(Math.abs(h)),c,"0",!1),i(w,m,C,l,_);case"e":case"E":case"f":case"F":case"g":case"G":return m=(h=+w)<0?"-":x,p=["toExponential","toFixed","toPrecision"]["efg".indexOf(f.toLowerCase())],y=["toString","toUpperCase"]["eEfFgG".indexOf(f)%2],w=m+Math.abs(h)[p](c),i(w,m,C,l,_)[y]();default:return e}};return n.replace(e,u)}function B(e,a,t,n,r,i,s,o){this.year=e,this.month=a,this.day=t,this.hour=n,this.minute=r,this.second=i,this.millisecond=s,this.isLeapSecond=o}function j(e){return e%4==0&&e%100!=0||e%400==0}function G(e,a){this.julianDate=e,this.offset=a}U[7]=A/136,z[7]=8*A/17,c.fastSlerp=function(e,a,t,n){var r,i=c.dot(e,a);i>=0?r=1:(r=-1,i=-i);for(var s=i-1,o=1-t,u=t*t,l=o*o,d=7;d>=0;--d)F[d]=(U[d]*u-z[d])*s,b[d]=(U[d]*l-z[d])*s;var f=r*t*(1+F[0]*(1+F[1]*(1+F[2]*(1+F[3]*(1+F[4]*(1+F[5]*(1+F[6]*(1+F[7])))))))),h=o*(1+b[0]*(1+b[1]*(1+b[2]*(1+b[3]*(1+b[4]*(1+b[5]*(1+b[6]*(1+b[7])))))))),m=c.multiplyByScalar(e,h,I);return c.multiplyByScalar(a,f,n),c.add(m,n,n)},c.fastSquad=function(e,a,t,n,r,i){var s=c.fastSlerp(e,a,r,N),o=c.fastSlerp(t,n,r,R);return c.fastSlerp(s,o,2*r*(1-r),i)},c.equals=function(e,t){return e===t||a.defined(e)&&a.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},c.equalsEpsilon=function(e,t,n){return e===t||a.defined(e)&&a.defined(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},c.ZERO=Object.freeze(new c(0,0,0,0)),c.IDENTITY=Object.freeze(new c(0,0,0,1)),c.prototype.clone=function(e){return c.clone(this,e)},c.prototype.equals=function(e){return c.equals(this,e)},c.prototype.equalsEpsilon=function(e,a){return c.equalsEpsilon(this,e,a)},c.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var Z=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}),X=Object.freeze({UTC:0,TAI:1}),J=new B,H=[31,28,31,30,31,30,31,31,30,31,30,31];function $(e,a){return fe.compare(e.julianDate,a.julianDate)}var Q=new G;function K(e){Q.julianDate=e;var a=fe.leapSeconds,t=V(a,Q,$);t<0&&(t=~t),t>=a.length&&(t=a.length-1);var n=a[t].offset;t>0&&(fe.secondsDifference(a[t].julianDate,e)>n&&(n=a[--t].offset));fe.addSeconds(e,n,e)}function ee(e,a){Q.julianDate=e;var t=fe.leapSeconds,n=V(t,Q,$);if(n<0&&(n=~n),0===n)return fe.addSeconds(e,-t[0].offset,a);if(n>=t.length)return fe.addSeconds(e,-t[n-1].offset,a);var r=fe.secondsDifference(t[n].julianDate,e);return 0===r?fe.addSeconds(e,-t[n].offset,a):r<=1?void 0:fe.addSeconds(e,-t[--n].offset,a)}function ae(e,a,t){var n=a/Z.SECONDS_PER_DAY|0;return e+=n,(a-=Z.SECONDS_PER_DAY*n)<0&&(e--,a+=Z.SECONDS_PER_DAY),t.dayNumber=e,t.secondsOfDay=a,t}function te(e,a,t,n,r,i,s){var o=(a-14)/12|0,u=e+4800+o,l=(1461*u/4|0)+(367*(a-2-12*o)/12|0)-(3*((u+100)/100|0)/4|0)+t-32075;(n-=12)<0&&(n+=24);var d=i+(n*Z.SECONDS_PER_HOUR+r*Z.SECONDS_PER_MINUTE+s*Z.SECONDS_PER_MILLISECOND);return d>=43200&&(l-=1),[l,d]}var ne=/^(\d{4})$/,re=/^(\d{4})-(\d{2})$/,ie=/^(\d{4})-?(\d{3})$/,se=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,oe=/^(\d{4})-?(\d{2})-?(\d{2})$/,ue=/([Z+\-])?(\d{2})?:?(\d{2})?$/,le=/^(\d{2})(\.\d+)?/.source+ue.source,de=/^(\d{2}):?(\d{2})(\.\d+)?/.source+ue.source,ce=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+ue.source;function fe(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=a.defaultValue(e,0),t=a.defaultValue(t,0),n=a.defaultValue(n,X.UTC);var r=0|e;ae(r,t+=(e-r)*Z.SECONDS_PER_DAY,this),n===X.UTC&&K(this)}fe.fromGregorianDate=function(e,t){var n=te(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return a.defined(t)?(ae(n[0],n[1],t),K(t),t):new fe(n[0],n[1],X.UTC)},fe.fromDate=function(e,t){var n=te(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return a.defined(t)?(ae(n[0],n[1],t),K(t),t):new fe(n[0],n[1],X.UTC)},fe.fromIso8601=function(e,t){var n,r,i,s,o=(e=e.replace(",",".")).split("T"),u=1,l=1,d=0,c=0,f=0,h=0,m=o[0],p=o[1];if(null!==(o=m.match(oe)))n=+o[1],u=+o[2],l=+o[3];else if(null!==(o=m.match(re)))n=+o[1],u=+o[2];else if(null!==(o=m.match(ne)))n=+o[1];else{var y;if(null!==(o=m.match(ie)))n=+o[1],y=+o[2],i=j(n);else if(null!==(o=m.match(se)))n=+o[1],y=7*+o[2]+(+o[3]||0)-new Date(Date.UTC(n,0,4)).getUTCDay()-3;(r=new Date(Date.UTC(n,0,1))).setUTCDate(y),u=r.getUTCMonth()+1,l=r.getUTCDate()}if(i=j(n),a.defined(p)){null!==(o=p.match(ce))?(d=+o[1],c=+o[2],f=+o[3],h=1e3*+(o[4]||0),s=5):null!==(o=p.match(de))?(d=+o[1],c=+o[2],f=60*+(o[3]||0),s=4):null!==(o=p.match(le))&&(d=+o[1],c=60*+(o[2]||0),s=3);var w=o[s],C=+o[s+1],x=+(o[s+2]||0);switch(w){case"+":d-=C,c-=x;break;case"-":d+=C,c+=x;break;case"Z":break;default:c+=new Date(Date.UTC(n,u-1,l,d,c)).getTimezoneOffset()}}var _=60===f;for(_&&f--;c>=60;)c-=60,d++;for(;d>=24;)d-=24,l++;for(r=i&&2===u?29:H[u-1];l>r;)l-=r,++u>12&&(u-=12,n++),r=i&&2===u?29:H[u-1];for(;c<0;)c+=60,d--;for(;d<0;)d+=24,l--;for(;l<1;)--u<1&&(u+=12,n--),l+=r=i&&2===u?29:H[u-1];var M=te(n,u,l,d,c,f,h);return a.defined(t)?(ae(M[0],M[1],t),K(t)):t=new fe(M[0],M[1],X.UTC),_&&fe.addSeconds(t,1,t),t},fe.now=function(e){return fe.fromDate(new Date,e)};var he=new fe(0,0,X.TAI);function me(e){if(e=a.defaultValue(e,a.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=a.defaultValue(e.addNewLeapSeconds,!0),a.defined(e.data))ye(this,e.data);else if(a.defined(e.url)){var t=s.Resource.createIfNeeded(e.url),n=this;this._downloadPromise=a.when(t.fetchJson(),(function(e){ye(n,e)}),(function(){n._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else ye(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function pe(e,a){return fe.compare(e.julianDate,a)}function ye(e,t){if(a.defined(t.columnNames))if(a.defined(t.samples)){var n=t.columnNames.indexOf("modifiedJulianDateUtc"),r=t.columnNames.indexOf("xPoleWanderRadians"),i=t.columnNames.indexOf("yPoleWanderRadians"),s=t.columnNames.indexOf("ut1MinusUtcSeconds"),o=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||r<0||i<0||s<0||o<0||u<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var d,c=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=r,e._yPoleWanderRadiansColumn=i,e._ut1MinusUtcSecondsColumn=s,e._xCelestialPoleOffsetRadiansColumn=o,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var h=e._addNewLeapSeconds,m=0,p=c.length;m<p;m+=e._columnCount){var y=c[m+n],w=c[m+l],C=new fe(y+Z.MODIFIED_JULIAN_DATE_DIFFERENCE,w,X.TAI);if(f.push(C),h){if(w!==d&&a.defined(d)){var x=fe.leapSeconds,_=V(x,C,pe);if(_<0){var M=new G(C,w);x.splice(~_,0,M)}}d=w}}}}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 we(e,a,t,n,r){var i=t*n;r.xPoleWander=a[i+e._xPoleWanderRadiansColumn],r.yPoleWander=a[i+e._yPoleWanderRadiansColumn],r.xPoleOffset=a[i+e._xCelestialPoleOffsetRadiansColumn],r.yPoleOffset=a[i+e._yCelestialPoleOffsetRadiansColumn],r.ut1MinusUtc=a[i+e._ut1MinusUtcSecondsColumn]}function Ce(e,a,t){return a+e*(t-a)}function xe(e,a,t,n,r,i,s){var o=e._columnCount;if(i>a.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;var u=a[r],l=a[i];if(u.equals(l)||n.equals(u))return we(e,t,r,o,s),s;if(n.equals(l))return we(e,t,i,o,s),s;var d=fe.secondsDifference(n,u)/fe.secondsDifference(l,u),c=r*o,f=i*o,h=t[c+e._ut1MinusUtcSecondsColumn],m=t[f+e._ut1MinusUtcSecondsColumn],p=m-h;if(p>.5||p<-.5){var y=t[c+e._taiMinusUtcSecondsColumn],w=t[f+e._taiMinusUtcSecondsColumn];y!==w&&(l.equals(n)?h=m:m-=w-y)}return s.xPoleWander=Ce(d,t[c+e._xPoleWanderRadiansColumn],t[f+e._xPoleWanderRadiansColumn]),s.yPoleWander=Ce(d,t[c+e._yPoleWanderRadiansColumn],t[f+e._yPoleWanderRadiansColumn]),s.xPoleOffset=Ce(d,t[c+e._xCelestialPoleOffsetRadiansColumn],t[f+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=Ce(d,t[c+e._yCelestialPoleOffsetRadiansColumn],t[f+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=Ce(d,h,m),s}function _e(e,t,n){this.heading=a.defaultValue(e,0),this.pitch=a.defaultValue(t,0),this.roll=a.defaultValue(n,0)}function Me(e,a,t){this.x=e,this.y=a,this.s=t}function Ee(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this._xysFileUrlTemplate=s.Resource.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=a.defaultValue(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=a.defaultValue(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new fe(this._sampleZeroJulianEphemerisDate,0,X.TAI),this._stepSizeDays=a.defaultValue(e.stepSizeDays,1),this._samplesPerXysFile=a.defaultValue(e.samplesPerXysFile,1e3),this._totalSamples=a.defaultValue(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,n=this._denominators=new Array(t+1),r=this._xTable=new Array(t+1),i=Math.pow(this._stepSizeDays,t),o=0;o<=t;++o){n[o]=i,r[o]=o*this._stepSizeDays;for(var u=0;u<=t;++u)u!==o&&(n[o]*=o-u);n[o]=1/n[o]}this._work=new Array(t+1),this._coef=new Array(t+1)}fe.toGregorianDate=function(e,t){var n=!1,r=ee(e,he);a.defined(r)||(fe.addSeconds(e,-1,he),r=ee(he,he),n=!0);var i=r.dayNumber,s=r.secondsOfDay;s>=43200&&(i+=1);var o=i+68569|0,u=4*o/146097|0,l=4e3*((o=o-((146097*u+3)/4|0)|0)+1)/1461001|0,d=80*(o=o-(1461*l/4|0)+31|0)/2447|0,c=o-(2447*d/80|0)|0,f=d+2-12*(o=d/11|0)|0,h=100*(u-49)+l+o|0,m=s/Z.SECONDS_PER_HOUR|0,p=s-m*Z.SECONDS_PER_HOUR,y=p/Z.SECONDS_PER_MINUTE|0,w=0|(p-=y*Z.SECONDS_PER_MINUTE),C=(p-w)/Z.SECONDS_PER_MILLISECOND;return(m+=12)>23&&(m-=24),n&&(w+=1),a.defined(t)?(t.year=h,t.month=f,t.day=c,t.hour=m,t.minute=y,t.second=w,t.millisecond=C,t.isLeapSecond=n,t):new B(h,f,c,m,y,w,C,n)},fe.toDate=function(e){var a=fe.toGregorianDate(e,J),t=a.second;return a.isLeapSecond&&(t-=1),new Date(Date.UTC(a.year,a.month-1,a.day,a.hour,a.minute,t,a.millisecond))},fe.toIso8601=function(e,t){var n=fe.toGregorianDate(e,J),r=n.year,i=n.month,s=n.day,o=n.hour,u=n.minute,l=n.second,d=n.millisecond;return 1e4===r&&1===i&&1===s&&0===o&&0===u&&0===l&&0===d&&(r=9999,i=12,s=31,o=24),a.defined(t)||0===d?a.defined(t)&&0!==t?Y("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",r,i,s,o,u,l,(.01*d).toFixed(t).replace(".","").slice(0,t)):Y("%04d-%02d-%02dT%02d:%02d:%02dZ",r,i,s,o,u,l):Y("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",r,i,s,o,u,l,(.01*d).toString().replace(".",""))},fe.clone=function(e,t){if(a.defined(e))return a.defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new fe(e.dayNumber,e.secondsOfDay,X.TAI)},fe.compare=function(e,a){var t=e.dayNumber-a.dayNumber;return 0!==t?t:e.secondsOfDay-a.secondsOfDay},fe.equals=function(e,t){return e===t||a.defined(e)&&a.defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},fe.equalsEpsilon=function(e,t,n){return e===t||a.defined(e)&&a.defined(t)&&Math.abs(fe.secondsDifference(e,t))<=n},fe.totalDays=function(e){return e.dayNumber+e.secondsOfDay/Z.SECONDS_PER_DAY},fe.secondsDifference=function(e,a){return(e.dayNumber-a.dayNumber)*Z.SECONDS_PER_DAY+(e.secondsOfDay-a.secondsOfDay)},fe.daysDifference=function(e,a){return e.dayNumber-a.dayNumber+(e.secondsOfDay-a.secondsOfDay)/Z.SECONDS_PER_DAY},fe.computeTaiMinusUtc=function(e){Q.julianDate=e;var a=fe.leapSeconds,t=V(a,Q,$);return t<0&&(t=~t,--t<0&&(t=0)),a[t].offset},fe.addSeconds=function(e,a,t){return ae(e.dayNumber,e.secondsOfDay+a,t)},fe.addMinutes=function(e,a,t){var n=e.secondsOfDay+a*Z.SECONDS_PER_MINUTE;return ae(e.dayNumber,n,t)},fe.addHours=function(e,a,t){var n=e.secondsOfDay+a*Z.SECONDS_PER_HOUR;return ae(e.dayNumber,n,t)},fe.addDays=function(e,a,t){return ae(e.dayNumber+a,e.secondsOfDay,t)},fe.lessThan=function(e,a){return fe.compare(e,a)<0},fe.lessThanOrEquals=function(e,a){return fe.compare(e,a)<=0},fe.greaterThan=function(e,a){return fe.compare(e,a)>0},fe.greaterThanOrEquals=function(e,a){return fe.compare(e,a)>=0},fe.prototype.clone=function(e){return fe.clone(this,e)},fe.prototype.equals=function(e){return fe.equals(this,e)},fe.prototype.equalsEpsilon=function(e,a){return fe.equalsEpsilon(this,e,a)},fe.prototype.toString=function(){return fe.toIso8601(this)},fe.leapSeconds=[new G(new fe(2441317,43210,X.TAI),10),new G(new fe(2441499,43211,X.TAI),11),new G(new fe(2441683,43212,X.TAI),12),new G(new fe(2442048,43213,X.TAI),13),new G(new fe(2442413,43214,X.TAI),14),new G(new fe(2442778,43215,X.TAI),15),new G(new fe(2443144,43216,X.TAI),16),new G(new fe(2443509,43217,X.TAI),17),new G(new fe(2443874,43218,X.TAI),18),new G(new fe(2444239,43219,X.TAI),19),new G(new fe(2444786,43220,X.TAI),20),new G(new fe(2445151,43221,X.TAI),21),new G(new fe(2445516,43222,X.TAI),22),new G(new fe(2446247,43223,X.TAI),23),new G(new fe(2447161,43224,X.TAI),24),new G(new fe(2447892,43225,X.TAI),25),new G(new fe(2448257,43226,X.TAI),26),new G(new fe(2448804,43227,X.TAI),27),new G(new fe(2449169,43228,X.TAI),28),new G(new fe(2449534,43229,X.TAI),29),new G(new fe(2450083,43230,X.TAI),30),new G(new fe(2450630,43231,X.TAI),31),new G(new fe(2451179,43232,X.TAI),32),new G(new fe(2453736,43233,X.TAI),33),new G(new fe(2454832,43234,X.TAI),34),new G(new fe(2456109,43235,X.TAI),35),new G(new fe(2457204,43236,X.TAI),36),new G(new fe(2457754,43237,X.TAI),37)],me.NONE=Object.freeze({getPromiseToLoad:function(){return a.when()},compute:function(e,t){return a.defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new k(0,0,0,0,0),t}}),me.prototype.getPromiseToLoad=function(){return a.when(this._downloadPromise)},me.prototype.compute=function(e,t){if(a.defined(this._samples)){if(a.defined(t)||(t=new k(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 n=this._dates,r=this._lastIndex,i=0,s=0;if(a.defined(r)){var u=n[r],l=n[r+1],d=fe.lessThanOrEquals(u,e),c=!a.defined(l),f=c||fe.greaterThanOrEquals(l,e);if(d&&f)return i=r,!c&&l.equals(e)&&++i,s=i+1,xe(this,n,this._samples,e,i,s,t),t}var h=V(n,e,fe.compare,this._dateColumn);return h>=0?(h<n.length-1&&n[h+1].equals(e)&&++h,i=h,s=h):(i=(s=~h)-1)<0&&(i=0),this._lastIndex=i,xe(this,n,this._samples,e,i,s,t),t}if(a.defined(this._dataError))throw new o.RuntimeError(this._dataError)},_e.fromQuaternion=function(e,t){a.defined(t)||(t=new _e);var n=2*(e.w*e.y-e.z*e.x),r=1-2*(e.x*e.x+e.y*e.y),i=2*(e.w*e.x+e.y*e.z),s=1-2*(e.y*e.y+e.z*e.z),o=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(o,s),t.roll=Math.atan2(i,r),t.pitch=-u.CesiumMath.asinClamped(n),t},_e.fromDegrees=function(e,t,n,r){return a.defined(r)||(r=new _e),r.heading=e*u.CesiumMath.RADIANS_PER_DEGREE,r.pitch=t*u.CesiumMath.RADIANS_PER_DEGREE,r.roll=n*u.CesiumMath.RADIANS_PER_DEGREE,r},_e.clone=function(e,t){if(a.defined(e))return a.defined(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new _e(e.heading,e.pitch,e.roll)},_e.equals=function(e,t){return e===t||a.defined(e)&&a.defined(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},_e.equalsEpsilon=function(e,t,n,r){return e===t||a.defined(e)&&a.defined(t)&&u.CesiumMath.equalsEpsilon(e.heading,t.heading,n,r)&&u.CesiumMath.equalsEpsilon(e.pitch,t.pitch,n,r)&&u.CesiumMath.equalsEpsilon(e.roll,t.roll,n,r)},_e.prototype.clone=function(e){return _e.clone(this,e)},_e.prototype.equals=function(e){return _e.equals(this,e)},_e.prototype.equalsEpsilon=function(e,a,t){return _e.equalsEpsilon(this,e,a,t)},_e.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var Oe=new fe(0,0,X.TAI);function Se(e,a,t){var n=Oe;return n.dayNumber=a,n.secondsOfDay=t,fe.daysDifference(n,e._sampleZeroDateTT)}function ve(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var n,r=a.when.defer();e._chunkDownloadsInProgress[t]=r;var i=e._xysFileUrlTemplate;return n=a.defined(i)?i.getDerivedResource({templateValues:{0:t}}):new s.Resource({url:s.buildModuleUrl("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")}),a.when(n.fetchJson(),(function(a){e._chunkDownloadsInProgress[t]=!1;for(var n=e._samples,i=a.samples,s=t*e._samplesPerXysFile*3,o=0,u=i.length;o<u;++o)n[s+o]=i[o];r.resolve()})),r.promise}Ee.prototype.preload=function(e,t,n,r){var i=Se(this,e,t),s=Se(this,n,r),o=i/this._stepSizeDays-this._interpolationOrder/2|0;o<0&&(o=0);var u=s/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);for(var l=o/this._samplesPerXysFile|0,d=u/this._samplesPerXysFile|0,c=[],f=l;f<=d;++f)c.push(ve(this,f));return a.when.all(c)},Ee.prototype.computeXysRadians=function(e,t,n){var r=Se(this,e,t);if(!(r<0)){var i=r/this._stepSizeDays|0;if(!(i>=this._totalSamples)){var s=this._interpolationOrder,o=i-(s/2|0);o<0&&(o=0);var u=o+s;u>=this._totalSamples&&(o=(u=this._totalSamples-1)-s)<0&&(o=0);var l=!1,d=this._samples;if(a.defined(d[3*o])||(ve(this,o/this._samplesPerXysFile|0),l=!0),a.defined(d[3*u])||(ve(this,u/this._samplesPerXysFile|0),l=!0),!l){a.defined(n)?(n.x=0,n.y=0,n.s=0):n=new Me(0,0,0);var c,f,h=r-o*this._stepSizeDays,m=this._work,p=this._denominators,y=this._coef,w=this._xTable;for(c=0;c<=s;++c)m[c]=h-w[c];for(c=0;c<=s;++c){for(y[c]=1,f=0;f<=s;++f)f!==c&&(y[c]*=m[f]);y[c]*=p[c];var C=3*(o+c);n.x+=y[c]*d[C++],n.y+=y[c]*d[C++],n.s+=y[c]*d[C]}return n}}}};var De={},Te={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"}},Pe={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},ge={},Ne={east:new n.Cartesian3,north:new n.Cartesian3,up:new n.Cartesian3,west:new n.Cartesian3,south:new n.Cartesian3,down:new n.Cartesian3},Re=new n.Cartesian3,Ie=new n.Cartesian3,Ae=new n.Cartesian3;De.localFrameToFixedFrameGenerator=function(e,r){if(!Te.hasOwnProperty(e)||!Te[e].hasOwnProperty(r))throw new i.DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");var s,o=Te[e][r],d=e+r;return a.defined(ge[d])?s=ge[d]:(s=function(i,s,d){if(a.defined(d)||(d=new l.Matrix4),n.Cartesian3.equalsEpsilon(i,n.Cartesian3.ZERO,u.CesiumMath.EPSILON14))n.Cartesian3.unpack(Pe[e],0,Re),n.Cartesian3.unpack(Pe[r],0,Ie),n.Cartesian3.unpack(Pe[o],0,Ae);else if(u.CesiumMath.equalsEpsilon(i.x,0,u.CesiumMath.EPSILON14)&&u.CesiumMath.equalsEpsilon(i.y,0,u.CesiumMath.EPSILON14)){var c=u.CesiumMath.sign(i.z);n.Cartesian3.unpack(Pe[e],0,Re),"east"!==e&&"west"!==e&&n.Cartesian3.multiplyByScalar(Re,c,Re),n.Cartesian3.unpack(Pe[r],0,Ie),"east"!==r&&"west"!==r&&n.Cartesian3.multiplyByScalar(Ie,c,Ie),n.Cartesian3.unpack(Pe[o],0,Ae),"east"!==o&&"west"!==o&&n.Cartesian3.multiplyByScalar(Ae,c,Ae)}else{(s=a.defaultValue(s,t.Ellipsoid.WGS84)).geodeticSurfaceNormal(i,Ne.up);var f=Ne.up,h=Ne.east;h.x=-i.y,h.y=i.x,h.z=0,n.Cartesian3.normalize(h,Ne.east),n.Cartesian3.cross(f,h,Ne.north),n.Cartesian3.multiplyByScalar(Ne.up,-1,Ne.down),n.Cartesian3.multiplyByScalar(Ne.east,-1,Ne.west),n.Cartesian3.multiplyByScalar(Ne.north,-1,Ne.south),Re=Ne[e],Ie=Ne[r],Ae=Ne[o]}return d[0]=Re.x,d[1]=Re.y,d[2]=Re.z,d[3]=0,d[4]=Ie.x,d[5]=Ie.y,d[6]=Ie.z,d[7]=0,d[8]=Ae.x,d[9]=Ae.y,d[10]=Ae.z,d[11]=0,d[12]=i.x,d[13]=i.y,d[14]=i.z,d[15]=1,d},ge[d]=s),s},De.eastNorthUpToFixedFrame=De.localFrameToFixedFrameGenerator("east","north"),De.northEastDownToFixedFrame=De.localFrameToFixedFrameGenerator("north","east"),De.northUpEastToFixedFrame=De.localFrameToFixedFrameGenerator("north","up"),De.northWestUpToFixedFrame=De.localFrameToFixedFrameGenerator("north","west");var Ue=new c,ze=new n.Cartesian3(1,1,1),Fe=new l.Matrix4;De.headingPitchRollToFixedFrame=function(e,t,r,i,s){i=a.defaultValue(i,De.eastNorthUpToFixedFrame);var o=c.fromHeadingPitchRoll(t,Ue),u=l.Matrix4.fromTranslationQuaternionRotationScale(n.Cartesian3.ZERO,o,ze,Fe);return s=i(e,r,s),l.Matrix4.multiply(s,u,s)};var be=new l.Matrix4,We=new l.Matrix3;De.headingPitchRollQuaternion=function(e,a,t,n,r){var i=De.headingPitchRollToFixedFrame(e,a,t,n,be),s=l.Matrix4.getMatrix3(i,We);return c.fromRotationMatrix(s,r)};var qe=new n.Cartesian3(1,1,1),Le=new n.Cartesian3,Ve=new l.Matrix4,ke=new l.Matrix4,Ye=new l.Matrix3,Be=new c;De.fixedFrameToHeadingPitchRoll=function(e,r,i,s){r=a.defaultValue(r,t.Ellipsoid.WGS84),i=a.defaultValue(i,De.eastNorthUpToFixedFrame),a.defined(s)||(s=new _e);var o=l.Matrix4.getTranslation(e,Le);if(n.Cartesian3.equals(o,n.Cartesian3.ZERO))return s.heading=0,s.pitch=0,s.roll=0,s;var u=l.Matrix4.inverseTransformation(i(o,r,Ve),Ve),d=l.Matrix4.setScale(e,qe,ke);d=l.Matrix4.setTranslation(d,n.Cartesian3.ZERO,d),u=l.Matrix4.multiply(u,d,u);var f=c.fromRotationMatrix(l.Matrix4.getMatrix3(u,Ye),Be);return f=c.normalize(f,f),_e.fromQuaternion(f,s)};var je=u.CesiumMath.TWO_PI/86400,Ge=new fe;De.computeTemeToPseudoFixedMatrix=function(e,t){var n,r=(Ge=fe.addSeconds(e,-fe.computeTaiMinusUtc(e),Ge)).dayNumber,i=Ge.secondsOfDay,s=r-2451545,o=(24110.54841+(n=i>=43200?(s+.5)/Z.DAYS_PER_JULIAN_CENTURY:(s-.5)/Z.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+n*(.093104+-62e-7*n)))*je%u.CesiumMath.TWO_PI+(72921158553e-15+11772758384668e-32*(r-2451545.5))*((i+.5*Z.SECONDS_PER_DAY)%Z.SECONDS_PER_DAY),d=Math.cos(o),c=Math.sin(o);return a.defined(t)?(t[0]=d,t[1]=-c,t[2]=0,t[3]=c,t[4]=d,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new l.Matrix3(d,c,0,-c,d,0,0,0,1)},De.iau2006XysData=new Ee,De.earthOrientationParameters=me.NONE;var Ze=32.184;De.preloadIcrfFixed=function(e){var t=e.start.dayNumber,n=e.start.secondsOfDay+Ze,r=e.stop.dayNumber,i=e.stop.secondsOfDay+Ze,s=De.iau2006XysData.preload(t,n,r,i),o=De.earthOrientationParameters.getPromiseToLoad();return a.when.all([s,o])},De.computeIcrfToFixedMatrix=function(e,t){a.defined(t)||(t=new l.Matrix3);var n=De.computeFixedToIcrfMatrix(e,t);if(a.defined(n))return l.Matrix3.transpose(n,t)};var Xe=new Me(0,0,0),Je=new k(0,0,0,0,0,0),He=new l.Matrix3,$e=new l.Matrix3;De.computeFixedToIcrfMatrix=function(e,t){a.defined(t)||(t=new l.Matrix3);var n=De.earthOrientationParameters.compute(e,Je);if(a.defined(n)){var r=e.dayNumber,i=e.secondsOfDay+Ze,s=De.iau2006XysData.computeXysRadians(r,i,Xe);if(a.defined(s)){var o=s.x+n.xPoleOffset,d=s.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-o*o-d*d)),f=He;f[0]=1-c*o*o,f[3]=-c*o*d,f[6]=o,f[1]=-c*o*d,f[4]=1-c*d*d,f[7]=d,f[2]=-o,f[5]=-d,f[8]=1-c*(o*o+d*d);var h=l.Matrix3.fromRotationZ(-s.s,$e),m=l.Matrix3.multiply(f,h,He),p=e.dayNumber-2451545,y=(e.secondsOfDay-fe.computeTaiMinusUtc(e)+n.ut1MinusUtc)/Z.SECONDS_PER_DAY,w=.779057273264+y+.00273781191135448*(p+y);w=w%1*u.CesiumMath.TWO_PI;var C=l.Matrix3.fromRotationZ(w,$e),x=l.Matrix3.multiply(m,C,He),_=Math.cos(n.xPoleWander),M=Math.cos(n.yPoleWander),E=Math.sin(n.xPoleWander),O=Math.sin(n.yPoleWander),S=r-2451545+i/Z.SECONDS_PER_DAY,v=-47e-6*(S/=36525)*u.CesiumMath.RADIANS_PER_DEGREE/3600,D=Math.cos(v),T=Math.sin(v),P=$e;return P[0]=_*D,P[1]=_*T,P[2]=E,P[3]=-M*T+O*E*D,P[4]=M*D+O*E*T,P[5]=-O*_,P[6]=-O*T-M*E*D,P[7]=O*D-M*E*T,P[8]=M*_,l.Matrix3.multiply(x,P,t)}}};var Qe=new r.Cartesian4;De.pointToWindowCoordinates=function(e,a,t,n){return(n=De.pointToGLWindowCoordinates(e,a,t,n)).y=2*a[5]-n.y,n},De.pointToGLWindowCoordinates=function(e,n,i,s){a.defined(s)||(s=new t.Cartesian2);var o=Qe;return l.Matrix4.multiplyByVector(e,r.Cartesian4.fromElements(i.x,i.y,i.z,1,o),o),r.Cartesian4.multiplyByScalar(o,1/o.w,o),l.Matrix4.multiplyByVector(n,o,o),t.Cartesian2.fromCartesian4(o,s)};var Ke=new n.Cartesian3,ea=new n.Cartesian3,aa=new n.Cartesian3;De.rotationMatrixFromPositionVelocity=function(e,r,i,s){var o=a.defaultValue(i,t.Ellipsoid.WGS84).geodeticSurfaceNormal(e,Ke),d=n.Cartesian3.cross(r,o,ea);n.Cartesian3.equalsEpsilon(d,n.Cartesian3.ZERO,u.CesiumMath.EPSILON6)&&(d=n.Cartesian3.clone(n.Cartesian3.UNIT_X,d));var c=n.Cartesian3.cross(d,r,aa);return n.Cartesian3.normalize(c,c),n.Cartesian3.cross(r,c,d),n.Cartesian3.negate(d,d),n.Cartesian3.normalize(d,d),a.defined(s)||(s=new l.Matrix3),s[0]=r.x,s[1]=r.y,s[2]=r.z,s[3]=d.x,s[4]=d.y,s[5]=d.z,s[6]=c.x,s[7]=c.y,s[8]=c.z,s};var ta=new l.Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),na=new n.Cartographic,ra=new n.Cartesian3,ia=new n.Cartesian3,sa=new l.Matrix3,oa=new l.Matrix4,ua=new l.Matrix4;De.basisTo2D=function(e,a,t){var r=l.Matrix4.getTranslation(a,ia),i=e.ellipsoid,s=i.cartesianToCartographic(r,na),o=e.project(s,ra);n.Cartesian3.fromElements(o.z,o.x,o.y,o);var u=De.eastNorthUpToFixedFrame(r,i,oa),d=l.Matrix4.inverseTransformation(u,ua),c=l.Matrix4.getMatrix3(a,sa),f=l.Matrix4.multiplyByMatrix3(d,c,t);return l.Matrix4.multiply(ta,f,t),l.Matrix4.setTranslation(t,o,t),t},De.wgs84To2DModelMatrix=function(e,a,t){var r=e.ellipsoid,i=De.eastNorthUpToFixedFrame(a,r,oa),s=l.Matrix4.inverseTransformation(i,ua),o=r.cartesianToCartographic(a,na),u=e.project(o,ra);n.Cartesian3.fromElements(u.z,u.x,u.y,u);var d=l.Matrix4.fromTranslation(u,oa);return l.Matrix4.multiply(ta,s,t),l.Matrix4.multiply(d,t,t),t},De.buildUp=function(e,a){var t=a.clone(),r=e.clone();r=n.Cartesian3.normalize(r,r),Math.abs(n.Cartesian3.dot(r,t))>=1&&(r=Math.abs(n.Cartesian3.dot(t,n.Cartesian3.UNIT_Y))<1?n.Cartesian3.clone(n.Cartesian3.UNIT_Y,r):n.Cartesian3.clone(n.Cartesian3.UNIT_Z,r));var i=new n.Cartesian3;return n.Cartesian3.cross(r,t,i),i=n.Cartesian3.normalize(i,i),n.Cartesian3.cross(t,i,r),r=n.Cartesian3.normalize(r,r)},De.getHeading=function(e,a){var t;return t=u.CesiumMath.equalsEpsilon(Math.abs(e.z),1,u.CesiumMath.EPSILON3)?Math.atan2(a.y,a.x)-u.CesiumMath.PI_OVER_TWO:Math.atan2(e.y,e.x)-u.CesiumMath.PI_OVER_TWO,u.CesiumMath.TWO_PI-u.CesiumMath.zeroToTwoPi(t)},De.convertToColumbusCartesian=function(e){var a=new l.GeographicProjection,t=a.ellipsoid,r=new n.Cartesian3,i=new n.Cartographic;return t.cartesianToCartographic(e,i),a.project(i,r),n.Cartesian3.fromElements(r.z,r.x,r.y)},De.convertTo3DCartesian=function(e){var a=new l.GeographicProjection,t=a.ellipsoid,r=new n.Cartesian3,i=new n.Cartographic;return r=n.Cartesian3.fromElements(e.y,e.z,e.x),a.unproject(r,i),t.cartographicToCartesian(i,r)},e.Quaternion=c,e.Transforms=De}));
|