ow-eengine-power 2.4.8 → 2.4.9

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.
@@ -1,20 +1,13 @@
1
- (function(k,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("cesium")):typeof define=="function"&&define.amd?define(["exports","cesium"],R):(k=typeof globalThis<"u"?globalThis:k||self,R(k.OW_EEngine_Power={},k.Cesium))})(this,function(k,R){"use strict";var Ti=Object.defineProperty;var Ci=(k,R,ts)=>R in k?Ti(k,R,{enumerable:!0,configurable:!0,writable:!0,value:ts}):k[R]=ts;var I=(k,R,ts)=>Ci(k,typeof R!="symbol"?R+"":R,ts);function ts(a){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const i in a)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(o,i,r.get?r:{enumerable:!0,get:()=>a[i]})}}return o.default=a,Object.freeze(o)}const n=ts(R);function Es(a,o,i={}){const{color:r=R.Color.WHITE,width:s=3,clampToGround:c=!1,zIndex:W=0,dashed:L=!1,dashLength:p=10}=i,w=L?new n.PolylineDashMaterialProperty({color:r,dashLength:p}):new n.ColorMaterialProperty(r);return a.entities.add({polyline:{positions:o,width:s,material:w,clampToGround:c,zIndex:W}})}function h(a,o,i=10,r="#ba1919",s,c=!1){const W={show:!0,positions:a,clampToGround:c,width:i,material:n.Color.fromCssColorString(r),arcType:n.ArcType.NONE,shadows:n.ShadowMode.DISABLED,granularity:c?void 0:0};let L;return L=[0,1e5],W.distanceDisplayCondition=new n.DistanceDisplayCondition(L[0],L[1]),{name:o,label:{text:o,font:"18px sans-serif",distanceDisplayCondition:new n.DistanceDisplayCondition(L[0],Math.min(L[1],5e3))},polyline:W}}function Ws(a,o,i,r,s=new n.HeadingPitchRoll(0,0,0),c=1,W){const L={show:!0,uri:r,scale:c,transition:{distanceDisplayCondition:!0,scale:!0}};return W&&(Array.isArray(W)?L.distanceDisplayCondition=new n.DistanceDisplayCondition(W[0],W[1]):L.distanceDisplayCondition=W),{id:a,name:i,position:o,orientation:n.Transforms.headingPitchRollQuaternion(o,s),model:L}}function fs(a,o,i,r={}){const{pointColor:s=R.Color.YELLOW,pointSize:c=12,labelColor:W=R.Color.WHITE,fontSize:L=16,pixelOffset:p=[0,-20],heightReference:w=R.HeightReference.NONE}=r;return a.entities.add({position:o,point:{color:s,pixelSize:c,heightReference:w,distanceDisplayCondition:new n.DistanceDisplayCondition(0,100)},label:{text:i,font:`${L}px sans-serif`,fillColor:W,pixelOffset:new n.Cartesian2(...p),style:R.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,outlineColor:R.Color.BLACK,heightReference:w,distanceDisplayCondition:new n.DistanceDisplayCondition(0,100)}})}var V=63710088e-1,ws={centimeters:V*100,centimetres:V*100,degrees:V/111325,feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936};function es(a,o,i){i===void 0&&(i={});var r={type:"Feature"};return(i.id===0||i.id)&&(r.id=i.id),i.bbox&&(r.bbox=i.bbox),r.properties=o||{},r.geometry=a,r}function j(a,o,i){if(i===void 0&&(i={}),!a)throw new Error("coordinates is required");if(!Array.isArray(a))throw new Error("coordinates must be an Array");if(a.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ps(a[0])||!Ps(a[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:a};return es(r,o,i)}function U(a,o,i){if(i===void 0&&(i={}),a.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:a};return es(r,o,i)}function Xs(a,o){o===void 0&&(o={});var i={type:"FeatureCollection"};return o.id&&(i.id=o.id),o.bbox&&(i.bbox=o.bbox),i.features=a,i}function Is(a,o){o===void 0&&(o="kilometers");var i=ws[o];if(!i)throw new Error(o+" units is invalid");return a*i}function ds(a,o){o===void 0&&(o="kilometers");var i=ws[o];if(!i)throw new Error(o+" units is invalid");return a/i}function ls(a){var o=a%(2*Math.PI);return o*180/Math.PI}function K(a){var o=a%360;return o*Math.PI/180}function Bs(a,o,i){if(o===void 0&&(o="kilometers"),i===void 0&&(i="kilometers"),!(a>=0))throw new Error("length must be a positive number");return Is(ds(a,o),i)}function Ps(a){return!isNaN(a)&&a!==null&&!Array.isArray(a)}function Ds(a){return!!a&&a.constructor===Object}function ys(a,o,i){if(a!==null)for(var r,s,c,W,L,p,w,t=0,l=0,u,C=a.type,e=C==="FeatureCollection",T=C==="Feature",m=e?a.features.length:1,b=0;b<m;b++){w=e?a.features[b].geometry:T?a.geometry:a,u=w?w.type==="GeometryCollection":!1,L=u?w.geometries.length:1;for(var d=0;d<L;d++){var P=0,g=0;if(W=u?w.geometries[d]:w,W!==null){p=W.coordinates;var y=W.type;switch(t=0,y){case null:break;case"Point":if(o(p,l,b,P,g)===!1)return!1;l++,P++;break;case"LineString":case"MultiPoint":for(r=0;r<p.length;r++){if(o(p[r],l,b,P,g)===!1)return!1;l++,y==="MultiPoint"&&P++}y==="LineString"&&P++;break;case"Polygon":case"MultiLineString":for(r=0;r<p.length;r++){for(s=0;s<p[r].length-t;s++){if(o(p[r][s],l,b,P,g)===!1)return!1;l++}y==="MultiLineString"&&P++,y==="Polygon"&&g++}y==="Polygon"&&P++;break;case"MultiPolygon":for(r=0;r<p.length;r++){for(g=0,s=0;s<p[r].length;s++){for(c=0;c<p[r][s].length-t;c++){if(o(p[r][s][c],l,b,P,g)===!1)return!1;l++}g++}P++}break;case"GeometryCollection":for(r=0;r<W.geometries.length;r++)if(ys(W.geometries[r],o)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ys(a,o){if(a.type==="Feature")o(a,0);else if(a.type==="FeatureCollection")for(var i=0;i<a.features.length&&o(a.features[i],i)!==!1;i++);}function Fs(a,o){var i,r,s,c,W,L,p,w,t,l,u=0,C=a.type==="FeatureCollection",e=a.type==="Feature",T=C?a.features.length:1;for(i=0;i<T;i++){for(L=C?a.features[i].geometry:e?a.geometry:a,w=C?a.features[i].properties:e?a.properties:{},t=C?a.features[i].bbox:e?a.bbox:void 0,l=C?a.features[i].id:e?a.id:void 0,p=L?L.type==="GeometryCollection":!1,W=p?L.geometries.length:1,s=0;s<W;s++){if(c=p?L.geometries[s]:L,c===null){if(o(null,u,w,t,l)===!1)return!1;continue}switch(c.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(o(c,u,w,t,l)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<c.geometries.length;r++)if(o(c.geometries[r],u,w,t,l)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}u++}}function Hs(a,o){Fs(a,function(i,r,s,c,W){var L=i===null?null:i.type;switch(L){case null:case"Point":case"LineString":case"Polygon":return o(es(i,s,{bbox:c,id:W}),r,0)===!1?!1:void 0}var p;switch(L){case"MultiPoint":p="Point";break;case"MultiLineString":p="LineString";break;case"MultiPolygon":p="Polygon";break}for(var w=0;w<i.coordinates.length;w++){var t=i.coordinates[w],l={type:p,coordinates:t};if(o(es(l,s),r,w)===!1)return!1}})}function Os(a,o){Hs(a,function(i,r,s){var c=0;if(i.geometry){var W=i.geometry.type;if(!(W==="Point"||W==="MultiPoint")){var L,p=0,w=0,t=0;if(ys(i,function(l,u,C,e,T){if(L===void 0||r>p||e>w||T>t){L=l,p=r,w=e,t=T,c=0;return}var m=U([L,l],i.properties);if(o(m,r,s,T,c)===!1)return!1;c++,L=l})===!1)return!1}}})}function x(a){if(!a)throw new Error("coord is required");if(!Array.isArray(a)){if(a.type==="Feature"&&a.geometry!==null&&a.geometry.type==="Point")return a.geometry.coordinates;if(a.type==="Point")return a.coordinates}if(Array.isArray(a)&&a.length>=2&&!Array.isArray(a[0])&&!Array.isArray(a[1]))return a;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function gs(a,o,i){if(!a)throw new Error("No feature passed");if(!i)throw new Error(".featureOf() requires a name");if(!a||a.type!=="Feature"||!a.geometry)throw new Error("Invalid input to "+i+", Feature with geometry required");if(!a.geometry||a.geometry.type!==o)throw new Error("Invalid input to "+i+": must be a "+o+", given "+a.geometry.type)}var os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ss(a,o,i){i===void 0&&(i={});var r=x(a),s=x(o),c=K(s[1]-r[1]),W=K(s[0]-r[0]),L=K(r[1]),p=K(s[1]),w=Math.pow(Math.sin(c/2),2)+Math.pow(Math.sin(W/2),2)*Math.cos(L)*Math.cos(p);return Is(2*Math.atan2(Math.sqrt(w),Math.sqrt(1-w)),i.units)}function Ns(a){if(!a)throw new Error("geojson is required");switch(a.type){case"Feature":return ms(a);case"FeatureCollection":return Gs(a);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return us(a);default:throw new Error("unknown GeoJSON type")}}function ms(a){var o={type:"Feature"};return Object.keys(a).forEach(function(i){switch(i){case"type":case"properties":case"geometry":return;default:o[i]=a[i]}}),o.properties=bs(a.properties),o.geometry=us(a.geometry),o}function bs(a){var o={};return a&&Object.keys(a).forEach(function(i){var r=a[i];typeof r=="object"?r===null?o[i]=null:Array.isArray(r)?o[i]=r.map(function(s){return s}):o[i]=bs(r):o[i]=r}),o}function Gs(a){var o={type:"FeatureCollection"};return Object.keys(a).forEach(function(i){switch(i){case"type":case"features":return;default:o[i]=a[i]}}),o.features=a.features.map(function(i){return ms(i)}),o}function us(a){var o={type:a.type};return a.bbox&&(o.bbox=a.bbox),a.type==="GeometryCollection"?(o.geometries=a.geometries.map(function(i){return us(i)}),o):(o.coordinates=vs(a.coordinates),o)}function vs(a){var o=a;return typeof o[0]!="object"?o.slice():o.map(function(i){return vs(i)})}function cs(a,o,i,r){r===void 0&&(r={});var s=x(a),c=K(s[0]),W=K(s[1]),L=K(i),p=ds(o,r.units),w=Math.asin(Math.sin(W)*Math.cos(p)+Math.cos(W)*Math.sin(p)*Math.cos(L)),t=c+Math.atan2(Math.sin(L)*Math.sin(p)*Math.cos(W),Math.cos(p)-Math.sin(W)*Math.sin(w)),l=ls(t),u=ls(w);return j([l,u],r.properties)}function ns(a,o,i){if(i===void 0&&(i={}),i.final===!0)return $s(a,o);var r=x(a),s=x(o),c=K(r[0]),W=K(s[0]),L=K(r[1]),p=K(s[1]),w=Math.sin(W-c)*Math.cos(p),t=Math.cos(L)*Math.sin(p)-Math.sin(L)*Math.cos(p)*Math.cos(W-c);return ls(Math.atan2(w,t))}function $s(a,o){var i=ns(o,a);return i=(i+180)%360,i}function zs(a,o){var i=ss(a,o),r=ns(a,o),s=cs(a,i/2,r);return s}function Vs(a,o){if(!a)throw new Error("targetPoint is required");if(!o)throw new Error("points is required");var i,r=1/0,s=0;return Ys(o,function(c,W){var L=ss(a,c);L<r&&(s=W,r=L)}),i=Ns(o.features[s]),i.properties.featureIndex=s,i.properties.distanceToPoint=r,i}function qs(a,o,i){i===void 0&&(i={});var r=x(a),s=x(o);s[0]+=s[0]-r[0]>180?-360:r[0]-s[0]>180?360:0;var c=Ks(r,s),W=Bs(c,"meters",i.units);return W}function Ks(a,o,i){i=i===void 0?V:Number(i);var r=i,s=a[1]*Math.PI/180,c=o[1]*Math.PI/180,W=c-s,L=Math.abs(o[0]-a[0])*Math.PI/180;L>Math.PI&&(L-=2*Math.PI);var p=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),w=Math.abs(p)>1e-11?W/p:Math.cos(s),t=Math.sqrt(W*W+w*w*L*L),l=t*r;return l}function Ts(a,o,i){if(i===void 0&&(i={}),i.method||(i.method="geodesic"),i.units||(i.units="kilometers"),!a)throw new Error("pt is required");if(Array.isArray(a)?a=j(a):a.type==="Point"?a=es(a):gs(a,"Point","point"),!o)throw new Error("line is required");Array.isArray(o)?o=U(o):o.type==="LineString"?o=es(o):gs(o,"LineString","line");var r=1/0,s=a.geometry.coordinates;return Os(o,function(c){var W=c.geometry.coordinates[0],L=c.geometry.coordinates[1],p=Js(s,W,L,i);p<r&&(r=p)}),Bs(r,"degrees",i.units)}function Js(a,o,i,r){var s=[i[0]-o[0],i[1]-o[1]],c=[a[0]-o[0],a[1]-o[1]],W=_s(c,s);if(W<=0)return Cs(a,o,{method:r.method,units:"degrees"});var L=_s(s,s);if(L<=W)return Cs(a,i,{method:r.method,units:"degrees"});var p=W/L,w=[o[0]+p*s[0],o[1]+p*s[1]];return Cs(a,w,{method:r.method,units:"degrees"})}function _s(a,o){return a[0]*o[0]+a[1]*o[1]}function Cs(a,o,i){return i.method==="planar"?qs(a,o,i):ss(a,o,i)}function Us(a,o,i,r){if(r=r||{},!Ds(r))throw new Error("options is invalid");var s,c=[];if(a.type==="Feature")s=a.geometry.coordinates;else if(a.type==="LineString")s=a.coordinates;else throw new Error("input must be a LineString Feature or Geometry");for(var W=s.length,L=0,p,w,t,l=0;l<s.length&&!(o>=L&&l===s.length-1);l++){if(L>o&&c.length===0){if(p=o-L,!p)return c.push(s[l]),U(c);w=ns(s[l],s[l-1])-180,t=cs(s[l],p,w,r),c.push(t.geometry.coordinates)}if(L>=i)return p=i-L,p?(w=ns(s[l],s[l-1])-180,t=cs(s[l],p,w,r),c.push(t.geometry.coordinates),U(c)):(c.push(s[l]),U(c));if(L>=o&&c.push(s[l]),l===s.length-1)return U(c);L+=ss(s[l],s[l+1],r)}if(L<o&&s.length===W)throw new Error("Start position is beyond line");var u=s[s.length-1];return U([u,u])}const is={units:"kilometers"};function js(a,o,i,r){var{nearestDistance:s}=as(a,o),{nearestDistance:c}=as(a,r),{nearestDistance:W}=as(a,i);const L=Math.min(s,W,c);return L===s?o:L===W?i:r}const Qs=(a,o,i)=>{debugger;const r=j(a.slice(0,2)),{nearestCoord:s}=as(a,o),c=o.findIndex(Z=>Z[0]==s[0]&&Z[1]==s[1]);let W=[];if(c==0)W.push(o[0],o[1]);else if(c==o.length-1)W.push(o[o.length-2],o[o.length-1]);else{const Z=[o[c],o[c+1]],F=[o[c-1],o[c]];var L=Ts(r,U(Z),is),p=Ts(r,U(F),is);W=L>p?F:Z}console.log("附近的点",c,W);const w=U([W[0].slice(0,2),W[1].slice(0,2)]),t=j(W[0].slice(0,2)),l=j(W[1].slice(0,2));var u=Ts(r,w,is),C=ss(r,t,is)||0,e=Math.sqrt(C*C-u*u)||0;let T=W[0].slice(0,2);e>0&&(T=Us(w,0,e,is).geometry.coordinates[1]);const m=ss(t,l,is),b=Math.abs(W[0][2]-W[1][2]),d=Math.min(W[0][2],W[1][2]),P=Math.max(W[0][2],W[1][2]),g=W[0][2]>W[1][2]?P-e/m*b:e/m*b+d;console.log("高度差>>>>",b),console.log("最小高度>>>>",d);const y=g-a[2],v=u*1e3,_=Math.sqrt(v*v+y*y);console.log("水平距离>>>>",v),console.log("竖直距离>>>>",y),console.log("直线距离>>>>",_);const S=n.Cartesian3.fromDegrees(a[0],a[1],a[2]),M=n.Cartesian3.fromDegrees(T[0],T[1],g);var E=zs(j([a[0],a[1]]),j([T[0],T[1]])).geometry.coordinates;const H={position:n.Cartesian3.fromDegrees(E[0],E[1],g-y/2),name:"直线距离",label:{text:`直线距离${_.toFixed(1)}米`,fillColor:n.Color.fromCssColorString("#eff819"),font:"12px sans-serif",pixelOffset:new n.Cartesian2(0,0),scaleByDistance:new n.NearFarScalar(1e3,1.5,2e3,1),disableDepthTestDistance:Number.POSITIVE_INFINITY}},X=[];X.push(S),X.push(M);var O={polyline:{show:!0,positions:X,clampToGround:!1,width:2,material:n.Color.RED,shadows:n.ShadowMode.DISABLED}};i.add(H),i.add(O)};function as(a,o){const i=j(a.slice(0,2)),r=[];o.forEach(L=>{r.push(j([L[0],L[1]]))});const s=Xs(r),c=Vs(i,s),W=ss(i,c,is);return{nearestCoord:c.geometry.coordinates,nearestDistance:W}}function B(a,o,i,r,s){i||(i=new n.HeadingPitchRoll);const c=n.Transforms.headingPitchRollQuaternion(a,i,r,s),W=n.Matrix4.fromRotationTranslation(n.Matrix3.fromQuaternion(c,new n.Matrix3),a,new n.Matrix4);return n.Matrix4.multiplyByPoint(W,o,new n.Cartesian3)}function J(a,o){var i=a.cartesianToCartographic(o),r=n.Math.toDegrees(i.latitude),s=n.Math.toDegrees(i.longitude),c=i.height;return[s,r,c]}function Q(a,o,i,r){const s=o*Math.PI/180,c=a*Math.PI/180,W=r*Math.PI/180,L=i*Math.PI/180,p=Math.sin(L-c)*Math.cos(W),w=Math.cos(s)*Math.sin(W)-Math.sin(s)*Math.cos(W)*Math.cos(L-c);let t=Math.atan2(p,w)*180/Math.PI;return t=(t+360)%360,t}function f(a,o=6){const i=[];for(var r=0;r<a.length-1;r++)i.push(...xs(a[r],a[r+1],o*-1e3,100));return i}function xs(a,o,i,r){var s=[],c=n.Cartographic.fromCartesian(a),W=n.Cartographic.fromCartesian(o),L=c.longitude*180/Math.PI,p=c.latitude*180/Math.PI,w=W.longitude*180/Math.PI,t=W.latitude*180/Math.PI,l=Math.sqrt((L-w)*(L-w)+(p-t)*(p-t)),u=l*i,C=n.Cartesian3.clone(a),e=n.Cartesian3.clone(o),T=n.Cartesian3.distance(C,n.Cartesian3.ZERO),m=n.Cartesian3.distance(e,n.Cartesian3.ZERO);if(n.Cartesian3.normalize(C,C),n.Cartesian3.normalize(e,e),n.Cartesian3.distance(C,e)==0)return s;var b=n.Cartesian3.angleBetween(C,e);s.push(a);for(var d=1;d<r-1;d++){var P=d*1/(r-1),g=1-P,y=Math.sin(g*b)/Math.sin(b),v=Math.sin(P*b)/Math.sin(b),_=n.Cartesian3.multiplyByScalar(C,y,new n.Cartesian3),S=n.Cartesian3.multiplyByScalar(e,v,new n.Cartesian3),M=n.Cartesian3.add(_,S,new n.Cartesian3),E=P*Math.PI,Y=T*g+m*P+Math.sin(E)*u;M=n.Cartesian3.multiplyByScalar(M,Y,M),s.push(M)}return s.push(o),s}function si(a,o,i=30){const r=a.length;if(r<=2||o===0||o===r-1)return!1;const s=Q(a[o-1].Longitude,a[o-1].Latitude,a[o].Longitude,a[o].Latitude);let W=Q(a[o].Longitude,a[o].Latitude,a[o+1].Longitude,a[o+1].Latitude)-s;return W>180&&(W-=360),W<-180&&(W+=360),Math.abs(W)>=i}function As(a,o,i=2){const r=a.length;if(r<=1)return 0;if(si(a,o,15))return o<r-1?Q(a[o].Longitude,a[o].Latitude,a[o+1].Longitude,a[o+1].Latitude):Q(a[o-1].Longitude,a[o-1].Latitude,a[o].Longitude,a[o].Latitude);let s=Math.max(0,o-i),c=Math.min(r-1,o+i);if(c-s<1)return o===r-1?Q(a[o-1].Longitude,a[o-1].Latitude,a[o].Longitude,a[o].Latitude):Q(a[o].Longitude,a[o].Latitude,a[o+1].Longitude,a[o+1].Latitude);const W=[];for(let t=s;t<c;t++){const l=Q(a[t].Longitude,a[t].Latitude,a[t+1].Longitude,a[t+1].Latitude);W.push(l)}if(W.length===1)return W[0];let L=0,p=0;for(const t of W){const l=t*Math.PI/180;L+=Math.cos(l),p+=Math.sin(l)}return(Math.atan2(p,L)*180/Math.PI+360)%360}function ii(a,o){const i=a*Math.PI/180,r=o*Math.PI/180,s=Math.cos(i),c=Math.sin(i),W=Math.cos(r),L=Math.sin(r),p=s+W,w=c+L;if(Math.abs(p)<1e-10&&Math.abs(w)<1e-10)return(a+90)%360;let t=Math.atan2(w,p)*180/Math.PI;return t=(t+360)%360,t}class ti{constructor(){I(this,"LineID","myEntity1");I(this,"Tag","");I(this,"towers",[]);I(this,"ISPhaseSequence",!1);I(this,"Wairnum",0);I(this,"Type",0);I(this,"Trees",[]);I(this,"wireAColor","#FFFFFF");I(this,"wireBColor","#FFFFFF");I(this,"wireCColor","#FFFFFF");I(this,"wireTColor","#FFFFFF");I(this,"wireD1Color","#FFFFFF");I(this,"wireD2Color","#FFFFFF");I(this,"wireWidth",1);I(this,"LineDistanceDisplaymin",0);I(this,"LineDistanceDisplaymax",5e3)}}class ei{constructor(){I(this,"id","");I(this,"modelid","");I(this,"lon",0);I(this,"lat",0);I(this,"alt",0);I(this,"treeH",0);I(this,"modelurl","");I(this,"treeScale",1)}}class oi{constructor(){I(this,"id","");I(this,"name","");I(this,"type",0);I(this,"Longitude",0);I(this,"Latitude",0);I(this,"Altitude",0);I(this,"RollX",0);I(this,"RollY",90);I(this,"RollZ",0);I(this,"towerScale",1);I(this,"towerHeight",0);I(this,"towerModelUri","");I(this,"towerPoint",[]);I(this,"Insulators",[]);I(this,"DistanceDisplaymin",0);I(this,"DistanceDisplaymax",1e3)}}class ri{constructor(){I(this,"id","");I(this,"name","");I(this,"type",0);I(this,"WairFX","进");I(this,"linenum",1);I(this,"Wairnum",0);I(this,"PhaseSequence",0);I(this,"RollX",0);I(this,"RollY",0);I(this,"RollZ",0);I(this,"InsulatorScale",1);I(this,"InsulatorLength",0);I(this,"InsulatorModelUri","");I(this,"InsulatorPoint",[]);I(this,"DistanceDisplaymin",0);I(this,"DistanceDisplaymax",500)}}class hi{constructor(){I(this,"name","");I(this,"X",-45);I(this,"Y",90);I(this,"Z",0)}}var z=(a=>(a[a.A相=0]="A相",a[a.B相=1]="B相",a[a.C相=2]="C相",a[a.地线1=3]="地线1",a[a.地线2=4]="地线2",a))(z||{}),q=(a=>(a[a.直线塔=0]="直线塔",a[a.耐张塔=1]="耐张塔",a[a.门架塔=2]="门架塔",a[a.换位塔=3]="换位塔",a))(q||{}),Ms=(a=>(a[a.交流单回路=0]="交流单回路",a[a.交流双回路=1]="交流双回路",a[a.直流单回路=2]="直流单回路",a[a.直流双回路=3]="直流双回路",a[a.交流四回路=4]="交流四回路",a))(Ms||{}),rs=(a=>(a[a.地线=0]="地线",a[a.回路一=1]="回路一",a[a.回路二=2]="回路二",a[a.回路三=3]="回路三",a[a.回路四=4]="回路四",a))(rs||{}),D=(a=>(a[a.悬垂串=0]="悬垂串",a[a.耐张串=1]="耐张串",a[a.跳线串=2]="跳线串",a[a.硬跳串=3]="硬跳串",a[a.V串=4]="V串",a[a.地线串=5]="地线串",a[a.绕跳临时=6]="绕跳临时",a))(D||{}),A=(a=>(a[a.单分裂=0]="单分裂",a[a.双分裂=1]="双分裂",a[a.四分裂=2]="四分裂",a[a.六分裂=3]="六分裂",a[a.八分裂=4]="八分裂",a))(A||{});const hs=class hs{constructor(o,i,r){I(this,"viewer");I(this,"LineInfo");I(this,"Keym","");I(this,"dataSource2");I(this,"entityCollection2");I(this,"dataSourcetree");I(this,"entityCollectiontree");I(this,"dataSourceplotting");I(this,"entityCollectionplotting");I(this,"LinedataSource2");I(this,"LineentityCollection2");I(this,"offsetTowers",[]);I(this,"offsetTrees",[]);I(this,"autoCalculateRollX",!0);I(this,"towerWirePoints",new Map);I(this,"loadedWireSegments",new Set);I(this,"loadedTreeIndices",new Set);I(this,"isDynamicLoadingEnabled",!0);I(this,"loadedTowerIndices",new Set);I(this,"isTreeModelRemoved",!1);I(this,"isLineModelRemoved",!1);I(this,"cameraMoveHandler",null);I(this,"offsetWires11",[]);I(this,"offsetWires12",[]);I(this,"offsetWires13",[]);I(this,"offsetWires21",[]);I(this,"offsetWires22",[]);I(this,"offsetWires23",[]);I(this,"ToffsetArcWires1A",[]);I(this,"ToffsetArcWires2A",[]);I(this,"ToffsetWires1A1",[]);I(this,"ToffsetWires1A2",[]);I(this,"ToffsetArcWires1B",[]);I(this,"ToffsetArcWires2B",[]);I(this,"ToffsetWires1B1",[]);I(this,"ToffsetWires1B2",[]);I(this,"ToffsetArcWires1C",[]);I(this,"ToffsetArcWires2C",[]);I(this,"ToffsetWires1C1",[]);I(this,"ToffsetWires1C2",[]);I(this,"ToffsetArcWires1A2",[]);I(this,"ToffsetArcWires2A2",[]);I(this,"ToffsetWires2A1",[]);I(this,"ToffsetWires2A2",[]);I(this,"ToffsetArcWires1B2",[]);I(this,"ToffsetArcWires2B2",[]);I(this,"ToffsetWires2B1",[]);I(this,"ToffsetWires2B2",[]);I(this,"ToffsetArcWires1C2",[]);I(this,"ToffsetArcWires2C2",[]);I(this,"ToffsetWires2C1",[]);I(this,"ToffsetWires2C2",[]);I(this,"offsetArcWires1A",[]);I(this,"offsetArcWires1B",[]);I(this,"offsetArcWires1C",[]);I(this,"offsetArcWires2A",[]);I(this,"offsetArcWires2B",[]);I(this,"offsetArcWires2C",[]);I(this,"offsetGrouundWires1",[]);I(this,"offsetGrouundWires2",[]);I(this,"offsetGrouundWires11",[]);I(this,"offsetGrouundWires12",[]);I(this,"arcLine1A1",[]);I(this,"arcLine1B1",[]);I(this,"arcLine1D1",[]);I(this,"modelCache",new Map);I(this,"treeHandler",null);this.Keym=r,this.viewer=o,this.LineInfo=i,this.dataSource2=new n.CustomDataSource(this.LineInfo.LineID),this.entityCollection2=this.dataSource2.entities,this.dataSourcetree=new n.CustomDataSource(this.LineInfo.LineID+"tree"),this.entityCollectiontree=this.dataSourcetree.entities,this.dataSourceplotting=new n.CustomDataSource("plotting"),this.entityCollectionplotting=this.dataSourceplotting.entities,this.LinedataSource2=new n.CustomDataSource(this.LineInfo.LineID+"daoxian"),this.LineentityCollection2=this.LinedataSource2.entities}createModelCacheKey(o,i,r,s){return`${o}_${i}_${r}_${s}`}getCachedModelConfig(o,i,r,s){const c=Math.max(0,r),W=Math.min(s,5e4),L=this.createModelCacheKey(o,i,c,W);if(!this.modelCache.has(L)){const p={uri:o,scale:i,distanceDisplayCondition:[c,W]};this.modelCache.set(L,p)}return this.modelCache.get(L)}addModelToCollection(o,i,r,s,c,W,L){const p=this.getCachedModelConfig(s,W,L[0],L[1]);this.entityCollection2.add(Ws(o,i,r,p.uri,c,p.scale,p.distanceDisplayCondition))}setAutoCalculateRollX(o){this.autoCalculateRollX=o}getAutoCalculateRollX(){return this.autoCalculateRollX}setDynamicLoadingEnabled(o){this.isDynamicLoadingEnabled=o}getDynamicLoadingEnabled(){return this.isDynamicLoadingEnabled}setupCameraMoveListener(){this.cameraMoveHandler&&this.cameraMoveHandler(),this.cameraMoveHandler=this.viewer.camera.moveEnd.addEventListener(()=>{this.updateVisibleTowers()})}setupTreeCameraMoveListener(){this.cameraMoveHandler||this.setupCameraMoveListener()}getVisibleTowerIndices(){var p;if(!this.viewer.camera||this.offsetTowers.length===0)return{start:0,end:0};const o=this.viewer.camera.position,i=((p=this.viewer.camera.positionCartographic)==null?void 0:p.height)||1e3;let r=5;i>5e4?r=2:i>1e4?r=3:i>5e3?r=5:r=10;let s=0,c=Number.MAX_VALUE;for(let w=0;w<this.offsetTowers.length;w++){const t=n.Cartesian3.distance(o,this.offsetTowers[w]);t<c&&(c=t,s=w)}const W=Math.max(0,s-r),L=Math.min(this.offsetTowers.length-1,s+r);return{start:W,end:L}}updateVisibleTowers(){const{start:o,end:i}=this.getVisibleTowerIndices();this.isLineModelRemoved||this.loadTowersInRange(o,i),this.isTreeModelRemoved||this.updateVisibleTrees()}getVisibleTreeIndices(){var c;if(!this.viewer.camera||this.offsetTrees.length===0)return[];const o=this.viewer.camera.position,i=((c=this.viewer.camera.positionCartographic)==null?void 0:c.height)||1e3;let r=Math.max(5e3,i*2);i>5e4&&(r=1e5);const s=[];for(let W=0;W<this.offsetTrees.length;W++){const L=this.offsetTrees[W];n.Cartesian3.distance(o,L)<=r&&s.push(W)}if(s.length===0&&this.offsetTrees.length>0){const W=Math.min(20,this.offsetTrees.length);for(let L=0;L<W;L++)s.push(L)}return s}updateVisibleTrees(){if(this.isTreeModelRemoved)return;const o=this.getVisibleTreeIndices(),i=[];this.loadedTreeIndices.forEach(r=>{o.includes(r)||i.push(r)}),i.forEach(r=>{const s="tree-"+this.LineInfo.Trees[r].id;this.entityCollectiontree.removeById(s),this.loadedTreeIndices.delete(r)}),o.forEach(r=>{if(!this.loadedTreeIndices.has(r))if(r>=0&&r<this.offsetTrees.length&&r<this.LineInfo.Trees.length){const s=this.offsetTrees[r],c=this.LineInfo.Trees[r];s&&c?(this.loadTreeAtIndex(r,s),this.loadedTreeIndices.add(r)):console.warn(`跳过无效的动态加载树木数据,索引: ${r}`)}else console.warn(`动态加载树木索引超出范围: ${r}`)})}initializeLineData(){this.Keym=="OW_JPS_EEngin_001"&&(this.LineInfo.towers.forEach(o=>{this.offsetTowers.push(n.Cartesian3.fromDegrees(o.Longitude,o.Latitude,o.Altitude))}),this.autoCalculateRollX&&this.calculateTowerOrientations())}calculateTowerOrientations(){const o=this.LineInfo.towers.length;if(o!==0){if(o===1){this.LineInfo.towers[0].RollX===void 0&&(this.LineInfo.towers[0].RollX=90);return}for(let i=0;i<o;i++){let r=0;if(this.LineInfo.towers[i].type===q.耐张塔)if(i===0)r=(As(this.LineInfo.towers,i,3)-90+360)%360;else if(i===o-1)r=(As(this.LineInfo.towers,i,3)-90+360)%360;else{const s=this.LineInfo.towers[i-1],c=this.LineInfo.towers[i],W=this.LineInfo.towers[i+1],L=Q(s.Longitude,s.Latitude,c.Longitude,c.Latitude),p=Q(c.Longitude,c.Latitude,W.Longitude,W.Latitude);r=(ii(L,p)-90+360)%360}else r=(As(this.LineInfo.towers,i,2)-90+360)%360;this.LineInfo.towers[i].RollX=r}}}loadTowersInRange(o,i){if(o<0||i>=this.LineInfo.towers.length)return;const r=Math.max(0,o-1),s=Math.min(this.LineInfo.towers.length-1,i+1);for(let c=r;c<=s;c++)this.loadedTowerIndices.has(c)||(this.loadTowerAndCollectWirePoints(c),this.loadedTowerIndices.add(c));for(let c=r;c<s;c++){const W=`${c}-${c+1}`;this.loadedWireSegments.has(W)||(this.loadWireSegmentBetweenTowers(c,c+1),this.loadedWireSegments.add(W))}}loadTowerAndCollectWirePoints(o){const i=this.offsetTowers[o],r=new n.HeadingPitchRoll(n.Math.toRadians(this.LineInfo.towers[o].RollX),n.Math.toRadians(this.LineInfo.towers[o].RollY),n.Math.toRadians(this.LineInfo.towers[o].RollZ));this.addModelToCollection(this.LineInfo.towers[o].id,i,this.LineInfo.towers[o].name,this.LineInfo.towers[o].towerModelUri,r,this.LineInfo.towers[o].towerScale,[this.LineInfo.towers[o].DistanceDisplaymin,this.LineInfo.towers[o].DistanceDisplaymax]);const s=new n.HeadingPitchRoll(n.Math.toRadians(this.LineInfo.towers[o].RollX),0,0),c=new n.HeadingPitchRoll(n.Math.toRadians(this.LineInfo.towers[o].RollX),0,0);let W=0;const L=[];this.LineInfo.towers[o].Insulators.forEach(p=>{const w=B(i,new n.Cartesian3(this.LineInfo.towers[o].towerPoint[W].X,this.LineInfo.towers[o].towerPoint[W].Y,this.LineInfo.towers[o].towerPoint[W].Z),this.LineInfo.towers[o].type===q.耐张塔?c:s);let t,l;if(this.autoCalculateRollX?l=this.LineInfo.towers[o].RollX:l=p.RollX,this.LineInfo.towers[o].type===q.耐张塔)switch(p.type){case D.耐张串:t=p.WairFX==="进"?new n.HeadingPitchRoll(n.Math.toRadians(l),n.Math.toRadians(-180),n.Math.toRadians(180)):new n.HeadingPitchRoll(n.Math.toRadians(l),n.Math.toRadians(0),n.Math.toRadians(0));break;case D.跳线串:t=new n.HeadingPitchRoll(n.Math.toRadians(l),n.Math.toRadians(p.RollY),n.Math.toRadians(p.RollZ));break;case D.地线串:t=new n.HeadingPitchRoll(n.Math.toRadians(l),n.Math.toRadians(p.RollY),n.Math.toRadians(p.RollZ));break;default:t=new n.HeadingPitchRoll(n.Math.toRadians(l),n.Math.toRadians(p.RollY),n.Math.toRadians(p.RollZ))}else t=new n.HeadingPitchRoll(n.Math.toRadians(l),n.Math.toRadians(p.RollY),n.Math.toRadians(p.RollZ));this.addModelToCollection(p.id,w,p.name,p.InsulatorModelUri,t,p.InsulatorScale,[p.DistanceDisplaymin,p.DistanceDisplaymax]);const u={insulator:p,insulatorIndex:W,position:i,lineroll:s,WairPoint:[]};p.InsulatorPoint.forEach(C=>{C.Y=C.Y+this.LineInfo.towers[o].towerPoint[W].Y,C.Z=C.Z+this.LineInfo.towers[o].towerPoint[W].Z,u.WairPoint.push(B(i,new n.Cartesian3(C.X,C.Y,C.Z),s))}),L.push(u),W++}),this.towerWirePoints.set(o,L)}loadWireSegmentBetweenTowers(o,i){const r=this.towerWirePoints.get(o),s=this.towerWirePoints.get(i);!r||!s||this.resetWireArraysForTwoTowers()}resetWireArraysForTwoTowers(){this.offsetWires11=[],this.offsetWires12=[],this.offsetWires13=[],this.offsetWires21=[],this.offsetWires22=[],this.offsetWires23=[],this.ToffsetWires1A1=[],this.ToffsetWires1A2=[]}loadLineTower(){this.Keym=="OW_JPS_EEngin_001"&&(this.initializeLineData(),this.isDynamicLoadingEnabled?(this.loadAllWiresOnly(),this.setupCameraMoveListener(),this.updateVisibleTowers()):this.loadAllTowersAtOnce())}loadAllWiresOnly(){const o=new n.EntityCollection,i=this.entityCollection2;this.entityCollection2=o,this.loadAllTowersAtOnce();const r=[];o.values.forEach(s=>{var c;s.name&&(s.name.includes("导线")||s.name.includes("daoxian")||(c=s.id)!=null&&c.toString().includes("daoxian"))&&r.push(s)}),this.entityCollection2=i,r.forEach(s=>{this.entityCollection2.add(s)}),o.removeAll()}loadAllTowersAtOnce(){let o=0,i=0;this.offsetTowers.forEach((r,s)=>{const c=new n.HeadingPitchRoll(n.Math.toRadians(this.LineInfo.towers[s].RollX),n.Math.toRadians(this.LineInfo.towers[s].RollY),n.Math.toRadians(this.LineInfo.towers[s].RollZ));this.addModelToCollection(this.LineInfo.towers[s].id,r,this.LineInfo.towers[s].name,this.LineInfo.towers[s].towerModelUri,c,this.LineInfo.towers[s].towerScale,[this.LineInfo.towers[s].DistanceDisplaymin,this.LineInfo.towers[s].DistanceDisplaymax]);const W=new n.HeadingPitchRoll(n.Math.toRadians(this.LineInfo.towers[s].RollX),0,0),L=new n.HeadingPitchRoll(n.Math.toRadians(this.LineInfo.towers[s].RollX),0,0);let p=0;if(this.LineInfo.towers[s].Insulators.forEach(t=>{const l=B(r,new n.Cartesian3(this.LineInfo.towers[s].towerPoint[p].X,this.LineInfo.towers[s].towerPoint[p].Y,this.LineInfo.towers[s].towerPoint[p].Z),this.LineInfo.towers[s].type===q.耐张塔?L:W);let u,C;if(this.autoCalculateRollX?C=this.LineInfo.towers[s].RollX:C=t.RollX,this.LineInfo.towers[s].type===q.耐张塔)switch(t.type){case D.耐张串:u=t.WairFX==="进"?new n.HeadingPitchRoll(n.Math.toRadians(C),n.Math.toRadians(-180),n.Math.toRadians(180)):new n.HeadingPitchRoll(n.Math.toRadians(C),n.Math.toRadians(0),n.Math.toRadians(0));break;case D.跳线串:u=new n.HeadingPitchRoll(n.Math.toRadians(C),n.Math.toRadians(t.RollY),n.Math.toRadians(t.RollZ));break;case D.地线串:u=new n.HeadingPitchRoll(n.Math.toRadians(C),n.Math.toRadians(t.RollY),n.Math.toRadians(t.RollZ));break;default:u=new n.HeadingPitchRoll(n.Math.toRadians(C),n.Math.toRadians(t.RollY),n.Math.toRadians(t.RollZ))}else u=new n.HeadingPitchRoll(n.Math.toRadians(C),n.Math.toRadians(t.RollY),n.Math.toRadians(t.RollZ));this.addModelToCollection(t.id,l,t.name,t.InsulatorModelUri,u,t.InsulatorScale,[t.DistanceDisplaymin,t.DistanceDisplaymax]);const e=[];switch(t.InsulatorPoint.forEach(T=>{T.Y=T.Y+this.LineInfo.towers[s].towerPoint[p].Y,T.Z=T.Z+this.LineInfo.towers[s].towerPoint[p].Z,e.push(B(r,new n.Cartesian3(T.X,T.Y,T.Z),W))}),t.linenum){case rs.回路一:if(this.LineInfo.ISPhaseSequence)if(this.LineInfo.towers[s].type==q.耐张塔)switch(t.PhaseSequence){case z.A相:if(t.type==D.耐张串)if(t.WairFX=="进")switch(this.LineInfo.Wairnum){case A.单分裂:this.offsetWires11.push(e[0]),this.ToffsetWires1A1.push(e[0]);break;case A.双分裂:this.offsetWires11.push(e[0]),this.offsetWires11.push(e[1]),this.ToffsetWires1A1.push(e[2]),this.ToffsetWires1A1.push(e[3]);break;case A.四分裂:this.offsetWires11.push(e[0]),this.offsetWires11.push(e[1]),this.offsetWires11.push(e[2]),this.offsetWires11.push(e[3]),this.ToffsetWires1A1.push(e[4]),this.ToffsetWires1A1.push(e[5]),this.ToffsetWires1A1.push(e[6]),this.ToffsetWires1A1.push(e[7]);break;case A.六分裂:this.offsetWires11.push(e[0]),this.offsetWires11.push(e[1]),this.offsetWires11.push(e[2]),this.offsetWires11.push(e[3]),this.offsetWires11.push(e[4]),this.offsetWires11.push(e[5]),this.ToffsetWires1A1.push(e[6]),this.ToffsetWires1A1.push(e[7]),this.ToffsetWires1A1.push(e[8]),this.ToffsetWires1A1.push(e[9]),this.ToffsetWires1A1.push(e[10]),this.ToffsetWires1A1.push(e[11]);break;case A.八分裂:this.offsetWires11.push(e[0]),this.offsetWires11.push(e[1]),this.offsetWires11.push(e[2]),this.offsetWires11.push(e[3]),this.offsetWires11.push(e[4]),this.offsetWires11.push(e[5]),this.offsetWires11.push(e[6]),this.offsetWires11.push(e[7]),this.ToffsetWires1A1.push(e[8]),this.ToffsetWires1A1.push(e[9]),this.ToffsetWires1A1.push(e[10]),this.ToffsetWires1A1.push(e[11]),this.ToffsetWires1A1.push(e[12]),this.ToffsetWires1A1.push(e[13]),this.ToffsetWires1A1.push(e[14]),this.ToffsetWires1A1.push(e[15]);break}else switch(this.LineInfo.Wairnum){case A.单分裂:const T=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires11.push(T),this.ToffsetWires1A2.push(T);break;case A.双分裂:const m=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),b=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W);this.offsetWires11.push(m),this.offsetWires11.push(b),this.ToffsetWires1A2.push(m),this.ToffsetWires1A2.push(b);break;case A.四分裂:const d=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),P=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),g=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),y=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W);this.offsetWires11.push(d),this.offsetWires11.push(P),this.offsetWires11.push(g),this.offsetWires11.push(y),this.ToffsetWires1A2.push(d),this.ToffsetWires1A2.push(P),this.ToffsetWires1A2.push(g),this.ToffsetWires1A2.push(y);break;case A.六分裂:const v=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),_=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),S=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),M=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),E=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),Y=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W);this.offsetWires11.push(v),this.offsetWires11.push(_),this.offsetWires11.push(S),this.offsetWires11.push(M),this.offsetWires11.push(E),this.offsetWires11.push(Y),this.ToffsetWires1A2.push(v),this.ToffsetWires1A2.push(_),this.ToffsetWires1A2.push(S),this.ToffsetWires1A2.push(M),this.ToffsetWires1A2.push(E),this.ToffsetWires1A2.push(Y);break;case A.八分裂:const H=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),X=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),O=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),Z=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),F=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),N=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W),G=B(r,new n.Cartesian3(t.InsulatorPoint[6].X*-1,t.InsulatorPoint[6].Y,t.InsulatorPoint[6].Z),W),$=B(r,new n.Cartesian3(t.InsulatorPoint[7].X*-1,t.InsulatorPoint[7].Y,t.InsulatorPoint[7].Z),W);this.offsetWires11.push(H),this.offsetWires11.push(X),this.offsetWires11.push(O),this.offsetWires11.push(Z),this.offsetWires11.push(F),this.offsetWires11.push(N),this.offsetWires11.push(G),this.offsetWires11.push($),this.ToffsetWires1A2.push(H),this.ToffsetWires1A2.push(X),this.ToffsetWires1A2.push(O),this.ToffsetWires1A2.push(Z),this.ToffsetWires1A2.push(F),this.ToffsetWires1A2.push(N),this.ToffsetWires1A2.push(G),this.ToffsetWires1A2.push($);break}else if(t.type==D.跳线串)switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires1A1.push(e[0]),this.ToffsetWires1A2.push(e[1]);break;case A.双分裂:this.ToffsetWires1A1.push(e[0]),this.ToffsetWires1A1.push(e[1]),this.ToffsetWires1A2.push(e[2]),this.ToffsetWires1A2.push(e[3]);break;case A.四分裂:this.ToffsetWires1A1.push(e[0]),this.ToffsetWires1A1.push(e[1]),this.ToffsetWires1A1.push(e[2]),this.ToffsetWires1A1.push(e[3]),this.ToffsetWires1A2.push(e[4]),this.ToffsetWires1A2.push(e[5]),this.ToffsetWires1A2.push(e[6]),this.ToffsetWires1A2.push(e[7]);break;case A.六分裂:this.ToffsetWires1A1.push(e[0]),this.ToffsetWires1A1.push(e[1]),this.ToffsetWires1A1.push(e[2]),this.ToffsetWires1A1.push(e[3]),this.ToffsetWires1A1.push(e[4]),this.ToffsetWires1A1.push(e[5]),this.ToffsetWires1A2.push(e[6]),this.ToffsetWires1A2.push(e[7]),this.ToffsetWires1A2.push(e[8]),this.ToffsetWires1A2.push(e[9]),this.ToffsetWires1A2.push(e[10]),this.ToffsetWires1A2.push(e[11]);break;case A.八分裂:this.ToffsetWires1A1.push(e[0]),this.ToffsetWires1A1.push(e[1]),this.ToffsetWires1A1.push(e[2]),this.ToffsetWires1A1.push(e[3]),this.ToffsetWires1A1.push(e[4]),this.ToffsetWires1A1.push(e[5]),this.ToffsetWires1A1.push(e[6]),this.ToffsetWires1A1.push(e[7]),this.ToffsetWires1A2.push(e[8]),this.ToffsetWires1A2.push(e[9]),this.ToffsetWires1A2.push(e[10]),this.ToffsetWires1A2.push(e[11]),this.ToffsetWires1A2.push(e[12]),this.ToffsetWires1A2.push(e[13]),this.ToffsetWires1A2.push(e[14]),this.ToffsetWires1A2.push(e[15]);break}break;case z.B相:if(t.type==D.耐张串)if(t.WairFX=="进")switch(this.LineInfo.Wairnum){case A.单分裂:this.offsetWires12.push(e[0]),this.ToffsetWires1B1.push(e[1]);break;case A.双分裂:this.offsetWires12.push(e[0]),this.offsetWires12.push(e[1]),this.ToffsetWires1B1.push(e[2]),this.ToffsetWires1B1.push(e[3]);break;case A.四分裂:this.offsetWires12.push(e[0]),this.offsetWires12.push(e[1]),this.offsetWires12.push(e[2]),this.offsetWires12.push(e[3]),this.ToffsetWires1B1.push(e[4]),this.ToffsetWires1B1.push(e[5]),this.ToffsetWires1B1.push(e[6]),this.ToffsetWires1B1.push(e[7]);break;case A.六分裂:this.offsetWires12.push(e[0]),this.offsetWires12.push(e[1]),this.offsetWires12.push(e[2]),this.offsetWires12.push(e[3]),this.offsetWires12.push(e[4]),this.offsetWires12.push(e[5]),this.ToffsetWires1B1.push(e[6]),this.ToffsetWires1B1.push(e[7]),this.ToffsetWires1B1.push(e[8]),this.ToffsetWires1B1.push(e[9]),this.ToffsetWires1B1.push(e[10]),this.ToffsetWires1B1.push(e[11]);break;case A.八分裂:this.offsetWires12.push(e[0]),this.offsetWires12.push(e[1]),this.offsetWires12.push(e[2]),this.offsetWires12.push(e[3]),this.offsetWires12.push(e[4]),this.offsetWires12.push(e[5]),this.offsetWires12.push(e[6]),this.offsetWires12.push(e[7]),this.ToffsetWires1B1.push(e[8]),this.ToffsetWires1B1.push(e[9]),this.ToffsetWires1B1.push(e[10]),this.ToffsetWires1B1.push(e[11]),this.ToffsetWires1B1.push(e[12]),this.ToffsetWires1B1.push(e[13]),this.ToffsetWires1B1.push(e[14]),this.ToffsetWires1B1.push(e[15]);break}else switch(this.LineInfo.Wairnum){case A.单分裂:const T=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires12.push(T),this.ToffsetWires1B2.push(T);break;case A.双分裂:const m=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),b=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W);this.offsetWires12.push(m),this.offsetWires12.push(b),this.ToffsetWires1B2.push(m),this.ToffsetWires1B2.push(b);break;case A.四分裂:const d=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),P=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),g=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),y=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W);this.offsetWires12.push(d),this.offsetWires12.push(P),this.offsetWires12.push(g),this.offsetWires12.push(y),this.ToffsetWires1B2.push(d),this.ToffsetWires1B2.push(P),this.ToffsetWires1B2.push(g),this.ToffsetWires1B2.push(y);break;case A.六分裂:const v=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),_=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),S=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),M=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),E=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),Y=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W);this.offsetWires12.push(v),this.offsetWires12.push(_),this.offsetWires12.push(S),this.offsetWires12.push(M),this.offsetWires12.push(E),this.offsetWires12.push(Y),this.ToffsetWires1B2.push(v),this.ToffsetWires1B2.push(_),this.ToffsetWires1B2.push(S),this.ToffsetWires1B2.push(M),this.ToffsetWires1B2.push(E),this.ToffsetWires1B2.push(Y);break;case A.八分裂:const H=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),X=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),O=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),Z=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),F=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),N=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W),G=B(r,new n.Cartesian3(t.InsulatorPoint[6].X*-1,t.InsulatorPoint[6].Y,t.InsulatorPoint[6].Z),W),$=B(r,new n.Cartesian3(t.InsulatorPoint[7].X*-1,t.InsulatorPoint[7].Y,t.InsulatorPoint[7].Z),W);this.offsetWires12.push(H),this.offsetWires12.push(X),this.offsetWires12.push(O),this.offsetWires12.push(Z),this.offsetWires12.push(F),this.offsetWires12.push(N),this.offsetWires12.push(G),this.offsetWires12.push($),this.ToffsetWires1B2.push(H),this.ToffsetWires1B2.push(X),this.ToffsetWires1B2.push(O),this.ToffsetWires1B2.push(Z),this.ToffsetWires1B2.push(F),this.ToffsetWires1B2.push(N),this.ToffsetWires1B2.push(G),this.ToffsetWires1B2.push($);break}else if(t.type==D.跳线串)switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires1B1.push(e[0]),this.ToffsetWires1B2.push(e[0]);break;case A.双分裂:this.ToffsetWires1B1.push(e[0]),this.ToffsetWires1B1.push(e[1]),this.ToffsetWires1B2.push(e[2]),this.ToffsetWires1B2.push(e[3]);break;case A.四分裂:this.ToffsetWires1B1.push(e[0]),this.ToffsetWires1B1.push(e[1]),this.ToffsetWires1B1.push(e[2]),this.ToffsetWires1B1.push(e[3]),this.ToffsetWires1B2.push(e[4]),this.ToffsetWires1B2.push(e[5]),this.ToffsetWires1B2.push(e[6]),this.ToffsetWires1B2.push(e[7]);break;case A.六分裂:this.ToffsetWires1B1.push(e[0]),this.ToffsetWires1B1.push(e[1]),this.ToffsetWires1B1.push(e[2]),this.ToffsetWires1B1.push(e[3]),this.ToffsetWires1B1.push(e[4]),this.ToffsetWires1B1.push(e[5]),this.ToffsetWires1B2.push(e[6]),this.ToffsetWires1B2.push(e[7]),this.ToffsetWires1B2.push(e[8]),this.ToffsetWires1B2.push(e[9]),this.ToffsetWires1B2.push(e[10]),this.ToffsetWires1B2.push(e[11]);break;case A.八分裂:this.ToffsetWires1B1.push(e[0]),this.ToffsetWires1B1.push(e[1]),this.ToffsetWires1B1.push(e[2]),this.ToffsetWires1B1.push(e[3]),this.ToffsetWires1B1.push(e[4]),this.ToffsetWires1B1.push(e[5]),this.ToffsetWires1B1.push(e[6]),this.ToffsetWires1B1.push(e[7]),this.ToffsetWires1B2.push(e[8]),this.ToffsetWires1B2.push(e[9]),this.ToffsetWires1B2.push(e[10]),this.ToffsetWires1B2.push(e[11]),this.ToffsetWires1B2.push(e[12]),this.ToffsetWires1B2.push(e[13]),this.ToffsetWires1B2.push(e[14]),this.ToffsetWires1B2.push(e[15]);break}break;case z.C相:if(t.type==D.耐张串)if(t.WairFX=="进")switch(this.LineInfo.Wairnum){case A.单分裂:this.offsetWires13.push(e[0]),this.ToffsetWires1C1.push(e[1]);break;case A.双分裂:this.offsetWires13.push(e[0]),this.offsetWires13.push(e[1]),this.ToffsetWires1C1.push(e[2]),this.ToffsetWires1C1.push(e[3]);break;case A.四分裂:this.offsetWires13.push(e[0]),this.offsetWires13.push(e[1]),this.offsetWires13.push(e[2]),this.offsetWires13.push(e[3]),this.ToffsetWires1C1.push(e[4]),this.ToffsetWires1C1.push(e[5]),this.ToffsetWires1C1.push(e[6]),this.ToffsetWires1C1.push(e[7]);break;case A.六分裂:this.offsetWires13.push(e[0]),this.offsetWires13.push(e[1]),this.offsetWires13.push(e[2]),this.offsetWires13.push(e[3]),this.offsetWires13.push(e[4]),this.offsetWires13.push(e[5]),this.ToffsetWires1C1.push(e[6]),this.ToffsetWires1C1.push(e[7]),this.ToffsetWires1C1.push(e[8]),this.ToffsetWires1C1.push(e[9]),this.ToffsetWires1C1.push(e[10]),this.ToffsetWires1C1.push(e[11]);break;case A.八分裂:this.offsetWires13.push(e[0]),this.offsetWires13.push(e[1]),this.offsetWires13.push(e[2]),this.offsetWires13.push(e[3]),this.offsetWires13.push(e[4]),this.offsetWires13.push(e[5]),this.offsetWires13.push(e[6]),this.offsetWires13.push(e[7]),this.ToffsetWires1C1.push(e[8]),this.ToffsetWires1C1.push(e[9]),this.ToffsetWires1C1.push(e[10]),this.ToffsetWires1C1.push(e[11]),this.ToffsetWires1C1.push(e[12]),this.ToffsetWires1C1.push(e[13]),this.ToffsetWires1C1.push(e[14]),this.ToffsetWires1C1.push(e[15]);break}else switch(this.LineInfo.Wairnum){case A.单分裂:const T=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires13.push(T),this.ToffsetWires1C2.push(T);break;case A.双分裂:const m=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),b=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W);this.offsetWires13.push(m),this.offsetWires13.push(b),this.ToffsetWires1C2.push(m),this.ToffsetWires1C2.push(b);break;case A.四分裂:const d=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),P=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),g=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),y=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W);this.offsetWires13.push(d),this.offsetWires13.push(P),this.offsetWires13.push(g),this.offsetWires13.push(y),this.ToffsetWires1C2.push(d),this.ToffsetWires1C2.push(P),this.ToffsetWires1C2.push(g),this.ToffsetWires1C2.push(y);break;case A.六分裂:const v=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),_=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),S=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),M=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),E=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),Y=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W);this.offsetWires13.push(v),this.offsetWires13.push(_),this.offsetWires13.push(S),this.offsetWires13.push(M),this.offsetWires13.push(E),this.offsetWires13.push(Y),this.ToffsetWires1C2.push(v),this.ToffsetWires1C2.push(_),this.ToffsetWires1C2.push(S),this.ToffsetWires1C2.push(M),this.ToffsetWires1C2.push(E),this.ToffsetWires1C2.push(Y);break;case A.八分裂:const H=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),X=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),O=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),Z=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),F=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),N=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W),G=B(r,new n.Cartesian3(t.InsulatorPoint[6].X*-1,t.InsulatorPoint[6].Y,t.InsulatorPoint[6].Z),W),$=B(r,new n.Cartesian3(t.InsulatorPoint[7].X*-1,t.InsulatorPoint[7].Y,t.InsulatorPoint[7].Z),W);this.offsetWires13.push(H),this.offsetWires13.push(X),this.offsetWires13.push(O),this.offsetWires13.push(Z),this.offsetWires13.push(F),this.offsetWires13.push(N),this.offsetWires13.push(G),this.offsetWires13.push($),this.ToffsetWires1C2.push(H),this.ToffsetWires1C2.push(X),this.ToffsetWires1C2.push(O),this.ToffsetWires1C2.push(Z),this.ToffsetWires1C2.push(F),this.ToffsetWires1C2.push(N),this.ToffsetWires1C2.push(G),this.ToffsetWires1C2.push($);break}else if(t.type==D.跳线串)switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires1C1.push(e[0]),this.ToffsetWires1C2.push(e[0]);break;case A.双分裂:this.ToffsetWires1C1.push(e[0]),this.ToffsetWires1C1.push(e[1]),this.ToffsetWires1C2.push(e[2]),this.ToffsetWires1C2.push(e[3]);break;case A.四分裂:this.ToffsetWires1C1.push(e[0]),this.ToffsetWires1C1.push(e[1]),this.ToffsetWires1C1.push(e[2]),this.ToffsetWires1C1.push(e[3]),this.ToffsetWires1C2.push(e[4]),this.ToffsetWires1C2.push(e[5]),this.ToffsetWires1C2.push(e[6]),this.ToffsetWires1C2.push(e[7]);break;case A.六分裂:this.ToffsetWires1C1.push(e[0]),this.ToffsetWires1C1.push(e[1]),this.ToffsetWires1C1.push(e[2]),this.ToffsetWires1C1.push(e[3]),this.ToffsetWires1C1.push(e[4]),this.ToffsetWires1C1.push(e[5]),this.ToffsetWires1C2.push(e[6]),this.ToffsetWires1C2.push(e[7]),this.ToffsetWires1C2.push(e[8]),this.ToffsetWires1C2.push(e[9]),this.ToffsetWires1C2.push(e[10]),this.ToffsetWires1C2.push(e[11]);break;case A.八分裂:this.ToffsetWires1C1.push(e[0]),this.ToffsetWires1C1.push(e[1]),this.ToffsetWires1C1.push(e[2]),this.ToffsetWires1C1.push(e[3]),this.ToffsetWires1C1.push(e[4]),this.ToffsetWires1C1.push(e[5]),this.ToffsetWires1C1.push(e[6]),this.ToffsetWires1C1.push(e[7]),this.ToffsetWires1C2.push(e[8]),this.ToffsetWires1C2.push(e[9]),this.ToffsetWires1C2.push(e[10]),this.ToffsetWires1C2.push(e[11]),this.ToffsetWires1C2.push(e[12]),this.ToffsetWires1C2.push(e[13]),this.ToffsetWires1C2.push(e[14]),this.ToffsetWires1C2.push(e[15]);break}break}else switch(t.PhaseSequence){case z.A相:e.forEach(T=>{this.offsetWires11.push(T)});break;case z.B相:e.forEach(T=>{this.offsetWires12.push(T)});break;case z.C相:e.forEach(T=>{this.offsetWires13.push(T)});break}else if(this.LineInfo.towers[s].type==q.耐张塔)switch(p){case 2:switch(this.LineInfo.Wairnum){case A.单分裂:this.offsetWires11.push(e[0]),this.ToffsetWires1A1.push(e[0]);break;case A.双分裂:this.offsetWires11.push(e[0]),this.offsetWires11.push(e[1]),this.ToffsetWires1A1.push(e[2]),this.ToffsetWires1A1.push(e[3]);break}break;case 3:switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires1A1.push(e[0]),this.ToffsetWires1A2.push(e[0]);break;case A.双分裂:this.ToffsetWires1A1.push(e[0]),this.ToffsetWires1A1.push(e[1]),this.ToffsetWires1A2.push(e[2]),this.ToffsetWires1A2.push(e[3]);break}break;case 4:switch(this.LineInfo.Wairnum){case A.单分裂:const T=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires11.push(T),this.ToffsetWires1A2.push(T);break;case A.双分裂:const m=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),b=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W);this.offsetWires11.push(m),this.offsetWires11.push(b),this.ToffsetWires1A2.push(m),this.ToffsetWires1A2.push(b);break}break;case 5:e.forEach(T=>{this.offsetWires12.push(T),this.ToffsetWires1B1.push(T)});break;case 6:e.forEach(T=>{this.ToffsetWires1B1.push(T),this.ToffsetWires1B2.push(T)});break;case 7:t.InsulatorPoint.forEach(T=>{const m=B(r,new n.Cartesian3(T.X*-1,T.Y,T.Z),W);this.offsetWires12.push(m),this.ToffsetWires1B2.push(m)});break;case 8:e.forEach(T=>{this.offsetWires13.push(T),this.ToffsetWires1C1.push(T)});break;case 9:e.forEach(T=>{this.ToffsetWires1C1.push(T),this.ToffsetWires1C2.push(T)});break;case 10:t.InsulatorPoint.forEach(T=>{const m=B(r,new n.Cartesian3(T.X*-1,T.Y,T.Z),W);this.offsetWires13.push(m),this.ToffsetWires1C2.push(m)});break}else switch(p){case 2:e.forEach(T=>{this.offsetWires11.push(T)});break;case 3:e.forEach(T=>{this.offsetWires12.push(T)});break;case 4:e.forEach(T=>{this.offsetWires13.push(T)});break}break;case rs.回路二:if(this.LineInfo.ISPhaseSequence)if(this.LineInfo.towers[s].type==q.耐张塔)switch(t.PhaseSequence){case z.A相:if(t.type==D.耐张串)if(t.WairFX=="进")switch(this.LineInfo.Wairnum){case A.单分裂:this.offsetWires21.push(e[0]),this.ToffsetWires2A1.push(e[0]);break;case A.双分裂:this.offsetWires21.push(e[0]),this.offsetWires21.push(e[1]),this.ToffsetWires2A1.push(e[2]),this.ToffsetWires2A1.push(e[3]);break;case A.四分裂:this.offsetWires21.push(e[0]),this.offsetWires21.push(e[1]),this.offsetWires21.push(e[2]),this.offsetWires21.push(e[3]),this.ToffsetWires2A1.push(e[4]),this.ToffsetWires2A1.push(e[5]),this.ToffsetWires2A1.push(e[6]),this.ToffsetWires2A1.push(e[7]);break;case A.六分裂:this.offsetWires21.push(e[0]),this.offsetWires21.push(e[1]),this.offsetWires21.push(e[2]),this.offsetWires21.push(e[3]),this.offsetWires21.push(e[4]),this.offsetWires21.push(e[5]),this.ToffsetWires2A1.push(e[6]),this.ToffsetWires2A1.push(e[7]),this.ToffsetWires2A1.push(e[8]),this.ToffsetWires2A1.push(e[9]),this.ToffsetWires2A1.push(e[10]),this.ToffsetWires2A1.push(e[11]);break;case A.八分裂:this.offsetWires21.push(e[0]),this.offsetWires21.push(e[1]),this.offsetWires21.push(e[2]),this.offsetWires21.push(e[3]),this.offsetWires21.push(e[4]),this.offsetWires21.push(e[5]),this.offsetWires21.push(e[6]),this.offsetWires21.push(e[7]),this.ToffsetWires2A1.push(e[8]),this.ToffsetWires2A1.push(e[9]),this.ToffsetWires2A1.push(e[10]),this.ToffsetWires2A1.push(e[11]),this.ToffsetWires2A1.push(e[12]),this.ToffsetWires2A1.push(e[13]),this.ToffsetWires2A1.push(e[14]),this.ToffsetWires2A1.push(e[15]);break}else switch(this.LineInfo.Wairnum){case A.单分裂:const T=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires21.push(T),this.ToffsetWires2A2.push(T);break;case A.双分裂:const m=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),b=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W);this.offsetWires21.push(m),this.offsetWires21.push(b),this.ToffsetWires2A2.push(m),this.ToffsetWires2A2.push(b);break;case A.四分裂:const d=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),P=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),g=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),y=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W);this.offsetWires21.push(d),this.offsetWires21.push(P),this.offsetWires21.push(g),this.offsetWires21.push(y),this.ToffsetWires2A2.push(d),this.ToffsetWires2A2.push(P),this.ToffsetWires2A2.push(g),this.ToffsetWires2A2.push(y);break;case A.六分裂:const v=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),_=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),S=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),M=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),E=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),Y=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W);this.offsetWires21.push(v),this.offsetWires21.push(_),this.offsetWires21.push(S),this.offsetWires21.push(M),this.offsetWires21.push(E),this.offsetWires21.push(Y),this.ToffsetWires2A2.push(v),this.ToffsetWires2A2.push(_),this.ToffsetWires2A2.push(S),this.ToffsetWires2A2.push(M),this.ToffsetWires2A2.push(E),this.ToffsetWires2A2.push(Y);break;case A.八分裂:const H=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),X=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),O=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),Z=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),F=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),N=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W),G=B(r,new n.Cartesian3(t.InsulatorPoint[6].X*-1,t.InsulatorPoint[6].Y,t.InsulatorPoint[6].Z),W),$=B(r,new n.Cartesian3(t.InsulatorPoint[7].X*-1,t.InsulatorPoint[7].Y,t.InsulatorPoint[7].Z),W);this.offsetWires21.push(H),this.offsetWires21.push(X),this.offsetWires21.push(O),this.offsetWires21.push(Z),this.offsetWires21.push(F),this.offsetWires21.push(N),this.offsetWires21.push(G),this.offsetWires21.push($),this.ToffsetWires2A2.push(H),this.ToffsetWires2A2.push(X),this.ToffsetWires2A2.push(O),this.ToffsetWires2A2.push(Z),this.ToffsetWires2A2.push(F),this.ToffsetWires2A2.push(N),this.ToffsetWires2A2.push(G),this.ToffsetWires2A2.push($);break}else if(t.type==D.跳线串)switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires2A1.push(e[0]),this.ToffsetWires2A2.push(e[0]);break;case A.双分裂:this.ToffsetWires2A1.push(e[0]),this.ToffsetWires2A1.push(e[1]),this.ToffsetWires2A2.push(e[2]),this.ToffsetWires2A2.push(e[3]);break;case A.四分裂:this.ToffsetWires2A1.push(e[0]),this.ToffsetWires2A1.push(e[1]),this.ToffsetWires2A1.push(e[2]),this.ToffsetWires2A1.push(e[3]),this.ToffsetWires2A2.push(e[4]),this.ToffsetWires2A2.push(e[5]),this.ToffsetWires2A2.push(e[6]),this.ToffsetWires2A2.push(e[7]);break;case A.六分裂:this.ToffsetWires2A1.push(e[0]),this.ToffsetWires2A1.push(e[1]),this.ToffsetWires2A1.push(e[2]),this.ToffsetWires2A1.push(e[3]),this.ToffsetWires2A1.push(e[4]),this.ToffsetWires2A1.push(e[5]),this.ToffsetWires2A2.push(e[6]),this.ToffsetWires2A2.push(e[7]),this.ToffsetWires2A2.push(e[8]),this.ToffsetWires2A2.push(e[9]),this.ToffsetWires2A2.push(e[10]),this.ToffsetWires2A2.push(e[11]);break;case A.八分裂:this.ToffsetWires2A1.push(e[0]),this.ToffsetWires2A1.push(e[1]),this.ToffsetWires2A1.push(e[2]),this.ToffsetWires2A1.push(e[3]),this.ToffsetWires2A1.push(e[4]),this.ToffsetWires2A1.push(e[5]),this.ToffsetWires2A1.push(e[6]),this.ToffsetWires2A1.push(e[7]),this.ToffsetWires2A2.push(e[8]),this.ToffsetWires2A2.push(e[9]),this.ToffsetWires2A2.push(e[10]),this.ToffsetWires2A2.push(e[11]),this.ToffsetWires2A2.push(e[12]),this.ToffsetWires2A2.push(e[13]),this.ToffsetWires2A2.push(e[14]),this.ToffsetWires2A2.push(e[15]);break}break;case z.B相:if(t.type==D.耐张串)if(t.WairFX=="进")switch(this.LineInfo.Wairnum){case A.单分裂:this.offsetWires22.push(e[0]),this.ToffsetWires2B1.push(e[0]);break;case A.双分裂:this.offsetWires22.push(e[0]),this.offsetWires22.push(e[1]),this.ToffsetWires2B1.push(e[2]),this.ToffsetWires2B1.push(e[3]);break;case A.四分裂:this.offsetWires22.push(e[0]),this.offsetWires22.push(e[1]),this.offsetWires22.push(e[2]),this.offsetWires22.push(e[3]),this.ToffsetWires2B1.push(e[4]),this.ToffsetWires2B1.push(e[5]),this.ToffsetWires2B1.push(e[6]),this.ToffsetWires2B1.push(e[7]);break;case A.六分裂:this.offsetWires22.push(e[0]),this.offsetWires22.push(e[1]),this.offsetWires22.push(e[2]),this.offsetWires22.push(e[3]),this.offsetWires22.push(e[4]),this.offsetWires22.push(e[5]),this.ToffsetWires2B1.push(e[6]),this.ToffsetWires2B1.push(e[7]),this.ToffsetWires2B1.push(e[8]),this.ToffsetWires2B1.push(e[9]),this.ToffsetWires2B1.push(e[10]),this.ToffsetWires2B1.push(e[11]);break;case A.八分裂:this.offsetWires22.push(e[0]),this.offsetWires22.push(e[1]),this.offsetWires22.push(e[2]),this.offsetWires22.push(e[3]),this.offsetWires22.push(e[4]),this.offsetWires22.push(e[5]),this.offsetWires22.push(e[6]),this.offsetWires22.push(e[7]),this.ToffsetWires2B1.push(e[8]),this.ToffsetWires2B1.push(e[9]),this.ToffsetWires2B1.push(e[10]),this.ToffsetWires2B1.push(e[11]),this.ToffsetWires2B1.push(e[12]),this.ToffsetWires2B1.push(e[13]),this.ToffsetWires2B1.push(e[14]),this.ToffsetWires2B1.push(e[15]);break}else switch(this.LineInfo.Wairnum){case A.单分裂:const T=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires22.push(T),this.ToffsetWires2B2.push(T);break;case A.双分裂:const m=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),b=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W);this.offsetWires22.push(m),this.offsetWires22.push(b),this.ToffsetWires2B2.push(m),this.ToffsetWires2B2.push(b);break;case A.四分裂:const d=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),P=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),g=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),y=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W);this.offsetWires22.push(d),this.offsetWires22.push(P),this.offsetWires22.push(g),this.offsetWires22.push(y),this.ToffsetWires2B2.push(d),this.ToffsetWires2B2.push(P),this.ToffsetWires2B2.push(g),this.ToffsetWires2B2.push(y);break;case A.六分裂:const v=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),_=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),S=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),M=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),E=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),Y=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W);this.offsetWires22.push(v),this.offsetWires22.push(_),this.offsetWires22.push(S),this.offsetWires22.push(M),this.offsetWires22.push(E),this.offsetWires22.push(Y),this.ToffsetWires2B2.push(v),this.ToffsetWires2B2.push(_),this.ToffsetWires2B2.push(S),this.ToffsetWires2B2.push(M),this.ToffsetWires2B2.push(E),this.ToffsetWires2B2.push(Y);break;case A.八分裂:const H=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),X=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),O=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),Z=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),F=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),N=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W),G=B(r,new n.Cartesian3(t.InsulatorPoint[6].X*-1,t.InsulatorPoint[6].Y,t.InsulatorPoint[6].Z),W),$=B(r,new n.Cartesian3(t.InsulatorPoint[7].X*-1,t.InsulatorPoint[7].Y,t.InsulatorPoint[7].Z),W);this.offsetWires22.push(H),this.offsetWires22.push(X),this.offsetWires22.push(O),this.offsetWires22.push(Z),this.offsetWires22.push(F),this.offsetWires22.push(N),this.offsetWires22.push(G),this.offsetWires22.push($),this.ToffsetWires2B2.push(H),this.ToffsetWires2B2.push(X),this.ToffsetWires2B2.push(O),this.ToffsetWires2B2.push(Z),this.ToffsetWires2B2.push(F),this.ToffsetWires2B2.push(N),this.ToffsetWires2B2.push(G),this.ToffsetWires2B2.push($);break}else if(t.type==D.跳线串)switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires2B1.push(e[0]),this.ToffsetWires2B2.push(e[0]);break;case A.双分裂:this.ToffsetWires2B1.push(e[0]),this.ToffsetWires2B1.push(e[1]),this.ToffsetWires2B2.push(e[2]),this.ToffsetWires2B2.push(e[3]);break;case A.四分裂:this.ToffsetWires2B1.push(e[0]),this.ToffsetWires2B1.push(e[1]),this.ToffsetWires2B1.push(e[2]),this.ToffsetWires2B1.push(e[3]),this.ToffsetWires2B2.push(e[4]),this.ToffsetWires2B2.push(e[5]),this.ToffsetWires2B2.push(e[6]),this.ToffsetWires2B2.push(e[7]);break;case A.六分裂:this.ToffsetWires2B1.push(e[0]),this.ToffsetWires2B1.push(e[1]),this.ToffsetWires2B1.push(e[2]),this.ToffsetWires2B1.push(e[3]),this.ToffsetWires2B1.push(e[4]),this.ToffsetWires2B1.push(e[5]),this.ToffsetWires2B2.push(e[6]),this.ToffsetWires2B2.push(e[7]),this.ToffsetWires2B2.push(e[8]),this.ToffsetWires2B2.push(e[9]),this.ToffsetWires2B2.push(e[10]),this.ToffsetWires2B2.push(e[11]);break;case A.八分裂:this.ToffsetWires2B1.push(e[0]),this.ToffsetWires2B1.push(e[1]),this.ToffsetWires2B1.push(e[2]),this.ToffsetWires2B1.push(e[3]),this.ToffsetWires2B1.push(e[4]),this.ToffsetWires2B1.push(e[5]),this.ToffsetWires2B1.push(e[6]),this.ToffsetWires2B1.push(e[7]),this.ToffsetWires2B2.push(e[8]),this.ToffsetWires2B2.push(e[9]),this.ToffsetWires2B2.push(e[10]),this.ToffsetWires2B2.push(e[11]),this.ToffsetWires2B2.push(e[12]),this.ToffsetWires2B2.push(e[13]),this.ToffsetWires2B2.push(e[14]),this.ToffsetWires2B2.push(e[15]);break}break;case z.C相:if(t.type==D.耐张串)if(t.WairFX=="进")switch(this.LineInfo.Wairnum){case A.单分裂:this.offsetWires23.push(e[0]),this.ToffsetWires2C1.push(e[0]);break;case A.双分裂:this.offsetWires23.push(e[0]),this.offsetWires23.push(e[1]),this.ToffsetWires2C1.push(e[2]),this.ToffsetWires2C1.push(e[3]);break;case A.四分裂:this.offsetWires23.push(e[0]),this.offsetWires23.push(e[1]),this.offsetWires23.push(e[2]),this.offsetWires23.push(e[3]),this.ToffsetWires2C1.push(e[4]),this.ToffsetWires2C1.push(e[5]),this.ToffsetWires2C1.push(e[6]),this.ToffsetWires2C1.push(e[7]);break;case A.六分裂:this.offsetWires23.push(e[0]),this.offsetWires23.push(e[1]),this.offsetWires23.push(e[2]),this.offsetWires23.push(e[3]),this.offsetWires23.push(e[4]),this.offsetWires23.push(e[5]),this.ToffsetWires2C1.push(e[6]),this.ToffsetWires2C1.push(e[7]),this.ToffsetWires2C1.push(e[8]),this.ToffsetWires2C1.push(e[9]),this.ToffsetWires2C1.push(e[10]),this.ToffsetWires2C1.push(e[11]);break;case A.八分裂:this.offsetWires23.push(e[0]),this.offsetWires23.push(e[1]),this.offsetWires23.push(e[2]),this.offsetWires23.push(e[3]),this.offsetWires23.push(e[4]),this.offsetWires23.push(e[5]),this.offsetWires23.push(e[6]),this.offsetWires23.push(e[7]),this.ToffsetWires2C1.push(e[8]),this.ToffsetWires2C1.push(e[9]),this.ToffsetWires2C1.push(e[10]),this.ToffsetWires2C1.push(e[11]),this.ToffsetWires2C1.push(e[12]),this.ToffsetWires2C1.push(e[13]),this.ToffsetWires2C1.push(e[14]),this.ToffsetWires2C1.push(e[15]);break}else switch(this.LineInfo.Wairnum){case A.单分裂:const T=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires23.push(T),this.ToffsetWires2C2.push(T);break;case A.双分裂:const m=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),b=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W);this.offsetWires23.push(m),this.offsetWires23.push(b),this.ToffsetWires2C2.push(m),this.ToffsetWires2C2.push(b);break;case A.四分裂:const d=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),P=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),g=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),y=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W);this.offsetWires23.push(d),this.offsetWires23.push(P),this.offsetWires23.push(g),this.offsetWires23.push(y),this.ToffsetWires2C2.push(d),this.ToffsetWires2C2.push(P),this.ToffsetWires2C2.push(g),this.ToffsetWires2C2.push(y);break;case A.六分裂:const v=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),_=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),S=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),M=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),E=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),Y=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W);this.offsetWires23.push(v),this.offsetWires23.push(_),this.offsetWires23.push(S),this.offsetWires23.push(M),this.offsetWires23.push(E),this.offsetWires23.push(Y),this.ToffsetWires2C2.push(v),this.ToffsetWires2C2.push(_),this.ToffsetWires2C2.push(S),this.ToffsetWires2C2.push(M),this.ToffsetWires2C2.push(E),this.ToffsetWires2C2.push(Y);break;case A.八分裂:const H=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W),X=B(r,new n.Cartesian3(t.InsulatorPoint[1].X*-1,t.InsulatorPoint[1].Y,t.InsulatorPoint[1].Z),W),O=B(r,new n.Cartesian3(t.InsulatorPoint[2].X*-1,t.InsulatorPoint[2].Y,t.InsulatorPoint[2].Z),W),Z=B(r,new n.Cartesian3(t.InsulatorPoint[3].X*-1,t.InsulatorPoint[3].Y,t.InsulatorPoint[3].Z),W),F=B(r,new n.Cartesian3(t.InsulatorPoint[4].X*-1,t.InsulatorPoint[4].Y,t.InsulatorPoint[4].Z),W),N=B(r,new n.Cartesian3(t.InsulatorPoint[5].X*-1,t.InsulatorPoint[5].Y,t.InsulatorPoint[5].Z),W),G=B(r,new n.Cartesian3(t.InsulatorPoint[6].X*-1,t.InsulatorPoint[6].Y,t.InsulatorPoint[6].Z),W),$=B(r,new n.Cartesian3(t.InsulatorPoint[7].X*-1,t.InsulatorPoint[7].Y,t.InsulatorPoint[7].Z),W);this.offsetWires23.push(H),this.offsetWires23.push(X),this.offsetWires23.push(O),this.offsetWires23.push(Z),this.offsetWires23.push(F),this.offsetWires23.push(N),this.offsetWires23.push(G),this.offsetWires23.push($),this.ToffsetWires2C2.push(H),this.ToffsetWires2C2.push(X),this.ToffsetWires2C2.push(O),this.ToffsetWires2C2.push(Z),this.ToffsetWires2C2.push(F),this.ToffsetWires2C2.push(N),this.ToffsetWires2C2.push(G),this.ToffsetWires2C2.push($);break}else if(t.type==D.跳线串)switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires2C1.push(e[0]),this.ToffsetWires2C2.push(e[0]);break;case A.双分裂:this.ToffsetWires2C1.push(e[0]),this.ToffsetWires2C1.push(e[1]),this.ToffsetWires2C2.push(e[2]),this.ToffsetWires2C2.push(e[3]);break;case A.四分裂:this.ToffsetWires2C1.push(e[0]),this.ToffsetWires2C1.push(e[1]),this.ToffsetWires2C1.push(e[2]),this.ToffsetWires2C1.push(e[3]),this.ToffsetWires2C2.push(e[4]),this.ToffsetWires2C2.push(e[5]),this.ToffsetWires2C2.push(e[6]),this.ToffsetWires2C2.push(e[7]);break;case A.六分裂:this.ToffsetWires2C1.push(e[0]),this.ToffsetWires2C1.push(e[1]),this.ToffsetWires2C1.push(e[2]),this.ToffsetWires2C1.push(e[3]),this.ToffsetWires2C1.push(e[4]),this.ToffsetWires2C1.push(e[5]),this.ToffsetWires2C2.push(e[6]),this.ToffsetWires2C2.push(e[7]),this.ToffsetWires2C2.push(e[8]),this.ToffsetWires2C2.push(e[9]),this.ToffsetWires2C2.push(e[10]),this.ToffsetWires2C2.push(e[11]);break;case A.八分裂:this.ToffsetWires2C1.push(e[0]),this.ToffsetWires2C1.push(e[1]),this.ToffsetWires2C1.push(e[2]),this.ToffsetWires2C1.push(e[3]),this.ToffsetWires2C1.push(e[4]),this.ToffsetWires2C1.push(e[5]),this.ToffsetWires2C1.push(e[6]),this.ToffsetWires2C1.push(e[7]),this.ToffsetWires2C2.push(e[8]),this.ToffsetWires2C2.push(e[9]),this.ToffsetWires2C2.push(e[10]),this.ToffsetWires2C2.push(e[11]),this.ToffsetWires2C2.push(e[12]),this.ToffsetWires2C2.push(e[13]),this.ToffsetWires2C2.push(e[14]),this.ToffsetWires2C2.push(e[15]);break}break}else switch(t.PhaseSequence){case z.A相:e.forEach(T=>{this.offsetWires21.push(T)});break;case z.B相:e.forEach(T=>{this.offsetWires22.push(T)});break;case z.C相:e.forEach(T=>{this.offsetWires23.push(T)});break}else if(this.LineInfo.towers[s].type==q.耐张塔)switch(p){case 11:this.offsetWires21.push(e[0]),this.ToffsetWires2A1.push(e[0]);break;case 12:this.ToffsetWires2A1.push(e[0]),this.ToffsetWires2A2.push(e[0]);break;case 13:const T=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires21.push(T),this.ToffsetWires2A2.push(T);break;case 14:this.offsetWires22.push(e[0]),this.ToffsetWires2B1.push(e[0]);break;case 15:this.ToffsetWires2B1.push(e[0]),this.ToffsetWires2B2.push(e[0]);break;case 16:const m=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires22.push(m),this.ToffsetWires2B2.push(m);break;case 17:this.offsetWires23.push(e[0]),this.ToffsetWires2C1.push(e[0]);break;case 18:this.ToffsetWires2C1.push(e[0]),this.ToffsetWires2C2.push(e[0]);break;case 19:const b=B(r,new n.Cartesian3(t.InsulatorPoint[0].X*-1,t.InsulatorPoint[0].Y,t.InsulatorPoint[0].Z),W);this.offsetWires23.push(b),this.ToffsetWires2C2.push(b);break}else switch(p){case 5:e.forEach(T=>{this.offsetWires21.push(T)});break;case 6:e.forEach(T=>{this.offsetWires22.push(T)});break;case 7:e.forEach(T=>{this.offsetWires23.push(T)});break}break;case rs.地线:if(this.LineInfo.ISPhaseSequence)switch(t.PhaseSequence){case z.地线1:this.offsetGrouundWires11.push(e[0]);break;case z.地线2:this.offsetGrouundWires12.push(e[0]);break}else switch(p){case 0:this.offsetGrouundWires11.push(e[0]);break;case 1:this.offsetGrouundWires12.push(e[0]);break}break}p=p+1}),this.offsetWires11.length>0&&s>0){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[];switch(this.LineInfo.Wairnum){case A.单分裂:this.offsetWires11.length>=2&&(t.push(this.offsetWires11[o]),t.push(this.offsetWires11[o-1]),this.offsetArcWires1A=f(t),this.offsetArcWires1A.forEach(d=>{this.arcLine1A1.push(J(this.viewer.scene.globe.ellipsoid,d))}),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break;case A.双分裂:this.offsetWires11.length>=4&&(t.push(this.offsetWires11[o]),t.push(this.offsetWires11[o-2]),this.offsetArcWires1A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1A.forEach(d=>{this.arcLine1A1.push(J(this.viewer.scene.globe.ellipsoid,d))}),l.push(this.offsetWires11[o+1]),l.push(this.offsetWires11[o-1]),this.offsetArcWires1A=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break;case A.四分裂:this.offsetWires11.length>=8&&(t.push(this.offsetWires11[o]),t.push(this.offsetWires11[o-4]),this.offsetArcWires1A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1A.forEach(d=>{this.arcLine1A1.push(J(this.viewer.scene.globe.ellipsoid,d))}),l.push(this.offsetWires11[o+1]),l.push(this.offsetWires11[o-3]),this.offsetArcWires1A=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires11[o+2]),u.push(this.offsetWires11[o-2]),this.offsetArcWires1A=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires11[o+3]),C.push(this.offsetWires11[o-1]),this.offsetArcWires1A=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break;case A.六分裂:this.offsetWires11.length>=12&&(t.push(this.offsetWires11[o]),t.push(this.offsetWires11[o-6]),this.offsetArcWires1A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1A.forEach(d=>{this.arcLine1A1.push(J(this.viewer.scene.globe.ellipsoid,d))}),l.push(this.offsetWires11[o+1]),l.push(this.offsetWires11[o-5]),this.offsetArcWires1A=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires11[o+2]),u.push(this.offsetWires11[o-4]),this.offsetArcWires1A=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires11[o+3]),C.push(this.offsetWires11[o-3]),this.offsetArcWires1A=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires11[o+4]),e.push(this.offsetWires11[o-2]),this.offsetArcWires1A=f(e),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires11[o+5]),T.push(this.offsetWires11[o-1]),this.offsetArcWires1A=f(T),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break;case A.八分裂:this.offsetWires11.length>=16&&(t.push(this.offsetWires11[o]),t.push(this.offsetWires11[o-8]),this.offsetArcWires1A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1A.forEach(d=>{this.arcLine1A1.push(J(this.viewer.scene.globe.ellipsoid,d))}),l.push(this.offsetWires11[o+1]),l.push(this.offsetWires11[o-7]),this.offsetArcWires1A=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires11[o+2]),u.push(this.offsetWires11[o-6]),this.offsetArcWires1A=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires11[o+3]),C.push(this.offsetWires11[o-5]),this.offsetArcWires1A=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires11[o+4]),e.push(this.offsetWires11[o-4]),this.offsetArcWires1A=f(e),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires11[o+5]),T.push(this.offsetWires11[o-3]),this.offsetArcWires1A=f(T),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),m.push(this.offsetWires11[o+6]),m.push(this.offsetWires11[o-2]),this.offsetArcWires1A=f(m),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A7"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),b.push(this.offsetWires11[o+7]),b.push(this.offsetWires11[o-1]),this.offsetArcWires1A=f(b),this.LineentityCollection2.add(h(this.offsetArcWires1A,"导线1_A8"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break}}if(this.offsetWires12.length>0&&s>0){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[];switch(this.LineInfo.Wairnum){case A.单分裂:t.push(this.offsetWires12[o]),t.push(this.offsetWires12[o-1]),this.offsetArcWires1B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(d=>{this.arcLine1B1.push(J(this.viewer.scene.globe.ellipsoid,d))});break;case A.双分裂:t.push(this.offsetWires12[o]),t.push(this.offsetWires12[o-2]),this.offsetArcWires1B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(d=>{this.arcLine1B1.push(J(this.viewer.scene.globe.ellipsoid,d))}),l.push(this.offsetWires12[o+1]),l.push(this.offsetWires12[o-1]),this.offsetArcWires1B=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.四分裂:t.push(this.offsetWires12[o]),t.push(this.offsetWires12[o-4]),this.offsetArcWires1B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(d=>{this.arcLine1B1.push(J(this.viewer.scene.globe.ellipsoid,d))}),l.push(this.offsetWires12[o+1]),l.push(this.offsetWires12[o-3]),this.offsetArcWires1B=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires12[o+2]),u.push(this.offsetWires12[o-2]),this.offsetArcWires1B=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires12[o+3]),C.push(this.offsetWires12[o-1]),this.offsetArcWires1B=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.六分裂:t.push(this.offsetWires12[o]),t.push(this.offsetWires12[o-6]),this.offsetArcWires1B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(d=>{this.arcLine1B1.push(J(this.viewer.scene.globe.ellipsoid,d))}),l.push(this.offsetWires12[o+1]),l.push(this.offsetWires12[o-5]),this.offsetArcWires1B=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires12[o+2]),u.push(this.offsetWires12[o-4]),this.offsetArcWires1B=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires12[o+3]),C.push(this.offsetWires12[o-3]),this.offsetArcWires1B=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires12[o+4]),e.push(this.offsetWires12[o-2]),this.offsetArcWires1B=f(e),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires12[o+5]),T.push(this.offsetWires12[o-1]),this.offsetArcWires1B=f(T),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.八分裂:t.push(this.offsetWires12[o]),t.push(this.offsetWires12[o-8]),this.offsetArcWires1B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(d=>{this.arcLine1B1.push(J(this.viewer.scene.globe.ellipsoid,d))}),l.push(this.offsetWires12[o+1]),l.push(this.offsetWires12[o-7]),this.offsetArcWires1B=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires12[o+2]),u.push(this.offsetWires12[o-6]),this.offsetArcWires1B=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires12[o+3]),C.push(this.offsetWires12[o-5]),this.offsetArcWires1B=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires12[o+4]),e.push(this.offsetWires12[o-4]),this.offsetArcWires1B=f(e),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires12[o+5]),T.push(this.offsetWires12[o-3]),this.offsetArcWires1B=f(T),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),m.push(this.offsetWires12[o+6]),m.push(this.offsetWires12[o-2]),this.offsetArcWires1B=f(m),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B7"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),b.push(this.offsetWires12[o+7]),b.push(this.offsetWires12[o-1]),this.offsetArcWires1B=f(b),this.LineentityCollection2.add(h(this.offsetArcWires1B,"导线1_B8"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetWires13.length>0&&s>0){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[];switch(this.LineInfo.Wairnum){case A.单分裂:t.push(this.offsetWires13[o]),t.push(this.offsetWires13[o-1]),this.offsetArcWires1C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.双分裂:t.push(this.offsetWires13[o]),t.push(this.offsetWires13[o-2]),this.offsetArcWires1C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires13[o+1]),l.push(this.offsetWires13[o-1]),this.offsetArcWires1C=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.四分裂:t.push(this.offsetWires13[o]),t.push(this.offsetWires13[o-4]),this.offsetArcWires1C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires13[o+1]),l.push(this.offsetWires13[o-3]),this.offsetArcWires1C=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires13[o+2]),u.push(this.offsetWires13[o-2]),this.offsetArcWires1C=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires13[o+3]),C.push(this.offsetWires13[o-1]),this.offsetArcWires1C=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.六分裂:t.push(this.offsetWires13[o]),t.push(this.offsetWires13[o-6]),this.offsetArcWires1C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires13[o+1]),l.push(this.offsetWires13[o-5]),this.offsetArcWires1C=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires13[o+2]),u.push(this.offsetWires13[o-4]),this.offsetArcWires1C=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires13[o+3]),C.push(this.offsetWires13[o-3]),this.offsetArcWires1C=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires13[o+4]),e.push(this.offsetWires13[o-2]),this.offsetArcWires1C=f(e),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires13[o+5]),T.push(this.offsetWires13[o-1]),this.offsetArcWires1C=f(T),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.八分裂:t.push(this.offsetWires13[o]),t.push(this.offsetWires13[o-8]),this.offsetArcWires1C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires13[o+1]),l.push(this.offsetWires13[o-7]),this.offsetArcWires1C=f(l),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires13[o+2]),u.push(this.offsetWires13[o-6]),this.offsetArcWires1C=f(u),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires13[o+3]),C.push(this.offsetWires13[o-5]),this.offsetArcWires1C=f(C),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires13[o+4]),e.push(this.offsetWires13[o-4]),this.offsetArcWires1C=f(e),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires13[o+5]),T.push(this.offsetWires13[o-3]),this.offsetArcWires1C=f(T),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),m.push(this.offsetWires13[o+6]),m.push(this.offsetWires13[o-2]),this.offsetArcWires1C=f(m),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C7"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),b.push(this.offsetWires13[o+7]),b.push(this.offsetWires13[o-1]),this.offsetArcWires1C=f(b),this.LineentityCollection2.add(h(this.offsetArcWires1C,"导线1_C8"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetWires21.length>0&&s>0){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[];switch(this.LineInfo.Wairnum){case A.单分裂:t.push(this.offsetWires21[o]),t.push(this.offsetWires21[o-1]),this.offsetArcWires2A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.双分裂:t.push(this.offsetWires21[o]),t.push(this.offsetWires21[o-2]),this.offsetArcWires2A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires21[o+1]),l.push(this.offsetWires21[o-1]),this.offsetArcWires2A=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.四分裂:t.push(this.offsetWires21[o]),t.push(this.offsetWires21[o-4]),this.offsetArcWires2A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires21[o+1]),l.push(this.offsetWires21[o-3]),this.offsetArcWires2A=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires21[o+2]),u.push(this.offsetWires21[o-2]),this.offsetArcWires2A=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires21[o+3]),C.push(this.offsetWires21[o-1]),this.offsetArcWires2A=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.六分裂:t.push(this.offsetWires21[o]),t.push(this.offsetWires21[o-6]),this.offsetArcWires2A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires21[o+1]),l.push(this.offsetWires21[o-5]),this.offsetArcWires2A=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires21[o+2]),u.push(this.offsetWires21[o-4]),this.offsetArcWires2A=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires21[o+3]),C.push(this.offsetWires21[o-3]),this.offsetArcWires2A=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires21[o+4]),e.push(this.offsetWires21[o-2]),this.offsetArcWires2A=f(e),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires21[o+5]),T.push(this.offsetWires21[o-1]),this.offsetArcWires2A=f(T),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.八分裂:t.push(this.offsetWires21[o]),t.push(this.offsetWires21[o-8]),this.offsetArcWires2A=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires21[o+1]),l.push(this.offsetWires21[o-7]),this.offsetArcWires2A=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires21[o+2]),u.push(this.offsetWires21[o-6]),this.offsetArcWires2A=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires21[o+3]),C.push(this.offsetWires21[o-5]),this.offsetArcWires2A=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires21[o+4]),e.push(this.offsetWires21[o-4]),this.offsetArcWires2A=f(e),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires21[o+5]),T.push(this.offsetWires21[o-3]),this.offsetArcWires2A=f(T),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),m.push(this.offsetWires21[o+6]),m.push(this.offsetWires21[o-2]),this.offsetArcWires2A=f(m),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A7"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),b.push(this.offsetWires21[o+7]),b.push(this.offsetWires21[o-1]),this.offsetArcWires2A=f(b),this.LineentityCollection2.add(h(this.offsetArcWires2A,"导线2_A8"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetWires22.length>0&&s>0){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[];switch(this.LineInfo.Wairnum){case A.单分裂:t.push(this.offsetWires22[o]),t.push(this.offsetWires22[o-1]),this.offsetArcWires2B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.双分裂:t.push(this.offsetWires22[o]),t.push(this.offsetWires22[o-2]),this.offsetArcWires2B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires22[o+1]),l.push(this.offsetWires22[o-1]),this.offsetArcWires2B=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.四分裂:t.push(this.offsetWires22[o]),t.push(this.offsetWires22[o-4]),this.offsetArcWires2B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires22[o+1]),l.push(this.offsetWires22[o-3]),this.offsetArcWires2B=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires22[o+2]),u.push(this.offsetWires22[o-2]),this.offsetArcWires2B=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires22[o+3]),C.push(this.offsetWires22[o-1]),this.offsetArcWires2B=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.六分裂:t.push(this.offsetWires22[o]),t.push(this.offsetWires22[o-6]),this.offsetArcWires2B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires22[o+1]),l.push(this.offsetWires22[o-5]),this.offsetArcWires2B=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires22[o+2]),u.push(this.offsetWires22[o-4]),this.offsetArcWires2B=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires22[o+3]),C.push(this.offsetWires22[o-3]),this.offsetArcWires2B=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires22[o+4]),e.push(this.offsetWires22[o-2]),this.offsetArcWires2B=f(e),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires22[o+5]),T.push(this.offsetWires22[o-1]),this.offsetArcWires2B=f(T),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.八分裂:t.push(this.offsetWires22[o]),t.push(this.offsetWires22[o-8]),this.offsetArcWires2B=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires22[o+1]),l.push(this.offsetWires22[o-7]),this.offsetArcWires2B=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires22[o+2]),u.push(this.offsetWires22[o-6]),this.offsetArcWires2B=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires22[o+3]),C.push(this.offsetWires22[o-5]),this.offsetArcWires2B=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires22[o+4]),e.push(this.offsetWires22[o-4]),this.offsetArcWires2B=f(e),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires22[o+5]),T.push(this.offsetWires22[o-3]),this.offsetArcWires2B=f(T),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),m.push(this.offsetWires22[o+6]),m.push(this.offsetWires22[o-2]),this.offsetArcWires2B=f(m),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B7"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),b.push(this.offsetWires22[o+7]),b.push(this.offsetWires22[o-1]),this.offsetArcWires2B=f(b),this.LineentityCollection2.add(h(this.offsetArcWires2B,"导线2_B8"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetWires23.length>0&&s>0){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[];switch(this.LineInfo.Wairnum){case A.单分裂:t.push(this.offsetWires23[o]),t.push(this.offsetWires23[o-1]),this.offsetArcWires2C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.双分裂:t.push(this.offsetWires23[o]),t.push(this.offsetWires23[o-2]),this.offsetArcWires2C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires23[o+1]),l.push(this.offsetWires23[o-1]),this.offsetArcWires2C=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.四分裂:t.push(this.offsetWires23[o]),t.push(this.offsetWires23[o-4]),this.offsetArcWires2C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires23[o+1]),l.push(this.offsetWires23[o-3]),this.offsetArcWires2C=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires23[o+2]),u.push(this.offsetWires23[o-2]),this.offsetArcWires2C=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires23[o+3]),C.push(this.offsetWires23[o-1]),this.offsetArcWires2C=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.六分裂:t.push(this.offsetWires23[o]),t.push(this.offsetWires23[o-6]),this.offsetArcWires2C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires23[o+1]),l.push(this.offsetWires23[o-5]),this.offsetArcWires2C=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires23[o+2]),u.push(this.offsetWires23[o-4]),this.offsetArcWires2C=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires23[o+3]),C.push(this.offsetWires23[o-3]),this.offsetArcWires2C=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires23[o+4]),e.push(this.offsetWires23[o-2]),this.offsetArcWires2C=f(e),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires23[o+5]),T.push(this.offsetWires23[o-1]),this.offsetArcWires2C=f(T),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case A.八分裂:t.push(this.offsetWires23[o]),t.push(this.offsetWires23[o-8]),this.offsetArcWires2C=f(t),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C1"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),l.push(this.offsetWires23[o+1]),l.push(this.offsetWires23[o-7]),this.offsetArcWires2C=f(l),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C2"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires23[o+2]),u.push(this.offsetWires23[o-6]),this.offsetArcWires2C=f(u),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C3"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires23[o+3]),C.push(this.offsetWires23[o-5]),this.offsetArcWires2C=f(C),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C4"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),e.push(this.offsetWires23[o+4]),e.push(this.offsetWires23[o-4]),this.offsetArcWires2C=f(e),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C5"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),T.push(this.offsetWires23[o+5]),T.push(this.offsetWires23[o-3]),this.offsetArcWires2C=f(T),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C6"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),m.push(this.offsetWires23[o+6]),m.push(this.offsetWires23[o-2]),this.offsetArcWires2C=f(m),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C7"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),b.push(this.offsetWires23[o+7]),b.push(this.offsetWires23[o-1]),this.offsetArcWires2C=f(b),this.LineentityCollection2.add(h(this.offsetArcWires2C,"导线2_C8"+(s-2)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetGrouundWires11.length>1){const t=[];t.push(this.offsetGrouundWires11[s]),t.push(this.offsetGrouundWires11[s-1]);const l=[];l.push(this.offsetGrouundWires12[s]),l.push(this.offsetGrouundWires12[s-1]),this.offsetGrouundWires1=f(t,2),this.offsetGrouundWires2=f(l,2),this.offsetGrouundWires1.forEach(u=>{this.arcLine1D1.push(J(this.viewer.scene.globe.ellipsoid,u))}),this.LineentityCollection2.add(h(this.offsetGrouundWires1,"地线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireD1Color)),this.LineentityCollection2.add(h(this.offsetGrouundWires2,"地线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireD2Color))}let w=2;if(this.LineInfo.towers[s].type==q.耐张塔){switch(this.LineInfo.Wairnum){case A.单分裂:o=o+w,i=i+w;break;case A.双分裂:o=o+w*2,i=i+w*2;break;case A.四分裂:o=o+w*4,i=i+w*4;break;case A.六分裂:o=o+w*6,i=i+w*6;break;case A.八分裂:o=o+w*8,i=i+w*8;break}if(this.ToffsetWires1A1.length>1&&this.ToffsetWires1A2.length>1){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[],d=[],P=[],g=[],y=[],v=[],_=[],S=[],M=[];switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires1A1.length>=2&&(t.push(this.ToffsetWires1A1[i-2]),t.push(this.ToffsetWires1A1[i-1]),this.ToffsetArcWires1A=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=2&&(d.push(this.ToffsetWires1A2[i-2]),d.push(this.ToffsetWires1A2[i-1]),this.ToffsetArcWires2A=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.双分裂:this.ToffsetWires1A1.length>=4&&(t.push(this.ToffsetWires1A1[i-4]),t.push(this.ToffsetWires1A1[i-2]),this.ToffsetArcWires1A=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1A1[i-3]),l.push(this.ToffsetWires1A1[i-1]),this.ToffsetArcWires1A=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=4&&(d.push(this.ToffsetWires1A2[i-4]),d.push(this.ToffsetWires1A2[i-2]),this.ToffsetArcWires2A=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1A2[i-3]),P.push(this.ToffsetWires1A2[i-1]),this.ToffsetArcWires2A=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.四分裂:this.ToffsetWires1A1.length>=8&&(t.push(this.ToffsetWires1A1[i-8]),t.push(this.ToffsetWires1A1[i-4]),this.ToffsetArcWires1A=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1A1[i-7]),l.push(this.ToffsetWires1A1[i-3]),this.ToffsetArcWires1A=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1A1[i-6]),u.push(this.ToffsetWires1A1[i-2]),this.ToffsetArcWires1A=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1A1[i-5]),C.push(this.ToffsetWires1A1[i-1]),this.ToffsetArcWires1A=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=8&&(d.push(this.ToffsetWires1A2[i-8]),d.push(this.ToffsetWires1A2[i-4]),this.ToffsetArcWires2A=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1A2[i-7]),P.push(this.ToffsetWires1A2[i-3]),this.ToffsetArcWires2A=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1A2[i-6]),g.push(this.ToffsetWires1A2[i-2]),this.ToffsetArcWires2A=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1A2[i-5]),y.push(this.ToffsetWires1A2[i-1]),this.ToffsetArcWires2A=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.六分裂:this.ToffsetWires1A1.length>=12&&(t.push(this.ToffsetWires1A1[i-12]),t.push(this.ToffsetWires1A1[i-6]),this.ToffsetArcWires1A=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1A1[i-11]),l.push(this.ToffsetWires1A1[i-5]),this.ToffsetArcWires1A=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1A1[i-10]),u.push(this.ToffsetWires1A1[i-4]),this.ToffsetArcWires1A=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1A1[i-9]),C.push(this.ToffsetWires1A1[i-3]),this.ToffsetArcWires1A=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires1A1[i-8]),e.push(this.ToffsetWires1A1[i-2]),this.ToffsetArcWires1A=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1A1[i-7]),T.push(this.ToffsetWires1A1[i-1]),this.ToffsetArcWires1A=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=12&&(d.push(this.ToffsetWires1A2[i-12]),d.push(this.ToffsetWires1A2[i-6]),this.ToffsetArcWires2A=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1A2[i-11]),P.push(this.ToffsetWires1A2[i-5]),this.ToffsetArcWires2A=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1A2[i-10]),g.push(this.ToffsetWires1A2[i-4]),this.ToffsetArcWires2A=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1A2[i-9]),y.push(this.ToffsetWires1A2[i-3]),this.ToffsetArcWires2A=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1A2[i-8]),v.push(this.ToffsetWires1A2[i-2]),this.ToffsetArcWires2A=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires1A2[i-7]),_.push(this.ToffsetWires1A2[i-1]),this.ToffsetArcWires2A=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.八分裂:this.ToffsetWires1A1.length>=16&&(t.push(this.ToffsetWires1A1[i-16]),t.push(this.ToffsetWires1A1[i-8]),this.ToffsetArcWires1A=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1A1[i-15]),l.push(this.ToffsetWires1A1[i-7]),this.ToffsetArcWires1A=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1A1[i-14]),u.push(this.ToffsetWires1A1[i-6]),this.ToffsetArcWires1A=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1A1[i-13]),C.push(this.ToffsetWires1A1[i-5]),this.ToffsetArcWires1A=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires1A1[i-12]),e.push(this.ToffsetWires1A1[i-4]),this.ToffsetArcWires1A=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1A1[i-11]),T.push(this.ToffsetWires1A1[i-3]),this.ToffsetArcWires1A=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),m.push(this.ToffsetWires1A1[i-10]),m.push(this.ToffsetWires1A1[i-2]),this.ToffsetArcWires1A=f(m,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1A1[i-9]),b.push(this.ToffsetWires1A1[i-1]),this.ToffsetArcWires1A=f(b,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A,"1A1跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=16&&(d.push(this.ToffsetWires1A2[i-16]),d.push(this.ToffsetWires1A2[i-8]),this.ToffsetArcWires2A=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1A2[i-15]),P.push(this.ToffsetWires1A2[i-7]),this.ToffsetArcWires2A=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1A2[i-14]),g.push(this.ToffsetWires1A2[i-6]),this.ToffsetArcWires2A=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1A2[i-13]),y.push(this.ToffsetWires1A2[i-5]),this.ToffsetArcWires2A=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1A2[i-12]),v.push(this.ToffsetWires1A2[i-4]),this.ToffsetArcWires2A=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires1A2[i-11]),_.push(this.ToffsetWires1A2[i-3]),this.ToffsetArcWires2A=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),S.push(this.ToffsetWires1A2[i-10]),S.push(this.ToffsetWires1A2[i-2]),this.ToffsetArcWires2A=f(S,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),M.push(this.ToffsetWires1A2[i-9]),M.push(this.ToffsetWires1A2[i-1]),this.ToffsetArcWires2A=f(M,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A,"1A2跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires1B1.length>1&&this.ToffsetWires1B2.length>1){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[],d=[],P=[],g=[],y=[],v=[],_=[],S=[],M=[];switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires1B1.length>=2&&(t.push(this.ToffsetWires1B1[i-2]),t.push(this.ToffsetWires1B1[i-1]),this.ToffsetArcWires1B=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=2&&(d.push(this.ToffsetWires1B2[i-2]),d.push(this.ToffsetWires1B2[i-1]),this.ToffsetArcWires2B=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.双分裂:this.ToffsetWires1B1.length>=4&&(t.push(this.ToffsetWires1B1[i-4]),t.push(this.ToffsetWires1B1[i-2]),this.ToffsetArcWires1B=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1B1[i-3]),l.push(this.ToffsetWires1B1[i-1]),this.ToffsetArcWires1B=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=4&&(d.push(this.ToffsetWires1B2[i-4]),d.push(this.ToffsetWires1B2[i-2]),this.ToffsetArcWires2B=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1B2[i-3]),P.push(this.ToffsetWires1B2[i-1]),this.ToffsetArcWires2B=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.四分裂:this.ToffsetWires1B1.length>=8&&(t.push(this.ToffsetWires1B1[i-8]),t.push(this.ToffsetWires1B1[i-4]),this.ToffsetArcWires1B=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1B1[i-7]),l.push(this.ToffsetWires1B1[i-3]),this.ToffsetArcWires1B=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1B1[i-6]),u.push(this.ToffsetWires1B1[i-2]),this.ToffsetArcWires1B=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1B1[i-5]),C.push(this.ToffsetWires1B1[i-1]),this.ToffsetArcWires1B=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=8&&(d.push(this.ToffsetWires1B2[i-8]),d.push(this.ToffsetWires1B2[i-4]),this.ToffsetArcWires2B=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1B2[i-7]),P.push(this.ToffsetWires1B2[i-3]),this.ToffsetArcWires2B=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1B2[i-6]),g.push(this.ToffsetWires1B2[i-2]),this.ToffsetArcWires2B=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1B2[i-5]),y.push(this.ToffsetWires1B2[i-1]),this.ToffsetArcWires2B=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.六分裂:this.ToffsetWires1B1.length>=12&&(t.push(this.ToffsetWires1B1[i-12]),t.push(this.ToffsetWires1B1[i-6]),this.ToffsetArcWires1B=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1B1[i-11]),l.push(this.ToffsetWires1B1[i-5]),this.ToffsetArcWires1B=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1B1[i-10]),u.push(this.ToffsetWires1B1[i-4]),this.ToffsetArcWires1B=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1B1[i-9]),C.push(this.ToffsetWires1B1[i-3]),this.ToffsetArcWires1B=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires1B1[i-8]),e.push(this.ToffsetWires1B1[i-2]),this.ToffsetArcWires1B=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1B1[i-7]),T.push(this.ToffsetWires1B1[i-1]),this.ToffsetArcWires1B=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=12&&(d.push(this.ToffsetWires1B2[i-12]),d.push(this.ToffsetWires1B2[i-6]),this.ToffsetArcWires2B=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1B2[i-11]),P.push(this.ToffsetWires1B2[i-5]),this.ToffsetArcWires2B=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1B2[i-10]),g.push(this.ToffsetWires1B2[i-4]),this.ToffsetArcWires2B=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1B2[i-9]),y.push(this.ToffsetWires1B2[i-3]),this.ToffsetArcWires2B=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1B2[i-8]),v.push(this.ToffsetWires1B2[i-2]),this.ToffsetArcWires2B=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires1B2[i-7]),_.push(this.ToffsetWires1B2[i-1]),this.ToffsetArcWires2B=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.八分裂:this.ToffsetWires1B1.length>=16&&(t.push(this.ToffsetWires1B1[i-16]),t.push(this.ToffsetWires1B1[i-8]),this.ToffsetArcWires1B=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1B1[i-15]),l.push(this.ToffsetWires1B1[i-7]),this.ToffsetArcWires1B=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1B1[i-14]),u.push(this.ToffsetWires1B1[i-6]),this.ToffsetArcWires1B=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1B1[i-13]),C.push(this.ToffsetWires1B1[i-5]),this.ToffsetArcWires1B=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires1B1[i-12]),e.push(this.ToffsetWires1B1[i-4]),this.ToffsetArcWires1B=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1B1[i-11]),T.push(this.ToffsetWires1B1[i-3]),this.ToffsetArcWires1B=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),m.push(this.ToffsetWires1B1[i-10]),m.push(this.ToffsetWires1B1[i-2]),this.ToffsetArcWires1B=f(m,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1B1[i-9]),b.push(this.ToffsetWires1B1[i-1]),this.ToffsetArcWires1B=f(b,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B,"1B1跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=16&&(d.push(this.ToffsetWires1B2[i-16]),d.push(this.ToffsetWires1B2[i-8]),this.ToffsetArcWires2B=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1B2[i-15]),P.push(this.ToffsetWires1B2[i-7]),this.ToffsetArcWires2B=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1B2[i-14]),g.push(this.ToffsetWires1B2[i-6]),this.ToffsetArcWires2B=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1B2[i-13]),y.push(this.ToffsetWires1B2[i-5]),this.ToffsetArcWires2B=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1B2[i-12]),v.push(this.ToffsetWires1B2[i-4]),this.ToffsetArcWires2B=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires1B2[i-11]),_.push(this.ToffsetWires1B2[i-3]),this.ToffsetArcWires2B=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),S.push(this.ToffsetWires1B2[i-10]),S.push(this.ToffsetWires1B2[i-2]),this.ToffsetArcWires2B=f(S,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),M.push(this.ToffsetWires1B2[i-9]),M.push(this.ToffsetWires1B2[i-1]),this.ToffsetArcWires2B=f(M,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B,"1B2跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires1C1.length>1&&this.ToffsetWires1C2.length>1){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[],d=[],P=[],g=[],y=[],v=[],_=[],S=[],M=[];switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires1C1.length>=2&&(t.push(this.ToffsetWires1C1[i-2]),t.push(this.ToffsetWires1C1[i-1]),this.ToffsetArcWires1C=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=2&&(d.push(this.ToffsetWires1C2[i-2]),d.push(this.ToffsetWires1C2[i-1]),this.ToffsetArcWires2C=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.双分裂:this.ToffsetWires1C1.length>=4&&(t.push(this.ToffsetWires1C1[i-4]),t.push(this.ToffsetWires1C1[i-2]),this.ToffsetArcWires1C=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1C1[i-3]),l.push(this.ToffsetWires1C1[i-1]),this.ToffsetArcWires1C=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=4&&(d.push(this.ToffsetWires1C2[i-4]),d.push(this.ToffsetWires1C2[i-2]),this.ToffsetArcWires2C=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1C2[i-3]),P.push(this.ToffsetWires1C2[i-1]),this.ToffsetArcWires2C=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.四分裂:this.ToffsetWires1C1.length>=8&&(t.push(this.ToffsetWires1C1[i-8]),t.push(this.ToffsetWires1C1[i-4]),this.ToffsetArcWires1C=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1C1[i-7]),l.push(this.ToffsetWires1C1[i-3]),this.ToffsetArcWires1C=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1C1[i-6]),u.push(this.ToffsetWires1C1[i-2]),this.ToffsetArcWires1C=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1C1[i-5]),C.push(this.ToffsetWires1C1[i-1]),this.ToffsetArcWires1C=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=8&&(d.push(this.ToffsetWires1C2[i-8]),d.push(this.ToffsetWires1C2[i-4]),this.ToffsetArcWires2C=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1C2[i-7]),P.push(this.ToffsetWires1C2[i-3]),this.ToffsetArcWires2C=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1C2[i-6]),g.push(this.ToffsetWires1C2[i-2]),this.ToffsetArcWires2C=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1C2[i-5]),y.push(this.ToffsetWires1C2[i-1]),this.ToffsetArcWires2C=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.六分裂:this.ToffsetWires1C1.length>=12&&(t.push(this.ToffsetWires1C1[i-12]),t.push(this.ToffsetWires1C1[i-6]),this.ToffsetArcWires1C=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1C1[i-11]),l.push(this.ToffsetWires1C1[i-5]),this.ToffsetArcWires1C=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1C1[i-10]),u.push(this.ToffsetWires1C1[i-4]),this.ToffsetArcWires1C=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1C1[i-9]),C.push(this.ToffsetWires1C1[i-3]),this.ToffsetArcWires1C=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires1C1[i-8]),e.push(this.ToffsetWires1C1[i-2]),this.ToffsetArcWires1C=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1C1[i-7]),T.push(this.ToffsetWires1C1[i-1]),this.ToffsetArcWires1C=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=12&&(d.push(this.ToffsetWires1C2[i-12]),d.push(this.ToffsetWires1C2[i-6]),this.ToffsetArcWires2C=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1C2[i-11]),P.push(this.ToffsetWires1C2[i-5]),this.ToffsetArcWires2C=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1C2[i-10]),g.push(this.ToffsetWires1C2[i-4]),this.ToffsetArcWires2C=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1C2[i-9]),y.push(this.ToffsetWires1C2[i-3]),this.ToffsetArcWires2C=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1C2[i-8]),v.push(this.ToffsetWires1C2[i-2]),this.ToffsetArcWires2C=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires1C2[i-7]),_.push(this.ToffsetWires1C2[i-1]),this.ToffsetArcWires2C=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.八分裂:this.ToffsetWires1C1.length>=16&&(t.push(this.ToffsetWires1C1[i-16]),t.push(this.ToffsetWires1C1[i-8]),this.ToffsetArcWires1C=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires1C1[i-15]),l.push(this.ToffsetWires1C1[i-7]),this.ToffsetArcWires1C=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1C1[i-14]),u.push(this.ToffsetWires1C1[i-6]),this.ToffsetArcWires1C=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1C1[i-13]),C.push(this.ToffsetWires1C1[i-5]),this.ToffsetArcWires1C=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires1C1[i-12]),e.push(this.ToffsetWires1C1[i-4]),this.ToffsetArcWires1C=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1C1[i-11]),T.push(this.ToffsetWires1C1[i-3]),this.ToffsetArcWires1C=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),m.push(this.ToffsetWires1C1[i-10]),m.push(this.ToffsetWires1C1[i-2]),this.ToffsetArcWires1C=f(m,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1C1[i-9]),b.push(this.ToffsetWires1C1[i-1]),this.ToffsetArcWires1C=f(b,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C,"1C1跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=16&&(d.push(this.ToffsetWires1C2[i-16]),d.push(this.ToffsetWires1C2[i-8]),this.ToffsetArcWires2C=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1C2[i-15]),P.push(this.ToffsetWires1C2[i-7]),this.ToffsetArcWires2C=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires1C2[i-14]),g.push(this.ToffsetWires1C2[i-6]),this.ToffsetArcWires2C=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires1C2[i-13]),y.push(this.ToffsetWires1C2[i-5]),this.ToffsetArcWires2C=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1C2[i-12]),v.push(this.ToffsetWires1C2[i-4]),this.ToffsetArcWires2C=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires1C2[i-11]),_.push(this.ToffsetWires1C2[i-3]),this.ToffsetArcWires2C=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),S.push(this.ToffsetWires1C2[i-10]),S.push(this.ToffsetWires1C2[i-2]),this.ToffsetArcWires2C=f(S,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),M.push(this.ToffsetWires1C2[i-9]),M.push(this.ToffsetWires1C2[i-1]),this.ToffsetArcWires2C=f(M,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C,"1C2跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires2A1.length>1&&this.ToffsetWires2A2.length>1){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[],d=[],P=[],g=[],y=[],v=[],_=[],S=[],M=[];switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires2A1.length>=2&&(t.push(this.ToffsetWires2A1[i-2]),t.push(this.ToffsetWires2A1[i-1]),this.ToffsetArcWires1A2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=2&&(d.push(this.ToffsetWires2A2[i-2]),d.push(this.ToffsetWires2A2[i-1]),this.ToffsetArcWires2A2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.双分裂:this.ToffsetWires2A1.length>=4&&(t.push(this.ToffsetWires2A1[i-4]),t.push(this.ToffsetWires2A1[i-2]),this.ToffsetArcWires1A2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2A1[i-3]),l.push(this.ToffsetWires2A1[i-1]),this.ToffsetArcWires1A2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=4&&(d.push(this.ToffsetWires2A2[i-4]),d.push(this.ToffsetWires2A2[i-2]),this.ToffsetArcWires2A2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2A2[i-3]),P.push(this.ToffsetWires2A2[i-1]),this.ToffsetArcWires2A2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.四分裂:this.ToffsetWires2A1.length>=8&&(t.push(this.ToffsetWires2A1[i-8]),t.push(this.ToffsetWires2A1[i-4]),this.ToffsetArcWires1A2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2A1[i-7]),l.push(this.ToffsetWires2A1[i-3]),this.ToffsetArcWires1A2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2A1[i-6]),u.push(this.ToffsetWires2A1[i-2]),this.ToffsetArcWires1A2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2A1[i-5]),C.push(this.ToffsetWires2A1[i-1]),this.ToffsetArcWires1A2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=8&&(d.push(this.ToffsetWires2A2[i-8]),d.push(this.ToffsetWires2A2[i-4]),this.ToffsetArcWires2A2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2A2[i-7]),P.push(this.ToffsetWires2A2[i-3]),this.ToffsetArcWires2A2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2A2[i-6]),g.push(this.ToffsetWires2A2[i-2]),this.ToffsetArcWires2A2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2A2[i-5]),y.push(this.ToffsetWires2A2[i-1]),this.ToffsetArcWires2A2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.六分裂:this.ToffsetWires2A1.length>=12&&(t.push(this.ToffsetWires2A1[i-12]),t.push(this.ToffsetWires2A1[i-6]),this.ToffsetArcWires1A2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2A1[i-11]),l.push(this.ToffsetWires2A1[i-5]),this.ToffsetArcWires1A2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2A1[i-10]),u.push(this.ToffsetWires2A1[i-4]),this.ToffsetArcWires1A2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2A1[i-9]),C.push(this.ToffsetWires2A1[i-3]),this.ToffsetArcWires1A2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires2A1[i-8]),e.push(this.ToffsetWires2A1[i-2]),this.ToffsetArcWires1A2=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2A1[i-7]),T.push(this.ToffsetWires2A1[i-1]),this.ToffsetArcWires1A2=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=12&&(d.push(this.ToffsetWires2A2[i-12]),d.push(this.ToffsetWires2A2[i-6]),this.ToffsetArcWires2A2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2A2[i-11]),P.push(this.ToffsetWires2A2[i-5]),this.ToffsetArcWires2A2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2A2[i-10]),g.push(this.ToffsetWires2A2[i-4]),this.ToffsetArcWires2A2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2A2[i-9]),y.push(this.ToffsetWires2A2[i-3]),this.ToffsetArcWires2A2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2A2[i-8]),v.push(this.ToffsetWires2A2[i-2]),this.ToffsetArcWires2A2=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires2A2[i-7]),_.push(this.ToffsetWires2A2[i-1]),this.ToffsetArcWires2A2=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.八分裂:this.ToffsetWires2A1.length>=16&&(t.push(this.ToffsetWires2A1[i-16]),t.push(this.ToffsetWires2A1[i-8]),this.ToffsetArcWires1A2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2A1[i-15]),l.push(this.ToffsetWires2A1[i-7]),this.ToffsetArcWires1A2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2A1[i-14]),u.push(this.ToffsetWires2A1[i-6]),this.ToffsetArcWires1A2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2A1[i-13]),C.push(this.ToffsetWires2A1[i-5]),this.ToffsetArcWires1A2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires2A1[i-12]),e.push(this.ToffsetWires2A1[i-4]),this.ToffsetArcWires1A2=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2A1[i-11]),T.push(this.ToffsetWires2A1[i-3]),this.ToffsetArcWires1A2=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),m.push(this.ToffsetWires2A1[i-10]),m.push(this.ToffsetWires2A1[i-2]),this.ToffsetArcWires1A2=f(m,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2A1[i-9]),b.push(this.ToffsetWires2A1[i-1]),this.ToffsetArcWires1A2=f(b,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1A2,"2A1跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=16&&(d.push(this.ToffsetWires2A2[i-16]),d.push(this.ToffsetWires2A2[i-8]),this.ToffsetArcWires2A2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2A2[i-15]),P.push(this.ToffsetWires2A2[i-7]),this.ToffsetArcWires2A2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2A2[i-14]),g.push(this.ToffsetWires2A2[i-6]),this.ToffsetArcWires2A2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2A2[i-13]),y.push(this.ToffsetWires2A2[i-5]),this.ToffsetArcWires2A2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2A2[i-12]),v.push(this.ToffsetWires2A2[i-4]),this.ToffsetArcWires2A2=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires2A2[i-11]),_.push(this.ToffsetWires2A2[i-3]),this.ToffsetArcWires2A2=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),S.push(this.ToffsetWires2A2[i-10]),S.push(this.ToffsetWires2A2[i-2]),this.ToffsetArcWires2A2=f(S,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),M.push(this.ToffsetWires2A2[i-9]),M.push(this.ToffsetWires2A2[i-1]),this.ToffsetArcWires2A2=f(M,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2A2,"2A2跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires2B1.length>1&&this.ToffsetWires2B2.length>1){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[],d=[],P=[],g=[],y=[],v=[],_=[],S=[],M=[];switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires2B1.length>=2&&(t.push(this.ToffsetWires2B1[i-2]),t.push(this.ToffsetWires2B1[i-1]),this.ToffsetArcWires1B2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=2&&(d.push(this.ToffsetWires2B2[i-2]),d.push(this.ToffsetWires2B2[i-1]),this.ToffsetArcWires2B2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.双分裂:this.ToffsetWires2B1.length>=4&&(t.push(this.ToffsetWires2B1[i-4]),t.push(this.ToffsetWires2B1[i-2]),this.ToffsetArcWires1B2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2B1[i-3]),l.push(this.ToffsetWires2B1[i-1]),this.ToffsetArcWires1B2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=4&&(d.push(this.ToffsetWires2B2[i-4]),d.push(this.ToffsetWires2B2[i-2]),this.ToffsetArcWires2B2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2B2[i-3]),P.push(this.ToffsetWires2B2[i-1]),this.ToffsetArcWires2B2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.四分裂:this.ToffsetWires2B1.length>=8&&(t.push(this.ToffsetWires2B1[i-8]),t.push(this.ToffsetWires2B1[i-4]),this.ToffsetArcWires1B2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2B1[i-7]),l.push(this.ToffsetWires2B1[i-3]),this.ToffsetArcWires1B2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2B1[i-6]),u.push(this.ToffsetWires2B1[i-2]),this.ToffsetArcWires1B2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2B1[i-5]),C.push(this.ToffsetWires2B1[i-1]),this.ToffsetArcWires1B2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=8&&(d.push(this.ToffsetWires2B2[i-8]),d.push(this.ToffsetWires2B2[i-4]),this.ToffsetArcWires2B2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2B2[i-7]),P.push(this.ToffsetWires2B2[i-3]),this.ToffsetArcWires2B2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2B2[i-6]),g.push(this.ToffsetWires2B2[i-2]),this.ToffsetArcWires2B2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2B2[i-5]),y.push(this.ToffsetWires2B2[i-1]),this.ToffsetArcWires2B2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.六分裂:this.ToffsetWires2B1.length>=12&&(t.push(this.ToffsetWires2B1[i-12]),t.push(this.ToffsetWires2B1[i-6]),this.ToffsetArcWires1B2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2B1[i-11]),l.push(this.ToffsetWires2B1[i-5]),this.ToffsetArcWires1B2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2B1[i-10]),u.push(this.ToffsetWires2B1[i-4]),this.ToffsetArcWires1B2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2B1[i-9]),C.push(this.ToffsetWires2B1[i-3]),this.ToffsetArcWires1B2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires2B1[i-8]),e.push(this.ToffsetWires2B1[i-2]),this.ToffsetArcWires1B2=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2B1[i-7]),T.push(this.ToffsetWires2B1[i-1]),this.ToffsetArcWires1B2=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=12&&(d.push(this.ToffsetWires2B2[i-12]),d.push(this.ToffsetWires2B2[i-6]),this.ToffsetArcWires2B2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2B2[i-11]),P.push(this.ToffsetWires2B2[i-5]),this.ToffsetArcWires2B2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2B2[i-10]),g.push(this.ToffsetWires2B2[i-4]),this.ToffsetArcWires2B2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2B2[i-9]),y.push(this.ToffsetWires2B2[i-3]),this.ToffsetArcWires2B2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2B2[i-8]),v.push(this.ToffsetWires2B2[i-2]),this.ToffsetArcWires2B2=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires2B2[i-7]),_.push(this.ToffsetWires2B2[i-1]),this.ToffsetArcWires2B2=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.八分裂:this.ToffsetWires2B1.length>=16&&(t.push(this.ToffsetWires2B1[i-16]),t.push(this.ToffsetWires2B1[i-8]),this.ToffsetArcWires1B2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2B1[i-15]),l.push(this.ToffsetWires2B1[i-7]),this.ToffsetArcWires1B2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2B1[i-14]),u.push(this.ToffsetWires2B1[i-6]),this.ToffsetArcWires1B2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2B1[i-13]),C.push(this.ToffsetWires2B1[i-5]),this.ToffsetArcWires1B2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires2B1[i-12]),e.push(this.ToffsetWires2B1[i-4]),this.ToffsetArcWires1B2=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2B1[i-11]),T.push(this.ToffsetWires2B1[i-3]),this.ToffsetArcWires1B2=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),m.push(this.ToffsetWires2B1[i-10]),m.push(this.ToffsetWires2B1[i-2]),this.ToffsetArcWires1B2=f(m,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2B1[i-9]),b.push(this.ToffsetWires2B1[i-1]),this.ToffsetArcWires1B2=f(b,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1B2,"2B1跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=16&&(d.push(this.ToffsetWires2B2[i-16]),d.push(this.ToffsetWires2B2[i-8]),this.ToffsetArcWires2B2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2B2[i-15]),P.push(this.ToffsetWires2B2[i-7]),this.ToffsetArcWires2B2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2B2[i-14]),g.push(this.ToffsetWires2B2[i-6]),this.ToffsetArcWires2B2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2B2[i-13]),y.push(this.ToffsetWires2B2[i-5]),this.ToffsetArcWires2B2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2B2[i-12]),v.push(this.ToffsetWires2B2[i-4]),this.ToffsetArcWires2B2=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires2B2[i-11]),_.push(this.ToffsetWires2B2[i-3]),this.ToffsetArcWires2B2=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),S.push(this.ToffsetWires2B2[i-10]),S.push(this.ToffsetWires2B2[i-2]),this.ToffsetArcWires2B2=f(S,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),M.push(this.ToffsetWires2B2[i-9]),M.push(this.ToffsetWires2B2[i-1]),this.ToffsetArcWires2B2=f(M,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2B2,"2B2跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires2C1.length>1&&this.ToffsetWires2C2.length>1){const t=[],l=[],u=[],C=[],e=[],T=[],m=[],b=[],d=[],P=[],g=[],y=[],v=[],_=[],S=[],M=[];switch(this.LineInfo.Wairnum){case A.单分裂:this.ToffsetWires2C1.length>=2&&(t.push(this.ToffsetWires2C1[i-2]),t.push(this.ToffsetWires2C1[i-1]),this.ToffsetArcWires1C2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=2&&(d.push(this.ToffsetWires2C2[i-2]),d.push(this.ToffsetWires2C2[i-1]),this.ToffsetArcWires2C2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.双分裂:this.ToffsetWires2C1.length>=4&&(t.push(this.ToffsetWires2C1[i-4]),t.push(this.ToffsetWires2C1[i-2]),this.ToffsetArcWires1C2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2C1[i-3]),l.push(this.ToffsetWires2C1[i-1]),this.ToffsetArcWires1C2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=4&&(d.push(this.ToffsetWires2C2[i-4]),d.push(this.ToffsetWires2C2[i-2]),this.ToffsetArcWires2C2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2C2[i-3]),P.push(this.ToffsetWires2C2[i-1]),this.ToffsetArcWires2C2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.四分裂:this.ToffsetWires2C1.length>=8&&(t.push(this.ToffsetWires2C1[i-8]),t.push(this.ToffsetWires2C1[i-4]),this.ToffsetArcWires1C2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2C1[i-7]),l.push(this.ToffsetWires2C1[i-3]),this.ToffsetArcWires1C2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2C1[i-6]),u.push(this.ToffsetWires2C1[i-2]),this.ToffsetArcWires1C2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2C1[i-5]),C.push(this.ToffsetWires2C1[i-1]),this.ToffsetArcWires1C2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=8&&(d.push(this.ToffsetWires2C2[i-8]),d.push(this.ToffsetWires2C2[i-4]),this.ToffsetArcWires2C2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2C2[i-7]),P.push(this.ToffsetWires2C2[i-3]),this.ToffsetArcWires2C2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2C2[i-6]),g.push(this.ToffsetWires2C2[i-2]),this.ToffsetArcWires2C2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2C2[i-5]),y.push(this.ToffsetWires2C2[i-1]),this.ToffsetArcWires2C2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.六分裂:this.ToffsetWires2C1.length>=12&&(t.push(this.ToffsetWires2C1[i-12]),t.push(this.ToffsetWires2C1[i-6]),this.ToffsetArcWires1C2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2C1[i-11]),l.push(this.ToffsetWires2C1[i-5]),this.ToffsetArcWires1C2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2C1[i-10]),u.push(this.ToffsetWires2C1[i-4]),this.ToffsetArcWires1C2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2C1[i-9]),C.push(this.ToffsetWires2C1[i-3]),this.ToffsetArcWires1C2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires2C1[i-8]),e.push(this.ToffsetWires2C1[i-2]),this.ToffsetArcWires1C2=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2C1[i-7]),T.push(this.ToffsetWires2C1[i-1]),this.ToffsetArcWires1C2=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=12&&(d.push(this.ToffsetWires2C2[i-12]),d.push(this.ToffsetWires2C2[i-6]),this.ToffsetArcWires2C2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2C2[i-11]),P.push(this.ToffsetWires2C2[i-5]),this.ToffsetArcWires2C2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2C2[i-10]),g.push(this.ToffsetWires2C2[i-4]),this.ToffsetArcWires2C2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2C2[i-9]),y.push(this.ToffsetWires2C2[i-3]),this.ToffsetArcWires2C2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2C2[i-8]),v.push(this.ToffsetWires2C2[i-2]),this.ToffsetArcWires2C2=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires2C2[i-7]),_.push(this.ToffsetWires2C2[i-1]),this.ToffsetArcWires2C2=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case A.八分裂:this.ToffsetWires2C1.length>=16&&(t.push(this.ToffsetWires2C1[i-16]),t.push(this.ToffsetWires2C1[i-8]),this.ToffsetArcWires1C2=f(t,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),l.push(this.ToffsetWires2C1[i-15]),l.push(this.ToffsetWires2C1[i-7]),this.ToffsetArcWires1C2=f(l,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2C1[i-14]),u.push(this.ToffsetWires2C1[i-6]),this.ToffsetArcWires1C2=f(u,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2C1[i-13]),C.push(this.ToffsetWires2C1[i-5]),this.ToffsetArcWires1C2=f(C,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),e.push(this.ToffsetWires2C1[i-12]),e.push(this.ToffsetWires2C1[i-4]),this.ToffsetArcWires1C2=f(e,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2C1[i-11]),T.push(this.ToffsetWires2C1[i-3]),this.ToffsetArcWires1C2=f(T,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),m.push(this.ToffsetWires2C1[i-10]),m.push(this.ToffsetWires2C1[i-2]),this.ToffsetArcWires1C2=f(m,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2C1[i-9]),b.push(this.ToffsetWires2C1[i-1]),this.ToffsetArcWires1C2=f(b,15),this.LineentityCollection2.add(h(this.ToffsetArcWires1C2,"2C1跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=16&&(d.push(this.ToffsetWires2C2[i-16]),d.push(this.ToffsetWires2C2[i-8]),this.ToffsetArcWires2C2=f(d,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线1"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2C2[i-15]),P.push(this.ToffsetWires2C2[i-7]),this.ToffsetArcWires2C2=f(P,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线2"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),g.push(this.ToffsetWires2C2[i-14]),g.push(this.ToffsetWires2C2[i-6]),this.ToffsetArcWires2C2=f(g,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线3"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),y.push(this.ToffsetWires2C2[i-13]),y.push(this.ToffsetWires2C2[i-5]),this.ToffsetArcWires2C2=f(y,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线4"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2C2[i-12]),v.push(this.ToffsetWires2C2[i-4]),this.ToffsetArcWires2C2=f(v,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线5"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),_.push(this.ToffsetWires2C2[i-11]),_.push(this.ToffsetWires2C2[i-3]),this.ToffsetArcWires2C2=f(_,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线6"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),S.push(this.ToffsetWires2C2[i-10]),S.push(this.ToffsetWires2C2[i-2]),this.ToffsetArcWires2C2=f(S,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线7"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),M.push(this.ToffsetWires2C2[i-9]),M.push(this.ToffsetWires2C2[i-1]),this.ToffsetArcWires2C2=f(M,15),this.LineentityCollection2.add(h(this.ToffsetArcWires2C2,"2C2跳线8"+(s-1)+"-"+s,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}}else switch(this.LineInfo.Wairnum){case A.单分裂:o=o+1;break;case A.双分裂:o=o+2;break;case A.四分裂:o=o+4;break;case A.六分裂:o=o+6;break;case A.八分裂:o=o+8;break}})}addTreeData(o){this.LineInfo.Trees.push(o)}loadTree(){this.Keym=="OW_JPS_EEngin_001"&&(this.LineInfo.Trees.forEach(o=>{this.offsetTrees.push(n.Cartesian3.fromDegrees(o.lon,o.lat,o.alt))}),this.viewer.dataSources.contains(this.dataSourcetree)||this.viewer.dataSources.add(this.dataSourcetree),this.entityCollectiontree.show=!0,this.isDynamicLoadingEnabled?(this.setupTreeCameraMoveListener(),this.updateVisibleTrees()):this.loadAllTreesAtOnce())}loadAllTreesAtOnce(){this.LineInfo.Trees.length!==this.offsetTrees.length&&console.warn(`树木数据长度 (${this.LineInfo.Trees.length}) 与位置数据长度 (${this.offsetTrees.length}) 不匹配`);const o=Math.min(this.LineInfo.Trees.length,this.offsetTrees.length);for(let i=0;i<o;i++){const r=this.LineInfo.Trees[i],s=this.offsetTrees[i];r&&s?this.loadTreeAtIndex(i,s):console.warn(`跳过无效的树木数据,索引: ${i}`)}}loadTreeAtIndex(o,i){const r=this.LineInfo.Trees[o];if(!r.modelurl||r.modelurl.trim()===""){console.warn(`Tree ${o} has invalid model URL: ${r.modelurl}. Skipping...`);return}let s=1;r.treeScale>0&&r.treeH>0?(s=r.treeH/r.treeScale,s<=0&&(s=1)):r.treeH>0&&(s=r.treeH);const c=this.getCachedModelConfig(r.modelurl,s,0,2e4);this.entityCollectiontree.add(Ws("tree-"+r.id,i,"tree-"+r.id,c.uri,new n.HeadingPitchRoll(0,0,0),c.scale,c.distanceDisplayCondition))}flyToTree(o){if(o<0||o>=this.LineInfo.Trees.length){console.warn(`Invalid tree index: ${o}. Valid range: 0-${this.LineInfo.Trees.length-1}`);return}const i=this.LineInfo.Trees[o],r=n.Cartesian3.fromDegrees(i.lon,i.lat,i.alt+(i.treeH||0));this.viewer.camera.flyTo({destination:r,duration:2,orientation:{heading:n.Math.toRadians(0),pitch:n.Math.toRadians(-60),roll:n.Math.toRadians(0)}})}calcResult(o){const i=js(o,this.arcLine1A1,this.arcLine1B1,this.arcLine1D1);Qs(o,i,this.entityCollectionplotting)}loadTreeListen(){this.treeHandler&&this.removeTreeListen();const o=(i,r)=>{const s=i.scene.pick(r);if(n.defined(s)){let c=s.id;if(c===void 0&&s.primitive&&(c=s.primitive.id),c instanceof n.Entity)return c}};this.ensurePlottingDataSourceAdded(),this.ensureTreeDataSourceAdded(),this.treeHandler=new n.ScreenSpaceEventHandler(this.viewer.canvas),this.treeHandler.setInputAction(i=>{var s,c;const r=o(this.viewer,i.position);if(r&&r.id){const W=String(r.id);if(W.startsWith(hs.TREE_ENTITY_PREFIX)){const L=W.substring(hs.TREE_ENTITY_PREFIX.length),p=(s=this.LineInfo.Trees)==null?void 0:s.find(w=>w&&w.id&&String(w.id)===L);if(p){const w=[p.lon,p.lat,Number(p.alt||0)+Number(p.treeH||0)];this.calcResult(w)}else console.warn(`未找到ID为 ${L} 的树木,可用的树木ID:`,(c=this.LineInfo.Trees)==null?void 0:c.map(w=>w==null?void 0:w.id))}}},n.ScreenSpaceEventType.LEFT_CLICK)}ensurePlottingDataSourceAdded(){this.viewer.dataSources.contains(this.dataSourceplotting)||this.viewer.dataSources.add(this.dataSourceplotting),this.entityCollectionplotting.show=!0}ensureTreeDataSourceAdded(){this.viewer.dataSources.contains(this.dataSourcetree)||this.viewer.dataSources.add(this.dataSourcetree),this.entityCollectiontree.show=!0}removeTreeListen(){this.treeHandler&&(this.treeHandler.destroy(),this.treeHandler=null),this.dataSourceplotting&&(this.entityCollectionplotting.removeAll(),this.entityCollectionplotting.show=!1)}LineChannelTerrainVerification(){this.ensurePlottingDataSourceAdded(),this.LineInfo.Trees.forEach(o=>{if(o){const i=[o.lon,o.lat,Number(o.alt||0)+Number(o.treeH||0)];this.calcResult(i)}})}clearTreeDistanceResults(){this.removeTreeListen()}loadLineModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.add(this.dataSource2),this.entityCollection2.show=!0,this.viewer.dataSources.add(this.LinedataSource2),this.LineentityCollection2.show=!0)}loadtreeModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.contains(this.dataSourcetree)||this.viewer.dataSources.add(this.dataSourcetree),this.entityCollectiontree.show=!0)}RemoveTreeModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollectiontree&&this.entityCollectiontree.removeAll(),this.viewer.dataSources.contains(this.dataSourcetree)&&this.viewer.dataSources.remove(this.dataSourcetree),this.entityCollectiontree.show=!1,this.loadedTreeIndices.clear(),this.isTreeModelRemoved=!0,this.isLineModelRemoved&&this.cleanupDynamicLoadingResources())}reloadTrees(){this.RemoveTreeModel(),this.dataSourcetree=new n.CustomDataSource(this.LineInfo.LineID+"tree"),this.entityCollectiontree=this.dataSourcetree.entities,this.viewer.dataSources.contains(this.dataSourcetree)||this.viewer.dataSources.add(this.dataSourcetree),this.isTreeModelRemoved=!1,this.loadTree()}reloadLines(){this.RemoveLineModel(),this.dataSource2=new n.CustomDataSource(this.LineInfo.LineID+"tower"),this.entityCollection2=this.dataSource2.entities,this.LinedataSource2=new n.CustomDataSource(this.LineInfo.LineID+"wire"),this.LineentityCollection2=this.LinedataSource2.entities,this.viewer.dataSources.contains(this.dataSource2)||this.viewer.dataSources.add(this.dataSource2),this.viewer.dataSources.contains(this.LinedataSource2)||this.viewer.dataSources.add(this.LinedataSource2),this.isLineModelRemoved=!1,this.loadLineModel()}LineSpriteLineinit(){n.Material._materialCache.addMaterial("SpriteLineMaterialType",{fabric:{type:"SpriteLineMaterialType",uniforms:{color:new n.Color(1,1,0,1),speed:2},source:`
2
- uniform vec4 color;
3
- const float pi = 3.1415926;
4
- czm_material czm_getMaterial(czm_materialInput materialInput)
5
- {
6
- czm_material material = czm_getDefaultMaterial(materialInput);
7
- float time = fract( czm_frameNumber * speed / 1000.0);
8
- vec2 st = materialInput.st;
9
- material.diffuse = color.rgb;
10
- material.alpha = 1.0 - fract(st.s * 2.0 + time);
11
- return material;
12
- }
13
- `},translucent:function(){return!0}})}setLineVisible(o){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollection2.show=o,this.LineentityCollection2.show=o)}setTreeVisible(o){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollectiontree.show=o)}RemoveLineModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.remove(this.dataSource2),this.entityCollection2.show=!1,this.viewer.dataSources.remove(this.LinedataSource2),this.LineentityCollection2.show=!1,this.isLineModelRemoved=!0,this.isTreeModelRemoved?this.cleanupDynamicLoadingResources():this.loadedTowerIndices.clear())}cleanupDynamicLoadingResources(){this.cameraMoveHandler&&(this.cameraMoveHandler(),this.cameraMoveHandler=null),this.loadedTowerIndices.clear(),this.loadedTreeIndices.clear(),this.modelCache.clear()}};I(hs,"TREE_ENTITY_PREFIX","tree-");let ps=hs;class fi{constructor(){I(this,"id","");I(this,"name","");I(this,"towerFZinfo","");I(this,"towerDisFile","");I(this,"stressFileContent","");I(this,"streesistrue",0);I(this,"TowerMemberColor","#FFFFFF");I(this,"TowerMembersWidth",2);I(this,"Longitude",0);I(this,"Latitude",0);I(this,"Altitude",0);I(this,"RollX",0);I(this,"RollY",90);I(this,"RollZ",0)}}function ni(a){debugger;const o=a.split(`
14
- `),i=[],r=[],s=/^\s*(\d+)\s+([\d.-]+)\s+([\d.-]+)\s+([\d.-]+)\s+(-?\d+)/,c=/^\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:#|$)/;for(const W of o){const L=W.trim();if(!L)continue;const p=L.match(s);if(p){i.push({id:parseInt(p[1]),x:parseFloat(p[2]),y:parseFloat(p[3]),z:parseFloat(p[4]),flag:parseInt(p[5])});continue}const w=L.match(c);w&&r.push({from:parseInt(w[1]),to:parseInt(w[2]),type:parseInt(w[3])})}return{TowerNodes:i,connections:r}}function ai(a){const o=a.split(`
15
- `),i=[];for(const r of o){if(!r.trim())continue;const s=r.trim().split(/\s+/).filter(L=>L!==""),c=parseInt(s[0]);if(isNaN(c))continue;const W=[];for(let L=1;L<s.length;L+=3){const p=parseFloat(s[L]),w=parseFloat(s[L+1]),t=parseFloat(s[L+2]);if(!isNaN(p)&&!isNaN(w)&&!isNaN(t)){const l=Math.floor((L-1)/3)+1;W.push({timeStep:l,x:p,y:w,z:t})}}i.push({nodeId:c,displacements:W})}return i}function Ss(a){const o={};return a.forEach(i=>{i.displacements.forEach(r=>{o[r.timeStep]||(o[r.timeStep]=[]),o[r.timeStep].push({nodeId:i.nodeId,...r})})}),o}function Wi(a){const o=a.split(`
16
- `),i=[];for(const s of o){if(!s.trim())continue;const c=s.match(/^\s*(\d+-\s*\d+)\s+((?:\d+\.\d+\s*)+)/);if(c){const W=c[1].replace(/\s+/g,""),L=c[2].trim().split(/\s+/).map(Number);i.push({elementId:W,stressRatios:L})}}const r=[];if(i.length>0){const s=i[0].stressRatios.length;for(let c=0;c<s;c++){const W={timeIndex:c,elements:[]};for(const L of i){let p;const w=L.stressRatios[c];w>1?p=R.Color.RED:w>.95&&w<=1?p=R.Color.PINK:w>.85&&w<=.95?p=R.Color.YELLOW:w>.7&&w<=.85?p=R.Color.GREEN:p=R.Color.BLUE,W.elements.push({elementId:L.elementId,stressRatio:w,ylbColor:p})}r.push(W)}}return{byElement:i,byTime:r}}class ks{constructor(o){I(this,"viewer");I(this,"lines",[]);this.viewer=o}addLine(o,i){const r=Es(this.viewer,o,i);return this.lines.push(r),r}removeAll(){this.lines.forEach(o=>this.viewer.entities.remove(o)),this.lines=[]}}var Rs={exports:{}};(function(a,o){(function(i,r){r()})(os,function(){function i(w,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(w.type)?new Blob(["\uFEFF",w],{type:w.type}):w}function r(w,t,l){var u=new XMLHttpRequest;u.open("GET",w),u.responseType="blob",u.onload=function(){p(u.response,t,l)},u.onerror=function(){console.error("could not download file")},u.send()}function s(w){var t=new XMLHttpRequest;t.open("HEAD",w,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function c(w){try{w.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),w.dispatchEvent(t)}}var W=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof os=="object"&&os.global===os?os:void 0,L=W.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=W.saveAs||(typeof window!="object"||window!==W?function(){}:"download"in HTMLAnchorElement.prototype&&!L?function(w,t,l){var u=W.URL||W.webkitURL,C=document.createElement("a");t=t||w.name||"download",C.download=t,C.rel="noopener",typeof w=="string"?(C.href=w,C.origin===location.origin?c(C):s(C.href)?r(w,t,l):c(C,C.target="_blank")):(C.href=u.createObjectURL(w),setTimeout(function(){u.revokeObjectURL(C.href)},4e4),setTimeout(function(){c(C)},0))}:"msSaveOrOpenBlob"in navigator?function(w,t,l){if(t=t||w.name||"download",typeof w!="string")navigator.msSaveOrOpenBlob(i(w,l),t);else if(s(w))r(w,t,l);else{var u=document.createElement("a");u.href=w,u.target="_blank",setTimeout(function(){c(u)})}}:function(w,t,l,u){if(u=u||open("","_blank"),u&&(u.document.title=u.document.body.innerText="downloading..."),typeof w=="string")return r(w,t,l);var C=w.type==="application/octet-stream",e=/constructor/i.test(W.HTMLElement)||W.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||C&&e||L)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var P=m.result;P=T?P:P.replace(/^data:[^;]*;/,"data:attachment/file;"),u?u.location.href=P:location=P,u=null},m.readAsDataURL(w)}else{var b=W.URL||W.webkitURL,d=b.createObjectURL(w);u?u.location=d:location.href=d,u=null,setTimeout(function(){b.revokeObjectURL(d)},4e4)}});W.saveAs=p.saveAs=p,a.exports=p})})(Rs);var Ls=Rs.exports;const Zs=require("shp-write");class li{constructor(o,i,r){I(this,"towerNodes",[]);I(this,"connections",[]);I(this,"towerFZS");this.towerNodes=o,this.connections=i,this.towerFZS=r}async exportTowerToSHP(){try{const o=await this.generatePointFeatures(),i=await this.generateLineFeatures();await this.generateSHPFiles(o,i),console.log("SHP文件导出成功")}catch(o){console.error("导出SHP文件失败:",o)}}async generatePointFeatures(){const o=[],i=new n.HeadingPitchRoll(n.Math.toRadians(this.towerFZS.RollX),this.towerFZS.RollY,this.towerFZS.RollZ),r=n.Cartesian3.fromDegrees(this.towerFZS.Longitude,this.towerFZS.Latitude,this.towerFZS.Altitude);for(const s of this.towerNodes){const c=new n.Cartesian3(s.x,s.y,s.z),W=this.getPositionByHprAndOffset(r,c,i),L=n.Ellipsoid.WGS84.cartesianToCartographic(W),p=n.Math.toDegrees(L.longitude),w=n.Math.toDegrees(L.latitude),t=L.height,l={type:"Feature",geometry:{type:"Point",coordinates:[p,w]},properties:{id:s.id,node_id:s.id,x:s.x,y:s.y,z:s.z,longitude:p,latitude:w,height:t,elevation:t,type:"tower_node"}};o.push(l)}return o}async generateLineFeatures(){const o=[],i=new n.HeadingPitchRoll(n.Math.toRadians(this.towerFZS.RollX),this.towerFZS.RollY,this.towerFZS.RollZ),r=n.Cartesian3.fromDegrees(this.towerFZS.Longitude,this.towerFZS.Latitude,this.towerFZS.Altitude);for(const s of this.connections){const c=this.towerNodes.find(g=>g.id===s.from),W=this.towerNodes.find(g=>g.id===s.to);if(!c||!W)continue;const L=new n.Cartesian3(c.x,c.y,c.z),p=new n.Cartesian3(W.x,W.y,W.z),w=this.getPositionByHprAndOffset(r,L,i),t=this.getPositionByHprAndOffset(r,p,i),l=n.Ellipsoid.WGS84.cartesianToCartographic(w),u=n.Ellipsoid.WGS84.cartesianToCartographic(t),C=n.Math.toDegrees(l.longitude),e=n.Math.toDegrees(l.latitude),T=l.height,m=n.Math.toDegrees(u.longitude),b=n.Math.toDegrees(u.latitude),d=u.height,P={type:"Feature",geometry:{type:"LineString",coordinates:[[C,e],[m,b]]},properties:{id:`${s.from}-${s.to}`,from_node:s.from,to_node:s.to,from_height:T,to_height:d,avg_height:(T+d)/2,length:this.calculateDistance(w,t),type:"tower_member",width:this.towerFZS.TowerMembersWidth,from_longitude:C,from_latitude:e,to_longitude:m,to_latitude:b}};o.push(P)}return o}async generateSHPFiles(o,i){try{if(o.length>0){const r={type:"FeatureCollection",features:o},s=Zs.point(r);this.downloadSHPFiles(s,"tower_nodes")}if(i.length>0){const r={type:"FeatureCollection",features:i},s=Zs.line(r);this.downloadSHPFiles(s,"tower_members")}}catch(r){console.error("生成SHP文件时出错:",r),await this.alternativeExport(o,i)}}downloadSHPFiles(o,i){const r=new Blob([o],{type:"application/zip"});Ls.saveAs(r,`${i}.zip`)}async alternativeExport(o,i){if(console.log("使用备用方案导出为GeoJSON格式"),o.length>0){const r={type:"FeatureCollection",features:o};this.downloadJSON(r,"tower_nodes.geojson")}if(i.length>0){const r={type:"FeatureCollection",features:i};this.downloadJSON(r,"tower_members.geojson")}}downloadJSON(o,i){const r=new Blob([JSON.stringify(o,null,2)],{type:"application/json"});Ls.saveAs(r,i)}calculateDistance(o,i){return n.Cartesian3.distance(o,i)}getPositionByHprAndOffset(o,i,r){const s=n.Transforms.headingPitchRollToFixedFrame(o,r);return n.Matrix4.multiplyByPoint(s,i,new n.Cartesian3)}}class ui{static async exportToCSV(o,i,r){const s=this.exportNodesToCSV(o,r);this.downloadCSV(s,"tower_nodes.csv");const c=this.exportConnectionsToCSV(i,o,r);this.downloadCSV(c,"tower_connections.csv")}static exportNodesToCSV(o,i){let r=`ID,X,Y,Z,Longitude,Latitude,Height
17
- `;const s=new n.HeadingPitchRoll(n.Math.toRadians(i.RollX),i.RollY,i.RollZ),c=n.Cartesian3.fromDegrees(i.Longitude,i.Latitude,i.Altitude);return o.forEach(W=>{const L=new n.Cartesian3(W.x,W.y,W.z),p=this.getPositionByHprAndOffset(c,L,s),w=n.Ellipsoid.WGS84.cartesianToCartographic(p),t=n.Math.toDegrees(w.longitude),l=n.Math.toDegrees(w.latitude),u=w.height;r+=`${W.id},${W.x},${W.y},${W.z},${t},${l},${u}
18
- `}),r}static exportConnectionsToCSV(o,i,r){let s=`FromNode,ToNode,FromX,FromY,FromZ,ToX,ToY,ToZ,Length
19
- `;const c=new n.HeadingPitchRoll(n.Math.toRadians(r.RollX),r.RollY,r.RollZ),W=n.Cartesian3.fromDegrees(r.Longitude,r.Latitude,r.Altitude);return o.forEach(L=>{const p=i.find(T=>T.id===L.from),w=i.find(T=>T.id===L.to);if(!p||!w)return;const t=new n.Cartesian3(p.x,p.y,p.z),l=new n.Cartesian3(w.x,w.y,w.z),u=this.getPositionByHprAndOffset(W,t,c),C=this.getPositionByHprAndOffset(W,l,c),e=n.Cartesian3.distance(u,C);s+=`${L.from},${L.to},${p.x},${p.y},${p.z},${w.x},${w.y},${w.z},${e}
20
- `}),s}static downloadCSV(o,i){const r=new Blob([o],{type:"text/csv;charset=utf-8;"});Ls.saveAs(r,i)}static getPositionByHprAndOffset(o,i,r){const s=n.Transforms.headingPitchRollToFixedFrame(o,r);return n.Matrix4.multiplyByPoint(s,i,new n.Cartesian3)}}class ci{constructor(o,i,r){I(this,"viewer");I(this,"TowerFZS");I(this,"Keym","");I(this,"dataSource2");I(this,"entityCollection2");I(this,"pointEntities",[]);I(this,"TowerLineManager");I(this,"TowerNodes",[]);I(this,"connections",[]);I(this,"displacementData",[]);I(this,"byTimes",[]);I(this,"_animationInterval",null);this.Keym=r,this.viewer=o,this.TowerFZS=i,this.dataSource2=new n.CustomDataSource(this.TowerFZS.id),this.entityCollection2=this.dataSource2.entities,this.TowerLineManager=new ks(this.viewer)}initSHPExporter(){}loadfile(){if(this.Keym!="OW_JPS_EEngin_001")return;const{TowerNodes:o,connections:i}=ni(this.TowerFZS.towerFZinfo);this.TowerNodes=o,this.connections=i,this.displacementData=ai(this.TowerFZS.towerDisFile);const{byTime:r}=Wi(this.TowerFZS.stressFileContent);this.byTimes=r;debugger}loadFZTower(){if(this.Keym!="OW_JPS_EEngin_001")return;let o=new n.HeadingPitchRoll(n.Math.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const i=n.Cartesian3.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(r=>{const s=this.TowerNodes.find(l=>l.id===r.from),c=this.TowerNodes.find(l=>l.id===r.to),W=[],L=new n.Cartesian3(s==null?void 0:s.x,s==null?void 0:s.y,s==null?void 0:s.z);W.push(B(i,L,o));const p=fs(this.viewer,W[0],(s==null?void 0:s.id)+"",{pointColor:n.Color.RED,labelColor:n.Color.GOLD,fontSize:18,pixelOffset:[0,-30]});this.pointEntities.push(p);const w=new n.Cartesian3(c==null?void 0:c.x,c==null?void 0:c.y,c==null?void 0:c.z);W.push(B(i,w,o));const t=fs(this.viewer,W[1],(s==null?void 0:s.id)+"",{pointColor:n.Color.RED,labelColor:n.Color.GOLD,fontSize:18,pixelOffset:[0,-30]});this.pointEntities.push(t),this.TowerLineManager.addLine(W)}),this.initSHPExporter()}async exportToSHP(){await new li(this.TowerNodes,this.connections,this.TowerFZS).exportTowerToSHP()}async exportToCSV(){await ui.exportToCSV(this.TowerNodes,this.connections,this.TowerFZS)}loadFZDISTower(o){if(this.Keym!=="OW_JPS_EEngin_001")return;const r=Ss(this.displacementData)[o],s=this.byTimes.find(L=>L.timeIndex===o);debugger;if(!r){console.warn(`未找到时间步 ${o} 的位移数据`);return}const c=new n.HeadingPitchRoll(n.Math.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ),W=n.Cartesian3.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(L=>{const p=this.TowerNodes.find(y=>y.id===L.from),w=this.TowerNodes.find(y=>y.id===L.to);if(!p||!w){console.warn(`找不到连接 ${L.from}->${L.to} 的节点`);return}debugger;const t=r.find(y=>y.nodeId===L.from),l=r.find(y=>y.nodeId===L.to);if(!t||!l){console.warn(`找不到连接 ${L.from}->${L.to} 的位移数据`);return}const u=new n.Cartesian3(p.x-t.x,p.y-t.y,p.z-t.z),C=new n.Cartesian3(w.x-l.x,w.y-l.y,w.z-l.z),e=B(W,u,c),T=fs(this.viewer,e,L.from+"",{pointColor:n.Color.RED,labelColor:n.Color.GOLD,fontSize:18,pixelOffset:[0,-30]});this.pointEntities.push(T);const m=B(W,C,c),b=fs(this.viewer,m,L.to+"",{pointColor:n.Color.RED,labelColor:n.Color.GOLD,fontSize:18,pixelOffset:[0,-30]});this.pointEntities.push(b);const d=[e,m],P=L.from+"-"+L.to,g=s==null?void 0:s.elements.find(y=>y.elementId===P);debugger;this.TowerLineManager.addLine(d,{color:g==null?void 0:g.ylbColor,width:3,clampToGround:!1,zIndex:0,dashed:!1,dashLength:10})})}loadFZDISTower1(o){if(this.Keym!="OW_JPS_EEngin_001")return;const i=Ss(this.displacementData);let r=new n.HeadingPitchRoll(n.Math.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const s=n.Cartesian3.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(c=>{const W=this.TowerNodes.find(C=>C.id===c.from),L=i[o].find(C=>C.nodeId===c.from),p=this.TowerNodes.find(C=>C.id===c.to),w=i[o].find(C=>C.nodeId===c.to),t=[],l=new n.Cartesian3(W.x-L.x,W.y-L.y,W.z-L.z);t.push(B(s,l,r));const u=new n.Cartesian3(p.x-w.x,p.y-w.y,p.z-w.z);t.push(B(s,u,r));debugger;this.entityCollection2.add(h(t,c.from+""+c.to,this.TowerFZS.TowerMembersWidth,this.TowerFZS.TowerMemberColor))})}loadAllFZDisTower(){if(this.Keym!=="OW_JPS_EEngin_001")return;if(!this.displacementData||this.displacementData.length===0){console.warn("没有可用的位移数据");return}let o=1;const i=this.displacementData.length;this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null);const r=()=>{if(this.viewer.dataSources.contains(this.dataSource2)&&this.viewer.dataSources.remove(this.dataSource2,!0),o>i){o=1;return}this.dataSource2=new n.CustomDataSource("fztower"),this.entityCollection2=this.dataSource2.entities;try{this.loadFZDISTower(o),this.loadFZModel(),console.log(`正在显示位移帧: ${o}/${i}`),o++}catch(s){console.error("加载位移帧时出错:",s),this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}};r(),this._animationInterval=setInterval(r,300)}stopDisplacementAnimation(){this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}toggleAnimation(o){o?this.stopDisplacementAnimation():this.loadAllFZDisTower()}loadFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.add(this.dataSource2),this.viewer.entities.show)}setFZModelVisible(o){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollection2.show=o)}RemoveFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.TowerLineManager.removeAll(),this.pointEntities.forEach(o=>this.viewer.entities.remove(o)),this.pointEntities.length=0)}}k.GUAPoint=hi,k.InsulatorInfo=ri,k.InsulatorType=D,k.LineManager=ks,k.LineNum=rs,k.LineType=Ms,k.OWEEgineFZManager=ci,k.OWEEgineManager=ps,k.PhaseSType=z,k.TowerFZInfo=fi,k.TowerInfo=oi,k.TowerLineInfo=ti,k.TowerType=q,k.TreeType=ei,k.WairnumType=A,k.drawModel=Ws,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
1
+ (function(mt,St){typeof exports=="object"&&typeof module<"u"?St(exports,require("cesium")):typeof define=="function"&&define.amd?define(["exports","cesium"],St):(mt=typeof globalThis<"u"?globalThis:mt||self,St(mt.OW_EEngine_Power={},mt.Cesium))})(this,function(mt,St){"use strict";var wu=Object.defineProperty;var Eu=(mt,St,zr)=>St in mt?wu(mt,St,{enumerable:!0,configurable:!0,writable:!0,value:zr}):mt[St]=zr;var I=(mt,St,zr)=>Eu(mt,typeof St!="symbol"?St+"":St,zr);function zr(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const g=zr(St);function Ya(s,t,e={}){const{color:i=St.Color.WHITE,width:r=3,clampToGround:n=!1,zIndex:o=0,dashed:f=!1,dashLength:h=10}=e,l=f?new g.PolylineDashMaterialProperty({color:i,dashLength:h}):new g.ColorMaterialProperty(i);return s.entities.add({polyline:{positions:t,width:r,material:l,clampToGround:n,zIndex:o}})}function y(s,t,e=10,i="#ba1919",r,n=!1){const o={show:!0,positions:s,clampToGround:n,width:e,material:g.Color.fromCssColorString(i),arcType:g.ArcType.NONE,shadows:g.ShadowMode.DISABLED,granularity:n?void 0:0};let f;return f=[0,1e5],o.distanceDisplayCondition=new g.DistanceDisplayCondition(f[0],f[1]),{name:t,label:{text:t,font:"18px sans-serif",distanceDisplayCondition:new g.DistanceDisplayCondition(f[0],Math.min(f[1],5e3))},polyline:o}}function Pn(s,t,e,i,r=new g.HeadingPitchRoll(0,0,0),n=1,o){const f={show:!0,uri:i,scale:n,transition:{distanceDisplayCondition:!0,scale:!0}};return o&&(Array.isArray(o)?f.distanceDisplayCondition=new g.DistanceDisplayCondition(o[0],o[1]):f.distanceDisplayCondition=o),{id:s,name:e,position:t,orientation:g.Transforms.headingPitchRollQuaternion(t,r),model:f}}function zs(s,t,e,i={}){const{pointColor:r=St.Color.YELLOW,pointSize:n=12,labelColor:o=St.Color.WHITE,fontSize:f=16,pixelOffset:h=[0,-20],heightReference:l=St.HeightReference.NONE}=i;return s.entities.add({position:t,point:{color:r,pixelSize:n,heightReference:l,distanceDisplayCondition:new g.DistanceDisplayCondition(0,100)},label:{text:e,font:`${f}px sans-serif`,fillColor:o,pixelOffset:new g.Cartesian2(...h),style:St.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,outlineColor:St.Color.BLACK,heightReference:l,distanceDisplayCondition:new g.DistanceDisplayCondition(0,100)}})}var ye=63710088e-1,go={centimeters:ye*100,centimetres:ye*100,degrees:ye/111325,feet:ye*3.28084,inches:ye*39.37,kilometers:ye/1e3,kilometres:ye/1e3,meters:ye,metres:ye,miles:ye/1609.344,millimeters:ye*1e3,millimetres:ye*1e3,nauticalmiles:ye/1852,radians:1,yards:ye*1.0936};function ar(s,t,e){e===void 0&&(e={});var i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=t||{},i.geometry=s,i}function be(s,t,e){if(e===void 0&&(e={}),!s)throw new Error("coordinates is required");if(!Array.isArray(s))throw new Error("coordinates must be an Array");if(s.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!mo(s[0])||!mo(s[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:s};return ar(i,t,e)}function ue(s,t,e){if(e===void 0&&(e={}),s.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:s};return ar(i,t,e)}function Us(s,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=s,e}function za(s,t,e){e===void 0&&(e={});var i={type:"MultiLineString",coordinates:s};return ar(i,t,e)}function Sn(s,t){t===void 0&&(t="kilometers");var e=go[t];if(!e)throw new Error(t+" units is invalid");return s*e}function qs(s,t){t===void 0&&(t="kilometers");var e=go[t];if(!e)throw new Error(t+" units is invalid");return s/e}function Ua(s,t){return Zs(qs(s,t))}function Zs(s){var t=s%(2*Math.PI);return t*180/Math.PI}function vi(s){var t=s%360;return t*Math.PI/180}function yo(s,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(s>=0))throw new Error("length must be a positive number");return Sn(qs(s,t),e)}function mo(s){return!isNaN(s)&&s!==null&&!Array.isArray(s)}function vo(s){return!!s&&s.constructor===Object}function Nn(s,t,e){if(s!==null)for(var i,r,n,o,f,h,l,a=0,c=0,p,d=s.type,u=d==="FeatureCollection",v=d==="Feature",C=u?s.features.length:1,W=0;W<C;W++){l=u?s.features[W].geometry:v?s.geometry:s,p=l?l.type==="GeometryCollection":!1,f=p?l.geometries.length:1;for(var _=0;_<f;_++){var T=0,A=0;if(o=p?l.geometries[_]:l,o!==null){h=o.coordinates;var P=o.type;switch(a=0,P){case null:break;case"Point":if(t(h,c,W,T,A)===!1)return!1;c++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<h.length;i++){if(t(h[i],c,W,T,A)===!1)return!1;c++,P==="MultiPoint"&&T++}P==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<h.length;i++){for(r=0;r<h[i].length-a;r++){if(t(h[i][r],c,W,T,A)===!1)return!1;c++}P==="MultiLineString"&&T++,P==="Polygon"&&A++}P==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<h.length;i++){for(A=0,r=0;r<h[i].length;r++){for(n=0;n<h[i][r].length-a;n++){if(t(h[i][r][n],c,W,T,A)===!1)return!1;c++}A++}T++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(Nn(o.geometries[i],t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function bn(s,t){if(s.type==="Feature")t(s,0);else if(s.type==="FeatureCollection")for(var e=0;e<s.features.length&&t(s.features[e],e)!==!1;e++);}function Dn(s,t){var e,i,r,n,o,f,h,l,a,c,p=0,d=s.type==="FeatureCollection",u=s.type==="Feature",v=d?s.features.length:1;for(e=0;e<v;e++){for(f=d?s.features[e].geometry:u?s.geometry:s,l=d?s.features[e].properties:u?s.properties:{},a=d?s.features[e].bbox:u?s.bbox:void 0,c=d?s.features[e].id:u?s.id:void 0,h=f?f.type==="GeometryCollection":!1,o=h?f.geometries.length:1,r=0;r<o;r++){if(n=h?f.geometries[r]:f,n===null){if(t(null,p,l,a,c)===!1)return!1;continue}switch(n.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(n,p,l,a,c)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<n.geometries.length;i++)if(t(n.geometries[i],p,l,a,c)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}p++}}function _o(s,t){Dn(s,function(e,i,r,n,o){var f=e===null?null:e.type;switch(f){case null:case"Point":case"LineString":case"Polygon":return t(ar(e,r,{bbox:n,id:o}),i,0)===!1?!1:void 0}var h;switch(f){case"MultiPoint":h="Point";break;case"MultiLineString":h="LineString";break;case"MultiPolygon":h="Polygon";break}for(var l=0;l<e.coordinates.length;l++){var a=e.coordinates[l],c={type:h,coordinates:a};if(t(ar(c,r),i,l)===!1)return!1}})}function qa(s,t){_o(s,function(e,i,r){var n=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var f,h=0,l=0,a=0;if(Nn(e,function(c,p,d,u,v){if(f===void 0||i>h||u>l||v>a){f=c,h=i,l=u,a=v,n=0;return}var C=ue([f,c],e.properties);if(t(C,i,r,v,n)===!1)return!1;n++,f=c})===!1)return!1}}})}function Rn(s){var t=[1/0,1/0,-1/0,-1/0];return Nn(s,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}Rn.default=Rn;function Lr(s){if(!s)throw new Error("coord is required");if(!Array.isArray(s)){if(s.type==="Feature"&&s.geometry!==null&&s.geometry.type==="Point")return s.geometry.coordinates;if(s.type==="Point")return s.coordinates}if(Array.isArray(s)&&s.length>=2&&!Array.isArray(s[0])&&!Array.isArray(s[1]))return s;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Za(s){if(Array.isArray(s))return s;if(s.type==="Feature"){if(s.geometry!==null)return s.geometry.coordinates}else if(s.coordinates)return s.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Co(s,t,e){if(!s)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!s||s.type!=="Feature"||!s.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!s.geometry||s.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+s.geometry.type)}function Ha(s,t){return s.type==="FeatureCollection"?"FeatureCollection":s.type==="GeometryCollection"?"GeometryCollection":s.type==="Feature"&&s.geometry!==null?s.geometry.type:s.type}var vs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zi(s,t,e){e===void 0&&(e={});var i=Lr(s),r=Lr(t),n=vi(r[1]-i[1]),o=vi(r[0]-i[0]),f=vi(i[1]),h=vi(r[1]),l=Math.pow(Math.sin(n/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(f)*Math.cos(h);return Sn(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),e.units)}function Ka(s){if(!s)throw new Error("geojson is required");switch(s.type){case"Feature":return Wo(s);case"FeatureCollection":return ja(s);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Bn(s);default:throw new Error("unknown GeoJSON type")}}function Wo(s){var t={type:"Feature"};return Object.keys(s).forEach(function(e){switch(e){case"type":case"properties":case"geometry":return;default:t[e]=s[e]}}),t.properties=To(s.properties),t.geometry=Bn(s.geometry),t}function To(s){var t={};return s&&Object.keys(s).forEach(function(e){var i=s[e];typeof i=="object"?i===null?t[e]=null:Array.isArray(i)?t[e]=i.map(function(r){return r}):t[e]=To(i):t[e]=i}),t}function ja(s){var t={type:"FeatureCollection"};return Object.keys(s).forEach(function(e){switch(e){case"type":case"features":return;default:t[e]=s[e]}}),t.features=s.features.map(function(e){return Wo(e)}),t}function Bn(s){var t={type:s.type};return s.bbox&&(t.bbox=s.bbox),s.type==="GeometryCollection"?(t.geometries=s.geometries.map(function(e){return Bn(e)}),t):(t.coordinates=Io(s.coordinates),t)}function Io(s){var t=s;return typeof t[0]!="object"?t.slice():t.map(function(e){return Io(e)})}function Mn(s,t,e,i){i===void 0&&(i={});var r=Lr(s),n=vi(r[0]),o=vi(r[1]),f=vi(e),h=qs(t,i.units),l=Math.asin(Math.sin(o)*Math.cos(h)+Math.cos(o)*Math.sin(h)*Math.cos(f)),a=n+Math.atan2(Math.sin(f)*Math.sin(h)*Math.cos(o),Math.cos(h)-Math.sin(o)*Math.sin(l)),c=Zs(a),p=Zs(l);return be([c,p],i.properties)}function Hs(s,t,e){if(e===void 0&&(e={}),e.final===!0)return Ja(s,t);var i=Lr(s),r=Lr(t),n=vi(i[0]),o=vi(r[0]),f=vi(i[1]),h=vi(r[1]),l=Math.sin(o-n)*Math.cos(h),a=Math.cos(f)*Math.sin(h)-Math.sin(f)*Math.cos(h)*Math.cos(o-n);return Zs(Math.atan2(l,a))}function Ja(s,t){var e=Hs(t,s);return e=(e+180)%360,e}function Qa(s,t){var e=Zi(s,t),i=Hs(s,t),r=Mn(s,e/2,i);return r}function $a(s,t){t===void 0&&(t={});var e=Rn(s),i=(e[0]+e[2])/2,r=(e[1]+e[3])/2;return be([i,r],t.properties,t)}function tf(s,t){if(!s)throw new Error("targetPoint is required");if(!t)throw new Error("points is required");var e,i=1/0,r=0;return bn(t,function(n,o){var f=Zi(s,n);f<i&&(r=o,i=f)}),e=Ka(t.features[r]),e.properties.featureIndex=r,e.properties.distanceToPoint=i,e}function ef(s,t,e){e===void 0&&(e={});var i=Lr(s),r=Lr(t);r[0]+=r[0]-i[0]>180?-360:i[0]-r[0]>180?360:0;var n=rf(i,r),o=yo(n,"meters",e.units);return o}function rf(s,t,e){e=e===void 0?ye:Number(e);var i=e,r=s[1]*Math.PI/180,n=t[1]*Math.PI/180,o=n-r,f=Math.abs(t[0]-s[0])*Math.PI/180;f>Math.PI&&(f-=2*Math.PI);var h=Math.log(Math.tan(n/2+Math.PI/4)/Math.tan(r/2+Math.PI/4)),l=Math.abs(h)>1e-11?o/h:Math.cos(r),a=Math.sqrt(o*o+l*l*f*f),c=a*i;return c}function Ar(s,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!s)throw new Error("pt is required");if(Array.isArray(s)?s=be(s):s.type==="Point"?s=ar(s):Co(s,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=ue(t):t.type==="LineString"?t=ar(t):Co(t,"LineString","line");var i=1/0,r=s.geometry.coordinates;return qa(t,function(n){var o=n.geometry.coordinates[0],f=n.geometry.coordinates[1],h=sf(r,o,f,e);h<i&&(i=h)}),yo(i,"degrees",e.units)}function sf(s,t,e,i){var r=[e[0]-t[0],e[1]-t[1]],n=[s[0]-t[0],s[1]-t[1]],o=Lo(n,r);if(o<=0)return On(s,t,{method:i.method,units:"degrees"});var f=Lo(r,r);if(f<=o)return On(s,e,{method:i.method,units:"degrees"});var h=o/f,l=[t[0]+h*r[0],t[1]+h*r[1]];return On(s,l,{method:i.method,units:"degrees"})}function Lo(s,t){return s[0]*t[0]+s[1]*t[1]}function On(s,t,e){return e.method==="planar"?ef(s,t,e):Zi(s,t,e)}function Ao(s,t,e,i){if(i=i||{},!vo(i))throw new Error("options is invalid");var r,n=[];if(s.type==="Feature")r=s.geometry.coordinates;else if(s.type==="LineString")r=s.coordinates;else throw new Error("input must be a LineString Feature or Geometry");for(var o=r.length,f=0,h,l,a,c=0;c<r.length&&!(t>=f&&c===r.length-1);c++){if(f>t&&n.length===0){if(h=t-f,!h)return n.push(r[c]),ue(n);l=Hs(r[c],r[c-1])-180,a=Mn(r[c],h,l,i),n.push(a.geometry.coordinates)}if(f>=e)return h=e-f,h?(l=Hs(r[c],r[c-1])-180,a=Mn(r[c],h,l,i),n.push(a.geometry.coordinates),ue(n)):(n.push(r[c]),ue(n));if(f>=t&&n.push(r[c]),c===r.length-1)return ue(n);f+=Zi(r[c],r[c+1],i)}if(f<t&&r.length===o)throw new Error("Start position is beyond line");var p=r[r.length-1];return ue([p,p])}function Ks(s){var t=s[0],e=s[1];return[e[0]-t[0],e[1]-t[1]]}function Fn(s,t){return s[0]*t[1]-t[0]*s[1]}function nf(s,t){return[s[0]+t[0],s[1]+t[1]]}function of(s,t){return[s[0]-t[0],s[1]-t[1]]}function af(s,t){return[s*t[0],s*t[1]]}function ff(s,t){var e=s[0],i=Ks(s),r=t[0],n=Ks(t),o=Fn(i,n),f=of(r,e),h=Fn(f,n),l=h/o,a=nf(e,af(l,i));return a}function uf(s,t){var e=Ks(s),i=Ks(t);return Fn(e,i)===0}function hf(s,t){return uf(s,t)?!1:ff(s,t)}function lf(s,t,e){if(e=e||{},!vo(e))throw new Error("options is invalid");var i=e.units;if(!s)throw new Error("geojson is required");if(t==null||isNaN(t))throw new Error("distance is required");var r=Ha(s),n=s.properties;switch(r){case"LineString":return wo(s,t,i);case"MultiLineString":var o=[];return _o(s,function(f){o.push(wo(f,t,i).geometry.coordinates)}),za(o,n);default:throw new Error("geometry "+r+" is not supported")}}function wo(s,t,e){var i=[],r=Ua(t,e),n=Za(s),o=[];return n.forEach(function(f,h){if(h!==n.length-1){var l=cf(f,n[h+1],r);if(i.push(l),h>0){var a=i[h-1],c=hf(l,a);c!==!1&&(a[1]=c,l[0]=c),o.push(a[0]),h===n.length-2&&(o.push(l[0]),o.push(l[1]))}n.length===2&&(o.push(l[0]),o.push(l[1]))}}),ue(o,s.properties)}function cf(s,t,e){var i=Math.sqrt((s[0]-t[0])*(s[0]-t[0])+(s[1]-t[1])*(s[1]-t[1])),r=s[0]+e*(t[1]-s[1])/i,n=t[0]+e*(t[1]-s[1])/i,o=s[1]+e*(s[0]-t[0])/i,f=t[1]+e*(s[0]-t[0])/i;return[[r,o],[n,f]]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),i=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(i+r,0):Math.min(r,i);var n=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:i;for(n=n<0?Math.max(i+arguments[2],0):Math.min(n,i);r<n;)e[r]=t,++r;return e},writable:!0}),Number.isFinite=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},Number.isInteger=Number.isInteger||function(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(s){return s!==s},Math.trunc=Math.trunc||function(s){return s<0?Math.ceil(s):Math.floor(s)};var wr=function(){};wr.prototype.interfaces_=function(){return[]},wr.prototype.getClass=function(){return wr},wr.prototype.equalsWithTolerance=function(t,e,i){return Math.abs(t-e)<=i};var vt=function(s){function t(e){s.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new s().stack}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t}(Error),Z=function(){},Eo={MAX_VALUE:{configurable:!0}};Z.isNaN=function(t){return Number.isNaN(t)},Z.doubleToLongBits=function(t){return t},Z.longBitsToDouble=function(t){return t},Z.isInfinite=function(t){return!Number.isFinite(t)},Eo.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(Z,Eo);var De=function(){},js=function(){},Ur=function(){};function Re(){}var L=function s(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=s.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=s.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Er={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};L.prototype.setOrdinate=function(t,e){switch(t){case L.X:this.x=e;break;case L.Y:this.y=e;break;case L.Z:this.z=e;break;default:throw new vt("Invalid ordinate index: "+t)}},L.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];return!(!wr.equalsWithTolerance(this.x,e.x,i)||!wr.equalsWithTolerance(this.y,e.y,i))}},L.prototype.getOrdinate=function(t){switch(t){case L.X:return this.x;case L.Y:return this.y;case L.Z:return this.z}throw new vt("Invalid ordinate index: "+t)},L.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||Z.isNaN(this.z))&&Z.isNaN(t.z)},L.prototype.equals=function(t){return t instanceof L?this.equals2D(t):!1},L.prototype.equalInZ=function(t,e){return wr.equalsWithTolerance(this.z,t.z,e)},L.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},L.prototype.clone=function(){},L.prototype.copy=function(){return new L(this)},L.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},L.prototype.distance3D=function(t){var e=this.x-t.x,i=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+i*i+r*r)},L.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},L.prototype.hashCode=function(){var t=17;return t=37*t+L.hashCode(this.x),t=37*t+L.hashCode(this.y),t},L.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},L.prototype.interfaces_=function(){return[De,js,Re]},L.prototype.getClass=function(){return L},L.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=Z.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},Er.DimensionalComparator.get=function(){return Hi},Er.serialVersionUID.get=function(){return 6683108902428367e3},Er.NULL_ORDINATE.get=function(){return Z.NaN},Er.X.get=function(){return 0},Er.Y.get=function(){return 1},Er.Z.get=function(){return 2},Object.defineProperties(L,Er);var Hi=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new vt("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};Hi.prototype.compare=function(t,e){var i=t,r=e,n=Hi.compare(i.x,r.x);if(n!==0)return n;var o=Hi.compare(i.y,r.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var f=Hi.compare(i.z,r.z);return f},Hi.prototype.interfaces_=function(){return[Ur]},Hi.prototype.getClass=function(){return Hi},Hi.compare=function(t,e){return t<e?-1:t>e?1:Z.isNaN(t)?Z.isNaN(e)?0:-1:Z.isNaN(e)?1:0};var qr=function(){};qr.prototype.create=function(){},qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr};var E=function(){},_s={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};E.prototype.interfaces_=function(){return[]},E.prototype.getClass=function(){return E},E.toLocationSymbol=function(t){switch(t){case E.EXTERIOR:return"e";case E.BOUNDARY:return"b";case E.INTERIOR:return"i";case E.NONE:return"-"}throw new vt("Unknown location value: "+t)},_s.INTERIOR.get=function(){return 0},_s.BOUNDARY.get=function(){return 1},_s.EXTERIOR.get=function(){return 2},_s.NONE.get=function(){return-1},Object.defineProperties(E,_s);var U=function(s,t){return s.interfaces_&&s.interfaces_().indexOf(t)>-1},Ie=function(){},Po={LOG_10:{configurable:!0}};Ie.prototype.interfaces_=function(){return[]},Ie.prototype.getClass=function(){return Ie},Ie.log10=function(t){var e=Math.log(t);return Z.isInfinite(e)||Z.isNaN(e)?e:e/Ie.LOG_10},Ie.min=function(t,e,i,r){var n=t;return e<n&&(n=e),i<n&&(n=i),r<n&&(n=r),n},Ie.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],i=arguments[2];return t<e?e:t>i?i:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],n=arguments[1],o=arguments[2];return r<n?n:r>o?o:r}},Ie.wrap=function(t,e){return t<0?e- -t%e:t%e},Ie.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],i=arguments[2],r=t;return e>r&&(r=e),i>r&&(r=i),r}else if(arguments.length===4){var n=arguments[0],o=arguments[1],f=arguments[2],h=arguments[3],l=n;return o>l&&(l=o),f>l&&(l=f),h>l&&(l=h),l}},Ie.average=function(t,e){return(t+e)/2},Po.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Ie,Po);var $e=function(t){this.str=t};$e.prototype.append=function(t){this.str+=t},$e.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},$e.prototype.toString=function(t){return this.str};var ti=function(t){this.value=t};ti.prototype.intValue=function(){return this.value},ti.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},ti.isNaN=function(t){return Number.isNaN(t)};var Cs=function(){};Cs.isWhitespace=function(t){return t<=32&&t>=0||t===127},Cs.toUpperCase=function(t){return t.toUpperCase()};var S=function s(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof s){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var i=arguments[0];s.call(this,s.parse(i))}}else if(arguments.length===2){var r=arguments[0],n=arguments[1];this.init(r,n)}},Ve={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};S.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},S.prototype.extractSignificantDigits=function(t,e){var i=this.abs(),r=S.magnitude(i._hi),n=S.TEN.pow(r);i=i.divide(n),i.gt(S.TEN)?(i=i.divide(S.TEN),r+=1):i.lt(S.ONE)&&(i=i.multiply(S.TEN),r-=1);for(var o=r+1,f=new $e,h=S.MAX_PRINT_DIGITS-1,l=0;l<=h;l++){t&&l===o&&f.append(".");var a=Math.trunc(i._hi);if(a<0)break;var c=!1,p=0;a>9?(c=!0,p="9"):p="0"+a,f.append(p),i=i.subtract(S.valueOf(a)).multiply(S.TEN),c&&i.selfAdd(S.TEN);var d=!0,u=S.magnitude(i._hi);if(u<0&&Math.abs(u)>=h-l&&(d=!1),!d)break}return e[0]=r,f.toString()},S.prototype.sqr=function(){return this.multiply(this)},S.prototype.doubleValue=function(){return this._hi+this._lo},S.prototype.subtract=function(){if(arguments[0]instanceof S){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},S.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},S.prototype.isZero=function(){return this._hi===0&&this._lo===0},S.prototype.selfSubtract=function(){if(arguments[0]instanceof S){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},S.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},S.prototype.min=function(t){return this.le(t)?this:t},S.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof S){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var i=arguments[0],r=arguments[1],n=null,o=null,f=null,h=null,l=null,a=null,c=null,p=null;return l=this._hi/i,a=S.SPLIT*l,n=a-l,p=S.SPLIT*i,n=a-n,o=l-n,f=p-i,c=l*i,f=p-f,h=i-f,p=n*f-c+n*h+o*f+o*h,a=(this._hi-c-p+this._lo-l*r)/i,p=l+a,this._hi=p,this._lo=l-p+a,this}},S.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},S.prototype.divide=function(){if(arguments[0]instanceof S){var t=arguments[0],e=null,i=null,r=null,n=null,o=null,f=null,h=null,l=null;o=this._hi/t._hi,f=S.SPLIT*o,e=f-o,l=S.SPLIT*t._hi,e=f-e,i=o-e,r=l-t._hi,h=o*t._hi,r=l-r,n=t._hi-r,l=e*r-h+e*n+i*r+i*n,f=(this._hi-h-l+this._lo-o*t._lo)/t._hi,l=o+f;var a=l,c=o-l+f;return new S(a,c)}else if(typeof arguments[0]=="number"){var p=arguments[0];return Z.isNaN(p)?S.createNaN():S.copy(this).selfDivide(p,0)}},S.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},S.prototype.pow=function(t){if(t===0)return S.valueOf(1);var e=new S(this),i=S.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2===1&&i.selfMultiply(e),r/=2,r>0&&(e=e.sqr());else i=e;return t<0?i.reciprocal():i},S.prototype.ceil=function(){if(this.isNaN())return S.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new S(t,e)},S.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},S.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},S.prototype.setValue=function(){if(arguments[0]instanceof S){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},S.prototype.max=function(t){return this.ge(t)?this:t},S.prototype.sqrt=function(){if(this.isZero())return S.valueOf(0);if(this.isNegative())return S.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,i=S.valueOf(e),r=this.subtract(i.sqr()),n=r._hi*(t*.5);return i.add(n)},S.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof S){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],i=null,r=null,n=null,o=null,f=null,h=null;return n=this._hi+e,f=n-this._hi,o=n-f,o=e-f+(this._hi-o),h=o+this._lo,i=n+h,r=h+(n-i),this._hi=i+r,this._lo=r+(i-this._hi),this}}else if(arguments.length===2){var l=arguments[0],a=arguments[1],c=null,p=null,d=null,u=null,v=null,C=null,W=null,_=null;v=this._hi+l,d=this._lo+a,W=v-this._hi,_=d-this._lo,C=v-W,u=d-_,C=l-W+(this._hi-C),u=a-_+(this._lo-u),W=C+d,c=v+W,p=W+(v-c),W=u+p;var T=c+W,A=W+(c-T);return this._hi=T,this._lo=A,this}},S.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof S){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var i=arguments[0],r=arguments[1],n=null,o=null,f=null,h=null,l=null,a=null;l=S.SPLIT*this._hi,n=l-this._hi,a=S.SPLIT*i,n=l-n,o=this._hi-n,f=a-i,l=this._hi*i,f=a-f,h=i-f,a=n*f-l+n*h+o*f+o*h+(this._hi*r+this._lo*i);var c=l+a;n=l-c;var p=a+n;return this._hi=c,this._lo=p,this}},S.prototype.selfSqr=function(){return this.selfMultiply(this)},S.prototype.floor=function(){if(this.isNaN())return S.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new S(t,e)},S.prototype.negate=function(){return this.isNaN()?this:new S(-this._hi,-this._lo)},S.prototype.clone=function(){},S.prototype.multiply=function(){if(arguments[0]instanceof S){var t=arguments[0];return t.isNaN()?S.createNaN():S.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return Z.isNaN(e)?S.createNaN():S.copy(this).selfMultiply(e,0)}},S.prototype.isNaN=function(){return Z.isNaN(this._hi)},S.prototype.intValue=function(){return Math.trunc(this._hi)},S.prototype.toString=function(){var t=S.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},S.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),i=this.extractSignificantDigits(!0,e),r=e[0]+1,n=i;if(i.charAt(0)===".")n="0"+i;else if(r<0)n="0."+S.stringOfChar("0",-r)+i;else if(i.indexOf(".")===-1){var o=r-i.length,f=S.stringOfChar("0",o);n=i+f+".0"}return this.isNegative()?"-"+n:n},S.prototype.reciprocal=function(){var t=null,e=null,i=null,r=null,n=null,o=null,f=null,h=null;n=1/this._hi,o=S.SPLIT*n,t=o-n,h=S.SPLIT*this._hi,t=o-t,e=n-t,i=h-this._hi,f=n*this._hi,i=h-i,r=this._hi-i,h=t*i-f+t*r+e*i+e*r,o=(1-f-h-n*this._lo)/this._hi;var l=n+o,a=n-l+o;return new S(l,a)},S.prototype.toSciNotation=function(){if(this.isZero())return S.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),i=this.extractSignificantDigits(!1,e),r=S.SCI_NOT_EXPONENT_CHAR+e[0];if(i.charAt(0)==="0")throw new Error("Found leading zero: "+i);var n="";i.length>1&&(n=i.substring(1));var o=i.charAt(0)+"."+n;return this.isNegative()?"-"+o+r:o+r},S.prototype.abs=function(){return this.isNaN()?S.NaN:this.isNegative()?this.negate():new S(this)},S.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},S.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},S.prototype.add=function(){if(arguments[0]instanceof S){var t=arguments[0];return S.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return S.copy(this).selfAdd(e)}},S.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof S){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];this._hi=i,this._lo=r}},S.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},S.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},S.prototype.trunc=function(){return this.isNaN()?S.NaN:this.isPositive()?this.floor():this.ceil()},S.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},S.prototype.interfaces_=function(){return[Re,De,js]},S.prototype.getClass=function(){return S},S.sqr=function(t){return S.valueOf(t).selfMultiply(t)},S.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return S.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new S(e)}},S.sqrt=function(t){return S.valueOf(t).sqrt()},S.parse=function(t){for(var e=0,i=t.length;Cs.isWhitespace(t.charAt(e));)e++;var r=!1;if(e<i){var n=t.charAt(e);(n==="-"||n==="+")&&(e++,n==="-"&&(r=!0))}for(var o=new S,f=0,h=0,l=0;!(e>=i);){var a=t.charAt(e);if(e++,Cs.isDigit(a)){var c=a-"0";o.selfMultiply(S.TEN),o.selfAdd(c),f++;continue}if(a==="."){h=f;continue}if(a==="e"||a==="E"){var p=t.substring(e);try{l=ti.parseInt(p)}catch(W){throw W instanceof Error?new Error("Invalid exponent "+p+" in string "+t):W}finally{}break}throw new Error("Unexpected character '"+a+"' at position "+e+" in string "+t)}var d=o,u=f-h-l;if(u===0)d=o;else if(u>0){var v=S.TEN.pow(u);d=o.divide(v)}else if(u<0){var C=S.TEN.pow(-u);d=o.multiply(C)}return r?d.negate():d},S.createNaN=function(){return new S(Z.NaN,Z.NaN)},S.copy=function(t){return new S(t)},S.magnitude=function(t){var e=Math.abs(t),i=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(i)),n=Math.pow(10,r);return n*10<=e&&(r+=1),r},S.stringOfChar=function(t,e){for(var i=new $e,r=0;r<e;r++)i.append(t);return i.toString()},Ve.PI.get=function(){return new S(3.141592653589793,12246467991473532e-32)},Ve.TWO_PI.get=function(){return new S(6.283185307179586,24492935982947064e-32)},Ve.PI_2.get=function(){return new S(1.5707963267948966,6123233995736766e-32)},Ve.E.get=function(){return new S(2.718281828459045,14456468917292502e-32)},Ve.NaN.get=function(){return new S(Z.NaN,Z.NaN)},Ve.EPS.get=function(){return 123259516440783e-46},Ve.SPLIT.get=function(){return 134217729},Ve.MAX_PRINT_DIGITS.get=function(){return 32},Ve.TEN.get=function(){return S.valueOf(10)},Ve.ONE.get=function(){return S.valueOf(1)},Ve.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},Ve.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(S,Ve);var he=function(){},So={DP_SAFE_EPSILON:{configurable:!0}};he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he},he.orientationIndex=function(t,e,i){var r=he.orientationIndexFilter(t,e,i);if(r<=1)return r;var n=S.valueOf(e.x).selfAdd(-t.x),o=S.valueOf(e.y).selfAdd(-t.y),f=S.valueOf(i.x).selfAdd(-e.x),h=S.valueOf(i.y).selfAdd(-e.y);return n.selfMultiply(h).selfSubtract(o.selfMultiply(f)).signum()},he.signOfDet2x2=function(t,e,i,r){var n=t.multiply(r).selfSubtract(e.multiply(i));return n.signum()},he.intersection=function(t,e,i,r){var n=S.valueOf(r.y).selfSubtract(i.y).selfMultiply(S.valueOf(e.x).selfSubtract(t.x)),o=S.valueOf(r.x).selfSubtract(i.x).selfMultiply(S.valueOf(e.y).selfSubtract(t.y)),f=n.subtract(o),h=S.valueOf(r.x).selfSubtract(i.x).selfMultiply(S.valueOf(t.y).selfSubtract(i.y)),l=S.valueOf(r.y).selfSubtract(i.y).selfMultiply(S.valueOf(t.x).selfSubtract(i.x)),a=h.subtract(l),c=a.selfDivide(f).doubleValue(),p=S.valueOf(t.x).selfAdd(S.valueOf(e.x).selfSubtract(t.x).selfMultiply(c)).doubleValue(),d=S.valueOf(e.x).selfSubtract(t.x).selfMultiply(S.valueOf(t.y).selfSubtract(i.y)),u=S.valueOf(e.y).selfSubtract(t.y).selfMultiply(S.valueOf(t.x).selfSubtract(i.x)),v=d.subtract(u),C=v.selfDivide(f).doubleValue(),W=S.valueOf(i.y).selfAdd(S.valueOf(r.y).selfSubtract(i.y).selfMultiply(C)).doubleValue();return new L(p,W)},he.orientationIndexFilter=function(t,e,i){var r=null,n=(t.x-i.x)*(e.y-i.y),o=(t.y-i.y)*(e.x-i.x),f=n-o;if(n>0){if(o<=0)return he.signum(f);r=n+o}else if(n<0){if(o>=0)return he.signum(f);r=-n-o}else return he.signum(f);var h=he.DP_SAFE_EPSILON*r;return f>=h||-f>=h?he.signum(f):2},he.signum=function(t){return t>0?1:t<0?-1:0},So.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(he,So);var et=function(){},Ws={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Ws.X.get=function(){return 0},Ws.Y.get=function(){return 1},Ws.Z.get=function(){return 2},Ws.M.get=function(){return 3},et.prototype.setOrdinate=function(t,e,i){},et.prototype.size=function(){},et.prototype.getOrdinate=function(t,e){},et.prototype.getCoordinate=function(){},et.prototype.getCoordinateCopy=function(t){},et.prototype.getDimension=function(){},et.prototype.getX=function(t){},et.prototype.clone=function(){},et.prototype.expandEnvelope=function(t){},et.prototype.copy=function(){},et.prototype.getY=function(t){},et.prototype.toCoordinateArray=function(){},et.prototype.interfaces_=function(){return[js]},et.prototype.getClass=function(){return et},Object.defineProperties(et,Ws);var No=function(){},Zr=function(s){function t(){s.call(this,"Projective point not representable on the Cartesian plane.")}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(No),Xt=function(){};Xt.arraycopy=function(t,e,i,r,n){for(var o=0,f=e;f<e+n;f++)i[r+o]=t[f],o++},Xt.getProperty=function(t){return{"line.separator":`
2
+ `}[t]};var Ge=function s(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],i=arguments[1];this.x=e,this.y=i,this.w=1}else if(arguments[0]instanceof s&&arguments[1]instanceof s){var r=arguments[0],n=arguments[1];this.x=r.y*n.w-n.y*r.w,this.y=n.x*r.w-r.x*n.w,this.w=r.x*n.y-n.x*r.y}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var o=arguments[0],f=arguments[1];this.x=o.y-f.y,this.y=f.x-o.x,this.w=o.x*f.y-f.x*o.y}}else if(arguments.length===3){var h=arguments[0],l=arguments[1],a=arguments[2];this.x=h,this.y=l,this.w=a}else if(arguments.length===4){var c=arguments[0],p=arguments[1],d=arguments[2],u=arguments[3],v=c.y-p.y,C=p.x-c.x,W=c.x*p.y-p.x*c.y,_=d.y-u.y,T=u.x-d.x,A=d.x*u.y-u.x*d.y;this.x=C*A-T*W,this.y=_*W-v*A,this.w=v*T-_*C}};Ge.prototype.getY=function(){var t=this.y/this.w;if(Z.isNaN(t)||Z.isInfinite(t))throw new Zr;return t},Ge.prototype.getX=function(){var t=this.x/this.w;if(Z.isNaN(t)||Z.isInfinite(t))throw new Zr;return t},Ge.prototype.getCoordinate=function(){var t=new L;return t.x=this.getX(),t.y=this.getY(),t},Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge},Ge.intersection=function(t,e,i,r){var n=t.y-e.y,o=e.x-t.x,f=t.x*e.y-e.x*t.y,h=i.y-r.y,l=r.x-i.x,a=i.x*r.y-r.x*i.y,c=o*a-l*f,p=h*f-n*a,d=n*l-h*o,u=c/d,v=p/d;if(Z.isNaN(u)||Z.isInfinite(u)||Z.isNaN(v)||Z.isInfinite(v))throw new Zr;return new L(u,v)};var V=function s(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof s){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];this.init(i.x,r.x,i.y,r.y)}else if(arguments.length===4){var n=arguments[0],o=arguments[1],f=arguments[2],h=arguments[3];this.init(n,o,f,h)}},bo={serialVersionUID:{configurable:!0}};V.prototype.getArea=function(){return this.getWidth()*this.getHeight()},V.prototype.equals=function(t){if(!(t instanceof V))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},V.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new V;var e=this._minx>t._minx?this._minx:t._minx,i=this._miny>t._miny?this._miny:t._miny,r=this._maxx<t._maxx?this._maxx:t._maxx,n=this._maxy<t._maxy?this._maxy:t._maxy;return new V(e,r,i,n)},V.prototype.isNull=function(){return this._maxx<this._minx},V.prototype.getMaxX=function(){return this._maxx},V.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof V){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];return this.isNull()?!1:i>=this._minx&&i<=this._maxx&&r>=this._miny&&r<=this._maxy}},V.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof V){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof L){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];return this.isNull()?!1:!(i>this._maxx||i<this._minx||r>this._maxy||r<this._miny)}},V.prototype.getMinY=function(){return this._miny},V.prototype.getMinX=function(){return this._minx},V.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof V){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];this.isNull()?(this._minx=i,this._maxx=i,this._miny=r,this._maxy=r):(i<this._minx&&(this._minx=i),i>this._maxx&&(this._maxx=i),r<this._miny&&(this._miny=r),r>this._maxy&&(this._maxy=r))}},V.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},V.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},V.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},V.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},V.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},V.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},V.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},V.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},V.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=i,this._maxy+=i,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},V.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof V){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof L){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];return this.covers(i,r)}},V.prototype.centre=function(){return this.isNull()?null:new L((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},V.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof V){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];this.init(i.x,r.x,i.y,r.y)}else if(arguments.length===4){var n=arguments[0],o=arguments[1],f=arguments[2],h=arguments[3];n<o?(this._minx=n,this._maxx=o):(this._minx=o,this._maxx=n),f<h?(this._miny=f,this._maxy=h):(this._miny=h,this._maxy=f)}},V.prototype.getMaxY=function(){return this._maxy},V.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var i=0;return this._maxy<t._miny?i=t._miny-this._maxy:this._miny>t._maxy&&(i=this._miny-t._maxy),e===0?i:i===0?e:Math.sqrt(e*e+i*i)},V.prototype.hashCode=function(){var t=17;return t=37*t+L.hashCode(this._minx),t=37*t+L.hashCode(this._maxx),t=37*t+L.hashCode(this._miny),t=37*t+L.hashCode(this._maxy),t},V.prototype.interfaces_=function(){return[De,Re]},V.prototype.getClass=function(){return V},V.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],i=arguments[2];return i.x>=(t.x<e.x?t.x:e.x)&&i.x<=(t.x>e.x?t.x:e.x)&&i.y>=(t.y<e.y?t.y:e.y)&&i.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var r=arguments[0],n=arguments[1],o=arguments[2],f=arguments[3],h=Math.min(o.x,f.x),l=Math.max(o.x,f.x),a=Math.min(r.x,n.x),c=Math.max(r.x,n.x);return!(a>l||c<h||(h=Math.min(o.y,f.y),l=Math.max(o.y,f.y),a=Math.min(r.y,n.y),c=Math.max(r.y,n.y),a>l)||c<h)}},bo.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(V,bo);var ei={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},Js=function(t){this.geometryFactory=t||new $};Js.prototype.read=function(t){var e,i,r;t=t.replace(/[\n\r]/g," ");var n=ei.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(n=ei.emptyTypeStr.exec(t),n[2]=void 0),n&&(i=n[1].toLowerCase(),r=n[2],Hr[i]&&(e=Hr[i].apply(this,[r]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},Js.prototype.write=function(t){return this.extractGeometry(t)},Js.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Ri[e])return null;var i=e.toUpperCase(),r;return t.isEmpty()?r=i+" EMPTY":r=i+"("+Ri[e].apply(this,[t])+")",r};var Ri={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Ri.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,i=[],r=0,n=t._geometries.length;r<n;++r)i.push("("+Ri.point.apply(e,[t._geometries[r]])+")");return i.join(",")},linestring:function(t){for(var e=this,i=[],r=0,n=t._points._coordinates.length;r<n;++r)i.push(Ri.coordinate.apply(e,[t._points._coordinates[r]]));return i.join(",")},linearring:function(t){for(var e=this,i=[],r=0,n=t._points._coordinates.length;r<n;++r)i.push(Ri.coordinate.apply(e,[t._points._coordinates[r]]));return i.join(",")},multilinestring:function(t){for(var e=this,i=[],r=0,n=t._geometries.length;r<n;++r)i.push("("+Ri.linestring.apply(e,[t._geometries[r]])+")");return i.join(",")},polygon:function(t){var e=this,i=[];i.push("("+Ri.linestring.apply(this,[t._shell])+")");for(var r=0,n=t._holes.length;r<n;++r)i.push("("+Ri.linestring.apply(e,[t._holes[r]])+")");return i.join(",")},multipolygon:function(t){for(var e=this,i=[],r=0,n=t._geometries.length;r<n;++r)i.push("("+Ri.polygon.apply(e,[t._geometries[r]])+")");return i.join(",")},geometrycollection:function(t){for(var e=this,i=[],r=0,n=t._geometries.length;r<n;++r)i.push(e.extractGeometry(t._geometries[r]));return i.join(",")}},Hr={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(ei.spaces);return this.geometryFactory.createPoint(new L(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var i,r=t.trim().split(","),n=[],o=0,f=r.length;o<f;++o)i=r[o].replace(ei.trimParens,"$1"),n.push(Hr.point.apply(e,[i]));return this.geometryFactory.createMultiPoint(n)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),i=[],r,n=0,o=e.length;n<o;++n)r=e[n].trim().split(ei.spaces),i.push(new L(Number.parseFloat(r[0]),Number.parseFloat(r[1])));return this.geometryFactory.createLineString(i)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),i=[],r,n=0,o=e.length;n<o;++n)r=e[n].trim().split(ei.spaces),i.push(new L(Number.parseFloat(r[0]),Number.parseFloat(r[1])));return this.geometryFactory.createLinearRing(i)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var i,r=t.trim().split(ei.parenComma),n=[],o=0,f=r.length;o<f;++o)i=r[o].replace(ei.trimParens,"$1"),n.push(Hr.linestring.apply(e,[i]));return this.geometryFactory.createMultiLineString(n)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var i,r,n,o=t.trim().split(ei.parenComma),f,h=[],l=0,a=o.length;l<a;++l)i=o[l].replace(ei.trimParens,"$1"),r=Hr.linestring.apply(e,[i]),n=e.geometryFactory.createLinearRing(r._points),l===0?f=n:h.push(n);return this.geometryFactory.createPolygon(f,h)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var i,r=t.trim().split(ei.doubleParenComma),n=[],o=0,f=r.length;o<f;++o)i=r[o].replace(ei.trimParens,"$1"),n.push(Hr.polygon.apply(e,[i]));return this.geometryFactory.createMultiPolygon(n)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var i=t.trim().split("|"),r=[],n=0,o=i.length;n<o;++n)r.push(e.read(i[n]));return this.geometryFactory.createGeometryCollection(r)}},Xe=function(t){this.parser=new Js(t)};Xe.prototype.write=function(t){return this.parser.write(t)},Xe.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Bi=function(s){function t(e){s.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new s().stack}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t}(Error),Qs=function(s){function t(){if(s.call(this),arguments.length===0)s.call(this);else if(arguments.length===1){var e=arguments[0];s.call(this,e)}}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Bi),j=function(){};j.prototype.interfaces_=function(){return[]},j.prototype.getClass=function(){return j},j.shouldNeverReachHere=function(){if(arguments.length===0)j.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new Qs("Should never reach here"+(t!==null?": "+t:""))}},j.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],j.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new Qs:new Qs(e)},j.equals=function(){var t,e,i;if(arguments.length===2)t=arguments[0],e=arguments[1],j.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],i=arguments[2],!e.equals(t)))throw new Qs("Expected "+t+" but encountered "+e+(i!==null?": "+i:""))};var _t=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new L,this._intPt[1]=new L,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Pr={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};_t.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},_t.prototype.getTopologySummary=function(){var t=new $e;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},_t.prototype.computeIntersection=function(t,e,i,r){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=i,this._inputLines[1][1]=r,this._result=this.computeIntersect(t,e,i,r)},_t.prototype.getIntersectionNum=function(){return this._result},_t.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),i=this.getEdgeDistance(t,1);e>i?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},_t.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},_t.prototype.setPrecisionModel=function(t){this._precisionModel=t},_t.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],i=0;i<this._result;i++)if(!(t._intPt[i].equals2D(t._inputLines[e][0])||t._intPt[i].equals2D(t._inputLines[e][1])))return!0;return!1}},_t.prototype.getIntersection=function(t){return this._intPt[t]},_t.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},_t.prototype.hasIntersection=function(){return this._result!==_t.NO_INTERSECTION},_t.prototype.getEdgeDistance=function(t,e){var i=_t.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return i},_t.prototype.isCollinear=function(){return this._result===_t.COLLINEAR_INTERSECTION},_t.prototype.toString=function(){return Xe.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Xe.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},_t.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},_t.prototype.isIntersection=function(t){for(var e=this,i=0;i<this._result;i++)if(e._intPt[i].equals2D(t))return!0;return!1},_t.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},_t.prototype.interfaces_=function(){return[]},_t.prototype.getClass=function(){return _t},_t.computeEdgeDistance=function(t,e,i){var r=Math.abs(i.x-e.x),n=Math.abs(i.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(i))r>n?o=r:o=n;else{var f=Math.abs(t.x-e.x),h=Math.abs(t.y-e.y);r>n?o=f:o=h,o===0&&!t.equals(e)&&(o=Math.max(f,h))}return j.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},_t.nonRobustComputeEdgeDistance=function(t,e,i){var r=t.x-e.x,n=t.y-e.y,o=Math.sqrt(r*r+n*n);return j.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},Pr.DONT_INTERSECT.get=function(){return 0},Pr.DO_INTERSECT.get=function(){return 1},Pr.COLLINEAR.get=function(){return 2},Pr.NO_INTERSECTION.get=function(){return 0},Pr.POINT_INTERSECTION.get=function(){return 1},Pr.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(_t,Pr);var fr=function(s){function t(){s.apply(this,arguments)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(i){var r=new V(this._inputLines[0][0],this._inputLines[0][1]),n=new V(this._inputLines[1][0],this._inputLines[1][1]);return r.contains(i)&&n.contains(i)},t.prototype.computeIntersection=function(){if(arguments.length===3){var i=arguments[0],r=arguments[1],n=arguments[2];if(this._isProper=!1,V.intersects(r,n,i)&&k.orientationIndex(r,n,i)===0&&k.orientationIndex(n,r,i)===0)return this._isProper=!0,(i.equals(r)||i.equals(n))&&(this._isProper=!1),this._result=s.POINT_INTERSECTION,null;this._result=s.NO_INTERSECTION}else return s.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(i,r,n,o,f){f.x=this.smallestInAbsValue(i.x,r.x,n.x,o.x),f.y=this.smallestInAbsValue(i.y,r.y,n.y,o.y),i.x-=f.x,i.y-=f.y,r.x-=f.x,r.y-=f.y,n.x-=f.x,n.y-=f.y,o.x-=f.x,o.y-=f.y},t.prototype.safeHCoordinateIntersection=function(i,r,n,o){var f=null;try{f=Ge.intersection(i,r,n,o)}catch(h){if(h instanceof Zr)f=t.nearestEndpoint(i,r,n,o);else throw h}finally{}return f},t.prototype.intersection=function(i,r,n,o){var f=this.intersectionWithNormalization(i,r,n,o);return this.isInSegmentEnvelopes(f)||(f=new L(t.nearestEndpoint(i,r,n,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(f),f},t.prototype.smallestInAbsValue=function(i,r,n,o){var f=i,h=Math.abs(f);return Math.abs(r)<h&&(f=r,h=Math.abs(r)),Math.abs(n)<h&&(f=n,h=Math.abs(n)),Math.abs(o)<h&&(f=o),f},t.prototype.checkDD=function(i,r,n,o,f){var h=he.intersection(i,r,n,o),l=this.isInSegmentEnvelopes(h);Xt.out.println("DD in env = "+l+" --------------------- "+h),f.distance(h)>1e-4&&Xt.out.println("Distance = "+f.distance(h))},t.prototype.intersectionWithNormalization=function(i,r,n,o){var f=new L(i),h=new L(r),l=new L(n),a=new L(o),c=new L;this.normalizeToEnvCentre(f,h,l,a,c);var p=this.safeHCoordinateIntersection(f,h,l,a);return p.x+=c.x,p.y+=c.y,p},t.prototype.computeCollinearIntersection=function(i,r,n,o){var f=V.intersects(i,r,n),h=V.intersects(i,r,o),l=V.intersects(n,o,i),a=V.intersects(n,o,r);return f&&h?(this._intPt[0]=n,this._intPt[1]=o,s.COLLINEAR_INTERSECTION):l&&a?(this._intPt[0]=i,this._intPt[1]=r,s.COLLINEAR_INTERSECTION):f&&l?(this._intPt[0]=n,this._intPt[1]=i,n.equals(i)&&!h&&!a?s.POINT_INTERSECTION:s.COLLINEAR_INTERSECTION):f&&a?(this._intPt[0]=n,this._intPt[1]=r,n.equals(r)&&!h&&!l?s.POINT_INTERSECTION:s.COLLINEAR_INTERSECTION):h&&l?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!f&&!a?s.POINT_INTERSECTION:s.COLLINEAR_INTERSECTION):h&&a?(this._intPt[0]=o,this._intPt[1]=r,o.equals(r)&&!f&&!l?s.POINT_INTERSECTION:s.COLLINEAR_INTERSECTION):s.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(i,r,n,o,f){var h=i.x<r.x?i.x:r.x,l=i.y<r.y?i.y:r.y,a=i.x>r.x?i.x:r.x,c=i.y>r.y?i.y:r.y,p=n.x<o.x?n.x:o.x,d=n.y<o.y?n.y:o.y,u=n.x>o.x?n.x:o.x,v=n.y>o.y?n.y:o.y,C=h>p?h:p,W=a<u?a:u,_=l>d?l:d,T=c<v?c:v,A=(C+W)/2,P=(_+T)/2;f.x=A,f.y=P,i.x-=f.x,i.y-=f.y,r.x-=f.x,r.y-=f.y,n.x-=f.x,n.y-=f.y,o.x-=f.x,o.y-=f.y},t.prototype.computeIntersect=function(i,r,n,o){if(this._isProper=!1,!V.intersects(i,r,n,o))return s.NO_INTERSECTION;var f=k.orientationIndex(i,r,n),h=k.orientationIndex(i,r,o);if(f>0&&h>0||f<0&&h<0)return s.NO_INTERSECTION;var l=k.orientationIndex(n,o,i),a=k.orientationIndex(n,o,r);if(l>0&&a>0||l<0&&a<0)return s.NO_INTERSECTION;var c=f===0&&h===0&&l===0&&a===0;return c?this.computeCollinearIntersection(i,r,n,o):(f===0||h===0||l===0||a===0?(this._isProper=!1,i.equals2D(n)||i.equals2D(o)?this._intPt[0]=i:r.equals2D(n)||r.equals2D(o)?this._intPt[0]=r:f===0?this._intPt[0]=new L(n):h===0?this._intPt[0]=new L(o):l===0?this._intPt[0]=new L(i):a===0&&(this._intPt[0]=new L(r))):(this._isProper=!0,this._intPt[0]=this.intersection(i,r,n,o)),s.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(i,r,n,o){var f=i,h=k.distancePointLine(i,n,o),l=k.distancePointLine(r,n,o);return l<h&&(h=l,f=r),l=k.distancePointLine(n,i,r),l<h&&(h=l,f=n),l=k.distancePointLine(o,i,r),l<h&&(h=l,f=o),f},t}(_t),Sr=function(){};Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Sr.orientationIndex=function(t,e,i){var r=e.x-t.x,n=e.y-t.y,o=i.x-e.x,f=i.y-e.y;return Sr.signOfDet2x2(r,n,o,f)},Sr.signOfDet2x2=function(t,e,i,r){var n=null,o=null,f=null;if(n=1,t===0||r===0)return e===0||i===0?0:e>0?i>0?-n:n:i>0?n:-n;if(e===0||i===0)return r>0?t>0?n:-n:t>0?-n:n;if(e>0?r>0?e<=r||(n=-n,o=t,t=i,i=o,o=e,e=r,r=o):e<=-r?(n=-n,i=-i,r=-r):(o=t,t=-i,i=o,o=e,e=-r,r=o):r>0?-e<=r?(n=-n,t=-t,e=-e):(o=-t,t=i,i=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,i=-i,r=-r):(n=-n,o=-t,t=-i,i=o,o=-e,e=-r,r=o),t>0)if(i>0){if(!(t<=i))return n}else return n;else{if(i>0)return-n;if(t>=i)n=-n,t=-t,i=-i;else return-n}for(;;){if(f=Math.floor(i/t),i=i-f*t,r=r-f*e,r<0)return-n;if(r>e)return n;if(t>i+i){if(e<r+r)return n}else{if(e>r+r)return-n;i=t-i,r=e-r,n=-n}if(r===0)return i===0?0:-n;if(i===0||(f=Math.floor(t/i),t=t-f*i,e=e-f*r,e<0))return n;if(e>r)return-n;if(i>t+t){if(r<e+e)return-n}else{if(r>e+e)return n;t=i-t,e=r-e,n=-n}if(e===0)return t===0?0:n;if(t===0)return-n}};var ii=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};ii.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var i=t.x,r=e.x;return i>r&&(i=e.x,r=t.x),this._p.x>=i&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var n=t.x-this._p.x,o=t.y-this._p.y,f=e.x-this._p.x,h=e.y-this._p.y,l=Sr.signOfDet2x2(n,o,f,h);if(l===0)return this._isPointOnSegment=!0,null;h<o&&(l=-l),l>0&&this._crossingCount++}},ii.prototype.isPointInPolygon=function(){return this.getLocation()!==E.EXTERIOR},ii.prototype.getLocation=function(){return this._isPointOnSegment?E.BOUNDARY:this._crossingCount%2===1?E.INTERIOR:E.EXTERIOR},ii.prototype.isOnSegment=function(){return this._isPointOnSegment},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.locatePointInRing=function(){if(arguments[0]instanceof L&&U(arguments[1],et)){for(var t=arguments[0],e=arguments[1],i=new ii(t),r=new L,n=new L,o=1;o<e.size();o++)if(e.getCoordinate(o,r),e.getCoordinate(o-1,n),i.countSegment(r,n),i.isOnSegment())return i.getLocation();return i.getLocation()}else if(arguments[0]instanceof L&&arguments[1]instanceof Array){for(var f=arguments[0],h=arguments[1],l=new ii(f),a=1;a<h.length;a++){var c=h[a],p=h[a-1];if(l.countSegment(c,p),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var k=function(){},Nr={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};k.prototype.interfaces_=function(){return[]},k.prototype.getClass=function(){return k},k.orientationIndex=function(t,e,i){return he.orientationIndex(t,e,i)},k.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,i=t[0].x,r=1;r<t.length-1;r++){var n=t[r].x-i,o=t[r+1].y,f=t[r-1].y;e+=n*(f-o)}return e/2}else if(U(arguments[0],et)){var h=arguments[0],l=h.size();if(l<3)return 0;var a=new L,c=new L,p=new L;h.getCoordinate(0,c),h.getCoordinate(1,p);var d=c.x;p.x-=d;for(var u=0,v=1;v<l-1;v++)a.y=c.y,c.x=p.x,c.y=p.y,h.getCoordinate(v+1,p),p.x-=d,u+=c.x*(a.y-p.y);return u/2}},k.distanceLineLine=function(t,e,i,r){if(t.equals(e))return k.distancePointLine(t,i,r);if(i.equals(r))return k.distancePointLine(r,t,e);var n=!1;if(!V.intersects(t,e,i,r))n=!0;else{var o=(e.x-t.x)*(r.y-i.y)-(e.y-t.y)*(r.x-i.x);if(o===0)n=!0;else{var f=(t.y-i.y)*(r.x-i.x)-(t.x-i.x)*(r.y-i.y),h=(t.y-i.y)*(e.x-t.x)-(t.x-i.x)*(e.y-t.y),l=h/o,a=f/o;(a<0||a>1||l<0||l>1)&&(n=!0)}}return n?Ie.min(k.distancePointLine(t,i,r),k.distancePointLine(e,i,r),k.distancePointLine(i,t,e),k.distancePointLine(r,t,e)):0},k.isPointInRing=function(t,e){return k.locatePointInRing(t,e)!==E.EXTERIOR},k.computeLength=function(t){var e=t.size();if(e<=1)return 0;var i=0,r=new L;t.getCoordinate(0,r);for(var n=r.x,o=r.y,f=1;f<e;f++){t.getCoordinate(f,r);var h=r.x,l=r.y,a=h-n,c=l-o;i+=Math.sqrt(a*a+c*c),n=h,o=l}return i},k.isCCW=function(t){var e=t.length-1;if(e<3)throw new vt("Ring has fewer than 4 points, so orientation cannot be determined");for(var i=t[0],r=0,n=1;n<=e;n++){var o=t[n];o.y>i.y&&(i=o,r=n)}var f=r;do f=f-1,f<0&&(f=e);while(t[f].equals2D(i)&&f!==r);var h=r;do h=(h+1)%e;while(t[h].equals2D(i)&&h!==r);var l=t[f],a=t[h];if(l.equals2D(i)||a.equals2D(i)||l.equals2D(a))return!1;var c=k.computeOrientation(l,i,a),p=!1;return c===0?p=l.x>a.x:p=c>0,p},k.locatePointInRing=function(t,e){return ii.locatePointInRing(t,e)},k.distancePointLinePerpendicular=function(t,e,i){var r=(i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y),n=((e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y))/r;return Math.abs(n)*Math.sqrt(r)},k.computeOrientation=function(t,e,i){return k.orientationIndex(t,e,i)},k.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new vt("Line array must contain at least one vertex");for(var i=t.distance(e[0]),r=0;r<e.length-1;r++){var n=k.distancePointLine(t,e[r],e[r+1]);n<i&&(i=n)}return i}else if(arguments.length===3){var o=arguments[0],f=arguments[1],h=arguments[2];if(f.x===h.x&&f.y===h.y)return o.distance(f);var l=(h.x-f.x)*(h.x-f.x)+(h.y-f.y)*(h.y-f.y),a=((o.x-f.x)*(h.x-f.x)+(o.y-f.y)*(h.y-f.y))/l;if(a<=0)return o.distance(f);if(a>=1)return o.distance(h);var c=((f.y-o.y)*(h.x-f.x)-(f.x-o.x)*(h.y-f.y))/l;return Math.abs(c)*Math.sqrt(l)}},k.isOnLine=function(t,e){for(var i=new fr,r=1;r<e.length;r++){var n=e[r-1],o=e[r];if(i.computeIntersection(t,n,o),i.hasIntersection())return!0}return!1},Nr.CLOCKWISE.get=function(){return-1},Nr.RIGHT.get=function(){return k.CLOCKWISE},Nr.COUNTERCLOCKWISE.get=function(){return 1},Nr.LEFT.get=function(){return k.COUNTERCLOCKWISE},Nr.COLLINEAR.get=function(){return 0},Nr.STRAIGHT.get=function(){return k.COLLINEAR},Object.defineProperties(k,Nr);var Mi=function(){};Mi.prototype.filter=function(t){},Mi.prototype.interfaces_=function(){return[]},Mi.prototype.getClass=function(){return Mi};var z=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},_i={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};z.prototype.isGeometryCollection=function(){return this.getSortIndex()===z.SORTINDEX_GEOMETRYCOLLECTION},z.prototype.getFactory=function(){return this._factory},z.prototype.getGeometryN=function(t){return this},z.prototype.getArea=function(){return 0},z.prototype.isRectangle=function(){return!1},z.prototype.equals=function(){if(arguments[0]instanceof z){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof z))return!1;var i=e;return this.equalsExact(i)}},z.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},z.prototype.geometryChanged=function(){this.apply(z.geometryChangedFilter)},z.prototype.geometryChangedAction=function(){this._envelope=null},z.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},z.prototype.getLength=function(){return 0},z.prototype.getNumGeometries=function(){return 1},z.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var i=arguments[0],r=arguments[1];return this.getSortIndex()!==i.getSortIndex()?this.getSortIndex()-i.getSortIndex():this.isEmpty()&&i.isEmpty()?0:this.isEmpty()?-1:i.isEmpty()?1:this.compareToSameClass(i,r)}},z.prototype.getUserData=function(){return this._userData},z.prototype.getSRID=function(){return this._SRID},z.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},z.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===z.SORTINDEX_GEOMETRYCOLLECTION)throw new vt("This method does not support GeometryCollection arguments")},z.prototype.equal=function(t,e,i){return i===0?t.equals(e):t.distance(e)<=i},z.prototype.norm=function(){var t=this.copy();return t.normalize(),t},z.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},z.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new V(this._envelope)},z.prototype.setSRID=function(t){this._SRID=t},z.prototype.setUserData=function(t){this._userData=t},z.prototype.compare=function(t,e){for(var i=t.iterator(),r=e.iterator();i.hasNext()&&r.hasNext();){var n=i.next(),o=r.next(),f=n.compareTo(o);if(f!==0)return f}return i.hasNext()?1:r.hasNext()?-1:0},z.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},z.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===z.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===z.SORTINDEX_MULTIPOINT||this.getSortIndex()===z.SORTINDEX_MULTILINESTRING||this.getSortIndex()===z.SORTINDEX_MULTIPOLYGON},z.prototype.interfaces_=function(){return[js,De,Re]},z.prototype.getClass=function(){return z},z.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},z.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},_i.serialVersionUID.get=function(){return 8763622679187377e3},_i.SORTINDEX_POINT.get=function(){return 0},_i.SORTINDEX_MULTIPOINT.get=function(){return 1},_i.SORTINDEX_LINESTRING.get=function(){return 2},_i.SORTINDEX_LINEARRING.get=function(){return 3},_i.SORTINDEX_MULTILINESTRING.get=function(){return 4},_i.SORTINDEX_POLYGON.get=function(){return 5},_i.SORTINDEX_MULTIPOLYGON.get=function(){return 6},_i.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},_i.geometryChangedFilter.get=function(){return xn},Object.defineProperties(z,_i);var xn=function(){};xn.interfaces_=function(){return[Mi]},xn.filter=function(t){t.geometryChangedAction()};var Ci=function(){};Ci.prototype.filter=function(t){},Ci.prototype.interfaces_=function(){return[]},Ci.prototype.getClass=function(){return Ci};var Be=function(){},Oi={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};Be.prototype.isInBoundary=function(t){},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be},Oi.Mod2BoundaryNodeRule.get=function(){return Kr},Oi.EndPointBoundaryNodeRule.get=function(){return jr},Oi.MultiValentEndPointBoundaryNodeRule.get=function(){return Jr},Oi.MonoValentEndPointBoundaryNodeRule.get=function(){return Qr},Oi.MOD2_BOUNDARY_RULE.get=function(){return new Kr},Oi.ENDPOINT_BOUNDARY_RULE.get=function(){return new jr},Oi.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new Jr},Oi.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new Qr},Oi.OGC_SFS_BOUNDARY_RULE.get=function(){return Be.MOD2_BOUNDARY_RULE},Object.defineProperties(Be,Oi);var Kr=function(){};Kr.prototype.isInBoundary=function(t){return t%2===1},Kr.prototype.interfaces_=function(){return[Be]},Kr.prototype.getClass=function(){return Kr};var jr=function(){};jr.prototype.isInBoundary=function(t){return t>0},jr.prototype.interfaces_=function(){return[Be]},jr.prototype.getClass=function(){return jr};var Jr=function(){};Jr.prototype.isInBoundary=function(t){return t>1},Jr.prototype.interfaces_=function(){return[Be]},Jr.prototype.getClass=function(){return Jr};var Qr=function(){};Qr.prototype.isInBoundary=function(t){return t===1},Qr.prototype.interfaces_=function(){return[Be]},Qr.prototype.getClass=function(){return Qr};var Rt=function(){};Rt.prototype.add=function(){},Rt.prototype.addAll=function(){},Rt.prototype.isEmpty=function(){},Rt.prototype.iterator=function(){},Rt.prototype.size=function(){},Rt.prototype.toArray=function(){},Rt.prototype.remove=function(){};function kn(s){this.message=s||""}kn.prototype=new Error,kn.prototype.name="IndexOutOfBoundsException";var $r=function(){};$r.prototype.hasNext=function(){},$r.prototype.next=function(){},$r.prototype.remove=function(){};var Ye=function(s){function t(){s.apply(this,arguments)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Rt);function ts(s){this.message=s||""}ts.prototype=new Error,ts.prototype.name="NoSuchElementException";var x=function(s){function t(){s.call(this),this.array_=[],arguments[0]instanceof Rt&&this.addAll(arguments[0])}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[s,Rt]},t.prototype.add=function(i){return arguments.length===1?this.array_.push(i):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(i){for(var r=this,n=i.iterator();n.hasNext();)r.add(n.next());return!0},t.prototype.set=function(i,r){var n=this.array_[i];return this.array_[i]=r,n},t.prototype.iterator=function(){return new pf(this)},t.prototype.get=function(i){if(i<0||i>=this.size())throw new kn;return this.array_[i]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var i=this,r=[],n=0,o=this.array_.length;n<o;n++)r.push(i.array_[n]);return r},t.prototype.remove=function(i){for(var r=this,n=!1,o=0,f=this.array_.length;o<f;o++)if(r.array_[o]===i){r.array_.splice(o,1),n=!0;break}return n},t}(Ye),pf=function(s){function t(e){s.call(this),this.arrayList_=e,this.position_=0}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new ts;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(i){return this.arrayList_.set(this.position_-1,i)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}($r),Ts=function(s){function t(){if(s.call(this),arguments.length!==0){if(arguments.length===1){var i=arguments[0];this.ensureCapacity(i.length),this.add(i,!0)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];this.ensureCapacity(r.length),this.add(r,n)}}}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(r){return this.get(r)},t.prototype.addAll=function(){var r=this;if(arguments.length===2){for(var n=arguments[0],o=arguments[1],f=!1,h=n.iterator();h.hasNext();)r.add(h.next(),o),f=!0;return f}else return s.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var r=this,n=s.prototype.clone.call(this),o=0;o<this.size();o++)n.add(o,r.get(o).copy());return n},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var r=this;if(arguments.length===1){var n=arguments[0];s.prototype.add.call(this,n)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],f=arguments[1];return this.add(o,f,!0),!0}else if(arguments[0]instanceof L&&typeof arguments[1]=="boolean"){var h=arguments[0],l=arguments[1];if(!l&&this.size()>=1){var a=this.get(this.size()-1);if(a.equals2D(h))return null}s.prototype.add.call(this,h)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var c=arguments[0],p=arguments[1];return this.add(c,p),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var d=arguments[0],u=arguments[1],v=arguments[2];if(v)for(var C=0;C<d.length;C++)r.add(d[C],u);else for(var W=d.length-1;W>=0;W--)r.add(d[W],u);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof L){var _=arguments[0],T=arguments[1],A=arguments[2];if(!A){var P=this.size();if(P>0){if(_>0){var b=this.get(_-1);if(b.equals2D(T))return null}if(_<P){var D=this.get(_);if(D.equals2D(T))return null}}}s.prototype.add.call(this,_,T)}}else if(arguments.length===4){var R=arguments[0],B=arguments[1],X=arguments[2],O=arguments[3],q=1;X>O&&(q=-1);for(var H=X;H!==O;H+=q)r.add(R[H],B);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new L(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(x),Q=function(){},$s={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};$s.ForwardComparator.get=function(){return Is},$s.BidirectionalComparator.get=function(){return es},$s.coordArrayType.get=function(){return new Array(0).fill(null)},Q.prototype.interfaces_=function(){return[]},Q.prototype.getClass=function(){return Q},Q.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},Q.ptNotInList=function(t,e){for(var i=0;i<t.length;i++){var r=t[i];if(Q.indexOf(r,e)<0)return r}return null},Q.scroll=function(t,e){var i=Q.indexOf(e,t);if(i<0)return null;var r=new Array(t.length).fill(null);Xt.arraycopy(t,i,r,0,t.length-i),Xt.arraycopy(t,0,r,t.length-i,i),Xt.arraycopy(r,0,t,0,t.length)},Q.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!t[i].equals(e[i]))return!1;return!0}else if(arguments.length===3){var r=arguments[0],n=arguments[1],o=arguments[2];if(r===n)return!0;if(r===null||n===null||r.length!==n.length)return!1;for(var f=0;f<r.length;f++)if(o.compare(r[f],n[f])!==0)return!1;return!0}},Q.intersection=function(t,e){for(var i=new Ts,r=0;r<t.length;r++)e.intersects(t[r])&&i.add(t[r],!0);return i.toCoordinateArray()},Q.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Q.removeRepeatedPoints=function(t){if(!Q.hasRepeatedPoints(t))return t;var e=new Ts(t,!1);return e.toCoordinateArray()},Q.reverse=function(t){for(var e=t.length-1,i=Math.trunc(e/2),r=0;r<=i;r++){var n=t[r];t[r]=t[e-r],t[e-r]=n}},Q.removeNull=function(t){for(var e=0,i=0;i<t.length;i++)t[i]!==null&&e++;var r=new Array(e).fill(null);if(e===0)return r;for(var n=0,o=0;o<t.length;o++)t[o]!==null&&(r[n++]=t[o]);return r},Q.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),i=0;i<t.length;i++)e[i]=new L(t[i]);return e}else if(arguments.length===5)for(var r=arguments[0],n=arguments[1],o=arguments[2],f=arguments[3],h=arguments[4],l=0;l<h;l++)o[f+l]=new L(r[n+l])},Q.isEqualReversed=function(t,e){for(var i=0;i<t.length;i++){var r=t[i],n=e[t.length-i-1];if(r.compareTo(n)!==0)return!1}return!0},Q.envelope=function(t){for(var e=new V,i=0;i<t.length;i++)e.expandToInclude(t[i]);return e},Q.toCoordinateArray=function(t){return t.toArray(Q.coordArrayType)},Q.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Q.indexOf=function(t,e){for(var i=0;i<e.length;i++)if(t.equals(e[i]))return i;return-1},Q.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var i=t.length-1-e,r=t[e].compareTo(t[i]);if(r!==0)return r}return 1},Q.compare=function(t,e){for(var i=0;i<t.length&&i<e.length;){var r=t[i].compareTo(e[i]);if(r!==0)return r;i++}return i<e.length?-1:i<t.length?1:0},Q.minCoordinate=function(t){for(var e=null,i=0;i<t.length;i++)(e===null||e.compareTo(t[i])>0)&&(e=t[i]);return e},Q.extract=function(t,e,i){e=Ie.clamp(e,0,t.length),i=Ie.clamp(i,-1,t.length);var r=i-e+1;i<0&&(r=0),e>=t.length&&(r=0),i<e&&(r=0);var n=new Array(r).fill(null);if(r===0)return n;for(var o=0,f=e;f<=i;f++)n[o++]=t[f];return n},Object.defineProperties(Q,$s);var Is=function(){};Is.prototype.compare=function(t,e){var i=t,r=e;return Q.compare(i,r)},Is.prototype.interfaces_=function(){return[Ur]},Is.prototype.getClass=function(){return Is};var es=function(){};es.prototype.compare=function(t,e){var i=t,r=e;if(i.length<r.length)return-1;if(i.length>r.length)return 1;if(i.length===0)return 0;var n=Q.compare(i,r),o=Q.isEqualReversed(i,r);return o?0:n},es.prototype.OLDcompare=function(t,e){var i=t,r=e;if(i.length<r.length)return-1;if(i.length>r.length)return 1;if(i.length===0)return 0;for(var n=Q.increasingDirection(i),o=Q.increasingDirection(r),f=n>0?0:i.length-1,h=o>0?0:i.length-1,l=0;l<i.length;l++){var a=i[f].compareTo(r[h]);if(a!==0)return a;f+=n,h+=o}return 0},es.prototype.interfaces_=function(){return[Ur]},es.prototype.getClass=function(){return es};var br=function(){};br.prototype.get=function(){},br.prototype.put=function(){},br.prototype.size=function(){},br.prototype.values=function(){},br.prototype.entrySet=function(){};var gf=function(s){function t(){s.apply(this,arguments)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t}(br);function Ls(s){this.message=s||""}Ls.prototype=new Error,Ls.prototype.name="OperationNotSupported";function tn(){}tn.prototype=new Rt,tn.prototype.contains=function(){};var Vn=function(s){function t(){s.call(this),this.array_=[],arguments[0]instanceof Rt&&this.addAll(arguments[0])}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.contains=function(i){for(var r=this,n=0,o=this.array_.length;n<o;n++){var f=r.array_[n];if(f===i)return!0}return!1},t.prototype.add=function(i){return this.contains(i)?!1:(this.array_.push(i),!0)},t.prototype.addAll=function(i){for(var r=this,n=i.iterator();n.hasNext();)r.add(n.next());return!0},t.prototype.remove=function(i){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var i=this,r=[],n=0,o=this.array_.length;n<o;n++)r.push(i.array_[n]);return r},t.prototype.iterator=function(){return new df(this)},t}(tn),df=function(s){function t(e){s.call(this),this.hashSet_=e,this.position_=0}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new ts;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new Ls},t}($r),Fi=0,ur=1;function Do(s){return s===null?Fi:s.color}function gt(s){return s===null?null:s.parent}function xi(s,t){s!==null&&(s.color=t)}function Gn(s){return s===null?null:s.left}function Ro(s){return s===null?null:s.right}function jt(){this.root_=null,this.size_=0}jt.prototype=new gf,jt.prototype.get=function(s){for(var t=this.root_;t!==null;){var e=s.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},jt.prototype.put=function(s,t){if(this.root_===null)return this.root_={key:s,value:t,left:null,right:null,parent:null,color:Fi,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,i,r;do if(i=e,r=s.compareTo(e.key),r<0)e=e.left;else if(r>0)e=e.right;else{var n=e.value;return e.value=t,n}while(e!==null);var o={key:s,left:null,right:null,value:t,parent:i,color:Fi,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?i.left=o:i.right=o,this.fixAfterInsertion(o),this.size_++,null},jt.prototype.fixAfterInsertion=function(s){var t=this;for(s.color=ur;s!=null&&s!==this.root_&&s.parent.color===ur;)if(gt(s)===Gn(gt(gt(s)))){var e=Ro(gt(gt(s)));Do(e)===ur?(xi(gt(s),Fi),xi(e,Fi),xi(gt(gt(s)),ur),s=gt(gt(s))):(s===Ro(gt(s))&&(s=gt(s),t.rotateLeft(s)),xi(gt(s),Fi),xi(gt(gt(s)),ur),t.rotateRight(gt(gt(s))))}else{var i=Gn(gt(gt(s)));Do(i)===ur?(xi(gt(s),Fi),xi(i,Fi),xi(gt(gt(s)),ur),s=gt(gt(s))):(s===Gn(gt(s))&&(s=gt(s),t.rotateRight(s)),xi(gt(s),Fi),xi(gt(gt(s)),ur),t.rotateLeft(gt(gt(s))))}this.root_.color=Fi},jt.prototype.values=function(){var s=new x,t=this.getFirstEntry();if(t!==null)for(s.add(t.value);(t=jt.successor(t))!==null;)s.add(t.value);return s},jt.prototype.entrySet=function(){var s=new Vn,t=this.getFirstEntry();if(t!==null)for(s.add(t);(t=jt.successor(t))!==null;)s.add(t);return s},jt.prototype.rotateLeft=function(s){if(s!=null){var t=s.right;s.right=t.left,t.left!=null&&(t.left.parent=s),t.parent=s.parent,s.parent===null?this.root_=t:s.parent.left===s?s.parent.left=t:s.parent.right=t,t.left=s,s.parent=t}},jt.prototype.rotateRight=function(s){if(s!=null){var t=s.left;s.left=t.right,t.right!=null&&(t.right.parent=s),t.parent=s.parent,s.parent===null?this.root_=t:s.parent.right===s?s.parent.right=t:s.parent.left=t,t.right=s,s.parent=t}},jt.prototype.getFirstEntry=function(){var s=this.root_;if(s!=null)for(;s.left!=null;)s=s.left;return s},jt.successor=function(s){if(s===null)return null;if(s.right!==null){for(var t=s.right;t.left!==null;)t=t.left;return t}else{for(var e=s.parent,i=s;e!==null&&i===e.right;)i=e,e=e.parent;return e}},jt.prototype.size=function(){return this.size_};var As=function(){};As.prototype.interfaces_=function(){return[]},As.prototype.getClass=function(){return As};function Bo(){}Bo.prototype=new tn;function ri(){this.array_=[],arguments[0]instanceof Rt&&this.addAll(arguments[0])}ri.prototype=new Bo,ri.prototype.contains=function(s){for(var t=this,e=0,i=this.array_.length;e<i;e++){var r=t.array_[e];if(r.compareTo(s)===0)return!0}return!1},ri.prototype.add=function(s){var t=this;if(this.contains(s))return!1;for(var e=0,i=this.array_.length;e<i;e++){var r=t.array_[e];if(r.compareTo(s)===1)return t.array_.splice(e,0,s),!0}return this.array_.push(s),!0},ri.prototype.addAll=function(s){for(var t=this,e=s.iterator();e.hasNext();)t.add(e.next());return!0},ri.prototype.remove=function(s){throw new Ls},ri.prototype.size=function(){return this.array_.length},ri.prototype.isEmpty=function(){return this.array_.length===0},ri.prototype.toArray=function(){for(var s=this,t=[],e=0,i=this.array_.length;e<i;e++)t.push(s.array_[e]);return t},ri.prototype.iterator=function(){return new en(this)};var en=function(s){this.treeSet_=s,this.position_=0};en.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new ts;return this.treeSet_.array_[this.position_++]},en.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},en.prototype.remove=function(){throw new Ls};var hr=function(){};hr.sort=function(){var t=arguments[0],e,i,r,n;if(arguments.length===1)n=function(f,h){return f.compareTo(h)},t.sort(n);else if(arguments.length===2)r=arguments[1],n=function(f,h){return r.compare(f,h)},t.sort(n);else if(arguments.length===3){i=t.slice(arguments[1],arguments[2]),i.sort();var o=t.slice(0,arguments[1]).concat(i,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])}else if(arguments.length===4)for(i=t.slice(arguments[1],arguments[2]),r=arguments[3],n=function(f,h){return r.compare(f,h)},i.sort(n),o=t.slice(0,arguments[1]).concat(i,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])},hr.asList=function(t){for(var e=new x,i=0,r=t.length;i<r;i++)e.add(t[i]);return e};var st=function(){},ze={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};ze.P.get=function(){return 0},ze.L.get=function(){return 1},ze.A.get=function(){return 2},ze.FALSE.get=function(){return-1},ze.TRUE.get=function(){return-2},ze.DONTCARE.get=function(){return-3},ze.SYM_FALSE.get=function(){return"F"},ze.SYM_TRUE.get=function(){return"T"},ze.SYM_DONTCARE.get=function(){return"*"},ze.SYM_P.get=function(){return"0"},ze.SYM_L.get=function(){return"1"},ze.SYM_A.get=function(){return"2"},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.toDimensionSymbol=function(t){switch(t){case st.FALSE:return st.SYM_FALSE;case st.TRUE:return st.SYM_TRUE;case st.DONTCARE:return st.SYM_DONTCARE;case st.P:return st.SYM_P;case st.L:return st.SYM_L;case st.A:return st.SYM_A}throw new vt("Unknown dimension value: "+t)},st.toDimensionValue=function(t){switch(Cs.toUpperCase(t)){case st.SYM_FALSE:return st.FALSE;case st.SYM_TRUE:return st.TRUE;case st.SYM_DONTCARE:return st.DONTCARE;case st.SYM_P:return st.P;case st.SYM_L:return st.L;case st.SYM_A:return st.A}throw new vt("Unknown dimension symbol: "+t)},Object.defineProperties(st,ze);var si=function(){};si.prototype.filter=function(t){},si.prototype.interfaces_=function(){return[]},si.prototype.getClass=function(){return si};var Ue=function(){};Ue.prototype.filter=function(t,e){},Ue.prototype.isDone=function(){},Ue.prototype.isGeometryChanged=function(){},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue};var te=function(s){function t(i,r){if(s.call(this,r),this._geometries=i||[],s.hasNullElements(this._geometries))throw new vt("geometries must not contain null elements")}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var r=this,n=new V,o=0;o<this._geometries.length;o++)n.expandToInclude(r._geometries[o].getEnvelopeInternal());return n},t.prototype.getGeometryN=function(r){return this._geometries[r]},t.prototype.getSortIndex=function(){return s.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var r=this,n=new Array(this.getNumPoints()).fill(null),o=-1,f=0;f<this._geometries.length;f++)for(var h=r._geometries[f].getCoordinates(),l=0;l<h.length;l++)o++,n[o]=h[l];return n},t.prototype.getArea=function(){for(var r=this,n=0,o=0;o<this._geometries.length;o++)n+=r._geometries[o].getArea();return n},t.prototype.equalsExact=function(){var r=this;if(arguments.length===2){var n=arguments[0],o=arguments[1];if(!this.isEquivalentClass(n))return!1;var f=n;if(this._geometries.length!==f._geometries.length)return!1;for(var h=0;h<this._geometries.length;h++)if(!r._geometries[h].equalsExact(f._geometries[h],o))return!1;return!0}else return s.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var r=this,n=0;n<this._geometries.length;n++)r._geometries[n].normalize();hr.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var r=this,n=st.FALSE,o=0;o<this._geometries.length;o++)n=Math.max(n,r._geometries[o].getBoundaryDimension());return n},t.prototype.getDimension=function(){for(var r=this,n=st.FALSE,o=0;o<this._geometries.length;o++)n=Math.max(n,r._geometries[o].getDimension());return n},t.prototype.getLength=function(){for(var r=this,n=0,o=0;o<this._geometries.length;o++)n+=r._geometries[o].getLength();return n},t.prototype.getNumPoints=function(){for(var r=this,n=0,o=0;o<this._geometries.length;o++)n+=r._geometries[o].getNumPoints();return n},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var r=this,n=this._geometries.length,o=new Array(n).fill(null),f=0;f<this._geometries.length;f++)o[f]=r._geometries[f].reverse();return this.getFactory().createGeometryCollection(o)},t.prototype.compareToSameClass=function(){var r=this;if(arguments.length===1){var n=arguments[0],o=new ri(hr.asList(this._geometries)),f=new ri(hr.asList(n._geometries));return this.compare(o,f)}else if(arguments.length===2){for(var h=arguments[0],l=arguments[1],a=h,c=this.getNumGeometries(),p=a.getNumGeometries(),d=0;d<c&&d<p;){var u=r.getGeometryN(d),v=a.getGeometryN(d),C=u.compareToSameClass(v,l);if(C!==0)return C;d++}return d<c?1:d<p?-1:0}},t.prototype.apply=function(){var r=this;if(U(arguments[0],Ci))for(var n=arguments[0],o=0;o<this._geometries.length;o++)r._geometries[o].apply(n);else if(U(arguments[0],Ue)){var f=arguments[0];if(this._geometries.length===0)return null;for(var h=0;h<this._geometries.length&&(r._geometries[h].apply(f),!f.isDone());h++);f.isGeometryChanged()&&this.geometryChanged()}else if(U(arguments[0],si)){var l=arguments[0];l.filter(this);for(var a=0;a<this._geometries.length;a++)r._geometries[a].apply(l)}else if(U(arguments[0],Mi)){var c=arguments[0];c.filter(this);for(var p=0;p<this._geometries.length;p++)r._geometries[p].apply(c)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),j.shouldNeverReachHere(),null},t.prototype.clone=function(){var r=this,n=s.prototype.clone.call(this);n._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)n._geometries[o]=r._geometries[o].clone();return n},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var r=this,n=new Array(this._geometries.length).fill(null),o=0;o<n.length;o++)n[o]=r._geometries[o].copy();return new t(n,this._factory)},t.prototype.isEmpty=function(){for(var r=this,n=0;n<this._geometries.length;n++)if(!r._geometries[n].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(z),lr=function(s){function t(){s.apply(this,arguments)}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return z.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var r=arguments[0],n=arguments[1];return this.isEquivalentClass(r)?s.prototype.equalsExact.call(this,r,n):!1}else return s.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?st.FALSE:0},t.prototype.isClosed=function(){var r=this;if(this.isEmpty())return!1;for(var n=0;n<this._geometries.length;n++)if(!r._geometries[n].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var r=this,n=this._geometries.length,o=new Array(n).fill(null),f=0;f<this._geometries.length;f++)o[n-1-f]=r._geometries[f].reverse();return this.getFactory().createMultiLineString(o)},t.prototype.getBoundary=function(){return new Me(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var r=this,n=new Array(this._geometries.length).fill(null),o=0;o<n.length;o++)n[o]=r._geometries[o].copy();return new t(n,this._factory)},t.prototype.interfaces_=function(){return[As]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(te),Me=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=Be.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var i=arguments[0],r=arguments[1];this._geom=i,this._geomFact=i.getFactory(),this._bnRule=r}};Me.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Me.prototype.getBoundary=function(){return this._geom instanceof Wt?this.boundaryLineString(this._geom):this._geom instanceof lr?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Me.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Me.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Me.prototype.computeBoundaryCoordinates=function(t){var e=this,i=new x;this._endpointMap=new jt;for(var r=0;r<t.getNumGeometries();r++){var n=t.getGeometryN(r);n.getNumPoints()!==0&&(e.addEndpoint(n.getCoordinateN(0)),e.addEndpoint(n.getCoordinateN(n.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var f=o.next(),h=f.getValue(),l=h.count;e._bnRule.isInBoundary(l)&&i.add(f.getKey())}return Q.toCoordinateArray(i)},Me.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new rn,this._endpointMap.put(t,e)),e.count++},Me.prototype.interfaces_=function(){return[]},Me.prototype.getClass=function(){return Me},Me.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new Me(t);return e.getBoundary()}else if(arguments.length===2){var i=arguments[0],r=arguments[1],n=new Me(i,r);return n.getBoundary()}};var rn=function(){this.count=null};rn.prototype.interfaces_=function(){return[]},rn.prototype.getClass=function(){return rn};function yf(){}function mf(){}var vf=function(){};function _f(){}function Cf(){}function Wf(){}var Oe=function(){},Xn={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe},Oe.chars=function(t,e){for(var i=new Array(e).fill(null),r=0;r<e;r++)i[r]=t;return String(i)},Oe.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new _f,i=new yf;return t.printStackTrace(i),e.toString()}else if(arguments.length===2){var r=arguments[0],n=arguments[1],o="";new mf(Oe.getStackTrace(r));for(var f=new Wf,h=0;h<n;h++)try{o+=f.readLine()+Oe.NEWLINE}catch(l){if(l instanceof Cf)j.shouldNeverReachHere();else throw l}finally{}return o}},Oe.split=function(t,e){for(var i=e.length,r=new x,n=""+t,o=n.indexOf(e);o>=0;){var f=n.substring(0,o);r.add(f),n=n.substring(o+i),o=n.indexOf(e)}n.length>0&&r.add(n);for(var h=new Array(r.size()).fill(null),l=0;l<h.length;l++)h[l]=r.get(l);return h},Oe.toString=function(){if(arguments.length===1){var t=arguments[0];return Oe.SIMPLE_ORDINATE_FORMAT.format(t)}},Oe.spaces=function(t){return Oe.chars(" ",t)},Xn.NEWLINE.get=function(){return Xt.getProperty("line.separator")},Xn.SIMPLE_ORDINATE_FORMAT.get=function(){return new vf},Object.defineProperties(Oe,Xn);var Lt=function(){};Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Lt.copyCoord=function(t,e,i,r){for(var n=Math.min(t.getDimension(),i.getDimension()),o=0;o<n;o++)i.setOrdinate(r,o,t.getOrdinate(e,o))},Lt.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,et.X)===t.getOrdinate(e-1,et.X)&&t.getOrdinate(0,et.Y)===t.getOrdinate(e-1,et.Y)},Lt.isEqual=function(t,e){var i=t.size(),r=e.size();if(i!==r)return!1;for(var n=Math.min(t.getDimension(),e.getDimension()),o=0;o<i;o++)for(var f=0;f<n;f++){var h=t.getOrdinate(o,f),l=e.getOrdinate(o,f);if(t.getOrdinate(o,f)!==e.getOrdinate(o,f)&&!(Z.isNaN(h)&&Z.isNaN(l)))return!1}return!0},Lt.extend=function(t,e,i){var r=t.create(i,e.getDimension()),n=e.size();if(Lt.copy(e,0,r,0,n),n>0)for(var o=n;o<i;o++)Lt.copy(e,n-1,r,o,1);return r},Lt.reverse=function(t){for(var e=t.size()-1,i=Math.trunc(e/2),r=0;r<=i;r++)Lt.swap(t,r,e-r)},Lt.swap=function(t,e,i){if(e===i)return null;for(var r=0;r<t.getDimension();r++){var n=t.getOrdinate(e,r);t.setOrdinate(e,r,t.getOrdinate(i,r)),t.setOrdinate(i,r,n)}},Lt.copy=function(t,e,i,r,n){for(var o=0;o<n;o++)Lt.copyCoord(t,e+o,i,r+o)},Lt.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var i=t.getDimension(),r=new $e;r.append("(");for(var n=0;n<e;n++){n>0&&r.append(" ");for(var o=0;o<i;o++)o>0&&r.append(","),r.append(Oe.toString(t.getOrdinate(n,o)))}return r.append(")"),r.toString()}},Lt.ensureValidRing=function(t,e){var i=e.size();if(i===0)return e;if(i<=3)return Lt.createClosedRing(t,e,4);var r=e.getOrdinate(0,et.X)===e.getOrdinate(i-1,et.X)&&e.getOrdinate(0,et.Y)===e.getOrdinate(i-1,et.Y);return r?e:Lt.createClosedRing(t,e,i+1)},Lt.createClosedRing=function(t,e,i){var r=t.create(i,e.getDimension()),n=e.size();Lt.copy(e,0,r,0,n);for(var o=n;o<i;o++)Lt.copy(e,0,r,o,1);return r};var Wt=function(s){function t(i,r){s.call(this,r),this._points=null,this.init(i)}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new V:this._points.expandEnvelope(new V)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return s.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var r=this;if(arguments.length===2){var n=arguments[0],o=arguments[1];if(!this.isEquivalentClass(n))return!1;var f=n;if(this._points.size()!==f._points.size())return!1;for(var h=0;h<this._points.size();h++)if(!r.equal(r._points.getCoordinate(h),f._points.getCoordinate(h),o))return!1;return!0}else return s.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var r=this,n=0;n<Math.trunc(this._points.size()/2);n++){var o=r._points.size()-1-n;if(!r._points.getCoordinate(n).equals(r._points.getCoordinate(o)))return r._points.getCoordinate(n).compareTo(r._points.getCoordinate(o))>0&&Lt.reverse(r._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?st.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return k.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var r=this._points.copy();Lt.reverse(r);var n=this.getFactory().createLineString(r);return n},t.prototype.compareToSameClass=function(){var r=this;if(arguments.length===1){for(var n=arguments[0],o=n,f=0,h=0;f<this._points.size()&&h<o._points.size();){var l=r._points.getCoordinate(f).compareTo(o._points.getCoordinate(h));if(l!==0)return l;f++,h++}return f<this._points.size()?1:h<o._points.size()?-1:0}else if(arguments.length===2){var a=arguments[0],c=arguments[1],p=a;return c.compare(this._points,p._points)}},t.prototype.apply=function(){var r=this;if(U(arguments[0],Ci))for(var n=arguments[0],o=0;o<this._points.size();o++)n.filter(r._points.getCoordinate(o));else if(U(arguments[0],Ue)){var f=arguments[0];if(this._points.size()===0)return null;for(var h=0;h<this._points.size()&&(f.filter(r._points,h),!f.isDone());h++);f.isGeometryChanged()&&this.geometryChanged()}else if(U(arguments[0],si)){var l=arguments[0];l.filter(this)}else if(U(arguments[0],Mi)){var a=arguments[0];a.filter(this)}},t.prototype.getBoundary=function(){return new Me(this).getBoundary()},t.prototype.isEquivalentClass=function(r){return r instanceof t},t.prototype.clone=function(){var r=s.prototype.clone.call(this);return r._points=this._points.clone(),r},t.prototype.getCoordinateN=function(r){return this._points.getCoordinate(r)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(r){if(r===null&&(r=this.getFactory().getCoordinateSequenceFactory().create([])),r.size()===1)throw new vt("Invalid number of points in LineString (found "+r.size()+" - must be 0 or >= 2)");this._points=r},t.prototype.isCoordinate=function(r){for(var n=this,o=0;o<this._points.size();o++)if(n._points.getCoordinate(o).equals(r))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(r){return this.getFactory().createPoint(this._points.getCoordinate(r))},t.prototype.interfaces_=function(){return[As]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(z),ws=function(){};ws.prototype.interfaces_=function(){return[]},ws.prototype.getClass=function(){return ws};var me=function(s){function t(i,r){s.call(this,r),this._coordinates=i||null,this.init(this._coordinates)}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new V;var r=new V;return r.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),r},t.prototype.getSortIndex=function(){return s.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var r=arguments[0],n=arguments[1];return this.isEquivalentClass(r)?this.isEmpty()&&r.isEmpty()?!0:this.isEmpty()!==r.isEmpty()?!1:this.equal(r.getCoordinate(),this.getCoordinate(),n):!1}else return s.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return st.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var r=arguments[0],n=r;return this.getCoordinate().compareTo(n.getCoordinate())}else if(arguments.length===2){var o=arguments[0],f=arguments[1],h=o;return f.compare(this._coordinates,h._coordinates)}},t.prototype.apply=function(){if(U(arguments[0],Ci)){var r=arguments[0];if(this.isEmpty())return null;r.filter(this.getCoordinate())}else if(U(arguments[0],Ue)){var n=arguments[0];if(this.isEmpty())return null;n.filter(this._coordinates,0),n.isGeometryChanged()&&this.geometryChanged()}else if(U(arguments[0],si)){var o=arguments[0];o.filter(this)}else if(U(arguments[0],Mi)){var f=arguments[0];f.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var r=s.prototype.clone.call(this);return r._coordinates=this._coordinates.clone(),r},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(r){r===null&&(r=this.getFactory().getCoordinateSequenceFactory().create([])),j.isTrue(r.size()<=1),this._coordinates=r},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[ws]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(z),Ki=function(){};Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki};var Bt=function(s){function t(i,r,n){if(s.call(this,n),this._shell=null,this._holes=null,i===null&&(i=this.getFactory().createLinearRing()),r===null&&(r=[]),s.hasNullElements(r))throw new vt("holes must not contain null elements");if(i.isEmpty()&&s.hasNonEmptyElements(r))throw new vt("shell is empty but holes are not");this._shell=i,this._holes=r}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return s.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var r=this;if(this.isEmpty())return[];for(var n=new Array(this.getNumPoints()).fill(null),o=-1,f=this._shell.getCoordinates(),h=0;h<f.length;h++)o++,n[o]=f[h];for(var l=0;l<this._holes.length;l++)for(var a=r._holes[l].getCoordinates(),c=0;c<a.length;c++)o++,n[o]=a[c];return n},t.prototype.getArea=function(){var r=this,n=0;n+=Math.abs(k.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)n-=Math.abs(k.signedArea(r._holes[o].getCoordinateSequence()));return n},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var r=this._shell.getCoordinateSequence(),n=this.getEnvelopeInternal(),o=0;o<5;o++){var f=r.getX(o);if(!(f===n.getMinX()||f===n.getMaxX()))return!1;var h=r.getY(o);if(!(h===n.getMinY()||h===n.getMaxY()))return!1}for(var l=r.getX(0),a=r.getY(0),c=1;c<=4;c++){var p=r.getX(c),d=r.getY(c),u=p!==l,v=d!==a;if(u===v)return!1;l=p,a=d}return!0},t.prototype.equalsExact=function(){var r=this;if(arguments.length===2){var n=arguments[0],o=arguments[1];if(!this.isEquivalentClass(n))return!1;var f=n,h=this._shell,l=f._shell;if(!h.equalsExact(l,o)||this._holes.length!==f._holes.length)return!1;for(var a=0;a<this._holes.length;a++)if(!r._holes[a].equalsExact(f._holes[a],o))return!1;return!0}else return s.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var r=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var n=0;n<this._holes.length;n++)r.normalize(r._holes[n],!1);hr.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],f=arguments[1];if(o.isEmpty())return null;var h=new Array(o.getCoordinates().length-1).fill(null);Xt.arraycopy(o.getCoordinates(),0,h,0,h.length);var l=Q.minCoordinate(o.getCoordinates());Q.scroll(h,l),Xt.arraycopy(h,0,o.getCoordinates(),0,h.length),o.getCoordinates()[h.length]=h[0],k.isCCW(o.getCoordinates())===f&&Q.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var r=this,n=0;n+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)n+=r._holes[o].getLength();return n},t.prototype.getNumPoints=function(){for(var r=this,n=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)n+=r._holes[o].getNumPoints();return n},t.prototype.reverse=function(){var r=this,n=this.copy();n._shell=this._shell.copy().reverse(),n._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)n._holes[o]=r._holes[o].copy().reverse();return n},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var r=this;if(arguments.length===1){var n=arguments[0],o=this._shell,f=n._shell;return o.compareToSameClass(f)}else if(arguments.length===2){var h=arguments[0],l=arguments[1],a=h,c=this._shell,p=a._shell,d=c.compareToSameClass(p,l);if(d!==0)return d;for(var u=this.getNumInteriorRing(),v=a.getNumInteriorRing(),C=0;C<u&&C<v;){var W=r.getInteriorRingN(C),_=a.getInteriorRingN(C),T=W.compareToSameClass(_,l);if(T!==0)return T;C++}return C<u?1:C<v?-1:0}},t.prototype.apply=function(r){var n=this;if(U(r,Ci)){this._shell.apply(r);for(var o=0;o<this._holes.length;o++)n._holes[o].apply(r)}else if(U(r,Ue)){if(this._shell.apply(r),!r.isDone())for(var f=0;f<this._holes.length&&(n._holes[f].apply(r),!r.isDone());f++);r.isGeometryChanged()&&this.geometryChanged()}else if(U(r,si))r.filter(this);else if(U(r,Mi)){r.filter(this),this._shell.apply(r);for(var h=0;h<this._holes.length;h++)n._holes[h].apply(r)}},t.prototype.getBoundary=function(){var r=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var n=new Array(this._holes.length+1).fill(null);n[0]=this._shell;for(var o=0;o<this._holes.length;o++)n[o+1]=r._holes[o];return n.length<=1?this.getFactory().createLinearRing(n[0].getCoordinateSequence()):this.getFactory().createMultiLineString(n)},t.prototype.clone=function(){var r=this,n=s.prototype.clone.call(this);n._shell=this._shell.clone(),n._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)n._holes[o]=r._holes[o].clone();return n},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var r=this,n=this._shell.copy(),o=new Array(this._holes.length).fill(null),f=0;f<o.length;f++)o[f]=r._holes[f].copy();return new t(n,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(r){return this._holes[r]},t.prototype.interfaces_=function(){return[Ki]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(z),is=function(s){function t(){s.apply(this,arguments)}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return z.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var r=arguments[0],n=arguments[1];return this.isEquivalentClass(r)?s.prototype.equalsExact.call(this,r,n):!1}else return s.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var r=arguments[0];return this._geometries[r].getCoordinate()}else return s.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return st.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var r=this,n=new Array(this._geometries.length).fill(null),o=0;o<n.length;o++)n[o]=r._geometries[o].copy();return new t(n,this._factory)},t.prototype.interfaces_=function(){return[ws]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(te),Wi=function(s){function t(i,r){i instanceof L&&r instanceof $&&(i=r.getCoordinateSequenceFactory().create(i)),s.call(this,i,r),this.validateConstruction()}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return z.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return st.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:s.prototype.isClosed.call(this)},t.prototype.reverse=function(){var r=this._points.copy();Lt.reverse(r);var n=this.getFactory().createLinearRing(r);return n},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!s.prototype.isClosed.call(this))throw new vt("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new vt("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(Wt),Ti=function(s){function t(){s.apply(this,arguments)}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return z.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var r=arguments[0],n=arguments[1];return this.isEquivalentClass(r)?s.prototype.equalsExact.call(this,r,n):!1}else return s.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var r=this,n=this._geometries.length,o=new Array(n).fill(null),f=0;f<this._geometries.length;f++)o[f]=r._geometries[f].reverse();return this.getFactory().createMultiPolygon(o)},t.prototype.getBoundary=function(){var r=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var n=new x,o=0;o<this._geometries.length;o++)for(var f=r._geometries[o],h=f.getBoundary(),l=0;l<h.getNumGeometries();l++)n.add(h.getGeometryN(l));var a=new Array(n.size()).fill(null);return this.getFactory().createMultiLineString(n.toArray(a))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var r=this,n=new Array(this._geometries.length).fill(null),o=0;o<n.length;o++)n[o]=r._geometries[o].copy();return new t(n,this._factory)},t.prototype.interfaces_=function(){return[Ki]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(te),Fe=function(t){this._factory=t||null,this._isUserDataCopied=!1},sn={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};Fe.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},Fe.prototype.edit=function(t,e){if(t===null)return null;var i=this.editInternal(t,e);return this._isUserDataCopied&&i.setUserData(t.getUserData()),i},Fe.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof te?this.editGeometryCollection(t,e):t instanceof Bt?this.editPolygon(t,e):t instanceof me?e.edit(t,this._factory):t instanceof Wt?e.edit(t,this._factory):(j.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},Fe.prototype.editGeometryCollection=function(t,e){for(var i=this,r=e.edit(t,this._factory),n=new x,o=0;o<r.getNumGeometries();o++){var f=i.edit(r.getGeometryN(o),e);f===null||f.isEmpty()||n.add(f)}return r.getClass()===is?this._factory.createMultiPoint(n.toArray([])):r.getClass()===lr?this._factory.createMultiLineString(n.toArray([])):r.getClass()===Ti?this._factory.createMultiPolygon(n.toArray([])):this._factory.createGeometryCollection(n.toArray([]))},Fe.prototype.editPolygon=function(t,e){var i=this,r=e.edit(t,this._factory);if(r===null&&(r=this._factory.createPolygon(null)),r.isEmpty())return r;var n=this.edit(r.getExteriorRing(),e);if(n===null||n.isEmpty())return this._factory.createPolygon();for(var o=new x,f=0;f<r.getNumInteriorRing();f++){var h=i.edit(r.getInteriorRingN(f),e);h===null||h.isEmpty()||o.add(h)}return this._factory.createPolygon(n,o.toArray([]))},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe},Fe.GeometryEditorOperation=function(){},sn.NoOpGeometryOperation.get=function(){return Es},sn.CoordinateOperation.get=function(){return Ps},sn.CoordinateSequenceOperation.get=function(){return Ss},Object.defineProperties(Fe,sn);var Es=function(){};Es.prototype.edit=function(t,e){return t},Es.prototype.interfaces_=function(){return[Fe.GeometryEditorOperation]},Es.prototype.getClass=function(){return Es};var Ps=function(){};Ps.prototype.edit=function(t,e){var i=this.editCoordinates(t.getCoordinates(),t);return i===null?t:t instanceof Wi?e.createLinearRing(i):t instanceof Wt?e.createLineString(i):t instanceof me?i.length>0?e.createPoint(i[0]):e.createPoint():t},Ps.prototype.interfaces_=function(){return[Fe.GeometryEditorOperation]},Ps.prototype.getClass=function(){return Ps};var Ss=function(){};Ss.prototype.edit=function(t,e){return t instanceof Wi?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Wt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof me?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},Ss.prototype.interfaces_=function(){return[Fe.GeometryEditorOperation]},Ss.prototype.getClass=function(){return Ss};var At=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var i=0;i<e;i++)t._coordinates[i]=new L}else if(U(arguments[0],et)){var r=arguments[0];if(r===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=r.getDimension(),this._coordinates=new Array(r.size()).fill(null);for(var n=0;n<this._coordinates.length;n++)t._coordinates[n]=r.getCoordinateCopy(n)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],f=arguments[1];this._coordinates=o,this._dimension=f,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var h=arguments[0],l=arguments[1];this._coordinates=new Array(h).fill(null),this._dimension=l;for(var a=0;a<h;a++)t._coordinates[a]=new L}}},Mo={serialVersionUID:{configurable:!0}};At.prototype.setOrdinate=function(t,e,i){switch(e){case et.X:this._coordinates[t].x=i;break;case et.Y:this._coordinates[t].y=i;break;case et.Z:this._coordinates[t].z=i;break;default:throw new vt("invalid ordinateIndex")}},At.prototype.size=function(){return this._coordinates.length},At.prototype.getOrdinate=function(t,e){switch(e){case et.X:return this._coordinates[t].x;case et.Y:return this._coordinates[t].y;case et.Z:return this._coordinates[t].z}return Z.NaN},At.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],i=arguments[1];i.x=this._coordinates[e].x,i.y=this._coordinates[e].y,i.z=this._coordinates[e].z}},At.prototype.getCoordinateCopy=function(t){return new L(this._coordinates[t])},At.prototype.getDimension=function(){return this._dimension},At.prototype.getX=function(t){return this._coordinates[t].x},At.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),i=0;i<this._coordinates.length;i++)e[i]=t._coordinates[i].clone();return new At(e,this._dimension)},At.prototype.expandEnvelope=function(t){for(var e=this,i=0;i<this._coordinates.length;i++)t.expandToInclude(e._coordinates[i]);return t},At.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),i=0;i<this._coordinates.length;i++)e[i]=t._coordinates[i].copy();return new At(e,this._dimension)},At.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new $e(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var i=1;i<this._coordinates.length;i++)e.append(", "),e.append(t._coordinates[i]);return e.append(")"),e.toString()}else return"()"},At.prototype.getY=function(t){return this._coordinates[t].y},At.prototype.toCoordinateArray=function(){return this._coordinates},At.prototype.interfaces_=function(){return[et,Re]},At.prototype.getClass=function(){return At},Mo.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(At,Mo);var Ii=function(){},Yn={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};Ii.prototype.readResolve=function(){return Ii.instance()},Ii.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new At(t)}else if(U(arguments[0],et)){var e=arguments[0];return new At(e)}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];return r>3&&(r=3),r<2?new At(i):new At(i,r)}},Ii.prototype.interfaces_=function(){return[qr,Re]},Ii.prototype.getClass=function(){return Ii},Ii.instance=function(){return Ii.instanceObject},Yn.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Yn.instanceObject.get=function(){return new Ii},Object.defineProperties(Ii,Yn);var Oo=function(s){function t(){s.call(this),this.map_=new Map}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.get=function(i){return this.map_.get(i)||null},t.prototype.put=function(i,r){return this.map_.set(i,r),r},t.prototype.values=function(){for(var i=new x,r=this.map_.values(),n=r.next();!n.done;)i.add(n.value),n=r.next();return i},t.prototype.entrySet=function(){var i=new Vn;return this.map_.entries().forEach(function(r){return i.add(r)}),i},t.prototype.size=function(){return this.map_.size()},t}(br),nt=function s(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=s.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof ni){var t=arguments[0];this._modelType=t,t===s.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=s.FIXED,this.setScale(e)}else if(arguments[0]instanceof s){var i=arguments[0];this._modelType=i._modelType,this._scale=i._scale}}},zn={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};nt.prototype.equals=function(t){if(!(t instanceof nt))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},nt.prototype.compareTo=function(t){var e=t,i=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new ti(i).compareTo(new ti(r))},nt.prototype.getScale=function(){return this._scale},nt.prototype.isFloating=function(){return this._modelType===nt.FLOATING||this._modelType===nt.FLOATING_SINGLE},nt.prototype.getType=function(){return this._modelType},nt.prototype.toString=function(){var t="UNKNOWN";return this._modelType===nt.FLOATING?t="Floating":this._modelType===nt.FLOATING_SINGLE?t="Floating-Single":this._modelType===nt.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},nt.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(Z.isNaN(t))return t;if(this._modelType===nt.FLOATING_SINGLE){var e=t;return e}return this._modelType===nt.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof L){var i=arguments[0];if(this._modelType===nt.FLOATING)return null;i.x=this.makePrecise(i.x),i.y=this.makePrecise(i.y)}},nt.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===nt.FLOATING?t=16:this._modelType===nt.FLOATING_SINGLE?t=6:this._modelType===nt.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},nt.prototype.setScale=function(t){this._scale=Math.abs(t)},nt.prototype.interfaces_=function(){return[Re,De]},nt.prototype.getClass=function(){return nt},nt.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},zn.serialVersionUID.get=function(){return 7777263578777804e3},zn.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(nt,zn);var ni=function s(t){this._name=t||null,s.nameToTypeMap.put(t,this)},Un={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ni.prototype.readResolve=function(){return ni.nameToTypeMap.get(this._name)},ni.prototype.toString=function(){return this._name},ni.prototype.interfaces_=function(){return[Re]},ni.prototype.getClass=function(){return ni},Un.serialVersionUID.get=function(){return-552860263173159e4},Un.nameToTypeMap.get=function(){return new Oo},Object.defineProperties(ni,Un),nt.Type=ni,nt.FIXED=new ni("FIXED"),nt.FLOATING=new ni("FLOATING"),nt.FLOATING_SINGLE=new ni("FLOATING SINGLE");var $=function s(){this._precisionModel=new nt,this._SRID=0,this._coordinateSequenceFactory=s.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?U(arguments[0],qr)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof nt&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},Fo={serialVersionUID:{configurable:!0}};$.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new L(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new L(t.getMinX(),t.getMinY()),new L(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new L(t.getMinX(),t.getMinY()),new L(t.getMinX(),t.getMaxY()),new L(t.getMaxX(),t.getMaxY()),new L(t.getMaxX(),t.getMinY()),new L(t.getMinX(),t.getMinY())]),null)},$.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new Wt(this.getCoordinateSequenceFactory().create(t),this);if(U(t,et))return new Wt(t,this)}else return new Wt(this.getCoordinateSequenceFactory().create([]),this)},$.prototype.createMultiLineString=function(){if(arguments.length===0)return new lr(null,this);if(arguments.length===1){var t=arguments[0];return new lr(t,this)}},$.prototype.buildGeometry=function(t){for(var e=null,i=!1,r=!1,n=t.iterator();n.hasNext();){var o=n.next(),f=o.getClass();e===null&&(e=f),f!==e&&(i=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(e===null)return this.createGeometryCollection();if(i||r)return this.createGeometryCollection($.toGeometryArray(t));var h=t.iterator().next(),l=t.size()>1;if(l){if(h instanceof Bt)return this.createMultiPolygon($.toPolygonArray(t));if(h instanceof Wt)return this.createMultiLineString($.toLineStringArray(t));if(h instanceof me)return this.createMultiPoint($.toPointArray(t));j.shouldNeverReachHere("Unhandled class: "+h.getClass().getName())}return h},$.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},$.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(U(arguments[0],et)){var e=arguments[0];return new me(e,this)}}},$.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},$.prototype.createPolygon=function(){if(arguments.length===0)return new Bt(null,null,this);if(arguments.length===1){if(U(arguments[0],et)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Wi){var i=arguments[0];return this.createPolygon(i,null)}}else if(arguments.length===2){var r=arguments[0],n=arguments[1];return new Bt(r,n,this)}},$.prototype.getSRID=function(){return this._SRID},$.prototype.createGeometryCollection=function(){if(arguments.length===0)return new te(null,this);if(arguments.length===1){var t=arguments[0];return new te(t,this)}},$.prototype.createGeometry=function(t){var e=new Fe(this);return e.edit(t,{edit:function(){if(arguments.length===2){var i=arguments[0];return this._coordinateSequenceFactory.create(i)}}})},$.prototype.getPrecisionModel=function(){return this._precisionModel},$.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(U(arguments[0],et)){var e=arguments[0];return new Wi(e,this)}}},$.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Ti(null,this);if(arguments.length===1){var t=arguments[0];return new Ti(t,this)}},$.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new is(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new is(e,this)}else if(arguments[0]instanceof Array){var i=arguments[0];return this.createMultiPoint(i!==null?this.getCoordinateSequenceFactory().create(i):null)}else if(U(arguments[0],et)){var r=arguments[0];if(r===null)return this.createMultiPoint(new Array(0).fill(null));for(var n=new Array(r.size()).fill(null),o=0;o<r.size();o++){var f=t.getCoordinateSequenceFactory().create(1,r.getDimension());Lt.copy(r,o,f,0,1),n[o]=t.createPoint(f)}return this.createMultiPoint(n)}}},$.prototype.interfaces_=function(){return[Re]},$.prototype.getClass=function(){return $},$.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},$.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},$.getDefaultCoordinateSequenceFactory=function(){return Ii.instance()},$.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},$.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},$.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},$.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},$.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},$.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},$.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},Fo.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties($,Fo);var Tf=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],nn=function(t){this.geometryFactory=t||new $};nn.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var i=e.type;if(!oi[i])throw new Error("Unknown GeoJSON type: "+e.type);return Tf.indexOf(i)!==-1?oi[i].apply(this,[e.coordinates]):i==="GeometryCollection"?oi[i].apply(this,[e.geometries]):oi[i].apply(this,[e])},nn.prototype.write=function(t){var e=t.getGeometryType();if(!ki[e])throw new Error("Geometry is not supported");return ki[e].apply(this,[t])};var oi={Feature:function(s){var t={};for(var e in s)t[e]=s[e];if(s.geometry){var i=s.geometry.type;if(!oi[i])throw new Error("Unknown GeoJSON type: "+s.type);t.geometry=this.read(s.geometry)}return s.bbox&&(t.bbox=oi.bbox.apply(this,[s.bbox])),t},FeatureCollection:function(s){var t=this,e={};if(s.features){e.features=[];for(var i=0;i<s.features.length;++i)e.features.push(t.read(s.features[i]))}return s.bbox&&(e.bbox=this.parse.bbox.apply(this,[s.bbox])),e},coordinates:function(s){for(var t=[],e=0;e<s.length;++e){var i=s[e];t.push(new L(i[0],i[1]))}return t},bbox:function(s){return this.geometryFactory.createLinearRing([new L(s[0],s[1]),new L(s[2],s[1]),new L(s[2],s[3]),new L(s[0],s[3]),new L(s[0],s[1])])},Point:function(s){var t=new L(s[0],s[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(s){for(var t=this,e=[],i=0;i<s.length;++i)e.push(oi.Point.apply(t,[s[i]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(s){var t=oi.coordinates.apply(this,[s]);return this.geometryFactory.createLineString(t)},MultiLineString:function(s){for(var t=this,e=[],i=0;i<s.length;++i)e.push(oi.LineString.apply(t,[s[i]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(s){for(var t=this,e=oi.coordinates.apply(this,[s[0]]),i=this.geometryFactory.createLinearRing(e),r=[],n=1;n<s.length;++n){var o=s[n],f=oi.coordinates.apply(t,[o]),h=t.geometryFactory.createLinearRing(f);r.push(h)}return this.geometryFactory.createPolygon(i,r)},MultiPolygon:function(s){for(var t=this,e=[],i=0;i<s.length;++i){var r=s[i];e.push(oi.Polygon.apply(t,[r]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(s){for(var t=this,e=[],i=0;i<s.length;++i){var r=s[i];e.push(t.read(r))}return this.geometryFactory.createGeometryCollection(e)}},ki={coordinate:function(s){return[s.x,s.y]},Point:function(s){var t=ki.coordinate.apply(this,[s.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(s){for(var t=this,e=[],i=0;i<s._geometries.length;++i){var r=s._geometries[i],n=ki.Point.apply(t,[r]);e.push(n.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(s){for(var t=this,e=[],i=s.getCoordinates(),r=0;r<i.length;++r){var n=i[r];e.push(ki.coordinate.apply(t,[n]))}return{type:"LineString",coordinates:e}},MultiLineString:function(s){for(var t=this,e=[],i=0;i<s._geometries.length;++i){var r=s._geometries[i],n=ki.LineString.apply(t,[r]);e.push(n.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(s){var t=this,e=[],i=ki.LineString.apply(this,[s._shell]);e.push(i.coordinates);for(var r=0;r<s._holes.length;++r){var n=s._holes[r],o=ki.LineString.apply(t,[n]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(s){for(var t=this,e=[],i=0;i<s._geometries.length;++i){var r=s._geometries[i],n=ki.Polygon.apply(t,[r]);e.push(n.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(s){for(var t=this,e=[],i=0;i<s._geometries.length;++i){var r=s._geometries[i],n=r.getGeometryType();e.push(ki[n].apply(t,[r]))}return{type:"GeometryCollection",geometries:e}}},qn=function(t){this.geometryFactory=t||new $,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new nn(this.geometryFactory)};qn.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===nt.FIXED&&this.reducePrecision(e),e},qn.prototype.reducePrecision=function(t){var e=this,i,r;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(i=0,r=t.points.length;i<r;i++)e.precisionModel.makePrecise(t.points[i]);else if(t.geometries)for(i=0,r=t.geometries.length;i<r;i++)e.reducePrecision(t.geometries[i])};var xo=function(){this.parser=new nn(this.geometryFactory)};xo.prototype.write=function(t){return this.parser.write(t)};var M=function(){},on={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};M.prototype.interfaces_=function(){return[]},M.prototype.getClass=function(){return M},M.opposite=function(t){return t===M.LEFT?M.RIGHT:t===M.RIGHT?M.LEFT:t},on.ON.get=function(){return 0},on.LEFT.get=function(){return 1},on.RIGHT.get=function(){return 2},Object.defineProperties(M,on);function an(s){this.message=s||""}an.prototype=new Error,an.prototype.name="EmptyStackException";function ai(){this.array_=[]}ai.prototype=new Ye,ai.prototype.add=function(s){return this.array_.push(s),!0},ai.prototype.get=function(s){if(s<0||s>=this.size())throw new Error;return this.array_[s]},ai.prototype.push=function(s){return this.array_.push(s),s},ai.prototype.pop=function(s){if(this.array_.length===0)throw new an;return this.array_.pop()},ai.prototype.peek=function(){if(this.array_.length===0)throw new an;return this.array_[this.array_.length-1]},ai.prototype.empty=function(){return this.array_.length===0},ai.prototype.isEmpty=function(){return this.empty()},ai.prototype.search=function(s){return this.array_.indexOf(s)},ai.prototype.size=function(){return this.array_.length},ai.prototype.toArray=function(){for(var s=this,t=[],e=0,i=this.array_.length;e<i;e++)t.push(s.array_[e]);return t};var fi=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};fi.prototype.getCoordinate=function(){return this._minCoord},fi.prototype.getRightmostSide=function(t,e){var i=this.getRightmostSideOfSegment(t,e);return i<0&&(i=this.getRightmostSideOfSegment(t,e-1)),i<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),i},fi.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();j.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],i=t[this._minIndex+1],r=k.computeOrientation(this._minCoord,i,e),n=!1;(e.y<this._minCoord.y&&i.y<this._minCoord.y&&r===k.COUNTERCLOCKWISE||e.y>this._minCoord.y&&i.y>this._minCoord.y&&r===k.CLOCKWISE)&&(n=!0),n&&(this._minIndex=this._minIndex-1)},fi.prototype.getRightmostSideOfSegment=function(t,e){var i=t.getEdge(),r=i.getCoordinates();if(e<0||e+1>=r.length||r[e].y===r[e+1].y)return-1;var n=M.LEFT;return r[e].y<r[e+1].y&&(n=M.RIGHT),n},fi.prototype.getEdge=function(){return this._orientedDe},fi.prototype.checkForRightmostCoordinate=function(t){for(var e=this,i=t.getEdge().getCoordinates(),r=0;r<i.length-1;r++)(e._minCoord===null||i[r].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=r,e._minCoord=i[r])},fi.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},fi.prototype.findEdge=function(t){for(var e=this,i=t.iterator();i.hasNext();){var r=i.next();r.isForward()&&e.checkForRightmostCoordinate(r)}j.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var n=this.getRightmostSide(this._minDe,this._minIndex);n===M.LEFT&&(this._orientedDe=this._minDe.getSym())},fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi};var Vi=function(s){function t(e,i){s.call(this,t.msgWithCoord(e,i)),this.pt=i?new L(i):null,this.name="TopologyException"}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(i,r){return r?i:i+" [ "+r+" ]"},t}(Bi),fn=function(){this.array_=[]};fn.prototype.addLast=function(t){this.array_.push(t)},fn.prototype.removeFirst=function(){return this.array_.shift()},fn.prototype.isEmpty=function(){return this.array_.length===0};var ee=function(){this._finder=null,this._dirEdgeList=new x,this._nodes=new x,this._rightMostCoord=null,this._env=null,this._finder=new fi};ee.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},ee.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},ee.prototype.computeNodeDepth=function(t){for(var e=this,i=null,r=t.getEdges().iterator();r.hasNext();){var n=r.next();if(n.isVisited()||n.getSym().isVisited()){i=n;break}}if(i===null)throw new Vi("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(i);for(var o=t.getEdges().iterator();o.hasNext();){var f=o.next();f.setVisited(!0),e.copySymDepths(f)}},ee.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(M.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},ee.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},ee.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(M.RIGHT)>=1&&e.getDepth(M.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},ee.prototype.computeDepths=function(t){var e=this,i=new Vn,r=new fn,n=t.getNode();for(r.addLast(n),i.add(n),t.setVisited(!0);!r.isEmpty();){var o=r.removeFirst();i.add(o),e.computeNodeDepth(o);for(var f=o.getEdges().iterator();f.hasNext();){var h=f.next(),l=h.getSym();if(!l.isVisited()){var a=l.getNode();i.contains(a)||(r.addLast(a),i.add(a))}}}},ee.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},ee.prototype.getEnvelope=function(){if(this._env===null){for(var t=new V,e=this._dirEdgeList.iterator();e.hasNext();)for(var i=e.next(),r=i.getEdge().getCoordinates(),n=0;n<r.length-1;n++)t.expandToInclude(r[n]);this._env=t}return this._env},ee.prototype.addReachable=function(t){var e=this,i=new ai;for(i.add(t);!i.empty();){var r=i.pop();e.add(r,i)}},ee.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(M.LEFT,t.getDepth(M.RIGHT)),e.setDepth(M.RIGHT,t.getDepth(M.LEFT))},ee.prototype.add=function(t,e){var i=this;t.setVisited(!0),this._nodes.add(t);for(var r=t.getEdges().iterator();r.hasNext();){var n=r.next();i._dirEdgeList.add(n);var o=n.getSym(),f=o.getNode();f.isVisited()||e.push(f)}},ee.prototype.getNodes=function(){return this._nodes},ee.prototype.getDirectedEdges=function(){return this._dirEdgeList},ee.prototype.interfaces_=function(){return[De]},ee.prototype.getClass=function(){return ee};var dt=function s(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var i=arguments[0];this.init(1),this.location[M.ON]=i}else if(arguments[0]instanceof s){var r=arguments[0];if(this.init(r.location.length),r!==null)for(var n=0;n<this.location.length;n++)t.location[n]=r.location[n]}}else if(arguments.length===3){var o=arguments[0],f=arguments[1],h=arguments[2];this.init(3),this.location[M.ON]=o,this.location[M.LEFT]=f,this.location[M.RIGHT]=h}};dt.prototype.setAllLocations=function(t){for(var e=this,i=0;i<this.location.length;i++)e.location[i]=t},dt.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==E.NONE)return!1;return!0},dt.prototype.setAllLocationsIfNull=function(t){for(var e=this,i=0;i<this.location.length;i++)e.location[i]===E.NONE&&(e.location[i]=t)},dt.prototype.isLine=function(){return this.location.length===1},dt.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var i=new Array(3).fill(null);i[M.ON]=this.location[M.ON],i[M.LEFT]=E.NONE,i[M.RIGHT]=E.NONE,this.location=i}for(var r=0;r<this.location.length;r++)e.location[r]===E.NONE&&r<t.location.length&&(e.location[r]=t.location[r])},dt.prototype.getLocations=function(){return this.location},dt.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[M.LEFT];this.location[M.LEFT]=this.location[M.RIGHT],this.location[M.RIGHT]=t},dt.prototype.toString=function(){var t=new $e;return this.location.length>1&&t.append(E.toLocationSymbol(this.location[M.LEFT])),t.append(E.toLocationSymbol(this.location[M.ON])),this.location.length>1&&t.append(E.toLocationSymbol(this.location[M.RIGHT])),t.toString()},dt.prototype.setLocations=function(t,e,i){this.location[M.ON]=t,this.location[M.LEFT]=e,this.location[M.RIGHT]=i},dt.prototype.get=function(t){return t<this.location.length?this.location[t]:E.NONE},dt.prototype.isArea=function(){return this.location.length>1},dt.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===E.NONE)return!0;return!1},dt.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(M.ON,t)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];this.location[e]=i}},dt.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(E.NONE)},dt.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},dt.prototype.allPositionsEqual=function(t){for(var e=this,i=0;i<this.location.length;i++)if(e.location[i]!==t)return!1;return!0},dt.prototype.interfaces_=function(){return[]},dt.prototype.getClass=function(){return dt};var ut=function s(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new dt(t),this.elt[1]=new dt(t)}else if(arguments[0]instanceof s){var e=arguments[0];this.elt[0]=new dt(e.elt[0]),this.elt[1]=new dt(e.elt[1])}}else if(arguments.length===2){var i=arguments[0],r=arguments[1];this.elt[0]=new dt(E.NONE),this.elt[1]=new dt(E.NONE),this.elt[i].setLocation(r)}else if(arguments.length===3){var n=arguments[0],o=arguments[1],f=arguments[2];this.elt[0]=new dt(n,o,f),this.elt[1]=new dt(n,o,f)}else if(arguments.length===4){var h=arguments[0],l=arguments[1],a=arguments[2],c=arguments[3];this.elt[0]=new dt(E.NONE,E.NONE,E.NONE),this.elt[1]=new dt(E.NONE,E.NONE,E.NONE),this.elt[h].setLocations(l,a,c)}};ut.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},ut.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},ut.prototype.isNull=function(t){return this.elt[t].isNull()},ut.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];this.elt[e].setAllLocationsIfNull(i)}},ut.prototype.isLine=function(t){return this.elt[t].isLine()},ut.prototype.merge=function(t){for(var e=this,i=0;i<2;i++)e.elt[i]===null&&t.elt[i]!==null?e.elt[i]=new dt(t.elt[i]):e.elt[i].merge(t.elt[i])},ut.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},ut.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(M.ON)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];return this.elt[e].get(i)}},ut.prototype.toString=function(){var t=new $e;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},ut.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},ut.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},ut.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(M.ON,e)}else if(arguments.length===3){var i=arguments[0],r=arguments[1],n=arguments[2];this.elt[i].setLocation(r,n)}},ut.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},ut.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},ut.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new dt(this.elt[t].location[0]))},ut.prototype.interfaces_=function(){return[]},ut.prototype.getClass=function(){return ut},ut.toLineLabel=function(t){for(var e=new ut(E.NONE),i=0;i<2;i++)e.setLocation(i,t.getLocation(i));return e};var Nt=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new x,this._pts=new x,this._label=new ut(E.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new x,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Nt.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),i=0;i<this._pts.size();i++)e[i]=t._pts.get(i);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=k.isCCW(this._ring.getCoordinates())},Nt.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},Nt.prototype.computePoints=function(t){var e=this;this._startDe=t;var i=t,r=!0;do{if(i===null)throw new Vi("Found null DirectedEdge");if(i.getEdgeRing()===e)throw new Vi("Directed Edge visited twice during ring-building at "+i.getCoordinate());e._edges.add(i);var n=i.getLabel();j.isTrue(n.isArea()),e.mergeLabel(n),e.addPoints(i.getEdge(),i.isForward(),r),r=!1,e.setEdgeRing(i,e),i=e.getNext(i)}while(i!==this._startDe)},Nt.prototype.getLinearRing=function(){return this._ring},Nt.prototype.getCoordinate=function(t){return this._pts.get(t)},Nt.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var i=e.getNode(),r=i.getEdges().getOutgoingDegree(t);r>t._maxNodeDegree&&(t._maxNodeDegree=r),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},Nt.prototype.addPoints=function(t,e,i){var r=this,n=t.getCoordinates();if(e){var o=1;i&&(o=0);for(var f=o;f<n.length;f++)r._pts.add(n[f])}else{var h=n.length-2;i&&(h=n.length-1);for(var l=h;l>=0;l--)r._pts.add(n[l])}},Nt.prototype.isHole=function(){return this._isHole},Nt.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},Nt.prototype.containsPoint=function(t){var e=this.getLinearRing(),i=e.getEnvelopeInternal();if(!i.contains(t)||!k.isPointInRing(t,e.getCoordinates()))return!1;for(var r=this._holes.iterator();r.hasNext();){var n=r.next();if(n.containsPoint(t))return!1}return!0},Nt.prototype.addHole=function(t){this._holes.add(t)},Nt.prototype.isShell=function(){return this._shell===null},Nt.prototype.getLabel=function(){return this._label},Nt.prototype.getEdges=function(){return this._edges},Nt.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Nt.prototype.getShell=function(){return this._shell},Nt.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],i=arguments[1],r=e.getLocation(i,M.RIGHT);if(r===E.NONE)return null;if(this._label.getLocation(i)===E.NONE)return this._label.setLocation(i,r),null}},Nt.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},Nt.prototype.toPolygon=function(t){for(var e=this,i=new Array(this._holes.size()).fill(null),r=0;r<this._holes.size();r++)i[r]=e._holes.get(r).getLinearRing();var n=t.createPolygon(this.getLinearRing(),i);return n},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt};var If=function(s){function t(){var e=arguments[0],i=arguments[1];s.call(this,e,i)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(i,r){i.setMinEdgeRing(r)},t.prototype.getNext=function(i){return i.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Nt),Lf=function(s){function t(){var e=arguments[0],i=arguments[1];s.call(this,e,i)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var i=this,r=new x,n=this._startDe;do{if(n.getMinEdgeRing()===null){var o=new If(n,i._geometryFactory);r.add(o)}n=n.getNext()}while(n!==this._startDe);return r},t.prototype.setEdgeRing=function(i,r){i.setEdgeRing(r)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var i=this,r=this._startDe;do{var n=r.getNode();n.getEdges().linkMinimalDirectedEdges(i),r=r.getNext()}while(r!==this._startDe)},t.prototype.getNext=function(i){return i.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Nt),Le=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};Le.prototype.setVisited=function(t){this._isVisited=t},Le.prototype.setInResult=function(t){this._isInResult=t},Le.prototype.isCovered=function(){return this._isCovered},Le.prototype.isCoveredSet=function(){return this._isCoveredSet},Le.prototype.setLabel=function(t){this._label=t},Le.prototype.getLabel=function(){return this._label},Le.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Le.prototype.updateIM=function(t){j.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Le.prototype.isInResult=function(){return this._isInResult},Le.prototype.isVisited=function(){return this._isVisited},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le};var un=function(s){function t(){s.call(this),this._coord=null,this._edges=null;var e=arguments[0],i=arguments[1];this._coord=e,this._edges=i,this._label=new ut(0,E.NONE)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var i=this.getEdges().getEdges().iterator();i.hasNext();){var r=i.next();if(r.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(i){i.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(i){},t.prototype.computeMergedLocation=function(i,r){var n=E.NONE;if(n=this._label.getLocation(r),!i.isNull(r)){var o=i.getLocation(r);n!==E.BOUNDARY&&(n=o)}return n},t.prototype.setLabel=function(){if(arguments.length===2){var i=arguments[0],r=arguments[1];this._label===null?this._label=new ut(i,r):this._label.setLocation(i,r)}else return s.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var i=this;if(arguments[0]instanceof t){var r=arguments[0];this.mergeLabel(r._label)}else if(arguments[0]instanceof ut)for(var n=arguments[0],o=0;o<2;o++){var f=i.computeMergedLocation(n,o),h=i._label.getLocation(o);h===E.NONE&&i._label.setLocation(o,f)}},t.prototype.add=function(i){this._edges.insert(i),i.setNode(this)},t.prototype.setLabelBoundary=function(i){if(this._label===null)return null;var r=E.NONE;this._label!==null&&(r=this._label.getLocation(i));var n=null;switch(r){case E.BOUNDARY:n=E.INTERIOR;break;case E.INTERIOR:n=E.BOUNDARY;break;default:n=E.BOUNDARY;break}this._label.setLocation(i,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Le),ui=function(){this.nodeMap=new jt,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};ui.prototype.find=function(t){return this.nodeMap.get(t)},ui.prototype.addNode=function(){if(arguments[0]instanceof L){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof un){var i=arguments[0],r=this.nodeMap.get(i.getCoordinate());return r===null?(this.nodeMap.put(i.getCoordinate(),i),i):(r.mergeLabel(i),r)}},ui.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var i=e.next();i.print(t)}},ui.prototype.iterator=function(){return this.nodeMap.values().iterator()},ui.prototype.values=function(){return this.nodeMap.values()},ui.prototype.getBoundaryNodes=function(t){for(var e=new x,i=this.iterator();i.hasNext();){var r=i.next();r.getLabel().getLocation(t)===E.BOUNDARY&&e.add(r)}return e},ui.prototype.add=function(t){var e=t.getCoordinate(),i=this.addNode(e);i.add(t)},ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var ct=function(){},Ns={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};ct.prototype.interfaces_=function(){return[]},ct.prototype.getClass=function(){return ct},ct.isNorthern=function(t){return t===ct.NE||t===ct.NW},ct.isOpposite=function(t,e){if(t===e)return!1;var i=(t-e+4)%4;return i===2},ct.commonHalfPlane=function(t,e){if(t===e)return t;var i=(t-e+4)%4;if(i===2)return-1;var r=t<e?t:e,n=t>e?t:e;return r===0&&n===3?3:r},ct.isInHalfPlane=function(t,e){return e===ct.SE?t===ct.SE||t===ct.SW:t===e||t===e+1},ct.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new vt("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?ct.NE:ct.SE:e>=0?ct.NW:ct.SW}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var i=arguments[0],r=arguments[1];if(r.x===i.x&&r.y===i.y)throw new vt("Cannot compute the quadrant for two identical points "+i);return r.x>=i.x?r.y>=i.y?ct.NE:ct.SE:r.y>=i.y?ct.NW:ct.SW}},Ns.NE.get=function(){return 0},Ns.NW.get=function(){return 1},Ns.SW.get=function(){return 2},Ns.SE.get=function(){return 3},Object.defineProperties(ct,Ns);var Jt=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],i=arguments[1],r=arguments[2],n=null;this._edge=e,this.init(i,r),this._label=n}else if(arguments.length===4){var o=arguments[0],f=arguments[1],h=arguments[2],l=arguments[3];this._edge=o,this.init(f,h),this._label=l}};Jt.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:k.computeOrientation(t._p0,t._p1,this._p1)},Jt.prototype.getDy=function(){return this._dy},Jt.prototype.getCoordinate=function(){return this._p0},Jt.prototype.setNode=function(t){this._node=t},Jt.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),i=this.getClass().getName(),r=i.lastIndexOf("."),n=i.substring(r+1);t.print(" "+n+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},Jt.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Jt.prototype.getDirectedCoordinate=function(){return this._p1},Jt.prototype.getDx=function(){return this._dx},Jt.prototype.getLabel=function(){return this._label},Jt.prototype.getEdge=function(){return this._edge},Jt.prototype.getQuadrant=function(){return this._quadrant},Jt.prototype.getNode=function(){return this._node},Jt.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),i=e.lastIndexOf("."),r=e.substring(i+1);return" "+r+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},Jt.prototype.computeLabel=function(t){},Jt.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=ct.quadrant(this._dx,this._dy),j.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},Jt.prototype.interfaces_=function(){return[De]},Jt.prototype.getClass=function(){return Jt};var Zn=function(s){function t(){var e=arguments[0],i=arguments[1];if(s.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=i,i)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var r=e.getNumPoints()-1;this.init(e.getCoordinate(r),e.getCoordinate(r-1))}this.computeDirectedLabel()}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(i){return this._depth[i]},t.prototype.setVisited=function(i){this._isVisited=i},t.prototype.computeDirectedLabel=function(){this._label=new ut(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(i,r){if(this._depth[i]!==-999&&this._depth[i]!==r)throw new Vi("assigned depths do not match",this.getCoordinate());this._depth[i]=r},t.prototype.isInteriorAreaEdge=function(){for(var i=this,r=!0,n=0;n<2;n++)i._label.isArea(n)&&i._label.getLocation(n,M.LEFT)===E.INTERIOR&&i._label.getLocation(n,M.RIGHT)===E.INTERIOR||(r=!1);return r},t.prototype.setNextMin=function(i){this._nextMin=i},t.prototype.print=function(i){s.prototype.print.call(this,i),i.print(" "+this._depth[M.LEFT]+"/"+this._depth[M.RIGHT]),i.print(" ("+this.getDepthDelta()+")"),this._isInResult&&i.print(" inResult")},t.prototype.setMinEdgeRing=function(i){this._minEdgeRing=i},t.prototype.isLineEdge=function(){var i=this._label.isLine(0)||this._label.isLine(1),r=!this._label.isArea(0)||this._label.allPositionsEqual(0,E.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,E.EXTERIOR);return i&&r&&n},t.prototype.setEdgeRing=function(i){this._edgeRing=i},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var i=this._edge.getDepthDelta();return this._isForward||(i=-i),i},t.prototype.setInResult=function(i){this._isInResult=i},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(i){this.print(i),i.print(" "),this._isForward?this._edge.print(i):this._edge.printReverse(i)},t.prototype.setSym=function(i){this._sym=i},t.prototype.setVisitedEdge=function(i){this.setVisited(i),this._sym.setVisited(i)},t.prototype.setEdgeDepths=function(i,r){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var o=1;i===M.LEFT&&(o=-1);var f=M.opposite(i),h=n*o,l=r+h;this.setDepth(i,r),this.setDepth(f,l)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(i){this._next=i},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(i,r){return i===E.EXTERIOR&&r===E.INTERIOR?1:i===E.INTERIOR&&r===E.EXTERIOR?-1:0},t}(Jt),rs=function(){};rs.prototype.createNode=function(t){return new un(t,null)},rs.prototype.interfaces_=function(){return[]},rs.prototype.getClass=function(){return rs};var Ct=function(){if(this._edges=new x,this._nodes=null,this._edgeEndList=new x,arguments.length===0)this._nodes=new ui(new rs);else if(arguments.length===1){var t=arguments[0];this._nodes=new ui(t)}};Ct.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var i=0;i<this._edges.size();i++){t.println("edge "+i+":");var r=e._edges.get(i);r.print(t),r.eiList.print(t)}},Ct.prototype.find=function(t){return this._nodes.find(t)},Ct.prototype.addNode=function(){if(arguments[0]instanceof un){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof L){var e=arguments[0];return this._nodes.addNode(e)}},Ct.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ct.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},Ct.prototype.debugPrintln=function(t){Xt.out.println(t)},Ct.prototype.isBoundaryNode=function(t,e){var i=this._nodes.find(e);if(i===null)return!1;var r=i.getLabel();return r!==null&&r.getLocation(t)===E.BOUNDARY},Ct.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},Ct.prototype.matchInSameDirection=function(t,e,i,r){return t.equals(i)?k.computeOrientation(t,e,r)===k.COLLINEAR&&ct.quadrant(t,e)===ct.quadrant(i,r):!1},Ct.prototype.getEdgeEnds=function(){return this._edgeEndList},Ct.prototype.debugPrint=function(t){Xt.out.print(t)},Ct.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ct.prototype.findEdgeInSameDirection=function(t,e){for(var i=this,r=0;r<this._edges.size();r++){var n=i._edges.get(r),o=n.getCoordinates();if(i.matchInSameDirection(t,e,o[0],o[1])||i.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return n}return null},Ct.prototype.insertEdge=function(t){this._edges.add(t)},Ct.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var i=e.next();if(i.getEdge()===t)return i}return null},Ct.prototype.addEdges=function(t){for(var e=this,i=t.iterator();i.hasNext();){var r=i.next();e._edges.add(r);var n=new Zn(r,!0),o=new Zn(r,!1);n.setSym(o),o.setSym(n),e.add(n),e.add(o)}},Ct.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Ct.prototype.getNodes=function(){return this._nodes.values()},Ct.prototype.findEdge=function(t,e){for(var i=this,r=0;r<this._edges.size();r++){var n=i._edges.get(r),o=n.getCoordinates();if(t.equals(o[0])&&e.equals(o[1]))return n}return null},Ct.prototype.interfaces_=function(){return[]},Ct.prototype.getClass=function(){return Ct},Ct.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var i=e.next();i.getEdges().linkResultDirectedEdges()}};var ve=function(){this._geometryFactory=null,this._shellList=new x;var t=arguments[0];this._geometryFactory=t};ve.prototype.sortShellsAndHoles=function(t,e,i){for(var r=t.iterator();r.hasNext();){var n=r.next();n.isHole()?i.add(n):e.add(n)}},ve.prototype.computePolygons=function(t){for(var e=this,i=new x,r=t.iterator();r.hasNext();){var n=r.next(),o=n.toPolygon(e._geometryFactory);i.add(o)}return i},ve.prototype.placeFreeHoles=function(t,e){for(var i=this,r=e.iterator();r.hasNext();){var n=r.next();if(n.getShell()===null){var o=i.findEdgeRingContaining(n,t);if(o===null)throw new Vi("unable to assign hole to a shell",n.getCoordinate(0));n.setShell(o)}}},ve.prototype.buildMinimalEdgeRings=function(t,e,i){for(var r=this,n=new x,o=t.iterator();o.hasNext();){var f=o.next();if(f.getMaxNodeDegree()>2){f.linkDirectedEdgesForMinimalEdgeRings();var h=f.buildMinimalRings(),l=r.findShell(h);l!==null?(r.placePolygonHoles(l,h),e.add(l)):i.addAll(h)}else n.add(f)}return n},ve.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var i=e.next();if(i.containsPoint(t))return!0}return!1},ve.prototype.buildMaximalEdgeRings=function(t){for(var e=this,i=new x,r=t.iterator();r.hasNext();){var n=r.next();if(n.isInResult()&&n.getLabel().isArea()&&n.getEdgeRing()===null){var o=new Lf(n,e._geometryFactory);i.add(o),o.setInResult()}}return i},ve.prototype.placePolygonHoles=function(t,e){for(var i=e.iterator();i.hasNext();){var r=i.next();r.isHole()&&r.setShell(t)}},ve.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},ve.prototype.findEdgeRingContaining=function(t,e){for(var i=t.getLinearRing(),r=i.getEnvelopeInternal(),n=i.getCoordinateN(0),o=null,f=null,h=e.iterator();h.hasNext();){var l=h.next(),a=l.getLinearRing(),c=a.getEnvelopeInternal();o!==null&&(f=o.getLinearRing().getEnvelopeInternal());var p=!1;c.contains(r)&&k.isPointInRing(n,a.getCoordinates())&&(p=!0),p&&(o===null||f.contains(c))&&(o=l)}return o},ve.prototype.findShell=function(t){for(var e=0,i=null,r=t.iterator();r.hasNext();){var n=r.next();n.isHole()||(i=n,e++)}return j.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),i},ve.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],i=arguments[1];Ct.linkResultDirectedEdges(i);var r=this.buildMaximalEdgeRings(e),n=new x,o=this.buildMinimalEdgeRings(r,this._shellList,n);this.sortShellsAndHoles(o,this._shellList,n),this.placeFreeHoles(this._shellList,n)}},ve.prototype.interfaces_=function(){return[]},ve.prototype.getClass=function(){return ve};var ss=function(){};ss.prototype.getBounds=function(){},ss.prototype.interfaces_=function(){return[]},ss.prototype.getClass=function(){return ss};var qe=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};qe.prototype.getItem=function(){return this._item},qe.prototype.getBounds=function(){return this._bounds},qe.prototype.interfaces_=function(){return[ss,Re]},qe.prototype.getClass=function(){return qe};var Gi=function(){this._size=null,this._items=null,this._size=0,this._items=new x,this._items.add(null)};Gi.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Gi.prototype.size=function(){return this._size},Gi.prototype.reorder=function(t){for(var e=this,i=null,r=this._items.get(t);t*2<=this._size&&(i=t*2,i!==e._size&&e._items.get(i+1).compareTo(e._items.get(i))<0&&i++,e._items.get(i).compareTo(r)<0);t=i)e._items.set(t,e._items.get(i));this._items.set(t,r)},Gi.prototype.clear=function(){this._size=0,this._items.clear()},Gi.prototype.isEmpty=function(){return this._size===0},Gi.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var i=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(i/2)))<0;i/=2)e._items.set(i,e._items.get(Math.trunc(i/2)));this._items.set(i,t)},Gi.prototype.interfaces_=function(){return[]},Gi.prototype.getClass=function(){return Gi};var ji=function(){};ji.prototype.visitItem=function(t){},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji};var Dr=function(){};Dr.prototype.insert=function(t,e){},Dr.prototype.remove=function(t,e){},Dr.prototype.query=function(){},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr};var Mt=function(){if(this._childBoundables=new x,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},ko={serialVersionUID:{configurable:!0}};Mt.prototype.getLevel=function(){return this._level},Mt.prototype.size=function(){return this._childBoundables.size()},Mt.prototype.getChildBoundables=function(){return this._childBoundables},Mt.prototype.addChildBoundable=function(t){j.isTrue(this._bounds===null),this._childBoundables.add(t)},Mt.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Mt.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},Mt.prototype.interfaces_=function(){return[ss,Re]},Mt.prototype.getClass=function(){return Mt},ko.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(Mt,ko);var Ze=function(){};Ze.reverseOrder=function(){return{compare:function(e,i){return i.compareTo(e)}}},Ze.min=function(t){return Ze.sort(t),t.get(0)},Ze.sort=function(t,e){var i=t.toArray();e?hr.sort(i,e):hr.sort(i);for(var r=t.iterator(),n=0,o=i.length;n<o;n++)r.next(),r.set(i[n])},Ze.singletonList=function(t){var e=new x;return e.add(t),e};var bt=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],i=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=i,this._distance=this.distance()};bt.prototype.expandToQueue=function(t,e){var i=bt.isComposite(this._boundable1),r=bt.isComposite(this._boundable2);if(i&&r)return bt.area(this._boundable1)>bt.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(i)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new vt("neither boundable is composite")},bt.prototype.isLeaves=function(){return!(bt.isComposite(this._boundable1)||bt.isComposite(this._boundable2))},bt.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},bt.prototype.expand=function(t,e,i,r){for(var n=this,o=t.getChildBoundables(),f=o.iterator();f.hasNext();){var h=f.next(),l=new bt(h,e,n._itemDistance);l.getDistance()<r&&i.add(l)}},bt.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},bt.prototype.getDistance=function(){return this._distance},bt.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},bt.prototype.interfaces_=function(){return[De]},bt.prototype.getClass=function(){return bt},bt.area=function(t){return t.getBounds().getArea()},bt.isComposite=function(t){return t instanceof Mt};var kt=function s(){if(this._root=null,this._built=!1,this._itemBoundables=new x,this._nodeCapacity=null,arguments.length===0){var t=s.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];j.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},hn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};kt.prototype.getNodeCapacity=function(){return this._nodeCapacity},kt.prototype.lastNode=function(t){return t.get(t.size()-1)},kt.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],i=0,r=e.getChildBoundables().iterator();r.hasNext();){var n=r.next();n instanceof Mt?i+=t.size(n):n instanceof qe&&(i+=1)}return i}},kt.prototype.removeItem=function(t,e){for(var i=null,r=t.getChildBoundables().iterator();r.hasNext();){var n=r.next();n instanceof qe&&n.getItem()===e&&(i=n)}return i!==null?(t.getChildBoundables().remove(i),!0):!1},kt.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new x:e}else if(arguments.length===1){for(var i=arguments[0],r=new x,n=i.getChildBoundables().iterator();n.hasNext();){var o=n.next();if(o instanceof Mt){var f=t.itemsTree(o);f!==null&&r.add(f)}else o instanceof qe?r.add(o.getItem()):j.shouldNeverReachHere()}return r.size()<=0?null:r}},kt.prototype.insert=function(t,e){j.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new qe(t,e))},kt.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],i=new x;return this.boundablesAtLevel(e,this._root,i),i}else if(arguments.length===3){var r=arguments[0],n=arguments[1],o=arguments[2];if(j.isTrue(r>-2),n.getLevel()===r)return o.add(n),null;for(var f=n.getChildBoundables().iterator();f.hasNext();){var h=f.next();h instanceof Mt?t.boundablesAtLevel(r,h,o):(j.isTrue(h instanceof qe),r===-1&&o.add(h))}return null}},kt.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var i=new x;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,i),i}else if(arguments.length===2){var r=arguments[0],n=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,n)}else if(arguments.length===3){if(U(arguments[2],ji)&&arguments[0]instanceof Object&&arguments[1]instanceof Mt)for(var o=arguments[0],f=arguments[1],h=arguments[2],l=f.getChildBoundables(),a=0;a<l.size();a++){var c=l.get(a);t.getIntersectsOp().intersects(c.getBounds(),o)&&(c instanceof Mt?t.query(o,c,h):c instanceof qe?h.visitItem(c.getItem()):j.shouldNeverReachHere())}else if(U(arguments[2],Ye)&&arguments[0]instanceof Object&&arguments[1]instanceof Mt)for(var p=arguments[0],d=arguments[1],u=arguments[2],v=d.getChildBoundables(),C=0;C<v.size();C++){var W=v.get(C);t.getIntersectsOp().intersects(W.getBounds(),p)&&(W instanceof Mt?t.query(p,W,u):W instanceof qe?u.add(W.getItem()):j.shouldNeverReachHere())}}},kt.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},kt.prototype.getRoot=function(){return this.build(),this._root},kt.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],i=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,i):!1}else if(arguments.length===3){var r=arguments[0],n=arguments[1],o=arguments[2],f=this.removeItem(n,o);if(f)return!0;for(var h=null,l=n.getChildBoundables().iterator();l.hasNext();){var a=l.next();if(t.getIntersectsOp().intersects(a.getBounds(),r)&&a instanceof Mt&&(f=t.remove(r,a,o),f)){h=a;break}}return h!==null&&h.getChildBoundables().isEmpty()&&n.getChildBoundables().remove(h),f}},kt.prototype.createHigherLevels=function(t,e){j.isTrue(!t.isEmpty());var i=this.createParentBoundables(t,e+1);return i.size()===1?i.get(0):this.createHigherLevels(i,e+1)},kt.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],i=0,r=e.getChildBoundables().iterator();r.hasNext();){var n=r.next();if(n instanceof Mt){var o=t.depth(n);o>i&&(i=o)}}return i+1}},kt.prototype.createParentBoundables=function(t,e){var i=this;j.isTrue(!t.isEmpty());var r=new x;r.add(this.createNode(e));var n=new x(t);Ze.sort(n,this.getComparator());for(var o=n.iterator();o.hasNext();){var f=o.next();i.lastNode(r).getChildBoundables().size()===i.getNodeCapacity()&&r.add(i.createNode(e)),i.lastNode(r).addChildBoundable(f)}return r},kt.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},kt.prototype.interfaces_=function(){return[Re]},kt.prototype.getClass=function(){return kt},kt.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},hn.IntersectsOp.get=function(){return Af},hn.serialVersionUID.get=function(){return-3886435814360241e3},hn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(kt,hn);var Af=function(){},ns=function(){};ns.prototype.distance=function(t,e){},ns.prototype.interfaces_=function(){return[]},ns.prototype.getClass=function(){return ns};var Vo=function(s){function t(i){i=i||t.DEFAULT_NODE_CAPACITY,s.call(this,i)}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(r,n){var o=this;j.isTrue(r.length>0);for(var f=new x,h=0;h<r.length;h++)f.addAll(o.createParentBoundablesFromVerticalSlice(r[h],n));return f},t.prototype.createNode=function(r){return new Go(r)},t.prototype.size=function(){return arguments.length===0?s.prototype.size.call(this):s.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var r=arguments[0],n=arguments[1];if(r.isNull())return null;s.prototype.insert.call(this,r,n)}else return s.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(r,n){for(var o=Math.trunc(Math.ceil(r.size()/n)),f=new Array(n).fill(null),h=r.iterator(),l=0;l<n;l++){f[l]=new x;for(var a=0;h.hasNext()&&a<o;){var c=h.next();f[l].add(c),a++}}return f},t.prototype.query=function(){if(arguments.length===1){var r=arguments[0];return s.prototype.query.call(this,r)}else if(arguments.length===2){var n=arguments[0],o=arguments[1];s.prototype.query.call(this,n,o)}else if(arguments.length===3){if(U(arguments[2],ji)&&arguments[0]instanceof Object&&arguments[1]instanceof Mt){var f=arguments[0],h=arguments[1],l=arguments[2];s.prototype.query.call(this,f,h,l)}else if(U(arguments[2],Ye)&&arguments[0]instanceof Object&&arguments[1]instanceof Mt){var a=arguments[0],c=arguments[1],p=arguments[2];s.prototype.query.call(this,a,c,p)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(r,n){return s.prototype.createParentBoundables.call(this,r,n)},t.prototype.remove=function(){if(arguments.length===2){var r=arguments[0],n=arguments[1];return s.prototype.remove.call(this,r,n)}else return s.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?s.prototype.depth.call(this):s.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(r,n){j.isTrue(!r.isEmpty());var o=Math.trunc(Math.ceil(r.size()/this.getNodeCapacity())),f=new x(r);Ze.sort(f,t.xComparator);var h=this.verticalSlices(f,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(h,n)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(U(arguments[0],ns)){var r=arguments[0],n=new bt(this.getRoot(),this.getRoot(),r);return this.nearestNeighbour(n)}else if(arguments[0]instanceof bt){var o=arguments[0];return this.nearestNeighbour(o,Z.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&U(arguments[1],ns)){var f=arguments[0],h=arguments[1],l=new bt(this.getRoot(),f.getRoot(),h);return this.nearestNeighbour(l)}else if(arguments[0]instanceof bt&&typeof arguments[1]=="number"){var a=arguments[0],c=arguments[1],p=c,d=null,u=new Gi;for(u.add(a);!u.isEmpty()&&p>0;){var v=u.poll(),C=v.getDistance();if(C>=p)break;v.isLeaves()?(p=C,d=v):v.expandToQueue(u,p)}return[d.getBoundable(0).getItem(),d.getBoundable(1).getItem()]}}else if(arguments.length===3){var W=arguments[0],_=arguments[1],T=arguments[2],A=new qe(W,_),P=new bt(this.getRoot(),A,T);return this.nearestNeighbour(P)[0]}},t.prototype.interfaces_=function(){return[Dr,Re]},t.prototype.getClass=function(){return t},t.centreX=function(r){return t.avg(r.getMinX(),r.getMaxX())},t.avg=function(r,n){return(r+n)/2},t.centreY=function(r){return t.avg(r.getMinY(),r.getMaxY())},e.STRtreeNode.get=function(){return Go},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[Ur]},compare:function(i,r){return s.compareDoubles(t.centreX(i.getBounds()),t.centreX(r.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[Ur]},compare:function(i,r){return s.compareDoubles(t.centreY(i.getBounds()),t.centreY(r.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[s.IntersectsOp]},intersects:function(i,r){return i.intersects(r)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(kt),Go=function(s){function t(){var e=arguments[0];s.call(this,e)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var i=null,r=this.getChildBoundables().iterator();r.hasNext();){var n=r.next();i===null?i=new V(n.getBounds()):i.expandToInclude(n.getBounds())}return i},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Mt),le=function(){};le.prototype.interfaces_=function(){return[]},le.prototype.getClass=function(){return le},le.relativeSign=function(t,e){return t<e?-1:t>e?1:0},le.compare=function(t,e,i){if(e.equals2D(i))return 0;var r=le.relativeSign(e.x,i.x),n=le.relativeSign(e.y,i.y);switch(t){case 0:return le.compareValue(r,n);case 1:return le.compareValue(n,r);case 2:return le.compareValue(n,-r);case 3:return le.compareValue(-r,n);case 4:return le.compareValue(-r,-n);case 5:return le.compareValue(-n,-r);case 6:return le.compareValue(-n,r);case 7:return le.compareValue(r,-n)}return j.shouldNeverReachHere("invalid octant value"),0},le.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var Ji=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],i=arguments[2],r=arguments[3];this._segString=t,this.coord=new L(e),this.segmentIndex=i,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(i))};Ji.prototype.getCoordinate=function(){return this.coord},Ji.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},Ji.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:le.compare(this._segmentOctant,this.coord,e.coord)},Ji.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},Ji.prototype.isInterior=function(){return this._isInterior},Ji.prototype.interfaces_=function(){return[De]},Ji.prototype.getClass=function(){return Ji};var ie=function(){this._nodeMap=new jt,this._edge=null;var t=arguments[0];this._edge=t};ie.prototype.getSplitCoordinates=function(){var t=this,e=new Ts;this.addEndpoints();for(var i=this.iterator(),r=i.next();i.hasNext();){var n=i.next();t.addEdgeCoordinates(r,n,e),r=n}return e.toCoordinateArray()},ie.prototype.addCollapsedNodes=function(){var t=this,e=new x;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var i=e.iterator();i.hasNext();){var r=i.next().intValue();t.add(t._edge.getCoordinate(r),r)}},ie.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var i=e.next();i.print(t)}},ie.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,i=0;i<this._edge.size()-2;i++){var r=e._edge.getCoordinate(i),n=e._edge.getCoordinate(i+2);r.equals2D(n)&&t.add(new ti(i+1))}},ie.prototype.addEdgeCoordinates=function(t,e,i){var r=this,n=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(n);i.add(new L(t.coord),!1);for(var f=t.segmentIndex+1;f<=e.segmentIndex;f++)i.add(r._edge.getCoordinate(f));o&&i.add(new L(e.coord))},ie.prototype.iterator=function(){return this._nodeMap.values().iterator()},ie.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var i=this.iterator(),r=i.next();i.hasNext();){var n=i.next(),o=e.createSplitEdge(r,n);t.add(o),r=n}},ie.prototype.findCollapseIndex=function(t,e,i){if(!t.coord.equals2D(e.coord))return!1;var r=e.segmentIndex-t.segmentIndex;return e.isInterior()||r--,r===1?(i[0]=t.segmentIndex+1,!0):!1},ie.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,i=new Array(1).fill(null),r=this.iterator(),n=r.next();r.hasNext();){var o=r.next(),f=e.findCollapseIndex(n,o,i);f&&t.add(new ti(i[0])),n=o}},ie.prototype.getEdge=function(){return this._edge},ie.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},ie.prototype.createSplitEdge=function(t,e){var i=this,r=e.segmentIndex-t.segmentIndex+2,n=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(n);o||r--;var f=new Array(r).fill(null),h=0;f[h++]=new L(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)f[h++]=i._edge.getCoordinate(l);return o&&(f[h]=new L(e.coord)),new wt(f,this._edge.getData())},ie.prototype.add=function(t,e){var i=new Ji(this._edge,t,e,this._edge.getSegmentOctant(e)),r=this._nodeMap.get(i);return r!==null?(j.isTrue(r.coord.equals2D(t),"Found equal nodes with different coordinates"),r):(this._nodeMap.put(i,i),i)},ie.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),i=t.get(0),r=i.getCoordinate(0);if(!r.equals2D(e[0]))throw new Bi("bad split edge start point at "+r);var n=t.get(t.size()-1),o=n.getCoordinates(),f=o[o.length-1];if(!f.equals2D(e[e.length-1]))throw new Bi("bad split edge end point at "+f)},ie.prototype.interfaces_=function(){return[]},ie.prototype.getClass=function(){return ie};var Rr=function(){};Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr},Rr.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new vt("Cannot compute the octant for point ( "+t+", "+e+" )");var i=Math.abs(t),r=Math.abs(e);return t>=0?e>=0?i>=r?0:1:i>=r?7:6:e>=0?i>=r?3:2:i>=r?4:5}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var n=arguments[0],o=arguments[1],f=o.x-n.x,h=o.y-n.y;if(f===0&&h===0)throw new vt("Cannot compute the octant for two identical points "+n);return Rr.octant(f,h)}};var Li=function(){};Li.prototype.getCoordinates=function(){},Li.prototype.size=function(){},Li.prototype.getCoordinate=function(t){},Li.prototype.isClosed=function(){},Li.prototype.setData=function(t){},Li.prototype.getData=function(){},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li};var bs=function(){};bs.prototype.addIntersection=function(t,e){},bs.prototype.interfaces_=function(){return[Li]},bs.prototype.getClass=function(){return bs};var wt=function(){this._nodeList=new ie(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};wt.prototype.getCoordinates=function(){return this._pts},wt.prototype.size=function(){return this._pts.length},wt.prototype.getCoordinate=function(t){return this._pts[t]},wt.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},wt.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},wt.prototype.setData=function(t){this._data=t},wt.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Rr.octant(t,e)},wt.prototype.getData=function(){return this._data},wt.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var i=arguments[0],r=arguments[1],n=arguments[3],o=new L(i.getIntersection(n));this.addIntersection(o,r)}},wt.prototype.toString=function(){return Xe.toLineString(new At(this._pts))},wt.prototype.getNodeList=function(){return this._nodeList},wt.prototype.addIntersectionNode=function(t,e){var i=e,r=i+1;if(r<this._pts.length){var n=this._pts[r];t.equals2D(n)&&(i=r)}var o=this._nodeList.add(t,i);return o},wt.prototype.addIntersections=function(t,e,i){for(var r=this,n=0;n<t.getIntersectionNum();n++)r.addIntersection(t,e,i,n)},wt.prototype.interfaces_=function(){return[bs]},wt.prototype.getClass=function(){return wt},wt.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new x;return wt.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var i=arguments[0],r=arguments[1],n=i.iterator();n.hasNext();){var o=n.next();o.getNodeList().addSplitEdges(r)}};var G=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new L,this.p1=new L;else if(arguments.length===1){var t=arguments[0];this.p0=new L(t.p0),this.p1=new L(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],i=arguments[1],r=arguments[2],n=arguments[3];this.p0=new L(e,i),this.p1=new L(r,n)}},Xo={serialVersionUID:{configurable:!0}};G.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},G.prototype.orientationIndex=function(){if(arguments[0]instanceof G){var t=arguments[0],e=k.orientationIndex(this.p0,this.p1,t.p0),i=k.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&i>=0||e<=0&&i<=0?Math.max(e,i):0}else if(arguments[0]instanceof L){var r=arguments[0];return k.orientationIndex(this.p0,this.p1,r)}},G.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},G.prototype.isVertical=function(){return this.p0.x===this.p1.x},G.prototype.equals=function(t){if(!(t instanceof G))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},G.prototype.intersection=function(t){var e=new fr;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},G.prototype.project=function(){if(arguments[0]instanceof L){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new L(t);var e=this.projectionFactor(t),i=new L;return i.x=this.p0.x+e*(this.p1.x-this.p0.x),i.y=this.p0.y+e*(this.p1.y-this.p0.y),i}else if(arguments[0]instanceof G){var r=arguments[0],n=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(n>=1&&o>=1||n<=0&&o<=0)return null;var f=this.project(r.p0);n<0&&(f=this.p0),n>1&&(f=this.p1);var h=this.project(r.p1);return o<0&&(h=this.p0),o>1&&(h=this.p1),new G(f,h)}},G.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},G.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},G.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},G.prototype.distancePerpendicular=function(t){return k.distancePointLinePerpendicular(t,this.p0,this.p1)},G.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},G.prototype.midPoint=function(){return G.midPoint(this.p0,this.p1)},G.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,i=this.p1.y-this.p0.y,r=e*e+i*i;if(r<=0)return Z.NaN;var n=((t.x-this.p0.x)*e+(t.y-this.p0.y)*i)/r;return n},G.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var i=new Array(2).fill(null),r=Z.MAX_VALUE,n=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),i[0]=o,i[1]=t.p0;var f=this.closestPoint(t.p1);n=f.distance(t.p1),n<r&&(r=n,i[0]=f,i[1]=t.p1);var h=t.closestPoint(this.p0);n=h.distance(this.p0),n<r&&(r=n,i[0]=this.p0,i[1]=h);var l=t.closestPoint(this.p1);return n=l.distance(this.p1),n<r&&(r=n,i[0]=this.p1,i[1]=l),i},G.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var i=this.p0.distance(t),r=this.p1.distance(t);return i<r?this.p0:this.p1},G.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},G.prototype.getLength=function(){return this.p0.distance(this.p1)},G.prototype.compareTo=function(t){var e=t,i=this.p0.compareTo(e.p0);return i!==0?i:this.p1.compareTo(e.p1)},G.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},G.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},G.prototype.lineIntersection=function(t){try{var e=Ge.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(i){if(!(i instanceof Zr))throw i}finally{}return null},G.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},G.prototype.pointAlongOffset=function(t,e){var i=this.p0.x+t*(this.p1.x-this.p0.x),r=this.p0.y+t*(this.p1.y-this.p0.y),n=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,f=Math.sqrt(n*n+o*o),h=0,l=0;if(e!==0){if(f<=0)throw new Error("Cannot compute offset from zero-length line segment");h=e*n/f,l=e*o/f}var a=i-l,c=r+h,p=new L(a,c);return p},G.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=i.x,this.p1.y=i.y}},G.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||Z.isNaN(e))&&(e=1),e},G.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},G.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},G.prototype.distance=function(){if(arguments[0]instanceof G){var t=arguments[0];return k.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof L){var e=arguments[0];return k.distancePointLine(e,this.p0,this.p1)}},G.prototype.pointAlong=function(t){var e=new L;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},G.prototype.hashCode=function(){var t=Z.doubleToLongBits(this.p0.x);t^=Z.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),i=Z.doubleToLongBits(this.p1.x);i^=Z.doubleToLongBits(this.p1.y)*31;var r=Math.trunc(i)^Math.trunc(i>>32);return e^r},G.prototype.interfaces_=function(){return[De,Re]},G.prototype.getClass=function(){return G},G.midPoint=function(t,e){return new L((t.x+e.x)/2,(t.y+e.y)/2)},Xo.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(G,Xo);var Ds=function(){this.tempEnv1=new V,this.tempEnv2=new V,this._overlapSeg1=new G,this._overlapSeg2=new G};Ds.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],i=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),i.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},Ds.prototype.interfaces_=function(){return[]},Ds.prototype.getClass=function(){return Ds};var _e=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],i=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=i,this._context=r};_e.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},_e.prototype.computeSelect=function(t,e,i,r){var n=this._pts[e],o=this._pts[i];if(r.tempEnv1.init(n,o),i-e===1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var f=Math.trunc((e+i)/2);e<f&&this.computeSelect(t,e,f,r),f<i&&this.computeSelect(t,f,i,r)},_e.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),i=0,r=this._start;r<=this._end;r++)e[i++]=t._pts[r];return e},_e.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},_e.prototype.setId=function(t){this._id=t},_e.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},_e.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new V(t,e)}return this._env},_e.prototype.getEndIndex=function(){return this._end},_e.prototype.getStartIndex=function(){return this._start},_e.prototype.getContext=function(){return this._context},_e.prototype.getId=function(){return this._id},_e.prototype.computeOverlapsInternal=function(t,e,i,r,n,o){var f=this._pts[t],h=this._pts[e],l=i._pts[r],a=i._pts[n];if(e-t===1&&n-r===1)return o.overlap(this,t,i,r),null;if(o.tempEnv1.init(f,h),o.tempEnv2.init(l,a),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),p=Math.trunc((r+n)/2);t<c&&(r<p&&this.computeOverlapsInternal(t,c,i,r,p,o),p<n&&this.computeOverlapsInternal(t,c,i,p,n,o)),c<e&&(r<p&&this.computeOverlapsInternal(c,e,i,r,p,o),p<n&&this.computeOverlapsInternal(c,e,i,p,n,o))},_e.prototype.interfaces_=function(){return[]},_e.prototype.getClass=function(){return _e};var hi=function(){};hi.prototype.interfaces_=function(){return[]},hi.prototype.getClass=function(){return hi},hi.getChainStartIndices=function(t){var e=0,i=new x;i.add(new ti(e));do{var r=hi.findChainEnd(t,e);i.add(new ti(r)),e=r}while(e<t.length-1);var n=hi.toIntArray(i);return n},hi.findChainEnd=function(t,e){for(var i=e;i<t.length-1&&t[i].equals2D(t[i+1]);)i++;if(i>=t.length-1)return t.length-1;for(var r=ct.quadrant(t[i],t[i+1]),n=e+1;n<t.length;){if(!t[n-1].equals2D(t[n])){var o=ct.quadrant(t[n-1],t[n]);if(o!==r)break}n++}return n-1},hi.getChains=function(){if(arguments.length===1){var t=arguments[0];return hi.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],i=arguments[1],r=new x,n=hi.getChainStartIndices(e),o=0;o<n.length-1;o++){var f=new _e(e,n[o],n[o+1],i);r.add(f)}return r}},hi.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),i=0;i<e.length;i++)e[i]=t.get(i).intValue();return e};var cr=function(){};cr.prototype.computeNodes=function(t){},cr.prototype.getNodedSubstrings=function(){},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr};var Rs=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};Rs.prototype.setSegmentIntersector=function(t){this._segInt=t},Rs.prototype.interfaces_=function(){return[cr]},Rs.prototype.getClass=function(){return Rs};var Hn=function(s){function t(i){i?s.call(this,i):s.call(this),this._monoChains=new x,this._index=new Vo,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return wt.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(r){for(var n=this,o=hi.getChains(r.getCoordinates(),r),f=o.iterator();f.hasNext();){var h=f.next();h.setId(n._idCounter++),n._index.insert(h.getEnvelope(),h),n._monoChains.add(h)}},t.prototype.computeNodes=function(r){var n=this;this._nodedSegStrings=r;for(var o=r.iterator();o.hasNext();)n.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var r=this,n=new Yo(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var f=o.next(),h=r._index.query(f.getEnvelope()),l=h.iterator();l.hasNext();){var a=l.next();if(a.getId()>f.getId()&&(f.computeOverlaps(a,n),r._nOverlaps++),r._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return Yo},Object.defineProperties(t,e),t}(Rs),Yo=function(s){function t(){s.call(this),this._si=null;var e=arguments[0];this._si=e}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var i=arguments[0],r=arguments[1],n=arguments[2],o=arguments[3],f=i.getContext(),h=n.getContext();this._si.processIntersections(f,r,h,o)}else return s.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ds),ot=function s(){if(this._quadrantSegments=s.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=s.CAP_ROUND,this._joinStyle=s.JOIN_ROUND,this._mitreLimit=s.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=s.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(i)}else if(arguments.length===4){var r=arguments[0],n=arguments[1],o=arguments[2],f=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(n),this.setJoinStyle(o),this.setMitreLimit(f)}}},Xi={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};ot.prototype.getEndCapStyle=function(){return this._endCapStyle},ot.prototype.isSingleSided=function(){return this._isSingleSided},ot.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=ot.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=ot.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==ot.JOIN_ROUND&&(this._quadrantSegments=ot.DEFAULT_QUADRANT_SEGMENTS)},ot.prototype.getJoinStyle=function(){return this._joinStyle},ot.prototype.setJoinStyle=function(t){this._joinStyle=t},ot.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},ot.prototype.getSimplifyFactor=function(){return this._simplifyFactor},ot.prototype.getQuadrantSegments=function(){return this._quadrantSegments},ot.prototype.setEndCapStyle=function(t){this._endCapStyle=t},ot.prototype.getMitreLimit=function(){return this._mitreLimit},ot.prototype.setMitreLimit=function(t){this._mitreLimit=t},ot.prototype.setSingleSided=function(t){this._isSingleSided=t},ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Xi.CAP_ROUND.get=function(){return 1},Xi.CAP_FLAT.get=function(){return 2},Xi.CAP_SQUARE.get=function(){return 3},Xi.JOIN_ROUND.get=function(){return 1},Xi.JOIN_MITRE.get=function(){return 2},Xi.JOIN_BEVEL.get=function(){return 3},Xi.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Xi.DEFAULT_MITRE_LIMIT.get=function(){return 5},Xi.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(ot,Xi);var Tt=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=k.COUNTERCLOCKWISE,this._inputLine=t||null},Bs={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Tt.prototype.isDeletable=function(t,e,i,r){var n=this._inputLine[t],o=this._inputLine[e],f=this._inputLine[i];return!this.isConcave(n,o,f)||!this.isShallow(n,o,f,r)?!1:this.isShallowSampled(n,o,t,i,r)},Tt.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,i=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(i),n=!1;r<this._inputLine.length;){var o=!1;t.isDeletable(e,i,r,t._distanceTol)&&(t._isDeleted[i]=Tt.DELETE,o=!0,n=!0),o?e=r:e=i,i=t.findNextNonDeletedIndex(e),r=t.findNextNonDeletedIndex(i)}return n},Tt.prototype.isShallowConcavity=function(t,e,i,r){var n=k.computeOrientation(t,e,i),o=n===this._angleOrientation;if(!o)return!1;var f=k.distancePointLine(e,t,i);return f<r},Tt.prototype.isShallowSampled=function(t,e,i,r,n){var o=this,f=Math.trunc((r-i)/Tt.NUM_PTS_TO_CHECK);f<=0&&(f=1);for(var h=i;h<r;h+=f)if(!o.isShallow(t,e,o._inputLine[h],n))return!1;return!0},Tt.prototype.isConcave=function(t,e,i){var r=k.computeOrientation(t,e,i),n=r===this._angleOrientation;return n},Tt.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=k.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var i=!1;do i=e.deleteShallowConcavities();while(i);return this.collapseLine()},Tt.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Tt.DELETE;)e++;return e},Tt.prototype.isShallow=function(t,e,i,r){var n=k.distancePointLine(e,t,i);return n<r},Tt.prototype.collapseLine=function(){for(var t=this,e=new Ts,i=0;i<this._inputLine.length;i++)t._isDeleted[i]!==Tt.DELETE&&e.add(t._inputLine[i]);return e.toCoordinateArray()},Tt.prototype.interfaces_=function(){return[]},Tt.prototype.getClass=function(){return Tt},Tt.simplify=function(t,e){var i=new Tt(t);return i.simplify(e)},Bs.INIT.get=function(){return 0},Bs.DELETE.get=function(){return 1},Bs.KEEP.get=function(){return 1},Bs.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Tt,Bs);var Ae=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new x},zo={COORDINATE_ARRAY_TYPE:{configurable:!0}};Ae.prototype.getCoordinates=function(){var t=this._ptList.toArray(Ae.COORDINATE_ARRAY_TYPE);return t},Ae.prototype.setPrecisionModel=function(t){this._precisionModel=t},Ae.prototype.addPt=function(t){var e=new L(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Ae.prototype.revere=function(){},Ae.prototype.addPts=function(t,e){var i=this;if(e)for(var r=0;r<t.length;r++)i.addPt(t[r]);else for(var n=t.length-1;n>=0;n--)i.addPt(t[n])},Ae.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),i=t.distance(e);return i<this._minimimVertexDistance},Ae.prototype.toString=function(){var t=new $,e=t.createLineString(this.getCoordinates());return e.toString()},Ae.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new L(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Ae.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae},zo.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Ae,zo);var tt=function(){},Br={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};tt.prototype.interfaces_=function(){return[]},tt.prototype.getClass=function(){return tt},tt.toDegrees=function(t){return t*180/Math.PI},tt.normalize=function(t){for(;t>Math.PI;)t-=tt.PI_TIMES_2;for(;t<=-Math.PI;)t+=tt.PI_TIMES_2;return t},tt.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],i=arguments[1],r=i.x-e.x,n=i.y-e.y;return Math.atan2(n,r)}},tt.isAcute=function(t,e,i){var r=t.x-e.x,n=t.y-e.y,o=i.x-e.x,f=i.y-e.y,h=r*o+n*f;return h>0},tt.isObtuse=function(t,e,i){var r=t.x-e.x,n=t.y-e.y,o=i.x-e.x,f=i.y-e.y,h=r*o+n*f;return h<0},tt.interiorAngle=function(t,e,i){var r=tt.angle(e,t),n=tt.angle(e,i);return Math.abs(n-r)},tt.normalizePositive=function(t){if(t<0){for(;t<0;)t+=tt.PI_TIMES_2;t>=tt.PI_TIMES_2&&(t=0)}else{for(;t>=tt.PI_TIMES_2;)t-=tt.PI_TIMES_2;t<0&&(t=0)}return t},tt.angleBetween=function(t,e,i){var r=tt.angle(e,t),n=tt.angle(e,i);return tt.diff(r,n)},tt.diff=function(t,e){var i=null;return t<e?i=e-t:i=t-e,i>Math.PI&&(i=2*Math.PI-i),i},tt.toRadians=function(t){return t*Math.PI/180},tt.getTurn=function(t,e){var i=Math.sin(e-t);return i>0?tt.COUNTERCLOCKWISE:i<0?tt.CLOCKWISE:tt.NONE},tt.angleBetweenOriented=function(t,e,i){var r=tt.angle(e,t),n=tt.angle(e,i),o=n-r;return o<=-Math.PI?o+tt.PI_TIMES_2:o>Math.PI?o-tt.PI_TIMES_2:o},Br.PI_TIMES_2.get=function(){return 2*Math.PI},Br.PI_OVER_2.get=function(){return Math.PI/2},Br.PI_OVER_4.get=function(){return Math.PI/4},Br.COUNTERCLOCKWISE.get=function(){return k.COUNTERCLOCKWISE},Br.CLOCKWISE.get=function(){return k.CLOCKWISE},Br.NONE.get=function(){return k.COLLINEAR},Object.defineProperties(tt,Br);var yt=function s(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new G,this._seg1=new G,this._offset0=new G,this._offset1=new G,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],i=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new fr,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===ot.JOIN_ROUND&&(this._closingSegLengthFactor=s.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},Ms={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};yt.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var i=k.computeOrientation(this._s0,this._s1,this._s2),r=i===k.CLOCKWISE&&this._side===M.LEFT||i===k.COUNTERCLOCKWISE&&this._side===M.RIGHT;i===0?this.addCollinear(e):r?this.addOutsideTurn(i,e):this.addInsideTurn(i,e)},yt.prototype.addLineEndCap=function(t,e){var i=new G(t,e),r=new G;this.computeOffsetSegment(i,M.LEFT,this._distance,r);var n=new G;this.computeOffsetSegment(i,M.RIGHT,this._distance,n);var o=e.x-t.x,f=e.y-t.y,h=Math.atan2(f,o);switch(this._bufParams.getEndCapStyle()){case ot.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,h+Math.PI/2,h-Math.PI/2,k.CLOCKWISE,this._distance),this._segList.addPt(n.p1);break;case ot.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(n.p1);break;case ot.CAP_SQUARE:var l=new L;l.x=Math.abs(this._distance)*Math.cos(h),l.y=Math.abs(this._distance)*Math.sin(h);var a=new L(r.p1.x+l.x,r.p1.y+l.y),c=new L(n.p1.x+l.x,n.p1.y+l.y);this._segList.addPt(a),this._segList.addPt(c);break}},yt.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},yt.prototype.addMitreJoin=function(t,e,i,r){var n=!0,o=null;try{o=Ge.intersection(e.p0,e.p1,i.p0,i.p1);var f=r<=0?1:o.distance(t)/Math.abs(r);f>this._bufParams.getMitreLimit()&&(n=!1)}catch(h){if(h instanceof Zr)o=new L(0,0),n=!1;else throw h}finally{}n?this._segList.addPt(o):this.addLimitedMitreJoin(e,i,r,this._bufParams.getMitreLimit())},yt.prototype.addFilletCorner=function(t,e,i,r,n){var o=e.x-t.x,f=e.y-t.y,h=Math.atan2(f,o),l=i.x-t.x,a=i.y-t.y,c=Math.atan2(a,l);r===k.CLOCKWISE?h<=c&&(h+=2*Math.PI):h>=c&&(h-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,h,c,r,n),this._segList.addPt(i)},yt.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*yt.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===ot.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===ot.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},yt.prototype.createSquare=function(t){this._segList.addPt(new L(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new L(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new L(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new L(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},yt.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},yt.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},yt.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},yt.prototype.initSideSegments=function(t,e,i){this._s1=t,this._s2=e,this._side=i,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,i,this._distance,this._offset1)},yt.prototype.addLimitedMitreJoin=function(t,e,i,r){var n=this._seg0.p1,o=tt.angle(n,this._seg0.p0),f=tt.angleBetweenOriented(this._seg0.p0,n,this._seg1.p1),h=f/2,l=tt.normalize(o+h),a=tt.normalize(l+Math.PI),c=r*i,p=c*Math.abs(Math.sin(h)),d=i-p,u=n.x+c*Math.cos(a),v=n.y+c*Math.sin(a),C=new L(u,v),W=new G(n,C),_=W.pointAlongOffset(1,d),T=W.pointAlongOffset(1,-d);this._side===M.LEFT?(this._segList.addPt(_),this._segList.addPt(T)):(this._segList.addPt(T),this._segList.addPt(_))},yt.prototype.computeOffsetSegment=function(t,e,i,r){var n=e===M.LEFT?1:-1,o=t.p1.x-t.p0.x,f=t.p1.y-t.p0.y,h=Math.sqrt(o*o+f*f),l=n*i*o/h,a=n*i*f/h;r.p0.x=t.p0.x-a,r.p0.y=t.p0.y+l,r.p1.x=t.p1.x-a,r.p1.y=t.p1.y+l},yt.prototype.addFilletArc=function(t,e,i,r,n){var o=this,f=r===k.CLOCKWISE?-1:1,h=Math.abs(e-i),l=Math.trunc(h/this._filletAngleQuantum+.5);if(l<1)return null;for(var a=0,c=h/l,p=a,d=new L;p<h;){var u=e+f*p;d.x=t.x+n*Math.cos(u),d.y=t.y+n*Math.sin(u),o._segList.addPt(d),p+=c}},yt.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*yt.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var i=new L((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i);var r=new L((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},yt.prototype.createCircle=function(t){var e=new L(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},yt.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},yt.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Ae,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*yt.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},yt.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===ot.JOIN_BEVEL||this._bufParams.getJoinStyle()===ot.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,k.CLOCKWISE,this._distance))},yt.prototype.closeRing=function(){this._segList.closeRing()},yt.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},yt.prototype.interfaces_=function(){return[]},yt.prototype.getClass=function(){return yt},Ms.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},Ms.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},Ms.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Ms.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(yt,Ms);var ce=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};ce.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var i=e<0,r=Math.abs(e),n=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],n):this.computeOffsetCurve(t,i,n);var o=n.getCoordinates();return i&&Q.reverse(o),o},ce.prototype.computeSingleSidedBufferCurve=function(t,e,i){var r=this.simplifyTolerance(this._distance);if(e){i.addSegments(t,!0);var n=Tt.simplify(t,-r),o=n.length-1;i.initSideSegments(n[o],n[o-1],M.LEFT),i.addFirstSegment();for(var f=o-2;f>=0;f--)i.addNextSegment(n[f],!0)}else{i.addSegments(t,!1);var h=Tt.simplify(t,r),l=h.length-1;i.initSideSegments(h[0],h[1],M.LEFT),i.addFirstSegment();for(var a=2;a<=l;a++)i.addNextSegment(h[a],!0)}i.addLastSegment(),i.closeRing()},ce.prototype.computeRingBufferCurve=function(t,e,i){var r=this.simplifyTolerance(this._distance);e===M.RIGHT&&(r=-r);var n=Tt.simplify(t,r),o=n.length-1;i.initSideSegments(n[o-1],n[0],e);for(var f=1;f<=o;f++){var h=f!==1;i.addNextSegment(n[f],h)}i.closeRing()},ce.prototype.computeLineBufferCurve=function(t,e){var i=this.simplifyTolerance(this._distance),r=Tt.simplify(t,i),n=r.length-1;e.initSideSegments(r[0],r[1],M.LEFT);for(var o=2;o<=n;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[n-1],r[n]);var f=Tt.simplify(t,-i),h=f.length-1;e.initSideSegments(f[h],f[h-1],M.LEFT);for(var l=h-2;l>=0;l--)e.addNextSegment(f[l],!0);e.addLastSegment(),e.addLineEndCap(f[1],f[0]),e.closeRing()},ce.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case ot.CAP_ROUND:e.createCircle(t);break;case ot.CAP_SQUARE:e.createSquare(t);break}},ce.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var i=Math.abs(e),r=this.getSegGen(i);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var n=e<0;this.computeSingleSidedBufferCurve(t,n,r)}else this.computeLineBufferCurve(t,r);var o=r.getCoordinates();return o},ce.prototype.getBufferParameters=function(){return this._bufParams},ce.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},ce.prototype.getRingCurve=function(t,e,i){if(this._distance=i,t.length<=2)return this.getLineCurve(t,i);if(i===0)return ce.copyCoordinates(t);var r=this.getSegGen(i);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},ce.prototype.computeOffsetCurve=function(t,e,i){var r=this.simplifyTolerance(this._distance);if(e){var n=Tt.simplify(t,-r),o=n.length-1;i.initSideSegments(n[o],n[o-1],M.LEFT),i.addFirstSegment();for(var f=o-2;f>=0;f--)i.addNextSegment(n[f],!0)}else{var h=Tt.simplify(t,r),l=h.length-1;i.initSideSegments(h[0],h[1],M.LEFT),i.addFirstSegment();for(var a=2;a<=l;a++)i.addNextSegment(h[a],!0)}i.addLastSegment()},ce.prototype.getSegGen=function(t){return new yt(this._precisionModel,this._bufParams,t)},ce.prototype.interfaces_=function(){return[]},ce.prototype.getClass=function(){return ce},ce.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),i=0;i<e.length;i++)e[i]=new L(t[i]);return e};var Mr=function(){this._subgraphs=null,this._seg=new G,this._cga=new k;var t=arguments[0];this._subgraphs=t},Uo={DepthSegment:{configurable:!0}};Mr.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],i=new x,r=this._subgraphs.iterator();r.hasNext();){var n=r.next(),o=n.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,n.getDirectedEdges(),i)}return i}else if(arguments.length===3){if(U(arguments[2],Ye)&&arguments[0]instanceof L&&arguments[1]instanceof Zn)for(var f=arguments[0],h=arguments[1],l=arguments[2],a=h.getEdge().getCoordinates(),c=0;c<a.length-1;c++){t._seg.p0=a[c],t._seg.p1=a[c+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var p=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(p<f.x)&&!t._seg.isHorizontal()&&!(f.y<t._seg.p0.y||f.y>t._seg.p1.y)&&k.computeOrientation(t._seg.p0,t._seg.p1,f)!==k.RIGHT){var d=h.getDepth(M.LEFT);t._seg.p0.equals(a[c])||(d=h.getDepth(M.RIGHT));var u=new pr(t._seg,d);l.add(u)}}else if(U(arguments[2],Ye)&&arguments[0]instanceof L&&U(arguments[1],Ye))for(var v=arguments[0],C=arguments[1],W=arguments[2],_=C.iterator();_.hasNext();){var T=_.next();T.isForward()&&t.findStabbedSegments(v,T,W)}}},Mr.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var i=Ze.min(e);return i._leftDepth},Mr.prototype.interfaces_=function(){return[]},Mr.prototype.getClass=function(){return Mr},Uo.DepthSegment.get=function(){return pr},Object.defineProperties(Mr,Uo);var pr=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new G(t),this._leftDepth=e};pr.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var i=this._upwardSeg.orientationIndex(e._upwardSeg);return i!==0||(i=-1*e._upwardSeg.orientationIndex(this._upwardSeg),i!==0)?i:this._upwardSeg.compareTo(e._upwardSeg)},pr.prototype.compareX=function(t,e){var i=t.p0.compareTo(e.p0);return i!==0?i:t.p1.compareTo(e.p1)},pr.prototype.toString=function(){return this._upwardSeg.toString()},pr.prototype.interfaces_=function(){return[De]},pr.prototype.getClass=function(){return pr};var at=function(t,e,i){this.p0=t||null,this.p1=e||null,this.p2=i||null};at.prototype.area=function(){return at.area(this.p0,this.p1,this.p2)},at.prototype.signedArea=function(){return at.signedArea(this.p0,this.p1,this.p2)},at.prototype.interpolateZ=function(t){if(t===null)throw new vt("Supplied point is null.");return at.interpolateZ(t,this.p0,this.p1,this.p2)},at.prototype.longestSideLength=function(){return at.longestSideLength(this.p0,this.p1,this.p2)},at.prototype.isAcute=function(){return at.isAcute(this.p0,this.p1,this.p2)},at.prototype.circumcentre=function(){return at.circumcentre(this.p0,this.p1,this.p2)},at.prototype.area3D=function(){return at.area3D(this.p0,this.p1,this.p2)},at.prototype.centroid=function(){return at.centroid(this.p0,this.p1,this.p2)},at.prototype.inCentre=function(){return at.inCentre(this.p0,this.p1,this.p2)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.area=function(t,e,i){return Math.abs(((i.x-t.x)*(e.y-t.y)-(e.x-t.x)*(i.y-t.y))/2)},at.signedArea=function(t,e,i){return((i.x-t.x)*(e.y-t.y)-(e.x-t.x)*(i.y-t.y))/2},at.det=function(t,e,i,r){return t*r-e*i},at.interpolateZ=function(t,e,i,r){var n=e.x,o=e.y,f=i.x-n,h=r.x-n,l=i.y-o,a=r.y-o,c=f*a-h*l,p=t.x-n,d=t.y-o,u=(a*p-h*d)/c,v=(-l*p+f*d)/c,C=e.z+u*(i.z-e.z)+v*(r.z-e.z);return C},at.longestSideLength=function(t,e,i){var r=t.distance(e),n=e.distance(i),o=i.distance(t),f=r;return n>f&&(f=n),o>f&&(f=o),f},at.isAcute=function(t,e,i){return!(!tt.isAcute(t,e,i)||!tt.isAcute(e,i,t)||!tt.isAcute(i,t,e))},at.circumcentre=function(t,e,i){var r=i.x,n=i.y,o=t.x-r,f=t.y-n,h=e.x-r,l=e.y-n,a=2*at.det(o,f,h,l),c=at.det(f,o*o+f*f,l,h*h+l*l),p=at.det(o,o*o+f*f,h,h*h+l*l),d=r-c/a,u=n+p/a;return new L(d,u)},at.perpendicularBisector=function(t,e){var i=e.x-t.x,r=e.y-t.y,n=new Ge(t.x+i/2,t.y+r/2,1),o=new Ge(t.x-r+i/2,t.y+i+r/2,1);return new Ge(n,o)},at.angleBisector=function(t,e,i){var r=e.distance(t),n=e.distance(i),o=r/(r+n),f=i.x-t.x,h=i.y-t.y,l=new L(t.x+o*f,t.y+o*h);return l},at.area3D=function(t,e,i){var r=e.x-t.x,n=e.y-t.y,o=e.z-t.z,f=i.x-t.x,h=i.y-t.y,l=i.z-t.z,a=n*l-o*h,c=o*f-r*l,p=r*h-n*f,d=a*a+c*c+p*p,u=Math.sqrt(d)/2;return u},at.centroid=function(t,e,i){var r=(t.x+e.x+i.x)/3,n=(t.y+e.y+i.y)/3;return new L(r,n)},at.inCentre=function(t,e,i){var r=e.distance(i),n=t.distance(i),o=t.distance(e),f=r+n+o,h=(r*t.x+n*e.x+o*i.x)/f,l=(r*t.y+n*e.y+o*i.y)/f;return new L(h,l)};var xe=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new x;var t=arguments[0],e=arguments[1],i=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=i};xe.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),i=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(i,E.EXTERIOR,E.INTERIOR)},xe.prototype.addPolygon=function(t){var e=this,i=this._distance,r=M.LEFT;this._distance<0&&(i=-this._distance,r=M.RIGHT);var n=t.getExteriorRing(),o=Q.removeRepeatedPoints(n.getCoordinates());if(this._distance<0&&this.isErodedCompletely(n,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,i,r,E.EXTERIOR,E.INTERIOR);for(var f=0;f<t.getNumInteriorRing();f++){var h=t.getInteriorRingN(f),l=Q.removeRepeatedPoints(h.getCoordinates());e._distance>0&&e.isErodedCompletely(h,-e._distance)||e.addPolygonRing(l,i,M.opposite(r),E.INTERIOR,E.EXTERIOR)}},xe.prototype.isTriangleErodedCompletely=function(t,e){var i=new at(t[0],t[1],t[2]),r=i.inCentre(),n=k.distancePointLine(r,i.p0,i.p1);return n<Math.abs(e)},xe.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Q.removeRepeatedPoints(t.getCoordinates()),i=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(i,E.EXTERIOR,E.INTERIOR)},xe.prototype.addCurve=function(t,e,i){if(t===null||t.length<2)return null;var r=new wt(t,new ut(0,E.BOUNDARY,e,i));this._curveList.add(r)},xe.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},xe.prototype.addPolygonRing=function(t,e,i,r,n){if(e===0&&t.length<Wi.MINIMUM_VALID_SIZE)return null;var o=r,f=n;t.length>=Wi.MINIMUM_VALID_SIZE&&k.isCCW(t)&&(o=n,f=r,i=M.opposite(i));var h=this._curveBuilder.getRingCurve(t,i,e);this.addCurve(h,o,f)},xe.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Bt?this.addPolygon(t):t instanceof Wt?this.addLineString(t):t instanceof me?this.addPoint(t):t instanceof is?this.addCollection(t):t instanceof lr?this.addCollection(t):t instanceof Ti?this.addCollection(t):t instanceof te&&this.addCollection(t)},xe.prototype.isErodedCompletely=function(t,e){var i=t.getCoordinates();if(i.length<4)return e<0;if(i.length===4)return this.isTriangleErodedCompletely(i,e);var r=t.getEnvelopeInternal(),n=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>n},xe.prototype.addCollection=function(t){for(var e=this,i=0;i<t.getNumGeometries();i++){var r=t.getGeometryN(i);e.add(r)}},xe.prototype.interfaces_=function(){return[]},xe.prototype.getClass=function(){return xe};var os=function(){};os.prototype.locate=function(t){},os.prototype.interfaces_=function(){return[]},os.prototype.getClass=function(){return os};var Ai=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Ai.prototype.next=function(){if(this._atStart)return this._atStart=!1,Ai.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new ts;var t=this._parent.getGeometryN(this._index++);return t instanceof te?(this._subcollectionIterator=new Ai(t),this._subcollectionIterator.next()):t},Ai.prototype.remove=function(){throw new Error(this.getClass().getName())},Ai.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Ai.prototype.interfaces_=function(){return[$r]},Ai.prototype.getClass=function(){return Ai},Ai.isAtomic=function(t){return!(t instanceof te)};var we=function(){this._geom=null;var t=arguments[0];this._geom=t};we.prototype.locate=function(t){return we.locate(t,this._geom)},we.prototype.interfaces_=function(){return[os]},we.prototype.getClass=function(){return we},we.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?k.isPointInRing(t,e.getCoordinates()):!1},we.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var i=e.getExteriorRing();if(!we.isPointInRing(t,i))return!1;for(var r=0;r<e.getNumInteriorRing();r++){var n=e.getInteriorRingN(r);if(we.isPointInRing(t,n))return!1}return!0},we.containsPoint=function(t,e){if(e instanceof Bt)return we.containsPointInPolygon(t,e);if(e instanceof te)for(var i=new Ai(e);i.hasNext();){var r=i.next();if(r!==e&&we.containsPoint(t,r))return!0}return!1},we.locate=function(t,e){return e.isEmpty()?E.EXTERIOR:we.containsPoint(t,e)?E.INTERIOR:E.EXTERIOR};var Qt=function(){this._edgeMap=new jt,this._edgeList=null,this._ptInAreaLocation=[E.NONE,E.NONE]};Qt.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),i=e-1;return e===0&&(i=this._edgeList.size()-1),this._edgeList.get(i)},Qt.prototype.propagateSideLabels=function(t){for(var e=E.NONE,i=this.iterator();i.hasNext();){var r=i.next(),n=r.getLabel();n.isArea(t)&&n.getLocation(t,M.LEFT)!==E.NONE&&(e=n.getLocation(t,M.LEFT))}if(e===E.NONE)return null;for(var o=e,f=this.iterator();f.hasNext();){var h=f.next(),l=h.getLabel();if(l.getLocation(t,M.ON)===E.NONE&&l.setLocation(t,M.ON,o),l.isArea(t)){var a=l.getLocation(t,M.LEFT),c=l.getLocation(t,M.RIGHT);if(c!==E.NONE){if(c!==o)throw new Vi("side location conflict",h.getCoordinate());a===E.NONE&&j.shouldNeverReachHere("found single null side (at "+h.getCoordinate()+")"),o=a}else j.isTrue(l.getLocation(t,M.LEFT)===E.NONE,"found single null side"),l.setLocation(t,M.RIGHT,o),l.setLocation(t,M.LEFT,o)}}},Qt.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},Qt.prototype.print=function(t){Xt.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var i=e.next();i.print(t)}},Qt.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Qt.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var i=e.size()-1,r=e.get(i).getLabel(),n=r.getLocation(t,M.LEFT);j.isTrue(n!==E.NONE,"Found unlabelled area edge");for(var o=n,f=this.iterator();f.hasNext();){var h=f.next(),l=h.getLabel();j.isTrue(l.isArea(t),"Found non-area edge");var a=l.getLocation(t,M.LEFT),c=l.getLocation(t,M.RIGHT);if(a===c||c!==o)return!1;o=a}return!0},Qt.prototype.findIndex=function(t){var e=this;this.iterator();for(var i=0;i<this._edgeList.size();i++){var r=e._edgeList.get(i);if(r===t)return i}return-1},Qt.prototype.iterator=function(){return this.getEdges().iterator()},Qt.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new x(this._edgeMap.values())),this._edgeList},Qt.prototype.getLocation=function(t,e,i){return this._ptInAreaLocation[t]===E.NONE&&(this._ptInAreaLocation[t]=we.locate(e,i[t].getGeometry())),this._ptInAreaLocation[t]},Qt.prototype.toString=function(){var t=new $e;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
3
+ `);for(var e=this.iterator();e.hasNext();){var i=e.next();t.append(i),t.append(`
4
+ `)}return t.toString()},Qt.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var i=e.next();i.computeLabel(t)}},Qt.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var i=[!1,!1],r=this.iterator();r.hasNext();)for(var n=r.next(),o=n.getLabel(),f=0;f<2;f++)o.isLine(f)&&o.getLocation(f)===E.BOUNDARY&&(i[f]=!0);for(var h=this.iterator();h.hasNext();)for(var l=h.next(),a=l.getLabel(),c=0;c<2;c++)if(a.isAnyNull(c)){var p=E.NONE;if(i[c])p=E.EXTERIOR;else{var d=l.getCoordinate();p=e.getLocation(c,d,t)}a.setAllLocationsIfNull(c,p)}},Qt.prototype.getDegree=function(){return this._edgeMap.size()},Qt.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Qt.prototype.interfaces_=function(){return[]},Qt.prototype.getClass=function(){return Qt};var wf=function(s){function t(){s.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var i=this;this.getResultAreaEdges();for(var r=null,n=null,o=this._SCANNING_FOR_INCOMING,f=0;f<this._resultAreaEdgeList.size();f++){var h=i._resultAreaEdgeList.get(f),l=h.getSym();if(h.getLabel().isArea())switch(r===null&&h.isInResult()&&(r=h),o){case i._SCANNING_FOR_INCOMING:if(!l.isInResult())continue;n=l,o=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(!h.isInResult())continue;n.setNext(h),o=i._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(r===null)throw new Vi("no outgoing dirEdge found",this.getCoordinate());j.isTrue(r.isInResult(),"unable to link last incoming dirEdge"),n.setNext(r)}},t.prototype.insert=function(i){var r=i;this.insertEdgeEnd(r,r)},t.prototype.getRightmostEdge=function(){var i=this.getEdges(),r=i.size();if(r<1)return null;var n=i.get(0);if(r===1)return n;var o=i.get(r-1),f=n.getQuadrant(),h=o.getQuadrant();return ct.isNorthern(f)&&ct.isNorthern(h)?n:!ct.isNorthern(f)&&!ct.isNorthern(h)?o:n.getDy()!==0?n:o.getDy()!==0?o:(j.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(i){Xt.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var r=this.iterator();r.hasNext();){var n=r.next();i.print("out "),n.print(i),i.println(),i.print("in "),n.getSym().print(i),i.println()}},t.prototype.getResultAreaEdges=function(){var i=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new x;for(var r=this.iterator();r.hasNext();){var n=r.next();(n.isInResult()||n.getSym().isInResult())&&i._resultAreaEdgeList.add(n)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(i){for(var r=this.iterator();r.hasNext();){var n=r.next(),o=n.getLabel();o.setAllLocationsIfNull(0,i.getLocation(0)),o.setAllLocationsIfNull(1,i.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var i=this;this.getEdges();for(var r=null,n=null,o=this._edgeList.size()-1;o>=0;o--){var f=i._edgeList.get(o),h=f.getSym();n===null&&(n=h),r!==null&&h.setNext(r),r=f}n.setNext(r)},t.prototype.computeDepths=function(){var i=this;if(arguments.length===1){var r=arguments[0],n=this.findIndex(r),o=r.getDepth(M.LEFT),f=r.getDepth(M.RIGHT),h=this.computeDepths(n+1,this._edgeList.size(),o),l=this.computeDepths(0,n,h);if(l!==f)throw new Vi("depth mismatch at "+r.getCoordinate())}else if(arguments.length===3){for(var a=arguments[0],c=arguments[1],p=arguments[2],d=p,u=a;u<c;u++){var v=i._edgeList.get(u);v.setEdgeDepths(M.RIGHT,d),d=v.getDepth(M.LEFT)}return d}},t.prototype.mergeSymLabels=function(){for(var i=this.iterator();i.hasNext();){var r=i.next(),n=r.getLabel();n.merge(r.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(i){for(var r=this,n=null,o=null,f=this._SCANNING_FOR_INCOMING,h=this._resultAreaEdgeList.size()-1;h>=0;h--){var l=r._resultAreaEdgeList.get(h),a=l.getSym();switch(n===null&&l.getEdgeRing()===i&&(n=l),f){case r._SCANNING_FOR_INCOMING:if(a.getEdgeRing()!==i)continue;o=a,f=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(l.getEdgeRing()!==i)continue;o.setNextMin(l),f=r._SCANNING_FOR_INCOMING;break}}f===this._LINKING_TO_OUTGOING&&(j.isTrue(n!==null,"found null for first outgoing dirEdge"),j.isTrue(n.getEdgeRing()===i,"unable to link last incoming dirEdge"),o.setNextMin(n))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var i=0,r=this.iterator();r.hasNext();){var n=r.next();n.isInResult()&&i++}return i}else if(arguments.length===1){for(var o=arguments[0],f=0,h=this.iterator();h.hasNext();){var l=h.next();l.getEdgeRing()===o&&f++}return f}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var i=E.NONE,r=this.iterator();r.hasNext();){var n=r.next(),o=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){i=E.INTERIOR;break}if(o.isInResult()){i=E.EXTERIOR;break}}}if(i===E.NONE)return null;for(var f=i,h=this.iterator();h.hasNext();){var l=h.next(),a=l.getSym();l.isLineEdge()?l.getEdge().setCovered(f===E.INTERIOR):(l.isInResult()&&(f=E.EXTERIOR),a.isInResult()&&(f=E.INTERIOR))}},t.prototype.computeLabelling=function(i){var r=this;s.prototype.computeLabelling.call(this,i),this._label=new ut(E.NONE);for(var n=this.iterator();n.hasNext();)for(var o=n.next(),f=o.getEdge(),h=f.getLabel(),l=0;l<2;l++){var a=h.getLocation(l);(a===E.INTERIOR||a===E.BOUNDARY)&&r._label.setLocation(l,E.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Qt),qo=function(s){function t(){s.apply(this,arguments)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.createNode=function(i){return new un(i,new wf)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(rs),Qi=function s(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=s.orientation(t)};Qi.prototype.compareTo=function(t){var e=t,i=Qi.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return i},Qi.prototype.interfaces_=function(){return[De]},Qi.prototype.getClass=function(){return Qi},Qi.orientation=function(t){return Q.increasingDirection(t)===1},Qi.compareOriented=function(t,e,i,r){for(var n=e?1:-1,o=r?1:-1,f=e?t.length:-1,h=r?i.length:-1,l=e?0:t.length-1,a=r?0:i.length-1;;){var c=t[l].compareTo(i[a]);if(c!==0)return c;l+=n,a+=o;var p=l===f,d=a===h;if(p&&!d)return-1;if(!p&&d)return 1;if(p&&d)return 0}};var He=function(){this._edges=new x,this._ocaMap=new jt};He.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var i=0;i<this._edges.size();i++){var r=e._edges.get(i);i>0&&t.print(","),t.print("(");for(var n=r.getCoordinates(),o=0;o<n.length;o++)o>0&&t.print(","),t.print(n[o].x+" "+n[o].y);t.println(")")}t.print(") ")},He.prototype.addAll=function(t){for(var e=this,i=t.iterator();i.hasNext();)e.add(i.next())},He.prototype.findEdgeIndex=function(t){for(var e=this,i=0;i<this._edges.size();i++)if(e._edges.get(i).equals(t))return i;return-1},He.prototype.iterator=function(){return this._edges.iterator()},He.prototype.getEdges=function(){return this._edges},He.prototype.get=function(t){return this._edges.get(t)},He.prototype.findEqualEdge=function(t){var e=new Qi(t.getCoordinates()),i=this._ocaMap.get(e);return i},He.prototype.add=function(t){this._edges.add(t);var e=new Qi(t.getCoordinates());this._ocaMap.put(e,t)},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var gr=function(){};gr.prototype.processIntersections=function(t,e,i,r){},gr.prototype.isDone=function(){},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr};var Ee=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Ee.prototype.isTrivialIntersection=function(t,e,i,r){if(t===i&&this._li.getIntersectionNum()===1){if(Ee.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var n=t.size()-1;if(e===0&&r===n||r===0&&e===n)return!0}}return!1},Ee.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ee.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ee.prototype.getLineIntersector=function(){return this._li},Ee.prototype.hasProperIntersection=function(){return this._hasProper},Ee.prototype.processIntersections=function(t,e,i,r){if(t===i&&e===r)return null;this.numTests++;var n=t.getCoordinates()[e],o=t.getCoordinates()[e+1],f=i.getCoordinates()[r],h=i.getCoordinates()[r+1];this._li.computeIntersection(n,o,f,h),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,i,r)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),i.addIntersections(this._li,r,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Ee.prototype.hasIntersection=function(){return this._hasIntersection},Ee.prototype.isDone=function(){return!1},Ee.prototype.hasInteriorIntersection=function(){return this._hasInterior},Ee.prototype.interfaces_=function(){return[gr]},Ee.prototype.getClass=function(){return Ee},Ee.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var li=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],i=arguments[2];this.coord=new L(t),this.segmentIndex=e,this.dist=i};li.prototype.getSegmentIndex=function(){return this.segmentIndex},li.prototype.getCoordinate=function(){return this.coord},li.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},li.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},li.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},li.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},li.prototype.getDistance=function(){return this.dist},li.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},li.prototype.interfaces_=function(){return[De]},li.prototype.getClass=function(){return li};var wi=function(){this._nodeMap=new jt,this.edge=null;var t=arguments[0];this.edge=t};wi.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var i=e.next();i.print(t)}},wi.prototype.iterator=function(){return this._nodeMap.values().iterator()},wi.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var i=this.iterator(),r=i.next();i.hasNext();){var n=i.next(),o=e.createSplitEdge(r,n);t.add(o),r=n}},wi.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},wi.prototype.createSplitEdge=function(t,e){var i=this,r=e.segmentIndex-t.segmentIndex+2,n=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(n);o||r--;var f=new Array(r).fill(null),h=0;f[h++]=new L(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)f[h++]=i.edge.pts[l];return o&&(f[h]=e.coord),new ln(f,new ut(this.edge._label))},wi.prototype.add=function(t,e,i){var r=new li(t,e,i),n=this._nodeMap.get(r);return n!==null?n:(this._nodeMap.put(r,r),r)},wi.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var i=e.next();if(i.coord.equals(t))return!0}return!1},wi.prototype.interfaces_=function(){return[]},wi.prototype.getClass=function(){return wi};var dr=function(){};dr.prototype.getChainStartIndices=function(t){var e=this,i=0,r=new x;r.add(new ti(i));do{var n=e.findChainEnd(t,i);r.add(new ti(n)),i=n}while(i<t.length-1);var o=dr.toIntArray(r);return o},dr.prototype.findChainEnd=function(t,e){for(var i=ct.quadrant(t[e],t[e+1]),r=e+1;r<t.length;){var n=ct.quadrant(t[r-1],t[r]);if(n!==i)break;r++}return r-1},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},dr.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),i=0;i<e.length;i++)e[i]=t.get(i).intValue();return e};var Yi=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new V,this.env2=new V;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new dr;this.startIndex=e.getChainStartIndices(this.pts)};Yi.prototype.getCoordinates=function(){return this.pts},Yi.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,i=this.pts[this.startIndex[t+1]].x;return e>i?e:i},Yi.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,i=this.pts[this.startIndex[t+1]].x;return e<i?e:i},Yi.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],i=arguments[2],r=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[i],e.startIndex[i+1],r)}else if(arguments.length===6){var n=arguments[0],o=arguments[1],f=arguments[2],h=arguments[3],l=arguments[4],a=arguments[5],c=this.pts[n],p=this.pts[o],d=f.pts[h],u=f.pts[l];if(o-n===1&&l-h===1)return a.addIntersections(this.e,n,f.e,h),null;if(this.env1.init(c,p),this.env2.init(d,u),!this.env1.intersects(this.env2))return null;var v=Math.trunc((n+o)/2),C=Math.trunc((h+l)/2);n<v&&(h<C&&this.computeIntersectsForChain(n,v,f,h,C,a),C<l&&this.computeIntersectsForChain(n,v,f,C,l,a)),v<o&&(h<C&&this.computeIntersectsForChain(v,o,f,h,C,a),C<l&&this.computeIntersectsForChain(v,o,f,C,l,a))}},Yi.prototype.getStartIndexes=function(){return this.startIndex},Yi.prototype.computeIntersects=function(t,e){for(var i=this,r=0;r<this.startIndex.length-1;r++)for(var n=0;n<t.startIndex.length-1;n++)i.computeIntersectsForChain(r,t,n,e)},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi};var Yt=function s(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var i=0;i<3;i++)t._depth[e][i]=s.NULL_VALUE},Zo={NULL_VALUE:{configurable:!0}};Yt.prototype.getDepth=function(t,e){return this._depth[t][e]},Yt.prototype.setDepth=function(t,e,i){this._depth[t][e]=i},Yt.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var i=0;i<3;i++)if(t._depth[e][i]!==Yt.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var r=arguments[0];return this._depth[r][1]===Yt.NULL_VALUE}else if(arguments.length===2){var n=arguments[0],o=arguments[1];return this._depth[n][o]===Yt.NULL_VALUE}},Yt.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var i=t._depth[e][1];t._depth[e][2]<i&&(i=t._depth[e][2]),i<0&&(i=0);for(var r=1;r<3;r++){var n=0;t._depth[e][r]>i&&(n=1),t._depth[e][r]=n}}},Yt.prototype.getDelta=function(t){return this._depth[t][M.RIGHT]-this._depth[t][M.LEFT]},Yt.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?E.EXTERIOR:E.INTERIOR},Yt.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Yt.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],i=0;i<2;i++)for(var r=1;r<3;r++){var n=e.getLocation(i,r);(n===E.EXTERIOR||n===E.INTERIOR)&&(t.isNull(i,r)?t._depth[i][r]=Yt.depthAtLocation(n):t._depth[i][r]+=Yt.depthAtLocation(n))}else if(arguments.length===3){var o=arguments[0],f=arguments[1],h=arguments[2];h===E.INTERIOR&&this._depth[o][f]++}},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.depthAtLocation=function(t){return t===E.EXTERIOR?0:t===E.INTERIOR?1:Yt.NULL_VALUE},Zo.NULL_VALUE.get=function(){return-1},Object.defineProperties(Yt,Zo);var ln=function(s){function t(){if(s.call(this),this.pts=null,this._env=null,this.eiList=new wi(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Yt,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var i=arguments[0],r=arguments[1];this.pts=i,this._label=r}}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var i=new Array(2).fill(null);i[0]=this.pts[0],i[1]=this.pts[1];var r=new t(i,ut.toLineLabel(this._label));return r},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(i){this._isIsolated=i},t.prototype.setName=function(i){this._name=i},t.prototype.equals=function(i){var r=this;if(!(i instanceof t))return!1;var n=i;if(this.pts.length!==n.pts.length)return!1;for(var o=!0,f=!0,h=this.pts.length,l=0;l<this.pts.length;l++)if(r.pts[l].equals2D(n.pts[l])||(o=!1),r.pts[l].equals2D(n.pts[--h])||(f=!1),!o&&!f)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var i=arguments[0];return this.pts[i]}},t.prototype.print=function(i){var r=this;i.print("edge "+this._name+": "),i.print("LINESTRING (");for(var n=0;n<this.pts.length;n++)n>0&&i.print(","),i.print(r.pts[n].x+" "+r.pts[n].y);i.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(i){t.updateIM(this._label,i)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(i){var r=this;i.print("edge "+this._name+": ");for(var n=this.pts.length-1;n>=0;n--)i.print(r.pts[n]+" ");i.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Yi(this)),this._mce},t.prototype.getEnvelope=function(){var i=this;if(this._env===null){this._env=new V;for(var r=0;r<this.pts.length;r++)i._env.expandToInclude(i.pts[r])}return this._env},t.prototype.addIntersection=function(i,r,n,o){var f=new L(i.getIntersection(o)),h=r,l=i.getEdgeDistance(n,o),a=h+1;if(a<this.pts.length){var c=this.pts[a];f.equals2D(c)&&(h=a,l=0)}this.eiList.add(f,h,l)},t.prototype.toString=function(){var i=this,r=new $e;r.append("edge "+this._name+": "),r.append("LINESTRING (");for(var n=0;n<this.pts.length;n++)n>0&&r.append(","),r.append(i.pts[n].x+" "+i.pts[n].y);return r.append(") "+this._label+" "+this._depthDelta),r.toString()},t.prototype.isPointwiseEqual=function(i){var r=this;if(this.pts.length!==i.pts.length)return!1;for(var n=0;n<this.pts.length;n++)if(!r.pts[n].equals2D(i.pts[n]))return!1;return!0},t.prototype.setDepthDelta=function(i){this._depthDelta=i},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(i,r,n){for(var o=this,f=0;f<i.getIntersectionNum();f++)o.addIntersection(i,r,n,f)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var i=arguments[0],r=arguments[1];r.setAtLeastIfValid(i.getLocation(0,M.ON),i.getLocation(1,M.ON),1),i.isArea()&&(r.setAtLeastIfValid(i.getLocation(0,M.LEFT),i.getLocation(1,M.LEFT),2),r.setAtLeastIfValid(i.getLocation(0,M.RIGHT),i.getLocation(1,M.RIGHT),2))}else return s.prototype.updateIM.apply(this,arguments)},t}(Le),re=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new He,this._bufParams=t||null};re.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},re.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var i=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new ut(t.getLabel()),r.flip()),i.merge(r);var n=re.depthDelta(r),o=e.getDepthDelta(),f=o+n;e.setDepthDelta(f)}else this._edgeList.add(t),t.setDepthDelta(re.depthDelta(t.getLabel()))},re.prototype.buildSubgraphs=function(t,e){for(var i=new x,r=t.iterator();r.hasNext();){var n=r.next(),o=n.getRightmostCoordinate(),f=new Mr(i),h=f.getDepth(o);n.computeDepth(h),n.findResultEdges(),i.add(n),e.add(n.getDirectedEdges(),n.getNodes())}},re.prototype.createSubgraphs=function(t){for(var e=new x,i=t.getNodes().iterator();i.hasNext();){var r=i.next();if(!r.isVisited()){var n=new ee;n.create(r),e.add(n)}}return Ze.sort(e,Ze.reverseOrder()),e},re.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},re.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new Hn,i=new fr;return i.setPrecisionModel(t),e.setSegmentIntersector(new Ee(i)),e},re.prototype.buffer=function(t,e){var i=this._workingPrecisionModel;i===null&&(i=t.getPrecisionModel()),this._geomFact=t.getFactory();var r=new ce(i,this._bufParams),n=new xe(t,e,r),o=n.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,i),this._graph=new Ct(new qo),this._graph.addEdges(this._edgeList.getEdges());var f=this.createSubgraphs(this._graph),h=new ve(this._geomFact);this.buildSubgraphs(f,h);var l=h.getPolygons();if(l.size()<=0)return this.createEmptyResultGeometry();var a=this._geomFact.buildGeometry(l);return a},re.prototype.computeNodedEdges=function(t,e){var i=this,r=this.getNoder(e);r.computeNodes(t);for(var n=r.getNodedSubstrings(),o=n.iterator();o.hasNext();){var f=o.next(),h=f.getCoordinates();if(!(h.length===2&&h[0].equals2D(h[1]))){var l=f.getData(),a=new ln(f.getCoordinates(),new ut(l));i.insertUniqueEdge(a)}}},re.prototype.setNoder=function(t){this._workingNoder=t},re.prototype.interfaces_=function(){return[]},re.prototype.getClass=function(){return re},re.depthDelta=function(t){var e=t.getLocation(0,M.LEFT),i=t.getLocation(0,M.RIGHT);return e===E.INTERIOR&&i===E.EXTERIOR?1:e===E.EXTERIOR&&i===E.INTERIOR?-1:0},re.convertSegStrings=function(t){for(var e=new $,i=new x;t.hasNext();){var r=t.next(),n=e.createLineString(r.getCoordinates());i.add(n)}return e.buildGeometry(i)};var $i=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var i=arguments[0],r=arguments[1],n=arguments[2],o=arguments[3];this._noder=i,this._scaleFactor=r,this._offsetX=n,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};$i.prototype.rescale=function(){var t=this;if(U(arguments[0],Rt))for(var e=arguments[0],i=e.iterator();i.hasNext();){var r=i.next();t.rescale(r.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],o=0;o<n.length;o++)n[o].x=n[o].x/t._scaleFactor+t._offsetX,n[o].y=n[o].y/t._scaleFactor+t._offsetY;n.length===2&&n[0].equals2D(n[1])&&Xt.out.println(n)}},$i.prototype.scale=function(){var t=this;if(U(arguments[0],Rt)){for(var e=arguments[0],i=new x,r=e.iterator();r.hasNext();){var n=r.next();i.add(new wt(t.scale(n.getCoordinates()),n.getData()))}return i}else if(arguments[0]instanceof Array){for(var o=arguments[0],f=new Array(o.length).fill(null),h=0;h<o.length;h++)f[h]=new L(Math.round((o[h].x-t._offsetX)*t._scaleFactor),Math.round((o[h].y-t._offsetY)*t._scaleFactor),o[h].z);var l=Q.removeRepeatedPoints(f);return l}},$i.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},$i.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},$i.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},$i.prototype.interfaces_=function(){return[cr]},$i.prototype.getClass=function(){return $i};var ci=function(){this._li=new fr,this._segStrings=null;var t=arguments[0];this._segStrings=t},Ho={fact:{configurable:!0}};ci.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var i=e.next(),r=i.getCoordinates();t.checkEndPtVertexIntersections(r[0],t._segStrings),t.checkEndPtVertexIntersections(r[r.length-1],t._segStrings)}else if(arguments.length===2){for(var n=arguments[0],o=arguments[1],f=o.iterator();f.hasNext();)for(var h=f.next(),l=h.getCoordinates(),a=1;a<l.length-1;a++)if(l[a].equals(n))throw new Bi("found endpt/interior pt intersection at index "+a+" :pt "+n)}},ci.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var i=e.next(),r=this._segStrings.iterator();r.hasNext();){var n=r.next();t.checkInteriorIntersections(i,n)}else if(arguments.length===2)for(var o=arguments[0],f=arguments[1],h=o.getCoordinates(),l=f.getCoordinates(),a=0;a<h.length-1;a++)for(var c=0;c<l.length-1;c++)t.checkInteriorIntersections(o,a,f,c);else if(arguments.length===4){var p=arguments[0],d=arguments[1],u=arguments[2],v=arguments[3];if(p===u&&d===v)return null;var C=p.getCoordinates()[d],W=p.getCoordinates()[d+1],_=u.getCoordinates()[v],T=u.getCoordinates()[v+1];if(this._li.computeIntersection(C,W,_,T),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,C,W)||this.hasInteriorIntersection(this._li,_,T)))throw new Bi("found non-noded intersection at "+C+"-"+W+" and "+_+"-"+T)}},ci.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},ci.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var i=e.next();t.checkCollapses(i)}else if(arguments.length===1)for(var r=arguments[0],n=r.getCoordinates(),o=0;o<n.length-2;o++)t.checkCollapse(n[o],n[o+1],n[o+2])},ci.prototype.hasInteriorIntersection=function(t,e,i){for(var r=0;r<t.getIntersectionNum();r++){var n=t.getIntersection(r);if(!(n.equals(e)||n.equals(i)))return!0}return!1},ci.prototype.checkCollapse=function(t,e,i){if(t.equals(i))throw new Bi("found non-noded collapse at "+ci.fact.createLineString([t,e,i]))},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},Ho.fact.get=function(){return new $},Object.defineProperties(ci,Ho);var pe=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],i=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=i,e<=0)throw new vt("Scale factor must be non-zero");e!==1&&(this._pt=new L(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new L,this._p1Scaled=new L),this.initCorners(this._pt)},Ko={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};pe.prototype.intersectsScaled=function(t,e){var i=Math.min(t.x,e.x),r=Math.max(t.x,e.x),n=Math.min(t.y,e.y),o=Math.max(t.y,e.y),f=this._maxx<i||this._minx>r||this._maxy<n||this._miny>o;if(f)return!1;var h=this.intersectsToleranceSquare(t,e);return j.isTrue(!(f&&h),"Found bad envelope test"),h},pe.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new L(this._maxx,this._maxy),this._corner[1]=new L(this._minx,this._maxy),this._corner[2]=new L(this._minx,this._miny),this._corner[3]=new L(this._maxx,this._miny)},pe.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},pe.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},pe.prototype.getCoordinate=function(){return this._originalPt},pe.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},pe.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=pe.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new V(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},pe.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},pe.prototype.intersectsToleranceSquare=function(t,e){var i=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||i&&r||t.equals(this._pt)||e.equals(this._pt))},pe.prototype.addSnappedNode=function(t,e){var i=t.getCoordinate(e),r=t.getCoordinate(e+1);return this.intersects(i,r)?(t.addIntersection(this.getCoordinate(),e),!0):!1},pe.prototype.interfaces_=function(){return[]},pe.prototype.getClass=function(){return pe},Ko.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(pe,Ko);var Os=function(){this.tempEnv1=new V,this.selectedSegment=new G};Os.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},Os.prototype.interfaces_=function(){return[]},Os.prototype.getClass=function(){return Os};var as=function(){this._index=null;var t=arguments[0];this._index=t},jo={HotPixelSnapAction:{configurable:!0}};as.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],i=arguments[1],r=arguments[2],n=e.getSafeEnvelope(),o=new Jo(e,i,r);return this._index.query(n,{interfaces_:function(){return[ji]},visitItem:function(f){var h=f;h.select(n,o)}}),o.isNodeAdded()}},as.prototype.interfaces_=function(){return[]},as.prototype.getClass=function(){return as},jo.HotPixelSnapAction.get=function(){return Jo},Object.defineProperties(as,jo);var Jo=function(s){function t(){s.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],i=arguments[1],r=arguments[2];this._hotPixel=e,this._parentEdge=i,this._hotPixelVertexIndex=r}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var i=arguments[0],r=arguments[1],n=i.getContext();if(this._parentEdge!==null&&n===this._parentEdge&&r===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,r)}else return s.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Os),Or=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new x};Or.prototype.processIntersections=function(t,e,i,r){var n=this;if(t===i&&e===r)return null;var o=t.getCoordinates()[e],f=t.getCoordinates()[e+1],h=i.getCoordinates()[r],l=i.getCoordinates()[r+1];if(this._li.computeIntersection(o,f,h,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var a=0;a<this._li.getIntersectionNum();a++)n._interiorIntersections.add(n._li.getIntersection(a));t.addIntersections(this._li,e,0),i.addIntersections(this._li,r,1)}},Or.prototype.isDone=function(){return!1},Or.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Or.prototype.interfaces_=function(){return[gr]},Or.prototype.getClass=function(){return Or};var Ei=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new fr,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};Ei.prototype.checkCorrectness=function(t){var e=wt.getNodedSubstrings(t),i=new ci(e);try{i.checkValid()}catch(r){if(r instanceof No)r.printStackTrace();else throw r}finally{}},Ei.prototype.getNodedSubstrings=function(){return wt.getNodedSubstrings(this._nodedSegStrings)},Ei.prototype.snapRound=function(t,e){var i=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(i),this.computeVertexSnaps(t)},Ei.prototype.findInteriorIntersections=function(t,e){var i=new Or(e);return this._noder.setSegmentIntersector(i),this._noder.computeNodes(t),i.getInteriorIntersections()},Ei.prototype.computeVertexSnaps=function(){var t=this;if(U(arguments[0],Rt))for(var e=arguments[0],i=e.iterator();i.hasNext();){var r=i.next();t.computeVertexSnaps(r)}else if(arguments[0]instanceof wt)for(var n=arguments[0],o=n.getCoordinates(),f=0;f<o.length;f++){var h=new pe(o[f],t._scaleFactor,t._li),l=t._pointSnapper.snap(h,n,f);l&&n.addIntersection(o[f],f)}},Ei.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new Hn,this._pointSnapper=new as(this._noder.getIndex()),this.snapRound(t,this._li)},Ei.prototype.computeIntersectionSnaps=function(t){for(var e=this,i=t.iterator();i.hasNext();){var r=i.next(),n=new pe(r,e._scaleFactor,e._li);e._pointSnapper.snap(n)}},Ei.prototype.interfaces_=function(){return[cr]},Ei.prototype.getClass=function(){return Ei};var zt=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new ot,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],i=arguments[1];this._argGeom=e,this._bufParams=i}},fs={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};zt.prototype.bufferFixedPrecision=function(t){var e=new $i(new Ei(new nt(1)),t.getScale()),i=new re(this._bufParams);i.setWorkingPrecisionModel(t),i.setNoder(e),this._resultGeometry=i.buffer(this._argGeom,this._distance)},zt.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=zt.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof Vi)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var i=arguments[0],r=zt.precisionScaleFactor(this._argGeom,this._distance,i),n=new nt(r);this.bufferFixedPrecision(n)}},zt.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===nt.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},zt.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},zt.prototype.bufferOriginalPrecision=function(){try{var t=new re(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Bi)this._saveException=e;else throw e}finally{}},zt.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},zt.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt},zt.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],i=new zt(t),r=i.getResultGeometry(e);return r}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof z&&typeof arguments[1]=="number"){var n=arguments[0],o=arguments[1],f=arguments[2],h=new zt(n);h.setQuadrantSegments(f);var l=h.getResultGeometry(o);return l}else if(arguments[2]instanceof ot&&arguments[0]instanceof z&&typeof arguments[1]=="number"){var a=arguments[0],c=arguments[1],p=arguments[2],d=new zt(a,p),u=d.getResultGeometry(c);return u}}else if(arguments.length===4){var v=arguments[0],C=arguments[1],W=arguments[2],_=arguments[3],T=new zt(v);T.setQuadrantSegments(W),T.setEndCapStyle(_);var A=T.getResultGeometry(C);return A}},zt.precisionScaleFactor=function(t,e,i){var r=t.getEnvelopeInternal(),n=Ie.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY())),o=e>0?e:0,f=n+2*o,h=Math.trunc(Math.log(f)/Math.log(10)+1),l=i-h,a=Math.pow(10,l);return a},fs.CAP_ROUND.get=function(){return ot.CAP_ROUND},fs.CAP_BUTT.get=function(){return ot.CAP_FLAT},fs.CAP_FLAT.get=function(){return ot.CAP_FLAT},fs.CAP_SQUARE.get=function(){return ot.CAP_SQUARE},fs.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(zt,fs);var se=function(){this._pt=[new L,new L],this._distance=Z.NaN,this._isNull=!0};se.prototype.getCoordinates=function(){return this._pt},se.prototype.getCoordinate=function(t){return this._pt[t]},se.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],i=arguments[1];if(this._isNull)return this.initialize(e,i),null;var r=e.distance(i);r<this._distance&&this.initialize(e,i,r)}},se.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var i=arguments[0],r=arguments[1],n=arguments[2];this._pt[0].setCoordinate(i),this._pt[1].setCoordinate(r),this._distance=n,this._isNull=!1}},se.prototype.getDistance=function(){return this._distance},se.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],i=arguments[1];if(this._isNull)return this.initialize(e,i),null;var r=e.distance(i);r>this._distance&&this.initialize(e,i,r)}},se.prototype.interfaces_=function(){return[]},se.prototype.getClass=function(){return se};var Pi=function(){};Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.computeDistance=function(){if(arguments[2]instanceof se&&arguments[0]instanceof Wt&&arguments[1]instanceof L)for(var t=arguments[0],e=arguments[1],i=arguments[2],r=t.getCoordinates(),n=new G,o=0;o<r.length-1;o++){n.setCoordinates(r[o],r[o+1]);var f=n.closestPoint(e);i.setMinimum(f,e)}else if(arguments[2]instanceof se&&arguments[0]instanceof Bt&&arguments[1]instanceof L){var h=arguments[0],l=arguments[1],a=arguments[2];Pi.computeDistance(h.getExteriorRing(),l,a);for(var c=0;c<h.getNumInteriorRing();c++)Pi.computeDistance(h.getInteriorRingN(c),l,a)}else if(arguments[2]instanceof se&&arguments[0]instanceof z&&arguments[1]instanceof L){var p=arguments[0],d=arguments[1],u=arguments[2];if(p instanceof Wt)Pi.computeDistance(p,d,u);else if(p instanceof Bt)Pi.computeDistance(p,d,u);else if(p instanceof te)for(var v=p,C=0;C<v.getNumGeometries();C++){var W=v.getGeometryN(C);Pi.computeDistance(W,d,u)}else u.setMinimum(p.getCoordinate(),d)}else if(arguments[2]instanceof se&&arguments[0]instanceof G&&arguments[1]instanceof L){var _=arguments[0],T=arguments[1],A=arguments[2],P=_.closestPoint(T);A.setMinimum(P,T)}};var yr=function(t){this._maxPtDist=new se,this._inputGeom=t||null},Kn={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};yr.prototype.computeMaxMidpointDistance=function(t){var e=new tr(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},yr.prototype.computeMaxVertexDistance=function(t){var e=new Fr(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},yr.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},yr.prototype.getDistancePoints=function(){return this._maxPtDist},yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr},Kn.MaxPointDistanceFilter.get=function(){return Fr},Kn.MaxMidpointDistanceFilter.get=function(){return tr},Object.defineProperties(yr,Kn);var Fr=function(t){this._maxPtDist=new se,this._minPtDist=new se,this._geom=t||null};Fr.prototype.filter=function(t){this._minPtDist.initialize(),Pi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Fr.prototype.getMaxPointDistance=function(){return this._maxPtDist},Fr.prototype.interfaces_=function(){return[Ci]},Fr.prototype.getClass=function(){return Fr};var tr=function(t){this._maxPtDist=new se,this._minPtDist=new se,this._geom=t||null};tr.prototype.filter=function(t,e){if(e===0)return null;var i=t.getCoordinate(e-1),r=t.getCoordinate(e),n=new L((i.x+r.x)/2,(i.y+r.y)/2);this._minPtDist.initialize(),Pi.computeDistance(this._geom,n,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},tr.prototype.isDone=function(){return!1},tr.prototype.isGeometryChanged=function(){return!1},tr.prototype.getMaxPointDistance=function(){return this._maxPtDist},tr.prototype.interfaces_=function(){return[Ue]},tr.prototype.getClass=function(){return tr};var zi=function(t){this._comps=t||null};zi.prototype.filter=function(t){t instanceof Bt&&this._comps.add(t)},zi.prototype.interfaces_=function(){return[si]},zi.prototype.getClass=function(){return zi},zi.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return zi.getPolygons(t,new x)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];return e instanceof Bt?i.add(e):e instanceof te&&e.apply(new zi(i)),i}};var Ut=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],i=arguments[1];this._lines=e,this._isForcedToLineString=i}};Ut.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof Wi){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Wt&&this._lines.add(t)},Ut.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Ut.prototype.interfaces_=function(){return[Mi]},Ut.prototype.getClass=function(){return Ut},Ut.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(Ut.getLines(t))}else if(arguments.length===2){var e=arguments[0],i=arguments[1];return e.getFactory().buildGeometry(Ut.getLines(e,i))}},Ut.getLines=function(){if(arguments.length===1){var t=arguments[0];return Ut.getLines(t,!1)}else if(arguments.length===2){if(U(arguments[0],Rt)&&U(arguments[1],Rt)){for(var e=arguments[0],i=arguments[1],r=e.iterator();r.hasNext();){var n=r.next();Ut.getLines(n,i)}return i}else if(arguments[0]instanceof z&&typeof arguments[1]=="boolean"){var o=arguments[0],f=arguments[1],h=new x;return o.apply(new Ut(h,f)),h}else if(arguments[0]instanceof z&&U(arguments[1],Rt)){var l=arguments[0],a=arguments[1];return l instanceof Wt?a.add(l):l.apply(new Ut(a)),a}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&U(arguments[0],Rt)&&U(arguments[1],Rt)){for(var c=arguments[0],p=arguments[1],d=arguments[2],u=c.iterator();u.hasNext();){var v=u.next();Ut.getLines(v,p,d)}return p}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof z&&U(arguments[1],Rt)){var C=arguments[0],W=arguments[1],_=arguments[2];return C.apply(new Ut(W,_)),W}}};var Ke=function(){if(this._boundaryRule=Be.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new vt("Rule must be non-null");this._boundaryRule=t}}};Ke.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof L&&arguments[1]instanceof Bt){var e=arguments[0],i=arguments[1];if(i.isEmpty())return E.EXTERIOR;var r=i.getExteriorRing(),n=this.locateInPolygonRing(e,r);if(n===E.EXTERIOR)return E.EXTERIOR;if(n===E.BOUNDARY)return E.BOUNDARY;for(var o=0;o<i.getNumInteriorRing();o++){var f=i.getInteriorRingN(o),h=t.locateInPolygonRing(e,f);if(h===E.INTERIOR)return E.EXTERIOR;if(h===E.BOUNDARY)return E.BOUNDARY}return E.INTERIOR}else if(arguments[0]instanceof L&&arguments[1]instanceof Wt){var l=arguments[0],a=arguments[1];if(!a.getEnvelopeInternal().intersects(l))return E.EXTERIOR;var c=a.getCoordinates();return!a.isClosed()&&(l.equals(c[0])||l.equals(c[c.length-1]))?E.BOUNDARY:k.isOnLine(l,c)?E.INTERIOR:E.EXTERIOR}else if(arguments[0]instanceof L&&arguments[1]instanceof me){var p=arguments[0],d=arguments[1],u=d.getCoordinate();return u.equals2D(p)?E.INTERIOR:E.EXTERIOR}},Ke.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?k.locatePointInRing(t,e.getCoordinates()):E.EXTERIOR},Ke.prototype.intersects=function(t,e){return this.locate(t,e)!==E.EXTERIOR},Ke.prototype.updateLocationInfo=function(t){t===E.INTERIOR&&(this._isIn=!0),t===E.BOUNDARY&&this._numBoundaries++},Ke.prototype.computeLocation=function(t,e){var i=this;if(e instanceof me&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Wt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Bt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof lr)for(var r=e,n=0;n<r.getNumGeometries();n++){var o=r.getGeometryN(n);i.updateLocationInfo(i.locateInternal(t,o))}else if(e instanceof Ti)for(var f=e,h=0;h<f.getNumGeometries();h++){var l=f.getGeometryN(h);i.updateLocationInfo(i.locateInternal(t,l))}else if(e instanceof te)for(var a=new Ai(e);a.hasNext();){var c=a.next();c!==e&&i.computeLocation(t,c)}},Ke.prototype.locate=function(t,e){return e.isEmpty()?E.EXTERIOR:e instanceof Wt?this.locateInternal(t,e):e instanceof Bt?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?E.BOUNDARY:this._numBoundaries>0||this._isIn?E.INTERIOR:E.EXTERIOR)},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var ne=function s(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];s.call(this,t,s.INSIDE_AREA,e)}else if(arguments.length===3){var i=arguments[0],r=arguments[1],n=arguments[2];this._component=i,this._segIndex=r,this._pt=n}},Qo={INSIDE_AREA:{configurable:!0}};ne.prototype.isInsideArea=function(){return this._segIndex===ne.INSIDE_AREA},ne.prototype.getCoordinate=function(){return this._pt},ne.prototype.getGeometryComponent=function(){return this._component},ne.prototype.getSegmentIndex=function(){return this._segIndex},ne.prototype.interfaces_=function(){return[]},ne.prototype.getClass=function(){return ne},Qo.INSIDE_AREA.get=function(){return-1},Object.defineProperties(ne,Qo);var er=function(t){this._pts=t||null};er.prototype.filter=function(t){t instanceof me&&this._pts.add(t)},er.prototype.interfaces_=function(){return[si]},er.prototype.getClass=function(){return er},er.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof me?Ze.singletonList(t):er.getPoints(t,new x)}else if(arguments.length===2){var e=arguments[0],i=arguments[1];return e instanceof me?i.add(e):e instanceof te&&e.apply(new er(i)),i}};var xr=function(){this._locations=null;var t=arguments[0];this._locations=t};xr.prototype.filter=function(t){(t instanceof me||t instanceof Wt||t instanceof Bt)&&this._locations.add(new ne(t,0,t.getCoordinate()))},xr.prototype.interfaces_=function(){return[si]},xr.prototype.getClass=function(){return xr},xr.getLocations=function(t){var e=new x;return t.apply(new xr(e)),e};var qt=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Ke,this._minDistanceLocation=null,this._minDistance=Z.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var i=arguments[0],r=arguments[1],n=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=i,this._geom[1]=r,this._terminateDistance=n}};qt.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var i=arguments[0],r=arguments[1],n=1-i,o=zi.getPolygons(this._geom[i]);if(o.size()>0){var f=xr.getLocations(this._geom[n]);if(this.computeContainmentDistance(f,o,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[n]=r[0],this._minDistanceLocation[i]=r[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&U(arguments[0],Ye)&&U(arguments[1],Ye)){for(var h=arguments[0],l=arguments[1],a=arguments[2],c=0;c<h.size();c++)for(var p=h.get(c),d=0;d<l.size();d++)if(t.computeContainmentDistance(p,l.get(d),a),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof ne&&arguments[1]instanceof Bt){var u=arguments[0],v=arguments[1],C=arguments[2],W=u.getCoordinate();if(E.EXTERIOR!==this._ptLocator.locate(W,v))return this._minDistance=0,C[0]=u,C[1]=new ne(v,W),null}}},qt.prototype.computeMinDistanceLinesPoints=function(t,e,i){for(var r=this,n=0;n<t.size();n++)for(var o=t.get(n),f=0;f<e.size();f++){var h=e.get(f);if(r.computeMinDistance(o,h,i),r._minDistance<=r._terminateDistance)return null}},qt.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Ut.getLines(this._geom[0]),i=Ut.getLines(this._geom[1]),r=er.getPoints(this._geom[0]),n=er.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,i,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(i,r,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(r,n,t),this.updateMinDistance(t,!1)},qt.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},qt.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},qt.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},qt.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof Wt&&arguments[1]instanceof me){var e=arguments[0],i=arguments[1],r=arguments[2];if(e.getEnvelopeInternal().distance(i.getEnvelopeInternal())>this._minDistance)return null;for(var n=e.getCoordinates(),o=i.getCoordinate(),f=0;f<n.length-1;f++){var h=k.distancePointLine(o,n[f],n[f+1]);if(h<t._minDistance){t._minDistance=h;var l=new G(n[f],n[f+1]),a=l.closestPoint(o);r[0]=new ne(e,f,a),r[1]=new ne(i,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Wt&&arguments[1]instanceof Wt){var c=arguments[0],p=arguments[1],d=arguments[2];if(c.getEnvelopeInternal().distance(p.getEnvelopeInternal())>this._minDistance)return null;for(var u=c.getCoordinates(),v=p.getCoordinates(),C=0;C<u.length-1;C++)for(var W=0;W<v.length-1;W++){var _=k.distanceLineLine(u[C],u[C+1],v[W],v[W+1]);if(_<t._minDistance){t._minDistance=_;var T=new G(u[C],u[C+1]),A=new G(v[W],v[W+1]),P=T.closestPoints(A);d[0]=new ne(c,C,P[0]),d[1]=new ne(p,W,P[1])}if(t._minDistance<=t._terminateDistance)return null}}}},qt.prototype.computeMinDistancePoints=function(t,e,i){for(var r=this,n=0;n<t.size();n++)for(var o=t.get(n),f=0;f<e.size();f++){var h=e.get(f),l=o.getCoordinate().distance(h.getCoordinate());if(l<r._minDistance&&(r._minDistance=l,i[0]=new ne(o,0,o.getCoordinate()),i[1]=new ne(h,0,h.getCoordinate())),r._minDistance<=r._terminateDistance)return null}},qt.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new vt("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},qt.prototype.computeMinDistanceLines=function(t,e,i){for(var r=this,n=0;n<t.size();n++)for(var o=t.get(n),f=0;f<e.size();f++){var h=e.get(f);if(r.computeMinDistance(o,h,i),r._minDistance<=r._terminateDistance)return null}},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.distance=function(t,e){var i=new qt(t,e);return i.distance()},qt.isWithinDistance=function(t,e,i){var r=new qt(t,e,i);return r.distance()<=i},qt.nearestPoints=function(t,e){var i=new qt(t,e);return i.nearestPoints()};var $t=function(){this._pt=[new L,new L],this._distance=Z.NaN,this._isNull=!0};$t.prototype.getCoordinates=function(){return this._pt},$t.prototype.getCoordinate=function(t){return this._pt[t]},$t.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],i=arguments[1];if(this._isNull)return this.initialize(e,i),null;var r=e.distance(i);r<this._distance&&this.initialize(e,i,r)}},$t.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var i=arguments[0],r=arguments[1],n=arguments[2];this._pt[0].setCoordinate(i),this._pt[1].setCoordinate(r),this._distance=n,this._isNull=!1}},$t.prototype.toString=function(){return Xe.toLineString(this._pt[0],this._pt[1])},$t.prototype.getDistance=function(){return this._distance},$t.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],i=arguments[1];if(this._isNull)return this.initialize(e,i),null;var r=e.distance(i);r>this._distance&&this.initialize(e,i,r)}},$t.prototype.interfaces_=function(){return[]},$t.prototype.getClass=function(){return $t};var pi=function(){};pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi},pi.computeDistance=function(){if(arguments[2]instanceof $t&&arguments[0]instanceof Wt&&arguments[1]instanceof L)for(var t=arguments[0],e=arguments[1],i=arguments[2],r=new G,n=t.getCoordinates(),o=0;o<n.length-1;o++){r.setCoordinates(n[o],n[o+1]);var f=r.closestPoint(e);i.setMinimum(f,e)}else if(arguments[2]instanceof $t&&arguments[0]instanceof Bt&&arguments[1]instanceof L){var h=arguments[0],l=arguments[1],a=arguments[2];pi.computeDistance(h.getExteriorRing(),l,a);for(var c=0;c<h.getNumInteriorRing();c++)pi.computeDistance(h.getInteriorRingN(c),l,a)}else if(arguments[2]instanceof $t&&arguments[0]instanceof z&&arguments[1]instanceof L){var p=arguments[0],d=arguments[1],u=arguments[2];if(p instanceof Wt)pi.computeDistance(p,d,u);else if(p instanceof Bt)pi.computeDistance(p,d,u);else if(p instanceof te)for(var v=p,C=0;C<v.getNumGeometries();C++){var W=v.getGeometryN(C);pi.computeDistance(W,d,u)}else u.setMinimum(p.getCoordinate(),d)}else if(arguments[2]instanceof $t&&arguments[0]instanceof G&&arguments[1]instanceof L){var _=arguments[0],T=arguments[1],A=arguments[2],P=_.closestPoint(T);A.setMinimum(P,T)}};var ke=function(){this._g0=null,this._g1=null,this._ptDist=new $t,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},jn={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};ke.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},ke.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new vt("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},ke.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},ke.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},ke.prototype.computeOrientedDistance=function(t,e,i){var r=new kr(e);if(t.apply(r),i.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var n=new ir(e,this._densifyFrac);t.apply(n),i.setMaximum(n.getMaxPointDistance())}},ke.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],i=new ke(t,e);return i.distance()}else if(arguments.length===3){var r=arguments[0],n=arguments[1],o=arguments[2],f=new ke(r,n);return f.setDensifyFraction(o),f.distance()}},jn.MaxPointDistanceFilter.get=function(){return kr},jn.MaxDensifiedByFractionDistanceFilter.get=function(){return ir},Object.defineProperties(ke,jn);var kr=function(){this._maxPtDist=new $t,this._minPtDist=new $t,this._euclideanDist=new pi,this._geom=null;var t=arguments[0];this._geom=t};kr.prototype.filter=function(t){this._minPtDist.initialize(),pi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},kr.prototype.getMaxPointDistance=function(){return this._maxPtDist},kr.prototype.interfaces_=function(){return[Ci]},kr.prototype.getClass=function(){return kr};var ir=function(){this._maxPtDist=new $t,this._minPtDist=new $t,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};ir.prototype.filter=function(t,e){var i=this;if(e===0)return null;for(var r=t.getCoordinate(e-1),n=t.getCoordinate(e),o=(n.x-r.x)/this._numSubSegs,f=(n.y-r.y)/this._numSubSegs,h=0;h<this._numSubSegs;h++){var l=r.x+h*o,a=r.y+h*f,c=new L(l,a);i._minPtDist.initialize(),pi.computeDistance(i._geom,c,i._minPtDist),i._maxPtDist.setMaximum(i._minPtDist)}},ir.prototype.isDone=function(){return!1},ir.prototype.isGeometryChanged=function(){return!1},ir.prototype.getMaxPointDistance=function(){return this._maxPtDist},ir.prototype.interfaces_=function(){return[Ue]},ir.prototype.getClass=function(){return ir};var Ce=function(t,e,i){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=i||null},Jn={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Ce.prototype.checkMaximumDistance=function(t,e,i){var r=new ke(e,t);if(r.setDensifyFraction(.25),this._maxDistanceFound=r.orientedDistance(),this._maxDistanceFound>i){this._isValid=!1;var n=r.getCoordinates();this._errorLocation=n[1],this._errorIndicator=t.getFactory().createLineString(n),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Xe.toLineString(n[0],n[1])+")"}},Ce.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Ce.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Ce.VERBOSE&&Xt.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Ce.prototype.checkNegativeValid=function(){if(!(this._input instanceof Bt||this._input instanceof Ti||this._input instanceof te))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Ce.prototype.getErrorIndicator=function(){return this._errorIndicator},Ce.prototype.checkMinimumDistance=function(t,e,i){var r=new qt(t,e,i);if(this._minDistanceFound=r.distance(),this._minDistanceFound<i){this._isValid=!1;var n=r.nearestPoints();this._errorLocation=r.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(n),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Xe.toLineString(n[0],n[1])+" )"}},Ce.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Ce.prototype.getErrorLocation=function(){return this._errorLocation},Ce.prototype.getPolygonLines=function(t){for(var e=new x,i=new Ut(e),r=zi.getPolygons(t),n=r.iterator();n.hasNext();){var o=n.next();o.apply(i)}return t.getFactory().buildGeometry(e)},Ce.prototype.getErrorMessage=function(){return this._errMsg},Ce.prototype.interfaces_=function(){return[]},Ce.prototype.getClass=function(){return Ce},Jn.VERBOSE.get=function(){return!1},Jn.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Ce,Jn);var Zt=function(t,e,i){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=i||null},Qn={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Zt.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Zt.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Zt.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new V(this._input.getEnvelopeInternal());e.expandBy(this._distance);var i=new V(this._result.getEnvelopeInternal());i.expandBy(t),i.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(i)),this.report("Envelope")},Zt.prototype.checkDistance=function(){var t=new Ce(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Zt.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Zt.prototype.checkPolygonal=function(){this._result instanceof Bt||this._result instanceof Ti||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Zt.prototype.getErrorIndicator=function(){return this._errorIndicator},Zt.prototype.getErrorLocation=function(){return this._errorLocation},Zt.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},Zt.prototype.report=function(t){if(!Zt.VERBOSE)return null;Xt.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Zt.prototype.getErrorMessage=function(){return this._errorMsg},Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt},Zt.isValidMsg=function(t,e,i){var r=new Zt(t,e,i);return r.isValid()?null:r.getErrorMessage()},Zt.isValid=function(t,e,i){var r=new Zt(t,e,i);return!!r.isValid()},Qn.VERBOSE.get=function(){return!1},Qn.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Zt,Qn);var gi=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};gi.prototype.getCoordinates=function(){return this._pts},gi.prototype.size=function(){return this._pts.length},gi.prototype.getCoordinate=function(t){return this._pts[t]},gi.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},gi.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Rr.octant(this.getCoordinate(t),this.getCoordinate(t+1))},gi.prototype.setData=function(t){this._data=t},gi.prototype.getData=function(){return this._data},gi.prototype.toString=function(){return Xe.toLineString(new At(this._pts))},gi.prototype.interfaces_=function(){return[Li]},gi.prototype.getClass=function(){return gi};var Vt=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new x,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Vt.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Vt.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Vt.prototype.getIntersectionSegments=function(){return this._intSegments},Vt.prototype.count=function(){return this._intersectionCount},Vt.prototype.getIntersections=function(){return this._intersections},Vt.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Vt.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Vt.prototype.processIntersections=function(t,e,i,r){if(!this._findAllIntersections&&this.hasIntersection()||t===i&&e===r)return null;if(this._isCheckEndSegmentsOnly){var n=this.isEndSegment(t,e)||this.isEndSegment(i,r);if(!n)return null}var o=t.getCoordinates()[e],f=t.getCoordinates()[e+1],h=i.getCoordinates()[r],l=i.getCoordinates()[r+1];this._li.computeIntersection(o,f,h,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=f,this._intSegments[2]=h,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Vt.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},Vt.prototype.hasIntersection=function(){return this._interiorIntersection!==null},Vt.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},Vt.prototype.interfaces_=function(){return[gr]},Vt.prototype.getClass=function(){return Vt},Vt.createAllIntersectionsFinder=function(t){var e=new Vt(t);return e.setFindAllIntersections(!0),e},Vt.createAnyIntersectionFinder=function(t){return new Vt(t)},Vt.createIntersectionCounter=function(t){var e=new Vt(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var je=function(){this._li=new fr,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};je.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},je.prototype.getIntersections=function(){return this._segInt.getIntersections()},je.prototype.isValid=function(){return this.execute(),this._isValid},je.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},je.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Vt(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Hn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},je.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Vi(this.getErrorMessage(),this._segInt.getInteriorIntersection())},je.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Xe.toLineString(t[0],t[1])+" and "+Xe.toLineString(t[2],t[3])},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je},je.computeIntersections=function(t){var e=new je(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var mr=function s(){this._nv=null;var t=arguments[0];this._nv=new je(s.toSegmentStrings(t))};mr.prototype.checkValid=function(){this._nv.checkValid()},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr},mr.toSegmentStrings=function(t){for(var e=new x,i=t.iterator();i.hasNext();){var r=i.next();e.add(new gi(r.getCoordinates(),r))}return e},mr.checkValid=function(t){var e=new mr(t);e.checkValid()};var Vr=function(t){this._mapOp=t};Vr.prototype.map=function(t){for(var e=this,i=new x,r=0;r<t.getNumGeometries();r++){var n=e._mapOp.map(t.getGeometryN(r));n.isEmpty()||i.add(n)}return t.getFactory().createGeometryCollection($.toGeometryArray(i))},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.map=function(t,e){var i=new Vr(e);return i.map(t)};var di=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new x,this._resultLineList=new x;var t=arguments[0],e=arguments[1],i=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=i};di.prototype.collectLines=function(t){for(var e=this,i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var r=i.next();e.collectLineEdge(r,t,e._lineEdgesList),e.collectBoundaryTouchEdge(r,t,e._lineEdgesList)}},di.prototype.labelIsolatedLine=function(t,e){var i=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,i)},di.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},di.prototype.collectLineEdge=function(t,e,i){var r=t.getLabel(),n=t.getEdge();t.isLineEdge()&&!t.isVisited()&&K.isResultOfOp(r,e)&&!n.isCovered()&&(i.add(n),t.setVisitedEdge(!0))},di.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var i=e.next();i.getEdges().findCoveredLineEdges()}for(var r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var n=r.next(),o=n.getEdge();if(n.isLineEdge()&&!o.isCoveredSet()){var f=t._op.isCoveredByA(n.getCoordinate());o.setCovered(f)}}},di.prototype.labelIsolatedLines=function(t){for(var e=this,i=t.iterator();i.hasNext();){var r=i.next(),n=r.getLabel();r.isIsolated()&&(n.isNull(0)?e.labelIsolatedLine(r,0):e.labelIsolatedLine(r,1))}},di.prototype.buildLines=function(t){for(var e=this,i=this._lineEdgesList.iterator();i.hasNext();){var r=i.next(),n=e._geometryFactory.createLineString(r.getCoordinates());e._resultLineList.add(n),r.setInResult(!0)}},di.prototype.collectBoundaryTouchEdge=function(t,e,i){var r=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;j.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),K.isResultOfOp(r,e)&&e===K.INTERSECTION&&(i.add(t.getEdge()),t.setVisitedEdge(!0))},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di};var Gr=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new x;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Gr.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var i=this._geometryFactory.createPoint(e);this._resultPointList.add(i)}},Gr.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,i=this._op.getGraph().getNodes().iterator();i.hasNext();){var r=i.next();if(!r.isInResult()&&!r.isIncidentEdgeInResult()&&(r.getEdges().getDegree()===0||t===K.INTERSECTION)){var n=r.getLabel();K.isResultOfOp(n,t)&&e.filterCoveredNodeToPoint(r)}}},Gr.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr};var ge=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};ge.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},ge.prototype.transformPolygon=function(t,e){var i=this,r=!0,n=this.transformLinearRing(t.getExteriorRing(),t);(n===null||!(n instanceof Wi)||n.isEmpty())&&(r=!1);for(var o=new x,f=0;f<t.getNumInteriorRing();f++){var h=i.transformLinearRing(t.getInteriorRingN(f),t);h===null||h.isEmpty()||(h instanceof Wi||(r=!1),o.add(h))}if(r)return this._factory.createPolygon(n,o.toArray([]));var l=new x;return n!==null&&l.add(n),l.addAll(o),this._factory.buildGeometry(l)},ge.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},ge.prototype.getInputGeometry=function(){return this._inputGeom},ge.prototype.transformMultiLineString=function(t,e){for(var i=this,r=new x,n=0;n<t.getNumGeometries();n++){var o=i.transformLineString(t.getGeometryN(n),t);o!==null&&(o.isEmpty()||r.add(o))}return this._factory.buildGeometry(r)},ge.prototype.transformCoordinates=function(t,e){return this.copy(t)},ge.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},ge.prototype.transformMultiPoint=function(t,e){for(var i=this,r=new x,n=0;n<t.getNumGeometries();n++){var o=i.transformPoint(t.getGeometryN(n),t);o!==null&&(o.isEmpty()||r.add(o))}return this._factory.buildGeometry(r)},ge.prototype.transformMultiPolygon=function(t,e){for(var i=this,r=new x,n=0;n<t.getNumGeometries();n++){var o=i.transformPolygon(t.getGeometryN(n),t);o!==null&&(o.isEmpty()||r.add(o))}return this._factory.buildGeometry(r)},ge.prototype.copy=function(t){return t.copy()},ge.prototype.transformGeometryCollection=function(t,e){for(var i=this,r=new x,n=0;n<t.getNumGeometries();n++){var o=i.transform(t.getGeometryN(n));o!==null&&(i._pruneEmptyGeometry&&o.isEmpty()||r.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection($.toGeometryArray(r)):this._factory.buildGeometry(r)},ge.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof me)return this.transformPoint(t,null);if(t instanceof is)return this.transformMultiPoint(t,null);if(t instanceof Wi)return this.transformLinearRing(t,null);if(t instanceof Wt)return this.transformLineString(t,null);if(t instanceof lr)return this.transformMultiLineString(t,null);if(t instanceof Bt)return this.transformPolygon(t,null);if(t instanceof Ti)return this.transformMultiPolygon(t,null);if(t instanceof te)return this.transformGeometryCollection(t,null);throw new vt("Unknown Geometry subtype: "+t.getClass().getName())},ge.prototype.transformLinearRing=function(t,e){var i=this.transformCoordinates(t.getCoordinateSequence(),t);if(i===null)return this._factory.createLinearRing(null);var r=i.size();return r>0&&r<4&&!this._preserveType?this._factory.createLineString(i):this._factory.createLinearRing(i)},ge.prototype.interfaces_=function(){return[]},ge.prototype.getClass=function(){return ge};var Si=function s(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new G,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Wt&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];s.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var i=arguments[0],r=arguments[1];this._srcPts=i,this._isClosed=s.isClosed(i),this._snapTolerance=r}};Si.prototype.snapVertices=function(t,e){for(var i=this,r=this._isClosed?t.size()-1:t.size(),n=0;n<r;n++){var o=t.get(n),f=i.findSnapForVertex(o,e);f!==null&&(t.set(n,new L(f)),n===0&&i._isClosed&&t.set(t.size()-1,new L(f)))}},Si.prototype.findSnapForVertex=function(t,e){for(var i=this,r=0;r<e.length;r++){if(t.equals2D(e[r]))return null;if(t.distance(e[r])<i._snapTolerance)return e[r]}return null},Si.prototype.snapTo=function(t){var e=new Ts(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var i=e.toCoordinateArray();return i},Si.prototype.snapSegments=function(t,e){var i=this;if(e.length===0)return null;var r=e.length;e[0].equals2D(e[e.length-1])&&(r=e.length-1);for(var n=0;n<r;n++){var o=e[n],f=i.findSegmentIndexToSnap(o,t);f>=0&&t.add(f+1,new L(o),!1)}},Si.prototype.findSegmentIndexToSnap=function(t,e){for(var i=this,r=Z.MAX_VALUE,n=-1,o=0;o<e.size()-1;o++){if(i._seg.p0=e.get(o),i._seg.p1=e.get(o+1),i._seg.p0.equals2D(t)||i._seg.p1.equals2D(t)){if(i._allowSnappingToSourceVertices)continue;return-1}var f=i._seg.distance(t);f<i._snapTolerance&&f<r&&(r=f,n=o)}return n},Si.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si},Si.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var Et=function(t){this._srcGeom=t||null},$o={SNAP_PRECISION_FACTOR:{configurable:!0}};Et.prototype.snapTo=function(t,e){var i=this.extractTargetCoordinates(t),r=new ta(e,i);return r.transform(this._srcGeom)},Et.prototype.snapToSelf=function(t,e){var i=this.extractTargetCoordinates(this._srcGeom),r=new ta(t,i,!0),n=r.transform(this._srcGeom),o=n;return e&&U(o,Ki)&&(o=n.buffer(0)),o},Et.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),i=e/10;return i},Et.prototype.extractTargetCoordinates=function(t){for(var e=new ri,i=t.getCoordinates(),r=0;r<i.length;r++)e.add(i[r]);return e.toArray(new Array(0).fill(null))},Et.prototype.computeMinimumSegmentLength=function(t){for(var e=Z.MAX_VALUE,i=0;i<t.length-1;i++){var r=t[i].distance(t[i+1]);r<e&&(e=r)}return e},Et.prototype.interfaces_=function(){return[]},Et.prototype.getClass=function(){return Et},Et.snap=function(t,e,i){var r=new Array(2).fill(null),n=new Et(t);r[0]=n.snapTo(e,i);var o=new Et(e);return r[1]=o.snapTo(r[0],i),r},Et.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=Et.computeSizeBasedSnapTolerance(t),i=t.getPrecisionModel();if(i.getType()===nt.FIXED){var r=1/i.getScale()*2/1.415;r>e&&(e=r)}return e}else if(arguments.length===2){var n=arguments[0],o=arguments[1];return Math.min(Et.computeOverlaySnapTolerance(n),Et.computeOverlaySnapTolerance(o))}},Et.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),i=Math.min(e.getHeight(),e.getWidth()),r=i*Et.SNAP_PRECISION_FACTOR;return r},Et.snapToSelf=function(t,e,i){var r=new Et(t);return r.snapToSelf(e,i)},$o.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Et,$o);var ta=function(s){function t(e,i,r){s.call(this),this._snapTolerance=e||null,this._snapPts=i||null,this._isSelfSnap=r!==void 0?r:!1}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(i,r){var n=new Si(i,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(r)},t.prototype.transformCoordinates=function(i,r){var n=i.toCoordinateArray(),o=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ge),oe=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};oe.prototype.getCommon=function(){return Z.longBitsToDouble(this._commonBits)},oe.prototype.add=function(t){var e=Z.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=oe.signExpBits(this._commonBits),this._isFirst=!1,null;var i=oe.signExpBits(e);if(i!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=oe.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=oe.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},oe.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=Z.longBitsToDouble(t),i=Z.toBinaryString(t),r="0000000000000000000000000000000000000000000000000000000000000000"+i,n=r.substring(r.length-64),o=n.substring(0,1)+" "+n.substring(1,12)+"(exp) "+n.substring(12)+" [ "+e+" ]";return o}},oe.prototype.interfaces_=function(){return[]},oe.prototype.getClass=function(){return oe},oe.getBit=function(t,e){var i=1<<e;return t&i?1:0},oe.signExpBits=function(t){return t>>52},oe.zeroLowerBits=function(t,e){var i=(1<<e)-1,r=~i,n=t&r;return n},oe.numCommonMostSigMantissaBits=function(t,e){for(var i=0,r=52;r>=0;r--){if(oe.getBit(t,r)!==oe.getBit(e,r))return i;i++}return 52};var rr=function(){this._commonCoord=null,this._ccFilter=new Xr},$n={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};rr.prototype.addCommonBits=function(t){var e=new sr(this._commonCoord);t.apply(e),t.geometryChanged()},rr.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new L(this._commonCoord);e.x=-e.x,e.y=-e.y;var i=new sr(e);return t.apply(i),t.geometryChanged(),t},rr.prototype.getCommonCoordinate=function(){return this._commonCoord},rr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},$n.CommonCoordinateFilter.get=function(){return Xr},$n.Translater.get=function(){return sr},Object.defineProperties(rr,$n);var Xr=function(){this._commonBitsX=new oe,this._commonBitsY=new oe};Xr.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},Xr.prototype.getCommonCoordinate=function(){return new L(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Xr.prototype.interfaces_=function(){return[Ci]},Xr.prototype.getClass=function(){return Xr};var sr=function(){this.trans=null;var t=arguments[0];this.trans=t};sr.prototype.filter=function(t,e){var i=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,i),t.setOrdinate(e,1,r)},sr.prototype.isDone=function(){return!1},sr.prototype.isGeometryChanged=function(){return!0},sr.prototype.interfaces_=function(){return[Ue]},sr.prototype.getClass=function(){return sr};var Gt=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Gt.prototype.selfSnap=function(t){var e=new Et(t),i=e.snapTo(t,this._snapTolerance);return i},Gt.prototype.removeCommonBits=function(t){this._cbr=new rr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},Gt.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},Gt.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),i=K.overlayOp(e[0],e[1],t);return this.prepareResult(i)},Gt.prototype.checkValid=function(t){t.isValid()||Xt.out.println("Snapped geometry is invalid")},Gt.prototype.computeSnapTolerance=function(){this._snapTolerance=Et.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Gt.prototype.snap=function(t){var e=this.removeCommonBits(t),i=Et.snap(e[0],e[1],this._snapTolerance);return i},Gt.prototype.interfaces_=function(){return[]},Gt.prototype.getClass=function(){return Gt},Gt.overlayOp=function(t,e,i){var r=new Gt(t,e);return r.getResultGeometry(i)},Gt.union=function(t,e){return Gt.overlayOp(t,e,K.UNION)},Gt.intersection=function(t,e){return Gt.overlayOp(t,e,K.INTERSECTION)},Gt.symDifference=function(t,e){return Gt.overlayOp(t,e,K.SYMDIFFERENCE)},Gt.difference=function(t,e){return Gt.overlayOp(t,e,K.DIFFERENCE)};var ae=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};ae.prototype.getResultGeometry=function(t){var e=null,i=!1,r=null;try{e=K.overlayOp(this._geom[0],this._geom[1],t);var n=!0;n&&(i=!0)}catch(o){if(o instanceof Bi)r=o;else throw o}finally{}if(!i)try{e=Gt.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof Bi?r:o}finally{}return e},ae.prototype.interfaces_=function(){return[]},ae.prototype.getClass=function(){return ae},ae.overlayOp=function(t,e,i){var r=new ae(t,e);return r.getResultGeometry(i)},ae.union=function(t,e){return ae.overlayOp(t,e,K.UNION)},ae.intersection=function(t,e){return ae.overlayOp(t,e,K.INTERSECTION)},ae.symDifference=function(t,e){return ae.overlayOp(t,e,K.SYMDIFFERENCE)},ae.difference=function(t,e){return ae.overlayOp(t,e,K.DIFFERENCE)};var Fs=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};Fs.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},Fs.prototype.interfaces_=function(){return[]},Fs.prototype.getClass=function(){return Fs};var We=function s(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=s.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var i=arguments[0],r=arguments[1],n=arguments[2];this._eventType=s.INSERT,this._label=i,this._xValue=r,this._obj=n}},to={INSERT:{configurable:!0},DELETE:{configurable:!0}};We.prototype.isDelete=function(){return this._eventType===We.DELETE},We.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},We.prototype.getObject=function(){return this._obj},We.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},We.prototype.getInsertEvent=function(){return this._insertEvent},We.prototype.isInsert=function(){return this._eventType===We.INSERT},We.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},We.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},We.prototype.interfaces_=function(){return[De]},We.prototype.getClass=function(){return We},to.INSERT.get=function(){return 1},to.DELETE.get=function(){return 2},Object.defineProperties(We,to);var cn=function(){};cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var Ht=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],i=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=i};Ht.prototype.isTrivialIntersection=function(t,e,i,r){if(t===i&&this._li.getIntersectionNum()===1){if(Ht.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var n=t.getNumPoints()-1;if(e===0&&r===n||r===0&&e===n)return!0}}return!1},Ht.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ht.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},Ht.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ht.prototype.isBoundaryPointInternal=function(t,e){for(var i=e.iterator();i.hasNext();){var r=i.next(),n=r.getCoordinate();if(t.isIntersection(n))return!0}return!1},Ht.prototype.hasProperIntersection=function(){return this._hasProper},Ht.prototype.hasIntersection=function(){return this._hasIntersection},Ht.prototype.isDone=function(){return this._isDone},Ht.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},Ht.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},Ht.prototype.addIntersections=function(t,e,i,r){if(t===i&&e===r)return null;this.numTests++;var n=t.getCoordinates()[e],o=t.getCoordinates()[e+1],f=i.getCoordinates()[r],h=i.getCoordinates()[r+1];this._li.computeIntersection(n,o,f,h),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),i.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,i,r)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),i.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht},Ht.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Ef=function(s){function t(){s.call(this),this.events=new x,this.nOverlaps=null}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var i=this;Ze.sort(this.events);for(var r=0;r<this.events.size();r++){var n=i.events.get(r);n.isDelete()&&n.getInsertEvent().setDeleteEventIndex(r)}},t.prototype.computeIntersections=function(){var i=this;if(arguments.length===1){var r=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var n=0;n<this.events.size();n++){var o=i.events.get(n);if(o.isInsert()&&i.processOverlaps(n,o.getDeleteEventIndex(),o,r),r.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ht&&U(arguments[0],Ye)&&U(arguments[1],Ye)){var f=arguments[0],h=arguments[1],l=arguments[2];this.addEdges(f,f),this.addEdges(h,h),this.computeIntersections(l)}else if(typeof arguments[2]=="boolean"&&U(arguments[0],Ye)&&arguments[1]instanceof Ht){var a=arguments[0],c=arguments[1],p=arguments[2];p?this.addEdges(a,null):this.addEdges(a),this.computeIntersections(c)}}},t.prototype.addEdge=function(i,r){for(var n=this,o=i.getMonotoneChainEdge(),f=o.getStartIndexes(),h=0;h<f.length-1;h++){var l=new Fs(o,h),a=new We(r,o.getMinX(h),l);n.events.add(a),n.events.add(new We(o.getMaxX(h),a))}},t.prototype.processOverlaps=function(i,r,n,o){for(var f=this,h=n.getObject(),l=i;l<r;l++){var a=f.events.get(l);if(a.isInsert()){var c=a.getObject();n.isSameLabel(a)||(h.computeIntersections(c,o),f.nOverlaps++)}}},t.prototype.addEdges=function(){var i=this;if(arguments.length===1)for(var r=arguments[0],n=r.iterator();n.hasNext();){var o=n.next();i.addEdge(o,o)}else if(arguments.length===2)for(var f=arguments[0],h=arguments[1],l=f.iterator();l.hasNext();){var a=l.next();i.addEdge(a,h)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(cn),Ni=function(){this._min=Z.POSITIVE_INFINITY,this._max=Z.NEGATIVE_INFINITY},ea={NodeComparator:{configurable:!0}};Ni.prototype.getMin=function(){return this._min},Ni.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},Ni.prototype.getMax=function(){return this._max},Ni.prototype.toString=function(){return Xe.toLineString(new L(this._min,0),new L(this._max,0))},Ni.prototype.interfaces_=function(){return[]},Ni.prototype.getClass=function(){return Ni},ea.NodeComparator.get=function(){return xs},Object.defineProperties(Ni,ea);var xs=function(){};xs.prototype.compare=function(t,e){var i=t,r=e,n=(i._min+i._max)/2,o=(r._min+r._max)/2;return n<o?-1:n>o?1:0},xs.prototype.interfaces_=function(){return[Ur]},xs.prototype.getClass=function(){return xs};var Pf=function(s){function t(){s.call(this),this._item=null;var e=arguments[0],i=arguments[1],r=arguments[2];this._min=e,this._max=i,this._item=r}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.query=function(i,r,n){if(!this.intersects(i,r))return null;n.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ni),Sf=function(s){function t(){s.call(this),this._node1=null,this._node2=null;var e=arguments[0],i=arguments[1];this._node1=e,this._node2=i,this.buildExtent(this._node1,this._node2)}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(i,r){this._min=Math.min(i._min,r._min),this._max=Math.max(i._max,r._max)},t.prototype.query=function(i,r,n){if(!this.intersects(i,r))return null;this._node1!==null&&this._node1.query(i,r,n),this._node2!==null&&this._node2.query(i,r,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ni),bi=function(){this._leaves=new x,this._root=null,this._level=0};bi.prototype.buildTree=function(){var t=this;Ze.sort(this._leaves,new Ni.NodeComparator);for(var e=this._leaves,i=null,r=new x;;){if(t.buildLevel(e,r),r.size()===1)return r.get(0);i=e,e=r,r=i}},bi.prototype.insert=function(t,e,i){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new Pf(t,e,i))},bi.prototype.query=function(t,e,i){this.init(),this._root.query(t,e,i)},bi.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},bi.prototype.printNode=function(t){Xt.out.println(Xe.toLineString(new L(t._min,this._level),new L(t._max,this._level)))},bi.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},bi.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var i=0;i<t.size();i+=2){var r=t.get(i),n=i+1<t.size()?t.get(i):null;if(n===null)e.add(r);else{var o=new Sf(t.get(i),t.get(i+1));e.add(o)}}},bi.prototype.interfaces_=function(){return[]},bi.prototype.getClass=function(){return bi};var us=function(){this._items=new x};us.prototype.visitItem=function(t){this._items.add(t)},us.prototype.getItems=function(){return this._items},us.prototype.interfaces_=function(){return[ji]},us.prototype.getClass=function(){return us};var hs=function(){this._index=null;var t=arguments[0];if(!U(t,Ki))throw new vt("Argument must be Polygonal");this._index=new vr(t)},eo={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};hs.prototype.locate=function(t){var e=new ii(t),i=new ls(e);return this._index.query(t.y,t.y,i),e.getLocation()},hs.prototype.interfaces_=function(){return[os]},hs.prototype.getClass=function(){return hs},eo.SegmentVisitor.get=function(){return ls},eo.IntervalIndexedGeometry.get=function(){return vr},Object.defineProperties(hs,eo);var ls=function(){this._counter=null;var t=arguments[0];this._counter=t};ls.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},ls.prototype.interfaces_=function(){return[ji]},ls.prototype.getClass=function(){return ls};var vr=function(){this._index=new bi;var t=arguments[0];this.init(t)};vr.prototype.init=function(t){for(var e=this,i=Ut.getLines(t),r=i.iterator();r.hasNext();){var n=r.next(),o=n.getCoordinates();e.addLine(o)}},vr.prototype.addLine=function(t){for(var e=this,i=1;i<t.length;i++){var r=new G(t[i-1],t[i]),n=Math.min(r.p0.y,r.p1.y),o=Math.max(r.p0.y,r.p1.y);e._index.insert(n,o,r)}},vr.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],i=new us;return this._index.query(t,e,i),i.getItems()}else if(arguments.length===3){var r=arguments[0],n=arguments[1],o=arguments[2];this._index.query(r,n,o)}},vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr};var ks=function(s){function t(){if(s.call(this),this._parentGeom=null,this._lineEdgeMap=new Oo,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Ke,arguments.length===2){var e=arguments[0],i=arguments[1],r=Be.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=i,this._boundaryNodeRule=r,i!==null&&this.add(i)}else if(arguments.length===3){var n=arguments[0],o=arguments[1],f=arguments[2];this._argIndex=n,this._parentGeom=o,this._boundaryNodeRule=f,o!==null&&this.add(o)}}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(i,r){var n=this._nodes.addNode(r),o=n.getLabel(),f=1,h=E.NONE;h=o.getLocation(i,M.ON),h===E.BOUNDARY&&f++;var l=t.determineBoundary(this._boundaryNodeRule,f);o.setLocation(i,l)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var i=arguments[0],r=arguments[1];return this.computeSelfNodes(i,r,!1)}else if(arguments.length===3){var n=arguments[0],o=arguments[1],f=arguments[2],h=new Ht(n,!0,!1);h.setIsDoneIfProperInt(f);var l=this.createEdgeSetIntersector(),a=this._parentGeom instanceof Wi||this._parentGeom instanceof Bt||this._parentGeom instanceof Ti,c=o||!a;return l.computeIntersections(this._edges,h,c),this.addSelfIntersectionNodes(this._argIndex),h}},t.prototype.computeSplitEdges=function(i){for(var r=this._edges.iterator();r.hasNext();){var n=r.next();n.eiList.addSplitEdges(i)}},t.prototype.computeEdgeIntersections=function(i,r,n){var o=new Ht(r,n,!0);o.setBoundaryNodes(this.getBoundaryNodes(),i.getBoundaryNodes());var f=this.createEdgeSetIntersector();return f.computeIntersections(this._edges,i._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof me){var i=arguments[0],r=i.getCoordinate();this.insertPoint(this._argIndex,r,E.INTERIOR)}else if(arguments[0]instanceof L){var n=arguments[0];this.insertPoint(this._argIndex,n,E.INTERIOR)}},t.prototype.addPolygon=function(i){var r=this;this.addPolygonRing(i.getExteriorRing(),E.EXTERIOR,E.INTERIOR);for(var n=0;n<i.getNumInteriorRing();n++){var o=i.getInteriorRingN(n);r.addPolygonRing(o,E.INTERIOR,E.EXTERIOR)}},t.prototype.addEdge=function(i){this.insertEdge(i);var r=i.getCoordinates();this.insertPoint(this._argIndex,r[0],E.BOUNDARY),this.insertPoint(this._argIndex,r[r.length-1],E.BOUNDARY)},t.prototype.addLineString=function(i){var r=Q.removeRepeatedPoints(i.getCoordinates());if(r.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var n=new ln(r,new ut(this._argIndex,E.INTERIOR));this._lineEdgeMap.put(i,n),this.insertEdge(n),j.isTrue(r.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,r[0]),this.insertBoundaryPoint(this._argIndex,r[r.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var i=this.getBoundaryNodes(),r=new Array(i.size()).fill(null),n=0,o=i.iterator();o.hasNext();){var f=o.next();r[n++]=f.getCoordinate().copy()}return r},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(i,r,n){if(this.isBoundaryNode(i,r))return null;n===E.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(i,r):this.insertPoint(i,r,n)},t.prototype.addPolygonRing=function(i,r,n){if(i.isEmpty())return null;var o=Q.removeRepeatedPoints(i.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var f=r,h=n;k.isCCW(o)&&(f=n,h=r);var l=new ln(o,new ut(this._argIndex,E.BOUNDARY,f,h));this._lineEdgeMap.put(i,l),this.insertEdge(l),this.insertPoint(this._argIndex,o[0],E.BOUNDARY)},t.prototype.insertPoint=function(i,r,n){var o=this._nodes.addNode(r),f=o.getLabel();f===null?o._label=new ut(i,n):f.setLocation(i,n)},t.prototype.createEdgeSetIntersector=function(){return new Ef},t.prototype.addSelfIntersectionNodes=function(i){for(var r=this,n=this._edges.iterator();n.hasNext();)for(var o=n.next(),f=o.getLabel().getLocation(i),h=o.eiList.iterator();h.hasNext();){var l=h.next();r.addSelfIntersectionNode(i,l.coord,f)}},t.prototype.add=function(){if(arguments.length===1){var i=arguments[0];if(i.isEmpty())return null;if(i instanceof Ti&&(this._useBoundaryDeterminationRule=!1),i instanceof Bt)this.addPolygon(i);else if(i instanceof Wt)this.addLineString(i);else if(i instanceof me)this.addPoint(i);else if(i instanceof is)this.addCollection(i);else if(i instanceof lr)this.addCollection(i);else if(i instanceof Ti)this.addCollection(i);else if(i instanceof te)this.addCollection(i);else throw new Error(i.getClass().getName())}else return s.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(i){for(var r=this,n=0;n<i.getNumGeometries();n++){var o=i.getGeometryN(n);r.add(o)}},t.prototype.locate=function(i){return U(this._parentGeom,Ki)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new hs(this._parentGeom)),this._areaPtLocator.locate(i)):this._ptLocator.locate(i,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var i=arguments[0];return this._lineEdgeMap.get(i)}else return s.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(i,r){return i.isInBoundary(r)?E.BOUNDARY:E.INTERIOR},t}(Ct),cs=function(){if(this._li=new fr,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new ks(0,t)}else if(arguments.length===2){var e=arguments[0],i=arguments[1],r=Be.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(i.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(i.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ks(0,e,r),this._arg[1]=new ks(1,i,r)}else if(arguments.length===3){var n=arguments[0],o=arguments[1],f=arguments[2];n.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(n.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ks(0,n,f),this._arg[1]=new ks(1,o,f)}};cs.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},cs.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},cs.prototype.interfaces_=function(){return[]},cs.prototype.getClass=function(){return cs};var _r=function(){};_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r},_r.map=function(){if(arguments[0]instanceof z&&U(arguments[1],_r.MapOp)){for(var t=arguments[0],e=arguments[1],i=new x,r=0;r<t.getNumGeometries();r++){var n=e.map(t.getGeometryN(r));n!==null&&i.add(n)}return t.getFactory().buildGeometry(i)}else if(U(arguments[0],Rt)&&U(arguments[1],_r.MapOp)){for(var o=arguments[0],f=arguments[1],h=new x,l=o.iterator();l.hasNext();){var a=l.next(),c=f.map(a);c!==null&&h.add(c)}return h}},_r.MapOp=function(){};var K=function(s){function t(){var e=arguments[0],i=arguments[1];s.call(this,e,i),this._ptLocator=new Ke,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new He,this._resultPolyList=new x,this._resultLineList=new x,this._resultPointList=new x,this._graph=new Ct(new qo),this._geomFact=e.getFactory()}return s&&(t.__proto__=s),t.prototype=Object.create(s&&s.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(i){var r=this._edgeList.findEqualEdge(i);if(r!==null){var n=r.getLabel(),o=i.getLabel();r.isPointwiseEqual(i)||(o=new ut(i.getLabel()),o.flip());var f=r.getDepth();f.isNull()&&f.add(n),f.add(o),n.merge(o)}else this._edgeList.add(i)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var r=i.next(),n=r.getSym();r.isInResult()&&n.isInResult()&&(r.setInResult(!1),n.setInResult(!1))}},t.prototype.isCoveredByLA=function(i){return!!(this.isCovered(i,this._resultLineList)||this.isCovered(i,this._resultPolyList))},t.prototype.computeGeometry=function(i,r,n,o){var f=new x;return f.addAll(i),f.addAll(r),f.addAll(n),f.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(f)},t.prototype.mergeSymLabels=function(){for(var i=this._graph.getNodes().iterator();i.hasNext();){var r=i.next();r.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(i,r){for(var n=this,o=r.iterator();o.hasNext();){var f=o.next(),h=n._ptLocator.locate(i,f);if(h!==E.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var i=new x,r=this._edgeList.iterator();r.hasNext();){var n=r.next();n.isCollapsed()&&(r.remove(),i.add(n.getCollapsedEdge()))}this._edgeList.addAll(i)},t.prototype.updateNodeLabelling=function(){for(var i=this._graph.getNodes().iterator();i.hasNext();){var r=i.next(),n=r.getEdges().getLabel();r.getLabel().merge(n)}},t.prototype.getResultGeometry=function(i){return this.computeOverlay(i),this._resultGeom},t.prototype.insertUniqueEdges=function(i){for(var r=this,n=i.iterator();n.hasNext();){var o=n.next();r.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(i){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var r=new x;this._arg[0].computeSplitEdges(r),this._arg[1].computeSplitEdges(r),this.insertUniqueEdges(r),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),mr.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(i),this.cancelDuplicateResultEdges();var n=new ve(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var o=new di(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(i);var f=new Gr(this,this._geomFact,this._ptLocator);this._resultPointList=f.build(i),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,i)},t.prototype.labelIncompleteNode=function(i,r){var n=this._ptLocator.locate(i.getCoordinate(),this._arg[r].getGeometry());i.getLabel().setLocation(r,n)},t.prototype.copyPoints=function(i){for(var r=this,n=this._arg[i].getNodeIterator();n.hasNext();){var o=n.next(),f=r._graph.addNode(o.getCoordinate());f.setLabel(i,o.getLabel().getLocation(i))}},t.prototype.findResultAreaEdges=function(i){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var n=r.next(),o=n.getLabel();o.isArea()&&!n.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,M.RIGHT),o.getLocation(1,M.RIGHT),i)&&n.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var i=this._edgeList.iterator();i.hasNext();){var r=i.next(),n=r.getLabel(),o=r.getDepth();if(!o.isNull()){o.normalize();for(var f=0;f<2;f++)!n.isNull(f)&&n.isArea()&&!o.isNull(f)&&(o.getDelta(f)===0?n.toLine(f):(j.isTrue(!o.isNull(f,M.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(f,M.LEFT,o.getLocation(f,M.LEFT)),j.isTrue(!o.isNull(f,M.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(f,M.RIGHT,o.getLocation(f,M.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var i=this,r=this._graph.getNodes().iterator();r.hasNext();){var n=r.next();n.getEdges().computeLabelling(i._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var i=this,r=this._graph.getNodes().iterator();r.hasNext();){var n=r.next(),o=n.getLabel();n.isIsolated()&&(o.isNull(0)?i.labelIncompleteNode(n,0):i.labelIncompleteNode(n,1)),n.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(i){return!!this.isCovered(i,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(cs);K.overlayOp=function(s,t,e){var i=new K(s,t),r=i.getResultGeometry(e);return r},K.intersection=function(s,t){if(s.isEmpty()||t.isEmpty())return K.createEmptyResult(K.INTERSECTION,s,t,s.getFactory());if(s.isGeometryCollection()){var e=t;return Vr.map(s,{interfaces_:function(){return[_r.MapOp]},map:function(i){return i.intersection(e)}})}return s.checkNotGeometryCollection(s),s.checkNotGeometryCollection(t),ae.overlayOp(s,t,K.INTERSECTION)},K.symDifference=function(s,t){if(s.isEmpty()||t.isEmpty()){if(s.isEmpty()&&t.isEmpty())return K.createEmptyResult(K.SYMDIFFERENCE,s,t,s.getFactory());if(s.isEmpty())return t.copy();if(t.isEmpty())return s.copy()}return s.checkNotGeometryCollection(s),s.checkNotGeometryCollection(t),ae.overlayOp(s,t,K.SYMDIFFERENCE)},K.resultDimension=function(s,t,e){var i=t.getDimension(),r=e.getDimension(),n=-1;switch(s){case K.INTERSECTION:n=Math.min(i,r);break;case K.UNION:n=Math.max(i,r);break;case K.DIFFERENCE:n=i;break;case K.SYMDIFFERENCE:n=Math.max(i,r);break}return n},K.createEmptyResult=function(s,t,e,i){var r=null;switch(K.resultDimension(s,t,e)){case-1:r=i.createGeometryCollection(new Array(0).fill(null));break;case 0:r=i.createPoint();break;case 1:r=i.createLineString();break;case 2:r=i.createPolygon();break}return r},K.difference=function(s,t){return s.isEmpty()?K.createEmptyResult(K.DIFFERENCE,s,t,s.getFactory()):t.isEmpty()?s.copy():(s.checkNotGeometryCollection(s),s.checkNotGeometryCollection(t),ae.overlayOp(s,t,K.DIFFERENCE))},K.isResultOfOp=function(){if(arguments.length===2){var s=arguments[0],t=arguments[1],e=s.getLocation(0),i=s.getLocation(1);return K.isResultOfOp(e,i,t)}else if(arguments.length===3){var r=arguments[0],n=arguments[1],o=arguments[2];switch(r===E.BOUNDARY&&(r=E.INTERIOR),n===E.BOUNDARY&&(n=E.INTERIOR),o){case K.INTERSECTION:return r===E.INTERIOR&&n===E.INTERIOR;case K.UNION:return r===E.INTERIOR||n===E.INTERIOR;case K.DIFFERENCE:return r===E.INTERIOR&&n!==E.INTERIOR;case K.SYMDIFFERENCE:return r===E.INTERIOR&&n!==E.INTERIOR||r!==E.INTERIOR&&n===E.INTERIOR}return!1}},K.INTERSECTION=1,K.UNION=2,K.DIFFERENCE=3,K.SYMDIFFERENCE=4;var nr=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Ke,this._seg=new G;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};nr.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,i=0;i<this._linework.getNumGeometries();i++)for(var r=e._linework.getGeometryN(i),n=r.getCoordinateSequence(),o=0;o<n.size()-1;o++){n.getCoordinate(o,e._seg.p0),n.getCoordinate(o+1,e._seg.p1);var f=e._seg.distance(t);if(f<=e._boundaryDistanceTolerance)return!0}return!1},nr.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?E.BOUNDARY:this._ptLocator.locate(t,this._g)},nr.prototype.extractLinework=function(t){var e=new ps;t.apply(e);var i=e.getLinework(),r=$.toLineStringArray(i);return t.getFactory().createMultiLineString(r)},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr};var ps=function(){this._linework=null,this._linework=new x};ps.prototype.getLinework=function(){return this._linework},ps.prototype.filter=function(t){var e=this;if(t instanceof Bt){var i=t;this._linework.add(i.getExteriorRing());for(var r=0;r<i.getNumInteriorRing();r++)e._linework.add(i.getInteriorRingN(r))}},ps.prototype.interfaces_=function(){return[si]},ps.prototype.getClass=function(){return ps};var Cr=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Cr.prototype.extractPoints=function(t,e,i){for(var r=this,n=t.getCoordinates(),o=0;o<n.length-1;o++)r.computeOffsetPoints(n[o],n[o+1],e,i)},Cr.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Cr.prototype.getPoints=function(t){for(var e=this,i=new x,r=Ut.getLines(this._g),n=r.iterator();n.hasNext();){var o=n.next();e.extractPoints(o,t,i)}return i},Cr.prototype.computeOffsetPoints=function(t,e,i,r){var n=e.x-t.x,o=e.y-t.y,f=Math.sqrt(n*n+o*o),h=i*n/f,l=i*o/f,a=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var p=new L(a-l,c+h);r.add(p)}if(this._doRight){var d=new L(a+l,c-h);r.add(d)}},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr};var Pe=function s(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=s.TOLERANCE,this._testCoords=new x;var t=arguments[0],e=arguments[1],i=arguments[2];this._boundaryDistanceTolerance=s.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,i],this._locFinder=[new nr(this._geom[0],this._boundaryDistanceTolerance),new nr(this._geom[1],this._boundaryDistanceTolerance),new nr(this._geom[2],this._boundaryDistanceTolerance)]},ia={TOLERANCE:{configurable:!0}};Pe.prototype.reportResult=function(t,e,i){Xt.out.println("Overlay result invalid - A:"+E.toLocationSymbol(e[0])+" B:"+E.toLocationSymbol(e[1])+" expected:"+(i?"i":"e")+" actual:"+E.toLocationSymbol(e[2]))},Pe.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Pe.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],i=0;i<this._testCoords.size();i++){var r=t._testCoords.get(i);if(!t.checkValid(e,r))return t._invalidLocation=r,!1}return!0}else if(arguments.length===2){var n=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),Pe.hasLocation(this._location,E.BOUNDARY)?!0:this.isValidResult(n,this._location)}},Pe.prototype.addTestPts=function(t){var e=new Cr(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Pe.prototype.isValidResult=function(t,e){var i=K.isResultOfOp(e[0],e[1],t),r=e[2]===E.INTERIOR,n=!(i^r);return n||this.reportResult(t,e,i),n},Pe.prototype.getInvalidLocation=function(){return this._invalidLocation},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe},Pe.hasLocation=function(t,e){for(var i=0;i<3;i++)if(t[i]===e)return!0;return!1},Pe.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Et.computeSizeBasedSnapTolerance(t),Et.computeSizeBasedSnapTolerance(e))},Pe.isValid=function(t,e,i,r){var n=new Pe(t,e,r);return n.isValid(i)},ia.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Pe,ia);var Se=function s(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=s.extractFactory(t),this._inputGeoms=t};Se.prototype.extractElements=function(t,e){var i=this;if(t===null)return null;for(var r=0;r<t.getNumGeometries();r++){var n=t.getGeometryN(r);i._skipEmpty&&n.isEmpty()||e.add(n)}},Se.prototype.combine=function(){for(var t=this,e=new x,i=this._inputGeoms.iterator();i.hasNext();){var r=i.next();t.extractElements(r,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se},Se.combine=function(){if(arguments.length===1){var t=arguments[0],e=new Se(t);return e.combine()}else if(arguments.length===2){var i=arguments[0],r=arguments[1],n=new Se(Se.createList(i,r));return n.combine()}else if(arguments.length===3){var o=arguments[0],f=arguments[1],h=arguments[2],l=new Se(Se.createList(o,f,h));return l.combine()}},Se.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Se.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],i=new x;return i.add(t),i.add(e),i}else if(arguments.length===3){var r=arguments[0],n=arguments[1],o=arguments[2],f=new x;return f.add(r),f.add(n),f.add(o),f}};var Dt=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new x)},ra={STRTREE_NODE_CAPACITY:{configurable:!0}};Dt.prototype.reduceToGeometries=function(t){for(var e=this,i=new x,r=t.iterator();r.hasNext();){var n=r.next(),o=null;U(n,Ye)?o=e.unionTree(n):n instanceof z&&(o=n),i.add(o)}return i},Dt.prototype.extractByEnvelope=function(t,e,i){for(var r=new x,n=0;n<e.getNumGeometries();n++){var o=e.getGeometryN(n);o.getEnvelopeInternal().intersects(t)?r.add(o):i.add(o)}return this._geomFactory.buildGeometry(r)},Dt.prototype.unionOptimized=function(t,e){var i=t.getEnvelopeInternal(),r=e.getEnvelopeInternal();if(!i.intersects(r)){var n=Se.combine(t,e);return n}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=i.intersection(r);return this.unionUsingEnvelopeIntersection(t,e,o)},Dt.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new Vo(Dt.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var i=e.next();t.insert(i.getEnvelopeInternal(),i)}this._inputPolys=null;var r=t.itemsTree(),n=this.unionTree(r);return n},Dt.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],i=arguments[1],r=arguments[2];if(r-i<=1){var n=Dt.getGeometry(e,i);return this.unionSafe(n,null)}else{if(r-i===2)return this.unionSafe(Dt.getGeometry(e,i),Dt.getGeometry(e,i+1));var o=Math.trunc((r+i)/2),f=this.binaryUnion(e,i,o),h=this.binaryUnion(e,o,r);return this.unionSafe(f,h)}}},Dt.prototype.repeatedUnion=function(t){for(var e=null,i=t.iterator();i.hasNext();){var r=i.next();e===null?e=r.copy():e=e.union(r)}return e},Dt.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Dt.prototype.unionActual=function(t,e){return Dt.restrictToPolygons(t.union(e))},Dt.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),i=this.binaryUnion(e);return i},Dt.prototype.unionUsingEnvelopeIntersection=function(t,e,i){var r=new x,n=this.extractByEnvelope(i,t,r),o=this.extractByEnvelope(i,e,r),f=this.unionActual(n,o);r.add(f);var h=Se.combine(r);return h},Dt.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),i=e.buildGeometry(t),r=i.buffer(0);return r}else if(arguments.length===2){var n=arguments[0],o=arguments[1],f=n.getFactory(),h=f.createGeometryCollection([n,o]),l=h.buffer(0);return l}},Dt.prototype.interfaces_=function(){return[]},Dt.prototype.getClass=function(){return Dt},Dt.restrictToPolygons=function(t){if(U(t,Ki))return t;var e=zi.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon($.toPolygonArray(e))},Dt.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Dt.union=function(t){var e=new Dt(t);return e.union()},ra.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Dt,ra);var pn=function(){};pn.prototype.interfaces_=function(){return[]},pn.prototype.getClass=function(){return pn},pn.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return K.createEmptyResult(K.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ae.overlayOp(t,e,K.UNION)};function Wr(){return new gn}function gn(){this.reset()}gn.prototype={constructor:gn,reset:function(){this.s=this.t=0},add:function(s){sa(dn,s,this.t),sa(this,dn.s,this.s),this.s?this.t+=dn.t:this.s=dn.t},valueOf:function(){return this.s}};var dn=new gn;function sa(s,t,e){var i=s.s=t+e,r=i-t,n=i-r;s.t=t-n+(e-r)}var It=1e-6,pt=Math.PI,Ui=pt/2,na=pt/4,qi=pt*2,Tr=180/pt,yi=pt/180,fe=Math.abs,Nf=Math.atan,gs=Math.atan2,Ot=Math.cos,Ft=Math.sin,ds=Math.sqrt;function oa(s){return s>1?0:s<-1?pt:Math.acos(s)}function Yr(s){return s>1?Ui:s<-1?-Ui:Math.asin(s)}function Vs(){}function yn(s,t){s&&fa.hasOwnProperty(s.type)&&fa[s.type](s,t)}var aa={Feature:function(s,t){yn(s.geometry,t)},FeatureCollection:function(s,t){for(var e=s.features,i=-1,r=e.length;++i<r;)yn(e[i].geometry,t)}},fa={Sphere:function(s,t){t.sphere()},Point:function(s,t){s=s.coordinates,t.point(s[0],s[1],s[2])},MultiPoint:function(s,t){for(var e=s.coordinates,i=-1,r=e.length;++i<r;)s=e[i],t.point(s[0],s[1],s[2])},LineString:function(s,t){io(s.coordinates,t,0)},MultiLineString:function(s,t){for(var e=s.coordinates,i=-1,r=e.length;++i<r;)io(e[i],t,0)},Polygon:function(s,t){ua(s.coordinates,t)},MultiPolygon:function(s,t){for(var e=s.coordinates,i=-1,r=e.length;++i<r;)ua(e[i],t)},GeometryCollection:function(s,t){for(var e=s.geometries,i=-1,r=e.length;++i<r;)yn(e[i],t)}};function io(s,t,e){var i=-1,r=s.length-e,n;for(t.lineStart();++i<r;)n=s[i],t.point(n[0],n[1],n[2]);t.lineEnd()}function ua(s,t){var e=-1,i=s.length;for(t.polygonStart();++e<i;)io(s[e],t,1);t.polygonEnd()}function bf(s,t){s&&aa.hasOwnProperty(s.type)?aa[s.type](s,t):yn(s,t)}Wr(),Wr();function ro(s){return[gs(s[1],s[0]),Yr(s[2])]}function ys(s){var t=s[0],e=s[1],i=Ot(e);return[i*Ot(t),i*Ft(t),Ft(e)]}function mn(s,t){return s[0]*t[0]+s[1]*t[1]+s[2]*t[2]}function vn(s,t){return[s[1]*t[2]-s[2]*t[1],s[2]*t[0]-s[0]*t[2],s[0]*t[1]-s[1]*t[0]]}function so(s,t){s[0]+=t[0],s[1]+=t[1],s[2]+=t[2]}function _n(s,t){return[s[0]*t,s[1]*t,s[2]*t]}function no(s){var t=ds(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]);s[0]/=t,s[1]/=t,s[2]/=t}Wr();function ha(s,t){function e(i,r){return i=s(i,r),t(i[0],i[1])}return s.invert&&t.invert&&(e.invert=function(i,r){return i=t.invert(i,r),i&&s.invert(i[0],i[1])}),e}function oo(s,t){return[s>pt?s-qi:s<-pt?s+qi:s,t]}oo.invert=oo;function Df(s,t,e){return(s%=qi)?t||e?ha(ca(s),pa(t,e)):ca(s):t||e?pa(t,e):oo}function la(s){return function(t,e){return t+=s,[t>pt?t-qi:t<-pt?t+qi:t,e]}}function ca(s){var t=la(s);return t.invert=la(-s),t}function pa(s,t){var e=Ot(s),i=Ft(s),r=Ot(t),n=Ft(t);function o(f,h){var l=Ot(h),a=Ot(f)*l,c=Ft(f)*l,p=Ft(h),d=p*e+a*i;return[gs(c*r-d*n,a*e-p*i),Yr(d*r+c*n)]}return o.invert=function(f,h){var l=Ot(h),a=Ot(f)*l,c=Ft(f)*l,p=Ft(h),d=p*r-c*n;return[gs(c*r+p*n,a*e+d*i),Yr(d*e-a*i)]},o}function Rf(s,t,e,i,r,n){if(e){var o=Ot(t),f=Ft(t),h=i*e;r==null?(r=t+i*qi,n=t-h/2):(r=ga(o,r),n=ga(o,n),(i>0?r<n:r>n)&&(r+=i*qi));for(var l,a=r;i>0?a>n:a<n;a-=h)l=ro([o,-f*Ot(a),-f*Ft(a)]),s.point(l[0],l[1])}}function ga(s,t){t=ys(t),t[0]-=s,no(t);var e=oa(-t[1]);return((-t[2]<0?-e:e)+qi-It)%qi}function da(){var s=[],t;return{point:function(e,i){t.push([e,i])},lineStart:function(){s.push(t=[])},lineEnd:Vs,rejoin:function(){s.length>1&&s.push(s.pop().concat(s.shift()))},result:function(){var e=s;return s=[],t=null,e}}}function Bf(s,t,e,i,r,n){var o=s[0],f=s[1],h=t[0],l=t[1],a=0,c=1,p=h-o,d=l-f,u;if(u=e-o,!(!p&&u>0)){if(u/=p,p<0){if(u<a)return;u<c&&(c=u)}else if(p>0){if(u>c)return;u>a&&(a=u)}if(u=r-o,!(!p&&u<0)){if(u/=p,p<0){if(u>c)return;u>a&&(a=u)}else if(p>0){if(u<a)return;u<c&&(c=u)}if(u=i-f,!(!d&&u>0)){if(u/=d,d<0){if(u<a)return;u<c&&(c=u)}else if(d>0){if(u>c)return;u>a&&(a=u)}if(u=n-f,!(!d&&u<0)){if(u/=d,d<0){if(u>c)return;u>a&&(a=u)}else if(d>0){if(u<a)return;u<c&&(c=u)}return a>0&&(s[0]=o+a*p,s[1]=f+a*d),c<1&&(t[0]=o+c*p,t[1]=f+c*d),!0}}}}}function Cn(s,t){return fe(s[0]-t[0])<It&&fe(s[1]-t[1])<It}function Wn(s,t,e,i){this.x=s,this.z=t,this.o=e,this.e=i,this.v=!1,this.n=this.p=null}function ya(s,t,e,i,r){var n=[],o=[],f,h;if(s.forEach(function(u){if(!((v=u.length-1)<=0)){var v,C=u[0],W=u[v],_;if(Cn(C,W)){for(r.lineStart(),f=0;f<v;++f)r.point((C=u[f])[0],C[1]);r.lineEnd();return}n.push(_=new Wn(C,u,null,!0)),o.push(_.o=new Wn(C,null,_,!1)),n.push(_=new Wn(W,u,null,!1)),o.push(_.o=new Wn(W,null,_,!0))}}),!!n.length){for(o.sort(t),ma(n),ma(o),f=0,h=o.length;f<h;++f)o[f].e=e=!e;for(var l=n[0],a,c;;){for(var p=l,d=!0;p.v;)if((p=p.n)===l)return;a=p.z,r.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(f=0,h=a.length;f<h;++f)r.point((c=a[f])[0],c[1]);else i(p.x,p.n.x,1,r);p=p.n}else{if(d)for(a=p.p.z,f=a.length-1;f>=0;--f)r.point((c=a[f])[0],c[1]);else i(p.x,p.p.x,-1,r);p=p.p}p=p.o,a=p.z,d=!d}while(!p.v);r.lineEnd()}}}function ma(s){if(t=s.length){for(var t,e=0,i=s[0],r;++e<t;)i.n=r=s[e],r.p=i,i=r;i.n=r=s[0],r.p=i}}function va(s,t){return s<t?-1:s>t?1:s>=t?0:NaN}function Mf(s){return s.length===1&&(s=Of(s)),{left:function(t,e,i,r){for(i==null&&(i=0),r==null&&(r=t.length);i<r;){var n=i+r>>>1;s(t[n],e)<0?i=n+1:r=n}return i},right:function(t,e,i,r){for(i==null&&(i=0),r==null&&(r=t.length);i<r;){var n=i+r>>>1;s(t[n],e)>0?r=n:i=n+1}return i}}}function Of(s){return function(t,e){return va(s(t),e)}}Mf(va);function _a(s){for(var t=s.length,e,i=-1,r=0,n,o;++i<t;)r+=s[i].length;for(n=new Array(r);--t>=0;)for(o=s[t],e=o.length;--e>=0;)n[--r]=o[e];return n}var Gs=1e9,Tn=-Gs;function Ff(s,t,e,i){function r(l,a){return s<=l&&l<=e&&t<=a&&a<=i}function n(l,a,c,p){var d=0,u=0;if(l==null||(d=o(l,c))!==(u=o(a,c))||h(l,a)<0^c>0)do p.point(d===0||d===3?s:e,d>1?i:t);while((d=(d+c+4)%4)!==u);else p.point(a[0],a[1])}function o(l,a){return fe(l[0]-s)<It?a>0?0:3:fe(l[0]-e)<It?a>0?2:1:fe(l[1]-t)<It?a>0?1:0:a>0?3:2}function f(l,a){return h(l.x,a.x)}function h(l,a){var c=o(l,1),p=o(a,1);return c!==p?c-p:c===0?a[1]-l[1]:c===1?l[0]-a[0]:c===2?l[1]-a[1]:a[0]-l[0]}return function(l){var a=l,c=da(),p,d,u,v,C,W,_,T,A,P,b,D={point:R,lineStart:q,lineEnd:H,polygonStart:X,polygonEnd:O};function R(Y,J){r(Y,J)&&a.point(Y,J)}function B(){for(var Y=0,J=0,it=d.length;J<it;++J)for(var ft=d[J],rt=1,Qe=ft.length,de=ft[0],Di,lt,Pt=de[0],xt=de[1];rt<Qe;++rt)Di=Pt,lt=xt,de=ft[rt],Pt=de[0],xt=de[1],lt<=i?xt>i&&(Pt-Di)*(i-lt)>(xt-lt)*(s-Di)&&++Y:xt<=i&&(Pt-Di)*(i-lt)<(xt-lt)*(s-Di)&&--Y;return Y}function X(){a=c,p=[],d=[],b=!0}function O(){var Y=B(),J=b&&Y,it=(p=_a(p)).length;(J||it)&&(l.polygonStart(),J&&(l.lineStart(),n(null,null,1,l),l.lineEnd()),it&&ya(p,f,Y,n,l),l.polygonEnd()),a=l,p=d=u=null}function q(){D.point=F,d&&d.push(u=[]),P=!0,A=!1,_=T=NaN}function H(){p&&(F(v,C),W&&A&&c.rejoin(),p.push(c.result())),D.point=R,A&&a.lineEnd()}function F(Y,J){var it=r(Y,J);if(d&&u.push([Y,J]),P)v=Y,C=J,W=it,P=!1,it&&(a.lineStart(),a.point(Y,J));else if(it&&A)a.point(Y,J);else{var ft=[_=Math.max(Tn,Math.min(Gs,_)),T=Math.max(Tn,Math.min(Gs,T))],rt=[Y=Math.max(Tn,Math.min(Gs,Y)),J=Math.max(Tn,Math.min(Gs,J))];Bf(ft,rt,s,t,e,i)?(A||(a.lineStart(),a.point(ft[0],ft[1])),a.point(rt[0],rt[1]),it||a.lineEnd(),b=!1):it&&(a.lineStart(),a.point(Y,J),b=!1)}_=Y,T=J,A=it}return D}}var ao=Wr();function xf(s,t){var e=t[0],i=t[1],r=[Ft(e),-Ot(e),0],n=0,o=0;ao.reset();for(var f=0,h=s.length;f<h;++f)if(a=(l=s[f]).length)for(var l,a,c=l[a-1],p=c[0],d=c[1]/2+na,u=Ft(d),v=Ot(d),C=0;C<a;++C,p=_,u=A,v=P,c=W){var W=l[C],_=W[0],T=W[1]/2+na,A=Ft(T),P=Ot(T),b=_-p,D=b>=0?1:-1,R=D*b,B=R>pt,X=u*A;if(ao.add(gs(X*D*Ft(R),v*P+X*Ot(R))),n+=B?b+D*qi:b,B^p>=e^_>=e){var O=vn(ys(c),ys(W));no(O);var q=vn(r,O);no(q);var H=(B^b>=0?-1:1)*Yr(q[2]);(i>H||i===H&&(O[0]||O[1]))&&(o+=B^b>=0?1:-1)}}return(n<-It||n<It&&ao<-It)^o&1}Wr();function Ca(s){return s}Wr(),Wr();var ms=1/0,In=ms,Xs=-ms,Ln=Xs,Wa={point:kf,lineStart:Vs,lineEnd:Vs,polygonStart:Vs,polygonEnd:Vs,result:function(){var s=[[ms,In],[Xs,Ln]];return Xs=Ln=-(In=ms=1/0),s}};function kf(s,t){s<ms&&(ms=s),s>Xs&&(Xs=s),t<In&&(In=t),t>Ln&&(Ln=t)}Wr();function Ta(s,t,e,i){return function(r,n){var o=t(n),f=r.invert(i[0],i[1]),h=da(),l=t(h),a=!1,c,p,d,u={point:v,lineStart:W,lineEnd:_,polygonStart:function(){u.point=T,u.lineStart=A,u.lineEnd=P,p=[],c=[]},polygonEnd:function(){u.point=v,u.lineStart=W,u.lineEnd=_,p=_a(p);var b=xf(c,f);p.length?(a||(n.polygonStart(),a=!0),ya(p,Gf,b,e,n)):b&&(a||(n.polygonStart(),a=!0),n.lineStart(),e(null,null,1,n),n.lineEnd()),a&&(n.polygonEnd(),a=!1),p=c=null},sphere:function(){n.polygonStart(),n.lineStart(),e(null,null,1,n),n.lineEnd(),n.polygonEnd()}};function v(b,D){var R=r(b,D);s(b=R[0],D=R[1])&&n.point(b,D)}function C(b,D){var R=r(b,D);o.point(R[0],R[1])}function W(){u.point=C,o.lineStart()}function _(){u.point=v,o.lineEnd()}function T(b,D){d.push([b,D]);var R=r(b,D);l.point(R[0],R[1])}function A(){l.lineStart(),d=[]}function P(){T(d[0][0],d[0][1]),l.lineEnd();var b=l.clean(),D=h.result(),R,B=D.length,X,O,q;if(d.pop(),c.push(d),d=null,!!B){if(b&1){if(O=D[0],(X=O.length-1)>0){for(a||(n.polygonStart(),a=!0),n.lineStart(),R=0;R<X;++R)n.point((q=O[R])[0],q[1]);n.lineEnd()}return}B>1&&b&2&&D.push(D.pop().concat(D.shift())),p.push(D.filter(Vf))}}return u}}function Vf(s){return s.length>1}function Gf(s,t){return((s=s.x)[0]<0?s[1]-Ui-It:Ui-s[1])-((t=t.x)[0]<0?t[1]-Ui-It:Ui-t[1])}const Ia=Ta(function(){return!0},Xf,zf,[-pt,-Ui]);function Xf(s){var t=NaN,e=NaN,i=NaN,r;return{lineStart:function(){s.lineStart(),r=1},point:function(n,o){var f=n>0?pt:-pt,h=fe(n-t);fe(h-pt)<It?(s.point(t,e=(e+o)/2>0?Ui:-Ui),s.point(i,e),s.lineEnd(),s.lineStart(),s.point(f,e),s.point(n,e),r=0):i!==f&&h>=pt&&(fe(t-i)<It&&(t-=i*It),fe(n-f)<It&&(n-=f*It),e=Yf(t,e,n,o),s.point(i,e),s.lineEnd(),s.lineStart(),s.point(f,e),r=0),s.point(t=n,e=o),i=f},lineEnd:function(){s.lineEnd(),t=e=NaN},clean:function(){return 2-r}}}function Yf(s,t,e,i){var r,n,o=Ft(s-e);return fe(o)>It?Nf((Ft(t)*(n=Ot(i))*Ft(e)-Ft(i)*(r=Ot(t))*Ft(s))/(r*n*o)):(t+i)/2}function zf(s,t,e,i){var r;if(s==null)r=e*Ui,i.point(-pt,r),i.point(0,r),i.point(pt,r),i.point(pt,0),i.point(pt,-r),i.point(0,-r),i.point(-pt,-r),i.point(-pt,0),i.point(-pt,r);else if(fe(s[0]-t[0])>It){var n=s[0]<t[0]?pt:-pt;r=e*n/2,i.point(-n,r),i.point(0,r),i.point(n,r)}else i.point(t[0],t[1])}function Uf(s,t){var e=Ot(s),i=e>0,r=fe(e)>It;function n(a,c,p,d){Rf(d,s,t,p,a,c)}function o(a,c){return Ot(a)*Ot(c)>e}function f(a){var c,p,d,u,v;return{lineStart:function(){u=d=!1,v=1},point:function(C,W){var _=[C,W],T,A=o(C,W),P=i?A?0:l(C,W):A?l(C+(C<0?pt:-pt),W):0;if(!c&&(u=d=A)&&a.lineStart(),A!==d&&(T=h(c,_),(!T||Cn(c,T)||Cn(_,T))&&(_[0]+=It,_[1]+=It,A=o(_[0],_[1]))),A!==d)v=0,A?(a.lineStart(),T=h(_,c),a.point(T[0],T[1])):(T=h(c,_),a.point(T[0],T[1]),a.lineEnd()),c=T;else if(r&&c&&i^A){var b;!(P&p)&&(b=h(_,c,!0))&&(v=0,i?(a.lineStart(),a.point(b[0][0],b[0][1]),a.point(b[1][0],b[1][1]),a.lineEnd()):(a.point(b[1][0],b[1][1]),a.lineEnd(),a.lineStart(),a.point(b[0][0],b[0][1])))}A&&(!c||!Cn(c,_))&&a.point(_[0],_[1]),c=_,d=A,p=P},lineEnd:function(){d&&a.lineEnd(),c=null},clean:function(){return v|(u&&d)<<1}}}function h(a,c,p){var d=ys(a),u=ys(c),v=[1,0,0],C=vn(d,u),W=mn(C,C),_=C[0],T=W-_*_;if(!T)return!p&&a;var A=e*W/T,P=-e*_/T,b=vn(v,C),D=_n(v,A),R=_n(C,P);so(D,R);var B=b,X=mn(D,B),O=mn(B,B),q=X*X-O*(mn(D,D)-1);if(!(q<0)){var H=ds(q),F=_n(B,(-X-H)/O);if(so(F,D),F=ro(F),!p)return F;var Y=a[0],J=c[0],it=a[1],ft=c[1],rt;J<Y&&(rt=Y,Y=J,J=rt);var Qe=J-Y,de=fe(Qe-pt)<It,Di=de||Qe<It;if(!de&&ft<it&&(rt=it,it=ft,ft=rt),Di?de?it+ft>0^F[1]<(fe(F[0]-Y)<It?it:ft):it<=F[1]&&F[1]<=ft:Qe>pt^(Y<=F[0]&&F[0]<=J)){var lt=_n(B,(-X+H)/O);return so(lt,D),[F,ro(lt)]}}}function l(a,c){var p=i?s:pt-s,d=0;return a<-p?d|=1:a>p&&(d|=2),c<-p?d|=4:c>p&&(d|=8),d}return Ta(o,f,n,i?[0,-s]:[-pt,s-pt])}function La(s){return function(t){var e=new fo;for(var i in s)e[i]=s[i];return e.stream=t,e}}function fo(){}fo.prototype={constructor:fo,point:function(s,t){this.stream.point(s,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Aa(s,t,e){var i=t[1][0]-t[0][0],r=t[1][1]-t[0][1],n=s.clipExtent&&s.clipExtent();s.scale(150).translate([0,0]),n!=null&&s.clipExtent(null),bf(e,s.stream(Wa));var o=Wa.result(),f=Math.min(i/(o[1][0]-o[0][0]),r/(o[1][1]-o[0][1])),h=+t[0][0]+(i-f*(o[1][0]+o[0][0]))/2,l=+t[0][1]+(r-f*(o[1][1]+o[0][1]))/2;return n!=null&&s.clipExtent(n),s.scale(f*150).translate([h,l])}function qf(s,t,e){return Aa(s,[[0,0],t],e)}var wa=16,Zf=Ot(30*yi);function Ea(s,t){return+t?Kf(s,t):Hf(s)}function Hf(s){return La({point:function(t,e){t=s(t,e),this.stream.point(t[0],t[1])}})}function Kf(s,t){function e(i,r,n,o,f,h,l,a,c,p,d,u,v,C){var W=l-i,_=a-r,T=W*W+_*_;if(T>4*t&&v--){var A=o+p,P=f+d,b=h+u,D=ds(A*A+P*P+b*b),R=Yr(b/=D),B=fe(fe(b)-1)<It||fe(n-c)<It?(n+c)/2:gs(P,A),X=s(B,R),O=X[0],q=X[1],H=O-i,F=q-r,Y=_*H-W*F;(Y*Y/T>t||fe((W*H+_*F)/T-.5)>.3||o*p+f*d+h*u<Zf)&&(e(i,r,n,o,f,h,O,q,B,A/=D,P/=D,b,v,C),C.point(O,q),e(O,q,B,A,P,b,l,a,c,p,d,u,v,C))}}return function(i){var r,n,o,f,h,l,a,c,p,d,u,v,C={point:W,lineStart:_,lineEnd:A,polygonStart:function(){i.polygonStart(),C.lineStart=P},polygonEnd:function(){i.polygonEnd(),C.lineStart=_}};function W(R,B){R=s(R,B),i.point(R[0],R[1])}function _(){c=NaN,C.point=T,i.lineStart()}function T(R,B){var X=ys([R,B]),O=s(R,B);e(c,p,a,d,u,v,c=O[0],p=O[1],a=R,d=X[0],u=X[1],v=X[2],wa,i),i.point(c,p)}function A(){C.point=W,i.lineEnd()}function P(){_(),C.point=b,C.lineEnd=D}function b(R,B){T(r=R,B),n=c,o=p,f=d,h=u,l=v,C.point=T}function D(){e(c,p,a,d,u,v,n,o,r,f,h,l,wa,i),C.lineEnd=A,A()}return C}}var jf=La({point:function(s,t){this.stream.point(s*yi,t*yi)}});function Jf(s){return Qf(function(){return s})()}function Qf(s){var t,e=150,i=480,r=250,n,o,f=0,h=0,l=0,a=0,c=0,p,d,u=null,v=Ia,C=null,W,_,T,A=Ca,P=.5,b=Ea(O,P),D,R;function B(F){return F=d(F[0]*yi,F[1]*yi),[F[0]*e+n,o-F[1]*e]}function X(F){return F=d.invert((F[0]-n)/e,(o-F[1])/e),F&&[F[0]*Tr,F[1]*Tr]}function O(F,Y){return F=t(F,Y),[F[0]*e+n,o-F[1]*e]}B.stream=function(F){return D&&R===F?D:D=jf(v(p,b(A(R=F))))},B.clipAngle=function(F){return arguments.length?(v=+F?Uf(u=F*yi,6*yi):(u=null,Ia),H()):u*Tr},B.clipExtent=function(F){return arguments.length?(A=F==null?(C=W=_=T=null,Ca):Ff(C=+F[0][0],W=+F[0][1],_=+F[1][0],T=+F[1][1]),H()):C==null?null:[[C,W],[_,T]]},B.scale=function(F){return arguments.length?(e=+F,q()):e},B.translate=function(F){return arguments.length?(i=+F[0],r=+F[1],q()):[i,r]},B.center=function(F){return arguments.length?(f=F[0]%360*yi,h=F[1]%360*yi,q()):[f*Tr,h*Tr]},B.rotate=function(F){return arguments.length?(l=F[0]%360*yi,a=F[1]%360*yi,c=F.length>2?F[2]%360*yi:0,q()):[l*Tr,a*Tr,c*Tr]},B.precision=function(F){return arguments.length?(b=Ea(O,P=F*F),H()):ds(P)},B.fitExtent=function(F,Y){return Aa(B,F,Y)},B.fitSize=function(F,Y){return qf(B,F,Y)};function q(){d=ha(p=Df(l,a,c),t);var F=t(f,h);return n=i-F[0]*e,o=r+F[1]*e,H()}function H(){return D=R=null,B}return function(){return t=s.apply(this,arguments),B.invert=t.invert&&X,q()}}function Pa(s){return function(t,e){var i=Ot(t),r=Ot(e),n=s(i*r);return[n*r*Ft(t),n*Ft(e)]}}function Sa(s){return function(t,e){var i=ds(t*t+e*e),r=s(i),n=Ft(r),o=Ot(r);return[gs(t*n,i*o),Yr(i&&e*n/i)]}}var $f=Pa(function(s){return ds(2/(1+s))});$f.invert=Sa(function(s){return 2*Yr(s/2)});var Na=Pa(function(s){return(s=oa(s))&&s/Ft(s)});Na.invert=Sa(function(s){return s});function tu(){return Jf(Na).scale(79.4188).clipAngle(180-.001)}function ba(s,t){return[s,t]}ba.invert=ba;function eu(s,t,e){e=e||{};var i=e.units||"kilometers",r=e.steps||8;if(!s)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof r!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(r<=0)throw new Error("steps must be greater than 0");var n=[];switch(s.type){case"GeometryCollection":return Dn(s,function(o){var f=An(o,t,i,r);f&&n.push(f)}),Us(n);case"FeatureCollection":return bn(s,function(o){var f=An(o,t,i,r);f&&bn(f,function(h){h&&n.push(h)})}),Us(n)}return An(s,t,i,r)}function An(s,t,e,i){var r=s.properties||{},n=s.type==="Feature"?s.geometry:s;if(n.type==="GeometryCollection"){var o=[];return Dn(s,function(v){var C=An(v,t,e,i);C&&o.push(C)}),Us(o)}var f=iu(n),h={type:n.type,coordinates:Ra(n.coordinates,f)},l=new qn,a=l.read(h),c=Sn(qs(t,e),"meters"),p=zt.bufferOp(a,c,i),d=new xo;if(p=d.write(p),!Da(p.coordinates)){var u={type:p.type,coordinates:Ba(p.coordinates,f)};return ar(u,r)}}function Da(s){return Array.isArray(s[0])?Da(s[0]):isNaN(s[0])}function Ra(s,t){return typeof s[0]!="object"?t(s):s.map(function(e){return Ra(e,t)})}function Ba(s,t){return typeof s[0]!="object"?t.invert(s):s.map(function(e){return Ba(e,t)})}function iu(s){var t=$a(s).geometry.coordinates,e=[-t[0],-t[1]];return tu().rotate(e).scale(ye)}class ru{constructor(){I(this,"LineID","myEntity1");I(this,"Tag","");I(this,"towers",[]);I(this,"ISPhaseSequence",!1);I(this,"Wairnum",0);I(this,"Type",0);I(this,"Trees",[]);I(this,"wireAColor","#FFFFFF");I(this,"wireBColor","#FFFFFF");I(this,"wireCColor","#FFFFFF");I(this,"wireTColor","#FFFFFF");I(this,"wireD1Color","#FFFFFF");I(this,"wireD2Color","#FFFFFF");I(this,"wireWidth",1);I(this,"LineDistanceDisplaymin",0);I(this,"LineDistanceDisplaymax",5e3)}}class su{constructor(){I(this,"id","");I(this,"modelid","");I(this,"lon",0);I(this,"lat",0);I(this,"alt",0);I(this,"treeH",0);I(this,"modelurl","");I(this,"treeScale",1)}}class nu{constructor(){I(this,"id","");I(this,"name","");I(this,"type",0);I(this,"Longitude",0);I(this,"Latitude",0);I(this,"Altitude",0);I(this,"RollX",0);I(this,"RollY",90);I(this,"RollZ",0);I(this,"towerScale",1);I(this,"towerHeight",0);I(this,"towerModelUri","");I(this,"towerPoint",[]);I(this,"Insulators",[]);I(this,"DistanceDisplaymin",0);I(this,"DistanceDisplaymax",1e3)}}class ou{constructor(){I(this,"id","");I(this,"name","");I(this,"type",0);I(this,"WairFX","进");I(this,"linenum",1);I(this,"Wairnum",0);I(this,"PhaseSequence",0);I(this,"RollX",0);I(this,"RollY",0);I(this,"RollZ",0);I(this,"InsulatorScale",1);I(this,"InsulatorLength",0);I(this,"InsulatorModelUri","");I(this,"InsulatorPoint",[]);I(this,"DistanceDisplaymin",0);I(this,"DistanceDisplaymax",500)}}class au{constructor(){I(this,"name","");I(this,"X",-45);I(this,"Y",90);I(this,"Z",0)}}var Te=(s=>(s[s.A相=0]="A相",s[s.B相=1]="B相",s[s.C相=2]="C相",s[s.地线1=3]="地线1",s[s.地线2=4]="地线2",s))(Te||{}),mi=(s=>(s[s.直线塔=0]="直线塔",s[s.耐张塔=1]="耐张塔",s[s.门架塔=2]="门架塔",s[s.换位塔=3]="换位塔",s))(mi||{}),Ma=(s=>(s[s.交流单回路=0]="交流单回路",s[s.交流双回路=1]="交流双回路",s[s.直流单回路=2]="直流单回路",s[s.直流双回路=3]="直流双回路",s[s.交流四回路=4]="交流四回路",s))(Ma||{}),Ys=(s=>(s[s.地线=0]="地线",s[s.回路一=1]="回路一",s[s.回路二=2]="回路二",s[s.回路三=3]="回路三",s[s.回路四=4]="回路四",s))(Ys||{}),Kt=(s=>(s[s.悬垂串=0]="悬垂串",s[s.耐张串=1]="耐张串",s[s.跳线串=2]="跳线串",s[s.硬跳串=3]="硬跳串",s[s.V串=4]="V串",s[s.地线串=5]="地线串",s[s.绕跳临时=6]="绕跳临时",s))(Kt||{}),w=(s=>(s[s.单分裂=0]="单分裂",s[s.双分裂=1]="双分裂",s[s.四分裂=2]="四分裂",s[s.六分裂=3]="六分裂",s[s.八分裂=4]="八分裂",s))(w||{}),ht=(s=>(s[s.直线距离=0]="直线距离",s[s.水平距离=1]="水平距离",s[s.对地距离=2]="对地距离",s[s.净空距离=3]="净空距离",s[s.安全距离=4]="安全距离",s[s.全部测量=5]="全部测量",s))(ht||{});class fu{constructor(){I(this,"horizontalLevels");I(this,"verticalLevels");I(this,"straightLineLevels");I(this,"clearanceLevels")}}const Je={units:"kilometers"};function wn(s,t,e,i){const r=uo(s,t),n=uo(s,e),o=uo(s,i),f=Math.min(r,n,o);return f===r?t:f===n?e:i}function uo(s,t){if(!t||t.length===0)return console.log("fastPointToLineDistance: line is empty or null"),1/0;let e=1/0;for(let r=0;r<t.length;r++){const n=t[r],o=s[0]-n[0],f=s[1]-n[1],h=o*o+f*f;h<e&&(e=h)}const i=Math.sqrt(e);return console.log(`fastPointToLineDistance result: ${i}`),i}const uu={horizontalLevels:[{name:"critical",minDistance:0,maxDistance:160,color:"#ff0000"},{name:"danger",minDistance:160,maxDistance:170,color:"#ff0000"},{name:"warning",minDistance:170,maxDistance:180,color:"#ffa500"},{name:"safe",minDistance:180,maxDistance:1/0,color:"#00ff00"}],verticalLevels:[{name:"critical",minDistance:0,maxDistance:160,color:"#ff0000"},{name:"danger",minDistance:160,maxDistance:170,color:"#ff0000"},{name:"warning",minDistance:170,maxDistance:180,color:"#ffa500"},{name:"safe",minDistance:180,maxDistance:1/0,color:"#00ff00"}],straightLineLevels:[{name:"critical",minDistance:0,maxDistance:160,color:"#ff0000"},{name:"danger",minDistance:160,maxDistance:170,color:"#ff0000"},{name:"warning",minDistance:170,maxDistance:180,color:"#ffa500"},{name:"safe",minDistance:180,maxDistance:1/0,color:"#00ff00"}]},Ir=(s,t,e,i=uu,r=ht.全部测量)=>{const n=be(s.slice(0,2)),{nearestCoord:o}=Fa(s,t),f=t.findIndex(lt=>lt[0]==o[0]&&lt[1]==o[1]);let h=[];if(f==0)h.push(t[0],t[1]);else if(f==t.length-1)h.push(t[t.length-2],t[t.length-1]);else{const lt=[t[f],t[f+1]],Pt=[t[f-1],t[f]];var l=Ar(n,ue(lt),Je),a=Ar(n,ue(Pt),Je);h=l>a?Pt:lt}console.log("附近的点",f,h);const c=ue([h[0].slice(0,2),h[1].slice(0,2)]),p=be(h[0].slice(0,2)),d=be(h[1].slice(0,2));var u=Ar(n,c,Je),v=Zi(n,p,Je)||0,C=Math.sqrt(v*v-u*u)||0;let W=h[0].slice(0,2);C>0&&(W=Ao(c,0,C,Je).geometry.coordinates[1]);const _=Zi(p,d,Je),T=Math.abs(h[0][2]-h[1][2]),A=Math.min(h[0][2],h[1][2]),P=Math.max(h[0][2],h[1][2]),b=h[0][2]>h[1][2]?P-C/_*T:C/_*T+A;console.log("高度差>>>>",T),console.log("最小高度>>>>",A),console.log("最大高度>>>>",P);const D=b-s[2],R=u*1e3,B=Math.sqrt(R*R+D*D);console.log("水平距离>>>>",R),console.log("竖直距离>>>>",D),console.log("直线距离>>>>",B);let X="#eff819",O=g.Color.RED;const q=g.Cartesian3.fromDegrees(s[0],s[1],s[2]),H=g.Cartesian3.fromDegrees(W[0],W[1],s[2]),F=g.Cartesian3.fromDegrees(W[0],W[1],b);console.log(`坐标详情: 树木=[${s[0]}, ${s[1]}, ${s[2]}], 导线点=[${W[0]}, ${W[1]}, ${b}]`);var Y=Qa(be([s[0],s[1]]),be([W[0],W[1]])).geometry.coordinates;const J=g.Cartesian3.fromDegrees(Y[0],Y[1],s[2]),it=g.Cartesian3.fromDegrees(Y[0],Y[1],b-D/2),ft=g.Cartesian3.fromDegrees(W[0],W[1],b-D/2);if(i!==null){let lt;if((r==ht.水平距离||r==ht.全部测量)&&(i.horizontalLevels&&(lt=i.horizontalLevels.find(Pt=>R>=Pt.minDistance&&R<=Pt.maxDistance)),lt)){X=lt.color,O=g.Color.fromCssColorString(lt.color);const Pt={position:J,name:"水平距离",label:{text:`水平距离${R.toFixed(1)}米`,fillColor:g.Color.fromCssColorString(X),font:"12px sans-serif",pixelOffset:new g.Cartesian2(0,0),scaleByDistance:new g.NearFarScalar(1e3,1.5,2e3,1),disableDepthTestDistance:Number.POSITIVE_INFINITY}},xt=[];xt.push(q),xt.push(H);var rt={polyline:{show:!0,positions:xt,clampToGround:!1,width:2,material:O,shadows:g.ShadowMode.DISABLED}};if(e.add(Pt),e.add(rt),r==ht.水平距离)return}if((r==ht.对地距离||r==ht.全部测量)&&(i.verticalLevels&&(lt=i.verticalLevels.find(Pt=>D>=Pt.minDistance&&D<=Pt.maxDistance)),lt)){X=lt.color,O=g.Color.fromCssColorString(lt.color);const Pt={position:ft,name:"竖直距离",label:{text:`竖直距离${D.toFixed(1)}米`,fillColor:g.Color.fromCssColorString(X),font:"12px sans-serif",pixelOffset:new g.Cartesian2(0,0),scaleByDistance:new g.NearFarScalar(1e3,1.5,2e3,1),disableDepthTestDistance:Number.POSITIVE_INFINITY}},xt=[];xt.push(H),xt.push(F);var Qe={polyline:{show:!0,positions:xt,clampToGround:!1,width:2,material:O,shadows:g.ShadowMode.DISABLED}};if(e.add(Pt),e.add(Qe),r==ht.对地距离)return}if(r==ht.净空距离||r==ht.全部测量){let Pt=!1;if(i.clearanceLevels&&(lt=i.clearanceLevels.find(xt=>D>=xt.minDistance&&D<=xt.maxDistance)),!lt&&r==ht.全部测量?(Pt=!0,X="#00ff00",O=g.Color.GREEN):lt&&(X=lt.color,O=g.Color.fromCssColorString(lt.color)),lt||Pt){const xt={position:ft,name:"净空距离",label:{text:`净空距离${D.toFixed(1)}米`,fillColor:g.Color.fromCssColorString(X),font:"12px sans-serif",pixelOffset:new g.Cartesian2(0,0),scaleByDistance:new g.NearFarScalar(1e3,1.5,2e3,1),disableDepthTestDistance:Number.POSITIVE_INFINITY}},po=[];po.push(H),po.push(F);var de={polyline:{show:!0,positions:po,clampToGround:!1,width:2,material:O,shadows:g.ShadowMode.DISABLED}};if(e.add(xt),e.add(de),r==ht.净空距离)return}}if((r==ht.直线距离||r==ht.全部测量)&&(i.straightLineLevels&&(lt=i.straightLineLevels.find(Pt=>B>=Pt.minDistance&&B<=Pt.maxDistance)),lt)){X=lt.color,O=g.Color.fromCssColorString(lt.color);const Pt={position:it,name:"直线距离",label:{text:`直线距离${B.toFixed(1)}米`,fillColor:g.Color.fromCssColorString(X),font:"12px sans-serif",pixelOffset:new g.Cartesian2(0,0),scaleByDistance:new g.NearFarScalar(1e3,1.5,2e3,1),disableDepthTestDistance:Number.POSITIVE_INFINITY}},xt=[];xt.push(q),xt.push(F);var Di={polyline:{show:!0,positions:xt,clampToGround:!1,width:2,material:O,shadows:g.ShadowMode.DISABLED}};if(e.add(Pt),e.add(Di),r==ht.直线距离)return}}console.log(`已添加测量结果: 距离=${B.toFixed(1)}m, 颜色=${X}, 实体数量=${e.values.length}`)},Oa=(s,t,e)=>{const i=be(s.slice(0,2)),{nearestCoord:r}=Fa(s,t),n=t.findIndex(B=>B[0]==r[0]&&B[1]==r[1]);let o=[];if(n==0)o.push(t[0],t[1]);else if(n==t.length-1)o.push(t[t.length-2],t[t.length-1]);else{const B=[t[n],t[n+1]],X=[t[n-1],t[n]];var f=Ar(i,ue(B),Je),h=Ar(i,ue(X),Je);o=f>h?X:B}const l=ue([o[0].slice(0,2),o[1].slice(0,2)]),a=be(o[0].slice(0,2)),c=be(o[1].slice(0,2));var p=Ar(i,l,Je),d=Zi(i,a,Je)||0,u=Math.sqrt(d*d-p*p)||0;let v=o[0].slice(0,2);u>0&&(v=Ao(l,0,u,Je).geometry.coordinates[1]);const C=Zi(a,c,Je),W=Math.abs(o[0][2]-o[1][2]),_=Math.min(o[0][2],o[1][2]),T=Math.max(o[0][2],o[1][2]),A=o[0][2]>o[1][2]?T-u/C*W:u/C*W+_,P=A-s[2],b=p*1e3,D=Math.sqrt(b*b+P*P);return{treeId:e,treeCoordinates:[s[0],s[1],s[2]],conductorCoordinates:[v[0],v[1],A],horizontalDistance:parseFloat(b.toFixed(1)),verticalDistance:parseFloat(P.toFixed(1)),straightLineDistance:parseFloat(D.toFixed(1)),timestamp:Date.now()}};function Fa(s,t){const e=be(s.slice(0,2)),i=[];t.forEach(f=>{i.push(be([f[0],f[1]]))});const r=Us(i),n=tf(e,r),o=Zi(e,n,Je);return{nearestCoord:n.geometry.coordinates,nearestDistance:o}}function N(s,t,e,i,r){e||(e=new g.HeadingPitchRoll);const n=g.Transforms.headingPitchRollQuaternion(s,e,i,r),o=g.Matrix4.fromRotationTranslation(g.Matrix3.fromQuaternion(n,new g.Matrix3),s,new g.Matrix4);return g.Matrix4.multiplyByPoint(o,t,new g.Cartesian3)}function Ne(s,t){var e=s.cartesianToCartographic(t),i=g.Math.toDegrees(e.latitude),r=g.Math.toDegrees(e.longitude),n=e.height;return[r,i,n]}function or(s,t,e,i){const r=t*Math.PI/180,n=s*Math.PI/180,o=i*Math.PI/180,f=e*Math.PI/180,h=Math.sin(f-n)*Math.cos(o),l=Math.cos(r)*Math.sin(o)-Math.sin(r)*Math.cos(o)*Math.cos(f-n);let a=Math.atan2(h,l)*180/Math.PI;return a=(a+360)%360,a}function m(s,t=6){const e=[];for(var i=0;i<s.length-1;i++)e.push(...hu(s[i],s[i+1],t*-1e3,100));return e}function hu(s,t,e,i){var r=[],n=g.Cartographic.fromCartesian(s),o=g.Cartographic.fromCartesian(t),f=n.longitude*180/Math.PI,h=n.latitude*180/Math.PI,l=o.longitude*180/Math.PI,a=o.latitude*180/Math.PI,c=Math.sqrt((f-l)*(f-l)+(h-a)*(h-a)),p=c*e,d=g.Cartesian3.clone(s),u=g.Cartesian3.clone(t),v=g.Cartesian3.distance(d,g.Cartesian3.ZERO),C=g.Cartesian3.distance(u,g.Cartesian3.ZERO);if(g.Cartesian3.normalize(d,d),g.Cartesian3.normalize(u,u),g.Cartesian3.distance(d,u)==0)return r;var W=g.Cartesian3.angleBetween(d,u);r.push(s);for(var _=1;_<i-1;_++){var T=_*1/(i-1),A=1-T,P=Math.sin(A*W)/Math.sin(W),b=Math.sin(T*W)/Math.sin(W),D=g.Cartesian3.multiplyByScalar(d,P,new g.Cartesian3),R=g.Cartesian3.multiplyByScalar(u,b,new g.Cartesian3),B=g.Cartesian3.add(D,R,new g.Cartesian3),X=T*Math.PI,O=v*A+C*T+Math.sin(X)*p;B=g.Cartesian3.multiplyByScalar(B,O,B),r.push(B)}return r.push(t),r}function lu(s,t,e=30){const i=s.length;if(i<=2||t===0||t===i-1)return!1;const r=or(s[t-1].Longitude,s[t-1].Latitude,s[t].Longitude,s[t].Latitude);let o=or(s[t].Longitude,s[t].Latitude,s[t+1].Longitude,s[t+1].Latitude)-r;return o>180&&(o-=360),o<-180&&(o+=360),Math.abs(o)>=e}function ho(s,t,e=2){const i=s.length;if(i<=1)return 0;if(lu(s,t,15))return t<i-1?or(s[t].Longitude,s[t].Latitude,s[t+1].Longitude,s[t+1].Latitude):or(s[t-1].Longitude,s[t-1].Latitude,s[t].Longitude,s[t].Latitude);let r=Math.max(0,t-e),n=Math.min(i-1,t+e);if(n-r<1)return t===i-1?or(s[t-1].Longitude,s[t-1].Latitude,s[t].Longitude,s[t].Latitude):or(s[t].Longitude,s[t].Latitude,s[t+1].Longitude,s[t+1].Latitude);const o=[];for(let a=r;a<n;a++){const c=or(s[a].Longitude,s[a].Latitude,s[a+1].Longitude,s[a+1].Latitude);o.push(c)}if(o.length===1)return o[0];let f=0,h=0;for(const a of o){const c=a*Math.PI/180;f+=Math.cos(c),h+=Math.sin(c)}return(Math.atan2(h,f)*180/Math.PI+360)%360}function cu(s,t){const e=s*Math.PI/180,i=t*Math.PI/180,r=Math.cos(e),n=Math.sin(e),o=Math.cos(i),f=Math.sin(i),h=r+o,l=n+f;if(Math.abs(h)<1e-10&&Math.abs(l)<1e-10)return(s+90)%360;let a=Math.atan2(l,h)*180/Math.PI;return a=(a+360)%360,a}function pu(s,t,e){if(!t||t.length<2)return!1;const i=be(s),r=ue(t),n=Ar(i,r,{units:"meters"});return console.log(`isPointInCorridor: point=[${s[0]}, ${s[1]}], distance=${n}, threshold=${e}`),n<=e}function gu(s,t,e=2e3){if(!s||!t||t.length<2)return console.log("filterTreesInCorridor: invalid input parameters"),[];console.log(`filterTreesInCorridor: processing ${s.length} trees, ${t.length} towers, width=${e}`);const i=t.map(n=>[n.Longitude,n.Latitude]);console.log(`filterTreesInCorridor: line points extracted, first point: [${i[0][0]}, ${i[0][1]}]`);const r=s.filter(n=>{if(n.lon===void 0||n.lat===void 0)return console.warn("filterTreesInCorridor: tree missing lon/lat properties",n),!1;const o=[n.lon,n.lat],f=pu(o,i,e);return s.indexOf(n)<5&&console.log(`Tree ${s.indexOf(n)}: [${o[0]}, ${o[1]}], inCorridor: ${f}`),f});return console.log(`filterTreesInCorridor: found ${r.length} trees in corridor`),r}function du(s,t=2e3){if(!s||s.length<2)return[];const e=s.map(r=>[r.Longitude,r.Latitude]),i=ue(e);try{const r=eu(i,t/1e3,{units:"kilometers"});if(r.geometry.type==="Polygon"){let n=r.geometry.coordinates[0].map(o=>[o[0],o[1]]);return n.length>=3&&xa(n)<0&&(n=n.reverse()),n}else if(r.geometry.type==="MultiPolygon"){let o=r.geometry.coordinates[0][0].map(f=>[f[0],f[1]]);return o.length>=3&&xa(o)<0&&(o=o.reverse()),o}return[]}catch{return[]}}function xa(s){if(s.length<3)return 0;let t=0;const e=s.length;for(let i=0;i<e;i++){const r=(i+1)%e;t+=s[i][0]*s[r][1],t-=s[r][0]*s[i][1]}return t/2}class yu{constructor(t,e,i){I(this,"viewer");I(this,"LineInfo");I(this,"Keym","");I(this,"dataSource2");I(this,"entityCollection2");I(this,"offsetTowers",[]);I(this,"autoCalculateRollX",!0);I(this,"towerWirePoints",new Map);I(this,"loadedWireSegments",new Set);I(this,"loadedTowerIndices",new Set);I(this,"isDynamicLoadingEnabled",!0);I(this,"isLineModelRemoved",!1);I(this,"cameraMoveHandler",null);I(this,"offsetWires11",[]);I(this,"offsetWires12",[]);I(this,"offsetWires13",[]);I(this,"offsetWires21",[]);I(this,"offsetWires22",[]);I(this,"offsetWires23",[]);I(this,"ToffsetArcWires1A",[]);I(this,"ToffsetArcWires2A",[]);I(this,"ToffsetWires1A1",[]);I(this,"ToffsetWires1A2",[]);I(this,"ToffsetArcWires1B",[]);I(this,"ToffsetArcWires2B",[]);I(this,"ToffsetWires1B1",[]);I(this,"ToffsetWires1B2",[]);I(this,"ToffsetArcWires1C",[]);I(this,"ToffsetArcWires2C",[]);I(this,"ToffsetWires1C1",[]);I(this,"ToffsetWires1C2",[]);I(this,"ToffsetArcWires1A2",[]);I(this,"ToffsetArcWires2A2",[]);I(this,"ToffsetWires2A1",[]);I(this,"ToffsetWires2A2",[]);I(this,"ToffsetArcWires1B2",[]);I(this,"ToffsetArcWires2B2",[]);I(this,"ToffsetWires2B1",[]);I(this,"ToffsetWires2B2",[]);I(this,"ToffsetArcWires1C2",[]);I(this,"ToffsetArcWires2C2",[]);I(this,"ToffsetWires2C1",[]);I(this,"ToffsetWires2C2",[]);I(this,"offsetArcWires1A",[]);I(this,"offsetArcWires1B",[]);I(this,"offsetArcWires1C",[]);I(this,"offsetArcWires2A",[]);I(this,"offsetArcWires2B",[]);I(this,"offsetArcWires2C",[]);I(this,"offsetGrouundWires1",[]);I(this,"offsetGrouundWires2",[]);I(this,"offsetGrouundWires11",[]);I(this,"offsetGrouundWires12",[]);I(this,"arcLine1A1",[]);I(this,"arcLine1B1",[]);I(this,"arcLine1C1",[]);I(this,"LinedataSource2");I(this,"LineentityCollection2");I(this,"modelCache",new Map);this.Keym=i,this.viewer=t,this.LineInfo=e,this.dataSource2=new g.CustomDataSource(this.LineInfo.LineID),this.entityCollection2=this.dataSource2.entities,this.LinedataSource2=new g.CustomDataSource(this.LineInfo.LineID+"daoxian"),this.LineentityCollection2=this.LinedataSource2.entities}createModelCacheKey(t,e,i,r){return`${t}_${e}_${i}_${r}`}getCachedModelConfig(t,e,i,r){const n=Math.max(0,i),o=Math.min(r,5e4),f=this.createModelCacheKey(t,e,n,o);if(!this.modelCache.has(f)){const h={uri:t,scale:e,distanceDisplayCondition:[n,o]};this.modelCache.set(f,h)}return this.modelCache.get(f)}addModelToCollection(t,e,i,r,n,o,f){const h=this.getCachedModelConfig(r,o,f[0],f[1]);this.entityCollection2.add(Pn(t,e,i,h.uri,n,h.scale,h.distanceDisplayCondition))}setAutoCalculateRollX(t){this.autoCalculateRollX=t}getAutoCalculateRollX(){return this.autoCalculateRollX}setDynamicLoadingEnabled(t){this.isDynamicLoadingEnabled=t}getDynamicLoadingEnabled(){return this.isDynamicLoadingEnabled}setupCameraMoveListener(){this.cameraMoveHandler&&this.cameraMoveHandler(),this.cameraMoveHandler=this.viewer.camera.moveEnd.addEventListener(()=>{this.updateVisibleTowers()})}getVisibleTowerIndices(){var h;if(!this.viewer.camera||this.offsetTowers.length===0)return{start:0,end:0};const t=this.viewer.camera.position,e=((h=this.viewer.camera.positionCartographic)==null?void 0:h.height)||1e3;let i=5;e>5e4?i=2:e>1e4?i=3:e>5e3?i=5:i=10;let r=0,n=Number.MAX_VALUE;for(let l=0;l<this.offsetTowers.length;l++){const a=g.Cartesian3.distance(t,this.offsetTowers[l]);a<n&&(n=a,r=l)}const o=Math.max(0,r-i),f=Math.min(this.offsetTowers.length-1,r+i);return{start:o,end:f}}updateVisibleTowers(){const{start:t,end:e}=this.getVisibleTowerIndices();this.isLineModelRemoved||this.loadTowersInRange(t,e)}initializeLineData(){this.Keym=="OW_JPS_EEngin_001"&&(this.LineInfo.towers.forEach(t=>{this.offsetTowers.push(g.Cartesian3.fromDegrees(t.Longitude,t.Latitude,t.Altitude))}),this.autoCalculateRollX&&this.calculateTowerOrientations())}calculateTowerOrientations(){const t=this.LineInfo.towers.length;if(t!==0){if(t===1){this.LineInfo.towers[0].RollX===void 0&&(this.LineInfo.towers[0].RollX=90);return}for(let e=0;e<t;e++){let i=0;if(this.LineInfo.towers[e].type===mi.耐张塔)if(e===0)i=(ho(this.LineInfo.towers,e,3)-90+360)%360;else if(e===t-1)i=(ho(this.LineInfo.towers,e,3)-90+360)%360;else{const r=this.LineInfo.towers[e-1],n=this.LineInfo.towers[e],o=this.LineInfo.towers[e+1],f=or(r.Longitude,r.Latitude,n.Longitude,n.Latitude),h=or(n.Longitude,n.Latitude,o.Longitude,o.Latitude);i=(cu(f,h)-90+360)%360}else i=(ho(this.LineInfo.towers,e,2)-90+360)%360;this.LineInfo.towers[e].RollX=i}}}loadTowersInRange(t,e){if(t<0||e>=this.LineInfo.towers.length)return;const i=Math.max(0,t-1),r=Math.min(this.LineInfo.towers.length-1,e+1);for(let n=i;n<=r;n++)this.loadedTowerIndices.has(n)||(this.loadTowerAndCollectWirePoints(n),this.loadedTowerIndices.add(n));for(let n=i;n<r;n++){const o=`${n}-${n+1}`;this.loadedWireSegments.has(o)||(this.loadWireSegmentBetweenTowers(n,n+1),this.loadedWireSegments.add(o))}}loadTowerAndCollectWirePoints(t){const e=this.offsetTowers[t],i=new g.HeadingPitchRoll(g.Math.toRadians(this.LineInfo.towers[t].RollX),g.Math.toRadians(this.LineInfo.towers[t].RollY),g.Math.toRadians(this.LineInfo.towers[t].RollZ));this.addModelToCollection(this.LineInfo.towers[t].id,e,this.LineInfo.towers[t].name,this.LineInfo.towers[t].towerModelUri,i,this.LineInfo.towers[t].towerScale,[this.LineInfo.towers[t].DistanceDisplaymin,this.LineInfo.towers[t].DistanceDisplaymax]);const r=new g.HeadingPitchRoll(g.Math.toRadians(this.LineInfo.towers[t].RollX),0,0),n=new g.HeadingPitchRoll(g.Math.toRadians(this.LineInfo.towers[t].RollX),0,0);let o=0;const f=[];this.LineInfo.towers[t].Insulators.forEach(h=>{const l=N(e,new g.Cartesian3(this.LineInfo.towers[t].towerPoint[o].X,this.LineInfo.towers[t].towerPoint[o].Y,this.LineInfo.towers[t].towerPoint[o].Z),this.LineInfo.towers[t].type===mi.耐张塔?n:r);let a,c;if(this.autoCalculateRollX?c=this.LineInfo.towers[t].RollX:c=h.RollX,this.LineInfo.towers[t].type===mi.耐张塔)switch(h.type){case Kt.耐张串:a=h.WairFX==="进"?new g.HeadingPitchRoll(g.Math.toRadians(c),g.Math.toRadians(-180),g.Math.toRadians(180)):new g.HeadingPitchRoll(g.Math.toRadians(c),g.Math.toRadians(0),g.Math.toRadians(0));break;case Kt.跳线串:a=new g.HeadingPitchRoll(g.Math.toRadians(c),g.Math.toRadians(h.RollY),g.Math.toRadians(h.RollZ));break;case Kt.地线串:a=new g.HeadingPitchRoll(g.Math.toRadians(c),g.Math.toRadians(h.RollY),g.Math.toRadians(h.RollZ));break;default:a=new g.HeadingPitchRoll(g.Math.toRadians(c),g.Math.toRadians(h.RollY),g.Math.toRadians(h.RollZ))}else a=new g.HeadingPitchRoll(g.Math.toRadians(c),g.Math.toRadians(h.RollY),g.Math.toRadians(h.RollZ));this.addModelToCollection(h.id,l,h.name,h.InsulatorModelUri,a,h.InsulatorScale,[h.DistanceDisplaymin,h.DistanceDisplaymax]);const p={insulator:h,insulatorIndex:o,position:e,lineroll:r,WairPoint:[]};h.InsulatorPoint.forEach(d=>{d.Y=d.Y+this.LineInfo.towers[t].towerPoint[o].Y,d.Z=d.Z+this.LineInfo.towers[t].towerPoint[o].Z,p.WairPoint.push(N(e,new g.Cartesian3(d.X,d.Y,d.Z),r))}),f.push(p),o++}),this.towerWirePoints.set(t,f)}loadWireSegmentBetweenTowers(t,e){const i=this.towerWirePoints.get(t),r=this.towerWirePoints.get(e);!i||!r||(this.resetWireArraysForTwoTowers(),console.log(`加载导线段: ${t}-${e}`))}resetWireArraysForTwoTowers(){this.offsetWires11=[],this.offsetWires12=[],this.offsetWires13=[],this.offsetWires21=[],this.offsetWires22=[],this.offsetWires23=[],this.ToffsetWires1A1=[],this.ToffsetWires1A2=[]}getLineDataSources(){return[this.dataSource2,this.LinedataSource2]}removeLineModels(){this.isLineModelRemoved=!0,this.entityCollection2.removeAll(),this.LineentityCollection2.removeAll(),this.loadedTowerIndices.clear(),this.loadedWireSegments.clear()}restoreLineModels(){this.isLineModelRemoved=!1,this.isDynamicLoadingEnabled?(this.setupCameraMoveListener(),this.updateVisibleTowers()):this.loadAllTowersAtOnce()}loadAllTowersAtOnce(){let t=0,e=0;this.offsetTowers.forEach((i,r)=>{debugger;const n=new g.HeadingPitchRoll(g.Math.toRadians(this.LineInfo.towers[r].RollX),g.Math.toRadians(this.LineInfo.towers[r].RollY),g.Math.toRadians(this.LineInfo.towers[r].RollZ));this.addModelToCollection(this.LineInfo.towers[r].id,i,this.LineInfo.towers[r].name,this.LineInfo.towers[r].towerModelUri,n,this.LineInfo.towers[r].towerScale,[this.LineInfo.towers[r].DistanceDisplaymin,this.LineInfo.towers[r].DistanceDisplaymax]);const o=new g.HeadingPitchRoll(g.Math.toRadians(this.LineInfo.towers[r].RollX),0,0),f=new g.HeadingPitchRoll(g.Math.toRadians(this.LineInfo.towers[r].RollX),0,0);let h=0;if(this.LineInfo.towers[r].Insulators.forEach(a=>{const c=N(i,new g.Cartesian3(this.LineInfo.towers[r].towerPoint[h].X,this.LineInfo.towers[r].towerPoint[h].Y,this.LineInfo.towers[r].towerPoint[h].Z),this.LineInfo.towers[r].type===mi.耐张塔?f:o);let p,d;if(this.autoCalculateRollX?d=this.LineInfo.towers[r].RollX:d=a.RollX,this.LineInfo.towers[r].type===mi.耐张塔)switch(a.type){case Kt.耐张串:p=a.WairFX==="进"?new g.HeadingPitchRoll(g.Math.toRadians(d),g.Math.toRadians(-180),g.Math.toRadians(180)):new g.HeadingPitchRoll(g.Math.toRadians(d),g.Math.toRadians(0),g.Math.toRadians(0));break;case Kt.跳线串:p=new g.HeadingPitchRoll(g.Math.toRadians(d),g.Math.toRadians(a.RollY),g.Math.toRadians(a.RollZ));break;case Kt.地线串:p=new g.HeadingPitchRoll(g.Math.toRadians(d),g.Math.toRadians(a.RollY),g.Math.toRadians(a.RollZ));break;default:p=new g.HeadingPitchRoll(g.Math.toRadians(d),g.Math.toRadians(a.RollY),g.Math.toRadians(a.RollZ))}else p=new g.HeadingPitchRoll(g.Math.toRadians(d),g.Math.toRadians(a.RollY),g.Math.toRadians(a.RollZ));this.addModelToCollection(a.id,c,a.name,a.InsulatorModelUri,p,a.InsulatorScale,[a.DistanceDisplaymin,a.DistanceDisplaymax]);const u=[];switch(a.InsulatorPoint.forEach(v=>{v.Y=v.Y+this.LineInfo.towers[r].towerPoint[h].Y,v.Z=v.Z+this.LineInfo.towers[r].towerPoint[h].Z,u.push(N(i,new g.Cartesian3(v.X,v.Y,v.Z),o))}),a.linenum){case Ys.回路一:if(this.LineInfo.ISPhaseSequence)if(this.LineInfo.towers[r].type==mi.耐张塔)switch(a.PhaseSequence){case Te.A相:if(a.type==Kt.耐张串)if(a.WairFX=="进")switch(this.LineInfo.Wairnum){case w.单分裂:this.offsetWires11.push(u[0]),this.ToffsetWires1A1.push(u[0]);break;case w.双分裂:this.offsetWires11.push(u[0]),this.offsetWires11.push(u[1]),this.ToffsetWires1A1.push(u[2]),this.ToffsetWires1A1.push(u[3]);break;case w.四分裂:this.offsetWires11.push(u[0]),this.offsetWires11.push(u[1]),this.offsetWires11.push(u[2]),this.offsetWires11.push(u[3]),this.ToffsetWires1A1.push(u[4]),this.ToffsetWires1A1.push(u[5]),this.ToffsetWires1A1.push(u[6]),this.ToffsetWires1A1.push(u[7]);break;case w.六分裂:this.offsetWires11.push(u[0]),this.offsetWires11.push(u[1]),this.offsetWires11.push(u[2]),this.offsetWires11.push(u[3]),this.offsetWires11.push(u[4]),this.offsetWires11.push(u[5]),this.ToffsetWires1A1.push(u[6]),this.ToffsetWires1A1.push(u[7]),this.ToffsetWires1A1.push(u[8]),this.ToffsetWires1A1.push(u[9]),this.ToffsetWires1A1.push(u[10]),this.ToffsetWires1A1.push(u[11]);break;case w.八分裂:this.offsetWires11.push(u[0]),this.offsetWires11.push(u[1]),this.offsetWires11.push(u[2]),this.offsetWires11.push(u[3]),this.offsetWires11.push(u[4]),this.offsetWires11.push(u[5]),this.offsetWires11.push(u[6]),this.offsetWires11.push(u[7]),this.ToffsetWires1A1.push(u[8]),this.ToffsetWires1A1.push(u[9]),this.ToffsetWires1A1.push(u[10]),this.ToffsetWires1A1.push(u[11]),this.ToffsetWires1A1.push(u[12]),this.ToffsetWires1A1.push(u[13]),this.ToffsetWires1A1.push(u[14]),this.ToffsetWires1A1.push(u[15]);break}else switch(this.LineInfo.Wairnum){case w.单分裂:const v=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires11.push(v),this.ToffsetWires1A2.push(v);break;case w.双分裂:const C=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),W=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o);this.offsetWires11.push(C),this.offsetWires11.push(W),this.ToffsetWires1A2.push(C),this.ToffsetWires1A2.push(W);break;case w.四分裂:const _=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),T=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),A=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),P=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o);this.offsetWires11.push(_),this.offsetWires11.push(T),this.offsetWires11.push(A),this.offsetWires11.push(P),this.ToffsetWires1A2.push(_),this.ToffsetWires1A2.push(T),this.ToffsetWires1A2.push(A),this.ToffsetWires1A2.push(P);break;case w.六分裂:const b=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),D=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),R=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),B=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),X=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),O=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o);this.offsetWires11.push(b),this.offsetWires11.push(D),this.offsetWires11.push(R),this.offsetWires11.push(B),this.offsetWires11.push(X),this.offsetWires11.push(O),this.ToffsetWires1A2.push(b),this.ToffsetWires1A2.push(D),this.ToffsetWires1A2.push(R),this.ToffsetWires1A2.push(B),this.ToffsetWires1A2.push(X),this.ToffsetWires1A2.push(O);break;case w.八分裂:const q=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),H=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),F=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),Y=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),J=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),it=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o),ft=N(i,new g.Cartesian3(a.InsulatorPoint[6].X*-1,a.InsulatorPoint[6].Y,a.InsulatorPoint[6].Z),o),rt=N(i,new g.Cartesian3(a.InsulatorPoint[7].X*-1,a.InsulatorPoint[7].Y,a.InsulatorPoint[7].Z),o);this.offsetWires11.push(q),this.offsetWires11.push(H),this.offsetWires11.push(F),this.offsetWires11.push(Y),this.offsetWires11.push(J),this.offsetWires11.push(it),this.offsetWires11.push(ft),this.offsetWires11.push(rt),this.ToffsetWires1A2.push(q),this.ToffsetWires1A2.push(H),this.ToffsetWires1A2.push(F),this.ToffsetWires1A2.push(Y),this.ToffsetWires1A2.push(J),this.ToffsetWires1A2.push(it),this.ToffsetWires1A2.push(ft),this.ToffsetWires1A2.push(rt);break}else if(a.type==Kt.跳线串)switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires1A1.push(u[0]),this.ToffsetWires1A2.push(u[1]);break;case w.双分裂:this.ToffsetWires1A1.push(u[0]),this.ToffsetWires1A1.push(u[1]),this.ToffsetWires1A2.push(u[2]),this.ToffsetWires1A2.push(u[3]);break;case w.四分裂:this.ToffsetWires1A1.push(u[0]),this.ToffsetWires1A1.push(u[1]),this.ToffsetWires1A1.push(u[2]),this.ToffsetWires1A1.push(u[3]),this.ToffsetWires1A2.push(u[4]),this.ToffsetWires1A2.push(u[5]),this.ToffsetWires1A2.push(u[6]),this.ToffsetWires1A2.push(u[7]);break;case w.六分裂:this.ToffsetWires1A1.push(u[0]),this.ToffsetWires1A1.push(u[1]),this.ToffsetWires1A1.push(u[2]),this.ToffsetWires1A1.push(u[3]),this.ToffsetWires1A1.push(u[4]),this.ToffsetWires1A1.push(u[5]),this.ToffsetWires1A2.push(u[6]),this.ToffsetWires1A2.push(u[7]),this.ToffsetWires1A2.push(u[8]),this.ToffsetWires1A2.push(u[9]),this.ToffsetWires1A2.push(u[10]),this.ToffsetWires1A2.push(u[11]);break;case w.八分裂:this.ToffsetWires1A1.push(u[0]),this.ToffsetWires1A1.push(u[1]),this.ToffsetWires1A1.push(u[2]),this.ToffsetWires1A1.push(u[3]),this.ToffsetWires1A1.push(u[4]),this.ToffsetWires1A1.push(u[5]),this.ToffsetWires1A1.push(u[6]),this.ToffsetWires1A1.push(u[7]),this.ToffsetWires1A2.push(u[8]),this.ToffsetWires1A2.push(u[9]),this.ToffsetWires1A2.push(u[10]),this.ToffsetWires1A2.push(u[11]),this.ToffsetWires1A2.push(u[12]),this.ToffsetWires1A2.push(u[13]),this.ToffsetWires1A2.push(u[14]),this.ToffsetWires1A2.push(u[15]);break}break;case Te.B相:if(a.type==Kt.耐张串)if(a.WairFX=="进")switch(this.LineInfo.Wairnum){case w.单分裂:this.offsetWires12.push(u[0]),this.ToffsetWires1B1.push(u[1]);break;case w.双分裂:this.offsetWires12.push(u[0]),this.offsetWires12.push(u[1]),this.ToffsetWires1B1.push(u[2]),this.ToffsetWires1B1.push(u[3]);break;case w.四分裂:this.offsetWires12.push(u[0]),this.offsetWires12.push(u[1]),this.offsetWires12.push(u[2]),this.offsetWires12.push(u[3]),this.ToffsetWires1B1.push(u[4]),this.ToffsetWires1B1.push(u[5]),this.ToffsetWires1B1.push(u[6]),this.ToffsetWires1B1.push(u[7]);break;case w.六分裂:this.offsetWires12.push(u[0]),this.offsetWires12.push(u[1]),this.offsetWires12.push(u[2]),this.offsetWires12.push(u[3]),this.offsetWires12.push(u[4]),this.offsetWires12.push(u[5]),this.ToffsetWires1B1.push(u[6]),this.ToffsetWires1B1.push(u[7]),this.ToffsetWires1B1.push(u[8]),this.ToffsetWires1B1.push(u[9]),this.ToffsetWires1B1.push(u[10]),this.ToffsetWires1B1.push(u[11]);break;case w.八分裂:this.offsetWires12.push(u[0]),this.offsetWires12.push(u[1]),this.offsetWires12.push(u[2]),this.offsetWires12.push(u[3]),this.offsetWires12.push(u[4]),this.offsetWires12.push(u[5]),this.offsetWires12.push(u[6]),this.offsetWires12.push(u[7]),this.ToffsetWires1B1.push(u[8]),this.ToffsetWires1B1.push(u[9]),this.ToffsetWires1B1.push(u[10]),this.ToffsetWires1B1.push(u[11]),this.ToffsetWires1B1.push(u[12]),this.ToffsetWires1B1.push(u[13]),this.ToffsetWires1B1.push(u[14]),this.ToffsetWires1B1.push(u[15]);break}else switch(this.LineInfo.Wairnum){case w.单分裂:const v=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires12.push(v),this.ToffsetWires1B2.push(v);break;case w.双分裂:const C=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),W=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o);this.offsetWires12.push(C),this.offsetWires12.push(W),this.ToffsetWires1B2.push(C),this.ToffsetWires1B2.push(W);break;case w.四分裂:const _=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),T=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),A=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),P=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o);this.offsetWires12.push(_),this.offsetWires12.push(T),this.offsetWires12.push(A),this.offsetWires12.push(P),this.ToffsetWires1B2.push(_),this.ToffsetWires1B2.push(T),this.ToffsetWires1B2.push(A),this.ToffsetWires1B2.push(P);break;case w.六分裂:const b=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),D=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),R=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),B=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),X=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),O=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o);this.offsetWires12.push(b),this.offsetWires12.push(D),this.offsetWires12.push(R),this.offsetWires12.push(B),this.offsetWires12.push(X),this.offsetWires12.push(O),this.ToffsetWires1B2.push(b),this.ToffsetWires1B2.push(D),this.ToffsetWires1B2.push(R),this.ToffsetWires1B2.push(B),this.ToffsetWires1B2.push(X),this.ToffsetWires1B2.push(O);break;case w.八分裂:const q=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),H=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),F=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),Y=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),J=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),it=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o),ft=N(i,new g.Cartesian3(a.InsulatorPoint[6].X*-1,a.InsulatorPoint[6].Y,a.InsulatorPoint[6].Z),o),rt=N(i,new g.Cartesian3(a.InsulatorPoint[7].X*-1,a.InsulatorPoint[7].Y,a.InsulatorPoint[7].Z),o);this.offsetWires12.push(q),this.offsetWires12.push(H),this.offsetWires12.push(F),this.offsetWires12.push(Y),this.offsetWires12.push(J),this.offsetWires12.push(it),this.offsetWires12.push(ft),this.offsetWires12.push(rt),this.ToffsetWires1B2.push(q),this.ToffsetWires1B2.push(H),this.ToffsetWires1B2.push(F),this.ToffsetWires1B2.push(Y),this.ToffsetWires1B2.push(J),this.ToffsetWires1B2.push(it),this.ToffsetWires1B2.push(ft),this.ToffsetWires1B2.push(rt);break}else if(a.type==Kt.跳线串)switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires1B1.push(u[0]),this.ToffsetWires1B2.push(u[0]);break;case w.双分裂:this.ToffsetWires1B1.push(u[0]),this.ToffsetWires1B1.push(u[1]),this.ToffsetWires1B2.push(u[2]),this.ToffsetWires1B2.push(u[3]);break;case w.四分裂:this.ToffsetWires1B1.push(u[0]),this.ToffsetWires1B1.push(u[1]),this.ToffsetWires1B1.push(u[2]),this.ToffsetWires1B1.push(u[3]),this.ToffsetWires1B2.push(u[4]),this.ToffsetWires1B2.push(u[5]),this.ToffsetWires1B2.push(u[6]),this.ToffsetWires1B2.push(u[7]);break;case w.六分裂:this.ToffsetWires1B1.push(u[0]),this.ToffsetWires1B1.push(u[1]),this.ToffsetWires1B1.push(u[2]),this.ToffsetWires1B1.push(u[3]),this.ToffsetWires1B1.push(u[4]),this.ToffsetWires1B1.push(u[5]),this.ToffsetWires1B2.push(u[6]),this.ToffsetWires1B2.push(u[7]),this.ToffsetWires1B2.push(u[8]),this.ToffsetWires1B2.push(u[9]),this.ToffsetWires1B2.push(u[10]),this.ToffsetWires1B2.push(u[11]);break;case w.八分裂:this.ToffsetWires1B1.push(u[0]),this.ToffsetWires1B1.push(u[1]),this.ToffsetWires1B1.push(u[2]),this.ToffsetWires1B1.push(u[3]),this.ToffsetWires1B1.push(u[4]),this.ToffsetWires1B1.push(u[5]),this.ToffsetWires1B1.push(u[6]),this.ToffsetWires1B1.push(u[7]),this.ToffsetWires1B2.push(u[8]),this.ToffsetWires1B2.push(u[9]),this.ToffsetWires1B2.push(u[10]),this.ToffsetWires1B2.push(u[11]),this.ToffsetWires1B2.push(u[12]),this.ToffsetWires1B2.push(u[13]),this.ToffsetWires1B2.push(u[14]),this.ToffsetWires1B2.push(u[15]);break}break;case Te.C相:if(a.type==Kt.耐张串)if(a.WairFX=="进")switch(this.LineInfo.Wairnum){case w.单分裂:this.offsetWires13.push(u[0]),this.ToffsetWires1C1.push(u[1]);break;case w.双分裂:this.offsetWires13.push(u[0]),this.offsetWires13.push(u[1]),this.ToffsetWires1C1.push(u[2]),this.ToffsetWires1C1.push(u[3]);break;case w.四分裂:this.offsetWires13.push(u[0]),this.offsetWires13.push(u[1]),this.offsetWires13.push(u[2]),this.offsetWires13.push(u[3]),this.ToffsetWires1C1.push(u[4]),this.ToffsetWires1C1.push(u[5]),this.ToffsetWires1C1.push(u[6]),this.ToffsetWires1C1.push(u[7]);break;case w.六分裂:this.offsetWires13.push(u[0]),this.offsetWires13.push(u[1]),this.offsetWires13.push(u[2]),this.offsetWires13.push(u[3]),this.offsetWires13.push(u[4]),this.offsetWires13.push(u[5]),this.ToffsetWires1C1.push(u[6]),this.ToffsetWires1C1.push(u[7]),this.ToffsetWires1C1.push(u[8]),this.ToffsetWires1C1.push(u[9]),this.ToffsetWires1C1.push(u[10]),this.ToffsetWires1C1.push(u[11]);break;case w.八分裂:this.offsetWires13.push(u[0]),this.offsetWires13.push(u[1]),this.offsetWires13.push(u[2]),this.offsetWires13.push(u[3]),this.offsetWires13.push(u[4]),this.offsetWires13.push(u[5]),this.offsetWires13.push(u[6]),this.offsetWires13.push(u[7]),this.ToffsetWires1C1.push(u[8]),this.ToffsetWires1C1.push(u[9]),this.ToffsetWires1C1.push(u[10]),this.ToffsetWires1C1.push(u[11]),this.ToffsetWires1C1.push(u[12]),this.ToffsetWires1C1.push(u[13]),this.ToffsetWires1C1.push(u[14]),this.ToffsetWires1C1.push(u[15]);break}else switch(this.LineInfo.Wairnum){case w.单分裂:const v=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires13.push(v),this.ToffsetWires1C2.push(v);break;case w.双分裂:const C=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),W=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o);this.offsetWires13.push(C),this.offsetWires13.push(W),this.ToffsetWires1C2.push(C),this.ToffsetWires1C2.push(W);break;case w.四分裂:const _=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),T=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),A=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),P=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o);this.offsetWires13.push(_),this.offsetWires13.push(T),this.offsetWires13.push(A),this.offsetWires13.push(P),this.ToffsetWires1C2.push(_),this.ToffsetWires1C2.push(T),this.ToffsetWires1C2.push(A),this.ToffsetWires1C2.push(P);break;case w.六分裂:const b=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),D=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),R=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),B=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),X=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),O=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o);this.offsetWires13.push(b),this.offsetWires13.push(D),this.offsetWires13.push(R),this.offsetWires13.push(B),this.offsetWires13.push(X),this.offsetWires13.push(O),this.ToffsetWires1C2.push(b),this.ToffsetWires1C2.push(D),this.ToffsetWires1C2.push(R),this.ToffsetWires1C2.push(B),this.ToffsetWires1C2.push(X),this.ToffsetWires1C2.push(O);break;case w.八分裂:const q=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),H=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),F=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),Y=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),J=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),it=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o),ft=N(i,new g.Cartesian3(a.InsulatorPoint[6].X*-1,a.InsulatorPoint[6].Y,a.InsulatorPoint[6].Z),o),rt=N(i,new g.Cartesian3(a.InsulatorPoint[7].X*-1,a.InsulatorPoint[7].Y,a.InsulatorPoint[7].Z),o);this.offsetWires13.push(q),this.offsetWires13.push(H),this.offsetWires13.push(F),this.offsetWires13.push(Y),this.offsetWires13.push(J),this.offsetWires13.push(it),this.offsetWires13.push(ft),this.offsetWires13.push(rt),this.ToffsetWires1C2.push(q),this.ToffsetWires1C2.push(H),this.ToffsetWires1C2.push(F),this.ToffsetWires1C2.push(Y),this.ToffsetWires1C2.push(J),this.ToffsetWires1C2.push(it),this.ToffsetWires1C2.push(ft),this.ToffsetWires1C2.push(rt);break}else if(a.type==Kt.跳线串)switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires1C1.push(u[0]),this.ToffsetWires1C2.push(u[0]);break;case w.双分裂:this.ToffsetWires1C1.push(u[0]),this.ToffsetWires1C1.push(u[1]),this.ToffsetWires1C2.push(u[2]),this.ToffsetWires1C2.push(u[3]);break;case w.四分裂:this.ToffsetWires1C1.push(u[0]),this.ToffsetWires1C1.push(u[1]),this.ToffsetWires1C1.push(u[2]),this.ToffsetWires1C1.push(u[3]),this.ToffsetWires1C2.push(u[4]),this.ToffsetWires1C2.push(u[5]),this.ToffsetWires1C2.push(u[6]),this.ToffsetWires1C2.push(u[7]);break;case w.六分裂:this.ToffsetWires1C1.push(u[0]),this.ToffsetWires1C1.push(u[1]),this.ToffsetWires1C1.push(u[2]),this.ToffsetWires1C1.push(u[3]),this.ToffsetWires1C1.push(u[4]),this.ToffsetWires1C1.push(u[5]),this.ToffsetWires1C2.push(u[6]),this.ToffsetWires1C2.push(u[7]),this.ToffsetWires1C2.push(u[8]),this.ToffsetWires1C2.push(u[9]),this.ToffsetWires1C2.push(u[10]),this.ToffsetWires1C2.push(u[11]);break;case w.八分裂:this.ToffsetWires1C1.push(u[0]),this.ToffsetWires1C1.push(u[1]),this.ToffsetWires1C1.push(u[2]),this.ToffsetWires1C1.push(u[3]),this.ToffsetWires1C1.push(u[4]),this.ToffsetWires1C1.push(u[5]),this.ToffsetWires1C1.push(u[6]),this.ToffsetWires1C1.push(u[7]),this.ToffsetWires1C2.push(u[8]),this.ToffsetWires1C2.push(u[9]),this.ToffsetWires1C2.push(u[10]),this.ToffsetWires1C2.push(u[11]),this.ToffsetWires1C2.push(u[12]),this.ToffsetWires1C2.push(u[13]),this.ToffsetWires1C2.push(u[14]),this.ToffsetWires1C2.push(u[15]);break}break}else switch(a.PhaseSequence){case Te.A相:u.forEach(v=>{this.offsetWires11.push(v)});break;case Te.B相:debugger;u.forEach(v=>{this.offsetWires12.push(v)});break;case Te.C相:u.forEach(v=>{this.offsetWires13.push(v)});break}else if(this.LineInfo.towers[r].type==mi.耐张塔)switch(h){case 2:switch(this.LineInfo.Wairnum){case w.单分裂:this.offsetWires11.push(u[0]),this.ToffsetWires1A1.push(u[0]);break;case w.双分裂:this.offsetWires11.push(u[0]),this.offsetWires11.push(u[1]),this.ToffsetWires1A1.push(u[2]),this.ToffsetWires1A1.push(u[3]);break}break;case 3:switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires1A1.push(u[0]),this.ToffsetWires1A2.push(u[0]);break;case w.双分裂:this.ToffsetWires1A1.push(u[0]),this.ToffsetWires1A1.push(u[1]),this.ToffsetWires1A2.push(u[2]),this.ToffsetWires1A2.push(u[3]);break}break;case 4:switch(this.LineInfo.Wairnum){case w.单分裂:const v=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires11.push(v),this.ToffsetWires1A2.push(v);break;case w.双分裂:const C=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),W=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o);this.offsetWires11.push(C),this.offsetWires11.push(W),this.ToffsetWires1A2.push(C),this.ToffsetWires1A2.push(W);break}break;case 5:u.forEach(v=>{this.offsetWires12.push(v),this.ToffsetWires1B1.push(v)});break;case 6:u.forEach(v=>{this.ToffsetWires1B1.push(v),this.ToffsetWires1B2.push(v)});break;case 7:a.InsulatorPoint.forEach(v=>{const C=N(i,new g.Cartesian3(v.X*-1,v.Y,v.Z),o);this.offsetWires12.push(C),this.ToffsetWires1B2.push(C)});break;case 8:u.forEach(v=>{this.offsetWires13.push(v),this.ToffsetWires1C1.push(v)});break;case 9:u.forEach(v=>{this.ToffsetWires1C1.push(v),this.ToffsetWires1C2.push(v)});break;case 10:a.InsulatorPoint.forEach(v=>{const C=N(i,new g.Cartesian3(v.X*-1,v.Y,v.Z),o);this.offsetWires13.push(C),this.ToffsetWires1C2.push(C)});break}else switch(h){case 2:u.forEach(v=>{this.offsetWires11.push(v)});break;case 3:u.forEach(v=>{this.offsetWires12.push(v)});break;case 4:u.forEach(v=>{this.offsetWires13.push(v)});break}break;case Ys.回路二:if(this.LineInfo.ISPhaseSequence)if(this.LineInfo.towers[r].type==mi.耐张塔)switch(a.PhaseSequence){case Te.A相:if(a.type==Kt.耐张串)if(a.WairFX=="进")switch(this.LineInfo.Wairnum){case w.单分裂:this.offsetWires21.push(u[0]),this.ToffsetWires2A1.push(u[0]);break;case w.双分裂:this.offsetWires21.push(u[0]),this.offsetWires21.push(u[1]),this.ToffsetWires2A1.push(u[2]),this.ToffsetWires2A1.push(u[3]);break;case w.四分裂:this.offsetWires21.push(u[0]),this.offsetWires21.push(u[1]),this.offsetWires21.push(u[2]),this.offsetWires21.push(u[3]),this.ToffsetWires2A1.push(u[4]),this.ToffsetWires2A1.push(u[5]),this.ToffsetWires2A1.push(u[6]),this.ToffsetWires2A1.push(u[7]);break;case w.六分裂:this.offsetWires21.push(u[0]),this.offsetWires21.push(u[1]),this.offsetWires21.push(u[2]),this.offsetWires21.push(u[3]),this.offsetWires21.push(u[4]),this.offsetWires21.push(u[5]),this.ToffsetWires2A1.push(u[6]),this.ToffsetWires2A1.push(u[7]),this.ToffsetWires2A1.push(u[8]),this.ToffsetWires2A1.push(u[9]),this.ToffsetWires2A1.push(u[10]),this.ToffsetWires2A1.push(u[11]);break;case w.八分裂:this.offsetWires21.push(u[0]),this.offsetWires21.push(u[1]),this.offsetWires21.push(u[2]),this.offsetWires21.push(u[3]),this.offsetWires21.push(u[4]),this.offsetWires21.push(u[5]),this.offsetWires21.push(u[6]),this.offsetWires21.push(u[7]),this.ToffsetWires2A1.push(u[8]),this.ToffsetWires2A1.push(u[9]),this.ToffsetWires2A1.push(u[10]),this.ToffsetWires2A1.push(u[11]),this.ToffsetWires2A1.push(u[12]),this.ToffsetWires2A1.push(u[13]),this.ToffsetWires2A1.push(u[14]),this.ToffsetWires2A1.push(u[15]);break}else switch(this.LineInfo.Wairnum){case w.单分裂:const v=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires21.push(v),this.ToffsetWires2A2.push(v);break;case w.双分裂:const C=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),W=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o);this.offsetWires21.push(C),this.offsetWires21.push(W),this.ToffsetWires2A2.push(C),this.ToffsetWires2A2.push(W);break;case w.四分裂:const _=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),T=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),A=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),P=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o);this.offsetWires21.push(_),this.offsetWires21.push(T),this.offsetWires21.push(A),this.offsetWires21.push(P),this.ToffsetWires2A2.push(_),this.ToffsetWires2A2.push(T),this.ToffsetWires2A2.push(A),this.ToffsetWires2A2.push(P);break;case w.六分裂:const b=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),D=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),R=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),B=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),X=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),O=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o);this.offsetWires21.push(b),this.offsetWires21.push(D),this.offsetWires21.push(R),this.offsetWires21.push(B),this.offsetWires21.push(X),this.offsetWires21.push(O),this.ToffsetWires2A2.push(b),this.ToffsetWires2A2.push(D),this.ToffsetWires2A2.push(R),this.ToffsetWires2A2.push(B),this.ToffsetWires2A2.push(X),this.ToffsetWires2A2.push(O);break;case w.八分裂:const q=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),H=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),F=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),Y=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),J=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),it=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o),ft=N(i,new g.Cartesian3(a.InsulatorPoint[6].X*-1,a.InsulatorPoint[6].Y,a.InsulatorPoint[6].Z),o),rt=N(i,new g.Cartesian3(a.InsulatorPoint[7].X*-1,a.InsulatorPoint[7].Y,a.InsulatorPoint[7].Z),o);this.offsetWires21.push(q),this.offsetWires21.push(H),this.offsetWires21.push(F),this.offsetWires21.push(Y),this.offsetWires21.push(J),this.offsetWires21.push(it),this.offsetWires21.push(ft),this.offsetWires21.push(rt),this.ToffsetWires2A2.push(q),this.ToffsetWires2A2.push(H),this.ToffsetWires2A2.push(F),this.ToffsetWires2A2.push(Y),this.ToffsetWires2A2.push(J),this.ToffsetWires2A2.push(it),this.ToffsetWires2A2.push(ft),this.ToffsetWires2A2.push(rt);break}else if(a.type==Kt.跳线串)switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires2A1.push(u[0]),this.ToffsetWires2A2.push(u[0]);break;case w.双分裂:this.ToffsetWires2A1.push(u[0]),this.ToffsetWires2A1.push(u[1]),this.ToffsetWires2A2.push(u[2]),this.ToffsetWires2A2.push(u[3]);break;case w.四分裂:this.ToffsetWires2A1.push(u[0]),this.ToffsetWires2A1.push(u[1]),this.ToffsetWires2A1.push(u[2]),this.ToffsetWires2A1.push(u[3]),this.ToffsetWires2A2.push(u[4]),this.ToffsetWires2A2.push(u[5]),this.ToffsetWires2A2.push(u[6]),this.ToffsetWires2A2.push(u[7]);break;case w.六分裂:this.ToffsetWires2A1.push(u[0]),this.ToffsetWires2A1.push(u[1]),this.ToffsetWires2A1.push(u[2]),this.ToffsetWires2A1.push(u[3]),this.ToffsetWires2A1.push(u[4]),this.ToffsetWires2A1.push(u[5]),this.ToffsetWires2A2.push(u[6]),this.ToffsetWires2A2.push(u[7]),this.ToffsetWires2A2.push(u[8]),this.ToffsetWires2A2.push(u[9]),this.ToffsetWires2A2.push(u[10]),this.ToffsetWires2A2.push(u[11]);break;case w.八分裂:this.ToffsetWires2A1.push(u[0]),this.ToffsetWires2A1.push(u[1]),this.ToffsetWires2A1.push(u[2]),this.ToffsetWires2A1.push(u[3]),this.ToffsetWires2A1.push(u[4]),this.ToffsetWires2A1.push(u[5]),this.ToffsetWires2A1.push(u[6]),this.ToffsetWires2A1.push(u[7]),this.ToffsetWires2A2.push(u[8]),this.ToffsetWires2A2.push(u[9]),this.ToffsetWires2A2.push(u[10]),this.ToffsetWires2A2.push(u[11]),this.ToffsetWires2A2.push(u[12]),this.ToffsetWires2A2.push(u[13]),this.ToffsetWires2A2.push(u[14]),this.ToffsetWires2A2.push(u[15]);break}break;case Te.B相:if(a.type==Kt.耐张串)if(a.WairFX=="进")switch(this.LineInfo.Wairnum){case w.单分裂:this.offsetWires22.push(u[0]),this.ToffsetWires2B1.push(u[0]);break;case w.双分裂:this.offsetWires22.push(u[0]),this.offsetWires22.push(u[1]),this.ToffsetWires2B1.push(u[2]),this.ToffsetWires2B1.push(u[3]);break;case w.四分裂:this.offsetWires22.push(u[0]),this.offsetWires22.push(u[1]),this.offsetWires22.push(u[2]),this.offsetWires22.push(u[3]),this.ToffsetWires2B1.push(u[4]),this.ToffsetWires2B1.push(u[5]),this.ToffsetWires2B1.push(u[6]),this.ToffsetWires2B1.push(u[7]);break;case w.六分裂:this.offsetWires22.push(u[0]),this.offsetWires22.push(u[1]),this.offsetWires22.push(u[2]),this.offsetWires22.push(u[3]),this.offsetWires22.push(u[4]),this.offsetWires22.push(u[5]),this.ToffsetWires2B1.push(u[6]),this.ToffsetWires2B1.push(u[7]),this.ToffsetWires2B1.push(u[8]),this.ToffsetWires2B1.push(u[9]),this.ToffsetWires2B1.push(u[10]),this.ToffsetWires2B1.push(u[11]);break;case w.八分裂:this.offsetWires22.push(u[0]),this.offsetWires22.push(u[1]),this.offsetWires22.push(u[2]),this.offsetWires22.push(u[3]),this.offsetWires22.push(u[4]),this.offsetWires22.push(u[5]),this.offsetWires22.push(u[6]),this.offsetWires22.push(u[7]),this.ToffsetWires2B1.push(u[8]),this.ToffsetWires2B1.push(u[9]),this.ToffsetWires2B1.push(u[10]),this.ToffsetWires2B1.push(u[11]),this.ToffsetWires2B1.push(u[12]),this.ToffsetWires2B1.push(u[13]),this.ToffsetWires2B1.push(u[14]),this.ToffsetWires2B1.push(u[15]);break}else switch(this.LineInfo.Wairnum){case w.单分裂:const v=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires22.push(v),this.ToffsetWires2B2.push(v);break;case w.双分裂:const C=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),W=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o);this.offsetWires22.push(C),this.offsetWires22.push(W),this.ToffsetWires2B2.push(C),this.ToffsetWires2B2.push(W);break;case w.四分裂:const _=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),T=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),A=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),P=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o);this.offsetWires22.push(_),this.offsetWires22.push(T),this.offsetWires22.push(A),this.offsetWires22.push(P),this.ToffsetWires2B2.push(_),this.ToffsetWires2B2.push(T),this.ToffsetWires2B2.push(A),this.ToffsetWires2B2.push(P);break;case w.六分裂:const b=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),D=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),R=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),B=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),X=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),O=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o);this.offsetWires22.push(b),this.offsetWires22.push(D),this.offsetWires22.push(R),this.offsetWires22.push(B),this.offsetWires22.push(X),this.offsetWires22.push(O),this.ToffsetWires2B2.push(b),this.ToffsetWires2B2.push(D),this.ToffsetWires2B2.push(R),this.ToffsetWires2B2.push(B),this.ToffsetWires2B2.push(X),this.ToffsetWires2B2.push(O);break;case w.八分裂:const q=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),H=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),F=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),Y=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),J=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),it=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o),ft=N(i,new g.Cartesian3(a.InsulatorPoint[6].X*-1,a.InsulatorPoint[6].Y,a.InsulatorPoint[6].Z),o),rt=N(i,new g.Cartesian3(a.InsulatorPoint[7].X*-1,a.InsulatorPoint[7].Y,a.InsulatorPoint[7].Z),o);this.offsetWires22.push(q),this.offsetWires22.push(H),this.offsetWires22.push(F),this.offsetWires22.push(Y),this.offsetWires22.push(J),this.offsetWires22.push(it),this.offsetWires22.push(ft),this.offsetWires22.push(rt),this.ToffsetWires2B2.push(q),this.ToffsetWires2B2.push(H),this.ToffsetWires2B2.push(F),this.ToffsetWires2B2.push(Y),this.ToffsetWires2B2.push(J),this.ToffsetWires2B2.push(it),this.ToffsetWires2B2.push(ft),this.ToffsetWires2B2.push(rt);break}else if(a.type==Kt.跳线串)switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires2B1.push(u[0]),this.ToffsetWires2B2.push(u[0]);break;case w.双分裂:this.ToffsetWires2B1.push(u[0]),this.ToffsetWires2B1.push(u[1]),this.ToffsetWires2B2.push(u[2]),this.ToffsetWires2B2.push(u[3]);break;case w.四分裂:this.ToffsetWires2B1.push(u[0]),this.ToffsetWires2B1.push(u[1]),this.ToffsetWires2B1.push(u[2]),this.ToffsetWires2B1.push(u[3]),this.ToffsetWires2B2.push(u[4]),this.ToffsetWires2B2.push(u[5]),this.ToffsetWires2B2.push(u[6]),this.ToffsetWires2B2.push(u[7]);break;case w.六分裂:this.ToffsetWires2B1.push(u[0]),this.ToffsetWires2B1.push(u[1]),this.ToffsetWires2B1.push(u[2]),this.ToffsetWires2B1.push(u[3]),this.ToffsetWires2B1.push(u[4]),this.ToffsetWires2B1.push(u[5]),this.ToffsetWires2B2.push(u[6]),this.ToffsetWires2B2.push(u[7]),this.ToffsetWires2B2.push(u[8]),this.ToffsetWires2B2.push(u[9]),this.ToffsetWires2B2.push(u[10]),this.ToffsetWires2B2.push(u[11]);break;case w.八分裂:this.ToffsetWires2B1.push(u[0]),this.ToffsetWires2B1.push(u[1]),this.ToffsetWires2B1.push(u[2]),this.ToffsetWires2B1.push(u[3]),this.ToffsetWires2B1.push(u[4]),this.ToffsetWires2B1.push(u[5]),this.ToffsetWires2B1.push(u[6]),this.ToffsetWires2B1.push(u[7]),this.ToffsetWires2B2.push(u[8]),this.ToffsetWires2B2.push(u[9]),this.ToffsetWires2B2.push(u[10]),this.ToffsetWires2B2.push(u[11]),this.ToffsetWires2B2.push(u[12]),this.ToffsetWires2B2.push(u[13]),this.ToffsetWires2B2.push(u[14]),this.ToffsetWires2B2.push(u[15]);break}break;case Te.C相:if(a.type==Kt.耐张串)if(a.WairFX=="进")switch(this.LineInfo.Wairnum){case w.单分裂:this.offsetWires23.push(u[0]),this.ToffsetWires2C1.push(u[0]);break;case w.双分裂:this.offsetWires23.push(u[0]),this.offsetWires23.push(u[1]),this.ToffsetWires2C1.push(u[2]),this.ToffsetWires2C1.push(u[3]);break;case w.四分裂:this.offsetWires23.push(u[0]),this.offsetWires23.push(u[1]),this.offsetWires23.push(u[2]),this.offsetWires23.push(u[3]),this.ToffsetWires2C1.push(u[4]),this.ToffsetWires2C1.push(u[5]),this.ToffsetWires2C1.push(u[6]),this.ToffsetWires2C1.push(u[7]);break;case w.六分裂:this.offsetWires23.push(u[0]),this.offsetWires23.push(u[1]),this.offsetWires23.push(u[2]),this.offsetWires23.push(u[3]),this.offsetWires23.push(u[4]),this.offsetWires23.push(u[5]),this.ToffsetWires2C1.push(u[6]),this.ToffsetWires2C1.push(u[7]),this.ToffsetWires2C1.push(u[8]),this.ToffsetWires2C1.push(u[9]),this.ToffsetWires2C1.push(u[10]),this.ToffsetWires2C1.push(u[11]);break;case w.八分裂:this.offsetWires23.push(u[0]),this.offsetWires23.push(u[1]),this.offsetWires23.push(u[2]),this.offsetWires23.push(u[3]),this.offsetWires23.push(u[4]),this.offsetWires23.push(u[5]),this.offsetWires23.push(u[6]),this.offsetWires23.push(u[7]),this.ToffsetWires2C1.push(u[8]),this.ToffsetWires2C1.push(u[9]),this.ToffsetWires2C1.push(u[10]),this.ToffsetWires2C1.push(u[11]),this.ToffsetWires2C1.push(u[12]),this.ToffsetWires2C1.push(u[13]),this.ToffsetWires2C1.push(u[14]),this.ToffsetWires2C1.push(u[15]);break}else switch(this.LineInfo.Wairnum){case w.单分裂:const v=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires23.push(v),this.ToffsetWires2C2.push(v);break;case w.双分裂:const C=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),W=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o);this.offsetWires23.push(C),this.offsetWires23.push(W),this.ToffsetWires2C2.push(C),this.ToffsetWires2C2.push(W);break;case w.四分裂:const _=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),T=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),A=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),P=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o);this.offsetWires23.push(_),this.offsetWires23.push(T),this.offsetWires23.push(A),this.offsetWires23.push(P),this.ToffsetWires2C2.push(_),this.ToffsetWires2C2.push(T),this.ToffsetWires2C2.push(A),this.ToffsetWires2C2.push(P);break;case w.六分裂:const b=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),D=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),R=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),B=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),X=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),O=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o);this.offsetWires23.push(b),this.offsetWires23.push(D),this.offsetWires23.push(R),this.offsetWires23.push(B),this.offsetWires23.push(X),this.offsetWires23.push(O),this.ToffsetWires2C2.push(b),this.ToffsetWires2C2.push(D),this.ToffsetWires2C2.push(R),this.ToffsetWires2C2.push(B),this.ToffsetWires2C2.push(X),this.ToffsetWires2C2.push(O);break;case w.八分裂:const q=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o),H=N(i,new g.Cartesian3(a.InsulatorPoint[1].X*-1,a.InsulatorPoint[1].Y,a.InsulatorPoint[1].Z),o),F=N(i,new g.Cartesian3(a.InsulatorPoint[2].X*-1,a.InsulatorPoint[2].Y,a.InsulatorPoint[2].Z),o),Y=N(i,new g.Cartesian3(a.InsulatorPoint[3].X*-1,a.InsulatorPoint[3].Y,a.InsulatorPoint[3].Z),o),J=N(i,new g.Cartesian3(a.InsulatorPoint[4].X*-1,a.InsulatorPoint[4].Y,a.InsulatorPoint[4].Z),o),it=N(i,new g.Cartesian3(a.InsulatorPoint[5].X*-1,a.InsulatorPoint[5].Y,a.InsulatorPoint[5].Z),o),ft=N(i,new g.Cartesian3(a.InsulatorPoint[6].X*-1,a.InsulatorPoint[6].Y,a.InsulatorPoint[6].Z),o),rt=N(i,new g.Cartesian3(a.InsulatorPoint[7].X*-1,a.InsulatorPoint[7].Y,a.InsulatorPoint[7].Z),o);this.offsetWires23.push(q),this.offsetWires23.push(H),this.offsetWires23.push(F),this.offsetWires23.push(Y),this.offsetWires23.push(J),this.offsetWires23.push(it),this.offsetWires23.push(ft),this.offsetWires23.push(rt),this.ToffsetWires2C2.push(q),this.ToffsetWires2C2.push(H),this.ToffsetWires2C2.push(F),this.ToffsetWires2C2.push(Y),this.ToffsetWires2C2.push(J),this.ToffsetWires2C2.push(it),this.ToffsetWires2C2.push(ft),this.ToffsetWires2C2.push(rt);break}else if(a.type==Kt.跳线串)switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires2C1.push(u[0]),this.ToffsetWires2C2.push(u[0]);break;case w.双分裂:this.ToffsetWires2C1.push(u[0]),this.ToffsetWires2C1.push(u[1]),this.ToffsetWires2C2.push(u[2]),this.ToffsetWires2C2.push(u[3]);break;case w.四分裂:this.ToffsetWires2C1.push(u[0]),this.ToffsetWires2C1.push(u[1]),this.ToffsetWires2C1.push(u[2]),this.ToffsetWires2C1.push(u[3]),this.ToffsetWires2C2.push(u[4]),this.ToffsetWires2C2.push(u[5]),this.ToffsetWires2C2.push(u[6]),this.ToffsetWires2C2.push(u[7]);break;case w.六分裂:this.ToffsetWires2C1.push(u[0]),this.ToffsetWires2C1.push(u[1]),this.ToffsetWires2C1.push(u[2]),this.ToffsetWires2C1.push(u[3]),this.ToffsetWires2C1.push(u[4]),this.ToffsetWires2C1.push(u[5]),this.ToffsetWires2C2.push(u[6]),this.ToffsetWires2C2.push(u[7]),this.ToffsetWires2C2.push(u[8]),this.ToffsetWires2C2.push(u[9]),this.ToffsetWires2C2.push(u[10]),this.ToffsetWires2C2.push(u[11]);break;case w.八分裂:this.ToffsetWires2C1.push(u[0]),this.ToffsetWires2C1.push(u[1]),this.ToffsetWires2C1.push(u[2]),this.ToffsetWires2C1.push(u[3]),this.ToffsetWires2C1.push(u[4]),this.ToffsetWires2C1.push(u[5]),this.ToffsetWires2C1.push(u[6]),this.ToffsetWires2C1.push(u[7]),this.ToffsetWires2C2.push(u[8]),this.ToffsetWires2C2.push(u[9]),this.ToffsetWires2C2.push(u[10]),this.ToffsetWires2C2.push(u[11]),this.ToffsetWires2C2.push(u[12]),this.ToffsetWires2C2.push(u[13]),this.ToffsetWires2C2.push(u[14]),this.ToffsetWires2C2.push(u[15]);break}break}else switch(a.PhaseSequence){case Te.A相:u.forEach(v=>{this.offsetWires21.push(v)});break;case Te.B相:u.forEach(v=>{this.offsetWires22.push(v)});break;case Te.C相:u.forEach(v=>{this.offsetWires23.push(v)});break}else if(this.LineInfo.towers[r].type==mi.耐张塔)switch(h){case 11:this.offsetWires21.push(u[0]),this.ToffsetWires2A1.push(u[0]);break;case 12:this.ToffsetWires2A1.push(u[0]),this.ToffsetWires2A2.push(u[0]);break;case 13:const v=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires21.push(v),this.ToffsetWires2A2.push(v);break;case 14:this.offsetWires22.push(u[0]),this.ToffsetWires2B1.push(u[0]);break;case 15:this.ToffsetWires2B1.push(u[0]),this.ToffsetWires2B2.push(u[0]);break;case 16:const C=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires22.push(C),this.ToffsetWires2B2.push(C);break;case 17:this.offsetWires23.push(u[0]),this.ToffsetWires2C1.push(u[0]);break;case 18:this.ToffsetWires2C1.push(u[0]),this.ToffsetWires2C2.push(u[0]);break;case 19:const W=N(i,new g.Cartesian3(a.InsulatorPoint[0].X*-1,a.InsulatorPoint[0].Y,a.InsulatorPoint[0].Z),o);this.offsetWires23.push(W),this.ToffsetWires2C2.push(W);break}else switch(h){case 5:u.forEach(v=>{this.offsetWires21.push(v)});break;case 6:u.forEach(v=>{this.offsetWires22.push(v)});break;case 7:u.forEach(v=>{this.offsetWires23.push(v)});break}break;case Ys.地线:if(this.LineInfo.ISPhaseSequence)switch(a.PhaseSequence){case Te.地线1:this.offsetGrouundWires11.push(u[0]);break;case Te.地线2:this.offsetGrouundWires12.push(u[0]);break}else switch(h){case 0:this.offsetGrouundWires11.push(u[0]);break;case 1:this.offsetGrouundWires12.push(u[0]);break}break}h=h+1}),this.offsetWires11.length>0&&r>0){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[];switch(this.LineInfo.Wairnum){case w.单分裂:this.offsetWires11.length>=2&&(a.push(this.offsetWires11[t]),a.push(this.offsetWires11[t-1]),this.offsetArcWires1A=m(a),this.offsetArcWires1A.forEach(_=>{const T=Ne(this.viewer.scene.globe.ellipsoid,_);this.arcLine1A1.push(T)}),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break;case w.双分裂:this.offsetWires11.length>=4&&(a.push(this.offsetWires11[t]),a.push(this.offsetWires11[t-2]),this.offsetArcWires1A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1A.forEach(_=>{this.arcLine1A1.push(Ne(this.viewer.scene.globe.ellipsoid,_))}),c.push(this.offsetWires11[t+1]),c.push(this.offsetWires11[t-1]),this.offsetArcWires1A=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break;case w.四分裂:this.offsetWires11.length>=8&&(a.push(this.offsetWires11[t]),a.push(this.offsetWires11[t-4]),this.offsetArcWires1A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1A.forEach(_=>{this.arcLine1A1.push(Ne(this.viewer.scene.globe.ellipsoid,_))}),c.push(this.offsetWires11[t+1]),c.push(this.offsetWires11[t-3]),this.offsetArcWires1A=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires11[t+2]),p.push(this.offsetWires11[t-2]),this.offsetArcWires1A=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires11[t+3]),d.push(this.offsetWires11[t-1]),this.offsetArcWires1A=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break;case w.六分裂:this.offsetWires11.length>=12&&(a.push(this.offsetWires11[t]),a.push(this.offsetWires11[t-6]),this.offsetArcWires1A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1A.forEach(_=>{this.arcLine1A1.push(Ne(this.viewer.scene.globe.ellipsoid,_))}),c.push(this.offsetWires11[t+1]),c.push(this.offsetWires11[t-5]),this.offsetArcWires1A=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires11[t+2]),p.push(this.offsetWires11[t-4]),this.offsetArcWires1A=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires11[t+3]),d.push(this.offsetWires11[t-3]),this.offsetArcWires1A=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires11[t+4]),u.push(this.offsetWires11[t-2]),this.offsetArcWires1A=m(u),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires11[t+5]),v.push(this.offsetWires11[t-1]),this.offsetArcWires1A=m(v),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break;case w.八分裂:this.offsetWires11.length>=16&&(a.push(this.offsetWires11[t]),a.push(this.offsetWires11[t-8]),this.offsetArcWires1A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1A.forEach(_=>{this.arcLine1A1.push(Ne(this.viewer.scene.globe.ellipsoid,_))}),c.push(this.offsetWires11[t+1]),c.push(this.offsetWires11[t-7]),this.offsetArcWires1A=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires11[t+2]),p.push(this.offsetWires11[t-6]),this.offsetArcWires1A=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires11[t+3]),d.push(this.offsetWires11[t-5]),this.offsetArcWires1A=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires11[t+4]),u.push(this.offsetWires11[t-4]),this.offsetArcWires1A=m(u),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires11[t+5]),v.push(this.offsetWires11[t-3]),this.offsetArcWires1A=m(v),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires11[t+6]),C.push(this.offsetWires11[t-2]),this.offsetArcWires1A=m(C),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),W.push(this.offsetWires11[t+7]),W.push(this.offsetWires11[t-1]),this.offsetArcWires1A=m(W),this.LineentityCollection2.add(y(this.offsetArcWires1A,"导线1_A8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)));break}}if(this.offsetWires12.length>0&&r>0){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[];switch(this.LineInfo.Wairnum){case w.单分裂:a.push(this.offsetWires12[t]),a.push(this.offsetWires12[t-1]),this.offsetArcWires1B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(_=>{this.arcLine1B1.push(Ne(this.viewer.scene.globe.ellipsoid,_))});break;case w.双分裂:a.push(this.offsetWires12[t]),a.push(this.offsetWires12[t-2]),this.offsetArcWires1B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(_=>{this.arcLine1B1.push(Ne(this.viewer.scene.globe.ellipsoid,_))}),c.push(this.offsetWires12[t+1]),c.push(this.offsetWires12[t-1]),this.offsetArcWires1B=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.四分裂:a.push(this.offsetWires12[t]),a.push(this.offsetWires12[t-4]),this.offsetArcWires1B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(_=>{this.arcLine1B1.push(Ne(this.viewer.scene.globe.ellipsoid,_))}),c.push(this.offsetWires12[t+1]),c.push(this.offsetWires12[t-3]),this.offsetArcWires1B=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires12[t+2]),p.push(this.offsetWires12[t-2]),this.offsetArcWires1B=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires12[t+3]),d.push(this.offsetWires12[t-1]),this.offsetArcWires1B=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.六分裂:debugger;a.push(this.offsetWires12[t]),a.push(this.offsetWires12[t-6]),this.offsetArcWires1B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(_=>{this.arcLine1B1.push(Ne(this.viewer.scene.globe.ellipsoid,_))}),c.push(this.offsetWires12[t+1]),c.push(this.offsetWires12[t-5]),this.offsetArcWires1B=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires12[t+2]),p.push(this.offsetWires12[t-4]),this.offsetArcWires1B=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires12[t+3]),d.push(this.offsetWires12[t-3]),this.offsetArcWires1B=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires12[t+4]),u.push(this.offsetWires12[t-2]),this.offsetArcWires1B=m(u),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires12[t+5]),v.push(this.offsetWires12[t-1]),this.offsetArcWires1B=m(v),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.八分裂:a.push(this.offsetWires12[t]),a.push(this.offsetWires12[t-8]),this.offsetArcWires1B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1B.forEach(_=>{this.arcLine1B1.push(Ne(this.viewer.scene.globe.ellipsoid,_))}),c.push(this.offsetWires12[t+1]),c.push(this.offsetWires12[t-7]),this.offsetArcWires1B=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires12[t+2]),p.push(this.offsetWires12[t-6]),this.offsetArcWires1B=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires12[t+3]),d.push(this.offsetWires12[t-5]),this.offsetArcWires1B=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires12[t+4]),u.push(this.offsetWires12[t-4]),this.offsetArcWires1B=m(u),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires12[t+5]),v.push(this.offsetWires12[t-3]),this.offsetArcWires1B=m(v),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires12[t+6]),C.push(this.offsetWires12[t-2]),this.offsetArcWires1B=m(C),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),W.push(this.offsetWires12[t+7]),W.push(this.offsetWires12[t-1]),this.offsetArcWires1B=m(W),this.LineentityCollection2.add(y(this.offsetArcWires1B,"导线1_B8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetWires13.length>0&&r>0){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[];switch(this.LineInfo.Wairnum){case w.单分裂:a.push(this.offsetWires13[t]),a.push(this.offsetWires13[t-1]),this.offsetArcWires1C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1C.forEach(_=>{this.arcLine1C1.push(Ne(this.viewer.scene.globe.ellipsoid,_))});break;case w.双分裂:a.push(this.offsetWires13[t]),a.push(this.offsetWires13[t-2]),this.offsetArcWires1C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires13[t+1]),c.push(this.offsetWires13[t-1]),this.offsetArcWires1C=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1C.forEach(_=>{this.arcLine1C1.push(Ne(this.viewer.scene.globe.ellipsoid,_))});break;case w.四分裂:a.push(this.offsetWires13[t]),a.push(this.offsetWires13[t-4]),this.offsetArcWires1C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires13[t+1]),c.push(this.offsetWires13[t-3]),this.offsetArcWires1C=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires13[t+2]),p.push(this.offsetWires13[t-2]),this.offsetArcWires1C=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires13[t+3]),d.push(this.offsetWires13[t-1]),this.offsetArcWires1C=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1C.forEach(_=>{this.arcLine1C1.push(Ne(this.viewer.scene.globe.ellipsoid,_))});break;case w.六分裂:a.push(this.offsetWires13[t]),a.push(this.offsetWires13[t-6]),this.offsetArcWires1C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires13[t+1]),c.push(this.offsetWires13[t-5]),this.offsetArcWires1C=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires13[t+2]),p.push(this.offsetWires13[t-4]),this.offsetArcWires1C=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires13[t+3]),d.push(this.offsetWires13[t-3]),this.offsetArcWires1C=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires13[t+4]),u.push(this.offsetWires13[t-2]),this.offsetArcWires1C=m(u),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires13[t+5]),v.push(this.offsetWires13[t-1]),this.offsetArcWires1C=m(v),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1C.forEach(_=>{this.arcLine1C1.push(Ne(this.viewer.scene.globe.ellipsoid,_))});break;case w.八分裂:a.push(this.offsetWires13[t]),a.push(this.offsetWires13[t-8]),this.offsetArcWires1C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires13[t+1]),c.push(this.offsetWires13[t-7]),this.offsetArcWires1C=m(c),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires13[t+2]),p.push(this.offsetWires13[t-6]),this.offsetArcWires1C=m(p),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires13[t+3]),d.push(this.offsetWires13[t-5]),this.offsetArcWires1C=m(d),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires13[t+4]),u.push(this.offsetWires13[t-4]),this.offsetArcWires1C=m(u),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires13[t+5]),v.push(this.offsetWires13[t-3]),this.offsetArcWires1C=m(v),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires13[t+6]),C.push(this.offsetWires13[t-2]),this.offsetArcWires1C=m(C),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),W.push(this.offsetWires13[t+7]),W.push(this.offsetWires13[t-1]),this.offsetArcWires1C=m(W),this.LineentityCollection2.add(y(this.offsetArcWires1C,"导线1_C8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),this.offsetArcWires1C.forEach(_=>{this.arcLine1C1.push(Ne(this.viewer.scene.globe.ellipsoid,_))});break}}if(this.offsetWires21.length>0&&r>0){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[];switch(this.LineInfo.Wairnum){case w.单分裂:a.push(this.offsetWires21[t]),a.push(this.offsetWires21[t-1]),this.offsetArcWires2A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.双分裂:a.push(this.offsetWires21[t]),a.push(this.offsetWires21[t-2]),this.offsetArcWires2A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires21[t+1]),c.push(this.offsetWires21[t-1]),this.offsetArcWires2A=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.四分裂:a.push(this.offsetWires21[t]),a.push(this.offsetWires21[t-4]),this.offsetArcWires2A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires21[t+1]),c.push(this.offsetWires21[t-3]),this.offsetArcWires2A=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires21[t+2]),p.push(this.offsetWires21[t-2]),this.offsetArcWires2A=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires21[t+3]),d.push(this.offsetWires21[t-1]),this.offsetArcWires2A=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.六分裂:a.push(this.offsetWires21[t]),a.push(this.offsetWires21[t-6]),this.offsetArcWires2A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires21[t+1]),c.push(this.offsetWires21[t-5]),this.offsetArcWires2A=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires21[t+2]),p.push(this.offsetWires21[t-4]),this.offsetArcWires2A=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires21[t+3]),d.push(this.offsetWires21[t-3]),this.offsetArcWires2A=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires21[t+4]),u.push(this.offsetWires21[t-2]),this.offsetArcWires2A=m(u),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires21[t+5]),v.push(this.offsetWires21[t-1]),this.offsetArcWires2A=m(v),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.八分裂:a.push(this.offsetWires21[t]),a.push(this.offsetWires21[t-8]),this.offsetArcWires2A=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires21[t+1]),c.push(this.offsetWires21[t-7]),this.offsetArcWires2A=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires21[t+2]),p.push(this.offsetWires21[t-6]),this.offsetArcWires2A=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires21[t+3]),d.push(this.offsetWires21[t-5]),this.offsetArcWires2A=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires21[t+4]),u.push(this.offsetWires21[t-4]),this.offsetArcWires2A=m(u),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires21[t+5]),v.push(this.offsetWires21[t-3]),this.offsetArcWires2A=m(v),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires21[t+6]),C.push(this.offsetWires21[t-2]),this.offsetArcWires2A=m(C),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),W.push(this.offsetWires21[t+7]),W.push(this.offsetWires21[t-1]),this.offsetArcWires2A=m(W),this.LineentityCollection2.add(y(this.offsetArcWires2A,"导线2_A8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetWires22.length>0&&r>0){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[];switch(this.LineInfo.Wairnum){case w.单分裂:a.push(this.offsetWires22[t]),a.push(this.offsetWires22[t-1]),this.offsetArcWires2B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.双分裂:a.push(this.offsetWires22[t]),a.push(this.offsetWires22[t-2]),this.offsetArcWires2B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires22[t+1]),c.push(this.offsetWires22[t-1]),this.offsetArcWires2B=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.四分裂:a.push(this.offsetWires22[t]),a.push(this.offsetWires22[t-4]),this.offsetArcWires2B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires22[t+1]),c.push(this.offsetWires22[t-3]),this.offsetArcWires2B=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires22[t+2]),p.push(this.offsetWires22[t-2]),this.offsetArcWires2B=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires22[t+3]),d.push(this.offsetWires22[t-1]),this.offsetArcWires2B=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.六分裂:a.push(this.offsetWires22[t]),a.push(this.offsetWires22[t-6]),this.offsetArcWires2B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires22[t+1]),c.push(this.offsetWires22[t-5]),this.offsetArcWires2B=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires22[t+2]),p.push(this.offsetWires22[t-4]),this.offsetArcWires2B=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires22[t+3]),d.push(this.offsetWires22[t-3]),this.offsetArcWires2B=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires22[t+4]),u.push(this.offsetWires22[t-2]),this.offsetArcWires2B=m(u),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires22[t+5]),v.push(this.offsetWires22[t-1]),this.offsetArcWires2B=m(v),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.八分裂:a.push(this.offsetWires22[t]),a.push(this.offsetWires22[t-8]),this.offsetArcWires2B=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires22[t+1]),c.push(this.offsetWires22[t-7]),this.offsetArcWires2B=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires22[t+2]),p.push(this.offsetWires22[t-6]),this.offsetArcWires2B=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires22[t+3]),d.push(this.offsetWires22[t-5]),this.offsetArcWires2B=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires22[t+4]),u.push(this.offsetWires22[t-4]),this.offsetArcWires2B=m(u),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires22[t+5]),v.push(this.offsetWires22[t-3]),this.offsetArcWires2B=m(v),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires22[t+6]),C.push(this.offsetWires22[t-2]),this.offsetArcWires2B=m(C),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),W.push(this.offsetWires22[t+7]),W.push(this.offsetWires22[t-1]),this.offsetArcWires2B=m(W),this.LineentityCollection2.add(y(this.offsetArcWires2B,"导线2_B8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetWires23.length>0&&r>0){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[];switch(this.LineInfo.Wairnum){case w.单分裂:a.push(this.offsetWires23[t]),a.push(this.offsetWires23[t-1]),this.offsetArcWires2C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.双分裂:a.push(this.offsetWires23[t]),a.push(this.offsetWires23[t-2]),this.offsetArcWires2C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires23[t+1]),c.push(this.offsetWires23[t-1]),this.offsetArcWires2C=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.四分裂:a.push(this.offsetWires23[t]),a.push(this.offsetWires23[t-4]),this.offsetArcWires2C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires23[t+1]),c.push(this.offsetWires23[t-3]),this.offsetArcWires2C=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires23[t+2]),p.push(this.offsetWires23[t-2]),this.offsetArcWires2C=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires23[t+3]),d.push(this.offsetWires23[t-1]),this.offsetArcWires2C=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.六分裂:a.push(this.offsetWires23[t]),a.push(this.offsetWires23[t-6]),this.offsetArcWires2C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires23[t+1]),c.push(this.offsetWires23[t-5]),this.offsetArcWires2C=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires23[t+2]),p.push(this.offsetWires23[t-4]),this.offsetArcWires2C=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires23[t+3]),d.push(this.offsetWires23[t-3]),this.offsetArcWires2C=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires23[t+4]),u.push(this.offsetWires23[t-2]),this.offsetArcWires2C=m(u),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires23[t+5]),v.push(this.offsetWires23[t-1]),this.offsetArcWires2C=m(v),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break;case w.八分裂:a.push(this.offsetWires23[t]),a.push(this.offsetWires23[t-8]),this.offsetArcWires2C=m(a),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),c.push(this.offsetWires23[t+1]),c.push(this.offsetWires23[t-7]),this.offsetArcWires2C=m(c),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),p.push(this.offsetWires23[t+2]),p.push(this.offsetWires23[t-6]),this.offsetArcWires2C=m(p),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),d.push(this.offsetWires23[t+3]),d.push(this.offsetWires23[t-5]),this.offsetArcWires2C=m(d),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),u.push(this.offsetWires23[t+4]),u.push(this.offsetWires23[t-4]),this.offsetArcWires2C=m(u),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),v.push(this.offsetWires23[t+5]),v.push(this.offsetWires23[t-3]),this.offsetArcWires2C=m(v),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),C.push(this.offsetWires23[t+6]),C.push(this.offsetWires23[t-2]),this.offsetArcWires2C=m(C),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor)),W.push(this.offsetWires23[t+7]),W.push(this.offsetWires23[t-1]),this.offsetArcWires2C=m(W),this.LineentityCollection2.add(y(this.offsetArcWires2C,"导线2_C8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireAColor));break}}if(this.offsetGrouundWires11.length>1){const a=[];a.push(this.offsetGrouundWires11[r]),a.push(this.offsetGrouundWires11[r-1]);const c=[];c.push(this.offsetGrouundWires12[r]),c.push(this.offsetGrouundWires12[r-1]),this.offsetGrouundWires1=m(a,2),this.offsetGrouundWires2=m(c,2),this.LineentityCollection2.add(y(this.offsetGrouundWires1,"地线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireD1Color)),this.LineentityCollection2.add(y(this.offsetGrouundWires2,"地线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireD2Color))}let l=2;if(this.LineInfo.towers[r].type==mi.耐张塔){switch(this.LineInfo.Wairnum){case w.单分裂:t=t+l,e=e+l;break;case w.双分裂:t=t+l*2,e=e+l*2;break;case w.四分裂:t=t+l*4,e=e+l*4;break;case w.六分裂:t=t+l*6,e=e+l*6;break;case w.八分裂:t=t+l*8,e=e+l*8;break}if(this.ToffsetWires1A1.length>1&&this.ToffsetWires1A2.length>1){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[],_=[],T=[],A=[],P=[],b=[],D=[],R=[],B=[];switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires1A1.length>=2&&(a.push(this.ToffsetWires1A1[e-2]),a.push(this.ToffsetWires1A1[e-1]),this.ToffsetArcWires1A=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=2&&(_.push(this.ToffsetWires1A2[e-2]),_.push(this.ToffsetWires1A2[e-1]),this.ToffsetArcWires2A=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.双分裂:this.ToffsetWires1A1.length>=4&&(a.push(this.ToffsetWires1A1[e-4]),a.push(this.ToffsetWires1A1[e-2]),this.ToffsetArcWires1A=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1A1[e-3]),c.push(this.ToffsetWires1A1[e-1]),this.ToffsetArcWires1A=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=4&&(_.push(this.ToffsetWires1A2[e-4]),_.push(this.ToffsetWires1A2[e-2]),this.ToffsetArcWires2A=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1A2[e-3]),T.push(this.ToffsetWires1A2[e-1]),this.ToffsetArcWires2A=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.四分裂:this.ToffsetWires1A1.length>=8&&(a.push(this.ToffsetWires1A1[e-8]),a.push(this.ToffsetWires1A1[e-4]),this.ToffsetArcWires1A=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1A1[e-7]),c.push(this.ToffsetWires1A1[e-3]),this.ToffsetArcWires1A=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1A1[e-6]),p.push(this.ToffsetWires1A1[e-2]),this.ToffsetArcWires1A=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1A1[e-5]),d.push(this.ToffsetWires1A1[e-1]),this.ToffsetArcWires1A=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=8&&(_.push(this.ToffsetWires1A2[e-8]),_.push(this.ToffsetWires1A2[e-4]),this.ToffsetArcWires2A=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1A2[e-7]),T.push(this.ToffsetWires1A2[e-3]),this.ToffsetArcWires2A=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1A2[e-6]),A.push(this.ToffsetWires1A2[e-2]),this.ToffsetArcWires2A=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1A2[e-5]),P.push(this.ToffsetWires1A2[e-1]),this.ToffsetArcWires2A=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.六分裂:this.ToffsetWires1A1.length>=12&&(a.push(this.ToffsetWires1A1[e-12]),a.push(this.ToffsetWires1A1[e-6]),this.ToffsetArcWires1A=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1A1[e-11]),c.push(this.ToffsetWires1A1[e-5]),this.ToffsetArcWires1A=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1A1[e-10]),p.push(this.ToffsetWires1A1[e-4]),this.ToffsetArcWires1A=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1A1[e-9]),d.push(this.ToffsetWires1A1[e-3]),this.ToffsetArcWires1A=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1A1[e-8]),u.push(this.ToffsetWires1A1[e-2]),this.ToffsetArcWires1A=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1A1[e-7]),v.push(this.ToffsetWires1A1[e-1]),this.ToffsetArcWires1A=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=12&&(_.push(this.ToffsetWires1A2[e-12]),_.push(this.ToffsetWires1A2[e-6]),this.ToffsetArcWires2A=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1A2[e-11]),T.push(this.ToffsetWires1A2[e-5]),this.ToffsetArcWires2A=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1A2[e-10]),A.push(this.ToffsetWires1A2[e-4]),this.ToffsetArcWires2A=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1A2[e-9]),P.push(this.ToffsetWires1A2[e-3]),this.ToffsetArcWires2A=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1A2[e-8]),b.push(this.ToffsetWires1A2[e-2]),this.ToffsetArcWires2A=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires1A2[e-7]),D.push(this.ToffsetWires1A2[e-1]),this.ToffsetArcWires2A=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.八分裂:this.ToffsetWires1A1.length>=16&&(a.push(this.ToffsetWires1A1[e-16]),a.push(this.ToffsetWires1A1[e-8]),this.ToffsetArcWires1A=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1A1[e-15]),c.push(this.ToffsetWires1A1[e-7]),this.ToffsetArcWires1A=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1A1[e-14]),p.push(this.ToffsetWires1A1[e-6]),this.ToffsetArcWires1A=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1A1[e-13]),d.push(this.ToffsetWires1A1[e-5]),this.ToffsetArcWires1A=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1A1[e-12]),u.push(this.ToffsetWires1A1[e-4]),this.ToffsetArcWires1A=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1A1[e-11]),v.push(this.ToffsetWires1A1[e-3]),this.ToffsetArcWires1A=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1A1[e-10]),C.push(this.ToffsetWires1A1[e-2]),this.ToffsetArcWires1A=m(C,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),W.push(this.ToffsetWires1A1[e-9]),W.push(this.ToffsetWires1A1[e-1]),this.ToffsetArcWires1A=m(W,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A,"1A1跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1A2.length>=16&&(_.push(this.ToffsetWires1A2[e-16]),_.push(this.ToffsetWires1A2[e-8]),this.ToffsetArcWires2A=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1A2[e-15]),T.push(this.ToffsetWires1A2[e-7]),this.ToffsetArcWires2A=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1A2[e-14]),A.push(this.ToffsetWires1A2[e-6]),this.ToffsetArcWires2A=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1A2[e-13]),P.push(this.ToffsetWires1A2[e-5]),this.ToffsetArcWires2A=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1A2[e-12]),b.push(this.ToffsetWires1A2[e-4]),this.ToffsetArcWires2A=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires1A2[e-11]),D.push(this.ToffsetWires1A2[e-3]),this.ToffsetArcWires2A=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),R.push(this.ToffsetWires1A2[e-10]),R.push(this.ToffsetWires1A2[e-2]),this.ToffsetArcWires2A=m(R,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),B.push(this.ToffsetWires1A2[e-9]),B.push(this.ToffsetWires1A2[e-1]),this.ToffsetArcWires2A=m(B,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A,"1A2跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires1B1.length>1&&this.ToffsetWires1B2.length>1){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[],_=[],T=[],A=[],P=[],b=[],D=[],R=[],B=[];switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires1B1.length>=2&&(a.push(this.ToffsetWires1B1[e-2]),a.push(this.ToffsetWires1B1[e-1]),this.ToffsetArcWires1B=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=2&&(_.push(this.ToffsetWires1B2[e-2]),_.push(this.ToffsetWires1B2[e-1]),this.ToffsetArcWires2B=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.双分裂:this.ToffsetWires1B1.length>=4&&(a.push(this.ToffsetWires1B1[e-4]),a.push(this.ToffsetWires1B1[e-2]),this.ToffsetArcWires1B=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1B1[e-3]),c.push(this.ToffsetWires1B1[e-1]),this.ToffsetArcWires1B=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=4&&(_.push(this.ToffsetWires1B2[e-4]),_.push(this.ToffsetWires1B2[e-2]),this.ToffsetArcWires2B=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1B2[e-3]),T.push(this.ToffsetWires1B2[e-1]),this.ToffsetArcWires2B=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.四分裂:this.ToffsetWires1B1.length>=8&&(a.push(this.ToffsetWires1B1[e-8]),a.push(this.ToffsetWires1B1[e-4]),this.ToffsetArcWires1B=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1B1[e-7]),c.push(this.ToffsetWires1B1[e-3]),this.ToffsetArcWires1B=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1B1[e-6]),p.push(this.ToffsetWires1B1[e-2]),this.ToffsetArcWires1B=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1B1[e-5]),d.push(this.ToffsetWires1B1[e-1]),this.ToffsetArcWires1B=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=8&&(_.push(this.ToffsetWires1B2[e-8]),_.push(this.ToffsetWires1B2[e-4]),this.ToffsetArcWires2B=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1B2[e-7]),T.push(this.ToffsetWires1B2[e-3]),this.ToffsetArcWires2B=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1B2[e-6]),A.push(this.ToffsetWires1B2[e-2]),this.ToffsetArcWires2B=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1B2[e-5]),P.push(this.ToffsetWires1B2[e-1]),this.ToffsetArcWires2B=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.六分裂:this.ToffsetWires1B1.length>=12&&(a.push(this.ToffsetWires1B1[e-12]),a.push(this.ToffsetWires1B1[e-6]),this.ToffsetArcWires1B=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1B1[e-11]),c.push(this.ToffsetWires1B1[e-5]),this.ToffsetArcWires1B=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1B1[e-10]),p.push(this.ToffsetWires1B1[e-4]),this.ToffsetArcWires1B=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1B1[e-9]),d.push(this.ToffsetWires1B1[e-3]),this.ToffsetArcWires1B=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1B1[e-8]),u.push(this.ToffsetWires1B1[e-2]),this.ToffsetArcWires1B=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1B1[e-7]),v.push(this.ToffsetWires1B1[e-1]),this.ToffsetArcWires1B=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=12&&(_.push(this.ToffsetWires1B2[e-12]),_.push(this.ToffsetWires1B2[e-6]),this.ToffsetArcWires2B=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1B2[e-11]),T.push(this.ToffsetWires1B2[e-5]),this.ToffsetArcWires2B=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1B2[e-10]),A.push(this.ToffsetWires1B2[e-4]),this.ToffsetArcWires2B=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1B2[e-9]),P.push(this.ToffsetWires1B2[e-3]),this.ToffsetArcWires2B=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1B2[e-8]),b.push(this.ToffsetWires1B2[e-2]),this.ToffsetArcWires2B=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires1B2[e-7]),D.push(this.ToffsetWires1B2[e-1]),this.ToffsetArcWires2B=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.八分裂:this.ToffsetWires1B1.length>=16&&(a.push(this.ToffsetWires1B1[e-16]),a.push(this.ToffsetWires1B1[e-8]),this.ToffsetArcWires1B=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1B1[e-15]),c.push(this.ToffsetWires1B1[e-7]),this.ToffsetArcWires1B=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1B1[e-14]),p.push(this.ToffsetWires1B1[e-6]),this.ToffsetArcWires1B=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1B1[e-13]),d.push(this.ToffsetWires1B1[e-5]),this.ToffsetArcWires1B=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1B1[e-12]),u.push(this.ToffsetWires1B1[e-4]),this.ToffsetArcWires1B=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1B1[e-11]),v.push(this.ToffsetWires1B1[e-3]),this.ToffsetArcWires1B=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1B1[e-10]),C.push(this.ToffsetWires1B1[e-2]),this.ToffsetArcWires1B=m(C,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),W.push(this.ToffsetWires1B1[e-9]),W.push(this.ToffsetWires1B1[e-1]),this.ToffsetArcWires1B=m(W,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B,"1B1跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1B2.length>=16&&(_.push(this.ToffsetWires1B2[e-16]),_.push(this.ToffsetWires1B2[e-8]),this.ToffsetArcWires2B=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1B2[e-15]),T.push(this.ToffsetWires1B2[e-7]),this.ToffsetArcWires2B=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1B2[e-14]),A.push(this.ToffsetWires1B2[e-6]),this.ToffsetArcWires2B=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1B2[e-13]),P.push(this.ToffsetWires1B2[e-5]),this.ToffsetArcWires2B=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1B2[e-12]),b.push(this.ToffsetWires1B2[e-4]),this.ToffsetArcWires2B=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires1B2[e-11]),D.push(this.ToffsetWires1B2[e-3]),this.ToffsetArcWires2B=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),R.push(this.ToffsetWires1B2[e-10]),R.push(this.ToffsetWires1B2[e-2]),this.ToffsetArcWires2B=m(R,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),B.push(this.ToffsetWires1B2[e-9]),B.push(this.ToffsetWires1B2[e-1]),this.ToffsetArcWires2B=m(B,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B,"1B2跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires1C1.length>1&&this.ToffsetWires1C2.length>1){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[],_=[],T=[],A=[],P=[],b=[],D=[],R=[],B=[];switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires1C1.length>=2&&(a.push(this.ToffsetWires1C1[e-2]),a.push(this.ToffsetWires1C1[e-1]),this.ToffsetArcWires1C=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=2&&(_.push(this.ToffsetWires1C2[e-2]),_.push(this.ToffsetWires1C2[e-1]),this.ToffsetArcWires2C=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.双分裂:this.ToffsetWires1C1.length>=4&&(a.push(this.ToffsetWires1C1[e-4]),a.push(this.ToffsetWires1C1[e-2]),this.ToffsetArcWires1C=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1C1[e-3]),c.push(this.ToffsetWires1C1[e-1]),this.ToffsetArcWires1C=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=4&&(_.push(this.ToffsetWires1C2[e-4]),_.push(this.ToffsetWires1C2[e-2]),this.ToffsetArcWires2C=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1C2[e-3]),T.push(this.ToffsetWires1C2[e-1]),this.ToffsetArcWires2C=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.四分裂:this.ToffsetWires1C1.length>=8&&(a.push(this.ToffsetWires1C1[e-8]),a.push(this.ToffsetWires1C1[e-4]),this.ToffsetArcWires1C=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1C1[e-7]),c.push(this.ToffsetWires1C1[e-3]),this.ToffsetArcWires1C=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1C1[e-6]),p.push(this.ToffsetWires1C1[e-2]),this.ToffsetArcWires1C=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1C1[e-5]),d.push(this.ToffsetWires1C1[e-1]),this.ToffsetArcWires1C=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=8&&(_.push(this.ToffsetWires1C2[e-8]),_.push(this.ToffsetWires1C2[e-4]),this.ToffsetArcWires2C=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1C2[e-7]),T.push(this.ToffsetWires1C2[e-3]),this.ToffsetArcWires2C=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1C2[e-6]),A.push(this.ToffsetWires1C2[e-2]),this.ToffsetArcWires2C=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1C2[e-5]),P.push(this.ToffsetWires1C2[e-1]),this.ToffsetArcWires2C=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.六分裂:this.ToffsetWires1C1.length>=12&&(a.push(this.ToffsetWires1C1[e-12]),a.push(this.ToffsetWires1C1[e-6]),this.ToffsetArcWires1C=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1C1[e-11]),c.push(this.ToffsetWires1C1[e-5]),this.ToffsetArcWires1C=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1C1[e-10]),p.push(this.ToffsetWires1C1[e-4]),this.ToffsetArcWires1C=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1C1[e-9]),d.push(this.ToffsetWires1C1[e-3]),this.ToffsetArcWires1C=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1C1[e-8]),u.push(this.ToffsetWires1C1[e-2]),this.ToffsetArcWires1C=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1C1[e-7]),v.push(this.ToffsetWires1C1[e-1]),this.ToffsetArcWires1C=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=12&&(_.push(this.ToffsetWires1C2[e-12]),_.push(this.ToffsetWires1C2[e-6]),this.ToffsetArcWires2C=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1C2[e-11]),T.push(this.ToffsetWires1C2[e-5]),this.ToffsetArcWires2C=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1C2[e-10]),A.push(this.ToffsetWires1C2[e-4]),this.ToffsetArcWires2C=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1C2[e-9]),P.push(this.ToffsetWires1C2[e-3]),this.ToffsetArcWires2C=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1C2[e-8]),b.push(this.ToffsetWires1C2[e-2]),this.ToffsetArcWires2C=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires1C2[e-7]),D.push(this.ToffsetWires1C2[e-1]),this.ToffsetArcWires2C=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.八分裂:this.ToffsetWires1C1.length>=16&&(a.push(this.ToffsetWires1C1[e-16]),a.push(this.ToffsetWires1C1[e-8]),this.ToffsetArcWires1C=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires1C1[e-15]),c.push(this.ToffsetWires1C1[e-7]),this.ToffsetArcWires1C=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires1C1[e-14]),p.push(this.ToffsetWires1C1[e-6]),this.ToffsetArcWires1C=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires1C1[e-13]),d.push(this.ToffsetWires1C1[e-5]),this.ToffsetArcWires1C=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires1C1[e-12]),u.push(this.ToffsetWires1C1[e-4]),this.ToffsetArcWires1C=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires1C1[e-11]),v.push(this.ToffsetWires1C1[e-3]),this.ToffsetArcWires1C=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires1C1[e-10]),C.push(this.ToffsetWires1C1[e-2]),this.ToffsetArcWires1C=m(C,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),W.push(this.ToffsetWires1C1[e-9]),W.push(this.ToffsetWires1C1[e-1]),this.ToffsetArcWires1C=m(W,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C,"1C1跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires1C2.length>=16&&(_.push(this.ToffsetWires1C2[e-16]),_.push(this.ToffsetWires1C2[e-8]),this.ToffsetArcWires2C=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires1C2[e-15]),T.push(this.ToffsetWires1C2[e-7]),this.ToffsetArcWires2C=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires1C2[e-14]),A.push(this.ToffsetWires1C2[e-6]),this.ToffsetArcWires2C=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires1C2[e-13]),P.push(this.ToffsetWires1C2[e-5]),this.ToffsetArcWires2C=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires1C2[e-12]),b.push(this.ToffsetWires1C2[e-4]),this.ToffsetArcWires2C=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires1C2[e-11]),D.push(this.ToffsetWires1C2[e-3]),this.ToffsetArcWires2C=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),R.push(this.ToffsetWires1C2[e-10]),R.push(this.ToffsetWires1C2[e-2]),this.ToffsetArcWires2C=m(R,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),B.push(this.ToffsetWires1C2[e-9]),B.push(this.ToffsetWires1C2[e-1]),this.ToffsetArcWires2C=m(B,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C,"1C2跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires2A1.length>1&&this.ToffsetWires2A2.length>1){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[],_=[],T=[],A=[],P=[],b=[],D=[],R=[],B=[];switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires2A1.length>=2&&(a.push(this.ToffsetWires2A1[e-2]),a.push(this.ToffsetWires2A1[e-1]),this.ToffsetArcWires1A2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=2&&(_.push(this.ToffsetWires2A2[e-2]),_.push(this.ToffsetWires2A2[e-1]),this.ToffsetArcWires2A2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.双分裂:this.ToffsetWires2A1.length>=4&&(a.push(this.ToffsetWires2A1[e-4]),a.push(this.ToffsetWires2A1[e-2]),this.ToffsetArcWires1A2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2A1[e-3]),c.push(this.ToffsetWires2A1[e-1]),this.ToffsetArcWires1A2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=4&&(_.push(this.ToffsetWires2A2[e-4]),_.push(this.ToffsetWires2A2[e-2]),this.ToffsetArcWires2A2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2A2[e-3]),T.push(this.ToffsetWires2A2[e-1]),this.ToffsetArcWires2A2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.四分裂:this.ToffsetWires2A1.length>=8&&(a.push(this.ToffsetWires2A1[e-8]),a.push(this.ToffsetWires2A1[e-4]),this.ToffsetArcWires1A2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2A1[e-7]),c.push(this.ToffsetWires2A1[e-3]),this.ToffsetArcWires1A2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2A1[e-6]),p.push(this.ToffsetWires2A1[e-2]),this.ToffsetArcWires1A2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2A1[e-5]),d.push(this.ToffsetWires2A1[e-1]),this.ToffsetArcWires1A2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=8&&(_.push(this.ToffsetWires2A2[e-8]),_.push(this.ToffsetWires2A2[e-4]),this.ToffsetArcWires2A2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2A2[e-7]),T.push(this.ToffsetWires2A2[e-3]),this.ToffsetArcWires2A2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2A2[e-6]),A.push(this.ToffsetWires2A2[e-2]),this.ToffsetArcWires2A2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2A2[e-5]),P.push(this.ToffsetWires2A2[e-1]),this.ToffsetArcWires2A2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.六分裂:this.ToffsetWires2A1.length>=12&&(a.push(this.ToffsetWires2A1[e-12]),a.push(this.ToffsetWires2A1[e-6]),this.ToffsetArcWires1A2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2A1[e-11]),c.push(this.ToffsetWires2A1[e-5]),this.ToffsetArcWires1A2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2A1[e-10]),p.push(this.ToffsetWires2A1[e-4]),this.ToffsetArcWires1A2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2A1[e-9]),d.push(this.ToffsetWires2A1[e-3]),this.ToffsetArcWires1A2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2A1[e-8]),u.push(this.ToffsetWires2A1[e-2]),this.ToffsetArcWires1A2=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2A1[e-7]),v.push(this.ToffsetWires2A1[e-1]),this.ToffsetArcWires1A2=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=12&&(_.push(this.ToffsetWires2A2[e-12]),_.push(this.ToffsetWires2A2[e-6]),this.ToffsetArcWires2A2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2A2[e-11]),T.push(this.ToffsetWires2A2[e-5]),this.ToffsetArcWires2A2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2A2[e-10]),A.push(this.ToffsetWires2A2[e-4]),this.ToffsetArcWires2A2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2A2[e-9]),P.push(this.ToffsetWires2A2[e-3]),this.ToffsetArcWires2A2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2A2[e-8]),b.push(this.ToffsetWires2A2[e-2]),this.ToffsetArcWires2A2=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires2A2[e-7]),D.push(this.ToffsetWires2A2[e-1]),this.ToffsetArcWires2A2=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.八分裂:this.ToffsetWires2A1.length>=16&&(a.push(this.ToffsetWires2A1[e-16]),a.push(this.ToffsetWires2A1[e-8]),this.ToffsetArcWires1A2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2A1[e-15]),c.push(this.ToffsetWires2A1[e-7]),this.ToffsetArcWires1A2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2A1[e-14]),p.push(this.ToffsetWires2A1[e-6]),this.ToffsetArcWires1A2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2A1[e-13]),d.push(this.ToffsetWires2A1[e-5]),this.ToffsetArcWires1A2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2A1[e-12]),u.push(this.ToffsetWires2A1[e-4]),this.ToffsetArcWires1A2=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2A1[e-11]),v.push(this.ToffsetWires2A1[e-3]),this.ToffsetArcWires1A2=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2A1[e-10]),C.push(this.ToffsetWires2A1[e-2]),this.ToffsetArcWires1A2=m(C,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),W.push(this.ToffsetWires2A1[e-9]),W.push(this.ToffsetWires2A1[e-1]),this.ToffsetArcWires1A2=m(W,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1A2,"2A1跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2A2.length>=16&&(_.push(this.ToffsetWires2A2[e-16]),_.push(this.ToffsetWires2A2[e-8]),this.ToffsetArcWires2A2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2A2[e-15]),T.push(this.ToffsetWires2A2[e-7]),this.ToffsetArcWires2A2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2A2[e-14]),A.push(this.ToffsetWires2A2[e-6]),this.ToffsetArcWires2A2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2A2[e-13]),P.push(this.ToffsetWires2A2[e-5]),this.ToffsetArcWires2A2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2A2[e-12]),b.push(this.ToffsetWires2A2[e-4]),this.ToffsetArcWires2A2=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires2A2[e-11]),D.push(this.ToffsetWires2A2[e-3]),this.ToffsetArcWires2A2=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),R.push(this.ToffsetWires2A2[e-10]),R.push(this.ToffsetWires2A2[e-2]),this.ToffsetArcWires2A2=m(R,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),B.push(this.ToffsetWires2A2[e-9]),B.push(this.ToffsetWires2A2[e-1]),this.ToffsetArcWires2A2=m(B,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2A2,"2A2跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires2B1.length>1&&this.ToffsetWires2B2.length>1){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[],_=[],T=[],A=[],P=[],b=[],D=[],R=[],B=[];switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires2B1.length>=2&&(a.push(this.ToffsetWires2B1[e-2]),a.push(this.ToffsetWires2B1[e-1]),this.ToffsetArcWires1B2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=2&&(_.push(this.ToffsetWires2B2[e-2]),_.push(this.ToffsetWires2B2[e-1]),this.ToffsetArcWires2B2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.双分裂:this.ToffsetWires2B1.length>=4&&(a.push(this.ToffsetWires2B1[e-4]),a.push(this.ToffsetWires2B1[e-2]),this.ToffsetArcWires1B2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2B1[e-3]),c.push(this.ToffsetWires2B1[e-1]),this.ToffsetArcWires1B2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=4&&(_.push(this.ToffsetWires2B2[e-4]),_.push(this.ToffsetWires2B2[e-2]),this.ToffsetArcWires2B2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2B2[e-3]),T.push(this.ToffsetWires2B2[e-1]),this.ToffsetArcWires2B2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.四分裂:this.ToffsetWires2B1.length>=8&&(a.push(this.ToffsetWires2B1[e-8]),a.push(this.ToffsetWires2B1[e-4]),this.ToffsetArcWires1B2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2B1[e-7]),c.push(this.ToffsetWires2B1[e-3]),this.ToffsetArcWires1B2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2B1[e-6]),p.push(this.ToffsetWires2B1[e-2]),this.ToffsetArcWires1B2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2B1[e-5]),d.push(this.ToffsetWires2B1[e-1]),this.ToffsetArcWires1B2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=8&&(_.push(this.ToffsetWires2B2[e-8]),_.push(this.ToffsetWires2B2[e-4]),this.ToffsetArcWires2B2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2B2[e-7]),T.push(this.ToffsetWires2B2[e-3]),this.ToffsetArcWires2B2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2B2[e-6]),A.push(this.ToffsetWires2B2[e-2]),this.ToffsetArcWires2B2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2B2[e-5]),P.push(this.ToffsetWires2B2[e-1]),this.ToffsetArcWires2B2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.六分裂:this.ToffsetWires2B1.length>=12&&(a.push(this.ToffsetWires2B1[e-12]),a.push(this.ToffsetWires2B1[e-6]),this.ToffsetArcWires1B2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2B1[e-11]),c.push(this.ToffsetWires2B1[e-5]),this.ToffsetArcWires1B2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2B1[e-10]),p.push(this.ToffsetWires2B1[e-4]),this.ToffsetArcWires1B2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2B1[e-9]),d.push(this.ToffsetWires2B1[e-3]),this.ToffsetArcWires1B2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2B1[e-8]),u.push(this.ToffsetWires2B1[e-2]),this.ToffsetArcWires1B2=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2B1[e-7]),v.push(this.ToffsetWires2B1[e-1]),this.ToffsetArcWires1B2=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=12&&(_.push(this.ToffsetWires2B2[e-12]),_.push(this.ToffsetWires2B2[e-6]),this.ToffsetArcWires2B2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2B2[e-11]),T.push(this.ToffsetWires2B2[e-5]),this.ToffsetArcWires2B2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2B2[e-10]),A.push(this.ToffsetWires2B2[e-4]),this.ToffsetArcWires2B2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2B2[e-9]),P.push(this.ToffsetWires2B2[e-3]),this.ToffsetArcWires2B2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2B2[e-8]),b.push(this.ToffsetWires2B2[e-2]),this.ToffsetArcWires2B2=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires2B2[e-7]),D.push(this.ToffsetWires2B2[e-1]),this.ToffsetArcWires2B2=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.八分裂:this.ToffsetWires2B1.length>=16&&(a.push(this.ToffsetWires2B1[e-16]),a.push(this.ToffsetWires2B1[e-8]),this.ToffsetArcWires1B2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2B1[e-15]),c.push(this.ToffsetWires2B1[e-7]),this.ToffsetArcWires1B2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2B1[e-14]),p.push(this.ToffsetWires2B1[e-6]),this.ToffsetArcWires1B2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2B1[e-13]),d.push(this.ToffsetWires2B1[e-5]),this.ToffsetArcWires1B2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2B1[e-12]),u.push(this.ToffsetWires2B1[e-4]),this.ToffsetArcWires1B2=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2B1[e-11]),v.push(this.ToffsetWires2B1[e-3]),this.ToffsetArcWires1B2=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2B1[e-10]),C.push(this.ToffsetWires2B1[e-2]),this.ToffsetArcWires1B2=m(C,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),W.push(this.ToffsetWires2B1[e-9]),W.push(this.ToffsetWires2B1[e-1]),this.ToffsetArcWires1B2=m(W,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1B2,"2B1跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2B2.length>=16&&(_.push(this.ToffsetWires2B2[e-16]),_.push(this.ToffsetWires2B2[e-8]),this.ToffsetArcWires2B2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2B2[e-15]),T.push(this.ToffsetWires2B2[e-7]),this.ToffsetArcWires2B2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2B2[e-14]),A.push(this.ToffsetWires2B2[e-6]),this.ToffsetArcWires2B2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2B2[e-13]),P.push(this.ToffsetWires2B2[e-5]),this.ToffsetArcWires2B2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2B2[e-12]),b.push(this.ToffsetWires2B2[e-4]),this.ToffsetArcWires2B2=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires2B2[e-11]),D.push(this.ToffsetWires2B2[e-3]),this.ToffsetArcWires2B2=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),R.push(this.ToffsetWires2B2[e-10]),R.push(this.ToffsetWires2B2[e-2]),this.ToffsetArcWires2B2=m(R,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),B.push(this.ToffsetWires2B2[e-9]),B.push(this.ToffsetWires2B2[e-1]),this.ToffsetArcWires2B2=m(B,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2B2,"2B2跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}if(this.ToffsetWires2C1.length>1&&this.ToffsetWires2C2.length>1){const a=[],c=[],p=[],d=[],u=[],v=[],C=[],W=[],_=[],T=[],A=[],P=[],b=[],D=[],R=[],B=[];switch(this.LineInfo.Wairnum){case w.单分裂:this.ToffsetWires2C1.length>=2&&(a.push(this.ToffsetWires2C1[e-2]),a.push(this.ToffsetWires2C1[e-1]),this.ToffsetArcWires1C2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=2&&(_.push(this.ToffsetWires2C2[e-2]),_.push(this.ToffsetWires2C2[e-1]),this.ToffsetArcWires2C2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.双分裂:this.ToffsetWires2C1.length>=4&&(a.push(this.ToffsetWires2C1[e-4]),a.push(this.ToffsetWires2C1[e-2]),this.ToffsetArcWires1C2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2C1[e-3]),c.push(this.ToffsetWires2C1[e-1]),this.ToffsetArcWires1C2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=4&&(_.push(this.ToffsetWires2C2[e-4]),_.push(this.ToffsetWires2C2[e-2]),this.ToffsetArcWires2C2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2C2[e-3]),T.push(this.ToffsetWires2C2[e-1]),this.ToffsetArcWires2C2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.四分裂:this.ToffsetWires2C1.length>=8&&(a.push(this.ToffsetWires2C1[e-8]),a.push(this.ToffsetWires2C1[e-4]),this.ToffsetArcWires1C2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2C1[e-7]),c.push(this.ToffsetWires2C1[e-3]),this.ToffsetArcWires1C2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2C1[e-6]),p.push(this.ToffsetWires2C1[e-2]),this.ToffsetArcWires1C2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2C1[e-5]),d.push(this.ToffsetWires2C1[e-1]),this.ToffsetArcWires1C2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=8&&(_.push(this.ToffsetWires2C2[e-8]),_.push(this.ToffsetWires2C2[e-4]),this.ToffsetArcWires2C2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2C2[e-7]),T.push(this.ToffsetWires2C2[e-3]),this.ToffsetArcWires2C2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2C2[e-6]),A.push(this.ToffsetWires2C2[e-2]),this.ToffsetArcWires2C2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2C2[e-5]),P.push(this.ToffsetWires2C2[e-1]),this.ToffsetArcWires2C2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.六分裂:this.ToffsetWires2C1.length>=12&&(a.push(this.ToffsetWires2C1[e-12]),a.push(this.ToffsetWires2C1[e-6]),this.ToffsetArcWires1C2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2C1[e-11]),c.push(this.ToffsetWires2C1[e-5]),this.ToffsetArcWires1C2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2C1[e-10]),p.push(this.ToffsetWires2C1[e-4]),this.ToffsetArcWires1C2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2C1[e-9]),d.push(this.ToffsetWires2C1[e-3]),this.ToffsetArcWires1C2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2C1[e-8]),u.push(this.ToffsetWires2C1[e-2]),this.ToffsetArcWires1C2=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2C1[e-7]),v.push(this.ToffsetWires2C1[e-1]),this.ToffsetArcWires1C2=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=12&&(_.push(this.ToffsetWires2C2[e-12]),_.push(this.ToffsetWires2C2[e-6]),this.ToffsetArcWires2C2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2C2[e-11]),T.push(this.ToffsetWires2C2[e-5]),this.ToffsetArcWires2C2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2C2[e-10]),A.push(this.ToffsetWires2C2[e-4]),this.ToffsetArcWires2C2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2C2[e-9]),P.push(this.ToffsetWires2C2[e-3]),this.ToffsetArcWires2C2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2C2[e-8]),b.push(this.ToffsetWires2C2[e-2]),this.ToffsetArcWires2C2=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires2C2[e-7]),D.push(this.ToffsetWires2C2[e-1]),this.ToffsetArcWires2C2=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break;case w.八分裂:this.ToffsetWires2C1.length>=16&&(a.push(this.ToffsetWires2C1[e-16]),a.push(this.ToffsetWires2C1[e-8]),this.ToffsetArcWires1C2=m(a,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),c.push(this.ToffsetWires2C1[e-15]),c.push(this.ToffsetWires2C1[e-7]),this.ToffsetArcWires1C2=m(c,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),p.push(this.ToffsetWires2C1[e-14]),p.push(this.ToffsetWires2C1[e-6]),this.ToffsetArcWires1C2=m(p,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),d.push(this.ToffsetWires2C1[e-13]),d.push(this.ToffsetWires2C1[e-5]),this.ToffsetArcWires1C2=m(d,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),u.push(this.ToffsetWires2C1[e-12]),u.push(this.ToffsetWires2C1[e-4]),this.ToffsetArcWires1C2=m(u,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),v.push(this.ToffsetWires2C1[e-11]),v.push(this.ToffsetWires2C1[e-3]),this.ToffsetArcWires1C2=m(v,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),C.push(this.ToffsetWires2C1[e-10]),C.push(this.ToffsetWires2C1[e-2]),this.ToffsetArcWires1C2=m(C,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),W.push(this.ToffsetWires2C1[e-9]),W.push(this.ToffsetWires2C1[e-1]),this.ToffsetArcWires1C2=m(W,15),this.LineentityCollection2.add(y(this.ToffsetArcWires1C2,"2C1跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor))),this.ToffsetWires2C2.length>=16&&(_.push(this.ToffsetWires2C2[e-16]),_.push(this.ToffsetWires2C2[e-8]),this.ToffsetArcWires2C2=m(_,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线1"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),T.push(this.ToffsetWires2C2[e-15]),T.push(this.ToffsetWires2C2[e-7]),this.ToffsetArcWires2C2=m(T,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线2"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),A.push(this.ToffsetWires2C2[e-14]),A.push(this.ToffsetWires2C2[e-6]),this.ToffsetArcWires2C2=m(A,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线3"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),P.push(this.ToffsetWires2C2[e-13]),P.push(this.ToffsetWires2C2[e-5]),this.ToffsetArcWires2C2=m(P,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线4"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),b.push(this.ToffsetWires2C2[e-12]),b.push(this.ToffsetWires2C2[e-4]),this.ToffsetArcWires2C2=m(b,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线5"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),D.push(this.ToffsetWires2C2[e-11]),D.push(this.ToffsetWires2C2[e-3]),this.ToffsetArcWires2C2=m(D,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线6"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),R.push(this.ToffsetWires2C2[e-10]),R.push(this.ToffsetWires2C2[e-2]),this.ToffsetArcWires2C2=m(R,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线7"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)),B.push(this.ToffsetWires2C2[e-9]),B.push(this.ToffsetWires2C2[e-1]),this.ToffsetArcWires2C2=m(B,15),this.LineentityCollection2.add(y(this.ToffsetArcWires2C2,"2C2跳线8"+(r-1)+"-"+r,this.LineInfo.wireWidth,this.LineInfo.wireTColor)));break}}}else switch(this.LineInfo.Wairnum){case w.单分裂:t=t+1;break;case w.双分裂:t=t+2;break;case w.四分裂:t=t+4;break;case w.六分裂:t=t+6;break;case w.八分裂:t=t+8;break}})}getWireDataForChannelCalculation(){return{arcLine1A1:this.arcLine1A1,arcLine1B1:this.arcLine1B1,arcLine1C1:this.arcLine1C1}}getWireDataForChannelCalculationByTowerRange(t,e){if(t<0||e>=this.LineInfo.towers.length||t>e)return console.warn(`无效的杆塔索引范围: ${t} - ${e}`),{arcLine1A1:[],arcLine1B1:[],arcLine1C1:[]};const i=[],r=[],n=[],o=this.LineInfo.towers,f={minLon:Math.min(...o.slice(t,e+1).map(l=>l.Longitude)),maxLon:Math.max(...o.slice(t,e+1).map(l=>l.Longitude)),minLat:Math.min(...o.slice(t,e+1).map(l=>l.Latitude)),maxLat:Math.max(...o.slice(t,e+1).map(l=>l.Latitude))},h=.005;return f.minLon-=h,f.maxLon+=h,f.minLat-=h,f.maxLat+=h,this.arcLine1A1.forEach(l=>{l[0]>=f.minLon&&l[0]<=f.maxLon&&l[1]>=f.minLat&&l[1]<=f.maxLat&&i.push(l)}),this.arcLine1B1.forEach(l=>{l[0]>=f.minLon&&l[0]<=f.maxLon&&l[1]>=f.minLat&&l[1]<=f.maxLat&&r.push(l)}),this.arcLine1C1.forEach(l=>{l[0]>=f.minLon&&l[0]<=f.maxLon&&l[1]>=f.minLat&&l[1]<=f.maxLat&&n.push(l)}),{arcLine1A1:i,arcLine1B1:r,arcLine1C1:n}}parseWireEntityName(t){const e=t.match(/^导线(\d+)_([ABC])\d*(\d+)-(\d+)$/);return e?{circuit:parseInt(e[1]),phase:e[2],startTowerIndex:parseInt(e[3]),endTowerIndex:parseInt(e[4])}:null}getWireSegmentByTowerRange(t,e){const i={arcLine1A1:[],arcLine1B1:[],arcLine1C1:[]};return this.LineentityCollection2.values.forEach(r=>{if(r.name&&r.polyline&&r.polyline.positions){const n=this.parseWireEntityName(r.name);if(n&&n.circuit===1&&n.startTowerIndex===t&&n.endTowerIndex===e){const o=r.polyline.positions.getValue(g.JulianDate.now());if(o&&o.length>0){const f=[];for(let h=0;h<o.length;h++){const l=g.Cartographic.fromCartesian(o[h]);f.push([g.Math.toDegrees(l.longitude),g.Math.toDegrees(l.latitude),l.height])}switch(n.phase){case"A":i.arcLine1A1=f;break;case"B":i.arcLine1B1=f;break;case"C":i.arcLine1C1=f;break}}}}}),i}getAllWireSegments(){const t=[],e=[],i=[],r=new Map;return this.LineInfo&&this.LineInfo.towers&&this.LineInfo.towers.forEach((n,o)=>{r.set(n.id,o),n.name&&r.set(n.name,o)}),this.LineentityCollection2.values.forEach(n=>{if(n.name&&n.polyline&&n.polyline.positions){const o=this.parseWireEntityName(n.name);if(o&&o.circuit===1){const f=n.polyline.positions.getValue(g.JulianDate.now());if(f&&f.length>0){const h=[];for(let c=0;c<f.length;c++){const p=g.Cartographic.fromCartesian(f[c]);h.push([g.Math.toDegrees(p.longitude),g.Math.toDegrees(p.latitude),p.height])}const l=o.startTowerIndex,a=r.get(l)??l;switch(o.phase){case"A":t[a]=h;break;case"B":e[a]=h;break;case"C":i[a]=h;break}}}}}),console.log(`从LineentityCollection2提取导线数据完成: A相${t.length}段, B相${e.length}段, C相${i.length}段`),{wireSegments1A1:t,wireSegments1B1:e,wireSegments1C1:i}}getOffsetTowers(){return this.offsetTowers}getLineInfo(){return this.LineInfo}getViewer(){return this.viewer}flyToTower(t){if(t<0||t>=this.offsetTowers.length){console.warn(`Invalid tower index: ${t}. Valid range: 0-${this.offsetTowers.length-1}`);return}const e=this.offsetTowers[t];console.log(e),this.viewer.camera.flyTo({destination:e,duration:2,orientation:{heading:g.Math.toRadians(0),pitch:g.Math.toRadians(-60),roll:g.Math.toRadians(0)}})}loadLineTower(){this.initializeLineData(),this.isDynamicLoadingEnabled?(this.loadAllWiresOnly(),this.setupCameraMoveListener(),this.updateVisibleTowers()):this.loadAllTowersAtOnce()}loadAllWiresOnly(){const t=new g.EntityCollection,e=this.entityCollection2;this.entityCollection2=t,this.loadAllTowersAtOnce();const i=[];t.values.forEach(r=>{var n;r.name&&(r.name.includes("导线")||r.name.includes("daoxian")||(n=r.id)!=null&&n.toString().includes("daoxian"))&&i.push(r)}),this.entityCollection2=e,i.forEach(r=>{this.entityCollection2.add(r)}),t.removeAll()}getArcLine1A1(){return this.arcLine1A1}getArcLine1B1(){return this.arcLine1B1}getArcLine1C1(){return this.arcLine1C1}}const En=class En{constructor(t,e,i){I(this,"viewer");I(this,"LineInfo");I(this,"Keym","");I(this,"offsetTrees",[]);I(this,"dataSourcetree");I(this,"entityCollectiontree");I(this,"isDynamicLoadingEnabled",!0);I(this,"loadedTreeIndices",new Set);I(this,"isTreeModelRemoved",!1);I(this,"modelCache",new Map);this.Keym=i,this.viewer=t,this.LineInfo=e,this.dataSourcetree=new g.CustomDataSource(this.LineInfo.LineID+"tree"),this.entityCollectiontree=this.dataSourcetree.entities}createModelCacheKey(t,e,i,r){return`${t}_${e}_${i}_${r}`}getCachedModelConfig(t,e,i,r){const n=Math.max(0,i),o=Math.min(r,5e4),f=this.createModelCacheKey(t,e,n,o);if(!this.modelCache.has(f)){const h={uri:t,scale:e,distanceDisplayCondition:[n,o]};this.modelCache.set(f,h)}return this.modelCache.get(f)}setDynamicLoadingEnabled(t){this.isDynamicLoadingEnabled=t}getDynamicLoadingEnabled(){return this.isDynamicLoadingEnabled}getVisibleTreeIndices(){var n;if(!this.viewer.camera||this.offsetTrees.length===0)return[];const t=this.viewer.camera.position,e=((n=this.viewer.camera.positionCartographic)==null?void 0:n.height)||1e3;let i=Math.max(5e3,e*2);console.log(`相机高度: ${e}, 加载距离: ${i}`),e>5e4&&(i=1e5);const r=[];for(let o=0;o<this.offsetTrees.length;o++){const f=this.offsetTrees[o];g.Cartesian3.distance(t,f)<=i&&r.push(o)}if(r.length===0&&this.offsetTrees.length>0){const o=Math.min(20,this.offsetTrees.length);for(let f=0;f<o;f++)r.push(f)}return r}updateVisibleTrees(){if(this.isTreeModelRemoved)return;const t=this.getVisibleTreeIndices(),e=[];this.loadedTreeIndices.forEach(i=>{t.includes(i)||e.push(i)}),e.forEach(i=>{const r="tree-"+this.LineInfo.Trees[i].id;this.entityCollectiontree.removeById(r),this.loadedTreeIndices.delete(i)}),t.forEach(i=>{if(!this.loadedTreeIndices.has(i))if(i>=0&&i<this.offsetTrees.length&&i<this.LineInfo.Trees.length){const r=this.offsetTrees[i],n=this.LineInfo.Trees[i];r&&n?(this.loadTreeAtIndex(i,r),this.loadedTreeIndices.add(i)):console.warn(`跳过无效的动态加载树木数据,索引: ${i}`)}else console.warn(`动态加载树木索引超出范围: ${i}`)})}loadTree(){this.Keym=="OW_JPS_EEngin_001"&&(this.LineInfo.Trees.forEach(t=>{this.offsetTrees.push(g.Cartesian3.fromDegrees(t.lon,t.lat,t.alt))}),this.entityCollectiontree.show=!0,this.isDynamicLoadingEnabled?this.updateVisibleTrees():this.loadAllTreesAtOnce())}loadAllTreesAtOnce(){this.LineInfo.Trees.length!==this.offsetTrees.length&&console.warn(`树木数据长度 (${this.LineInfo.Trees.length}) 与位置数据长度 (${this.offsetTrees.length}) 不匹配`);const t=Math.min(this.LineInfo.Trees.length,this.offsetTrees.length);for(let e=0;e<t;e++){const i=this.LineInfo.Trees[e],r=this.offsetTrees[e];i&&r?this.loadTreeAtIndex(e,r):console.warn(`跳过无效的树木数据,索引: ${e}`)}}loadTreeAtIndex(t,e){const i=this.LineInfo.Trees[t];if(!i.modelurl||i.modelurl.trim()===""){console.warn(`Tree ${t} has invalid model URL: ${i.modelurl}. Skipping...`);return}let r=1;i.treeScale>0&&i.treeH>0?(r=i.treeH/i.treeScale,r<=0&&(r=1)):i.treeH>0&&(r=i.treeH);const n=this.getCachedModelConfig(i.modelurl,r,0,2e4);this.entityCollectiontree.add(Pn("tree-"+i.id,e,"tree-"+i.id,n.uri,new g.HeadingPitchRoll(0,0,0),n.scale,n.distanceDisplayCondition))}flyToTree(t){if(t<0||t>=this.LineInfo.Trees.length){console.warn(`Invalid tree index: ${t}. Valid range: 0-${this.LineInfo.Trees.length-1}`);return}const e=this.LineInfo.Trees[t],i=g.Cartesian3.fromDegrees(e.lon,e.lat,e.alt+(e.treeH||0));this.viewer.camera.flyTo({destination:i,duration:2,orientation:{heading:g.Math.toRadians(0),pitch:g.Math.toRadians(-60),roll:g.Math.toRadians(0)}})}removeTreeModels(){this.isTreeModelRemoved=!0,this.entityCollectiontree.removeAll(),this.loadedTreeIndices.clear()}restoreTreeModels(){this.isTreeModelRemoved=!1,this.isDynamicLoadingEnabled?this.updateVisibleTrees():this.loadAllTreesAtOnce()}addTreeData(t){this.LineInfo.Trees.push(t)}getTreeCoordinates(){return this.LineInfo.Trees.map(t=>[t.lon,t.lat,Number(t.alt||0)+Number(t.treeH||0)])}getOffsetTrees(){return this.offsetTrees}getLineInfo(){return this.LineInfo}getViewer(){return this.viewer}getTerrainDataSources(){return[this.dataSourcetree]}static getTreeEntityPrefix(){return En.TREE_ENTITY_PREFIX}};I(En,"TREE_ENTITY_PREFIX","tree-");let lo=En;class mu{constructor(t,e){I(this,"viewer");I(this,"dataSourceplotting");I(this,"entityCollectionplotting");I(this,"terrainVerificationCache",new Map);I(this,"terrainVerificationResultCache",new Map);I(this,"maxVisibleResults",200);I(this,"terrainVerificationBatchIndex",0);I(this,"terrainVerificationTotalBatches",0);I(this,"terrainVerificationIsRunning",!1);I(this,"terrainVerificationBatchSize",100);I(this,"cameraMoveHandler",null);I(this,"isDynamicTerrainVerificationEnabled",!1);I(this,"wireClickHandler",null);I(this,"distanceRuleConfig",new fu);this.viewer=t,this.dataSourceplotting=new g.CustomDataSource("plotting"),this.entityCollectionplotting=this.dataSourceplotting.entities}ensurePlottingDataSourceAdded(){this.viewer.dataSources.contains(this.dataSourceplotting)||this.viewer.dataSources.add(this.dataSourceplotting),this.entityCollectionplotting.show=!0}calcResultByType(t,e,i,r,n,o=this.distanceRuleConfig){if(this.entityCollectionplotting.values.length>=this.maxVisibleResults)return;const f=`${t[0].toFixed(6)}_${t[1].toFixed(6)}_${t[2].toFixed(2)}`;if(this.terrainVerificationCache.has(f)){const h=this.terrainVerificationCache.get(f);Ir(t,h,this.entityCollectionplotting,o,n);return}else{const h=wn(t,e,i,r);this.terrainVerificationCache.set(f,h),Ir(t,h,this.entityCollectionplotting,o||this.distanceRuleConfig,n)}}performTerrainVerification(t,e,i,r,n=null,o,f=ht.全部测量){const h=`${t[0].toFixed(6)}_${t[1].toFixed(6)}_${t[2].toFixed(2)}`,l=wn(t,e,i,r);this.terrainVerificationCache.set(h,l);const a=Oa(t,l,o??"unknown");return Ir(t,l,this.entityCollectionplotting,n||this.distanceRuleConfig,f),a}setMaxVisibleTerrainResults(t=200){this.maxVisibleResults=Math.max(10,t)}setDistanceRuleConfig(t){this.distanceRuleConfig={...this.distanceRuleConfig,...t}}getDistanceRuleConfig(){return{...this.distanceRuleConfig}}drawCorridorPolygon(t,e="corridor-polygon"){if(!t||t.length<3)return;this.ensurePlottingDataSourceAdded();const i=t.map(n=>g.Cartesian3.fromDegrees(n[0],n[1])),r=this.entityCollectionplotting.add({name:e,polygon:{hierarchy:new g.PolygonHierarchy(i),material:g.Color.GREEN.withAlpha(.3),outline:!0,outlineColor:g.Color.GREEN,outlineWidth:2,heightReference:g.HeightReference.CLAMP_TO_GROUND,perPositionHeight:!1}});this.terrainVerificationResultCache.has("corridor-polygon")||this.terrainVerificationResultCache.set("corridor-polygon",[]),this.terrainVerificationResultCache.get("corridor-polygon").push(r)}drawCorridorDistanceMarkers(t,e,i="corridor-markers",r=!0){!t||t.length<2||(this.ensurePlottingDataSourceAdded(),this.addPerpendicularWidthMarkers(t,e,i),r&&this.addParallelIntervalMarkers(t,e,10,i))}addPerpendicularWidthMarkers(t,e,i){const r=t[0],n=t.length>1?t[1]:t[t.length-1],o=g.Cartesian3.fromDegrees(r[0],r[1]),f=g.Cartesian3.fromDegrees(n[0],n[1]),h=g.Cartesian3.subtract(f,o,new g.Cartesian3);g.Cartesian3.normalize(h,h);const l=g.Cartesian3.clone(o);g.Cartesian3.normalize(l,l);const a=g.Cartesian3.cross(l,h,new g.Cartesian3);g.Cartesian3.normalize(a,a);const c=e,p=g.Cartesian3.add(o,g.Cartesian3.multiplyByScalar(a,c,new g.Cartesian3),new g.Cartesian3),d=g.Cartesian3.add(o,g.Cartesian3.multiplyByScalar(a,-c,new g.Cartesian3),new g.Cartesian3),u=g.Cartographic.fromCartesian(p),v=g.Cartographic.fromCartesian(d),C=g.Math.toDegrees(u.longitude),W=g.Math.toDegrees(u.latitude),_=g.Math.toDegrees(v.longitude),T=g.Math.toDegrees(v.latitude),A=this.entityCollectionplotting.add({name:`${i}-left-width-marker`,polyline:{positions:[g.Cartesian3.fromDegrees(r[0],r[1]),g.Cartesian3.fromDegrees(C,W)],width:3,material:new g.PolylineDashMaterialProperty({color:g.Color.RED,dashLength:12}),clampToGround:!0}}),P=this.entityCollectionplotting.add({name:`${i}-right-width-marker`,polyline:{positions:[g.Cartesian3.fromDegrees(r[0],r[1]),g.Cartesian3.fromDegrees(_,T)],width:3,material:new g.PolylineDashMaterialProperty({color:g.Color.RED,dashLength:12}),clampToGround:!0}});this.terrainVerificationResultCache.has("corridor-markers")||this.terrainVerificationResultCache.set("corridor-markers",[]),this.terrainVerificationResultCache.get("corridor-markers").push(A),this.terrainVerificationResultCache.get("corridor-markers").push(P)}addParallelIntervalMarkers(t,e,i,r){if(t.length<2||e<=0||i<=0)return;let n=i,o=1;for(;n<=e;){let f;n<=50?f=g.Color.RED.withAlpha(.7):n<=100?f=g.Color.ORANGE.withAlpha(.7):f=g.Color.GREEN.withAlpha(.7);const h=this.createOffsetLine(t,n,!0);if(h.length>0){const l=this.entityCollectionplotting.add({name:`${r}-parallel-left-${o}`,polyline:{positions:h,width:3,material:new g.PolylineDashMaterialProperty({color:f,dashLength:12}),clampToGround:!0}});this.terrainVerificationResultCache.has("corridor-markers")||this.terrainVerificationResultCache.set("corridor-markers",[]),this.terrainVerificationResultCache.get("corridor-markers").push(l)}n+=i,o++}for(n=i,o=1;n<=e;){let f;n<=50?f=g.Color.RED.withAlpha(.7):n<=100?f=g.Color.ORANGE.withAlpha(.7):f=g.Color.GREEN.withAlpha(.7);const h=this.createOffsetLine(t,n,!1);if(h.length>0){const l=this.entityCollectionplotting.add({name:`${r}-parallel-right-${o}`,polyline:{positions:h,width:3,material:new g.PolylineDashMaterialProperty({color:f,dashLength:12}),clampToGround:!0}});this.terrainVerificationResultCache.get("corridor-markers").push(l)}n+=i,o++}}createOffsetLine(t,e,i){if(t.length<2)return[];const r=ue(t),n=e/1e3;try{const o=i?-n:n,f=lf(r,o,{units:"kilometers"});if(f.geometry.type==="LineString")return f.geometry.coordinates.map(h=>g.Cartesian3.fromDegrees(h[0],h[1]))}catch(o){console.warn("Failed to create offset line:",o)}return[]}clearCorridorDistanceMarkers(){try{if(this.terrainVerificationResultCache&&this.terrainVerificationResultCache.has("corridor-markers")){const t=this.terrainVerificationResultCache.get("corridor-markers");if(t&&this.entityCollectionplotting)for(let e=t.length-1;e>=0;e--){const i=t[e];try{i&&this.entityCollectionplotting.remove(i)}catch{}}this.terrainVerificationResultCache.delete("corridor-markers")}}catch(t){console.warn("Error clearing corridor distance markers:",t)}}clearCorridorPolygon(){try{if(this.terrainVerificationResultCache){const t=this.terrainVerificationResultCache.get("corridor-polygon");if(t&&this.entityCollectionplotting)for(let e=t.length-1;e>=0;e--){const i=t[e];try{i&&this.entityCollectionplotting.remove(i)}catch{}}this.terrainVerificationResultCache.delete("corridor-polygon")}}catch(t){console.warn("Error clearing corridor polygon:",t)}}getClickDistanceRuleConfig(){return{...this.distanceRuleConfig}}clearTreeDistanceResultsExceptCorridor(){const t=[];this.entityCollectionplotting&&this.entityCollectionplotting.values.forEach(e=>{(!e.name||!e.name.startsWith("corridor-"))&&t.push(e)});for(let e=t.length-1;e>=0;e--){const i=t[e];try{this.entityCollectionplotting.remove(i)}catch{}}this.terrainVerificationCache.clear(),this.terrainVerificationResultCache.forEach((e,i)=>{i.startsWith("corridor-")||this.terrainVerificationResultCache.delete(i)})}clearTreeDistanceResults(){try{if(this.entityCollectionplotting)try{this.entityCollectionplotting.removeAll()}catch(t){console.warn("Failed to removeAll entities:",t)}}catch(t){console.warn("Error clearing tree distance results:",t)}try{this.terrainVerificationCache.clear()}catch(t){console.warn("Failed to clear terrain verification cache:",t)}try{this.terrainVerificationResultCache.clear()}catch(t){console.warn("Failed to clear terrain verification result cache:",t)}}LineChannelTerrainVerification(t,e,i,r,n,o=100,f){if(this.terrainVerificationIsRunning){console.log("地物校验已在运行中,跳过重复调用");return}this.ensurePlottingDataSourceAdded(),this.clearTreeDistanceResults(),this.terrainVerificationBatchSize=o,this.terrainVerificationBatchIndex=0,this.terrainVerificationTotalBatches=Math.ceil(t.length/o),this.terrainVerificationIsRunning=!0,console.log(`开始地物校验:共${t.length}棵树,分${this.terrainVerificationTotalBatches}批处理`),this.processTerrainVerificationBatch(t,e,i,r,n,ht.全部测量,f)}processTerrainVerificationBatch(t,e,i,r,n,o=ht.全部测量,f,h=[]){if(!this.terrainVerificationIsRunning||this.terrainVerificationBatchIndex>=this.terrainVerificationTotalBatches){this.terrainVerificationIsRunning=!1,console.log("地物校验完成"),f&&f(h);return}const l=this.terrainVerificationBatchIndex*this.terrainVerificationBatchSize,a=Math.min(l+this.terrainVerificationBatchSize,t.length);console.log(`处理第${this.terrainVerificationBatchIndex+1}/${this.terrainVerificationTotalBatches}批:${l}-${a}`);const c=[];for(let p=l;p<a;p++){const d=t[p];if(d){const u=[d.lon,d.lat,Number(d.alt||0)+Number(d.treeH||0)],v=this.performTerrainVerification(u,i,r,n,null,d.id,o);v&&c.push(v)}}h.push(...c),this.terrainVerificationBatchIndex++,setTimeout(()=>{this.processTerrainVerificationBatch(t,e,i,r,n,o,f,h)},0)}stopLineChannelTerrainVerification(){this.terrainVerificationIsRunning=!1,console.log("地物校验已停止")}enableVisibleAreaTerrainVerification(t,e,i,r,n){this.isDynamicTerrainVerificationEnabled=!0,this.setupCameraMoveListenerForTerrainVerification(t,e,i,r,n)}disableVisibleAreaTerrainVerification(){this.isDynamicTerrainVerificationEnabled=!1,this.cameraMoveHandler&&(this.cameraMoveHandler(),this.cameraMoveHandler=null)}setupCameraMoveListenerForTerrainVerification(t,e,i,r,n){this.cameraMoveHandler&&this.cameraMoveHandler(),this.cameraMoveHandler=this.viewer.camera.moveEnd.addEventListener(()=>{this.updateVisibleAreaTerrainVerification(t,e,i,r,n)})}updateVisibleAreaTerrainVerification(t,e,i,r,n){if(!this.isDynamicTerrainVerificationEnabled)return;this.getVisibleTreeIndices(e).forEach(f=>{const h=t[f];if(h){const l=[h.lon,h.lat,Number(h.alt||0)+Number(h.treeH||0)];this.performTerrainVerification(l,i,r,n)}})}getVisibleTreeIndices(t){var o;if(!this.viewer.camera||t.length===0)return[];const e=this.viewer.camera.position,i=((o=this.viewer.camera.positionCartographic)==null?void 0:o.height)||1e3;let r=Math.max(5e3,i*2);i>5e4&&(r=1e5);const n=[];for(let f=0;f<t.length;f++){const h=t[f];g.Cartesian3.distance(e,h)<=r&&n.push(f)}return n}loadTreeListen(t,e,i,r,n,o=ht.全部测量){this.cameraMoveHandler&&this.removeTreeListen();const f=(l,a)=>{const c=l.scene.pick(a);if(g.defined(c)){let p=c.id;if(p===void 0&&c.primitive&&(p=c.primitive.id),p instanceof g.Entity)return p}};this.ensurePlottingDataSourceAdded(),new g.ScreenSpaceEventHandler(this.viewer.canvas).setInputAction(l=>{const a=f(this.viewer,l.position);if(a&&a.id){const c=String(a.id);if(c.startsWith("tree-")){const p=c.substring(5),d=t.find(u=>u&&u.id&&String(u.id)===p);if(d){const u=[d.lon,d.lat,Number(d.alt||0)+Number(d.treeH||0)],v=wn(u,e,i,r),C=Oa(u,v,d.id);n&&C&&n(C),Ir(u,v,this.entityCollectionplotting,this.getClickDistanceRuleConfig(),o)}}}},g.ScreenSpaceEventType.LEFT_CLICK)}removeTreeListen(){if(this.cameraMoveHandler){try{this.cameraMoveHandler()}catch{}this.cameraMoveHandler=null}if(this.dataSourceplotting&&this.entityCollectionplotting)try{this.entityCollectionplotting.removeAll(),this.entityCollectionplotting.show=!1}catch(t){console.warn("Error clearing tree listen entities:",t)}}loadWireListen(t,e,i,r,n,o){this.wireClickHandler&&this.removeWireListen();const f=(h,l)=>{const a=h.scene.pick(l);if(g.defined(a)){let c=a.id;if(c===void 0&&a.primitive&&(c=a.primitive.id),c instanceof g.Entity)return c}};this.ensurePlottingDataSourceAdded(),this.wireClickHandler=new g.ScreenSpaceEventHandler(this.viewer.canvas),this.wireClickHandler.setInputAction(h=>{const l=f(this.viewer,h.position);if(l&&l.id){const a=String(l.id),c=l.name||"";if(a.includes("daoxian")||c.includes("导线")||c.includes("daoxian")){n&&l&&n(l);const d=this.viewer.scene.pickPosition(h.position);if(g.defined(d)){let u=null;if(l&&l.polyline&&l.polyline.positions){const v=l.polyline.positions.getValue(this.viewer.clock.currentTime);v&&Array.isArray(v)&&(u=v.map(C=>{const W=g.Cartographic.fromCartesian(C);return[g.Math.toDegrees(W.longitude),g.Math.toDegrees(W.latitude),W.height]}))}if((!u||u.length===0)&&(c.match(/(\d+)-(\d+)$/)&&(c.includes("A")||c.includes("_A")?u=e:c.includes("B")||c.includes("_B")?u=i:(c.includes("C")||c.includes("_C"))&&(u=r)),(!u||u.length===0)&&(u=[...e,...i,...r])),u&&u.length>1){const v=(o==null?void 0:o.measurementType)||ht.全部测量,C=[ht.对地距离,ht.净空距离,ht.安全距离].includes(v),W=C||v===ht.全部测量,_=!C||v===ht.全部测量,T=W?1:10,A=this.interpolateWire(u,T);if(W&&this.calculateAndDrawWireToGroundDistanceByType(A).catch(P=>{console.error("Error in wire to ground distance calculation:",P)}),_){const P=(o==null?void 0:o.width)||10,b=(o==null?void 0:o.show)!==!1,D=t.filter(R=>{const B=[R.lon,R.lat,Number(R.alt||0)+Number(R.treeH||0)];return this.isPointInWireCorridor(B,A,P)});b&&this.drawWireCorridor(A,P),this.terrainVerificationCache.clear(),D.forEach(R=>{const B=[R.lon,R.lat,Number(R.alt||0)+Number(R.treeH||0)];this.calcResultSingleWire(B,A,v,this.getClickDistanceRuleConfig())})}}}}}},g.ScreenSpaceEventType.LEFT_CLICK)}removeWireListen(){this.wireClickHandler&&(this.wireClickHandler.destroy(),this.wireClickHandler=null),this.clearWireCorridors()}async calculateAndDrawWireToGroundDistanceByType(t){if(!(!t||t.length===0))try{const e=t.map(o=>new g.Cartographic(g.Math.toRadians(o[0]),g.Math.toRadians(o[1]))),i=this.viewer.terrainProvider;let r=[];if(i&&g.defined(i))try{r=(await g.sampleTerrainMostDetailed(i,e)).map(f=>f.height||0)}catch(o){console.warn("Terrain sampling failed, using default ground height:",o),r=new Array(t.length).fill(0)}else r=new Array(t.length).fill(0);let n=1/0;for(let o=0;o<t.length;o++){const f=t[o][2],h=r[o],l=f-h;l>0&&l<n&&(n=l)}if(n===1/0){n=1/0;for(let o=0;o<t.length;o++){const f=t[o][2],h=r[o],l=Math.abs(f-h);l<n&&(n=l)}}}catch(e){console.warn("Failed to calculate wire to ground distance:",e)}}async calculateAndDrawWireToGroundDistanceBySegments(t,e,i){console.log("Calculating wire to ground distance by segments..."),console.log("A相导线数据点数:",(t==null?void 0:t.length)||0),console.log("B相导线数据点数:",(e==null?void 0:e.length)||0),console.log("C相导线数据点数:",(i==null?void 0:i.length)||0);const r=[];if(t&&t.length>=2&&r.push({name:"A",data:t}),e&&e.length>=2&&r.push({name:"B",data:e}),i&&i.length>=2&&r.push({name:"C",data:i}),console.log("有效相数:",r.length),r.length===0){console.warn("No valid wire data found for ground distance calculation");return}for(const n of r){const o=n.data;console.log(`处理${n.name}相导线,数据点数:`,o.length);const f=this.interpolateWire(o,1);console.log(`${n.name}相插值后点数:`,f.length);try{const h=f.map(d=>new g.Cartographic(g.Math.toRadians(d[0]),g.Math.toRadians(d[1]))),l=this.viewer.terrainProvider;let a=[];if(l&&g.defined(l))try{a=(await g.sampleTerrainMostDetailed(l,h)).map(u=>u.height||0)}catch(d){console.warn(`Terrain sampling failed for phase ${n.name}, using default ground height:`,d),a=new Array(f.length).fill(0)}else a=new Array(f.length).fill(0);let c=1/0,p=0;for(let d=0;d<f.length;d++){const u=f[d][2],v=a[d],C=u-v;C>0&&C<c&&(c=C,p=d)}if(c===1/0)for(let d=0;d<f.length;d++){const u=f[d][2],v=a[d],C=Math.abs(u-v);C<c&&(c=C,p=d)}console.log(`${n.name}相最低净空距离:`,c,"在索引:",p)}catch(h){console.warn(`Failed to calculate wire to ground distance for phase ${n.name}:`,h)}}console.log("Wire to ground distance calculation by segments completed.")}clearWireCorridors(){if(!this.entityCollectionplotting)return;const t=[];this.entityCollectionplotting.values.forEach(e=>{e.name==="wire-corridor"&&t.push(e)}),t.forEach(e=>{try{this.entityCollectionplotting.remove(e)}catch{}})}interpolateWire(t,e=1){if(t.length<2)return t;const i=[];for(let r=0;r<t.length-1;r++){const n=t[r],o=t[r+1],f=g.Cartesian3.fromDegrees(n[0],n[1],n[2]),h=g.Cartesian3.fromDegrees(o[0],o[1],o[2]),l=g.Cartesian3.distance(f,h);if(l<=e){r===0&&i.push(n),i.push(o);continue}const a=Math.ceil(l/e),c=1/a;r===0&&i.push(n);for(let p=1;p<a;p++){const d=p*c,u=g.Cartesian3.lerp(f,h,d,new g.Cartesian3),v=g.Cartographic.fromCartesian(u),C=g.Math.toDegrees(v.longitude),W=g.Math.toDegrees(v.latitude),_=v.height;i.push([C,W,_])}i.push(o)}return i}isPointInWireCorridor(t,e,i){if(e.length<2)return!1;const r=g.Cartesian3.fromDegrees(t[0],t[1],t[2]);let n=1/0;for(let o=0;o<e.length-1;o++){const f=e[o],h=e[o+1],l=g.Cartesian3.fromDegrees(f[0],f[1],f[2]),a=g.Cartesian3.fromDegrees(h[0],h[1],h[2]),c=this.calculatePointToSegmentDistance(r,l,a);c<n&&(n=c)}return n<=i/2}calculatePointToSegmentDistance(t,e,i){const r=g.Cartesian3.subtract(i,e,new g.Cartesian3),n=g.Cartesian3.subtract(t,e,new g.Cartesian3),o=g.Cartesian3.magnitudeSquared(r);if(o===0)return g.Cartesian3.distance(t,e);const f=g.Cartesian3.dot(n,r)/o;let h;return f<0?h=e:f>1?h=i:h=g.Cartesian3.add(e,g.Cartesian3.multiplyByScalar(r,f,new g.Cartesian3),new g.Cartesian3),g.Cartesian3.distance(t,h)}drawWireCorridor(t,e){if(!(t.length<2))for(let i=0;i<t.length;i++){const r=t[i],n=g.Cartesian3.fromDegrees(r[0],r[1],r[2]);let o,f;if(i===0){const u=t[i+1];f=g.Cartesian3.fromDegrees(u[0],u[1],u[2]),o=n}else if(i===t.length-1){const u=t[i-1];o=g.Cartesian3.fromDegrees(u[0],u[1],u[2]),f=n}else{const u=t[i-1],v=t[i+1];o=g.Cartesian3.fromDegrees(u[0],u[1],u[2]),f=g.Cartesian3.fromDegrees(v[0],v[1],v[2])}const h=g.Cartesian3.subtract(f,o,new g.Cartesian3);g.Cartesian3.normalize(h,h);const l=g.Cartesian3.clone(n);g.Cartesian3.normalize(l,l);const a=g.Cartesian3.cross(h,l,new g.Cartesian3);g.Cartesian3.normalize(a,a);const c=e/2,p=g.Cartesian3.multiplyByScalar(a,c,new g.Cartesian3),d=g.Cartesian3.multiplyByScalar(a,-c,new g.Cartesian3);g.Cartesian3.add(n,p,new g.Cartesian3),g.Cartesian3.add(n,d,new g.Cartesian3)}}calcResult(t,e,i,r,n=this.distanceRuleConfig){if(this.entityCollectionplotting.values.length>=this.maxVisibleResults)return;const o=`${t[0].toFixed(6)}_${t[1].toFixed(6)}_${t[2].toFixed(2)}`;if(this.terrainVerificationCache.has(o)){const f=this.terrainVerificationCache.get(o);Ir(t,f,this.entityCollectionplotting,n,ht.全部测量);return}else{const f=wn(t,e,i,r);this.terrainVerificationCache.set(o,f),Ir(t,f,this.entityCollectionplotting,n||this.distanceRuleConfig,ht.全部测量)}}calcResultSingleWire(t,e,i,r=this.distanceRuleConfig){if(this.entityCollectionplotting.values.length>=this.maxVisibleResults)return;const n=`${t[0].toFixed(6)}_${t[1].toFixed(6)}_${t[2].toFixed(2)}`;if(this.terrainVerificationCache.has(n)){const o=this.terrainVerificationCache.get(n);Ir(t,o,this.entityCollectionplotting,r,i);return}else{const o=e;this.terrainVerificationCache.set(n,o),Ir(t,o,this.entityCollectionplotting,r||this.distanceRuleConfig,i)}}LineChannelTerrainVerificationForFilteredTrees(t,e,i,r,n,o=100,f=ht.全部测量,h){if(console.log(`LineChannelTerrainVerificationForFilteredTrees called with ${t.length} trees`),this.terrainVerificationIsRunning){console.log("地物校验已在运行中,跳过重复调用");return}this.ensurePlottingDataSourceAdded(),this.clearTreeDistanceResultsExceptCorridor(),this.terrainVerificationBatchSize=o,this.terrainVerificationBatchIndex=0,this.terrainVerificationTotalBatches=Math.ceil(t.length/o),this.terrainVerificationIsRunning=!0,console.log(`开始对${t.length}棵树进行地物校验`),this.processTerrainVerificationBatch(t,e,i,r,n,f,h)}getChannelCalculationDataSources(){return[this.dataSourceplotting]}}class vu{constructor(t,e,i){I(this,"viewer");I(this,"LineInfo");I(this,"lineConstruction");I(this,"terrainConstruction");I(this,"channelCalculation");I(this,"selectedWireEntity",null);I(this,"originalWireColor",null);I(this,"wireCorridorWidth",10);I(this,"showWireCorridor",!0);I(this,"wireMeasurementType",ht.全部测量);I(this,"isDynamicLoadingEnabled",!0);this.viewer=t,this.LineInfo=e,this.lineConstruction=new yu(t,e,i),this.terrainConstruction=new lo(t,e,i),this.channelCalculation=new mu(t,e),this.enableWireMeasurement=this.enableWireMeasurement.bind(this),this.removeWireListen=this.removeWireListen.bind(this)}setAutoCalculateRollX(t){this.lineConstruction.setAutoCalculateRollX(t)}getAutoCalculateRollX(){return this.lineConstruction.getAutoCalculateRollX()}setDynamicLoadingEnabled(t){this.isDynamicLoadingEnabled=t,this.lineConstruction.setDynamicLoadingEnabled(t),this.terrainConstruction.setDynamicLoadingEnabled(t)}getDynamicLoadingEnabled(){return this.isDynamicLoadingEnabled}initializeLineData(){this.lineConstruction.initializeLineData()}loadLineTower(){debugger;this.lineConstruction.loadLineTower()}loadLineModel(){this.lineConstruction.getLineDataSources().forEach(e=>{this.viewer.dataSources.contains(e)||this.viewer.dataSources.add(e)})}loadTree(){this.terrainConstruction.loadTree()}loadtreeModel(){this.terrainConstruction.getTerrainDataSources().forEach(t=>{this.viewer.dataSources.contains(t)||this.viewer.dataSources.add(t)})}addTreeData(t){this.terrainConstruction.addTreeData(t)}flyToTower(t){this.lineConstruction.flyToTower(t)}flyToTree(t){this.terrainConstruction.flyToTree(t)}loadTreeListen(t,e=ht.全部测量){const i=this.terrainConstruction.getLineInfo().Trees,r=this.lineConstruction.getWireDataForChannelCalculation();this.channelCalculation.loadTreeListen(i,r.arcLine1A1,r.arcLine1B1,r.arcLine1C1,t,e)}removeTreeListen(){this.channelCalculation.removeTreeListen()}loadWireListen(){const t=this.terrainConstruction.getLineInfo().Trees,e=this.lineConstruction.getWireDataForChannelCalculation();this.channelCalculation.loadWireListen(t,e.arcLine1A1,e.arcLine1B1,e.arcLine1C1)}removeWireListen(){if(this.channelCalculation.removeWireListen(),this.selectedWireEntity&&this.originalWireColor){try{this.selectedWireEntity.polyline&&(this.selectedWireEntity.polyline.material=g.Color.fromCssColorString(this.originalWireColor))}catch(t){console.warn("Error restoring wire color:",t)}this.selectedWireEntity=null,this.originalWireColor=null}}clearWireMeasurementResults(){this.channelCalculation.clearTreeDistanceResults()}enableWireMeasurement(){const t=this.terrainConstruction.getLineInfo().Trees,e=this.lineConstruction.getWireDataForChannelCalculation(),i=n=>{if(this.selectedWireEntity&&this.originalWireColor&&this.selectedWireEntity.polyline&&(this.selectedWireEntity.polyline.material=g.Color.fromCssColorString(this.originalWireColor)),n.polyline&&n.polyline.material){const o=n.polyline.material;o instanceof g.Color?this.originalWireColor=o.toCssColorString():this.originalWireColor="#ffffff",n.polyline.material=g.Color.YELLOW,this.selectedWireEntity=n}},r={width:this.wireCorridorWidth,show:this.showWireCorridor,measurementType:this.wireMeasurementType};this.channelCalculation.loadWireListen(t,e.arcLine1A1,e.arcLine1B1,e.arcLine1C1,i,r)}setWireCorridorWidth(t){this.wireCorridorWidth=t}setShowWireCorridor(t){this.showWireCorridor=t}setWireMeasurementType(t){this.wireMeasurementType=t}async LineChannelTerrainVerification(t,e=100){const i=this.terrainConstruction.getLineInfo().Trees,r=this.terrainConstruction.getOffsetTrees(),n=this.lineConstruction.getAllWireSegments();let o=[],f=[],h=[];if(n.wireSegments1A1.length>0)n.wireSegments1A1.forEach(l=>{l&&l.length>0&&o.push(...l)}),n.wireSegments1B1.forEach(l=>{l&&l.length>0&&f.push(...l)}),n.wireSegments1C1.forEach(l=>{l&&l.length>0&&h.push(...l)}),console.log(`使用按塔段存储的导线数据: A相=${o.length}点, B相=${f.length}点, C相=${h.length}点`),await this.calculateClearanceBySegments(n);else{const l=this.lineConstruction.getWireDataForChannelCalculation();o=l.arcLine1A1,f=l.arcLine1B1,h=l.arcLine1C1,console.log(`使用整体导线数据: A相=${o.length}点, B相=${f.length}点, C相=${h.length}点`)}this.channelCalculation.LineChannelTerrainVerification(i,r,o,f,h,e,t)}async calculateClearanceBySegments(t){var r,n,o;console.log("========== 开始按塔段计算净空距离 ==========");const e=Math.max(t.wireSegments1A1.length,t.wireSegments1B1.length,t.wireSegments1C1.length);console.log(`塔段总数: ${e}`),console.log(`A相塔段数: ${t.wireSegments1A1.length}`),console.log(`B相塔段数: ${t.wireSegments1B1.length}`),console.log(`C相塔段数: ${t.wireSegments1C1.length}`);const i=[];if(t.wireSegments1A1.length>0&&((r=t.wireSegments1A1[0])==null?void 0:r.length)>0?(i.push({key:"A",data:t.wireSegments1A1}),console.log("A相数据有效,加入计算")):console.log("A相数据无效或为空"),t.wireSegments1B1.length>0&&((n=t.wireSegments1B1[0])==null?void 0:n.length)>0?(i.push({key:"B",data:t.wireSegments1B1}),console.log("B相数据有效,加入计算")):console.log("B相数据无效或为空"),t.wireSegments1C1.length>0&&((o=t.wireSegments1C1[0])==null?void 0:o.length)>0?(i.push({key:"C",data:t.wireSegments1C1}),console.log("C相数据有效,加入计算")):console.log("C相数据无效或为空"),console.log(`有效相数: ${i.length} (${i.map(f=>f.key).join(", ")})`),i.length===0){console.log("没有有效相数据,跳过净空距离计算");return}for(let f=0;f<e;f++){console.log(`
5
+ --- 处理塔段 ${f} ---`);for(const h of i){const l=h.data[f];if(!l){console.log(`${h.key}相 塔段${f} 数据为空,跳过`);continue}if(l.length<2){console.log(`${h.key}相 塔段${f} 点数不足(${l.length}点),跳过`);continue}console.log(`${h.key}相 塔段${f}: ${l.length}个点,开始计算净空距离`);try{await this.channelCalculation.calculateAndDrawWireToGroundDistanceByType(l),console.log(`${h.key}相 塔段${f} 净空距离计算完成`)}catch(a){console.error(`${h.key}相 塔段${f} 净空距离计算失败:`,a)}}}console.log(`
6
+ ========== 按塔段净空距离计算完成 ==========`)}LineChannelTerrainVerificationByTowerRange(t,e,i,r=100,n=2e3,o=!1,f=!0,h=ht.全部测量,l=1,a="ABC"){const c=this.LineInfo.towers;let p=-1,d=-1;for(let O=0;O<c.length;O++)(c[O].id==t||c[O].name==t)&&(p=O),(c[O].id==e||c[O].name==e)&&(d=O);if(p===-1||d===-1){console.warn("未找到指定的杆塔范围,使用全部线路进行校验"),this.LineChannelTerrainVerification(i,r);return}p>d&&([p,d]=[d,p]);const u=this.lineConstruction.getAllWireSegments();console.log(`获取到的导线数据: A相${u.wireSegments1A1.length}段, B相${u.wireSegments1B1.length}段, C相${u.wireSegments1C1.length}段`),console.log(`杆塔索引范围: ${p} - ${d}`),console.log(`A相导线数据索引检查: 索引${p}存在=${!!u.wireSegments1A1[p]}, 索引${d-1}存在=${!!u.wireSegments1A1[d-1]}`);const v=[],C=[],W=[];for(let O=p;O<d;O++)console.log(`检查塔段索引${O}: A相存在=${!!u.wireSegments1A1[O]}, B相存在=${!!u.wireSegments1B1[O]}, C相存在=${!!u.wireSegments1C1[O]}`),u.wireSegments1A1[O]&&v.push(u.wireSegments1A1[O]),u.wireSegments1B1[O]&&C.push(u.wireSegments1B1[O]),u.wireSegments1C1[O]&&W.push(u.wireSegments1C1[O]);console.log(`塔段范围 ${p}-${d}: A相${v.length}段, B相${C.length}段, C相${W.length}段`);const _=[],T=[],A=[];for(let O=0;O<v.length;O++)_.push(...v[O]);for(let O=0;O<C.length;O++)T.push(...C[O]);for(let O=0;O<W.length;O++)A.push(...W[O]);a==="A"?(T=[],A=[]):a==="B"?(_=[],A=[]):a==="C"?(_=[],T=[]):a==="AB"?A=[]:a==="AC"?T=[]:a==="BC"&&(_=[]),console.log(`导线数据状态(回路${l},相序${a}): A相=${_.length}, B相=${T.length}, C相=${A.length}`);const P=this.terrainConstruction.getLineInfo().Trees,b=this.terrainConstruction.getOffsetTrees();console.log(`总树木数量: ${P.length}`);const D=c.slice(p,d+1),R=gu(P,D,n);console.log(`通道内树木数量: ${R.length}`);const B=[],X=new Map;if(P.forEach((O,q)=>{X.set(O,q)}),R.forEach(O=>{const q=X.get(O);q!==void 0&&B.push(b[q])}),o){const O=du(D,n);if(O.length>0){this.channelCalculation.drawCorridorPolygon(O,`corridor-${t}-${e}`);const q=D.map(H=>[H.Longitude,H.Latitude]);this.channelCalculation.drawCorridorDistanceMarkers(q,n,`corridor-${t}-${e}`,f)}}else this.channelCalculation.clearCorridorPolygon(),this.channelCalculation.clearCorridorDistanceMarkers();if(R.length===0){console.warn("指定杆塔范围的通道内没有找到树木"),i&&i([]);return}if(_.length===0&&T.length===0&&A.length===0){console.error("过滤后的导线数据为空,无法进行测量"),i&&i([]);return}console.log(`开始对${R.length}棵树进行测量...`),this.channelCalculation.LineChannelTerrainVerificationForFilteredTrees(R,B,_,T,A,r,h,O=>{if(h===ht.全部测量||h===ht.净空距离||h===ht.对地距离||h===ht.安全距离)for(let H=0;H<v.length;H++){const F=p+H,Y=F+1,J=v[H]||[],it=C[H]||[],ft=W[H]||[];let rt=[...J],Qe=[...it],de=[...ft];a==="A"?(Qe=[],de=[]):a==="B"?(rt=[],de=[]):a==="C"?(rt=[],Qe=[]):a==="AB"?de=[]:a==="AC"?Qe=[]:a==="BC"&&(rt=[]),console.log(`计算塔段 ${F}-${Y} 的净空距离: A相=${rt.length}, B相=${Qe.length}, C相=${de.length}`),this.channelCalculation.calculateAndDrawWireToGroundDistanceBySegments(rt,Qe,de).catch(Di=>{console.error(`Error calculating wire to ground distance for segment ${F}-${Y}:`,Di)})}i&&i(O)})}stopLineChannelTerrainVerification(){this.channelCalculation.stopLineChannelTerrainVerification()}enableVisibleAreaTerrainVerification(){const t=this.terrainConstruction.getLineInfo().Trees,e=this.terrainConstruction.getOffsetTrees(),i=this.lineConstruction.getWireDataForChannelCalculation();this.channelCalculation.enableVisibleAreaTerrainVerification(t,e,i.arcLine1A1,i.arcLine1B1,i.arcLine1C1)}disableVisibleAreaTerrainVerification(){this.channelCalculation.disableVisibleAreaTerrainVerification()}setMaxVisibleTerrainResults(t=200){this.channelCalculation.setMaxVisibleTerrainResults(t)}setDistanceRuleConfig(t){this.channelCalculation.setDistanceRuleConfig(t)}getDistanceRuleConfig(){return this.channelCalculation.getDistanceRuleConfig()}clearTreeDistanceResults(){this.channelCalculation.clearTreeDistanceResults()}clearCorridorDisplay(){try{this.channelCalculation.clearCorridorPolygon(),this.channelCalculation.clearCorridorDistanceMarkers()}catch(t){console.warn("Error clearing corridor display:",t)}}getLineInfo(){return this.LineInfo}getViewer(){return this.viewer}}class _u{constructor(){I(this,"id","");I(this,"name","");I(this,"towerFZinfo","");I(this,"towerDisFile","");I(this,"stressFileContent","");I(this,"streesistrue",0);I(this,"TowerMemberColor","#FFFFFF");I(this,"TowerMembersWidth",2);I(this,"Longitude",0);I(this,"Latitude",0);I(this,"Altitude",0);I(this,"RollX",0);I(this,"RollY",90);I(this,"RollZ",0)}}function Cu(s){debugger;const t=s.split(`
7
+ `),e=[],i=[],r=/^\s*(\d+)\s+([\d.-]+)\s+([\d.-]+)\s+([\d.-]+)\s+(-?\d+)/,n=/^\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:#|$)/;for(const o of t){const f=o.trim();if(!f)continue;const h=f.match(r);if(h){e.push({id:parseInt(h[1]),x:parseFloat(h[2]),y:parseFloat(h[3]),z:parseFloat(h[4]),flag:parseInt(h[5])});continue}const l=f.match(n);l&&i.push({from:parseInt(l[1]),to:parseInt(l[2]),type:parseInt(l[3])})}return{TowerNodes:e,connections:i}}function Wu(s){const t=s.split(`
8
+ `),e=[];for(const i of t){if(!i.trim())continue;const r=i.trim().split(/\s+/).filter(f=>f!==""),n=parseInt(r[0]);if(isNaN(n))continue;const o=[];for(let f=1;f<r.length;f+=3){const h=parseFloat(r[f]),l=parseFloat(r[f+1]),a=parseFloat(r[f+2]);if(!isNaN(h)&&!isNaN(l)&&!isNaN(a)){const c=Math.floor((f-1)/3)+1;o.push({timeStep:c,x:h,y:l,z:a})}}e.push({nodeId:n,displacements:o})}return e}function ka(s){const t={};return s.forEach(e=>{e.displacements.forEach(i=>{t[i.timeStep]||(t[i.timeStep]=[]),t[i.timeStep].push({nodeId:e.nodeId,...i})})}),t}function Tu(s){const t=s.split(`
9
+ `),e=[];for(const r of t){if(!r.trim())continue;const n=r.match(/^\s*(\d+-\s*\d+)\s+((?:\d+\.\d+\s*)+)/);if(n){const o=n[1].replace(/\s+/g,""),f=n[2].trim().split(/\s+/).map(Number);e.push({elementId:o,stressRatios:f})}}const i=[];if(e.length>0){const r=e[0].stressRatios.length;for(let n=0;n<r;n++){const o={timeIndex:n,elements:[]};for(const f of e){let h;const l=f.stressRatios[n];l>1?h=St.Color.RED:l>.95&&l<=1?h=St.Color.PINK:l>.85&&l<=.95?h=St.Color.YELLOW:l>.7&&l<=.85?h=St.Color.GREEN:h=St.Color.BLUE,o.elements.push({elementId:f.elementId,stressRatio:l,ylbColor:h})}i.push(o)}}return{byElement:e,byTime:i}}class Va{constructor(t){I(this,"viewer");I(this,"lines",[]);this.viewer=t}addLine(t,e){const i=Ya(this.viewer,t,e);return this.lines.push(i),i}removeAll(){this.lines.forEach(t=>this.viewer.entities.remove(t)),this.lines=[]}}var Ga={exports:{}};(function(s,t){(function(e,i){i()})(vs,function(){function e(l,a){return typeof a>"u"?a={autoBom:!1}:typeof a!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function i(l,a,c){var p=new XMLHttpRequest;p.open("GET",l),p.responseType="blob",p.onload=function(){h(p.response,a,c)},p.onerror=function(){console.error("could not download file")},p.send()}function r(l){var a=new XMLHttpRequest;a.open("HEAD",l,!1);try{a.send()}catch{}return 200<=a.status&&299>=a.status}function n(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(a)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof vs=="object"&&vs.global===vs?vs:void 0,f=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!f?function(l,a,c){var p=o.URL||o.webkitURL,d=document.createElement("a");a=a||l.name||"download",d.download=a,d.rel="noopener",typeof l=="string"?(d.href=l,d.origin===location.origin?n(d):r(d.href)?i(l,a,c):n(d,d.target="_blank")):(d.href=p.createObjectURL(l),setTimeout(function(){p.revokeObjectURL(d.href)},4e4),setTimeout(function(){n(d)},0))}:"msSaveOrOpenBlob"in navigator?function(l,a,c){if(a=a||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(e(l,c),a);else if(r(l))i(l,a,c);else{var p=document.createElement("a");p.href=l,p.target="_blank",setTimeout(function(){n(p)})}}:function(l,a,c,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof l=="string")return i(l,a,c);var d=l.type==="application/octet-stream",u=/constructor/i.test(o.HTMLElement)||o.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||d&&u||f)&&typeof FileReader<"u"){var C=new FileReader;C.onloadend=function(){var T=C.result;T=v?T:T.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=T:location=T,p=null},C.readAsDataURL(l)}else{var W=o.URL||o.webkitURL,_=W.createObjectURL(l);p?p.location=_:location.href=_,p=null,setTimeout(function(){W.revokeObjectURL(_)},4e4)}});o.saveAs=h.saveAs=h,s.exports=h})})(Ga);var co=Ga.exports;const Xa=require("shp-write");class Iu{constructor(t,e,i){I(this,"towerNodes",[]);I(this,"connections",[]);I(this,"towerFZS");this.towerNodes=t,this.connections=e,this.towerFZS=i}async exportTowerToSHP(){try{const t=await this.generatePointFeatures(),e=await this.generateLineFeatures();await this.generateSHPFiles(t,e),console.log("SHP文件导出成功")}catch(t){console.error("导出SHP文件失败:",t)}}async generatePointFeatures(){const t=[],e=new g.HeadingPitchRoll(g.Math.toRadians(this.towerFZS.RollX),this.towerFZS.RollY,this.towerFZS.RollZ),i=g.Cartesian3.fromDegrees(this.towerFZS.Longitude,this.towerFZS.Latitude,this.towerFZS.Altitude);for(const r of this.towerNodes){const n=new g.Cartesian3(r.x,r.y,r.z),o=this.getPositionByHprAndOffset(i,n,e),f=g.Ellipsoid.WGS84.cartesianToCartographic(o),h=g.Math.toDegrees(f.longitude),l=g.Math.toDegrees(f.latitude),a=f.height,c={type:"Feature",geometry:{type:"Point",coordinates:[h,l]},properties:{id:r.id,node_id:r.id,x:r.x,y:r.y,z:r.z,longitude:h,latitude:l,height:a,elevation:a,type:"tower_node"}};t.push(c)}return t}async generateLineFeatures(){const t=[],e=new g.HeadingPitchRoll(g.Math.toRadians(this.towerFZS.RollX),this.towerFZS.RollY,this.towerFZS.RollZ),i=g.Cartesian3.fromDegrees(this.towerFZS.Longitude,this.towerFZS.Latitude,this.towerFZS.Altitude);for(const r of this.connections){const n=this.towerNodes.find(A=>A.id===r.from),o=this.towerNodes.find(A=>A.id===r.to);if(!n||!o)continue;const f=new g.Cartesian3(n.x,n.y,n.z),h=new g.Cartesian3(o.x,o.y,o.z),l=this.getPositionByHprAndOffset(i,f,e),a=this.getPositionByHprAndOffset(i,h,e),c=g.Ellipsoid.WGS84.cartesianToCartographic(l),p=g.Ellipsoid.WGS84.cartesianToCartographic(a),d=g.Math.toDegrees(c.longitude),u=g.Math.toDegrees(c.latitude),v=c.height,C=g.Math.toDegrees(p.longitude),W=g.Math.toDegrees(p.latitude),_=p.height,T={type:"Feature",geometry:{type:"LineString",coordinates:[[d,u],[C,W]]},properties:{id:`${r.from}-${r.to}`,from_node:r.from,to_node:r.to,from_height:v,to_height:_,avg_height:(v+_)/2,length:this.calculateDistance(l,a),type:"tower_member",width:this.towerFZS.TowerMembersWidth,from_longitude:d,from_latitude:u,to_longitude:C,to_latitude:W}};t.push(T)}return t}async generateSHPFiles(t,e){try{if(t.length>0){const i={type:"FeatureCollection",features:t},r=Xa.point(i);this.downloadSHPFiles(r,"tower_nodes")}if(e.length>0){const i={type:"FeatureCollection",features:e},r=Xa.line(i);this.downloadSHPFiles(r,"tower_members")}}catch(i){console.error("生成SHP文件时出错:",i),await this.alternativeExport(t,e)}}downloadSHPFiles(t,e){const i=new Blob([t],{type:"application/zip"});co.saveAs(i,`${e}.zip`)}async alternativeExport(t,e){if(console.log("使用备用方案导出为GeoJSON格式"),t.length>0){const i={type:"FeatureCollection",features:t};this.downloadJSON(i,"tower_nodes.geojson")}if(e.length>0){const i={type:"FeatureCollection",features:e};this.downloadJSON(i,"tower_members.geojson")}}downloadJSON(t,e){const i=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});co.saveAs(i,e)}calculateDistance(t,e){return g.Cartesian3.distance(t,e)}getPositionByHprAndOffset(t,e,i){const r=g.Transforms.headingPitchRollToFixedFrame(t,i);return g.Matrix4.multiplyByPoint(r,e,new g.Cartesian3)}}class Lu{static async exportToCSV(t,e,i){const r=this.exportNodesToCSV(t,i);this.downloadCSV(r,"tower_nodes.csv");const n=this.exportConnectionsToCSV(e,t,i);this.downloadCSV(n,"tower_connections.csv")}static exportNodesToCSV(t,e){let i=`ID,X,Y,Z,Longitude,Latitude,Height
10
+ `;const r=new g.HeadingPitchRoll(g.Math.toRadians(e.RollX),e.RollY,e.RollZ),n=g.Cartesian3.fromDegrees(e.Longitude,e.Latitude,e.Altitude);return t.forEach(o=>{const f=new g.Cartesian3(o.x,o.y,o.z),h=this.getPositionByHprAndOffset(n,f,r),l=g.Ellipsoid.WGS84.cartesianToCartographic(h),a=g.Math.toDegrees(l.longitude),c=g.Math.toDegrees(l.latitude),p=l.height;i+=`${o.id},${o.x},${o.y},${o.z},${a},${c},${p}
11
+ `}),i}static exportConnectionsToCSV(t,e,i){let r=`FromNode,ToNode,FromX,FromY,FromZ,ToX,ToY,ToZ,Length
12
+ `;const n=new g.HeadingPitchRoll(g.Math.toRadians(i.RollX),i.RollY,i.RollZ),o=g.Cartesian3.fromDegrees(i.Longitude,i.Latitude,i.Altitude);return t.forEach(f=>{const h=e.find(v=>v.id===f.from),l=e.find(v=>v.id===f.to);if(!h||!l)return;const a=new g.Cartesian3(h.x,h.y,h.z),c=new g.Cartesian3(l.x,l.y,l.z),p=this.getPositionByHprAndOffset(o,a,n),d=this.getPositionByHprAndOffset(o,c,n),u=g.Cartesian3.distance(p,d);r+=`${f.from},${f.to},${h.x},${h.y},${h.z},${l.x},${l.y},${l.z},${u}
13
+ `}),r}static downloadCSV(t,e){const i=new Blob([t],{type:"text/csv;charset=utf-8;"});co.saveAs(i,e)}static getPositionByHprAndOffset(t,e,i){const r=g.Transforms.headingPitchRollToFixedFrame(t,i);return g.Matrix4.multiplyByPoint(r,e,new g.Cartesian3)}}class Au{constructor(t,e,i){I(this,"viewer");I(this,"TowerFZS");I(this,"Keym","");I(this,"dataSource2");I(this,"entityCollection2");I(this,"pointEntities",[]);I(this,"TowerLineManager");I(this,"TowerNodes",[]);I(this,"connections",[]);I(this,"displacementData",[]);I(this,"byTimes",[]);I(this,"_animationInterval",null);this.Keym=i,this.viewer=t,this.TowerFZS=e,this.dataSource2=new g.CustomDataSource(this.TowerFZS.id),this.entityCollection2=this.dataSource2.entities,this.TowerLineManager=new Va(this.viewer)}initSHPExporter(){}loadfile(){if(this.Keym!="OW_JPS_EEngin_001")return;const{TowerNodes:t,connections:e}=Cu(this.TowerFZS.towerFZinfo);this.TowerNodes=t,this.connections=e,this.displacementData=Wu(this.TowerFZS.towerDisFile);const{byTime:i}=Tu(this.TowerFZS.stressFileContent);this.byTimes=i;debugger}loadFZTower(){if(this.Keym!="OW_JPS_EEngin_001")return;let t=new g.HeadingPitchRoll(g.Math.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const e=g.Cartesian3.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(i=>{const r=this.TowerNodes.find(c=>c.id===i.from),n=this.TowerNodes.find(c=>c.id===i.to),o=[],f=new g.Cartesian3(r==null?void 0:r.x,r==null?void 0:r.y,r==null?void 0:r.z);o.push(N(e,f,t));const h=zs(this.viewer,o[0],(r==null?void 0:r.id)+"",{pointColor:g.Color.RED,labelColor:g.Color.GOLD,fontSize:18,pixelOffset:[0,-30]});this.pointEntities.push(h);const l=new g.Cartesian3(n==null?void 0:n.x,n==null?void 0:n.y,n==null?void 0:n.z);o.push(N(e,l,t));const a=zs(this.viewer,o[1],(r==null?void 0:r.id)+"",{pointColor:g.Color.RED,labelColor:g.Color.GOLD,fontSize:18,pixelOffset:[0,-30]});this.pointEntities.push(a),this.TowerLineManager.addLine(o)}),this.initSHPExporter()}async exportToSHP(){await new Iu(this.TowerNodes,this.connections,this.TowerFZS).exportTowerToSHP()}async exportToCSV(){await Lu.exportToCSV(this.TowerNodes,this.connections,this.TowerFZS)}loadFZDISTower(t){if(this.Keym!=="OW_JPS_EEngin_001")return;const i=ka(this.displacementData)[t],r=this.byTimes.find(f=>f.timeIndex===t);debugger;if(!i){console.warn(`未找到时间步 ${t} 的位移数据`);return}const n=new g.HeadingPitchRoll(g.Math.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ),o=g.Cartesian3.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(f=>{const h=this.TowerNodes.find(P=>P.id===f.from),l=this.TowerNodes.find(P=>P.id===f.to);if(!h||!l){console.warn(`找不到连接 ${f.from}->${f.to} 的节点`);return}debugger;const a=i.find(P=>P.nodeId===f.from),c=i.find(P=>P.nodeId===f.to);if(!a||!c){console.warn(`找不到连接 ${f.from}->${f.to} 的位移数据`);return}const p=new g.Cartesian3(h.x-a.x,h.y-a.y,h.z-a.z),d=new g.Cartesian3(l.x-c.x,l.y-c.y,l.z-c.z),u=N(o,p,n),v=zs(this.viewer,u,f.from+"",{pointColor:g.Color.RED,labelColor:g.Color.GOLD,fontSize:18,pixelOffset:[0,-30]});this.pointEntities.push(v);const C=N(o,d,n),W=zs(this.viewer,C,f.to+"",{pointColor:g.Color.RED,labelColor:g.Color.GOLD,fontSize:18,pixelOffset:[0,-30]});this.pointEntities.push(W);const _=[u,C],T=f.from+"-"+f.to,A=r==null?void 0:r.elements.find(P=>P.elementId===T);debugger;this.TowerLineManager.addLine(_,{color:A==null?void 0:A.ylbColor,width:3,clampToGround:!1,zIndex:0,dashed:!1,dashLength:10})})}loadFZDISTower1(t){if(this.Keym!="OW_JPS_EEngin_001")return;const e=ka(this.displacementData);let i=new g.HeadingPitchRoll(g.Math.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const r=g.Cartesian3.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(n=>{const o=this.TowerNodes.find(d=>d.id===n.from),f=e[t].find(d=>d.nodeId===n.from),h=this.TowerNodes.find(d=>d.id===n.to),l=e[t].find(d=>d.nodeId===n.to),a=[],c=new g.Cartesian3(o.x-f.x,o.y-f.y,o.z-f.z);a.push(N(r,c,i));const p=new g.Cartesian3(h.x-l.x,h.y-l.y,h.z-l.z);a.push(N(r,p,i));debugger;this.entityCollection2.add(y(a,n.from+""+n.to,this.TowerFZS.TowerMembersWidth,this.TowerFZS.TowerMemberColor))})}loadAllFZDisTower(){if(this.Keym!=="OW_JPS_EEngin_001")return;if(!this.displacementData||this.displacementData.length===0){console.warn("没有可用的位移数据");return}let t=1;const e=this.displacementData.length;this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null);const i=()=>{if(this.viewer.dataSources.contains(this.dataSource2)&&this.viewer.dataSources.remove(this.dataSource2,!0),t>e){t=1;return}this.dataSource2=new g.CustomDataSource("fztower"),this.entityCollection2=this.dataSource2.entities;try{this.loadFZDISTower(t),this.loadFZModel(),console.log(`正在显示位移帧: ${t}/${e}`),t++}catch(r){console.error("加载位移帧时出错:",r),this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}};i(),this._animationInterval=setInterval(i,300)}stopDisplacementAnimation(){this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}toggleAnimation(t){t?this.stopDisplacementAnimation():this.loadAllFZDisTower()}loadFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.add(this.dataSource2),this.viewer.entities.show)}setFZModelVisible(t){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollection2.show=t)}RemoveFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.TowerLineManager.removeAll(),this.pointEntities.forEach(t=>this.viewer.entities.remove(t)),this.pointEntities.length=0)}}mt.GUAPoint=au,mt.InsulatorInfo=ou,mt.InsulatorType=Kt,mt.LineManager=Va,mt.LineNum=Ys,mt.LineType=Ma,mt.OWEEgineFZManager=Au,mt.OWEEgineManager=vu,mt.PhaseSType=Te,mt.TowerFZInfo=_u,mt.TowerInfo=nu,mt.TowerLineInfo=ru,mt.TowerType=mi,mt.TreeType=su,mt.WairnumType=w,mt.drawModel=Pn,Object.defineProperty(mt,Symbol.toStringTag,{value:"Module"})});