/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../../../../chunks/_rollupPluginBabelHelpers","../../../../../core/typedArrayUtil","../../../../../core/workers/WorkerHandle","../../../support/buffer/workerHelper","./EdgeProcessingWorker"],(function(e,t,n,r,a){"use strict";let i=function(n){function i(e){return n.call(this,"EdgeProcessingWorker","extract",{extract:e=>[e.dataBuffer],extractComponentsEdgeLocations:e=>[e.dataBuffer],extractEdgeLocations:e=>[e.dataBuffer]},e)||this}e._inheritsLoose(i,n);var o=i.prototype;return o.process=function(){var t=e._asyncToGenerator((function*(e,t,n){if(n)return a.extract(e);const r=this._packInput(e),i=yield this.invoke(r,t);return this._unpackOutput(i)}));function n(e,n,r){return t.apply(this,arguments)}return n}(),o.extractEdgeLocations=function(){var t=e._asyncToGenerator((function*(e,t){const n=this._packInput(e),a=yield this.invokeMethod("extractEdgeLocations",n,t);return r.unpackInterleavedBuffer(a)}));function n(e,n){return t.apply(this,arguments)}return n}(),o.extractComponentsEdgeLocations=function(){var t=e._asyncToGenerator((function*(e,t){const n=this._packInput(e),a=yield this.invokeMethod("extractComponentsEdgeLocations",n,t);return r.unpackInterleavedBuffer(a)}));function n(e,n){return t.apply(this,arguments)}return n}(),o._packInput=function(e){return{dataBuffer:e.data.buffer,writerSettings:e.writerSettings,skipDeduplicate:e.skipDeduplicate,indicesBuffer:e.indices.buffer,indicesType:t.isUint32Array(e.indices)?"Uint32Array":"Uint16Array",indicesLength:e.indicesLength}},o._unpackOutput=function(e){return{regular:{instancesData:r.unpackInterleavedBuffer(e.regular.instancesData),lodInfo:{lengths:new Float32Array(e.regular.lodInfo.lengths)}},silhouette:{instancesData:r.unpackInterleavedBuffer(e.silhouette.instancesData),lodInfo:{lengths:new Float32Array(e.silhouette.lodInfo.lengths)}},averageEdgeLength:e.averageEdgeLength}},i}(n.WorkerHandle);return i}));
