Cube('pandav:/com/panda-map3d/0.0.2/cesiumMap.jsx',['pandav:/npm/react/16.13.1','pandav:/com/panda-map3d/0.0.2/lib/render/parseScheme','pandav:/com/panda-map3d/0.0.2/lib/render/PdRender','pandav:/com/panda-map3d/0.0.2/lib/core/visualization','pandav:/com/panda-map3d/0.0.2/lib/core/cameraMove','pandav:/npm/axios/0.21.4/dist/axios.min','pandav:/com/load-utils/1.0.0','pandav:/npm/lodash/4.6.1/lodash','pandav:/com/panda-map3d/0.0.2/Tips'],function(a,b,c){function d(a){"@babel/helpers - typeof";return d='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},d(a)}function e(a){return h(a)||g(a)||o(a)||f()}function f(){throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.')}function g(a){if('undefined'!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a['@@iterator'])return Array.from(a)}function h(a){if(Array.isArray(a))return p(a)}function j(){"use strict";function b(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}),a[b]}function f(b,d,e,f){var g=d&&d.prototype instanceof l?d:l,h=Object.create(g.prototype),a=new C(f||[]);return F(h,'_invoke',{value:x(b,e,a)}),h}function k(a,b,c){try{return{type:'normal',arg:a.call(b,c)}}catch(a){return{type:'throw',arg:a}}}function l(){}function m(){}function q(){}function s(a){['next','throw','return'].forEach(function(c){b(a,c,function(a){return this._invoke(c,a)})})}function w(b,f){function c(e,g,j,i){var a=k(b[e],b,g);if('throw'!==a.type){var l=a.arg,m=l.value;return m&&'object'==d(m)&&t.call(m,'__await')?f.resolve(m.__await).then(function(a){c('next',a,j,i)},function(a){c('throw',a,j,i)}):f.resolve(m).then(function(a){l.value=a,j(l)},function(a){return c('throw',a,j,i)})}i(a.arg)}var e;F(this,'_invoke',{value:function(a,b){function d(){return new f(function(d,e){c(a,b,d,e)})}return e=e?e.then(d,d):d()}})}function x(a,b,d){var e='suspendedStart';return function(f,g){if('executing'===e)throw new Error('Generator is already running');if('completed'===e){if('throw'===f)throw g;return{value:E,done:!0}}for(d.method=f,d.arg=g;;){var h=d.delegate;if(h){var i=z(h,d);if(i){if(i===H)continue;return i}}if('next'===d.method)d.sent=d._sent=d.arg;else if('throw'===d.method){if('suspendedStart'===e)throw e='completed',d.arg;d.dispatchException(d.arg)}else'return'===d.method&&d.abrupt('return',d.arg);e='executing';var j=k(a,b,d);if('normal'===j.type){if(e=d.done?'completed':'suspendedYield',j.arg===H)continue;return{value:j.arg,done:d.done}}'throw'===j.type&&(e='completed',d.method='throw',d.arg=j.arg)}}}function z(b,c){var d=c.method,e=b.iterator[d];if(e===E)return c.delegate=null,'throw'===d&&b.iterator.return&&(c.method='return',c.arg=E,z(b,c),'throw'===c.method)||'return'!==d&&(c.method='throw',c.arg=new TypeError('The iterator does not provide a \''+d+'\' method')),H;var f=k(e,b.iterator,c.arg);if('throw'===f.type)return c.method='throw',c.arg=f.arg,c.delegate=null,H;var g=f.arg;return g?g.done?(c[b.resultName]=g.value,c.next=b.nextLoc,'return'!==c.method&&(c.method='next',c.arg=E),c.delegate=null,H):g:(c.method='throw',c.arg=new TypeError('iterator result is not an object'),c.delegate=null,H)}function A(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]),2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]),this.tryEntries.push(b)}function B(a){var b=a.completion||{};b.type='normal',delete b.arg,a.completion=b}function C(a){this.tryEntries=[{tryLoc:'root'}],a.forEach(A,this),this.reset(!0)}function D(a){if(a||''===a){var b=a[G];if(b)return b.call(a);if('function'==typeof a.next)return a;if(!isNaN(a.length)){var c=-1,e=function b(){for(;++c<a.length;)if(t.call(a,c))return b.value=a[c],b.done=!1,b;return b.value=E,b.done=!0,b};return e.next=e}}throw new TypeError(d(a)+' is not iterable')}j=function(){return h};var E,h={},e=Object.prototype,t=e.hasOwnProperty,F=Object.defineProperty||function(a,b,c){a[b]=c.value},n='function'==typeof Symbol?Symbol:{},G=n.iterator||'@@iterator',a=n.asyncIterator||'@@asyncIterator',c=n.toStringTag||'@@toStringTag';try{b({},'')}catch(a){b=function(a,b,c){return a[b]=c}}h.wrap=f;var H={},i={};b(i,G,function(){return this});var o=Object.getPrototypeOf,r=o&&o(o(D([])));r&&r!==e&&t.call(r,G)&&(i=r);var u=q.prototype=l.prototype=Object.create(i);return m.prototype=q,F(u,'constructor',{value:q,configurable:!0}),F(q,'constructor',{value:m,configurable:!0}),m.displayName=b(q,c,'GeneratorFunction'),h.isGeneratorFunction=function(a){var b='function'==typeof a&&a.constructor;return!!b&&(b===m||'GeneratorFunction'===(b.displayName||b.name))},h.mark=function(a){return Object.setPrototypeOf?Object.setPrototypeOf(a,q):(a.__proto__=q,b(a,c,'GeneratorFunction')),a.prototype=Object.create(u),a},h.awrap=function(a){return{__await:a}},s(w.prototype),b(w.prototype,a,function(){return this}),h.AsyncIterator=w,h.async=function(b,c,d,e,g){void 0===g&&(g=Promise);var j=new w(f(b,c,d,e),g);return h.isGeneratorFunction(c)?j:j.next().then(function(a){return a.done?a.value:j.next()})},s(u),b(u,c,'Generator'),b(u,G,function(){return this}),b(u,'toString',function(){return'[object Generator]'}),h.keys=function(a){var b=Object(a),c=[];for(var d in b)c.push(d);return c.reverse(),function a(){for(;c.length;){var d=c.pop();if(d in b)return a.value=d,a.done=!1,a}return a.done=!0,a}},h.values=D,C.prototype={constructor:C,reset:function(a){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method='next',this.arg=E,this.tryEntries.forEach(B),!a)for(var b in this)'t'===b.charAt(0)&&t.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=E)},stop:function(){this.done=!0;var a=this.tryEntries[0].completion;if('throw'===a.type)throw a.arg;return this.rval},dispatchException:function(b){function d(a,c){return h.type='throw',h.arg=b,e.next=a,c&&(e.method='next',e.arg=E),!!c}if(this.done)throw b;for(var e=this,f=this.tryEntries.length-1;0<=f;--f){var g=this.tryEntries[f],h=g.completion;if('root'===g.tryLoc)return d('end');if(g.tryLoc<=this.prev){var j=t.call(g,'catchLoc'),k=t.call(g,'finallyLoc');if(j&&k){if(this.prev<g.catchLoc)return d(g.catchLoc,!0);if(this.prev<g.finallyLoc)return d(g.finallyLoc)}else if(!j){if(!k)throw new Error('try statement without catch or finally');if(this.prev<g.finallyLoc)return d(g.finallyLoc)}else if(this.prev<g.catchLoc)return d(g.catchLoc,!0)}}},abrupt:function(b,c){for(var d,e=this.tryEntries.length-1;0<=e;--e)if(d=this.tryEntries[e],d.tryLoc<=this.prev&&t.call(d,'finallyLoc')&&this.prev<d.finallyLoc){var f=d;break}f&&('break'===b||'continue'===b)&&f.tryLoc<=c&&c<=f.finallyLoc&&(f=null);var g=f?f.completion:{};return g.type=b,g.arg=c,f?(this.method='next',this.next=f.finallyLoc,H):this.complete(g)},complete:function(a,b){if('throw'===a.type)throw a.arg;return'break'===a.type||'continue'===a.type?this.next=a.arg:'return'===a.type?(this.rval=this.arg=a.arg,this.method='return',this.next='end'):'normal'===a.type&&b&&(this.next=b),H},finish:function(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.finallyLoc===a)return this.complete(b.completion,b.afterLoc),B(b),H},catch:function(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.tryLoc===a){var d=b.completion;if('throw'===d.type){var f=d.arg;B(b)}return f}throw new Error('illegal catch attempt')},delegateYield:function(a,b,c){return this.delegate={iterator:D(a),resultName:b,nextLoc:c},'next'===this.method&&(this.arg=E),H}},h}function k(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}function l(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a){k(h,d,e,f,g,'next',a)}function g(a){k(h,d,e,f,g,'throw',a)}var h=a.apply(b,c);f(void 0)})}}function m(a,b){return r(a)||q(a,b)||o(a,b)||n()}function n(){throw new TypeError('Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.')}function o(a,b){if(a){if('string'==typeof a)return p(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return'Object'===c&&a.constructor&&(c=a.constructor.name),'Map'===c||'Set'===c?Array.from(a):'Arguments'===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?p(a,b):void 0}}function p(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}function q(b,c){var d=null==b?null:'undefined'!=typeof Symbol&&b[Symbol.iterator]||b['@@iterator'];if(null!=d){var g,h,j,k,l=[],a=!0,m=!1;try{if(j=(d=d.call(b)).next,0===c){if(Object(d)!==d)return;a=!1}else for(;!(a=(g=j.call(d)).done)&&(l.push(g.value),l.length!==c);a=!0);}catch(a){m=!0,h=a}finally{try{if(!a&&null!=d.return&&(k=d.return(),Object(k)!==k))return}finally{if(m)throw h}}return l}}function r(a){if(Array.isArray(a))return a}var s=c('pandav:/npm/react/16.13.1'),t=c('pandav:/com/panda-map3d/0.0.2/lib/render/parseScheme'),u=c('pandav:/com/panda-map3d/0.0.2/lib/render/PdRender'),v=c('pandav:/com/panda-map3d/0.0.2/lib/core/visualization'),w=c('pandav:/com/panda-map3d/0.0.2/lib/core/cameraMove'),x=c('pandav:/npm/axios/0.21.4/dist/axios.min'),y=c('pandav:/com/load-utils/1.0.0'),z=c('pandav:/npm/lodash/4.6.1/lodash'),i=c('pandav:/com/panda-map3d/0.0.2/Tips');return a.exports=function(a){var b=a.width,c=a.height,d=a.data,f=a.config,g=a.config.options,h=g.mapSettings,k=g.cameraSettings,n=g.effectSettings,o=g.series,p=s.useState(!0),q=m(p,2),r=q[0],A=q[1],B=s.useState([]),C=m(B,2),D=C[0],E=C[1],F=s.useRef(null),G=s.useState(null),H=m(G,2),I=H[0],J=H[1],K=s.useState(null),L=m(K,2),M=L[0],N=L[1],O=function(){var a=l(j().mark(function a(){var b,c,d,e,f,g,i,k,l,m;return j().wrap(function j(a){for(;1;)switch(a.prev=a.next){case 0:return a.next=2,y.loadCesiumCache();case 2:if(b=a.sent,c=b||window.CesiumNetworkPlug,d=c.OfflineCacheController,d.ruleList.add('*'),!h.url){a.next=19;break}return a.prev=7,a.next=10,x.get(h.url);case 10:e=a.sent,e.data?(f=z.cloneDeep(e.data),g=f.widgets,i=t.parseScheme.parseSchemes(f),k=t.parseScheme.parseDatas(i),l=z.assign({el:F.current},{widgets:g},k),m=new u.PdRender(l),N(m.viewer),A(!0)):A(!1),a.next=17;break;case 14:a.prev=14,a.t0=a['catch'](7),A(!1);case 17:a.next=20;break;case 19:A(!1);case 20:case'end':return a.stop()}},a,null,[[7,14]])}));return function b(){return a.apply(this,arguments)}}(),P=function(){var a=l(j().mark(function b(a){var c,d,f,g,h,i,l,m;return j().wrap(function j(b){for(;1;)switch(b.prev=b.next){case 0:if(!a){b.next=34;break}if(!n.url){b.next=17;break}return b.prev=2,b.next=5,x.get(n.url);case 5:c=b.sent,d=c.data,new v.EffectList(a,d),b.next=17;break;case 10:b.prev=10,b.t0=b['catch'](2),f=[].concat(e(window.baseEffect)),g=['water','build'],h=[],f.forEach(function(a){g.includes(a.type)&&h.push(a)}),new v.EffectList(a,{baseEffect:h});case 17:if(!k.url){b.next=33;break}if(!k.startCamera){b.next=32;break}return b.prev=19,b.next=22,x.get(k.url);case 22:i=b.sent,l=i.data,setTimeout(function(){var b=new w.CameraMoveList(a,{cameraJosn:l});J(b)},2e3),b.next=30;break;case 27:b.prev=27,b.t1=b['catch'](19),I&&I.destroy();case 30:b.next=33;break;case 32:I&&I.destroy();case 33:o.series&&(m=[],o.series.forEach(function(b){b.positionList.forEach(function(c){var d={tipType:'tip_1'===b.type?2:1,tipInfo:{viewer:a,position:JSON.parse(c.position),style:{depthTest:!1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}}};m.push(d)})}),E(m));case 34:case'end':return b.stop()}},b,null,[[2,10],[19,27]])}));return function c(b){return a.apply(this,arguments)}}();return s.useEffect(function(){M&&(P(M),M.scene.renderError.addEventListener(function(){return window.location.reload()}))},[M,n,k,o]),s.useEffect(function(){F.current&&O()},[h]),s.createElement(s.Fragment,null,s.createElement('div',{style:{height:c,width:b}},s.createElement('div',{style:{height:c,width:b,display:r?'block':'none'},ref:F}),0!==D.length&&s.createElement(i,{positions:D}),s.createElement('div',{style:{display:r?'none':'block',textAlign:'center',lineHeight:''.concat(c,'px'),color:'#fff',fontSize:40}},'\u5730\u56FE\u914D\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u914D\u7F6E')))},a.exports});