/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{getAssetUrl as t}from"../assets.js";import has from"../core/has.js";const s=128e3;let n=null,e=null;async function i(){return n??=r(),n}async function r(){const s=has("esri-csp-restrictions")?await import("../chunks/libtess-asm.js").then(t=>t.l):await import("../chunks/libtess.js").then(t=>t.l);e=await s.default({locateFile:s=>t(`esri/core/libs/libtess/${s}`)})}function a(t,n){const i=Math.max(t.length,s);return e.triangulate(t,n,i)}export{i as loadLibtess,a as triangulate};
