m4-w-fast 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/readFile.js CHANGED
@@ -1 +1 @@
1
- function a3_0x3ba0(_0x52ce72,_0x12bc60){const _0x23fe86=a3_0x23fe();return a3_0x3ba0=function(_0x3ba044,_0x5b0bdd){_0x3ba044=_0x3ba044-0x1d9;let _0x1625ca=_0x23fe86[_0x3ba044];return _0x1625ca;},a3_0x3ba0(_0x52ce72,_0x12bc60);}const a3_0x410f6c=a3_0x3ba0;(function(_0x1f17c1,_0x50dce0){const _0x10a894=a3_0x3ba0,_0x2462cb=_0x1f17c1();while(!![]){try{const _0x5c7e03=-parseInt(_0x10a894(0x20b))/0x1+parseInt(_0x10a894(0x1ed))/0x2*(-parseInt(_0x10a894(0x1e2))/0x3)+-parseInt(_0x10a894(0x1f6))/0x4*(-parseInt(_0x10a894(0x1e0))/0x5)+parseInt(_0x10a894(0x1f3))/0x6*(-parseInt(_0x10a894(0x21d))/0x7)+-parseInt(_0x10a894(0x23b))/0x8*(parseInt(_0x10a894(0x1f9))/0x9)+-parseInt(_0x10a894(0x20f))/0xa+parseInt(_0x10a894(0x21a))/0xb;if(_0x5c7e03===_0x50dce0)break;else _0x2462cb['push'](_0x2462cb['shift']());}catch(_0x28fa01){_0x2462cb['push'](_0x2462cb['shift']());}}}(a3_0x23fe,0x6a623));import{contours}from'd3-contour';import a3_0x4e0606 from'@turf/area';import{featureCollection as a3_0x461e3a}from'@turf/helpers';import a3_0x1ddee9 from'decimal.js';export class readFileM4{['filePath']='';['nx']=0x0;['ny']=0x0;[a3_0x410f6c(0x227)]=0x0;['minLat']=0x0;[a3_0x410f6c(0x23c)]=0x0;[a3_0x410f6c(0x207)]=0x0;['values']=[];[a3_0x410f6c(0x230)]=-Infinity;[a3_0x410f6c(0x200)]=Infinity;[a3_0x410f6c(0x220)]='';[a3_0x410f6c(0x22c)]=new Map();constructor(_0x21fd05){const _0x2e4ed1=a3_0x410f6c;this[_0x2e4ed1(0x21b)]=_0x21fd05||'';}async[a3_0x410f6c(0x228)](_0x231152){const _0x5c11c9=a3_0x410f6c,_0x7ef2ef=await fetch(this[_0x5c11c9(0x21b)]);if(!_0x7ef2ef['ok'])return new Promise((_0x45b3aa,_0x41e9df)=>{_0x41e9df('该时次未获取到文件');});const _0x5db7e8=await _0x7ef2ef[_0x5c11c9(0x20c)](),_0x10d038=_0x5db7e8[_0x5c11c9(0x22d)](/\r\n/g,'\x0a')[_0x5c11c9(0x22d)](/\r/g,'\x0a')['split']('\x0a');if(_0x10d038[_0x5c11c9(0x236)]<0x4)return new Promise((_0x5e5474,_0x15df21)=>{const _0x1acc9a=_0x5c11c9;_0x15df21(_0x1acc9a(0x211));});const _0xdcf709=(_0x10d038[0x1]??'')[_0x5c11c9(0x233)]()[_0x5c11c9(0x209)](/\s+/);let _0x40f809=0x2;while(_0xdcf709[_0x5c11c9(0x236)]<0x13){_0xdcf709['push'](...(_0x10d038[_0x40f809]??'')[_0x5c11c9(0x233)]()[_0x5c11c9(0x209)](/\s+/)),_0x40f809++;}this[_0x5c11c9(0x23c)]=Number(_0xdcf709[0x6]);const _0x2a7a99=Number(_0xdcf709[0x8]),_0x1c6aae=Number(_0xdcf709[0xa]),_0x2c1c29=Number(_0xdcf709[0xb]);this['nx']=Number(_0xdcf709[0xc]),this['ny']=Number(_0xdcf709[0xd]),this[_0x5c11c9(0x227)]=_0x2a7a99,this[_0x5c11c9(0x224)]=_0x1c6aae,this[_0x5c11c9(0x207)]=Math[_0x5c11c9(0x223)](Number(_0xdcf709[0x7]))*(_0x1c6aae>_0x2c1c29?-0x1:0x1);const _0x55cc67=this['nx']*this['ny'];let _0x4d1008=0x0;for(let _0x43c282=_0x40f809;_0x43c282<_0x10d038[_0x5c11c9(0x236)]&&_0x4d1008<_0x55cc67;_0x43c282++){const _0x13975b=_0x10d038[_0x43c282][_0x5c11c9(0x233)]()??'',_0x4d46d1=_0x13975b[_0x5c11c9(0x209)](/\s+/);if(!_0x4d46d1||_0x4d46d1[_0x5c11c9(0x236)]===0x0)continue;for(let _0x19dc77=0x0;_0x19dc77<_0x4d46d1[_0x5c11c9(0x236)]&&_0x4d1008<_0x55cc67;_0x19dc77++){let _0xd8f0c8=Number(_0x4d46d1[_0x19dc77]);if(_0x231152?.['convertTemKtoC'])_0xd8f0c8=new a3_0x1ddee9(_0xd8f0c8)['minus'](272.15)['toNumber']();else _0x231152?.[_0x5c11c9(0x1dd)]&&(_0xd8f0c8=new a3_0x1ddee9(_0xd8f0c8)['plus'](_0x231152['plusOffset'])[_0x5c11c9(0x225)]());this['values'][_0x5c11c9(0x217)](_0xd8f0c8),this[_0x5c11c9(0x200)]=Math[_0x5c11c9(0x1f8)](this['minVal'],_0xd8f0c8),this[_0x5c11c9(0x230)]=Math[_0x5c11c9(0x222)](this[_0x5c11c9(0x230)],_0xd8f0c8),_0x4d1008++;}}}[a3_0x410f6c(0x232)](_0x15171b,_0x5d8530){const _0x309b78=a3_0x410f6c;this['nx']=_0x15171b['nx'],this['ny']=_0x15171b['ny'],this['minLng']=_0x15171b[_0x309b78(0x227)],this['minLat']=_0x15171b[_0x309b78(0x224)],this['gjLng']=_0x15171b['gjLng'],this[_0x309b78(0x207)]=_0x15171b[_0x309b78(0x207)];if(_0x5d8530?.[_0x309b78(0x221)])for(let _0x2b4a34=0x0;_0x2b4a34<_0x15171b['values'][_0x309b78(0x236)];_0x2b4a34++){_0x15171b[_0x309b78(0x21c)][_0x2b4a34]=new a3_0x1ddee9(_0x15171b[_0x309b78(0x21c)][_0x2b4a34])['minus'](272.15)[_0x309b78(0x225)]();}else{if(_0x5d8530?.[_0x309b78(0x1dd)])for(let _0x56c300=0x0;_0x56c300<_0x15171b[_0x309b78(0x21c)][_0x309b78(0x236)];_0x56c300++){_0x15171b[_0x309b78(0x21c)][_0x56c300]=new a3_0x1ddee9(_0x15171b[_0x309b78(0x21c)][_0x56c300])[_0x309b78(0x1e8)](_0x5d8530[_0x309b78(0x1dd)])[_0x309b78(0x225)]();}else this[_0x309b78(0x21c)]=_0x15171b[_0x309b78(0x21c)];}this[_0x309b78(0x237)]();}[a3_0x410f6c(0x20e)](_0x1c8c67){const _0x471b8b=a3_0x410f6c;if(this[_0x471b8b(0x21c)]['length']===0x0)return{'type':'FeatureCollection','features':[]};let _0x24f1c3=[];if(_0x1c8c67['length']===0x0)_0x1c8c67=this[_0x471b8b(0x1df)]();const _0x5e0ca4=[];for(let _0x48c5e5=0x0;_0x48c5e5<_0x1c8c67[_0x471b8b(0x236)];_0x48c5e5++){const _0x255f49=_0x1c8c67[_0x48c5e5],_0x2cc574=_0x48c5e5<_0x1c8c67[_0x471b8b(0x236)]-0x1?_0x1c8c67[_0x48c5e5+0x1]:Infinity;if(_0x255f49<this[_0x471b8b(0x200)]&&_0x2cc574<this[_0x471b8b(0x200)])continue;if(_0x255f49>this['maxVal']&&_0x2cc574>this[_0x471b8b(0x230)])continue;_0x5e0ca4[_0x471b8b(0x217)](_0x255f49);}const _0x52f30b=contours()[_0x471b8b(0x1e7)]([this['nx'],this['ny']])['thresholds'](_0x5e0ca4),_0x195d5e=_0x52f30b(this[_0x471b8b(0x21c)]);for(const _0x18f7b7 of _0x195d5e){for(const _0x5bb1bb of _0x18f7b7[_0x471b8b(0x201)]){if(Array[_0x471b8b(0x215)](_0x5bb1bb))for(const _0x3200cc of _0x5bb1bb){_0x3200cc[_0x471b8b(0x20d)](_0xa31996=>{const _0x2a3de9=_0x471b8b,_0x254ff0=_0xa31996[0x0],_0x542d23=_0xa31996[0x1];if(_0x254ff0==null||_0x542d23==null||Number[_0x2a3de9(0x1dc)](_0x254ff0)||Number[_0x2a3de9(0x1dc)](_0x542d23))return null;const _0x1fbf07=new a3_0x1ddee9(this[_0x2a3de9(0x227)])[_0x2a3de9(0x1e8)](new a3_0x1ddee9(_0x254ff0)[_0x2a3de9(0x22b)](this[_0x2a3de9(0x23c)]))[_0x2a3de9(0x225)](),_0x5bb007=new a3_0x1ddee9(this[_0x2a3de9(0x224)])['plus'](new a3_0x1ddee9(_0x542d23)['times'](this['gjLat']))['toNumber']();_0xa31996[0x0]=_0x1fbf07,_0xa31996[0x1]=_0x5bb007;});}}_0x24f1c3['push']({'type':_0x471b8b(0x1ee),'properties':{'z':_0x18f7b7[_0x471b8b(0x1e9)]},'geometry':_0x18f7b7});}return{'type':'FeatureCollection','features':_0x24f1c3};}[a3_0x410f6c(0x22e)](_0x2d5a1f,_0x381346){const _0x41325f=a3_0x410f6c;if(this[_0x41325f(0x21c)][_0x41325f(0x236)]===0x0)return{'type':_0x41325f(0x1e3),'features':[]};let _0x173847=[];if(_0x2d5a1f[_0x41325f(0x236)]===0x0)_0x2d5a1f=this[_0x41325f(0x1df)]();const _0x1023c3=[];for(let _0x436c9c=0x0;_0x436c9c<_0x2d5a1f['length'];_0x436c9c++){const _0x148186=_0x2d5a1f[_0x436c9c],_0x4b3597=_0x436c9c<_0x2d5a1f['length']-0x1?_0x2d5a1f[_0x436c9c+0x1]:Infinity;if(_0x148186<this['minVal']&&_0x4b3597<this[_0x41325f(0x200)])continue;if(_0x148186>this['maxVal']&&_0x4b3597>this[_0x41325f(0x230)])continue;_0x1023c3[_0x41325f(0x217)](_0x148186);}const _0x1c91fc=contours()[_0x41325f(0x1e7)]([this['nx'],this['ny']])[_0x41325f(0x1f2)](_0x1023c3),_0x22b651=_0x1c91fc(this['values']),_0x549d9f=this[_0x41325f(0x227)],_0x9b506a=this[_0x41325f(0x224)],_0x16ac35=_0x549d9f+this['nx']*this['gjLng'],_0x3e7f64=_0x9b506a+this['ny']*this['gjLat'],_0x321a24=_0x16ac35-_0x549d9f,_0x24e8fb=_0x3e7f64-_0x9b506a,_0x3a6c05=_0x381346?.['width']||0x400,_0x9062f7=_0x381346?.[_0x41325f(0x235)]||Math[_0x41325f(0x222)](0x1,Math['round'](_0x3a6c05*(_0x24e8fb/Math[_0x41325f(0x222)](1e-12,_0x321a24)))),_0x3d228c=_0x381346?.[_0x41325f(0x204)]||(typeof devicePixelRatio!=='undefined'?devicePixelRatio:0x1),_0x175d82=document[_0x41325f(0x1ea)](_0x41325f(0x1d9));if(!_0x175d82)return null;const _0x10dba1=_0x175d82['getContext']('2d');if(!_0x10dba1)return null;_0x175d82[_0x41325f(0x1e1)]=_0x3a6c05*_0x3d228c,_0x175d82[_0x41325f(0x235)]=_0x9062f7*_0x3d228c,_0x10dba1[_0x41325f(0x214)](_0x3d228c,_0x3d228c);for(const _0x388e5d of _0x22b651){const _0x2cf730=_0x388e5d['value'];_0x10dba1[_0x41325f(0x1e4)]();for(const _0xd99508 of _0x388e5d[_0x41325f(0x201)]){if(Array['isArray'](_0xd99508))for(const _0x2f9341 of _0xd99508){_0x2f9341[_0x41325f(0x20d)]((_0x5f1e14,_0x486b62)=>{const _0x2c609f=_0x41325f,_0x154f44=(_0x5f1e14[0x0]-_0x549d9f)/_0x321a24*_0x3a6c05,_0x59ef98=_0x9062f7-(_0x5f1e14[0x1]-_0x9b506a)/_0x24e8fb*_0x9062f7;_0x486b62===0x0?_0x10dba1[_0x2c609f(0x239)](_0x154f44,_0x59ef98):_0x10dba1[_0x2c609f(0x23a)](_0x154f44,_0x59ef98);});}}_0x10dba1[_0x41325f(0x216)](),_0x10dba1[_0x41325f(0x212)]=this[_0x41325f(0x206)](_0x2cf730,_0x2d5a1f,[]),_0x10dba1[_0x41325f(0x20a)]();}return _0x175d82;}[a3_0x410f6c(0x206)](_0x12a6b6,_0x2296b3,_0x398cab){const _0x21d15a=a3_0x410f6c;let _0x461f62='rgba(255,255,255,0)';const _0x999250=_0x2296b3[_0x21d15a(0x226)](_0x12a6b6);if(typeof _0x398cab[_0x999250]==_0x21d15a(0x21e))_0x461f62=_0x398cab[_0x999250];else _0x999250!==-0x1&&(_0x461f62='rgba('+_0x398cab[_0x999250][0x0]+','+_0x398cab[_0x999250][0x1]+','+_0x398cab[_0x999250][0x2]+','+(_0x398cab[_0x999250][0x3]||_0x398cab[_0x999250][0x3]===0x0?_0x398cab[_0x999250][0x3]:0x1)+')');return _0x461f62;}async[a3_0x410f6c(0x1e6)](_0x1056a0,_0x52d7b7,_0x24931,_0x7b5450){const _0x4888f3=a3_0x410f6c,_0x5db121=_0x7b5450?_0x7b5450:navigator[_0x4888f3(0x1fb)]-0x4||0x1,_0x2737e7=Math[_0x4888f3(0x1f8)](_0x5db121,Math[_0x4888f3(0x222)](0x1,_0x1056a0[_0x4888f3(0x238)][_0x4888f3(0x236)])),_0x306828=this['chunkArray'](_0x1056a0[_0x4888f3(0x238)],_0x2737e7),_0x59ee45=[],_0x22cea1=_0x306828[_0x4888f3(0x1f4)](_0xacfb8b=>{const _0x1da0fd=_0x4888f3,_0x1fdc13=new Worker(_0x24931,{'type':_0x1da0fd(0x1e5)});return _0x59ee45[_0x1da0fd(0x217)](_0x1fdc13),new Promise(_0x3e4d0c=>{const _0x589bd4=_0x1da0fd;_0x1fdc13[_0x589bd4(0x1fc)]=_0x5e29fd=>{const _0x146caf=_0x589bd4;_0x3e4d0c(_0x5e29fd[_0x146caf(0x203)]['features']);},_0x1fdc13['onerror']=_0x2d466b=>{const _0x57bff7=_0x589bd4;console[_0x57bff7(0x1f7)](_0x2d466b);},_0x1fdc13[_0x589bd4(0x1f1)]({'isoChunk':_0xacfb8b,'gansuFeatures':_0x52d7b7[_0x589bd4(0x238)]});});}),_0x2cb358=await Promise[_0x4888f3(0x205)](_0x22cea1);_0x59ee45[_0x4888f3(0x20d)](_0x1c1914=>_0x1c1914['terminate']());const _0x49ff41=_0x2cb358[_0x4888f3(0x208)]();return a3_0x461e3a(_0x49ff41);}async[a3_0x410f6c(0x1de)](_0x2436fb,_0x1450c0,_0x3bfd51){const _0x361dc7=a3_0x410f6c;if(this[_0x361dc7(0x21c)][_0x361dc7(0x236)]===0x0)return{'type':_0x361dc7(0x1e3),'features':[]};let _0x12a450=[];if(_0x2436fb[_0x361dc7(0x236)]===0x0)_0x2436fb=this[_0x361dc7(0x1df)]();const _0x2017aa=[],_0x257e9c=_0x3bfd51?_0x3bfd51:navigator['hardwareConcurrency']-0x4||0x1,_0x4df9b8=Math['min'](_0x257e9c,Math[_0x361dc7(0x222)](0x1,_0x2436fb[_0x361dc7(0x236)])),_0x18cdd6=this[_0x361dc7(0x1f0)](_0x2436fb,_0x4df9b8),_0x2bfce3=_0x18cdd6[_0x361dc7(0x1f4)](_0x5a4996=>{const _0x14037f=_0x361dc7,_0x2ed949=new Worker(_0x1450c0,{'type':_0x14037f(0x1e5)});return _0x2017aa['push'](_0x2ed949),new Promise(_0x26d955=>{const _0x29bcc3=_0x14037f;_0x2ed949['onmessage']=_0x529e23=>{const _0x2c93a7=a3_0x3ba0;_0x26d955(_0x529e23[_0x2c93a7(0x203)][_0x2c93a7(0x238)]);},_0x2ed949[_0x29bcc3(0x1fa)]=_0x227a23=>{const _0x482c2a=_0x29bcc3;console[_0x482c2a(0x1f7)](_0x227a23);},_0x2ed949[_0x29bcc3(0x1f1)]({'breaks':_0x5a4996,'values':this[_0x29bcc3(0x21c)],'nx':this['nx'],'ny':this['ny'],'minVal':this[_0x29bcc3(0x200)],'maxVal':this['maxVal'],'minLng':this[_0x29bcc3(0x227)],'minLat':this['minLat'],'gjLng':this[_0x29bcc3(0x23c)],'gjLat':this[_0x29bcc3(0x207)]});});}),_0xcfdae5=await Promise['all'](_0x2bfce3);return _0x2017aa[_0x361dc7(0x20d)](_0x25a002=>_0x25a002[_0x361dc7(0x210)]()),_0xcfdae5[_0x361dc7(0x20d)](_0x4aa6fa=>{const _0x3a5a8d=_0x361dc7;_0x12a450[_0x3a5a8d(0x217)](..._0x4aa6fa);}),_0x12a450=this[_0x361dc7(0x1db)](_0x12a450),{'type':_0x361dc7(0x1e3),'features':_0x12a450};}[a3_0x410f6c(0x1da)](){const _0x2f5c26=a3_0x410f6c;this[_0x2f5c26(0x22c)][_0x2f5c26(0x21f)]();}[a3_0x410f6c(0x231)](_0x20eca2=[],_0x22044b){const _0x156927=a3_0x410f6c;if(typeof _0x22044b!==_0x156927(0x1fd)&&this[_0x156927(0x22c)][_0x156927(0x1fe)](_0x22044b)){const _0x342f51=this[_0x156927(0x22c)][_0x156927(0x1fe)](_0x22044b)||[],_0x217c68=this['sortFeaturesByArea']?this['sortFeaturesByArea'](_0x342f51):_0x342f51;return{'type':_0x156927(0x1e3),'features':_0x217c68};}if(this[_0x156927(0x21c)][_0x156927(0x236)]===0x0)return{'type':_0x156927(0x1e3),'features':[]};if(_0x20eca2['length']===0x0)_0x20eca2=this[_0x156927(0x1df)]();const _0x508b02=_0x20eca2['join'](',');if(this[_0x156927(0x220)]!==_0x508b02){this[_0x156927(0x220)]=_0x508b02,this['_maskCache']['clear']();const _0x263530=this[_0x156927(0x227)],_0x4c67ca=this[_0x156927(0x224)],_0x12ad27=this[_0x156927(0x23c)],_0x19d22b=this[_0x156927(0x207)],_0x1c00f5=_0xe2d203=>{const _0x13685d=_0x156927;let _0x107f6d=0x0;for(let _0x1a08fd=0x0,_0x1c49f1=_0xe2d203[_0x13685d(0x236)];_0x1a08fd<_0x1c49f1;_0x1a08fd++){const _0x28cfe8=_0xe2d203[_0x1a08fd][0x0],_0x5e35a1=_0xe2d203[_0x1a08fd][0x1],_0x43536c=_0xe2d203[(_0x1a08fd+0x1)%_0x1c49f1][0x0],_0x3b04dd=_0xe2d203[(_0x1a08fd+0x1)%_0x1c49f1][0x1];if(_0x28cfe8==null||_0x5e35a1==null||_0x43536c==null||_0x3b04dd==null)continue;_0x107f6d+=_0x28cfe8*_0x3b04dd-_0x43536c*_0x5e35a1;}return _0x107f6d/0x2;},_0x56262d=(_0x106ba7,_0x1cc119)=>{const _0x4f0cae=_0x156927;if(!_0x106ba7)return![];const _0x49d99a=_0x106ba7[0x0],_0x521f1e=_0x106ba7[0x1];let _0x44600d=![];for(let _0x3c773a=0x0,_0x297bc5=_0x1cc119[_0x4f0cae(0x236)]-0x1;_0x3c773a<_0x1cc119[_0x4f0cae(0x236)];_0x297bc5=_0x3c773a++){const _0x14de8f=_0x1cc119[_0x3c773a][0x0],_0x100ddc=_0x1cc119[_0x3c773a][0x1],_0x485006=_0x1cc119[_0x297bc5][0x0],_0x549368=_0x1cc119[_0x297bc5][0x1],_0x378177=_0x100ddc>_0x521f1e!==_0x549368>_0x521f1e&&_0x49d99a<(_0x485006-_0x14de8f)*(_0x521f1e-_0x100ddc)/(_0x549368-_0x100ddc)+_0x14de8f;if(_0x378177)_0x44600d=!_0x44600d;}return _0x44600d;},_0x27e03b=_0x313fe5=>{const _0x90442=_0x156927,_0x15b2ee=[];let _0x1148b4=null,_0x373c6b=null;for(let _0x512db4=0x0;_0x512db4<_0x313fe5[_0x90442(0x236)];_0x512db4++){const _0x3b6234=_0x313fe5[_0x512db4];if(!_0x3b6234)continue;const _0x38dd84=_0x3b6234[0x0],_0x144abc=_0x3b6234[0x1];if(_0x38dd84==null||_0x144abc==null||Number[_0x90442(0x1dc)](_0x38dd84)||Number[_0x90442(0x1dc)](_0x144abc))continue;const _0x3d056f=_0x263530+_0x38dd84*_0x12ad27,_0x29c26e=_0x4c67ca+_0x144abc*_0x19d22b;if(_0x1148b4!==null&&_0x373c6b!==null&&_0x1148b4===_0x3d056f&&_0x373c6b===_0x29c26e){_0x1148b4=_0x3d056f,_0x373c6b=_0x29c26e;continue;}_0x15b2ee[_0x90442(0x217)]([_0x3d056f,_0x29c26e]),_0x1148b4=_0x3d056f,_0x373c6b=_0x29c26e;}if(_0x15b2ee['length']===0x0)return _0x15b2ee;const _0x3a3631=_0x15b2ee[0x0],_0x22847a=_0x15b2ee[_0x15b2ee['length']-0x1];if(_0x3a3631[0x0]!==_0x22847a[0x0]||_0x3a3631[0x1]!==_0x22847a[0x1])_0x15b2ee[_0x90442(0x217)]([_0x3a3631[0x0],_0x3a3631[0x1]]);return _0x15b2ee;},_0x24d44c=_0x20eca2['length']-0x1;for(let _0x2d77a8=0x0;_0x2d77a8<_0x20eca2[_0x156927(0x236)];_0x2d77a8++){const _0x33e734=_0x20eca2[_0x2d77a8],_0x1e695b=_0x2d77a8<_0x24d44c?_0x20eca2[_0x2d77a8+0x1]:Infinity,_0x2255b9=Array['from']({'length':this[_0x156927(0x21c)][_0x156927(0x236)]});let _0x5a4c57=![];for(let _0x2b934d=0x0;_0x2b934d<this[_0x156927(0x21c)]['length'];_0x2b934d++){const _0x95c1cd=this[_0x156927(0x21c)][_0x2b934d],_0x480860=_0x95c1cd>=_0x33e734&&_0x95c1cd<_0x1e695b?0x1:0x0;if(_0x480860)_0x5a4c57=!![];_0x2255b9[_0x2b934d]=_0x480860;}if(!_0x5a4c57)continue;const _0x20de04=contours()['size']([this['nx'],this['ny']])['thresholds']([0.5]),_0x5b2413=_0x20de04[_0x156927(0x1ef)]?_0x20de04[_0x156927(0x1ef)](_0x2255b9):_0x20de04(_0x2255b9);if(!_0x5b2413||_0x5b2413[_0x156927(0x236)]===0x0)continue;const _0x372551=[];for(const _0x5837e4 of _0x5b2413){const _0x5910db=_0x5837e4&&_0x5837e4[_0x156927(0x201)];if(!_0x5910db)continue;for(const _0x489fae of _0x5910db){let _0x1b146d=[];if(Array['isArray'](_0x489fae)&&_0x489fae['length']>0x0&&typeof _0x489fae[0x0][0x0]===_0x156927(0x1ff))_0x1b146d=[_0x489fae];else{if(Array[_0x156927(0x215)](_0x489fae))_0x1b146d=_0x489fae;else continue;}const _0x4d8787=_0x1b146d[_0x156927(0x1f4)](_0x53698a=>({'ring':_0x53698a,'area':Math[_0x156927(0x223)](_0x1c00f5(_0x53698a))}))[_0x156927(0x22f)]((_0x40bfb3,_0x11992e)=>_0x11992e['area']-_0x40bfb3['area']),_0x2a9691=Array[_0x156927(0x213)]({'length':_0x4d8787['length']})[_0x156927(0x20a)](![]);for(let _0x3202c7=0x0;_0x3202c7<_0x4d8787[_0x156927(0x236)];_0x3202c7++){if(_0x2a9691[_0x3202c7])continue;const _0x13b32d=_0x4d8787[_0x3202c7][_0x156927(0x234)];_0x2a9691[_0x3202c7]=!![];const _0x23c67d=[];for(let _0x5de863=0x0;_0x5de863<_0x4d8787[_0x156927(0x236)];_0x5de863++){if(_0x2a9691[_0x5de863])continue;const _0x58568b=_0x4d8787[_0x5de863][_0x156927(0x234)],_0x1ad908=_0x58568b[0x0];_0x1ad908&&_0x56262d(_0x1ad908,_0x13b32d)&&(_0x23c67d[_0x156927(0x217)](_0x58568b),_0x2a9691[_0x5de863]=!![]);}const _0x4313ad=_0x27e03b(_0x13b32d);if(_0x4313ad[_0x156927(0x236)]<0x4)continue;const _0x4a3428=[];for(const _0x1da59b of _0x23c67d){const _0x2a77c6=_0x27e03b(_0x1da59b);if(_0x2a77c6[_0x156927(0x236)]>=0x4)_0x4a3428[_0x156927(0x217)](_0x2a77c6);}_0x372551[_0x156927(0x217)]({'type':_0x156927(0x1ee),'properties':{'z':_0x33e734},'geometry':{'type':_0x156927(0x202),'coordinates':[_0x4313ad,..._0x4a3428]}});}}}_0x372551[_0x156927(0x236)]&&this[_0x156927(0x22c)][_0x156927(0x218)](_0x33e734,_0x372551);}}if(typeof _0x22044b!=='undefined'){const _0x40a3ac=this[_0x156927(0x22c)][_0x156927(0x1fe)](_0x22044b)||[],_0x38a1d5=this[_0x156927(0x1db)]?this[_0x156927(0x1db)](_0x40a3ac):_0x40a3ac;return{'type':'FeatureCollection','features':_0x38a1d5};}const _0x5c71ed=[];for(const _0x45fbe5 of this[_0x156927(0x22c)][_0x156927(0x21c)]()){_0x5c71ed[_0x156927(0x217)](..._0x45fbe5);}const _0x2c0765=this['sortFeaturesByArea']?this['sortFeaturesByArea'](_0x5c71ed):_0x5c71ed;return{'type':_0x156927(0x1e3),'features':_0x2c0765};}['getJsonData'](){const _0xf6a536=a3_0x410f6c,_0x2e7a8d=Array[_0xf6a536(0x213)]({'length':this['nx']});for(let _0x239ddf=0x0;_0x239ddf<this['nx'];_0x239ddf++){_0x2e7a8d[_0x239ddf]=new a3_0x1ddee9(this[_0xf6a536(0x227)])[_0xf6a536(0x1e8)](new a3_0x1ddee9(_0x239ddf)[_0xf6a536(0x22b)](this['gjLng']))[_0xf6a536(0x225)]();}const _0x2fe1d8=Array[_0xf6a536(0x213)]({'length':this['ny']});for(let _0x13bad3=0x0;_0x13bad3<this['ny'];_0x13bad3++){_0x2fe1d8[_0x13bad3]=new a3_0x1ddee9(this[_0xf6a536(0x224)])[_0xf6a536(0x1e8)](new a3_0x1ddee9(_0x13bad3)['times'](this['gjLat']))[_0xf6a536(0x225)]();}const _0x28d68a=Array[_0xf6a536(0x213)]({'length':this['nx']*this['ny']});for(let _0x473c3f=0x0;_0x473c3f<this[_0xf6a536(0x21c)][_0xf6a536(0x236)];_0x473c3f++){const _0x2c3cd5=Math[_0xf6a536(0x1eb)](_0x473c3f/this['nx']),_0x29b6cf=_0x473c3f%this['nx'],_0x5221c6=_0x2e7a8d[_0x29b6cf],_0x2aab5c=_0x2fe1d8[_0x2c3cd5],_0x21c19d=this['values'][_0x473c3f];_0x2aab5c&&_0x5221c6&&(_0x28d68a[_0x473c3f]={'lng':_0x5221c6,'lat':_0x2aab5c,'val':_0x21c19d});}return _0x28d68a;}[a3_0x410f6c(0x237)](){const _0x402c30=a3_0x410f6c;let _0x2fe8cf=-Infinity,_0x38efd9=Infinity;for(let _0x1cad6b=0x0;_0x1cad6b<this[_0x402c30(0x21c)][_0x402c30(0x236)];_0x1cad6b++){const _0x40a59c=this[_0x402c30(0x21c)][_0x1cad6b];if(_0x40a59c>_0x2fe8cf)_0x2fe8cf=_0x40a59c;if(_0x40a59c<_0x38efd9)_0x38efd9=_0x40a59c;}this['minVal']=_0x38efd9,this[_0x402c30(0x230)]=_0x2fe8cf;}[a3_0x410f6c(0x1df)](){const _0x2c60c9=a3_0x410f6c,_0x3d0f39=[];if(this[_0x2c60c9(0x200)]===Infinity||this[_0x2c60c9(0x230)]===-Infinity)return _0x3d0f39;for(let _0x1bc66e=this['minVal']-0x1;_0x1bc66e<=this[_0x2c60c9(0x230)]+0x1;_0x1bc66e++){_0x3d0f39[_0x2c60c9(0x217)](_0x1bc66e);}return _0x3d0f39;}['sortFeaturesByArea'](_0x25b453){const _0x58f845=a3_0x410f6c;return _0x25b453[_0x58f845(0x1f4)](_0x435633=>{const _0x433f7f=_0x58f845;try{const _0x473b60=a3_0x4e0606(_0x435633)||0x0;_0x435633[_0x433f7f(0x22a)]={..._0x435633[_0x433f7f(0x22a)]||{},'__area':_0x473b60};}catch{_0x435633['properties']={..._0x435633[_0x433f7f(0x22a)]||{},'__area':0x0};}return _0x435633;})[_0x58f845(0x22f)]((_0x125fdf,_0x421e04)=>_0x421e04[_0x58f845(0x22a)][_0x58f845(0x1f5)]-_0x125fdf[_0x58f845(0x22a)][_0x58f845(0x1f5)])[_0x58f845(0x219)](_0x57d05a=>_0x57d05a[_0x58f845(0x22a)]&&_0x58f845(0x1f5)in _0x57d05a[_0x58f845(0x22a)]&&_0x57d05a[_0x58f845(0x22a)][_0x58f845(0x1f5)]!==0x0)['map'](_0xa9b774=>{const _0x68c916=_0x58f845;if(_0xa9b774['properties']&&_0x68c916(0x1f5)in _0xa9b774[_0x68c916(0x22a)]){const {__area:_0x50cda6,..._0xc58d9d}=_0xa9b774[_0x68c916(0x22a)];_0xa9b774[_0x68c916(0x22a)]=_0xc58d9d;}return _0xa9b774;});}['chunkArray']=(_0x313142,_0x59aaf9)=>{const _0x2a0fa7=a3_0x410f6c,_0x43e1e1=[],_0x101c20=Math[_0x2a0fa7(0x222)](0x1,Math[_0x2a0fa7(0x229)](_0x313142[_0x2a0fa7(0x236)]/_0x59aaf9));for(let _0x15aae5=0x0;_0x15aae5<_0x59aaf9;_0x15aae5++){_0x43e1e1[_0x2a0fa7(0x217)](_0x313142[_0x2a0fa7(0x1ec)](_0x15aae5*_0x101c20,(_0x15aae5+0x1)*_0x101c20));}return _0x43e1e1;};}export default readFileM4;function a3_0x23fe(){const _0x211826=['27893052hAzBLR','filePath','values','56CAJmPQ','string','clear','_maskCacheKey','convertTemKtoC','max','abs','minLat','toNumber','indexOf','minLng','start','ceil','properties','times','_maskCache','replace','getIsoBandsImage','sort','maxVal','getIsoBandsByLayerBreak','setParams','trim','ring','height','length','getMinMax','features','moveTo','lineTo','8nkJYlS','gjLng','canvas','clearMaskCache','sortFeaturesByArea','isNaN','plusOffset','getIsoBandsFastByWorker','getBreaks','5RpDXGA','width','263964rFVGCI','FeatureCollection','beginPath','module','clipDataByJson','size','plus','value','createElement','floor','slice','16zFKSnk','Feature','contours','chunkArray','postMessage','thresholds','275838tgYOhb','map','__area','791228CZqnZW','error','min','5341509jEagbL','onerror','hardwareConcurrency','onmessage','undefined','get','number','minVal','coordinates','Polygon','data','pixelRatio','all','getColorFast','gjLat','flat','split','fill','62542DvTWqY','text','forEach','getIsoBandsFast','5700610bahaUS','terminate','该时次文件数据异常','fillStyle','from','scale','isArray','closePath','push','set','filter'];a3_0x23fe=function(){return _0x211826;};return a3_0x23fe();}
1
+ function a4_0xbaa5(_0x19aa85,_0x4f1a3d){const _0xa1f62b=a4_0xa1f6();return a4_0xbaa5=function(_0xbaa551,_0x3abf40){_0xbaa551=_0xbaa551-0x1d3;let _0x429c2d=_0xa1f62b[_0xbaa551];return _0x429c2d;},a4_0xbaa5(_0x19aa85,_0x4f1a3d);}const a4_0x58fb12=a4_0xbaa5;(function(_0x1809f5,_0x38393d){const _0x39e4d8=a4_0xbaa5,_0x2a7a7d=_0x1809f5();while(!![]){try{const _0x457c6c=parseInt(_0x39e4d8(0x21d))/0x1*(parseInt(_0x39e4d8(0x20c))/0x2)+-parseInt(_0x39e4d8(0x1f0))/0x3*(-parseInt(_0x39e4d8(0x203))/0x4)+parseInt(_0x39e4d8(0x1fb))/0x5*(-parseInt(_0x39e4d8(0x227))/0x6)+-parseInt(_0x39e4d8(0x214))/0x7*(-parseInt(_0x39e4d8(0x205))/0x8)+-parseInt(_0x39e4d8(0x223))/0x9+parseInt(_0x39e4d8(0x1d3))/0xa*(parseInt(_0x39e4d8(0x1f4))/0xb)+parseInt(_0x39e4d8(0x23c))/0xc;if(_0x457c6c===_0x38393d)break;else _0x2a7a7d['push'](_0x2a7a7d['shift']());}catch(_0x4304a4){_0x2a7a7d['push'](_0x2a7a7d['shift']());}}}(a4_0xa1f6,0x42db9));function a4_0xa1f6(){const _0x557b11=['onerror','hardwareConcurrency','convertTemKtoC','25089FfwPTF','value','times','lat','11NWlmWX','sort','ceil','plusOffset','lineWidth','minVal','getMinMax','431140yiYnNi','closePath','postMessage','values','filePath','minLng','all','getContext','116tPwiQj','val','7504KDKZOM','该时次未获取到文件','undefined','lng','sortFeaturesByArea','ring','clear','182iNZtPX','isArray','floor','clearMaskCache','data','FeatureCollection','gjLat','flat','1141xOgjtm','moveTo','map','indexOf','min','Feature','join','string','getJsonData','364zNVpTz','fillStyle','contours','createCanvas','round','area','4150062dsHYGO','strokeStyle','canvas','forEach','24sXESlH','getColorFast','scale','terminate','trim','getIsoBandsCanvasByMap','fill','lineTo','getIsoBandsFast','__area','plus','_maskCache','createElement','isNaN','#FFFFFF','_maskCacheKey','number','rgba(','from','toNumber','getIsoBandsByLayerBreak','1507968ZyEvtx','style','split','height','max','5256700glUJSG','Polygon','chunkArray','rgba(255,255,255,0)','get','width','properties','getAllGeo','replace','latLngToLayerPoint','minLat','buildGridCanvas','setParams','coordinates','push','module','minus','maxVal','length','abs','set','features','beginPath','getBreaks','gjLng','thresholds'];a4_0xa1f6=function(){return _0x557b11;};return a4_0xa1f6();}import{contours}from'd3-contour';import a4_0xf52b76 from'@turf/area';import{featureCollection as a4_0x44b509,point,polygon}from'@turf/helpers';import{booleanPointInPolygon}from'@turf/boolean-point-in-polygon';import a4_0x586e0f from'decimal.js';export class readFileM4{[a4_0x58fb12(0x1ff)]='';['nx']=0x0;['ny']=0x0;['minLng']=0x0;['minLat']=0x0;[a4_0x58fb12(0x1eb)]=0x0;[a4_0x58fb12(0x212)]=0x0;[a4_0x58fb12(0x1fe)]=[];[a4_0x58fb12(0x1e4)]=-Infinity;[a4_0x58fb12(0x1f9)]=Infinity;[a4_0x58fb12(0x236)]='';[a4_0x58fb12(0x232)]=new Map();constructor(_0x412dcd){const _0xf07f4c=a4_0x58fb12;this[_0xf07f4c(0x1ff)]=_0x412dcd||'';}async['start'](_0x56dd49){const _0x283335=a4_0x58fb12,_0x25f5e0=await fetch(this[_0x283335(0x1ff)]);if(!_0x25f5e0['ok'])return new Promise((_0x2cb58f,_0x345ba2)=>{const _0x579a58=_0x283335;_0x345ba2(new Error(_0x579a58(0x206)));});const _0x5a23e9=await _0x25f5e0['text'](),_0x262d21=_0x5a23e9[_0x283335(0x1db)](/\r\n/g,'\x0a')[_0x283335(0x1db)](/\r/g,'\x0a')[_0x283335(0x23e)]('\x0a');if(_0x262d21[_0x283335(0x1e5)]<0x4)return new Promise((_0x2d4b9e,_0x2b33b6)=>{_0x2b33b6(new Error('该时次文件数据异常'));});const _0x45de46=(_0x262d21[0x1]??'')[_0x283335(0x22b)]()[_0x283335(0x23e)](/\s+/);let _0x53645b=0x2;while(_0x45de46['length']<0x13){_0x45de46[_0x283335(0x1e1)](...(_0x262d21[_0x53645b]??'')[_0x283335(0x22b)]()[_0x283335(0x23e)](/\s+/)),_0x53645b++;}this[_0x283335(0x1eb)]=Number(_0x45de46[0x6]);const _0x3b5eeb=Number(_0x45de46[0x8]),_0x447851=Number(_0x45de46[0xa]),_0x1bd6da=Number(_0x45de46[0xb]);this['nx']=Number(_0x45de46[0xc]),this['ny']=Number(_0x45de46[0xd]),this[_0x283335(0x200)]=_0x3b5eeb,this[_0x283335(0x1dd)]=_0x447851,this['gjLat']=Math[_0x283335(0x1e6)](Number(_0x45de46[0x7]))*(_0x447851>_0x1bd6da?-0x1:0x1);const _0x54a9ac=this['nx']*this['ny'];let _0x2dc712=0x0;for(let _0x229cf3=_0x53645b;_0x229cf3<_0x262d21[_0x283335(0x1e5)]&&_0x2dc712<_0x54a9ac;_0x229cf3++){const _0x15a168=_0x262d21[_0x229cf3]?.[_0x283335(0x22b)]()??'',_0x20ee61=_0x15a168[_0x283335(0x23e)](/\s+/);if(!_0x20ee61||_0x20ee61[_0x283335(0x1e5)]===0x0)continue;for(let _0x4d1236=0x0;_0x4d1236<_0x20ee61[_0x283335(0x1e5)]&&_0x2dc712<_0x54a9ac;_0x4d1236++){let _0x5e9267=Number(_0x20ee61[_0x4d1236]);if(_0x56dd49?.[_0x283335(0x1ef)])_0x5e9267=new a4_0x586e0f(_0x5e9267)[_0x283335(0x1e3)](272.15)[_0x283335(0x23a)]();else _0x56dd49?.[_0x283335(0x1f7)]&&(_0x5e9267=new a4_0x586e0f(_0x5e9267)[_0x283335(0x231)](_0x56dd49[_0x283335(0x1f7)])[_0x283335(0x23a)]());this[_0x283335(0x1fe)][_0x283335(0x1e1)](_0x5e9267),this[_0x283335(0x1f9)]=Math['min'](this[_0x283335(0x1f9)],_0x5e9267),this['maxVal']=Math['max'](this[_0x283335(0x1e4)],_0x5e9267),_0x2dc712++;}}}[a4_0x58fb12(0x1df)](_0x44677b,_0x6cff16){const _0x55597e=a4_0x58fb12;this['nx']=_0x44677b['nx'],this['ny']=_0x44677b['ny'],this['minLng']=_0x44677b['minLng'],this[_0x55597e(0x1dd)]=_0x44677b[_0x55597e(0x1dd)],this[_0x55597e(0x1eb)]=_0x44677b['gjLng'],this[_0x55597e(0x212)]=_0x44677b['gjLat'];if(_0x6cff16?.['convertTemKtoC'])for(let _0x240889=0x0;_0x240889<_0x44677b[_0x55597e(0x1fe)][_0x55597e(0x1e5)];_0x240889++){if(typeof _0x44677b[_0x55597e(0x1fe)][_0x240889]===_0x55597e(0x207))continue;_0x44677b['values'][_0x240889]=new a4_0x586e0f(_0x44677b[_0x55597e(0x1fe)][_0x240889])[_0x55597e(0x1e3)](272.15)[_0x55597e(0x23a)]();}else{if(_0x6cff16?.[_0x55597e(0x1f7)])for(let _0x23c1af=0x0;_0x23c1af<_0x44677b['values'][_0x55597e(0x1e5)];_0x23c1af++){if(typeof _0x44677b[_0x55597e(0x1fe)][_0x23c1af]===_0x55597e(0x207))continue;_0x44677b['values'][_0x23c1af]=new a4_0x586e0f(_0x44677b['values'][_0x23c1af])[_0x55597e(0x231)](_0x6cff16['plusOffset'])['toNumber']();}else this['values']=_0x44677b[_0x55597e(0x1fe)];}this[_0x55597e(0x1fa)]();}[a4_0x58fb12(0x22f)](_0x82a614){const _0x35b5fd=a4_0x58fb12;if(this[_0x35b5fd(0x1fe)][_0x35b5fd(0x1e5)]===0x0)return{'type':_0x35b5fd(0x211),'features':[]};const _0x7b025a=[],_0xffe93=this[_0x35b5fd(0x1da)](_0x82a614),_0x1afa81=new a4_0x586e0f(this[_0x35b5fd(0x200)]),_0x56b91c=new a4_0x586e0f(this['minLat']),_0x344bcd=new a4_0x586e0f(this[_0x35b5fd(0x1eb)]),_0x26846b=new a4_0x586e0f(this['gjLat']);for(const _0x51b0cd of _0xffe93){for(const _0x3f017 of _0x51b0cd[_0x35b5fd(0x1e0)]){if(Array[_0x35b5fd(0x20d)](_0x3f017))for(const _0x3aea94 of _0x3f017){_0x3aea94[_0x35b5fd(0x226)](_0x35edf6=>{const _0x1bfc1b=_0x35b5fd,_0x90a352=_0x35edf6[0x0],_0x403299=_0x35edf6[0x1];if(_0x90a352==null||_0x403299==null||Number['isNaN'](_0x90a352)||Number[_0x1bfc1b(0x234)](_0x403299))return null;const _0x391b4a=_0x1afa81[_0x1bfc1b(0x231)](_0x344bcd[_0x1bfc1b(0x1f2)](_0x90a352))['toNumber'](),_0x2118f3=_0x56b91c[_0x1bfc1b(0x231)](_0x26846b[_0x1bfc1b(0x1f2)](_0x403299))['toNumber']();_0x35edf6[0x0]=_0x391b4a,_0x35edf6[0x1]=_0x2118f3;});}}_0x7b025a[_0x35b5fd(0x1e1)]({'type':_0x35b5fd(0x219),'properties':{'z':_0x51b0cd['value']},'geometry':_0x51b0cd});}return{'type':_0x35b5fd(0x211),'features':_0x7b025a};}['getIsoBandsCanvas'](_0x52498d,_0x593a79,_0x18a4b7){const _0x5513c6=a4_0x58fb12;if(this[_0x5513c6(0x1fe)][_0x5513c6(0x1e5)]===0x0)return null;const _0xdc00f7=this[_0x5513c6(0x1da)](_0x52498d),{canvas:_0x35ab01,ctx:_0x2939a5,width:_0x2c801e,height:_0x159abb}=this['createCanvas'](_0x18a4b7);if(!_0x2939a5)return null;for(const _0x4f2244 of _0xdc00f7){const _0x36f970=_0x4f2244['value'];_0x2939a5[_0x5513c6(0x1e9)]();for(const _0xde67a of _0x4f2244[_0x5513c6(0x1e0)]){if(Array[_0x5513c6(0x20d)](_0xde67a))for(const _0xde1585 of _0xde67a){_0xde1585['forEach']((_0xd135b5,_0x496914)=>{const _0x1e7ea1=_0x5513c6,_0x461c91=_0xd135b5[0x0],_0x4473ca=_0xd135b5[0x1];if(_0x461c91==null||_0x4473ca==null||Number[_0x1e7ea1(0x234)](_0x461c91)||Number[_0x1e7ea1(0x234)](_0x4473ca))return null;const _0xca4a21=_0x461c91/this['nx']*_0x2c801e,_0x4fc55f=_0x159abb-_0x4473ca/this['ny']*_0x159abb;_0x496914===0x0?_0x2939a5[_0x1e7ea1(0x215)](_0xca4a21,_0x4fc55f):_0x2939a5['lineTo'](_0xca4a21,_0x4fc55f);});}}_0x2939a5[_0x5513c6(0x1fc)](),_0x2939a5[_0x5513c6(0x21e)]=this[_0x5513c6(0x228)](_0x36f970,_0x52498d,_0x593a79),_0x2939a5['fill']();}return _0x35ab01;}[a4_0x58fb12(0x22c)](_0x566592,_0x3ada2b,_0x22184c,_0x139ded){const _0x148703=a4_0x58fb12;if(this['values'][_0x148703(0x1e5)]===0x0)return null;if(!_0x22184c)return null;const _0x2c9681=this[_0x148703(0x200)],_0x213969=this[_0x148703(0x1dd)],_0x48ef3c=_0x2c9681+this['nx']*this[_0x148703(0x1eb)],_0x2a5ccd=_0x213969+this['ny']*this[_0x148703(0x212)],_0x403dd3=_0x22184c[_0x148703(0x1dc)]([_0x2a5ccd,_0x2c9681]),_0x416d57=_0x22184c[_0x148703(0x1dc)]([_0x213969,_0x48ef3c]),_0x5726d1=Math[_0x148703(0x240)](0x1,Math[_0x148703(0x221)](_0x416d57['x']-_0x403dd3['x'])),_0x8216d3=Math[_0x148703(0x240)](0x1,Math[_0x148703(0x221)](_0x416d57['y']-_0x403dd3['y'])),_0x53ec06=_0x139ded?.['pixelRatio']||(typeof devicePixelRatio!=='undefined'?devicePixelRatio:0x1),_0x4d1356=document[_0x148703(0x233)](_0x148703(0x225)),_0x46d4f7=_0x4d1356[_0x148703(0x202)]('2d');_0x4d1356['width']=Math['max'](0x1,Math[_0x148703(0x20e)](_0x5726d1*_0x53ec06)),_0x4d1356[_0x148703(0x23f)]=Math[_0x148703(0x240)](0x1,Math[_0x148703(0x20e)](_0x8216d3*_0x53ec06)),_0x4d1356['style'][_0x148703(0x1d8)]=_0x5726d1+'px',_0x4d1356[_0x148703(0x23d)][_0x148703(0x23f)]=_0x8216d3+'px';if(_0x46d4f7)_0x46d4f7[_0x148703(0x229)](_0x53ec06,_0x53ec06);const _0x41bd69=this['getAllGeo'](_0x566592);for(const _0x38f294 of _0x41bd69){const _0x3fbdf7=_0x38f294[_0x148703(0x1f1)];if(!_0x38f294[_0x148703(0x1e0)])continue;_0x46d4f7[_0x148703(0x1e9)]();for(const _0x145d22 of _0x38f294[_0x148703(0x1e0)]){if(Array[_0x148703(0x20d)](_0x145d22))for(const _0x29dac5 of _0x145d22){_0x29dac5[_0x148703(0x226)]((_0x3775b1,_0x31d21f)=>{const _0x4a3213=_0x148703,_0x4b7ac2=_0x3775b1[0x0],_0x29cf39=_0x3775b1[0x1];if(_0x4b7ac2==null||_0x29cf39==null||Number['isNaN'](_0x4b7ac2)||Number[_0x4a3213(0x234)](_0x29cf39))return;const _0x2ce888=_0x2c9681+_0x4b7ac2*this[_0x4a3213(0x1eb)],_0x43b2f4=_0x213969+_0x29cf39*this[_0x4a3213(0x212)],_0x5a05da=_0x22184c[_0x4a3213(0x1dc)]([_0x43b2f4,_0x2ce888]),_0x8e685b=_0x5a05da['x']-_0x403dd3['x'],_0x50f2ab=_0x5a05da['y']-_0x403dd3['y'];if(_0x31d21f===0x0)_0x46d4f7[_0x4a3213(0x215)](_0x8e685b,_0x50f2ab);else _0x46d4f7[_0x4a3213(0x22e)](_0x8e685b,_0x50f2ab);});}}_0x46d4f7[_0x148703(0x1fc)](),_0x46d4f7[_0x148703(0x21e)]=this[_0x148703(0x228)](_0x3fbdf7,_0x566592,_0x3ada2b),_0x46d4f7[_0x148703(0x22d)]();}return _0x4d1356;}[a4_0x58fb12(0x228)](_0x49a8c5,_0x3c3c9c,_0x129cbd){const _0x311156=a4_0x58fb12;let _0x575d0b=_0x311156(0x1d6);const _0x366dc5=_0x3c3c9c[_0x311156(0x217)](_0x49a8c5);if(typeof _0x129cbd[_0x366dc5]==_0x311156(0x21b))_0x575d0b=_0x129cbd[_0x366dc5];else _0x366dc5!==-0x1&&(_0x575d0b=_0x311156(0x238)+_0x129cbd[_0x366dc5][0x0]+','+_0x129cbd[_0x366dc5][0x1]+','+_0x129cbd[_0x366dc5][0x2]+','+(_0x129cbd[_0x366dc5][0x3]||_0x129cbd[_0x366dc5][0x3]===0x0?_0x129cbd[_0x366dc5][0x3]:0x1)+')');return _0x575d0b;}async['clipDataByJson'](_0x56b179,_0x18f97b,_0x48f036,_0x45a6bc){const _0x306219=a4_0x58fb12,_0x2f8f5c=_0x45a6bc||(navigator[_0x306219(0x1ee)]-0x4||0x1),_0x4d5ba9=Math[_0x306219(0x218)](_0x2f8f5c,Math[_0x306219(0x240)](0x1,_0x56b179[_0x306219(0x1e8)][_0x306219(0x1e5)])),_0x2bd86e=this['chunkArray'](_0x56b179[_0x306219(0x1e8)],_0x4d5ba9),_0xafe56c=[],_0x3cc224=_0x2bd86e[_0x306219(0x216)](_0x52eff6=>{const _0xd42f2=_0x306219,_0x41d398=new Worker(_0x48f036,{'type':'module'});return _0xafe56c[_0xd42f2(0x1e1)](_0x41d398),new Promise(_0x308c48=>{const _0x9d9f93=_0xd42f2;_0x41d398['onmessage']=_0x3868fa=>{_0x308c48(_0x3868fa['data']['features']);},_0x41d398[_0x9d9f93(0x1ed)]=_0x27d4d5=>{console['error'](_0x27d4d5);},_0x41d398[_0x9d9f93(0x1fd)]({'isoChunk':_0x52eff6,'gansuFeatures':_0x18f97b[_0x9d9f93(0x1e8)]});});}),_0x56cf69=await Promise[_0x306219(0x201)](_0x3cc224);_0xafe56c[_0x306219(0x226)](_0x110e18=>_0x110e18[_0x306219(0x22a)]());const _0x4b9bf4=_0x56cf69[_0x306219(0x213)]();return a4_0x44b509(_0x4b9bf4);}async['getIsoBandsFastByWorker'](_0x48a5aa,_0xedef01,_0x38f980){const _0x1b8b3e=a4_0x58fb12;if(this['values']['length']===0x0)return{'type':_0x1b8b3e(0x211),'features':[]};let _0x2e821b=[];if(_0x48a5aa[_0x1b8b3e(0x1e5)]===0x0)_0x48a5aa=this['getBreaks']();const _0x53bd47=[],_0x33862b=_0x38f980||(navigator['hardwareConcurrency']-0x4||0x1),_0x3ff440=Math[_0x1b8b3e(0x218)](_0x33862b,Math[_0x1b8b3e(0x240)](0x1,_0x48a5aa[_0x1b8b3e(0x1e5)])),_0x975b94=this[_0x1b8b3e(0x1d5)](_0x48a5aa,_0x3ff440),_0x172069=_0x975b94['map'](_0x4e8b8f=>{const _0xc4adeb=_0x1b8b3e,_0x40c9a4=new Worker(_0xedef01,{'type':_0xc4adeb(0x1e2)});return _0x53bd47[_0xc4adeb(0x1e1)](_0x40c9a4),new Promise(_0x1e283f=>{const _0x37fc37=_0xc4adeb;_0x40c9a4['onmessage']=_0x2a2755=>{const _0x3762bb=a4_0xbaa5;_0x1e283f(_0x2a2755[_0x3762bb(0x210)][_0x3762bb(0x1e8)]);},_0x40c9a4[_0x37fc37(0x1ed)]=_0x2737af=>{console['error'](_0x2737af);},_0x40c9a4['postMessage']({'breaks':_0x4e8b8f,'values':this[_0x37fc37(0x1fe)],'nx':this['nx'],'ny':this['ny'],'minVal':this['minVal'],'maxVal':this[_0x37fc37(0x1e4)],'minLng':this[_0x37fc37(0x200)],'minLat':this[_0x37fc37(0x1dd)],'gjLng':this[_0x37fc37(0x1eb)],'gjLat':this[_0x37fc37(0x212)]});});}),_0x8e8eae=await Promise[_0x1b8b3e(0x201)](_0x172069);return _0x53bd47[_0x1b8b3e(0x226)](_0x49e106=>_0x49e106[_0x1b8b3e(0x22a)]()),_0x8e8eae[_0x1b8b3e(0x226)](_0x209a72=>{const _0x8d9740=_0x1b8b3e;_0x2e821b[_0x8d9740(0x1e1)](..._0x209a72);}),_0x2e821b=this[_0x1b8b3e(0x209)](_0x2e821b),{'type':'FeatureCollection','features':_0x2e821b};}[a4_0x58fb12(0x20f)](){const _0x1429e5=a4_0x58fb12;this[_0x1429e5(0x232)]['clear']();}[a4_0x58fb12(0x23b)](_0x39d255=[],_0x352ffd){const _0x27a0d6=a4_0x58fb12;if(typeof _0x352ffd!==_0x27a0d6(0x207)&&this['_maskCache'][_0x27a0d6(0x1d7)](_0x352ffd)){const _0x4344e5=this['_maskCache'][_0x27a0d6(0x1d7)](_0x352ffd)||[],_0x350527=this[_0x27a0d6(0x209)]?this[_0x27a0d6(0x209)](_0x4344e5):_0x4344e5;return{'type':_0x27a0d6(0x211),'features':_0x350527};}if(this[_0x27a0d6(0x1fe)][_0x27a0d6(0x1e5)]===0x0)return{'type':'FeatureCollection','features':[]};if(_0x39d255[_0x27a0d6(0x1e5)]===0x0)_0x39d255=this[_0x27a0d6(0x1ea)]();const _0x505d9c=_0x39d255[_0x27a0d6(0x21a)](',');if(this[_0x27a0d6(0x236)]!==_0x505d9c){this['_maskCacheKey']=_0x505d9c,this[_0x27a0d6(0x232)][_0x27a0d6(0x20b)]();const _0x1234da=this[_0x27a0d6(0x200)],_0x3a34f2=this[_0x27a0d6(0x1dd)],_0x432ca5=this[_0x27a0d6(0x1eb)],_0x1d0be8=this[_0x27a0d6(0x212)],_0x38e545=_0x545613=>{const _0x88c2a6=_0x27a0d6;let _0x5e8a06=0x0;for(let _0x1b1e6c=0x0,_0xfba66d=_0x545613[_0x88c2a6(0x1e5)];_0x1b1e6c<_0xfba66d;_0x1b1e6c++){const _0x2c13e2=_0x545613[_0x1b1e6c][0x0],_0x500f41=_0x545613[_0x1b1e6c][0x1],_0x54bed5=_0x545613[(_0x1b1e6c+0x1)%_0xfba66d][0x0],_0x4a4a65=_0x545613[(_0x1b1e6c+0x1)%_0xfba66d][0x1];if(_0x2c13e2==null||_0x500f41==null||_0x54bed5==null||_0x4a4a65==null)continue;_0x5e8a06+=_0x2c13e2*_0x4a4a65-_0x54bed5*_0x500f41;}return _0x5e8a06/0x2;},_0xa7a576=(_0x1bdac4,_0x5b30d5)=>{const _0x5bed97=_0x27a0d6;if(!_0x1bdac4)return![];const _0x184d67=_0x1bdac4[0x0],_0x179d08=_0x1bdac4[0x1];let _0x472933=![];for(let _0x5109e0=0x0,_0x53383e=_0x5b30d5[_0x5bed97(0x1e5)]-0x1;_0x5109e0<_0x5b30d5['length'];_0x53383e=_0x5109e0++){const _0x1f6e28=_0x5b30d5[_0x5109e0][0x0],_0xde2b9f=_0x5b30d5[_0x5109e0][0x1],_0x24e4a9=_0x5b30d5[_0x53383e][0x0],_0x2d1938=_0x5b30d5[_0x53383e][0x1],_0x226fab=_0xde2b9f>_0x179d08!==_0x2d1938>_0x179d08&&_0x184d67<(_0x24e4a9-_0x1f6e28)*(_0x179d08-_0xde2b9f)/(_0x2d1938-_0xde2b9f)+_0x1f6e28;if(_0x226fab)_0x472933=!_0x472933;}return _0x472933;},_0x1580f2=_0x308cac=>{const _0x423aa1=_0x27a0d6,_0x4eb204=[];let _0x563033=null,_0xad7b56=null;for(let _0x501dd8=0x0;_0x501dd8<_0x308cac['length'];_0x501dd8++){const _0x538468=_0x308cac[_0x501dd8];if(!_0x538468)continue;const _0x54ff37=_0x538468[0x0],_0x31f6e2=_0x538468[0x1];if(_0x54ff37==null||_0x31f6e2==null||Number['isNaN'](_0x54ff37)||Number['isNaN'](_0x31f6e2))continue;const _0x562e50=_0x1234da+_0x54ff37*_0x432ca5,_0xe3a0e0=_0x3a34f2+_0x31f6e2*_0x1d0be8;if(_0x563033!==null&&_0xad7b56!==null&&_0x563033===_0x562e50&&_0xad7b56===_0xe3a0e0){_0x563033=_0x562e50,_0xad7b56=_0xe3a0e0;continue;}_0x4eb204[_0x423aa1(0x1e1)]([_0x562e50,_0xe3a0e0]),_0x563033=_0x562e50,_0xad7b56=_0xe3a0e0;}if(_0x4eb204['length']===0x0)return _0x4eb204;const _0x37ed2d=_0x4eb204[0x0],_0x21ef6d=_0x4eb204[_0x4eb204['length']-0x1];if(_0x37ed2d[0x0]!==_0x21ef6d[0x0]||_0x37ed2d[0x1]!==_0x21ef6d[0x1])_0x4eb204[_0x423aa1(0x1e1)]([_0x37ed2d[0x0],_0x37ed2d[0x1]]);return _0x4eb204;},_0x2ab71e=_0x39d255[_0x27a0d6(0x1e5)]-0x1;for(let _0xc3e244=0x0;_0xc3e244<_0x39d255[_0x27a0d6(0x1e5)];_0xc3e244++){const _0x1fbdc5=_0x39d255[_0xc3e244],_0xb7ad24=_0xc3e244<_0x2ab71e?_0x39d255[_0xc3e244+0x1]:Infinity,_0x204392=Array[_0x27a0d6(0x239)]({'length':this['values']['length']});let _0xe2627d=![];for(let _0x4d5203=0x0;_0x4d5203<this['values'][_0x27a0d6(0x1e5)];_0x4d5203++){const _0x1968a5=this[_0x27a0d6(0x1fe)][_0x4d5203],_0x205a85=_0x1968a5>=_0x1fbdc5&&_0x1968a5<_0xb7ad24?0x1:0x0;if(_0x205a85)_0xe2627d=!![];_0x204392[_0x4d5203]=_0x205a85;}if(!_0xe2627d)continue;const _0x4a25e7=contours()['size']([this['nx'],this['ny']])['thresholds']([0.5]),_0x54a8be=_0x4a25e7[_0x27a0d6(0x21f)]?_0x4a25e7[_0x27a0d6(0x21f)](_0x204392):_0x4a25e7(_0x204392);if(!_0x54a8be||_0x54a8be[_0x27a0d6(0x1e5)]===0x0)continue;const _0xcfba49=[];for(const _0x2564af of _0x54a8be){const _0x1ba847=_0x2564af&&_0x2564af[_0x27a0d6(0x1e0)];if(!_0x1ba847)continue;for(const _0x5ba6d0 of _0x1ba847){let _0x4d876f=[];if(Array['isArray'](_0x5ba6d0)&&_0x5ba6d0['length']>0x0&&typeof _0x5ba6d0[0x0][0x0]===_0x27a0d6(0x237))_0x4d876f=[_0x5ba6d0];else{if(Array[_0x27a0d6(0x20d)](_0x5ba6d0))_0x4d876f=_0x5ba6d0;else continue;}const _0x23fefc=_0x4d876f[_0x27a0d6(0x216)](_0xa96440=>({'ring':_0xa96440,'area':Math[_0x27a0d6(0x1e6)](_0x38e545(_0xa96440))}))['sort']((_0x5c8852,_0xe137fc)=>_0xe137fc[_0x27a0d6(0x222)]-_0x5c8852['area']),_0xa0162=Array[_0x27a0d6(0x239)]({'length':_0x23fefc['length']})[_0x27a0d6(0x22d)](![]);for(let _0x12bb70=0x0;_0x12bb70<_0x23fefc[_0x27a0d6(0x1e5)];_0x12bb70++){if(_0xa0162[_0x12bb70])continue;const _0x3765ad=_0x23fefc[_0x12bb70][_0x27a0d6(0x20a)];_0xa0162[_0x12bb70]=!![];const _0x5db067=[];for(let _0x39d2d1=0x0;_0x39d2d1<_0x23fefc['length'];_0x39d2d1++){if(_0xa0162[_0x39d2d1])continue;const _0x32f744=_0x23fefc[_0x39d2d1][_0x27a0d6(0x20a)],_0x5bd08c=_0x32f744[0x0];_0x5bd08c&&_0xa7a576(_0x5bd08c,_0x3765ad)&&(_0x5db067[_0x27a0d6(0x1e1)](_0x32f744),_0xa0162[_0x39d2d1]=!![]);}const _0x284582=_0x1580f2(_0x3765ad);if(_0x284582['length']<0x4)continue;const _0x10fc92=[];for(const _0x5f454c of _0x5db067){const _0x466226=_0x1580f2(_0x5f454c);if(_0x466226['length']>=0x4)_0x10fc92['push'](_0x466226);}_0xcfba49[_0x27a0d6(0x1e1)]({'type':_0x27a0d6(0x219),'properties':{'z':_0x1fbdc5},'geometry':{'type':_0x27a0d6(0x1d4),'coordinates':[_0x284582,..._0x10fc92]}});}}}_0xcfba49[_0x27a0d6(0x1e5)]&&this[_0x27a0d6(0x232)][_0x27a0d6(0x1e7)](_0x1fbdc5,_0xcfba49);}}if(typeof _0x352ffd!==_0x27a0d6(0x207)){const _0x2968a7=this[_0x27a0d6(0x232)][_0x27a0d6(0x1d7)](_0x352ffd)||[],_0x3012f3=this[_0x27a0d6(0x209)]?this['sortFeaturesByArea'](_0x2968a7):_0x2968a7;return{'type':_0x27a0d6(0x211),'features':_0x3012f3};}const _0x49877b=[];for(const _0x1b9f64 of this['_maskCache'][_0x27a0d6(0x1fe)]()){_0x49877b[_0x27a0d6(0x1e1)](..._0x1b9f64);}const _0x67d39a=this[_0x27a0d6(0x209)]?this['sortFeaturesByArea'](_0x49877b):_0x49877b;return{'type':_0x27a0d6(0x211),'features':_0x67d39a};}[a4_0x58fb12(0x21c)](){const _0x428737=a4_0x58fb12,_0x143692=Array[_0x428737(0x239)]({'length':this['nx']});for(let _0x11e6c7=0x0;_0x11e6c7<this['nx'];_0x11e6c7++){_0x143692[_0x11e6c7]=new a4_0x586e0f(this[_0x428737(0x200)])[_0x428737(0x231)](new a4_0x586e0f(_0x11e6c7)[_0x428737(0x1f2)](this[_0x428737(0x1eb)]))[_0x428737(0x23a)]();}const _0x432c76=Array[_0x428737(0x239)]({'length':this['ny']});for(let _0x3598c5=0x0;_0x3598c5<this['ny'];_0x3598c5++){_0x432c76[_0x3598c5]=new a4_0x586e0f(this[_0x428737(0x1dd)])[_0x428737(0x231)](new a4_0x586e0f(_0x3598c5)[_0x428737(0x1f2)](this['gjLat']))['toNumber']();}const _0x1350d6=Array[_0x428737(0x239)]({'length':this['nx']*this['ny']});for(let _0x2c4402=0x0;_0x2c4402<this[_0x428737(0x1fe)][_0x428737(0x1e5)];_0x2c4402++){const _0x3c868b=Math[_0x428737(0x20e)](_0x2c4402/this['nx']),_0x4929b3=_0x2c4402%this['nx'],_0x4dd0b8=_0x143692[_0x4929b3],_0x2c48c5=_0x432c76[_0x3c868b],_0x168f57=this[_0x428737(0x1fe)][_0x2c4402];_0x2c48c5&&_0x4dd0b8&&(_0x1350d6[_0x2c4402]={'lng':_0x4dd0b8,'lat':_0x2c48c5,'val':_0x168f57});}return _0x1350d6;}[a4_0x58fb12(0x1de)](_0x23ec60){const _0x22896f=a4_0x58fb12;if(this['nx']<=0x0||this['ny']<=0x0||this[_0x22896f(0x1eb)]===0x0||this[_0x22896f(0x212)]===0x0)return null;const {canvas:_0x2ca775,ctx:_0x47c717,width:_0x250645,height:_0x18c5f1}=this['createCanvas'](_0x23ec60);if(!_0x47c717)return null;const _0x420ffa=_0x250645/this['nx'],_0x8996f7=_0x18c5f1/this['ny'];_0x47c717[_0x22896f(0x1e9)](),_0x47c717[_0x22896f(0x224)]=_0x23ec60?.['strokeStyle']||_0x22896f(0x235),_0x47c717[_0x22896f(0x1f8)]=_0x23ec60?.[_0x22896f(0x1f8)]||0x1;for(let _0x282846=0x0;_0x282846<=this['nx'];_0x282846++){_0x47c717['moveTo'](_0x420ffa*_0x282846,0x0),_0x47c717[_0x22896f(0x22e)](_0x420ffa*_0x282846,_0x18c5f1);}for(let _0x35e219=0x0;_0x35e219<=this['ny'];_0x35e219++){_0x47c717[_0x22896f(0x215)](0x0,_0x8996f7*_0x35e219),_0x47c717['lineTo'](_0x250645,_0x8996f7*_0x35e219);}return _0x47c717['stroke'](),_0x47c717[_0x22896f(0x1fc)](),_0x2ca775;}['updateGridCanvas'](_0x1eae9c,_0x5cbd9f){const _0x3b7fbc=a4_0x58fb12,_0x3c9ad7=[];_0x1eae9c['map'](_0xc34b83=>{const _0x5a53cb=a4_0xbaa5;_0x3c9ad7[_0x5a53cb(0x1e1)]([_0xc34b83[_0x5a53cb(0x208)],_0xc34b83[_0x5a53cb(0x1f3)]]);});_0x3c9ad7[_0x3b7fbc(0x1e5)]>0x3&&_0x1eae9c[_0x3b7fbc(0x1e5)]>0x3&&_0x3c9ad7[_0x3b7fbc(0x1e1)]([_0x1eae9c[0x0][_0x3b7fbc(0x208)],_0x1eae9c[0x0][_0x3b7fbc(0x1f3)]]);const _0x4e3ac5=polygon([_0x3c9ad7]),_0x233292=[],_0x11ceb3=this['getJsonData']();return _0x11ceb3['map'](_0x19d6d4=>{const _0x5e004d=_0x3b7fbc,_0xa328d6=point([_0x19d6d4['lng'],_0x19d6d4[_0x5e004d(0x1f3)]]);booleanPointInPolygon(_0xa328d6,_0x4e3ac5)&&(_0x233292['push']({'lat':_0x19d6d4[_0x5e004d(0x1f3)],'lng':_0x19d6d4['lng']}),_0x19d6d4[_0x5e004d(0x204)]=_0x5cbd9f);}),this[_0x3b7fbc(0x1fe)]=_0x11ceb3[_0x3b7fbc(0x216)](_0x1c1587=>_0x1c1587['val']),_0x233292;}[a4_0x58fb12(0x1fa)](){const _0x4d4707=a4_0x58fb12;let _0x5cc00f=-Infinity,_0x15358d=Infinity;for(let _0x200532=0x0;_0x200532<this[_0x4d4707(0x1fe)][_0x4d4707(0x1e5)];_0x200532++){const _0x1256f7=this['values'][_0x200532];if(_0x1256f7&&_0x1256f7>_0x5cc00f)_0x5cc00f=_0x1256f7;if(_0x1256f7&&_0x1256f7<_0x15358d)_0x15358d=_0x1256f7;}this[_0x4d4707(0x1f9)]=_0x15358d,this[_0x4d4707(0x1e4)]=_0x5cc00f;}[a4_0x58fb12(0x209)](_0x2c3307){const _0x1fa35f=a4_0x58fb12;return _0x2c3307['map'](_0x3bf713=>{const _0xaa71a2=a4_0xbaa5;try{const _0x4180c0=a4_0xf52b76(_0x3bf713)||0x0;_0x3bf713['properties']={..._0x3bf713[_0xaa71a2(0x1d9)]||{},'__area':_0x4180c0};}catch{_0x3bf713[_0xaa71a2(0x1d9)]={..._0x3bf713[_0xaa71a2(0x1d9)]||{},'__area':0x0};}return _0x3bf713;})[_0x1fa35f(0x1f5)]((_0x16afa6,_0x122631)=>_0x122631[_0x1fa35f(0x1d9)][_0x1fa35f(0x230)]-_0x16afa6[_0x1fa35f(0x1d9)]['__area'])['filter'](_0x49de6b=>_0x49de6b['properties']&&_0x1fa35f(0x230)in _0x49de6b[_0x1fa35f(0x1d9)]&&_0x49de6b[_0x1fa35f(0x1d9)][_0x1fa35f(0x230)]!==0x0)[_0x1fa35f(0x216)](_0x425946=>{const _0x470a70=_0x1fa35f;if(_0x425946['properties']&&_0x470a70(0x230)in _0x425946['properties']){const {__area:_0x1f5c90,..._0x25a000}=_0x425946['properties'];_0x425946[_0x470a70(0x1d9)]=_0x25a000;}return _0x425946;});}['chunkArray']=(_0x42d427,_0x5c2358)=>{const _0x4f0340=a4_0x58fb12,_0xd61954=[],_0x1e2603=Math[_0x4f0340(0x240)](0x1,Math[_0x4f0340(0x1f6)](_0x42d427[_0x4f0340(0x1e5)]/_0x5c2358));for(let _0x1cf073=0x0;_0x1cf073<_0x5c2358;_0x1cf073++){_0xd61954[_0x4f0340(0x1e1)](_0x42d427['slice'](_0x1cf073*_0x1e2603,(_0x1cf073+0x1)*_0x1e2603));}return _0xd61954;};[a4_0x58fb12(0x1ea)](){const _0x22f97f=a4_0x58fb12,_0x11c3f6=[];if(this[_0x22f97f(0x1f9)]===Infinity||this[_0x22f97f(0x1e4)]===-Infinity)return _0x11c3f6;for(let _0xc0a823=this[_0x22f97f(0x1f9)]-0x1;_0xc0a823<=this['maxVal']+0x1;_0xc0a823++){_0x11c3f6[_0x22f97f(0x1e1)](_0xc0a823);}return _0x11c3f6;}[a4_0x58fb12(0x1da)]=_0x53558a=>{const _0x3e7bae=a4_0x58fb12;if(_0x53558a[_0x3e7bae(0x1e5)]===0x0)_0x53558a=this['getBreaks']();const _0x59c8f1=[];for(let _0x43a74c=0x0;_0x43a74c<_0x53558a[_0x3e7bae(0x1e5)];_0x43a74c++){const _0x6fd80d=_0x53558a[_0x43a74c],_0x31f204=_0x43a74c<_0x53558a['length']-0x1?_0x53558a[_0x43a74c+0x1]:Infinity;if(_0x6fd80d==null||_0x31f204==null)continue;if(_0x6fd80d<this[_0x3e7bae(0x1f9)]&&_0x31f204<this[_0x3e7bae(0x1f9)])continue;if(_0x6fd80d>this[_0x3e7bae(0x1e4)]&&_0x31f204>this[_0x3e7bae(0x1e4)])continue;_0x59c8f1['push'](_0x6fd80d);}const _0x2af54d=contours()['size']([this['nx'],this['ny']])[_0x3e7bae(0x1ec)](_0x59c8f1);return _0x2af54d(this[_0x3e7bae(0x1fe)]);};[a4_0x58fb12(0x220)]=_0x3b8d8f=>{const _0xd5bd44=a4_0x58fb12,_0x46b35c=Math[_0xd5bd44(0x20e)]((_0x3b8d8f?.['width']||Math[_0xd5bd44(0x221)](this['nx']/0x400)*0x400*0x2)/this['nx'])*this['nx'],_0x19d88b=_0x46b35c/this['nx']*this['ny'],_0xe15bfb=_0x3b8d8f?.['pixelRatio']||(typeof devicePixelRatio!==_0xd5bd44(0x207)?devicePixelRatio:0x1),_0x4ea6a9=document[_0xd5bd44(0x233)]('canvas'),_0x445c8a=_0x4ea6a9['getContext']('2d');return _0x4ea6a9['width']=_0x46b35c*_0xe15bfb,_0x4ea6a9[_0xd5bd44(0x23f)]=_0x19d88b*_0xe15bfb,_0x445c8a[_0xd5bd44(0x229)](_0xe15bfb,_0xe15bfb),{'canvas':_0x4ea6a9,'ctx':_0x445c8a,'width':_0x46b35c,'height':_0x19d88b};};}export default readFileM4;
@@ -0,0 +1,141 @@
1
+ import type { FeatureCollection } from 'geojson';
2
+ export interface IReadFileM4 {
3
+ filePath: string;
4
+ nx: number;
5
+ ny: number;
6
+ minLng: number;
7
+ minLat: number;
8
+ gjLng: number;
9
+ gjLat: number;
10
+ values: number[];
11
+ maxVal: number;
12
+ minVal: number;
13
+ /**
14
+ * 开始解析文件
15
+ * @param config
16
+ */
17
+ start: (config?: ReadConfig) => Promise<void>;
18
+ /**
19
+ * 自定义数据, 使用他不需要接文件, 也不需要执行start(). 但是需要提供详细的数据
20
+ * @param params
21
+ * @param config
22
+ */
23
+ setParams: (params: ParamsConfig, config?: ReadConfig) => void;
24
+ /**
25
+ * 获取等值带
26
+ * @param breaks
27
+ */
28
+ getIsoBandsFast: (breaks: number[]) => FeatureCollection;
29
+ /**
30
+ * 获取等值带 Canvas
31
+ * @param breaks
32
+ * @param colors
33
+ * @param options : { width?: number, height?: number, pixelRatio?: number }
34
+ */
35
+ getIsoBandsCanvas: (breaks: number[], colors: (number[] | string)[], options?: CanvasOptions) => HTMLCanvasElement | null;
36
+ /**
37
+ * 提取分级对应的颜色
38
+ * @param z 当前分级
39
+ * @param level 分级数组
40
+ * @param color 分级颜色数组
41
+ */
42
+ getColorFast: (z: number | string, level: (number | string)[], color: (number[] | string)[]) => string;
43
+ /**
44
+ * 裁剪数据
45
+ * @param iosBands 等值带数据
46
+ * @param json 裁剪范围数据
47
+ * @param intersectWorkerUrl 裁剪 Worker 脚本 URL
48
+ * @param useCpuCount 可选,使用的 CPU 核心数
49
+ */
50
+ clipDataByJson: (iosBands: FeatureCollection, json: FeatureCollection, intersectWorkerUrl: string, useCpuCount?: number) => Promise<FeatureCollection>;
51
+ /**
52
+ * 使用 Worker 多线程获取等值带
53
+ * @param breaks 等值带分级
54
+ * @param bandsWorkerUrl 等值带计算 Worker 脚本 URL
55
+ * @param useCpuCount 可选,使用的 CPU 核心数
56
+ * @deprecated 即将弃用, 请使用 `getIsoBandsFast`
57
+ */
58
+ getIsoBandsFastByWorker: (breaks: number[], bandsWorkerUrl: string, useCpuCount?: number) => Promise<FeatureCollection>;
59
+ /**
60
+ * 清理等值带缓存 (缓存只在 getIsoBandsByLayerBreak 方法中使用)
61
+ * @deprecated 准备弃用, 分层使用canvas来做
62
+ */
63
+ clearMaskCache: () => void;
64
+ /**
65
+ * 获取等值带 (支持按层获取或全部层合并获取)
66
+ * - 单层因为数据丢失可能不准确
67
+ * @param breaks
68
+ * @param layerLower
69
+ * @deprecated 准备弃用, 分层使用canvas来做
70
+ */
71
+ getIsoBandsByLayerBreak: (breaks?: number[], layerLower?: number) => FeatureCollection;
72
+ /**
73
+ * 获取 JSON 数据数组
74
+ * @return JSONData[]
75
+ */
76
+ getJsonData: () => JSONData[];
77
+ /**
78
+ * 构建一个网格网格 Canvas, 用于在融合模式下展示网格线, 网格的依据来源于数据的经纬度和分辨率
79
+ */
80
+ buildGridCanvas: (options?: CanvasOptions) => HTMLCanvasElement | null;
81
+ }
82
+ /**
83
+ * 读取文件对数据的处理
84
+ */
85
+ export interface ReadConfig {
86
+ /**
87
+ * 是否将温度从开尔文转换为摄氏度(如果数据确实是温度的话)
88
+ */
89
+ convertTemKtoC?: boolean;
90
+ /**
91
+ * 附加偏移量 (如果需要对数值进行调整)
92
+ */
93
+ plusOffset?: number;
94
+ }
95
+ /**
96
+ * 设置数据参数
97
+ */
98
+ export interface ParamsConfig {
99
+ /**
100
+ * 数据值数组
101
+ */
102
+ values: number[];
103
+ /**
104
+ * 栅格列数
105
+ */
106
+ nx: number;
107
+ /**
108
+ * 栅格行数
109
+ */
110
+ ny: number;
111
+ /**
112
+ * 最小经度
113
+ */
114
+ minLng: number;
115
+ /**
116
+ * 最小纬度
117
+ */
118
+ minLat: number;
119
+ /**
120
+ * 经度分辨率
121
+ */
122
+ gjLng: number;
123
+ /**
124
+ * 纬度分辨率
125
+ */
126
+ gjLat: number;
127
+ }
128
+ export interface Point {
129
+ lat: number;
130
+ lng: number;
131
+ }
132
+ export interface JSONData extends Point {
133
+ val: number;
134
+ }
135
+ export interface CanvasOptions {
136
+ width?: number;
137
+ height?: number;
138
+ pixelRatio?: number;
139
+ strokeStyle?: string;
140
+ lineWidth?: number;
141
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "m4-w-fast",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -16,10 +16,12 @@
16
16
  "scripts": {
17
17
  "build:types": "tsc -p tsconfig.build.json",
18
18
  "obfuscate": "javascript-obfuscator dist --output dist",
19
- "build": "npm run build:types && npm run build:rollup && npm run obfuscate",
19
+ "build": "npm run build:types && npm run build:rollup && npm run build:browser && npm run obfuscate",
20
20
  "prepublishOnly": "npm run build",
21
- "build:rollup": "rollup -c"
21
+ "build:rollup": "rollup -c",
22
+ "build:browser": "rollup -c rollup.config.browser.js"
22
23
  },
24
+ "browser": "dist/m4-w-fast.umd.js",
23
25
  "author": "wangrl",
24
26
  "license": "ISC",
25
27
  "type": "module",
@@ -41,9 +43,11 @@
41
43
  },
42
44
  "dependencies": {
43
45
  "@turf/area": "^7.2.0",
46
+ "@turf/boolean-point-in-polygon": "^7.3.1",
44
47
  "@turf/isobands": "^7.2.0",
45
48
  "@turf/isolines": "^7.2.0",
46
49
  "@turf/turf": "^6.5.0",
50
+ "@types/leaflet": "^1.9.21",
47
51
  "d3-contour": "^4",
48
52
  "decimal.js": "^10.6.0"
49
53
  },