Agriculture-front-end/dist/Cesium/ThirdParty/google-earth-dbroot-parser.js

2 lines
214 KiB
JavaScript
Raw Normal View History

2023-04-23 09:41:12 +08:00
(()=>{window.cesiumGoogleEarthDbRootParser=function(d){"use strict";var f=d.Reader,u=d.util,n=d.roots.default||(d.roots.default={});return n.keyhole=function(){var b={};return b.dbroot=function(){var c={};return c.StringEntryProto=function(){function i(l){if(l)for(var r=Object.keys(l),t=0;t<r.length;++t)l[r[t]]!=null&&(this[r[t]]=l[r[t]])}return i.prototype.stringId=0,i.prototype.stringValue="",i.decode=function(r,t){r instanceof f||(r=f.create(r));for(var e=t===void 0?r.len:r.pos+t,o=new n.keyhole.dbroot.StringEntryProto;r.pos<e;){var a=r.uint32();switch(a>>>3){case 1:{o.stringId=r.fixed32();break}case 2:{o.stringValue=r.string();break}default:r.skipType(a&7);break}}if(!o.hasOwnProperty("stringId"))throw u.ProtocolError("missing required 'stringId'",{instance:o});if(!o.hasOwnProperty("stringValue"))throw u.ProtocolError("missing required 'stringValue'",{instance:o});return o},i.verify=function(r){return typeof r!="object"||r===null?"object expected":u.isInteger(r.stringId)?u.isString(r.stringValue)?null:"stringValue: string expected":"stringId: integer expected"},i.fromObject=function(r){if(r instanceof n.keyhole.dbroot.StringEntryProto)return r;var t=new n.keyhole.dbroot.StringEntryProto;return r.stringId!=null&&(t.stringId=r.stringId>>>0),r.stringValue!=null&&(t.stringValue=String(r.stringValue)),t},i.toObject=function(r,t){t||(t={});var e={};return t.defaults&&(e.stringId=0,e.stringValue=""),r.stringId!=null&&r.hasOwnProperty("stringId")&&(e.stringId=r.stringId),r.stringValue!=null&&r.hasOwnProperty("stringValue")&&(e.stringValue=r.stringValue),e},i.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},i.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/keyhole.dbroot.StringEntryProto"},i}(),c.StringIdOrValueProto=function(){function i(l){if(l)for(var r=Object.keys(l),t=0;t<r.length;++t)l[r[t]]!=null&&(this[r[t]]=l[r[t]])}return i.prototype.stringId=0,i.prototype.value="",i.decode=function(r,t){r instanceof f||(r=f.create(r));for(var e=t===void 0?r.len:r.pos+t,o=new n.keyhole.dbroot.StringIdOrValueProto;r.pos<e;){var a=r.uint32();switch(a>>>3){case 1:{o.stringId=r.fixed32();break}case 2:{o.value=r.string();break}default:r.skipType(a&7);break}}return o},i.verify=function(r){return typeof r!="object"||r===null?"object expected":r.stringId!=null&&r.hasOwnProperty("stringId")&&!u.isInteger(r.stringId)?"stringId: integer expected":r.value!=null&&r.hasOwnProperty("value")&&!u.isString(r.value)?"value: string expected":null},i.fromObject=function(r){if(r instanceof n.keyhole.dbroot.StringIdOrValueProto)return r;var t=new n.keyhole.dbroot.StringIdOrValueProto;return r.stringId!=null&&(t.stringId=r.stringId>>>0),r.value!=null&&(t.value=String(r.value)),t},i.toObject=function(r,t){t||(t={});var e={};return t.defaults&&(e.stringId=0,e.value=""),r.stringId!=null&&r.hasOwnProperty("stringId")&&(e.stringId=r.stringId),r.value!=null&&r.hasOwnProperty("value")&&(e.value=r.value),e},i.prototype.toJSON=function(){return this.constructor.toObject(this,d.util.toJSONOptions)},i.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/keyhole.dbroot.StringIdOrValueProto"},i}(),c.PlanetModelProto=function(){function i(l){if(l)for(var r=Object.keys(l),t=0;t<r.length;++t)l[r[t]]!=null&&(this[r[t]]=l[r[t]])}return i.prototype.radius=6378.137,i.prototype.flattening=.00335281066474748,i.prototype.elevationBias=0,i.prototype.negativeAltitudeExponentBias=0,i.prototype.compressedNegativeAltitudeThreshold=0,i.decode=function(r,t){r instanceof f||(r=f.create(r));for(var e=t===void 0?r.len:r.pos+t,o=new n.keyhole.dbroot.PlanetModelProto;r.pos<e;){var a=r.uint32();switch(a>>>3){case 1:{o.radius=r.double();break}case 2:{o.flattening=r.double();break}case 4:{o.elevationBias=r.double();break}case 5:{o.negativeAltitudeExponentBias=r.int32();break}case 6:{o.compressedNegativeAltitudeThreshold=r.double();break}default:r.skipType(a&7);break}}return o},i.verify=function(r){return typeof r!="object"||r===null?"object expected":r.radius!=null&&r.hasOwnProperty("radius")&&typeof r.radius!="