Newer
Older
smartwell_front_dz / smartwell / static / js / chunk-libs-964ad5ab.b55584f4.js
wangxitong on 11 Sep 2023 9 KB first commit
"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[6408],{93737:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});var o=r(84102),n=r(10611);function a(t,e,r,a){void 0===a&&(a={});var s=n.getCoord(t),i=o.degreesToRadians(s[0]),h=o.degreesToRadians(s[1]),u=o.degreesToRadians(r),p=o.lengthToRadians(e,a.units),f=Math.asin(Math.sin(h)*Math.cos(p)+Math.cos(h)*Math.sin(p)*Math.cos(u)),l=i+Math.atan2(Math.sin(u)*Math.sin(p)*Math.cos(h),Math.cos(p)-Math.sin(h)*Math.sin(f)),d=o.radiansToDegrees(l),c=o.radiansToDegrees(f);return o.point([d,c],a.properties)}e["default"]=a},68727:(t,e,r)=>{var o=r(32676),n=r(84102),a=r(10611);function s(t){return t&&"object"===typeof t&&"default"in t?t:{default:t}}var i=s(o);function h(t,e){var r=a.getGeom(t),o=a.getGeom(e),s=t.properties||{},h=i["default"].difference(r.coordinates,o.coordinates);return 0===h.length?null:1===h.length?n.polygon(h[0],s):n.multiPolygon(h,s)}t.exports=h,t.exports["default"]=h},52407:(t,e,r)=>{var o=r(84102),n=r(10611),a=r(31540),s=r(24288),i=r(32676);function h(t){return t&&"object"===typeof t&&"default"in t?t:{default:t}}var u=h(s),p=h(i);function f(t,e){if(e=e||{},!o.isObject(e))throw new Error("options is invalid");var r=e.propertyName;n.collectionOf(t,"Polygon","dissolve");var s=[];if(!e.propertyName)return u["default"](o.multiPolygon(p["default"].union.apply(null,t.features.map((function(t){return t.geometry.coordinates})))));var i={};a.featureEach(t,(function(t){Object.prototype.hasOwnProperty.call(i,t.properties[r])||(i[t.properties[r]]=[]),i[t.properties[r]].push(t)}));for(var h=Object.keys(i),f=0;f<h.length;f++){var l=o.multiPolygon(p["default"].union.apply(null,i[h[f]].map((function(t){return t.geometry.coordinates}))));l.properties[r]=h[f],s.push(l)}return u["default"](o.featureCollection(s))}t.exports=f,t.exports["default"]=f},35366:function(t,e,r){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(66338)),a=r(10611),s=r(31540);function i(t,e,r){void 0===r&&(r=2);var o=a.getCoord(t),n=a.getCoord(e),s=o[0]-n[0],i=o[1]-n[1];return 1===r?Math.abs(s)+Math.abs(i):Math.pow(Math.pow(s,r)+Math.pow(i,r),1/r)}function h(t,e){e=e||{};var r=e.threshold||1e4,o=e.p||2,a=e.binary||!1,h=e.alpha||-1,u=e.standardization||!1,p=[];s.featureEach(t,(function(t){p.push(n.default(t))}));for(var f=[],l=0;l<p.length;l++)f[l]=[];for(l=0;l<p.length;l++)for(var d=l;d<p.length;d++){l===d&&(f[l][d]=0);var c=i(p[l],p[d],o);f[l][d]=c,f[d][l]=c}for(l=0;l<p.length;l++)for(d=0;d<p.length;d++){c=f[l][d];0!==c&&(f[l][d]=a?c<=r?1:0:c<=r?Math.pow(c,h):0)}if(u)for(l=0;l<p.length;l++){var g=f[l].reduce((function(t,e){return t+e}),0);for(d=0;d<p.length;d++)f[l][d]=f[l][d]/g}return f}e.pNormDistance=i,e["default"]=h},31013:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});var o=r(10611),n=r(84102);function a(t,e,r){void 0===r&&(r={});var a=o.getCoord(t),s=o.getCoord(e),i=n.degreesToRadians(s[1]-a[1]),h=n.degreesToRadians(s[0]-a[0]),u=n.degreesToRadians(a[1]),p=n.degreesToRadians(s[1]),f=Math.pow(Math.sin(i/2),2)+Math.pow(Math.sin(h/2),2)*Math.cos(u)*Math.cos(p);return n.radiansToLength(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),r.units)}e["default"]=a},61211:(t,e,r)=>{var o=r(84102),n=r(86082),a=r(90067),s=r(10611);function i(t){return t&&"object"===typeof t&&"default"in t?t:{default:t}}var h=i(n),u=i(a);function p(t,e,r,n){n=n||{};var a=n.steps||64,i=n.units||"kilometers",p=n.angle||0,l=n.pivot||t,d=n.properties||t.properties||{};if(!t)throw new Error("center is required");if(!e)throw new Error("xSemiAxis is required");if(!r)throw new Error("ySemiAxis is required");if(!o.isObject(n))throw new Error("options must be an object");if(!o.isNumber(a))throw new Error("steps must be a number");if(!o.isNumber(p))throw new Error("angle must be a number");var c=s.getCoord(t);if("degrees"===i)var g=o.degreesToRadians(p);else e=h["default"](t,e,90,{units:i}),r=h["default"](t,r,0,{units:i}),e=s.getCoord(e)[0]-c[0],r=s.getCoord(r)[1]-c[1];for(var v=[],M=0;M<a;M+=1){var w=-360*M/a,y=e*r/Math.sqrt(Math.pow(r,2)+Math.pow(e,2)*Math.pow(f(w),2)),m=e*r/Math.sqrt(Math.pow(e,2)+Math.pow(r,2)/Math.pow(f(w),2));if(w<-90&&w>=-270&&(y=-y),w<-180&&w>=-360&&(m=-m),"degrees"===i){var x=y*Math.cos(g)+m*Math.sin(g),b=m*Math.cos(g)-y*Math.sin(g);y=x,m=b}v.push([y+c[0],m+c[1]])}return v.push(v[0]),"degrees"===i?o.polygon([v],d):u["default"](o.polygon([v],d),p,{pivot:l})}function f(t){var e=t*Math.PI/180;return Math.tan(e)}t.exports=p,t.exports["default"]=p},19062:(t,e,r)=>{var o=r(9705),n=r(13652);function a(t){return t&&"object"===typeof t&&"default"in t?t:{default:t}}var s=a(o),i=a(n);function h(t){return i["default"](s["default"](t))}t.exports=h,t.exports["default"]=h},63922:(t,e,r)=>{var o=r(31540),n=r(84102);function a(t){var e=[];return"FeatureCollection"===t.type?o.featureEach(t,(function(t){o.coordEach(t,(function(r){e.push(n.point(r,t.properties))}))})):o.coordEach(t,(function(r){e.push(n.point(r,t.properties))})),n.featureCollection(e)}t.exports=a,t.exports["default"]=a},24288:(t,e,r)=>{var o=r(31540),n=r(84102);function a(t){if(!t)throw new Error("geojson is required");var e=[];return o.flattenEach(t,(function(t){e.push(t)})),n.featureCollection(e)}t.exports=a,t.exports["default"]=a},37970:(t,e,r)=>{var o=r(31540),n=r(84102),a=r(76565);function s(t){return t&&"object"===typeof t&&"default"in t?t:{default:t}}var i=s(a);function h(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r=e.mutate;if(!t)throw new Error("geojson is required");return!1!==r&&void 0!==r||(t=i["default"](t)),o.coordEach(t,(function(t){var e=t[0],r=t[1];t[0]=r,t[1]=e})),t}t.exports=h,t.exports["default"]=h},25422:(t,e,r)=>{var o=r(10611),n=Math.PI/180,a=180/Math.PI,s=function(t,e){this.lon=t,this.lat=e,this.x=n*t,this.y=n*e};s.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},s.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:-1*(180-this.lon);return new s(e,t)};var i=function(){this.coords=[],this.length=0};i.prototype.move_to=function(t){this.length++,this.coords.push(t)};var h=function(t){this.properties=t||{},this.geometries=[]};h.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var t=[],e=0;e<this.geometries.length;e++)t.push(this.geometries[e].coords);return{geometry:{type:"MultiLineString",coordinates:t},type:"Feature",properties:this.properties}},h.prototype.wkt=function(){for(var t="",e="LINESTRING(",r=function(t){e+=t[0]+" "+t[1]+","},o=0;o<this.geometries.length;o++){if(0===this.geometries[o].coords.length)return"LINESTRING(empty)";var n=this.geometries[o].coords;n.forEach(r),t+=e.substring(0,e.length-1)+")"}return t};var u=function(t,e,r){if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new s(t.x,t.y),this.end=new s(e.x,e.y),this.properties=r||{};var o=this.start.x-this.end.x,n=this.start.y-this.end.y,a=Math.pow(Math.sin(n/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(o/2),2);if(this.g=2*Math.asin(Math.sqrt(a)),this.g===Math.PI)throw new Error("it appears "+t.view()+" and "+e.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+t+" and "+e)};function p(t,e,r){if(r=r||{},"object"!==typeof r)throw new Error("options is invalid");var n=r.properties,a=r.npoints,s=r.offset;t=o.getCoord(t),e=o.getCoord(e),n=n||{},a=a||100,s=s||10;var i=new u({x:t[0],y:t[1]},{x:e[0],y:e[1]},n),h=i.Arc(a,{offset:s});return h.json()}u.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),r=Math.sin(t*this.g)/Math.sin(this.g),o=e*Math.cos(this.start.y)*Math.cos(this.start.x)+r*Math.cos(this.end.y)*Math.cos(this.end.x),n=e*Math.cos(this.start.y)*Math.sin(this.start.x)+r*Math.cos(this.end.y)*Math.sin(this.end.x),s=e*Math.sin(this.start.y)+r*Math.sin(this.end.y),i=a*Math.atan2(s,Math.sqrt(Math.pow(o,2)+Math.pow(n,2))),h=a*Math.atan2(n,o);return[h,i]},u.prototype.Arc=function(t,e){var r=[];if(!t||t<=2)r.push([this.start.lon,this.start.lat]),r.push([this.end.lon,this.end.lat]);else for(var o=1/(t-1),n=0;n<t;++n){var a=o*n,s=this.interpolate(a);r.push(s)}for(var u=!1,p=0,f=e&&e.offset?e.offset:10,l=180-f,d=-180+f,c=360-f,g=1;g<r.length;++g){var v=r[g-1][0],M=r[g][0],w=Math.abs(M-v);w>c&&(M>l&&v<d||v>l&&M<d)?u=!0:w>p&&(p=w)}var y=[];if(u&&p<f){var m=[];y.push(m);for(var x=0;x<r.length;++x){var b=parseFloat(r[x][0]);if(x>0&&Math.abs(b-r[x-1][0])>c){var E=parseFloat(r[x-1][0]),j=parseFloat(r[x-1][1]),C=parseFloat(r[x][0]),T=parseFloat(r[x][1]);if(E>-180&&E<d&&180===C&&x+1<r.length&&r[x-1][0]>-180&&r[x-1][0]<d){m.push([-180,r[x][1]]),x++,m.push([r[x][0],r[x][1]]);continue}if(E>l&&E<180&&-180===C&&x+1<r.length&&r[x-1][0]>l&&r[x-1][0]<180){m.push([180,r[x][1]]),x++,m.push([r[x][0],r[x][1]]);continue}if(E<d&&C>l){var P=E;E=C,C=P;var _=j;j=T,T=_}if(E>l&&C<d&&(C+=360),E<=180&&C>=180&&E<C){var q=(180-E)/(C-E),N=q*T+(1-q)*j;m.push([r[x-1][0]>l?180:-180,N]),m=[],m.push([r[x-1][0]>l?-180:180,N]),y.push(m)}else m=[],y.push(m);m.push([b,r[x][1]])}else m.push([r[x][0],r[x][1]])}}else{var R=[];y.push(R);for(var O=0;O<r.length;++O)R.push([r[O][0],r[O][1]])}for(var F=new h(this.properties),S=0;S<y.length;++S){var I=new i;F.geometries.push(I);for(var k=y[S],G=0;G<k.length;++G)I.move_to(k[G])}return F},t.exports=p,t.exports["default"]=p}}]);