Newer
Older
smartwell_front_dz / smartwell / static / js / chunk-libs-22a337ae.43bbe7f3.js
wangxitong on 11 Sep 2023 9 KB first commit
"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[4387],{74170:function(e,r,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=t(84102),i=t(10611),a=o(t(32676));function u(e,r,t){void 0===t&&(t={});var o=i.getGeom(e),u=i.getGeom(r),l=a.default.intersection(o.coordinates,u.coordinates);return 0===l.length?null:1===l.length?n.polygon(l[0],t.properties):n.multiPolygon(l,t.properties)}r["default"]=u},10611:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0});var o=t(84102);function n(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function i(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function a(e){if(e.length>1&&o.isNumber(e[0])&&o.isNumber(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return a(e[0]);throw new Error("coordinates must only contain numbers")}function u(e,r,t){if(!r||!t)throw new Error("type and name required");if(!e||e.type!==r)throw new Error("Invalid input to "+t+": must be a "+r+", given "+e.type)}function l(e,r,t){if(!e)throw new Error("No feature passed");if(!t)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!e.geometry)throw new Error("Invalid input to "+t+", Feature with geometry required");if(!e.geometry||e.geometry.type!==r)throw new Error("Invalid input to "+t+": must be a "+r+", given "+e.geometry.type)}function f(e,r,t){if(!e)throw new Error("No featureCollection passed");if(!t)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+t+", FeatureCollection required");for(var o=0,n=e.features;o<n.length;o++){var i=n[o];if(!i||"Feature"!==i.type||!i.geometry)throw new Error("Invalid input to "+t+", Feature with geometry required");if(!i.geometry||i.geometry.type!==r)throw new Error("Invalid input to "+t+": must be a "+r+", given "+i.geometry.type)}}function s(e){return"Feature"===e.type?e.geometry:e}function c(e,r){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}r.getCoord=n,r.getCoords=i,r.containsNumber=a,r.geojsonType=u,r.featureOf=l,r.collectionOf=f,r.getGeom=s,r.getType=c},7928:(e,r,t)=>{var o=t(25108),n=t(9705),i=t(31540),a=t(10611),u=t(84102),l=t(27418);function f(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var s=f(n),c=f(l),p={successCallback:null,verbose:!1},y={};function h(e,r,t){t=t||{};for(var n=Object.keys(p),i=0;i<n.length;i++){var a=n[i],u=t[a];u="undefined"!==typeof u&&null!==u?u:p[a],y[a]=u}y.verbose&&o.log("MarchingSquaresJS-isoContours: computing isocontour for "+r);var l=E(d(e,r));return"function"===typeof y.successCallback&&y.successCallback(l),l}function g(e,r,t){return(e-r)/(t-r)}function d(e,r){for(var t=e.length-1,n=e[0].length-1,i={rows:t,cols:n,cells:[]},a=0;a<t;++a){i.cells[a]=[];for(var u=0;u<n;++u){var l=0,f=e[a+1][u],s=e[a+1][u+1],c=e[a][u+1],p=e[a][u];if(!(isNaN(f)||isNaN(s)||isNaN(c)||isNaN(p))){l|=f>=r?8:0,l|=s>=r?4:0,l|=c>=r?2:0,l|=p>=r?1:0;var y,h,d,v,m=!1;if(5===l||10===l){var b=(f+s+c+p)/4;5===l&&b<r?(l=10,m=!0):10===l&&b<r&&(l=5,m=!0)}if(0!==l&&15!==l)y=h=d=v=.5,1===l?(d=1-g(r,f,p),h=1-g(r,c,p)):2===l?(h=g(r,p,c),v=1-g(r,s,c)):3===l?(d=1-g(r,f,p),v=1-g(r,s,c)):4===l?(y=g(r,f,s),v=g(r,c,s)):5===l?(y=g(r,f,s),v=g(r,c,s),h=1-g(r,c,p),d=1-g(r,f,p)):6===l?(h=g(r,p,c),y=g(r,f,s)):7===l?(d=1-g(r,f,p),y=g(r,f,s)):8===l?(d=g(r,p,f),y=1-g(r,s,f)):9===l?(h=1-g(r,c,p),y=1-g(r,s,f)):10===l?(y=1-g(r,s,f),v=1-g(r,s,c),h=g(r,p,c),d=g(r,p,f)):11===l?(y=1-g(r,s,f),v=1-g(r,s,c)):12===l?(d=g(r,p,f),v=g(r,c,s)):13===l?(h=1-g(r,c,p),v=g(r,c,s)):14===l?(d=g(r,p,f),h=g(r,p,c)):o.log("MarchingSquaresJS-isoContours: Illegal cval detected: "+l),i.cells[a][u]={cval:l,flipped:m,top:y,right:v,bottom:h,left:d}}}}return i}function v(e){return 5===e.cval||10===e.cval}function m(e){return 0===e.cval||15===e.cval}function b(e){m(e)||5===e.cval||10===e.cval||(e.cval=15)}function w(e,r){return"top"===r?[e.top,1]:"bottom"===r?[e.bottom,0]:"right"===r?[1,e.right]:"left"===r?[0,e.left]:void 0}function E(e){var r=[],t=0,o=1e-7;return e.cells.forEach((function(n,i){n.forEach((function(n,a){if("undefined"!==typeof n&&!v(n)&&!m(n)){var u=C(e.cells,i,a),l=!1;if("mergeable"===u.info)for(var f=u.path[u.path.length-1][0],s=u.path[u.path.length-1][1],c=t-1;c>=0;c--)if(Math.abs(r[c][0][0]-f)<=o&&Math.abs(r[c][0][1]-s)<=o){for(var p=u.path.length-2;p>=0;--p)r[c].unshift(u.path[p]);l=!0;break}l||(r[t++]=u.path)}}))})),r}function C(e,r,t){var o,n,i=e.length,a=[],u=[0,0,1,1,0,0,0,0,-1,0,1,1,-1,0,-1,0],l=[0,-1,0,0,1,1,1,1,0,-1,0,0,0,-1,0,0],f=["none","left","bottom","left","right","none","bottom","left","top","top","none","top","right","right","bottom","none"],s=["none","bottom","right","right","top","top","top","top","left","bottom","right","right","left","bottom","left","none"],c=e[r][t],p=c.cval,y=f[p],h=w(c,y);a.push([t+h[0],r+h[1]]),y=s[p],h=w(c,y),a.push([t+h[0],r+h[1]]),b(c);var g=t+u[p],d=r+l[p],v=p;while(g>=0&&d>=0&&d<i&&(g!=t||d!=r)){if(c=e[d][g],"undefined"===typeof c)break;if(p=c.cval,0===p||15===p)return{path:a,info:"mergeable"};y=s[p],o=u[p],n=l[p],5!==p&&10!==p||(5===p?c.flipped?-1===l[v]?(y="left",o=-1,n=0):(y="right",o=1,n=0):-1===u[v]&&(y="bottom",o=0,n=-1):10===p&&(c.flipped?-1===u[v]?(y="top",o=0,n=1):(y="bottom",o=0,n=-1):1===l[v]&&(y="left",o=-1,n=0))),h=w(c,y),a.push([g+h[0],d+h[1]]),b(c),g+=o,d+=n,v=p}return{path:a,info:"closed"}}function P(e,r){if(r=r||{},!u.isObject(r))throw new Error("options is invalid");var t=r.zProperty||"elevation",o=r.flip,n=r.flags;a.collectionOf(e,"Point","input must contain Points");for(var i=A(e,o),l=[],f=0;f<i.length;f++){for(var s=i[f],c=[],p=0;p<s.length;p++){var y=s[p];y.properties[t]?c.push(y.properties[t]):c.push(0),!0===n&&(y.properties.matrixPosition=[f,p])}l.push(c)}return l}function A(e,r){var t={};i.featureEach(e,(function(e){var r=a.getCoords(e)[1];t[r]||(t[r]=[]),t[r].push(e)}));var o=Object.keys(t).map((function(e){var r=t[e],o=r.sort((function(e,r){return a.getCoords(e)[0]-a.getCoords(r)[0]}));return o})),n=o.sort((function(e,t){return r?a.getCoords(e[0])[1]-a.getCoords(t[0])[1]:a.getCoords(t[0])[1]-a.getCoords(e[0])[1]}));return n}function O(e,r,t){if(t=t||{},!u.isObject(t))throw new Error("options is invalid");var o=t.zProperty||"elevation",n=t.commonProperties||{},i=t.breaksProperties||[];if(a.collectionOf(e,"Point","Input must contain Points"),!r)throw new Error("breaks is required");if(!Array.isArray(r))throw new Error("breaks must be an Array");if(!u.isObject(n))throw new Error("commonProperties must be an Object");if(!Array.isArray(i))throw new Error("breaksProperties must be an Array");var l=P(e,{zProperty:o,flip:!0}),f=F(l,r,o,n,i),s=_(f,l,e);return u.featureCollection(s)}function F(e,r,t,o,n){for(var i=[],a=1;a<r.length;a++){var l=+r[a],f=c["default"]({},o,n[a]);f[t]=l;var s=u.multiLineString(h(e,l),f);i.push(s)}return i}function _(e,r,t){var o=s["default"](t),n=o[2]-o[0],a=o[3]-o[1],u=o[0],l=o[1],f=r[0].length-1,c=r.length-1,p=n/f,y=a/c,h=function(e){e[0]=e[0]*p+u,e[1]=e[1]*y+l};return e.forEach((function(e){i.coordEach(e,h)})),e}e.exports=O,e.exports["default"]=O},81641:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0});var o=t(84102);function n(e){var r,t,n={type:"FeatureCollection",features:[]};if(t="Feature"===e.type?e.geometry:e,"LineString"===t.type)r=[t.coordinates];else if("MultiLineString"===t.type)r=t.coordinates;else if("MultiPolygon"===t.type)r=[].concat.apply([],t.coordinates);else{if("Polygon"!==t.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");r=t.coordinates}return r.forEach((function(e){r.forEach((function(r){for(var t=0;t<e.length-1;t++)for(var a=t;a<r.length-1;a++){if(e===r){if(1===Math.abs(t-a))continue;if(0===t&&a===e.length-2&&e[t][0]===e[e.length-1][0]&&e[t][1]===e[e.length-1][1])continue}var u=i(e[t][0],e[t][1],e[t+1][0],e[t+1][1],r[a][0],r[a][1],r[a+1][0],r[a+1][1]);u&&n.features.push(o.point([u[0],u[1]]))}}))})),n}function i(e,r,t,o,n,i,a,u){var l,f,s,c,p,y={x:null,y:null,onLine1:!1,onLine2:!1};return l=(u-i)*(t-e)-(a-n)*(o-r),0===l?null!==y.x&&null!==y.y&&y:(f=r-i,s=e-n,c=(a-n)*f-(u-i)*s,p=(t-e)*f-(o-r)*s,f=c/l,s=p/l,y.x=e+f*(t-e),y.y=r+f*(o-r),f>=0&&f<=1&&(y.onLine1=!0),s>=0&&s<=1&&(y.onLine2=!0),!(!y.onLine1||!y.onLine2)&&[y.x,y.y])}r["default"]=n},10091:function(e,r,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=o(t(31013)),i=t(31540);function a(e,r){return void 0===r&&(r={}),i.segmentReduce(e,(function(e,t){var o=t.geometry.coordinates;return e+n.default(o[0],o[1],r)}),0)}r["default"]=a}}]);