define(["./arrayRemoveDuplicates-fc9e255d","./Transforms-5295b227","./Cartesian2-5b63e672","./Check-64f87f7d","./ComponentDatatype-8f71e605","./CoplanarPolygonGeometryLibrary-f6a57602","./when-ca391574","./GeometryAttribute-7ef2d452","./GeometryAttributes-a356f820","./GeometryInstance-d18842cb","./GeometryPipeline-a588d10d","./IndexDatatype-4e56bcfa","./PolygonGeometryLibrary-b3087bff","./Math-b53708b3","./RuntimeError-19cb26ba","./WebGLConstants-95ceb4e9","./OrientedBoundingBox-e61df120","./EllipsoidTangentPlane-0fb66b96","./IntersectionTests-f5111308","./Plane-99b2becd","./AttributeCompression-a99f24b9","./EncodedCartesian3-c36ced29","./ArcType-2b58731c","./EllipsoidRhumbLine-21029cef","./PolygonPipeline-55053b0a"],function(a,y,l,e,c,p,o,s,u,d,m,f,b,t,r,n,i,g,h,P,G,v,L,C,T){"use strict";function E(e){e=(e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=b.PolygonGeometryLibrary.computeHierarchyPackedLength(e)+1}E.fromPositions=function(e){return new E({polygonHierarchy:{positions:(e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT)).positions}})},E.pack=function(e,t,r){return r=o.defaultValue(r,0),t[r=b.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,r)]=e.packedLength,t};var k={polygonHierarchy:{}};return E.unpack=function(e,t,r){t=o.defaultValue(t,0);var n=b.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;t=e[t];return(r=!o.defined(r)?new E(k):r)._polygonHierarchy=n,r.packedLength=t,r},E.createGeometry=function(e){var t=e._polygonHierarchy,e=t.positions,e=a.arrayRemoveDuplicates(e,l.Cartesian3.equalsEpsilon,!0);if(!(e.length<3)&&p.CoplanarPolygonGeometryLibrary.validOutline(e)){var r=b.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(t,!1);if(0!==r.length){for(var n=[],o=0;o